{"version":3,"file":"NcAvatar-C9d7Wrc8-eVjVuCIX.chunk.mjs","sources":["../node_modules/@nextcloud/vue/dist/chunks/NcActionText-Bd1fgVqA.mjs","../node_modules/@nextcloud/vue/dist/chunks/constants-wIEKSp2G.mjs","../node_modules/@nextcloud/vue/dist/composables/useIsDarkTheme/index.mjs","../node_modules/@vueuse/components/dist/index.js","../node_modules/unist-builder/lib/index.js","../node_modules/unist-util-is/lib/index.js","../node_modules/unist-util-visit-parents/lib/index.js","../node_modules/unist-util-visit/lib/index.js","../node_modules/@nextcloud/vue/dist/chunks/autolink-U5pBzLgI.mjs","../node_modules/@nextcloud/vue/dist/functions/contactsMenu/index.mjs","../node_modules/ts-md5/dist/index.es.js","../node_modules/@nextcloud/vue/dist/functions/usernameToColor/index.mjs","../node_modules/striptags/src/striptags.js","../node_modules/@nextcloud/vue/dist/chunks/NcMentionBubble.vue_vue_type_style_index_0_scoped_45238efd_lang-D6LzDiYf.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcAvatar-C9d7Wrc8.mjs"],"sourcesContent":["import '../assets/NcActionText-D9InmayH.css';\nimport { A as ActionTextMixin } from \"./actionText-BXR0sWNu.mjs\";\nimport { a as NC_ACTIONS_IS_SEMANTIC_MENU } from \"./useNcActions-BzPO2c4h.mjs\";\nimport { createElementBlock, openBlock, createElementVNode, renderSlot, createCommentVNode, normalizeStyle, normalizeClass, toDisplayString } from \"vue\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nconst _sfc_main = {\n name: \"NcActionText\",\n mixins: [ActionTextMixin],\n inject: {\n isInSemanticMenu: {\n from: NC_ACTIONS_IS_SEMANTIC_MENU,\n default: false\n }\n }\n};\nconst _hoisted_1 = [\"role\"];\nconst _hoisted_2 = {\n key: 0,\n class: \"action-text__longtext-wrapper\"\n};\nconst _hoisted_3 = { class: \"action-text__name\" };\nconst _hoisted_4 = [\"textContent\"];\nconst _hoisted_5 = [\"textContent\"];\nconst _hoisted_6 = {\n key: 2,\n class: \"action-text__text\"\n};\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"li\", {\n class: \"action\",\n role: $options.isInSemanticMenu && \"presentation\"\n }, [\n createElementVNode(\"span\", {\n class: \"action-text\",\n onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))\n }, [\n renderSlot(_ctx.$slots, \"icon\", {}, () => [\n _ctx.icon !== \"\" ? (openBlock(), createElementBlock(\"span\", {\n key: 0,\n \"aria-hidden\": \"true\",\n class: normalizeClass([\"action-text__icon\", [_ctx.isIconUrl ? \"action-text__icon--url\" : _ctx.icon]]),\n style: normalizeStyle({ backgroundImage: _ctx.isIconUrl ? `url(${_ctx.icon})` : null })\n }, null, 6)) : createCommentVNode(\"\", true)\n ], true),\n _ctx.name ? (openBlock(), createElementBlock(\"span\", _hoisted_2, [\n createElementVNode(\"strong\", _hoisted_3, toDisplayString(_ctx.name), 1),\n createElementVNode(\"span\", {\n class: \"action-text__longtext\",\n textContent: toDisplayString(_ctx.text)\n }, null, 8, _hoisted_4)\n ])) : _ctx.isLongText ? (openBlock(), createElementBlock(\"span\", {\n key: 1,\n class: \"action-text__longtext\",\n textContent: toDisplayString(_ctx.text)\n }, null, 8, _hoisted_5)) : (openBlock(), createElementBlock(\"span\", _hoisted_6, toDisplayString(_ctx.text), 1)),\n createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_1);\n}\nconst NcActionText = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render], [\"__scopeId\", \"data-v-fa684b48\"]]);\nexport {\n NcActionText as N\n};\n//# sourceMappingURL=NcActionText-Bd1fgVqA.mjs.map\n","/*!\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nconst INJECTION_KEY_THEME = /* @__PURE__ */ Symbol.for(\"nc:theme:enforced\");\nexport {\n INJECTION_KEY_THEME as I\n};\n//# sourceMappingURL=constants-wIEKSp2G.mjs.map\n","import { createSharedComposable, usePreferredDark, useMutationObserver } from \"@vueuse/core\";\nimport { computed, toValue, ref, watch, readonly, inject } from \"vue\";\nimport { checkIfDarkTheme } from \"../../functions/isDarkTheme/index.mjs\";\nimport { I as INJECTION_KEY_THEME } from \"../../chunks/constants-wIEKSp2G.mjs\";\n/*!\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nfunction useIsDarkThemeElement(el) {\n const element = computed(() => toValue(el) ?? document.body);\n const isDarkTheme = ref(checkIfDarkTheme(element.value));\n const isDarkSystemTheme = usePreferredDark();\n function updateIsDarkTheme() {\n isDarkTheme.value = checkIfDarkTheme(element.value);\n }\n useMutationObserver(element, updateIsDarkTheme, { attributes: true });\n watch(element, updateIsDarkTheme);\n watch(isDarkSystemTheme, updateIsDarkTheme, { immediate: true });\n return readonly(isDarkTheme);\n}\nconst useInternalIsDarkTheme = createSharedComposable(() => useIsDarkThemeElement());\nfunction useIsDarkTheme() {\n const isDarkTheme = useInternalIsDarkTheme();\n const enforcedTheme = inject(INJECTION_KEY_THEME, void 0);\n return computed(() => {\n if (enforcedTheme?.value) {\n return enforcedTheme.value === \"dark\";\n }\n return isDarkTheme.value;\n });\n}\nexport {\n useIsDarkTheme,\n useIsDarkThemeElement\n};\n//# sourceMappingURL=index.mjs.map\n","import { defaultWindow, isClient, onClickOutside, onKeyStroke, onLongPress, useActiveElement, useBattery, useBrowserLocation, useClipboard, useColorMode, useDark, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDocumentVisibility, useDraggable, useElementBounding, useElementHover, useElementSize, useElementVisibility, useEyeDropper, useFullscreen, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useMouse, useMouseInElement, useMousePressed, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, usePointer, usePointerLock, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePreferredReducedTransparency, useResizeObserver, useScreenSafeArea, useScroll, useScrollLock, useStorage, useTimeAgo, useTimestamp, useVirtualList, useWindowFocus, useWindowSize } from \"@vueuse/core\";\nimport { computed, defineComponent, h, reactive, shallowRef, toRefs, toValue, watch } from \"vue\";\nimport { reactiveOmit, toRefs as toRefs$1, useToggle } from \"@vueuse/shared\";\n\n//#region ../core/onClickOutside/component.ts\nconst OnClickOutside = /* @__PURE__ */ defineComponent((props, { slots, emit }) => {\n\tconst target = shallowRef();\n\tonClickOutside(target, (e) => {\n\t\temit(\"trigger\", e);\n\t}, props.options);\n\treturn () => {\n\t\tif (slots.default) return h(props.as || \"div\", { ref: target }, slots.default());\n\t};\n}, {\n\tname: \"OnClickOutside\",\n\tprops: [\"as\", \"options\"],\n\temits: [\"trigger\"]\n});\n\n//#endregion\n//#region ../core/onClickOutside/directive.ts\nconst stopClickOutsideMap = /* @__PURE__ */ new WeakMap();\nconst vOnClickOutside = {\n\tmounted(el, binding) {\n\t\tconst capture = !binding.modifiers.bubble;\n\t\tlet stop;\n\t\tif (typeof binding.value === \"function\") stop = onClickOutside(el, binding.value, { capture });\n\t\telse {\n\t\t\tconst [handler, options] = binding.value;\n\t\t\tstop = onClickOutside(el, handler, Object.assign({ capture }, options));\n\t\t}\n\t\tstopClickOutsideMap.set(el, stop);\n\t},\n\tunmounted(el) {\n\t\tconst stop = stopClickOutsideMap.get(el);\n\t\tif (stop && typeof stop === \"function\") stop();\n\t\telse stop === null || stop === void 0 || stop.stop();\n\t\tstopClickOutsideMap.delete(el);\n\t}\n};\n/** @deprecated use `vOnClickOutside` instead */\nconst VOnClickOutside = vOnClickOutside;\n\n//#endregion\n//#region ../core/onKeyStroke/directive.ts\nconst vOnKeyStroke = { mounted(el, binding) {\n\tvar _binding$arg$split, _binding$arg;\n\tconst keys = (_binding$arg$split = (_binding$arg = binding.arg) === null || _binding$arg === void 0 ? void 0 : _binding$arg.split(\",\")) !== null && _binding$arg$split !== void 0 ? _binding$arg$split : true;\n\tif (typeof binding.value === \"function\") onKeyStroke(keys, binding.value, { target: el });\n\telse {\n\t\tconst [handler, options] = binding.value;\n\t\tonKeyStroke(keys, handler, {\n\t\t\ttarget: el,\n\t\t\t...options\n\t\t});\n\t}\n} };\n\n//#endregion\n//#region ../core/onLongPress/component.ts\nconst OnLongPress = /* @__PURE__ */ defineComponent((props, { slots, emit }) => {\n\tconst target = shallowRef();\n\tconst data = onLongPress(target, (e) => {\n\t\temit(\"trigger\", e);\n\t}, props.options);\n\treturn () => {\n\t\tif (slots.default) return h(props.as || \"div\", { ref: target }, slots.default(data));\n\t};\n}, {\n\tname: \"OnLongPress\",\n\tprops: [\"as\", \"options\"],\n\temits: [\"trigger\"]\n});\n\n//#endregion\n//#region ../core/onLongPress/directive.ts\nconst vOnLongPress = { mounted(el, binding) {\n\tif (typeof binding.value === \"function\") onLongPress(el, binding.value, { modifiers: binding.modifiers });\n\telse onLongPress(el, ...binding.value);\n} };\n/** @deprecated use `vOnLongPress` instead */\nconst VOnLongPress = vOnLongPress;\n\n//#endregion\n//#region ../core/useActiveElement/component.ts\nconst UseActiveElement = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive({ element: useActiveElement(props) });\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseActiveElement\",\n\tprops: [\n\t\t\"deep\",\n\t\t\"triggerOnRemoval\",\n\t\t\"window\",\n\t\t\"document\"\n\t]\n});\n\n//#endregion\n//#region ../core/useBattery/component.ts\nconst UseBattery = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive(useBattery(props));\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseBattery\",\n\tprops: [\"navigator\"]\n});\n\n//#endregion\n//#region ../core/useBrowserLocation/component.ts\nconst UseBrowserLocation = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive(useBrowserLocation(props));\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseBrowserLocation\",\n\tprops: [\"window\"]\n});\n\n//#endregion\n//#region ../core/useClipboard/component.ts\nconst UseClipboard = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive(useClipboard(props));\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseClipboard\",\n\tprops: [\n\t\t\"source\",\n\t\t\"read\",\n\t\t\"navigator\",\n\t\t\"copiedDuring\",\n\t\t\"legacy\"\n\t]\n});\n\n//#endregion\n//#region ../core/useColorMode/component.ts\nconst UseColorMode = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst mode = useColorMode(props);\n\tconst data = reactive({\n\t\tmode,\n\t\tsystem: mode.system,\n\t\tstore: mode.store\n\t});\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseColorMode\",\n\tprops: [\n\t\t\"attribute\",\n\t\t\"deep\",\n\t\t\"disableTransition\",\n\t\t\"emitAuto\",\n\t\t\"eventFilter\",\n\t\t\"flush\",\n\t\t\"initOnMounted\",\n\t\t\"initialValue\",\n\t\t\"listenToStorageChanges\",\n\t\t\"mergeDefaults\",\n\t\t\"modes\",\n\t\t\"onChanged\",\n\t\t\"onError\",\n\t\t\"selector\",\n\t\t\"serializer\",\n\t\t\"shallow\",\n\t\t\"storage\",\n\t\t\"storageKey\",\n\t\t\"storageRef\",\n\t\t\"window\",\n\t\t\"writeDefaults\"\n\t]\n});\n\n//#endregion\n//#region ../core/useDark/component.ts\nconst UseDark = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst isDark = useDark(props);\n\tconst data = reactive({\n\t\tisDark,\n\t\ttoggleDark: useToggle(isDark)\n\t});\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseDark\",\n\tprops: [\n\t\t\"attribute\",\n\t\t\"deep\",\n\t\t\"disableTransition\",\n\t\t\"emitAuto\",\n\t\t\"eventFilter\",\n\t\t\"flush\",\n\t\t\"initOnMounted\",\n\t\t\"initialValue\",\n\t\t\"listenToStorageChanges\",\n\t\t\"mergeDefaults\",\n\t\t\"onChanged\",\n\t\t\"onError\",\n\t\t\"selector\",\n\t\t\"serializer\",\n\t\t\"shallow\",\n\t\t\"storage\",\n\t\t\"storageKey\",\n\t\t\"storageRef\",\n\t\t\"valueDark\",\n\t\t\"valueLight\",\n\t\t\"window\",\n\t\t\"writeDefaults\"\n\t]\n});\n\n//#endregion\n//#region ../core/useDeviceMotion/component.ts\nconst UseDeviceMotion = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = useDeviceMotion(props);\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseDeviceMotion\",\n\tprops: [\n\t\t\"eventFilter\",\n\t\t\"requestPermissions\",\n\t\t\"window\"\n\t]\n});\n\n//#endregion\n//#region ../core/useDeviceOrientation/component.ts\nconst UseDeviceOrientation = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive(useDeviceOrientation(props));\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseDeviceOrientation\",\n\tprops: [\"window\"]\n});\n\n//#endregion\n//#region ../core/useDevicePixelRatio/component.ts\nconst UseDevicePixelRatio = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive(useDevicePixelRatio(props));\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseDevicePixelRatio\",\n\tprops: [\"window\"]\n});\n\n//#endregion\n//#region ../core/useDevicesList/component.ts\nconst UseDevicesList = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive(useDevicesList(props));\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseDevicesList\",\n\tprops: [\n\t\t\"constraints\",\n\t\t\"navigator\",\n\t\t\"onUpdated\",\n\t\t\"requestPermissions\"\n\t]\n});\n\n//#endregion\n//#region ../core/useDocumentVisibility/component.ts\nconst UseDocumentVisibility = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive({ visibility: useDocumentVisibility(props) });\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseDocumentVisibility\",\n\tprops: [\"document\"]\n});\n\n//#endregion\n//#region ../core/useDraggable/component.ts\nconst UseDraggable = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst target = shallowRef();\n\tconst handle = computed(() => {\n\t\tvar _toValue;\n\t\treturn (_toValue = toValue(props.handle)) !== null && _toValue !== void 0 ? _toValue : target.value;\n\t});\n\tconst containerElement = computed(() => {\n\t\tvar _ref;\n\t\treturn (_ref = props.containerElement) !== null && _ref !== void 0 ? _ref : void 0;\n\t});\n\tconst disabled = computed(() => !!props.disabled);\n\tconst storageValue = props.storageKey && useStorage(props.storageKey, toValue(props.initialValue) || {\n\t\tx: 0,\n\t\ty: 0\n\t}, isClient ? props.storageType === \"session\" ? sessionStorage : localStorage : void 0);\n\tconst initialValue = storageValue || props.initialValue || {\n\t\tx: 0,\n\t\ty: 0\n\t};\n\tconst onEnd = (position, event) => {\n\t\tvar _props$onEnd;\n\t\t(_props$onEnd = props.onEnd) === null || _props$onEnd === void 0 || _props$onEnd.call(props, position, event);\n\t\tif (!storageValue) return;\n\t\tstorageValue.value.x = position.x;\n\t\tstorageValue.value.y = position.y;\n\t};\n\tconst data = reactive(useDraggable(target, {\n\t\t...props,\n\t\thandle,\n\t\tinitialValue,\n\t\tonEnd,\n\t\tdisabled,\n\t\tcontainerElement\n\t}));\n\treturn () => {\n\t\tif (slots.default) return h(props.as || \"div\", {\n\t\t\tref: target,\n\t\t\tstyle: `touch-action:none;${data.style}`\n\t\t}, slots.default(data));\n\t};\n}, {\n\tname: \"UseDraggable\",\n\tprops: [\n\t\t\"storageKey\",\n\t\t\"storageType\",\n\t\t\"initialValue\",\n\t\t\"exact\",\n\t\t\"preventDefault\",\n\t\t\"stopPropagation\",\n\t\t\"pointerTypes\",\n\t\t\"as\",\n\t\t\"handle\",\n\t\t\"axis\",\n\t\t\"onStart\",\n\t\t\"onMove\",\n\t\t\"onEnd\",\n\t\t\"disabled\",\n\t\t\"buttons\",\n\t\t\"containerElement\",\n\t\t\"capture\",\n\t\t\"draggingElement\"\n\t]\n});\n\n//#endregion\n//#region ../core/useElementBounding/component.ts\nconst UseElementBounding = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst target = shallowRef();\n\tconst data = reactive(useElementBounding(target, props));\n\treturn () => {\n\t\tif (slots.default) return h(props.as || \"div\", { ref: target }, slots.default(data));\n\t};\n}, {\n\tname: \"UseElementBounding\",\n\tprops: [\n\t\t\"as\",\n\t\t\"immediate\",\n\t\t\"reset\",\n\t\t\"updateTiming\",\n\t\t\"windowResize\",\n\t\t\"windowScroll\"\n\t]\n});\n\n//#endregion\n//#region ../core/useElementBounding/directive.ts\nconst vElementBounding = { mounted(el, binding) {\n\tconst [handler, options] = typeof binding.value === \"function\" ? [binding.value, {}] : binding.value;\n\tconst { height, bottom, left, right, top, width, x, y } = useElementBounding(el, options);\n\twatch([\n\t\theight,\n\t\tbottom,\n\t\tleft,\n\t\tright,\n\t\ttop,\n\t\twidth,\n\t\tx,\n\t\ty\n\t], () => handler({\n\t\theight,\n\t\tbottom,\n\t\tleft,\n\t\tright,\n\t\ttop,\n\t\twidth,\n\t\tx,\n\t\ty\n\t}));\n} };\n\n//#endregion\n//#region ../core/useElementHover/directive.ts\nconst vElementHover = { mounted(el, binding) {\n\tconst value = binding.value;\n\tif (typeof value === \"function\") watch(useElementHover(el), (v) => value(v));\n\telse {\n\t\tconst [handler, options] = value;\n\t\twatch(useElementHover(el, options), (v) => handler(v));\n\t}\n} };\n\n//#endregion\n//#region ../core/useElementSize/component.ts\nconst UseElementSize = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tvar _toValue, _toValue2;\n\tconst target = shallowRef();\n\tconst { width, height } = toRefs(props);\n\tconst data = reactive(useElementSize(target, {\n\t\twidth: (_toValue = toValue(width)) !== null && _toValue !== void 0 ? _toValue : 0,\n\t\theight: (_toValue2 = toValue(height)) !== null && _toValue2 !== void 0 ? _toValue2 : 0\n\t}, {\n\t\tbox: props.box,\n\t\twindow: props.window\n\t}));\n\treturn () => {\n\t\tif (slots.default) return h(props.as || \"div\", { ref: target }, slots.default(data));\n\t};\n}, {\n\tname: \"UseElementSize\",\n\tprops: [\n\t\t\"as\",\n\t\t\"box\",\n\t\t\"height\",\n\t\t\"width\",\n\t\t\"window\"\n\t]\n});\n\n//#endregion\n//#region ../core/useElementSize/directive.ts\nconst vElementSize = { mounted(el, binding) {\n\tvar _binding$value;\n\tconst handler = typeof binding.value === \"function\" ? binding.value : (_binding$value = binding.value) === null || _binding$value === void 0 ? void 0 : _binding$value[0];\n\tconst { width, height } = useElementSize(el, ...typeof binding.value === \"function\" ? [] : binding.value.slice(1));\n\twatch([width, height], ([width$1, height$1]) => handler({\n\t\twidth: width$1,\n\t\theight: height$1\n\t}));\n} };\n\n//#endregion\n//#region ../core/useElementVisibility/component.ts\nconst UseElementVisibility = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst target = shallowRef();\n\tconst data = reactive({ isVisible: useElementVisibility(target, props) });\n\treturn () => {\n\t\tif (slots.default) return h(props.as || \"div\", { ref: target }, slots.default(data));\n\t};\n}, {\n\tname: \"UseElementVisibility\",\n\tprops: [\n\t\t\"as\",\n\t\t\"once\",\n\t\t\"rootMargin\",\n\t\t\"scrollTarget\",\n\t\t\"threshold\",\n\t\t\"window\"\n\t]\n});\n\n//#endregion\n//#region ../core/useElementVisibility/directive.ts\nconst vElementVisibility = { mounted(el, binding) {\n\tif (typeof binding.value === \"function\") {\n\t\tconst handler = binding.value;\n\t\twatch(useElementVisibility(el), (v) => handler(v), { immediate: true });\n\t} else {\n\t\tconst [handler, options] = binding.value;\n\t\twatch(useElementVisibility(el, options), (v) => handler(v), { immediate: true });\n\t}\n} };\n\n//#endregion\n//#region ../core/useEyeDropper/component.ts\nconst UseEyeDropper = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive(useEyeDropper(props));\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseEyeDropper\",\n\tprops: [\"initialValue\"]\n});\n\n//#endregion\n//#region ../core/useFullscreen/component.ts\nconst UseFullscreen = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst target = shallowRef();\n\tconst data = reactive(useFullscreen(target, props));\n\treturn () => {\n\t\tif (slots.default) return h(props.as || \"div\", { ref: target }, slots.default(data));\n\t};\n}, {\n\tname: \"UseFullscreen\",\n\tprops: [\n\t\t\"as\",\n\t\t\"autoExit\",\n\t\t\"document\"\n\t]\n});\n\n//#endregion\n//#region ../core/useGeolocation/component.ts\nconst UseGeolocation = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive(useGeolocation(props));\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseGeolocation\",\n\tprops: [\n\t\t\"enableHighAccuracy\",\n\t\t\"immediate\",\n\t\t\"maximumAge\",\n\t\t\"navigator\",\n\t\t\"timeout\"\n\t]\n});\n\n//#endregion\n//#region ../core/useIdle/component.ts\nconst UseIdle = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive(useIdle(props.timeout, props));\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseIdle\",\n\tprops: [\n\t\t\"eventFilter\",\n\t\t\"events\",\n\t\t\"initialState\",\n\t\t\"listenForVisibilityChange\",\n\t\t\"timeout\",\n\t\t\"window\"\n\t]\n});\n\n//#endregion\n//#region ../core/useImage/component.ts\nconst UseImage = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive(useImage(props));\n\treturn () => {\n\t\tif (data.isLoading && slots.loading) return slots.loading(data);\n\t\telse if (data.error && slots.error) return slots.error(data.error);\n\t\tif (slots.default) return slots.default(data);\n\t\treturn h(props.as || \"img\", props);\n\t};\n}, {\n\tname: \"UseImage\",\n\tprops: [\n\t\t\"alt\",\n\t\t\"as\",\n\t\t\"class\",\n\t\t\"crossorigin\",\n\t\t\"decoding\",\n\t\t\"fetchPriority\",\n\t\t\"height\",\n\t\t\"ismap\",\n\t\t\"loading\",\n\t\t\"referrerPolicy\",\n\t\t\"sizes\",\n\t\t\"src\",\n\t\t\"srcset\",\n\t\t\"usemap\",\n\t\t\"width\"\n\t]\n});\n\n//#endregion\n//#region ../core/useInfiniteScroll/directive.ts\nconst vInfiniteScroll = { mounted(el, binding) {\n\tif (typeof binding.value === \"function\") useInfiniteScroll(el, binding.value);\n\telse useInfiniteScroll(el, ...binding.value);\n} };\n\n//#endregion\n//#region ../core/useIntersectionObserver/directive.ts\nconst vIntersectionObserver = { mounted(el, binding) {\n\tif (typeof binding.value === \"function\") useIntersectionObserver(el, binding.value);\n\telse useIntersectionObserver(el, ...binding.value);\n} };\n\n//#endregion\n//#region ../core/useMouse/component.ts\nconst UseMouse = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive(useMouse(props));\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseMouse\",\n\tprops: [\n\t\t\"eventFilter\",\n\t\t\"initialValue\",\n\t\t\"resetOnTouchEnds\",\n\t\t\"scroll\",\n\t\t\"target\",\n\t\t\"touch\",\n\t\t\"type\",\n\t\t\"window\"\n\t]\n});\n\n//#endregion\n//#region ../core/useMouseInElement/component.ts\nconst UseMouseInElement = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst target = shallowRef();\n\tconst data = reactive(useMouseInElement(target, props));\n\treturn () => {\n\t\tif (slots.default) return h(props.as || \"div\", { ref: target }, slots.default(data));\n\t};\n}, {\n\tname: \"UseMouseInElement\",\n\tprops: [\n\t\t\"as\",\n\t\t\"eventFilter\",\n\t\t\"handleOutside\",\n\t\t\"initialValue\",\n\t\t\"resetOnTouchEnds\",\n\t\t\"scroll\",\n\t\t\"target\",\n\t\t\"touch\",\n\t\t\"type\",\n\t\t\"window\",\n\t\t\"windowResize\",\n\t\t\"windowScroll\"\n\t]\n});\n\n//#endregion\n//#region ../core/useMouseInElement/directive.ts\nconst vMouseInElement = { mounted(el, binding) {\n\tconst [handler, options] = typeof binding.value === \"function\" ? [binding.value, {}] : binding.value;\n\twatch(reactiveOmit(reactive(useMouseInElement(el, options)), \"stop\"), (val) => handler(val));\n} };\n\n//#endregion\n//#region ../core/useMousePressed/component.ts\nconst UseMousePressed = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst target = shallowRef();\n\tconst data = reactive(useMousePressed({\n\t\t...props,\n\t\ttarget\n\t}));\n\treturn () => {\n\t\tif (slots.default) return h(props.as || \"div\", { ref: target }, slots.default(data));\n\t};\n}, {\n\tname: \"UseMousePressed\",\n\tprops: [\n\t\t\"as\",\n\t\t\"capture\",\n\t\t\"drag\",\n\t\t\"initialValue\",\n\t\t\"onPressed\",\n\t\t\"onReleased\",\n\t\t\"touch\",\n\t\t\"window\"\n\t]\n});\n\n//#endregion\n//#region ../core/useNetwork/component.ts\nconst UseNetwork = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive(useNetwork(props));\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseNetwork\",\n\tprops: [\"window\"]\n});\n\n//#endregion\n//#region ../core/useNow/component.ts\nconst UseNow = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive(useNow({\n\t\t...props,\n\t\tcontrols: true\n\t}));\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseNow\",\n\tprops: [\n\t\t\"scheduler\",\n\t\t\"immediate\",\n\t\t\"interval\"\n\t]\n});\n\n//#endregion\n//#region ../core/useObjectUrl/component.ts\nconst UseObjectUrl = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst { object } = toRefs$1(props);\n\tconst url = useObjectUrl(object);\n\treturn () => {\n\t\tif (slots.default && url.value) return slots.default(url.value);\n\t};\n}, {\n\tname: \"UseObjectUrl\",\n\tprops: [\"object\"]\n});\n\n//#endregion\n//#region ../core/useOffsetPagination/component.ts\nconst UseOffsetPagination = /* @__PURE__ */ defineComponent((props, { slots, emit }) => {\n\tconst data = reactive(useOffsetPagination({\n\t\t...props,\n\t\ttotal: toValue(props.total) || void 0,\n\t\tonPageChange(...args) {\n\t\t\tvar _props$onPageChange;\n\t\t\t(_props$onPageChange = props.onPageChange) === null || _props$onPageChange === void 0 || _props$onPageChange.call(props, ...args);\n\t\t\temit(\"page-change\", ...args);\n\t\t},\n\t\tonPageSizeChange(...args) {\n\t\t\tvar _props$onPageSizeChan;\n\t\t\t(_props$onPageSizeChan = props.onPageSizeChange) === null || _props$onPageSizeChan === void 0 || _props$onPageSizeChan.call(props, ...args);\n\t\t\temit(\"page-size-change\", ...args);\n\t\t},\n\t\tonPageCountChange(...args) {\n\t\t\tvar _props$onPageCountCha;\n\t\t\t(_props$onPageCountCha = props.onPageCountChange) === null || _props$onPageCountCha === void 0 || _props$onPageCountCha.call(props, ...args);\n\t\t\temit(\"page-count-change\", ...args);\n\t\t}\n\t}));\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseOffsetPagination\",\n\tprops: [\n\t\t\"onPageChange\",\n\t\t\"onPageCountChange\",\n\t\t\"onPageSizeChange\",\n\t\t\"page\",\n\t\t\"pageSize\",\n\t\t\"total\"\n\t]\n});\n\n//#endregion\n//#region ../core/useOnline/component.ts\nconst UseOnline = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive({ isOnline: useOnline(props) });\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseOnline\",\n\tprops: [\"window\"]\n});\n\n//#endregion\n//#region ../core/usePageLeave/component.ts\nconst UsePageLeave = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive({ isLeft: usePageLeave(props) });\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UsePageLeave\",\n\tprops: [\"window\"]\n});\n\n//#endregion\n//#region ../core/usePointer/component.ts\nconst UsePointer = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst el = shallowRef(null);\n\tconst data = reactive(usePointer({\n\t\t...props,\n\t\ttarget: props.target === \"self\" ? el : defaultWindow\n\t}));\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UsePointer\",\n\tprops: [\n\t\t\"initialValue\",\n\t\t\"pointerTypes\",\n\t\t\"target\",\n\t\t\"window\"\n\t]\n});\n\n//#endregion\n//#region ../core/usePointerLock/component.ts\nconst UsePointerLock = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst target = shallowRef();\n\tconst data = reactive(usePointerLock(target));\n\treturn () => {\n\t\tif (slots.default) return h(props.as || \"div\", { ref: target }, slots.default(data));\n\t};\n}, {\n\tname: \"UsePointerLock\",\n\tprops: [\"as\", \"document\"]\n});\n\n//#endregion\n//#region ../core/usePreferredColorScheme/component.ts\nconst UsePreferredColorScheme = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive({ colorScheme: usePreferredColorScheme(props) });\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UsePreferredColorScheme\",\n\tprops: [\"window\"]\n});\n\n//#endregion\n//#region ../core/usePreferredContrast/component.ts\nconst UsePreferredContrast = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive({ contrast: usePreferredContrast(props) });\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UsePreferredContrast\",\n\tprops: [\"window\"]\n});\n\n//#endregion\n//#region ../core/usePreferredDark/component.ts\nconst UsePreferredDark = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive({ prefersDark: usePreferredDark(props) });\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UsePreferredDark\",\n\tprops: [\"window\"]\n});\n\n//#endregion\n//#region ../core/usePreferredLanguages/component.ts\nconst UsePreferredLanguages = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive({ languages: usePreferredLanguages(props) });\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UsePreferredLanguages\",\n\tprops: [\"window\"]\n});\n\n//#endregion\n//#region ../core/usePreferredReducedMotion/component.ts\nconst UsePreferredReducedMotion = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive({ motion: usePreferredReducedMotion(props) });\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UsePreferredReducedMotion\",\n\tprops: [\"window\"]\n});\n\n//#endregion\n//#region ../core/usePreferredReducedTransparency/component.ts\nconst UsePreferredReducedTransparency = /* @__PURE__ */ defineComponent({\n\tname: \"UsePreferredReducedTransparency\",\n\tsetup(props, { slots }) {\n\t\tconst data = reactive({ transparency: usePreferredReducedTransparency() });\n\t\treturn () => {\n\t\t\tif (slots.default) return slots.default(data);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region ../core/useResizeObserver/directive.ts\nconst vResizeObserver = { mounted(el, binding) {\n\tif (typeof binding.value === \"function\") useResizeObserver(el, binding.value);\n\telse useResizeObserver(el, ...binding.value);\n} };\n\n//#endregion\n//#region ../core/useScreenSafeArea/component.ts\nconst UseScreenSafeArea = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive(useScreenSafeArea());\n\treturn () => {\n\t\tif (slots.default) return h(props.as || \"div\", { style: {\n\t\t\tpaddingTop: props.top ? data.top : \"\",\n\t\t\tpaddingRight: props.right ? data.right : \"\",\n\t\t\tpaddingBottom: props.bottom ? data.bottom : \"\",\n\t\t\tpaddingLeft: props.left ? data.left : \"\",\n\t\t\tboxSizing: \"border-box\",\n\t\t\tmaxHeight: \"100vh\",\n\t\t\tmaxWidth: \"100vw\",\n\t\t\toverflow: \"auto\"\n\t\t} }, slots.default(data));\n\t};\n}, {\n\tname: \"UseScreenSafeArea\",\n\tprops: [\n\t\t\"top\",\n\t\t\"right\",\n\t\t\"bottom\",\n\t\t\"left\"\n\t]\n});\n\n//#endregion\n//#region ../core/useScroll/directive.ts\nconst vScroll = { mounted(el, binding) {\n\tif (typeof binding.value === \"function\") {\n\t\tconst handler = binding.value;\n\t\tconst state = useScroll(el, {\n\t\t\tonScroll() {\n\t\t\t\thandler(state);\n\t\t\t},\n\t\t\tonStop() {\n\t\t\t\thandler(state);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tconst [handler, options] = binding.value;\n\t\tconst state = useScroll(el, {\n\t\t\t...options,\n\t\t\tonScroll(e) {\n\t\t\t\tvar _options$onScroll;\n\t\t\t\t(_options$onScroll = options.onScroll) === null || _options$onScroll === void 0 || _options$onScroll.call(options, e);\n\t\t\t\thandler(state);\n\t\t\t},\n\t\t\tonStop(e) {\n\t\t\t\tvar _options$onStop;\n\t\t\t\t(_options$onStop = options.onStop) === null || _options$onStop === void 0 || _options$onStop.call(options, e);\n\t\t\t\thandler(state);\n\t\t\t}\n\t\t});\n\t}\n} };\n\n//#endregion\n//#region ../core/useScrollLock/directive.ts\nfunction onScrollLock() {\n\tlet isMounted = false;\n\tconst state = shallowRef(false);\n\treturn (el, binding) => {\n\t\tstate.value = binding.value;\n\t\tif (isMounted) return;\n\t\tisMounted = true;\n\t\tconst isLocked = useScrollLock(el, binding.value);\n\t\twatch(state, (v) => isLocked.value = v);\n\t};\n}\nconst vScrollLock = onScrollLock();\n\n//#endregion\n//#region ../core/useTimeAgo/component.ts\nconst UseTimeAgo = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive(useTimeAgo(() => props.time, {\n\t\t...props,\n\t\tcontrols: true\n\t}));\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseTimeAgo\",\n\tprops: [\n\t\t\"fullDateFormatter\",\n\t\t\"max\",\n\t\t\"messages\",\n\t\t\"rounding\",\n\t\t\"showSecond\",\n\t\t\"time\",\n\t\t\"units\",\n\t\t\"updateInterval\"\n\t]\n});\n\n//#endregion\n//#region ../core/useTimestamp/component.ts\nconst UseTimestamp = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive(useTimestamp({\n\t\t...props,\n\t\tcontrols: true\n\t}));\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseTimestamp\",\n\tprops: [\n\t\t\"scheduler\",\n\t\t\"callback\",\n\t\t\"immediate\",\n\t\t\"interval\",\n\t\t\"offset\"\n\t]\n});\n\n//#endregion\n//#region ../core/useVirtualList/component.ts\nconst UseVirtualList = /* @__PURE__ */ defineComponent((props, { slots, expose }) => {\n\tconst { list: listRef } = toRefs(props);\n\tconst { list, containerProps, wrapperProps, scrollTo } = useVirtualList(listRef, props.options);\n\texpose({ scrollTo });\n\tif (containerProps.style && typeof containerProps.style === \"object\" && !Array.isArray(containerProps.style)) containerProps.style.height = props.height || \"300px\";\n\treturn () => h(\"div\", { ...containerProps }, [h(\"div\", { ...wrapperProps.value }, list.value.map((item) => h(\"div\", { style: {\n\t\toverflow: \"hidden\",\n\t\theight: item.height\n\t} }, slots.default ? slots.default(item) : \"Please set content!\")))]);\n}, {\n\tname: \"UseVirtualList\",\n\tprops: [\n\t\t\"height\",\n\t\t\"list\",\n\t\t\"options\"\n\t]\n});\n\n//#endregion\n//#region ../core/useWindowFocus/component.ts\nconst UseWindowFocus = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive({ focused: useWindowFocus(props) });\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseWindowFocus\",\n\tprops: [\"window\"]\n});\n\n//#endregion\n//#region ../core/useWindowSize/component.ts\nconst UseWindowSize = /* @__PURE__ */ defineComponent((props, { slots }) => {\n\tconst data = reactive(useWindowSize(props));\n\treturn () => {\n\t\tif (slots.default) return slots.default(data);\n\t};\n}, {\n\tname: \"UseWindowSize\",\n\tprops: [\n\t\t\"includeScrollbar\",\n\t\t\"initialHeight\",\n\t\t\"initialWidth\",\n\t\t\"listenOrientation\",\n\t\t\"type\",\n\t\t\"window\"\n\t]\n});\n\n//#endregion\nexport { OnClickOutside, OnLongPress, UseActiveElement, UseBattery, UseBrowserLocation, UseClipboard, UseColorMode, UseDark, UseDeviceMotion, UseDeviceOrientation, UseDevicePixelRatio, UseDevicesList, UseDocumentVisibility, UseDraggable, UseElementBounding, UseElementSize, UseElementVisibility, UseEyeDropper, UseFullscreen, UseGeolocation, UseIdle, UseImage, UseMouse, UseMouseInElement, UseMousePressed, UseNetwork, UseNow, UseObjectUrl, UseOffsetPagination, UseOnline, UsePageLeave, UsePointer, UsePointerLock, UsePreferredColorScheme, UsePreferredContrast, UsePreferredDark, UsePreferredLanguages, UsePreferredReducedMotion, UsePreferredReducedTransparency, UseScreenSafeArea, UseTimeAgo, UseTimestamp, UseVirtualList, UseWindowFocus, UseWindowSize, VOnClickOutside, VOnLongPress, vElementBounding, vElementHover, vElementSize, vElementVisibility, vInfiniteScroll, vIntersectionObserver, vMouseInElement, vOnClickOutside, vOnKeyStroke, vOnLongPress, vResizeObserver, vScroll, vScrollLock };","/**\n * @typedef {import('unist').Node} Node\n */\n\n/**\n * @typedef {Array | string} ChildrenOrValue\n * List to use as `children` or value to use as `value`.\n *\n * @typedef {Record} Props\n * Other fields to add to the node.\n */\n\n/**\n * Build a node.\n *\n * @template {string} T\n * @template {Props} P\n * @template {Array} C\n *\n * @overload\n * @param {T} type\n * @returns {{type: T}}\n *\n * @overload\n * @param {T} type\n * @param {P} props\n * @returns {{type: T} & P}\n *\n * @overload\n * @param {T} type\n * @param {string} value\n * @returns {{type: T, value: string}}\n *\n * @overload\n * @param {T} type\n * @param {P} props\n * @param {string} value\n * @returns {{type: T, value: string} & P}\n *\n * @overload\n * @param {T} type\n * @param {C} children\n * @returns {{type: T, children: C}}\n *\n * @overload\n * @param {T} type\n * @param {P} props\n * @param {C} children\n * @returns {{type: T, children: C} & P}\n *\n * @param {string} type\n * Node type.\n * @param {ChildrenOrValue | Props | null | undefined} [props]\n * Fields assigned to node (default: `undefined`).\n * @param {ChildrenOrValue | null | undefined} [value]\n * Children of node or value of `node` (cast to string).\n * @returns {Node}\n * Built node.\n */\nexport function u(type, props, value) {\n /** @type {Node} */\n const node = {type: String(type)}\n\n if (\n (value === undefined || value === null) &&\n (typeof props === 'string' || Array.isArray(props))\n ) {\n value = props\n } else {\n Object.assign(node, props)\n }\n\n if (Array.isArray(value)) {\n // @ts-expect-error: create a parent.\n node.children = value\n } else if (value !== undefined && value !== null) {\n // @ts-expect-error: create a literal.\n node.value = String(value)\n }\n\n return node\n}\n","/**\n * @import {Node, Parent} from 'unist'\n */\n\n/**\n * @template Fn\n * @template Fallback\n * @typedef {Fn extends (value: any) => value is infer Thing ? Thing : Fallback} Predicate\n */\n\n/**\n * @callback Check\n * Check that an arbitrary value is a node.\n * @param {unknown} this\n * The given context.\n * @param {unknown} [node]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {boolean}\n * Whether this is a node and passes a test.\n *\n * @typedef {Record | Node} Props\n * Object to check for equivalence.\n *\n * Note: `Node` is included as it is common but is not indexable.\n *\n * @typedef {Array | ReadonlyArray | Props | TestFunction | string | null | undefined} Test\n * Check for an arbitrary node.\n *\n * @callback TestFunction\n * Check if a node passes a test.\n * @param {unknown} this\n * The given context.\n * @param {Node} node\n * A node.\n * @param {number | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | undefined} [parent]\n * The node’s parent.\n * @returns {boolean | undefined | void}\n * Whether this node passes the test.\n *\n * Note: `void` is included until TS sees no return as `undefined`.\n */\n\n/**\n * Check if `node` is a `Node` and whether it passes the given test.\n *\n * @param {unknown} node\n * Thing to check, typically `Node`.\n * @param {Test} test\n * A check for a specific node.\n * @param {number | null | undefined} index\n * The node’s position in its parent.\n * @param {Parent | null | undefined} parent\n * The node’s parent.\n * @param {unknown} context\n * Context object (`this`) to pass to `test` functions.\n * @returns {boolean}\n * Whether `node` is a node and passes a test.\n */\nexport const is =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * (>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition[number]}) &\n * (>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition[number]}) &\n * ((node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &\n * ((node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &\n * ((node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate) &\n * ((node?: null | undefined) => false) &\n * ((node: unknown, test?: null | undefined, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &\n * ((node: unknown, test?: Test, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => boolean)\n * )}\n */\n (\n /**\n * @param {unknown} [node]\n * @param {Test} [test]\n * @param {number | null | undefined} [index]\n * @param {Parent | null | undefined} [parent]\n * @param {unknown} [context]\n * @returns {boolean}\n */\n // eslint-disable-next-line max-params\n function (node, test, index, parent, context) {\n const check = convert(test)\n\n if (\n index !== undefined &&\n index !== null &&\n (typeof index !== 'number' ||\n index < 0 ||\n index === Number.POSITIVE_INFINITY)\n ) {\n throw new Error('Expected positive finite index')\n }\n\n if (\n parent !== undefined &&\n parent !== null &&\n (!is(parent) || !parent.children)\n ) {\n throw new Error('Expected parent node')\n }\n\n if (\n (parent === undefined || parent === null) !==\n (index === undefined || index === null)\n ) {\n throw new Error('Expected both parent and index')\n }\n\n return looksLikeANode(node)\n ? check.call(context, node, index, parent)\n : false\n }\n )\n\n/**\n * Generate an assertion from a test.\n *\n * Useful if you’re going to test many nodes, for example when creating a\n * utility where something else passes a compatible test.\n *\n * The created function is a bit faster because it expects valid input only:\n * a `node`, `index`, and `parent`.\n *\n * @param {Test} test\n * * when nullish, checks if `node` is a `Node`.\n * * when `string`, works like passing `(node) => node.type === test`.\n * * when `function` checks if function passed the node is true.\n * * when `object`, checks that all keys in test are in node, and that they have (strictly) equal values.\n * * when `array`, checks if any one of the subtests pass.\n * @returns {Check}\n * An assertion.\n */\nexport const convert =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &\n * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &\n * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate) &\n * ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &\n * ((test?: Test) => Check)\n * )}\n */\n (\n /**\n * @param {Test} [test]\n * @returns {Check}\n */\n function (test) {\n if (test === null || test === undefined) {\n return ok\n }\n\n if (typeof test === 'function') {\n return castFactory(test)\n }\n\n if (typeof test === 'object') {\n return Array.isArray(test)\n ? anyFactory(test)\n : // Cast because `ReadonlyArray` goes into the above but `isArray`\n // narrows to `Array`.\n propertiesFactory(/** @type {Props} */ (test))\n }\n\n if (typeof test === 'string') {\n return typeFactory(test)\n }\n\n throw new Error('Expected function, string, or object as test')\n }\n )\n\n/**\n * @param {Array} tests\n * @returns {Check}\n */\nfunction anyFactory(tests) {\n /** @type {Array} */\n const checks = []\n let index = -1\n\n while (++index < tests.length) {\n checks[index] = convert(tests[index])\n }\n\n return castFactory(any)\n\n /**\n * @this {unknown}\n * @type {TestFunction}\n */\n function any(...parameters) {\n let index = -1\n\n while (++index < checks.length) {\n if (checks[index].apply(this, parameters)) return true\n }\n\n return false\n }\n}\n\n/**\n * Turn an object into a test for a node with a certain fields.\n *\n * @param {Props} check\n * @returns {Check}\n */\nfunction propertiesFactory(check) {\n const checkAsRecord = /** @type {Record} */ (check)\n\n return castFactory(all)\n\n /**\n * @param {Node} node\n * @returns {boolean}\n */\n function all(node) {\n const nodeAsRecord = /** @type {Record} */ (\n /** @type {unknown} */ (node)\n )\n\n /** @type {string} */\n let key\n\n for (key in check) {\n if (nodeAsRecord[key] !== checkAsRecord[key]) return false\n }\n\n return true\n }\n}\n\n/**\n * Turn a string into a test for a node with a certain type.\n *\n * @param {string} check\n * @returns {Check}\n */\nfunction typeFactory(check) {\n return castFactory(type)\n\n /**\n * @param {Node} node\n */\n function type(node) {\n return node && node.type === check\n }\n}\n\n/**\n * Turn a custom test into a test for a node that passes that test.\n *\n * @param {TestFunction} testFunction\n * @returns {Check}\n */\nfunction castFactory(testFunction) {\n return check\n\n /**\n * @this {unknown}\n * @type {Check}\n */\n function check(value, index, parent) {\n return Boolean(\n looksLikeANode(value) &&\n testFunction.call(\n this,\n value,\n typeof index === 'number' ? index : undefined,\n parent || undefined\n )\n )\n }\n}\n\nfunction ok() {\n return true\n}\n\n/**\n * @param {unknown} value\n * @returns {value is Node}\n */\nfunction looksLikeANode(value) {\n return value !== null && typeof value === 'object' && 'type' in value\n}\n","/**\n * @import {Node as UnistNode, Parent as UnistParent} from 'unist'\n */\n\n/**\n * @typedef {Exclude | undefined} Test\n * Test from `unist-util-is`.\n *\n * Note: we have remove and add `undefined`, because otherwise when generating\n * automatic `.d.ts` files, TS tries to flatten paths from a local perspective,\n * which doesn’t work when publishing on npm.\n */\n\n/**\n * @typedef {(\n * Fn extends (value: any) => value is infer Thing\n * ? Thing\n * : Fallback\n * )} Predicate\n * Get the value of a type guard `Fn`.\n * @template Fn\n * Value; typically function that is a type guard (such as `(x): x is Y`).\n * @template Fallback\n * Value to yield if `Fn` is not a type guard.\n */\n\n/**\n * @typedef {(\n * Check extends null | undefined // No test.\n * ? Value\n * : Value extends {type: Check} // String (type) test.\n * ? Value\n * : Value extends Check // Partial test.\n * ? Value\n * : Check extends Function // Function test.\n * ? Predicate extends Value\n * ? Predicate\n * : never\n * : never // Some other test?\n * )} MatchesOne\n * Check whether a node matches a primitive check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test, but not arrays.\n */\n\n/**\n * @typedef {(\n * Check extends ReadonlyArray\n * ? MatchesOne\n * : Check extends Array\n * ? MatchesOne\n * : MatchesOne\n * )} Matches\n * Check whether a node matches a check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test.\n */\n\n/**\n * @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} Uint\n * Number; capped reasonably.\n */\n\n/**\n * @typedef {I extends 0 ? 1 : I extends 1 ? 2 : I extends 2 ? 3 : I extends 3 ? 4 : I extends 4 ? 5 : I extends 5 ? 6 : I extends 6 ? 7 : I extends 7 ? 8 : I extends 8 ? 9 : 10} Increment\n * Increment a number in the type system.\n * @template {Uint} [I=0]\n * Index.\n */\n\n/**\n * @typedef {(\n * Node extends UnistParent\n * ? Node extends {children: Array}\n * ? Child extends Children ? Node : never\n * : never\n * : never\n * )} InternalParent\n * Collect nodes that can be parents of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {InternalParent, Child>} Parent\n * Collect nodes in `Tree` that can be parents of `Child`.\n * @template {UnistNode} Tree\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {(\n * Depth extends Max\n * ? never\n * :\n * | InternalParent\n * | InternalAncestor, Max, Increment>\n * )} InternalAncestor\n * Collect nodes in `Tree` that can be ancestors of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @typedef {InternalAncestor, Child>} Ancestor\n * Collect nodes in `Tree` that can be ancestors of `Child`.\n * @template {UnistNode} Tree\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {(\n * Tree extends UnistParent\n * ? Depth extends Max\n * ? Tree\n * : Tree | InclusiveDescendant>\n * : Tree\n * )} InclusiveDescendant\n * Collect all (inclusive) descendants of `Tree`.\n *\n * > 👉 **Note**: for performance reasons, this seems to be the fastest way to\n * > recurse without actually running into an infinite loop, which the\n * > previous version did.\n * >\n * > Practically, a max of `2` is typically enough assuming a `Root` is\n * > passed, but it doesn’t improve performance.\n * > It gets higher with `List > ListItem > Table > TableRow > TableCell`.\n * > Using up to `10` doesn’t hurt or help either.\n * @template {UnistNode} Tree\n * Tree type.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @typedef {'skip' | boolean} Action\n * Union of the action types.\n *\n * @typedef {number} Index\n * Move to the sibling at `index` next (after node itself is completely\n * traversed).\n *\n * Useful if mutating the tree, such as removing the node the visitor is\n * currently on, or any of its previous siblings.\n * Results less than 0 or greater than or equal to `children.length` stop\n * traversing the parent.\n *\n * @typedef {[(Action | null | undefined | void)?, (Index | null | undefined)?]} ActionTuple\n * List with one or two values, the first an action, the second an index.\n *\n * @typedef {Action | ActionTuple | Index | null | undefined | void} VisitorResult\n * Any value that can be returned from a visitor.\n */\n\n/**\n * @callback Visitor\n * Handle a node (matching `test`, if given).\n *\n * Visitors are free to transform `node`.\n * They can also transform the parent of node (the last of `ancestors`).\n *\n * Replacing `node` itself, if `SKIP` is not returned, still causes its\n * descendants to be walked (which is a bug).\n *\n * When adding or removing previous siblings of `node` (or next siblings, in\n * case of reverse), the `Visitor` should return a new `Index` to specify the\n * sibling to traverse after `node` is traversed.\n * Adding or removing next siblings of `node` (or previous siblings, in case\n * of reverse) is handled as expected without needing to return a new `Index`.\n *\n * Removing the children property of an ancestor still results in them being\n * traversed.\n * @param {Visited} node\n * Found node.\n * @param {Array} ancestors\n * Ancestors of `node`.\n * @returns {VisitorResult}\n * What to do next.\n *\n * An `Index` is treated as a tuple of `[CONTINUE, Index]`.\n * An `Action` is treated as a tuple of `[Action]`.\n *\n * Passing a tuple back only makes sense if the `Action` is `SKIP`.\n * When the `Action` is `EXIT`, that action can be returned.\n * When the `Action` is `CONTINUE`, `Index` can be returned.\n * @template {UnistNode} [Visited=UnistNode]\n * Visited node type.\n * @template {UnistParent} [VisitedParents=UnistParent]\n * Ancestor type.\n */\n\n/**\n * @typedef {Visitor, Check>, Ancestor, Check>>>} BuildVisitor\n * Build a typed `Visitor` function from a tree and a test.\n *\n * It will infer which values are passed as `node` and which as `parents`.\n * @template {UnistNode} [Tree=UnistNode]\n * Tree type.\n * @template {Test} [Check=Test]\n * Test type.\n */\n\nimport {convert} from 'unist-util-is'\nimport {color} from 'unist-util-visit-parents/do-not-use-color'\n\n/** @type {Readonly} */\nconst empty = []\n\n/**\n * Continue traversing as normal.\n */\nexport const CONTINUE = true\n\n/**\n * Stop traversing immediately.\n */\nexport const EXIT = false\n\n/**\n * Do not traverse this node’s children.\n */\nexport const SKIP = 'skip'\n\n/**\n * Visit nodes, with ancestral information.\n *\n * This algorithm performs *depth-first* *tree traversal* in *preorder*\n * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).\n *\n * You can choose for which nodes `visitor` is called by passing a `test`.\n * For complex tests, you should test yourself in `visitor`, as it will be\n * faster and will have improved type information.\n *\n * Walking the tree is an intensive task.\n * Make use of the return values of the visitor when possible.\n * Instead of walking a tree multiple times, walk it once, use `unist-util-is`\n * to check if a node matches, and then perform different operations.\n *\n * You can change the tree.\n * See `Visitor` for more info.\n *\n * @overload\n * @param {Tree} tree\n * @param {Check} check\n * @param {BuildVisitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @overload\n * @param {Tree} tree\n * @param {BuildVisitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @param {UnistNode} tree\n * Tree to traverse.\n * @param {Visitor | Test} test\n * `unist-util-is`-compatible test\n * @param {Visitor | boolean | null | undefined} [visitor]\n * Handle each node.\n * @param {boolean | null | undefined} [reverse]\n * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).\n * @returns {undefined}\n * Nothing.\n *\n * @template {UnistNode} Tree\n * Node type.\n * @template {Test} Check\n * `unist-util-is`-compatible test.\n */\nexport function visitParents(tree, test, visitor, reverse) {\n /** @type {Test} */\n let check\n\n if (typeof test === 'function' && typeof visitor !== 'function') {\n reverse = visitor\n // @ts-expect-error no visitor given, so `visitor` is test.\n visitor = test\n } else {\n // @ts-expect-error visitor given, so `test` isn’t a visitor.\n check = test\n }\n\n const is = convert(check)\n const step = reverse ? -1 : 1\n\n factory(tree, undefined, [])()\n\n /**\n * @param {UnistNode} node\n * @param {number | undefined} index\n * @param {Array} parents\n */\n function factory(node, index, parents) {\n const value = /** @type {Record} */ (\n node && typeof node === 'object' ? node : {}\n )\n\n if (typeof value.type === 'string') {\n const name =\n // `hast`\n typeof value.tagName === 'string'\n ? value.tagName\n : // `xast`\n typeof value.name === 'string'\n ? value.name\n : undefined\n\n Object.defineProperty(visit, 'name', {\n value:\n 'node (' + color(node.type + (name ? '<' + name + '>' : '')) + ')'\n })\n }\n\n return visit\n\n function visit() {\n /** @type {Readonly} */\n let result = empty\n /** @type {Readonly} */\n let subresult\n /** @type {number} */\n let offset\n /** @type {Array} */\n let grandparents\n\n if (!test || is(node, index, parents[parents.length - 1] || undefined)) {\n // @ts-expect-error: `visitor` is now a visitor.\n result = toResult(visitor(node, parents))\n\n if (result[0] === EXIT) {\n return result\n }\n }\n\n if ('children' in node && node.children) {\n const nodeAsParent = /** @type {UnistParent} */ (node)\n\n if (nodeAsParent.children && result[0] !== SKIP) {\n offset = (reverse ? nodeAsParent.children.length : -1) + step\n grandparents = parents.concat(nodeAsParent)\n\n while (offset > -1 && offset < nodeAsParent.children.length) {\n const child = nodeAsParent.children[offset]\n\n subresult = factory(child, offset, grandparents)()\n\n if (subresult[0] === EXIT) {\n return subresult\n }\n\n offset =\n typeof subresult[1] === 'number' ? subresult[1] : offset + step\n }\n }\n }\n\n return result\n }\n }\n}\n\n/**\n * Turn a return value into a clean result.\n *\n * @param {VisitorResult} value\n * Valid return values from visitors.\n * @returns {Readonly}\n * Clean result.\n */\nfunction toResult(value) {\n if (Array.isArray(value)) {\n return value\n }\n\n if (typeof value === 'number') {\n return [CONTINUE, value]\n }\n\n return value === null || value === undefined ? empty : [value]\n}\n","/**\n * @import {Node as UnistNode, Parent as UnistParent} from 'unist'\n * @import {VisitorResult} from 'unist-util-visit-parents'\n */\n\n/**\n * @typedef {Exclude | undefined} Test\n * Test from `unist-util-is`.\n *\n * Note: we have remove and add `undefined`, because otherwise when generating\n * automatic `.d.ts` files, TS tries to flatten paths from a local perspective,\n * which doesn’t work when publishing on npm.\n */\n\n// To do: use types from `unist-util-visit-parents` when it’s released.\n\n/**\n * @typedef {(\n * Fn extends (value: any) => value is infer Thing\n * ? Thing\n * : Fallback\n * )} Predicate\n * Get the value of a type guard `Fn`.\n * @template Fn\n * Value; typically function that is a type guard (such as `(x): x is Y`).\n * @template Fallback\n * Value to yield if `Fn` is not a type guard.\n */\n\n/**\n * @typedef {(\n * Check extends null | undefined // No test.\n * ? Value\n * : Value extends {type: Check} // String (type) test.\n * ? Value\n * : Value extends Check // Partial test.\n * ? Value\n * : Check extends Function // Function test.\n * ? Predicate extends Value\n * ? Predicate\n * : never\n * : never // Some other test?\n * )} MatchesOne\n * Check whether a node matches a primitive check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test, but not arrays.\n */\n\n/**\n * @typedef {(\n * Check extends ReadonlyArray\n * ? MatchesOne\n * : MatchesOne\n * )} Matches\n * Check whether a node matches a check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test.\n */\n\n/**\n * @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} Uint\n * Number; capped reasonably.\n */\n\n/**\n * @typedef {I extends 0 ? 1 : I extends 1 ? 2 : I extends 2 ? 3 : I extends 3 ? 4 : I extends 4 ? 5 : I extends 5 ? 6 : I extends 6 ? 7 : I extends 7 ? 8 : I extends 8 ? 9 : 10} Increment\n * Increment a number in the type system.\n * @template {Uint} [I=0]\n * Index.\n */\n\n/**\n * @typedef {(\n * Node extends UnistParent\n * ? Node extends {children: Array}\n * ? Child extends Children ? Node : never\n * : never\n * : never\n * )} InternalParent\n * Collect nodes that can be parents of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {InternalParent, Child>} Parent\n * Collect nodes in `Tree` that can be parents of `Child`.\n * @template {UnistNode} Tree\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {(\n * Depth extends Max\n * ? never\n * :\n * | InternalParent\n * | InternalAncestor, Max, Increment>\n * )} InternalAncestor\n * Collect nodes in `Tree` that can be ancestors of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @typedef {(\n * Tree extends UnistParent\n * ? Depth extends Max\n * ? Tree\n * : Tree | InclusiveDescendant>\n * : Tree\n * )} InclusiveDescendant\n * Collect all (inclusive) descendants of `Tree`.\n *\n * > 👉 **Note**: for performance reasons, this seems to be the fastest way to\n * > recurse without actually running into an infinite loop, which the\n * > previous version did.\n * >\n * > Practically, a max of `2` is typically enough assuming a `Root` is\n * > passed, but it doesn’t improve performance.\n * > It gets higher with `List > ListItem > Table > TableRow > TableCell`.\n * > Using up to `10` doesn’t hurt or help either.\n * @template {UnistNode} Tree\n * Tree type.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @callback Visitor\n * Handle a node (matching `test`, if given).\n *\n * Visitors are free to transform `node`.\n * They can also transform `parent`.\n *\n * Replacing `node` itself, if `SKIP` is not returned, still causes its\n * descendants to be walked (which is a bug).\n *\n * When adding or removing previous siblings of `node` (or next siblings, in\n * case of reverse), the `Visitor` should return a new `Index` to specify the\n * sibling to traverse after `node` is traversed.\n * Adding or removing next siblings of `node` (or previous siblings, in case\n * of reverse) is handled as expected without needing to return a new `Index`.\n *\n * Removing the children property of `parent` still results in them being\n * traversed.\n * @param {Visited} node\n * Found node.\n * @param {Visited extends UnistNode ? number | undefined : never} index\n * Index of `node` in `parent`.\n * @param {Ancestor extends UnistParent ? Ancestor | undefined : never} parent\n * Parent of `node`.\n * @returns {VisitorResult}\n * What to do next.\n *\n * An `Index` is treated as a tuple of `[CONTINUE, Index]`.\n * An `Action` is treated as a tuple of `[Action]`.\n *\n * Passing a tuple back only makes sense if the `Action` is `SKIP`.\n * When the `Action` is `EXIT`, that action can be returned.\n * When the `Action` is `CONTINUE`, `Index` can be returned.\n * @template {UnistNode} [Visited=UnistNode]\n * Visited node type.\n * @template {UnistParent} [Ancestor=UnistParent]\n * Ancestor type.\n */\n\n/**\n * @typedef {Visitor>} BuildVisitorFromMatch\n * Build a typed `Visitor` function from a node and all possible parents.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n * @template {UnistNode} Visited\n * Node type.\n * @template {UnistParent} Ancestor\n * Parent type.\n */\n\n/**\n * @typedef {(\n * BuildVisitorFromMatch<\n * Matches,\n * Extract\n * >\n * )} BuildVisitorFromDescendants\n * Build a typed `Visitor` function from a list of descendants and a test.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n * @template {UnistNode} Descendant\n * Node type.\n * @template {Test} Check\n * Test type.\n */\n\n/**\n * @typedef {(\n * BuildVisitorFromDescendants<\n * InclusiveDescendant,\n * Check\n * >\n * )} BuildVisitor\n * Build a typed `Visitor` function from a tree and a test.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n * @template {UnistNode} [Tree=UnistNode]\n * Node type.\n * @template {Test} [Check=Test]\n * Test type.\n */\n\nimport {visitParents} from 'unist-util-visit-parents'\n\nexport {CONTINUE, EXIT, SKIP} from 'unist-util-visit-parents'\n\n/**\n * Visit nodes.\n *\n * This algorithm performs *depth-first* *tree traversal* in *preorder*\n * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).\n *\n * You can choose for which nodes `visitor` is called by passing a `test`.\n * For complex tests, you should test yourself in `visitor`, as it will be\n * faster and will have improved type information.\n *\n * Walking the tree is an intensive task.\n * Make use of the return values of the visitor when possible.\n * Instead of walking a tree multiple times, walk it once, use `unist-util-is`\n * to check if a node matches, and then perform different operations.\n *\n * You can change the tree.\n * See `Visitor` for more info.\n *\n * @overload\n * @param {Tree} tree\n * @param {Check} check\n * @param {BuildVisitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @overload\n * @param {Tree} tree\n * @param {BuildVisitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @param {UnistNode} tree\n * Tree to traverse.\n * @param {Visitor | Test} testOrVisitor\n * `unist-util-is`-compatible test (optional, omit to pass a visitor).\n * @param {Visitor | boolean | null | undefined} [visitorOrReverse]\n * Handle each node (when test is omitted, pass `reverse`).\n * @param {boolean | null | undefined} [maybeReverse=false]\n * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).\n * @returns {undefined}\n * Nothing.\n *\n * @template {UnistNode} Tree\n * Node type.\n * @template {Test} Check\n * `unist-util-is`-compatible test.\n */\nexport function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {\n /** @type {boolean | null | undefined} */\n let reverse\n /** @type {Test} */\n let test\n /** @type {Visitor} */\n let visitor\n\n if (\n typeof testOrVisitor === 'function' &&\n typeof visitorOrReverse !== 'function'\n ) {\n test = undefined\n visitor = testOrVisitor\n reverse = visitorOrReverse\n } else {\n // @ts-expect-error: assume the overload with test was given.\n test = testOrVisitor\n // @ts-expect-error: assume the overload with test was given.\n visitor = visitorOrReverse\n reverse = maybeReverse\n }\n\n visitParents(tree, test, overload, reverse)\n\n /**\n * @param {UnistNode} node\n * @param {Array} parents\n */\n function overload(node, parents) {\n const parent = parents[parents.length - 1]\n const index = parent ? parent.children.indexOf(node) : undefined\n return visitor(node, index, parent)\n }\n}\n","import { getBaseUrl, getRootUrl } from \"@nextcloud/router\";\nimport { u } from \"unist-builder\";\nimport { visit, SKIP } from \"unist-util-visit\";\nimport { defineComponent, h } from \"vue\";\nimport { l as logger } from \"./logger-D3RVzcfQ.mjs\";\n/*!\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nconst URL_PATTERN = /(\\s|^)(https?:\\/\\/)([-A-Z0-9+_.]+(?::[0-9]+)?(?:\\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\\s|$)/ig;\nconst URL_PATTERN_AUTOLINK = /(\\s|\\(|^)((https?:\\/\\/)([-A-Z0-9+_.]+[-A-Z0-9]+(?::[0-9]+)?(?:\\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*))(?=\\s|\\)|$)/ig;\nconst NcLink = defineComponent({\n name: \"NcLink\",\n props: {\n href: {\n type: String,\n required: true\n }\n },\n render() {\n return h(\"a\", {\n href: this.href,\n rel: \"noopener noreferrer\",\n target: \"_blank\",\n class: \"rich-text--external-link\"\n }, [this.href.trim()]);\n }\n});\nfunction remarkAutolink({ autolink, useMarkdown, useExtendedMarkdown }) {\n return function(tree) {\n if (useExtendedMarkdown || !useMarkdown || !autolink) {\n return;\n }\n visit(tree, (node) => node.type === \"text\", (node, index, parent) => {\n let parsed = parseUrl(node.value);\n if (typeof parsed === \"string\") {\n parsed = [u(\"text\", parsed)];\n } else {\n parsed = parsed.map((n) => {\n if (typeof n === \"string\") {\n return u(\"text\", n);\n }\n return u(\"link\", {\n url: n.props.href\n }, [u(\"text\", n.props.href)]);\n }).filter((x) => x).flat();\n }\n parent.children.splice(index, 1, ...parsed);\n return [SKIP, (index ?? 0) + parsed.length];\n });\n };\n}\nfunction parseUrl(text) {\n let match = URL_PATTERN_AUTOLINK.exec(text);\n const list = [];\n let start = 0;\n while (match !== null) {\n let href = match[2];\n let textAfter;\n let textBefore = text.substring(start, match.index + match[1].length);\n if (href[0] === \" \") {\n textBefore += href[0];\n href = href.substring(1).trim();\n }\n const lastChar = href[href.length - 1];\n if (lastChar === \".\" || lastChar === \",\" || lastChar === \";\" || match[0][0] === \"(\" && lastChar === \")\") {\n href = href.substring(0, href.length - 1);\n textAfter = lastChar;\n }\n list.push(textBefore);\n list.push({ component: NcLink, props: { href } });\n if (textAfter) {\n list.push(textAfter);\n }\n start = match.index + match[0].length;\n match = URL_PATTERN_AUTOLINK.exec(text);\n }\n list.push(text.substring(start));\n const joinedText = list.map((item) => typeof item === \"string\" ? item : item.props.href).join(\"\");\n if (text === joinedText) {\n return list;\n }\n logger.error(\"[NcRichText] Failed to reassemble the chunked text: \" + text);\n return text;\n}\nfunction getRoute(router, url) {\n const removePrefix = (str, prefix) => str.startsWith(prefix) ? str.slice(prefix.length) : str;\n const removePrefixes = (str, ...prefixes) => prefixes.reduce((acc, prefix) => removePrefix(acc, prefix), str);\n if (!router) {\n return null;\n }\n const isAbsoluteURL = /^https?:\\/\\//.test(url);\n const isNonHttpLink = /^[a-z][a-z0-9+.-]*:.+/.test(url);\n if (!isAbsoluteURL && isNonHttpLink) {\n return null;\n }\n if (isAbsoluteURL && !url.startsWith(getBaseUrl())) {\n return null;\n }\n if (!isAbsoluteURL && !url.startsWith(\"/\")) {\n return null;\n }\n const relativeUrl = isAbsoluteURL ? removePrefixes(url, getBaseUrl(), \"/index.php\") : url;\n const relativeRouterBase = removePrefixes(router.options.history.base, getRootUrl(), \"/index.php\");\n const potentialRouterPath = removePrefixes(relativeUrl, relativeRouterBase) || \"/\";\n const route = router.resolve(potentialRouterPath);\n if (!route.matched.length) {\n return null;\n }\n return route.fullPath;\n}\nexport {\n URL_PATTERN as U,\n getRoute as g,\n parseUrl as p,\n remarkAutolink as r\n};\n//# sourceMappingURL=autolink-U5pBzLgI.mjs.map\n","import { l as logger } from \"../../chunks/logger-D3RVzcfQ.mjs\";\nfunction registerContactsMenuAction(action) {\n window._nc_contacts_menu_hooks ??= {};\n if (window._nc_contacts_menu_hooks[action.id]) {\n logger.error(`ContactsMenu action for id ${action.id} has already been registered`, {\n action\n });\n return;\n }\n window._nc_contacts_menu_hooks[action.id] = action;\n}\nfunction getEnabledContactsMenuActions(entry) {\n if (!window._nc_contacts_menu_hooks) {\n return [];\n }\n return Object.values(window._nc_contacts_menu_hooks).filter((action) => action.enabled(entry));\n}\nexport {\n getEnabledContactsMenuActions,\n registerContactsMenuAction\n};\n//# sourceMappingURL=index.mjs.map\n","const c = new Int32Array(4);\nclass h {\n static hashStr(i, a = !1) {\n return this.onePassHasher.start().appendStr(i).end(a);\n }\n static hashAsciiStr(i, a = !1) {\n return this.onePassHasher.start().appendAsciiStr(i).end(a);\n }\n // Private Static Variables\n static stateIdentity = new Int32Array([\n 1732584193,\n -271733879,\n -1732584194,\n 271733878\n ]);\n static buffer32Identity = new Int32Array([\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0\n ]);\n static hexChars = \"0123456789abcdef\";\n static hexOut = [];\n // Permanent instance is to use for one-call hashing\n static onePassHasher = new h();\n static _hex(i) {\n const a = h.hexChars, t = h.hexOut;\n let e, s, r, n;\n for (n = 0; n < 4; n += 1)\n for (s = n * 8, e = i[n], r = 0; r < 8; r += 2)\n t[s + 1 + r] = a.charAt(e & 15), e >>>= 4, t[s + 0 + r] = a.charAt(e & 15), e >>>= 4;\n return t.join(\"\");\n }\n static _md5cycle(i, a) {\n let t = i[0], e = i[1], s = i[2], r = i[3];\n t += (e & s | ~e & r) + a[0] - 680876936 | 0, t = (t << 7 | t >>> 25) + e | 0, r += (t & e | ~t & s) + a[1] - 389564586 | 0, r = (r << 12 | r >>> 20) + t | 0, s += (r & t | ~r & e) + a[2] + 606105819 | 0, s = (s << 17 | s >>> 15) + r | 0, e += (s & r | ~s & t) + a[3] - 1044525330 | 0, e = (e << 22 | e >>> 10) + s | 0, t += (e & s | ~e & r) + a[4] - 176418897 | 0, t = (t << 7 | t >>> 25) + e | 0, r += (t & e | ~t & s) + a[5] + 1200080426 | 0, r = (r << 12 | r >>> 20) + t | 0, s += (r & t | ~r & e) + a[6] - 1473231341 | 0, s = (s << 17 | s >>> 15) + r | 0, e += (s & r | ~s & t) + a[7] - 45705983 | 0, e = (e << 22 | e >>> 10) + s | 0, t += (e & s | ~e & r) + a[8] + 1770035416 | 0, t = (t << 7 | t >>> 25) + e | 0, r += (t & e | ~t & s) + a[9] - 1958414417 | 0, r = (r << 12 | r >>> 20) + t | 0, s += (r & t | ~r & e) + a[10] - 42063 | 0, s = (s << 17 | s >>> 15) + r | 0, e += (s & r | ~s & t) + a[11] - 1990404162 | 0, e = (e << 22 | e >>> 10) + s | 0, t += (e & s | ~e & r) + a[12] + 1804603682 | 0, t = (t << 7 | t >>> 25) + e | 0, r += (t & e | ~t & s) + a[13] - 40341101 | 0, r = (r << 12 | r >>> 20) + t | 0, s += (r & t | ~r & e) + a[14] - 1502002290 | 0, s = (s << 17 | s >>> 15) + r | 0, e += (s & r | ~s & t) + a[15] + 1236535329 | 0, e = (e << 22 | e >>> 10) + s | 0, t += (e & r | s & ~r) + a[1] - 165796510 | 0, t = (t << 5 | t >>> 27) + e | 0, r += (t & s | e & ~s) + a[6] - 1069501632 | 0, r = (r << 9 | r >>> 23) + t | 0, s += (r & e | t & ~e) + a[11] + 643717713 | 0, s = (s << 14 | s >>> 18) + r | 0, e += (s & t | r & ~t) + a[0] - 373897302 | 0, e = (e << 20 | e >>> 12) + s | 0, t += (e & r | s & ~r) + a[5] - 701558691 | 0, t = (t << 5 | t >>> 27) + e | 0, r += (t & s | e & ~s) + a[10] + 38016083 | 0, r = (r << 9 | r >>> 23) + t | 0, s += (r & e | t & ~e) + a[15] - 660478335 | 0, s = (s << 14 | s >>> 18) + r | 0, e += (s & t | r & ~t) + a[4] - 405537848 | 0, e = (e << 20 | e >>> 12) + s | 0, t += (e & r | s & ~r) + a[9] + 568446438 | 0, t = (t << 5 | t >>> 27) + e | 0, r += (t & s | e & ~s) + a[14] - 1019803690 | 0, r = (r << 9 | r >>> 23) + t | 0, s += (r & e | t & ~e) + a[3] - 187363961 | 0, s = (s << 14 | s >>> 18) + r | 0, e += (s & t | r & ~t) + a[8] + 1163531501 | 0, e = (e << 20 | e >>> 12) + s | 0, t += (e & r | s & ~r) + a[13] - 1444681467 | 0, t = (t << 5 | t >>> 27) + e | 0, r += (t & s | e & ~s) + a[2] - 51403784 | 0, r = (r << 9 | r >>> 23) + t | 0, s += (r & e | t & ~e) + a[7] + 1735328473 | 0, s = (s << 14 | s >>> 18) + r | 0, e += (s & t | r & ~t) + a[12] - 1926607734 | 0, e = (e << 20 | e >>> 12) + s | 0, t += (e ^ s ^ r) + a[5] - 378558 | 0, t = (t << 4 | t >>> 28) + e | 0, r += (t ^ e ^ s) + a[8] - 2022574463 | 0, r = (r << 11 | r >>> 21) + t | 0, s += (r ^ t ^ e) + a[11] + 1839030562 | 0, s = (s << 16 | s >>> 16) + r | 0, e += (s ^ r ^ t) + a[14] - 35309556 | 0, e = (e << 23 | e >>> 9) + s | 0, t += (e ^ s ^ r) + a[1] - 1530992060 | 0, t = (t << 4 | t >>> 28) + e | 0, r += (t ^ e ^ s) + a[4] + 1272893353 | 0, r = (r << 11 | r >>> 21) + t | 0, s += (r ^ t ^ e) + a[7] - 155497632 | 0, s = (s << 16 | s >>> 16) + r | 0, e += (s ^ r ^ t) + a[10] - 1094730640 | 0, e = (e << 23 | e >>> 9) + s | 0, t += (e ^ s ^ r) + a[13] + 681279174 | 0, t = (t << 4 | t >>> 28) + e | 0, r += (t ^ e ^ s) + a[0] - 358537222 | 0, r = (r << 11 | r >>> 21) + t | 0, s += (r ^ t ^ e) + a[3] - 722521979 | 0, s = (s << 16 | s >>> 16) + r | 0, e += (s ^ r ^ t) + a[6] + 76029189 | 0, e = (e << 23 | e >>> 9) + s | 0, t += (e ^ s ^ r) + a[9] - 640364487 | 0, t = (t << 4 | t >>> 28) + e | 0, r += (t ^ e ^ s) + a[12] - 421815835 | 0, r = (r << 11 | r >>> 21) + t | 0, s += (r ^ t ^ e) + a[15] + 530742520 | 0, s = (s << 16 | s >>> 16) + r | 0, e += (s ^ r ^ t) + a[2] - 995338651 | 0, e = (e << 23 | e >>> 9) + s | 0, t += (s ^ (e | ~r)) + a[0] - 198630844 | 0, t = (t << 6 | t >>> 26) + e | 0, r += (e ^ (t | ~s)) + a[7] + 1126891415 | 0, r = (r << 10 | r >>> 22) + t | 0, s += (t ^ (r | ~e)) + a[14] - 1416354905 | 0, s = (s << 15 | s >>> 17) + r | 0, e += (r ^ (s | ~t)) + a[5] - 57434055 | 0, e = (e << 21 | e >>> 11) + s | 0, t += (s ^ (e | ~r)) + a[12] + 1700485571 | 0, t = (t << 6 | t >>> 26) + e | 0, r += (e ^ (t | ~s)) + a[3] - 1894986606 | 0, r = (r << 10 | r >>> 22) + t | 0, s += (t ^ (r | ~e)) + a[10] - 1051523 | 0, s = (s << 15 | s >>> 17) + r | 0, e += (r ^ (s | ~t)) + a[1] - 2054922799 | 0, e = (e << 21 | e >>> 11) + s | 0, t += (s ^ (e | ~r)) + a[8] + 1873313359 | 0, t = (t << 6 | t >>> 26) + e | 0, r += (e ^ (t | ~s)) + a[15] - 30611744 | 0, r = (r << 10 | r >>> 22) + t | 0, s += (t ^ (r | ~e)) + a[6] - 1560198380 | 0, s = (s << 15 | s >>> 17) + r | 0, e += (r ^ (s | ~t)) + a[13] + 1309151649 | 0, e = (e << 21 | e >>> 11) + s | 0, t += (s ^ (e | ~r)) + a[4] - 145523070 | 0, t = (t << 6 | t >>> 26) + e | 0, r += (e ^ (t | ~s)) + a[11] - 1120210379 | 0, r = (r << 10 | r >>> 22) + t | 0, s += (t ^ (r | ~e)) + a[2] + 718787259 | 0, s = (s << 15 | s >>> 17) + r | 0, e += (r ^ (s | ~t)) + a[9] - 343485551 | 0, e = (e << 21 | e >>> 11) + s | 0, i[0] = t + i[0] | 0, i[1] = e + i[1] | 0, i[2] = s + i[2] | 0, i[3] = r + i[3] | 0;\n }\n _dataLength = 0;\n _bufferLength = 0;\n _state = new Int32Array(4);\n _buffer = new ArrayBuffer(68);\n _buffer8;\n _buffer32;\n constructor() {\n this._buffer8 = new Uint8Array(this._buffer, 0, 68), this._buffer32 = new Uint32Array(this._buffer, 0, 17), this.start();\n }\n /**\n * Initialise buffer to be hashed\n */\n start() {\n return this._dataLength = 0, this._bufferLength = 0, this._state.set(h.stateIdentity), this;\n }\n // Char to code point to to array conversion:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt\n // #Example.3A_Fixing_charCodeAt_to_handle_non-Basic-Multilingual-Plane_characters_if_their_presence_earlier_in_the_string_is_unknown\n /**\n * Append a UTF-8 string to the hash buffer\n * @param str String to append\n */\n appendStr(i) {\n const a = this._buffer8, t = this._buffer32;\n let e = this._bufferLength, s, r;\n for (r = 0; r < i.length; r += 1) {\n if (s = i.charCodeAt(r), s < 128)\n a[e++] = s;\n else if (s < 2048)\n a[e++] = (s >>> 6) + 192, a[e++] = s & 63 | 128;\n else if (s < 55296 || s > 56319)\n a[e++] = (s >>> 12) + 224, a[e++] = s >>> 6 & 63 | 128, a[e++] = s & 63 | 128;\n else {\n if (s = (s - 55296) * 1024 + (i.charCodeAt(++r) - 56320) + 65536, s > 1114111)\n throw new Error(\n \"Unicode standard supports code points up to U+10FFFF\"\n );\n a[e++] = (s >>> 18) + 240, a[e++] = s >>> 12 & 63 | 128, a[e++] = s >>> 6 & 63 | 128, a[e++] = s & 63 | 128;\n }\n e >= 64 && (this._dataLength += 64, h._md5cycle(this._state, t), e -= 64, t[0] = t[16]);\n }\n return this._bufferLength = e, this;\n }\n /**\n * Append an ASCII string to the hash buffer\n * @param str String to append\n */\n appendAsciiStr(i) {\n const a = this._buffer8, t = this._buffer32;\n let e = this._bufferLength, s, r = 0;\n for (; ; ) {\n for (s = Math.min(i.length - r, 64 - e); s--; )\n a[e++] = i.charCodeAt(r++);\n if (e < 64)\n break;\n this._dataLength += 64, h._md5cycle(this._state, t), e = 0;\n }\n return this._bufferLength = e, this;\n }\n /**\n * Append a byte array to the hash buffer\n * @param input array to append\n */\n appendByteArray(i) {\n const a = this._buffer8, t = this._buffer32;\n let e = this._bufferLength, s, r = 0;\n for (; ; ) {\n for (s = Math.min(i.length - r, 64 - e); s--; )\n a[e++] = i[r++];\n if (e < 64)\n break;\n this._dataLength += 64, h._md5cycle(this._state, t), e = 0;\n }\n return this._bufferLength = e, this;\n }\n /**\n * Get the state of the hash buffer\n */\n getState() {\n const i = this._state;\n return {\n buffer: String.fromCharCode.apply(null, Array.from(this._buffer8)),\n buflen: this._bufferLength,\n length: this._dataLength,\n state: [i[0], i[1], i[2], i[3]]\n };\n }\n /**\n * Override the current state of the hash buffer\n * @param state New hash buffer state\n */\n setState(i) {\n const a = i.buffer, t = i.state, e = this._state;\n let s;\n for (this._dataLength = i.length, this._bufferLength = i.buflen, e[0] = t[0], e[1] = t[1], e[2] = t[2], e[3] = t[3], s = 0; s < a.length; s += 1)\n this._buffer8[s] = a.charCodeAt(s);\n }\n /**\n * Hash the current state of the hash buffer and return the result\n * @param raw Whether to return the value as an `Int32Array`\n */\n end(i = !1) {\n const a = this._bufferLength, t = this._buffer8, e = this._buffer32, s = (a >> 2) + 1;\n this._dataLength += a;\n const r = this._dataLength * 8;\n if (t[a] = 128, t[a + 1] = t[a + 2] = t[a + 3] = 0, e.set(h.buffer32Identity.subarray(s), s), a > 55 && (h._md5cycle(this._state, e), e.set(h.buffer32Identity)), r <= 4294967295)\n e[14] = r;\n else {\n const n = r.toString(16).match(/(.*?)(.{0,8})$/);\n if (n === null) return i ? c : \"\";\n const o = parseInt(n[2], 16), _ = parseInt(n[1], 16) || 0;\n e[14] = o, e[15] = _;\n }\n return h._md5cycle(this._state, e), i ? this._state : h._hex(this._state);\n }\n}\nif (h.hashStr(\"hello\") !== \"5d41402abc4b2a76b9719d911017c592\")\n throw new Error(\"Md5 self test failed.\");\nclass l {\n constructor(i, a = !0, t = 1048576) {\n this._callback = i, this._async = a, this._partSize = t, this._configureReader();\n }\n _reader;\n _md5;\n _part;\n // private _length!: number;\n _blob;\n /**\n * Hash a blob of data in the worker\n * @param blob Data to hash\n */\n hash(i) {\n const a = this;\n a._blob = i, a._part = 0, a._md5 = new h(), a._processPart();\n }\n _fail() {\n this._callback({\n success: !1,\n result: \"data read failed\"\n });\n }\n _hashData(i) {\n let a = this;\n a._md5.appendByteArray(new Uint8Array(i.target.result)), a._part * a._partSize >= a._blob.size ? a._callback({\n success: !0,\n result: a._md5.end()\n }) : a._processPart();\n }\n _processPart() {\n const i = this;\n let a = 0, t;\n i._part += 1, i._blob.size > i._partSize ? (a = i._part * i._partSize, a > i._blob.size && (a = i._blob.size), t = i._blob.slice(\n (i._part - 1) * i._partSize,\n a\n )) : t = i._blob, i._async ? i._reader.readAsArrayBuffer(t) : setTimeout(() => {\n try {\n i._hashData({\n target: {\n result: i._reader.readAsArrayBuffer(\n t\n )\n }\n });\n } catch {\n i._fail();\n }\n }, 0);\n }\n _configureReader() {\n const i = this;\n i._async ? (i._reader = new FileReader(), i._reader.onload = i._hashData.bind(i), i._reader.onerror = i._fail.bind(i), i._reader.onabort = i._fail.bind(i)) : i._reader = new FileReaderSync();\n }\n}\nclass u {\n _queue = [];\n _hashWorker;\n _processing;\n _ready = !0;\n constructor(i, a) {\n const t = this;\n Worker ? (t._hashWorker = new Worker(i, a), t._hashWorker.onmessage = t._recievedMessage.bind(t), t._hashWorker.onerror = (e) => {\n t._ready = !1, console.error(\"Hash worker failure\", e);\n }) : (t._ready = !1, console.error(\"Web Workers are not supported in this browser\"));\n }\n /**\n * Hash a blob of data in the worker\n * @param blob Data to hash\n * @returns Promise of the Hashed result\n */\n hash(i) {\n const a = this;\n let t;\n return t = new Promise((e, s) => {\n a._queue.push({\n blob: i,\n resolve: e,\n reject: s\n }), a._processNext();\n }), t;\n }\n /** Terminate any existing hash requests */\n terminate() {\n this._ready = !1, this._hashWorker.terminate();\n }\n // Processes the next item in the queue\n _processNext() {\n this._ready && !this._processing && this._queue.length > 0 && (this._processing = this._queue.pop(), this._hashWorker.postMessage(this._processing.blob));\n }\n // Hash result is returned from the worker\n _recievedMessage(i) {\n const a = i.data;\n a.success ? this._processing?.resolve(a.result) : this._processing?.reject(a.result), this._processing = void 0, this._processNext();\n }\n}\nexport {\n h as Md5,\n l as Md5FileHasher,\n u as ParallelHasher\n};\n//# sourceMappingURL=index.es.js.map\n","import { Md5 } from \"ts-md5\";\nimport { g as generatePalette } from \"../../chunks/colors-BHGKZFDI.mjs\";\nfunction hashCode(str) {\n let hash = str;\n if (str.match(/^([0-9a-f]{4}-?){8}$/) === null) {\n hash = Md5.hashStr(str);\n }\n hash = hash.replace(/[^0-9a-f]/g, \"\");\n let finalInt = 0;\n for (let i = 0; i < hash.length; i++) {\n finalInt += parseInt(hash.charAt(i), 16);\n }\n return finalInt;\n}\nfunction usernameToColor(username) {\n const steps = 6;\n const finalPalette = generatePalette(steps);\n const hash = hashCode(username.toLocaleLowerCase());\n return finalPalette[hash % finalPalette.length];\n}\nexport {\n usernameToColor\n};\n//# sourceMappingURL=index.mjs.map\n","'use strict';\n\n(function (global) {\n\n // minimal symbol polyfill for IE11 and others\n if (typeof Symbol !== 'function') {\n var Symbol = function(name) {\n return name;\n }\n\n Symbol.nonNative = true;\n }\n\n const STATE_PLAINTEXT = Symbol('plaintext');\n const STATE_HTML = Symbol('html');\n const STATE_COMMENT = Symbol('comment');\n\n const ALLOWED_TAGS_REGEX = /<(\\w*)>/g;\n const NORMALIZE_TAG_REGEX = /<\\/?([^\\s\\/>]+)/;\n\n function striptags(html, allowable_tags, tag_replacement) {\n html = html || '';\n allowable_tags = allowable_tags || [];\n tag_replacement = tag_replacement || '';\n\n let context = init_context(allowable_tags, tag_replacement);\n\n return striptags_internal(html, context);\n }\n\n function init_striptags_stream(allowable_tags, tag_replacement) {\n allowable_tags = allowable_tags || [];\n tag_replacement = tag_replacement || '';\n\n let context = init_context(allowable_tags, tag_replacement);\n\n return function striptags_stream(html) {\n return striptags_internal(html || '', context);\n };\n }\n\n striptags.init_streaming_mode = init_striptags_stream;\n\n function init_context(allowable_tags, tag_replacement) {\n allowable_tags = parse_allowable_tags(allowable_tags);\n\n return {\n allowable_tags : allowable_tags,\n tag_replacement: tag_replacement,\n\n state : STATE_PLAINTEXT,\n tag_buffer : '',\n depth : 0,\n in_quote_char : ''\n };\n }\n\n function striptags_internal(html, context) {\n if (typeof html != \"string\") {\n throw new TypeError(\"'html' parameter must be a string\");\n }\n\n let allowable_tags = context.allowable_tags;\n let tag_replacement = context.tag_replacement;\n\n let state = context.state;\n let tag_buffer = context.tag_buffer;\n let depth = context.depth;\n let in_quote_char = context.in_quote_char;\n let output = '';\n\n for (let idx = 0, length = html.length; idx < length; idx++) {\n let char = html[idx];\n\n if (state === STATE_PLAINTEXT) {\n switch (char) {\n case '<':\n state = STATE_HTML;\n tag_buffer += char;\n break;\n\n default:\n output += char;\n break;\n }\n }\n\n else if (state === STATE_HTML) {\n switch (char) {\n case '<':\n // ignore '<' if inside a quote\n if (in_quote_char) {\n break;\n }\n\n // we're seeing a nested '<'\n depth++;\n break;\n\n case '>':\n // ignore '>' if inside a quote\n if (in_quote_char) {\n break;\n }\n\n // something like this is happening: '<<>>'\n if (depth) {\n depth--;\n\n break;\n }\n\n // this is closing the tag in tag_buffer\n in_quote_char = '';\n state = STATE_PLAINTEXT;\n tag_buffer += '>';\n\n if (allowable_tags.has(normalize_tag(tag_buffer))) {\n output += tag_buffer;\n } else {\n output += tag_replacement;\n }\n\n tag_buffer = '';\n break;\n\n case '\"':\n case '\\'':\n // catch both single and double quotes\n\n if (char === in_quote_char) {\n in_quote_char = '';\n } else {\n in_quote_char = in_quote_char || char;\n }\n\n tag_buffer += char;\n break;\n\n case '-':\n if (tag_buffer === '':\n if (tag_buffer.slice(-2) == '--') {\n // close the comment\n state = STATE_PLAINTEXT;\n }\n\n tag_buffer = '';\n break;\n\n default:\n tag_buffer += char;\n break;\n }\n }\n }\n\n // save the context for future iterations\n context.state = state;\n context.tag_buffer = tag_buffer;\n context.depth = depth;\n context.in_quote_char = in_quote_char;\n\n return output;\n }\n\n function parse_allowable_tags(allowable_tags) {\n let tag_set = new Set();\n\n if (typeof allowable_tags === 'string') {\n let match;\n\n while ((match = ALLOWED_TAGS_REGEX.exec(allowable_tags))) {\n tag_set.add(match[1]);\n }\n }\n\n else if (!Symbol.nonNative &&\n typeof allowable_tags[Symbol.iterator] === 'function') {\n\n tag_set = new Set(allowable_tags);\n }\n\n else if (typeof allowable_tags.forEach === 'function') {\n // IE11 compatible\n allowable_tags.forEach(tag_set.add, tag_set);\n }\n\n return tag_set;\n }\n\n function normalize_tag(tag_buffer) {\n let match = NORMALIZE_TAG_REGEX.exec(tag_buffer);\n\n return match ? match[1].toLowerCase() : null;\n }\n\n if (typeof define === 'function' && define.amd) {\n // AMD\n define(function module_factory() { return striptags; });\n }\n\n else if (typeof module === 'object' && module.exports) {\n // Node\n module.exports = striptags;\n }\n\n else {\n // Browser\n global.striptags = striptags;\n }\n}(this));\n","import '../assets/NcMentionBubble-ptHUq68a.css';\nimport { generateUrl } from \"@nextcloud/router\";\nimport { checkIfDarkTheme } from \"../functions/isDarkTheme/index.mjs\";\nfunction getAvatarUrl(user, options) {\n const size = (options?.size || 64) <= 64 ? 64 : 512;\n const guestUrl = options?.isGuest ? \"/guest\" : \"\";\n const themeUrl = options?.isDarkTheme ?? checkIfDarkTheme(document.body) ? \"/dark\" : \"\";\n return generateUrl(`/avatar${guestUrl}/{user}/{size}${themeUrl}`, {\n user,\n size\n });\n}\nexport {\n getAvatarUrl as g\n};\n//# sourceMappingURL=NcMentionBubble.vue_vue_type_style_index_0_scoped_45238efd_lang-D6LzDiYf.mjs.map\n","import '../assets/NcAvatar-CuPj3fbb.css';\nimport { getCurrentUser } from \"@nextcloud/auth\";\nimport axios from \"@nextcloud/axios\";\nimport { getBuilder } from \"@nextcloud/browser-storage\";\nimport { unsubscribe, subscribe } from \"@nextcloud/event-bus\";\nimport { generateOcsUrl, generateUrl } from \"@nextcloud/router\";\nimport { vOnClickOutside } from \"@vueuse/components\";\nimport { N as NcActions, I as IconDotsHorizontal } from \"./NcActions-BWDsG06k.mjs\";\nimport { g as getRoute } from \"./autolink-U5pBzLgI.mjs\";\nimport \"../composables/useFormatDateTime/index.mjs\";\nimport \"../composables/useHotKey/index.mjs\";\nimport { useIsDarkTheme } from \"../composables/useIsDarkTheme/index.mjs\";\nimport \"../composables/useIsFullscreen/index.mjs\";\nimport \"../composables/useIsMobile/index.mjs\";\nimport { getEnabledContactsMenuActions } from \"../functions/contactsMenu/index.mjs\";\nimport { usernameToColor } from \"../functions/usernameToColor/index.mjs\";\nimport { r as register, m as t10, a as t } from \"./_l10n-Dq_eYxz_.mjs\";\nimport \"escape-html\";\nimport \"striptags\";\nimport { resolveComponent, resolveDirective, withDirectives, createElementBlock, openBlock, normalizeStyle, normalizeClass, renderSlot, createBlock, createCommentVNode, withCtx, createSlots, Fragment, renderList, resolveDynamicComponent, mergeProps, createTextVNode, toDisplayString, createVNode, createElementVNode } from \"vue\";\nimport { g as getAvatarUrl } from \"./NcMentionBubble.vue_vue_type_style_index_0_scoped_45238efd_lang-D6LzDiYf.mjs\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nimport { getCapabilities } from \"@nextcloud/capabilities\";\nimport { l as logger } from \"./logger-D3RVzcfQ.mjs\";\nimport { N as NcUserStatusIcon, g as getUserStatusText } from \"./NcUserStatusIcon-XiwrgeCm.mjs\";\nimport { N as NcActionButton } from \"./NcActionButton-DNXoAooH.mjs\";\nimport { N as NcActionLink } from \"./NcActionLink-Cd69py4e.mjs\";\nimport { N as NcActionRouter } from \"./NcActionRouter-DtxPh20B.mjs\";\nimport { N as NcActionText } from \"./NcActionText-Bd1fgVqA.mjs\";\nimport { N as NcButton } from \"./NcButton-C9D47Igd.mjs\";\nimport { N as NcIconSvgWrapper } from \"./NcIconSvgWrapper-BvLanNaW.mjs\";\nimport { N as NcLoadingIcon } from \"./NcLoadingIcon-b_ajZ_nQ.mjs\";\nregister(t10);\nconst userStatus = {\n data() {\n return {\n hasStatus: false,\n userStatus: {\n status: null,\n message: null,\n icon: null\n }\n };\n },\n methods: {\n /**\n * Fetches the user-status from the server\n *\n * @param {string} userId UserId of the user to fetch the status for\n *\n * @return {Promise}\n */\n async fetchUserStatus(userId) {\n if (!userId) {\n return;\n }\n const capabilities = getCapabilities();\n if (!Object.hasOwn(capabilities, \"user_status\") || !capabilities.user_status.enabled) {\n return;\n }\n if (!getCurrentUser()) {\n return;\n }\n try {\n const { data } = await axios.get(generateOcsUrl(\"apps/user_status/api/v1/statuses/{userId}\", { userId }));\n this.setUserStatus(data.ocs.data);\n } catch (e) {\n if (e.response.status === 404 && e.response.data.ocs?.data?.length === 0) {\n return;\n }\n logger.error(\"Failed to fetch user status\", { error: e });\n }\n },\n /**\n * Sets the user status\n *\n * @param {string} status user's status\n * @param {string} message user's message\n * @param {string} icon user's icon\n */\n setUserStatus({ status, message, icon }) {\n this.userStatus.status = status || \"\";\n this.userStatus.message = message || \"\";\n this.userStatus.icon = icon || \"\";\n this.hasStatus = !!status;\n }\n }\n};\nconst browserStorage = getBuilder(\"nextcloud\").persist().build();\nfunction getUserHasAvatar(userId) {\n const flag = browserStorage.getItem(\"user-has-avatar.\" + userId);\n if (typeof flag === \"string\") {\n return Boolean(flag);\n }\n return null;\n}\nfunction setUserHasAvatar(userId, flag) {\n if (userId) {\n browserStorage.setItem(\"user-has-avatar.\" + userId, flag);\n }\n}\nconst _sfc_main = {\n name: \"NcAvatar\",\n directives: {\n /** @type {import('vue').ObjectDirective} */\n ClickOutside: vOnClickOutside\n },\n components: {\n IconDotsHorizontal,\n NcActions,\n NcButton,\n NcIconSvgWrapper,\n NcLoadingIcon,\n NcUserStatusIcon\n },\n mixins: [userStatus],\n props: {\n /**\n * Set a custom url to the avatar image\n * either the url, user or displayName property must be defined\n */\n url: {\n type: String,\n default: void 0\n },\n /**\n * Set a css icon-class for an icon to be used instead of the avatar.\n */\n iconClass: {\n type: String,\n default: void 0\n },\n /**\n * Set the user id to fetch the avatar\n * either the url, user or displayName property must be defined\n */\n user: {\n type: String,\n default: void 0\n },\n /**\n * Do not show the user status on the avatar.\n */\n hideStatus: {\n type: Boolean,\n default: false\n },\n /**\n * Show the verbose user status (e.g. \"online\" / \"away\") instead of just the status icon.\n */\n verboseStatus: {\n type: Boolean,\n default: false\n },\n /**\n * When the user status was preloaded via another source it can be handed in with this property to save the request.\n * If this property is not set the status will be fetched automatically.\n * If a preloaded no-status is available provide this object with properties \"status\", \"icon\" and \"message\" set to null.\n */\n preloadedUserStatus: {\n type: Object,\n default: void 0\n },\n /**\n * Is the user a guest user (then we have to user a different endpoint)\n */\n isGuest: {\n type: Boolean,\n default: false\n },\n /**\n * Set a display name that will be rendered as a tooltip\n * either the url, user or displayName property must be defined\n * specify just the displayname to generate a placeholder avatar without\n * trying to fetch the avatar based on the user id\n */\n displayName: {\n type: String,\n default: void 0\n },\n /**\n * Set a size in px for the rendered avatar\n */\n size: {\n type: Number,\n default: 32\n },\n /**\n * Do not automatically generate a placeholder avatars if there is no real avatar is available.\n */\n noPlaceholder: {\n type: Boolean,\n default: false\n },\n /**\n * Disable the tooltip\n */\n disableTooltip: {\n type: Boolean,\n default: false\n },\n /**\n * Disable the menu\n */\n disableMenu: {\n type: Boolean,\n default: false\n },\n /**\n * Declares a custom tooltip when not null\n * Fallback will be the displayName\n *\n * requires disableTooltip not to be set to true\n */\n tooltipMessage: {\n type: String,\n default: null\n },\n /**\n * Declares username is not a user's name, when true.\n * Prevents loading user's avatar from server and forces generating colored initials,\n * i.e. if the user is a group\n */\n isNoUser: {\n type: Boolean,\n default: false\n },\n /**\n * Selector for the popover menu container\n */\n menuContainer: {\n type: [Boolean, String, Object, Element],\n default: \"body\"\n }\n },\n setup() {\n const isDarkTheme = useIsDarkTheme();\n return {\n isDarkTheme\n };\n },\n data() {\n return {\n avatarUrlLoaded: null,\n avatarSrcSetLoaded: null,\n userDoesNotExist: false,\n isAvatarLoaded: false,\n isMenuLoaded: false,\n contactsMenuLoading: false,\n contactsMenuData: {},\n contactsMenuActions: [],\n contactsMenuOpenState: false\n };\n },\n computed: {\n avatarAriaLabel() {\n if (!this.hasMenu) {\n return;\n }\n if (this.canDisplayUserStatus || this.showUserStatusIconOnAvatar) {\n return t(\"Avatar of {displayName}, {status}\", { displayName: this.displayName ?? this.user, status: getUserStatusText(this.userStatus.status) });\n }\n return t(\"Avatar of {displayName}\", { displayName: this.displayName ?? this.user });\n },\n canDisplayUserStatus() {\n return !this.hideStatus && this.hasStatus && [\"online\", \"away\", \"busy\", \"dnd\"].includes(this.userStatus.status);\n },\n showUserStatusIconOnAvatar() {\n return !this.hideStatus && !this.verboseStatus && this.hasStatus && this.userStatus.status !== \"dnd\" && this.userStatus.icon;\n },\n /**\n * The user identifier, either the display name if set or the user property\n * If both properties are not set an empty string is returned\n */\n userIdentifier() {\n if (this.isDisplayNameDefined) {\n return this.displayName;\n }\n if (this.isUserDefined) {\n return this.user;\n }\n return \"\";\n },\n isUserDefined() {\n return typeof this.user !== \"undefined\";\n },\n isDisplayNameDefined() {\n return typeof this.displayName !== \"undefined\";\n },\n isUrlDefined() {\n return typeof this.url !== \"undefined\";\n },\n hasMenu() {\n if (this.disableMenu) {\n return false;\n }\n if (this.isMenuLoaded) {\n return this.menu.length > 0;\n }\n return !(this.user === getCurrentUser()?.uid || this.userDoesNotExist || this.url);\n },\n /**\n * True if initials should be shown as the user icon fallback\n */\n showInitials() {\n return !this.noPlaceholder && this.userDoesNotExist && !(this.iconClass || this.$slots.icon);\n },\n avatarStyle() {\n return {\n \"--avatar-size\": this.size + \"px\",\n lineHeight: this.showInitials ? this.size + \"px\" : 0,\n fontSize: Math.round(this.size * 0.45) + \"px\"\n };\n },\n initialsWrapperStyle() {\n const { r, g, b } = usernameToColor(this.userIdentifier);\n return {\n backgroundColor: `rgba(${r}, ${g}, ${b}, 0.1)`\n };\n },\n initialsStyle() {\n const { r, g, b } = usernameToColor(this.userIdentifier);\n return {\n color: `rgb(${r}, ${g}, ${b})`\n };\n },\n tooltip() {\n if (this.disableTooltip) {\n return null;\n }\n if (this.tooltipMessage) {\n return this.tooltipMessage;\n }\n return this.displayName;\n },\n /**\n * Get the (max. two) initials of the user as uppcase string\n */\n initials() {\n let initials = \"?\";\n if (this.showInitials) {\n const user = this.userIdentifier.trim();\n if (user === \"\") {\n return initials;\n }\n const filteredChars = user.match(/[\\p{L}\\p{N}\\s]/gu);\n if (!filteredChars) {\n return initials;\n }\n const filtered = filteredChars.join(\"\");\n const idx = filtered.lastIndexOf(\" \");\n initials = String.fromCodePoint(filtered.codePointAt(0));\n if (idx !== -1) {\n initials = initials.concat(String.fromCodePoint(filtered.codePointAt(idx + 1)));\n }\n }\n return initials.toLocaleUpperCase();\n },\n menu() {\n const actions = this.contactsMenuActions.map((item) => {\n const route = getRoute(this.$router, item.hyperlink);\n return {\n ncActionComponent: route ? NcActionRouter : NcActionLink,\n ncActionComponentProps: route ? {\n to: route,\n icon: item.icon\n } : {\n href: item.hyperlink,\n icon: item.icon\n },\n text: item.title\n };\n });\n for (const action of getEnabledContactsMenuActions(this.contactsMenuData)) {\n try {\n actions.push({\n ncActionComponent: NcActionButton,\n ncActionComponentProps: {\n onClick: () => action.callback(this.contactsMenuData)\n },\n text: action.displayName(this.contactsMenuData),\n iconSvg: action.iconSvg(this.contactsMenuData)\n });\n } catch (error) {\n logger.error(`Failed to render ContactsMenu action ${action.id}`, {\n error,\n action\n });\n }\n }\n function escape(html) {\n const text = document.createTextNode(html);\n const p = document.createElement(\"p\");\n p.appendChild(text);\n return p.innerHTML;\n }\n if (!this.hideStatus && (this.userStatus.icon || this.userStatus.message)) {\n const emojiIcon = `\n\t\t\t\t\t${escape(this.userStatus.icon)}\n\t\t\t\t`;\n return [{\n ncActionComponent: NcActionText,\n ncActionComponentProps: {},\n iconSvg: this.userStatus.icon ? emojiIcon : void 0,\n text: `${this.userStatus.message}`\n }].concat(actions);\n }\n return actions;\n }\n },\n watch: {\n url() {\n this.userDoesNotExist = false;\n this.loadAvatarUrl();\n },\n user() {\n this.userDoesNotExist = false;\n this.isMenuLoaded = false;\n this.loadAvatarUrl();\n }\n },\n mounted() {\n this.loadAvatarUrl();\n subscribe(\"settings:avatar:updated\", this.loadAvatarUrl);\n subscribe(\"settings:display-name:updated\", this.loadAvatarUrl);\n if (!this.hideStatus && this.user && !this.isNoUser) {\n if (!this.preloadedUserStatus) {\n this.fetchUserStatus(this.user);\n } else {\n this.setUserStatus(this.preloadedUserStatus);\n }\n subscribe(\"user_status:status.updated\", this.handleUserStatusUpdated);\n } else if (!this.hideStatus && this.preloadedUserStatus) {\n this.setUserStatus(this.preloadedUserStatus);\n }\n },\n beforeUnmount() {\n unsubscribe(\"settings:avatar:updated\", this.loadAvatarUrl);\n unsubscribe(\"settings:display-name:updated\", this.loadAvatarUrl);\n unsubscribe(\"user_status:status.updated\", this.handleUserStatusUpdated);\n },\n methods: {\n t,\n handleUserStatusUpdated(state) {\n if (this.user === state.userId) {\n this.userStatus = {\n status: state.status,\n icon: state.icon,\n message: state.message\n };\n this.hasStatus = state.status !== null;\n }\n },\n /**\n * Toggle the popover menu on click or enter\n *\n * @param {KeyboardEvent|MouseEvent} event the UI event\n */\n async toggleMenu(event) {\n if (event.type === \"keydown\" && event.key !== \"Enter\") {\n return;\n }\n if (!this.contactsMenuOpenState) {\n await this.fetchContactsMenu();\n }\n this.contactsMenuOpenState = !this.contactsMenuOpenState;\n },\n closeMenu() {\n this.contactsMenuOpenState = false;\n },\n async fetchContactsMenu() {\n this.contactsMenuLoading = true;\n try {\n const user = encodeURIComponent(this.user);\n const { data } = await axios.post(generateUrl(\"contactsmenu/findOne\"), `shareType=0&shareWith=${user}`);\n this.contactsMenuData = data;\n this.contactsMenuActions = data.topAction ? [data.topAction].concat(data.actions) : data.actions;\n } catch {\n this.contactsMenuOpenState = false;\n }\n this.contactsMenuLoading = false;\n this.isMenuLoaded = true;\n },\n /**\n * Handle avatar loading if user or url defined\n */\n loadAvatarUrl() {\n this.isAvatarLoaded = false;\n if (!this.isUrlDefined && (!this.isUserDefined || this.isNoUser || this.iconClass || this.$slots.icon)) {\n this.isAvatarLoaded = true;\n this.userDoesNotExist = true;\n return;\n }\n if (this.isUrlDefined) {\n this.updateImageIfValid(this.url);\n return;\n }\n if (this.size <= 64) {\n const avatarUrl = this.avatarUrlGenerator(this.user, 64);\n const srcset = [\n avatarUrl + \" 1x\",\n this.avatarUrlGenerator(this.user, 512) + \" 8x\"\n ].join(\", \");\n this.updateImageIfValid(avatarUrl, srcset);\n } else {\n const avatarUrl = this.avatarUrlGenerator(this.user, 512);\n this.updateImageIfValid(avatarUrl);\n }\n },\n /**\n * Generate an avatar url from the server's avatar endpoint\n *\n * @param {string} user the user id\n * @param {number} size the desired size\n * @return {string}\n */\n avatarUrlGenerator(user, size) {\n let avatarUrl = getAvatarUrl(user, {\n size,\n isDarkTheme: this.isDarkTheme,\n isGuest: this.isGuest\n });\n if (user === getCurrentUser()?.uid && typeof oc_userconfig !== \"undefined\") {\n avatarUrl += \"?v=\" + window.oc_userconfig.avatar.version;\n }\n return avatarUrl;\n },\n /**\n * Check if the provided url is valid and update Avatar if so\n *\n * @param {string} url the avatar url\n * @param {Array} srcset the avatar srcset\n */\n updateImageIfValid(url, srcset = null) {\n const userHasAvatar = getUserHasAvatar(this.user);\n if (this.isUserDefined && typeof userHasAvatar === \"boolean\") {\n this.isAvatarLoaded = true;\n this.avatarUrlLoaded = url;\n if (srcset) {\n this.avatarSrcSetLoaded = srcset;\n }\n if (userHasAvatar === false) {\n this.userDoesNotExist = true;\n }\n return;\n }\n const img = new Image();\n img.onload = () => {\n this.avatarUrlLoaded = url;\n if (srcset) {\n this.avatarSrcSetLoaded = srcset;\n }\n this.isAvatarLoaded = true;\n setUserHasAvatar(this.user, true);\n };\n img.onerror = (error) => {\n logger.debug(\"[NcAvatar] Invalid avatar url\", { error, url });\n this.avatarUrlLoaded = null;\n this.avatarSrcSetLoaded = null;\n this.userDoesNotExist = true;\n this.isAvatarLoaded = false;\n setUserHasAvatar(this.user, false);\n };\n if (srcset) {\n img.srcset = srcset;\n }\n img.src = url;\n }\n }\n};\nconst _hoisted_1 = [\"title\"];\nconst _hoisted_2 = [\"src\", \"srcset\"];\nconst _hoisted_3 = {\n key: 2,\n class: \"avatardiv__user-status avatardiv__user-status--icon\"\n};\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_NcLoadingIcon = resolveComponent(\"NcLoadingIcon\");\n const _component_IconDotsHorizontal = resolveComponent(\"IconDotsHorizontal\");\n const _component_NcButton = resolveComponent(\"NcButton\");\n const _component_NcIconSvgWrapper = resolveComponent(\"NcIconSvgWrapper\");\n const _component_NcActions = resolveComponent(\"NcActions\");\n const _component_NcUserStatusIcon = resolveComponent(\"NcUserStatusIcon\");\n const _directive_click_outside = resolveDirective(\"click-outside\");\n return withDirectives((openBlock(), createElementBlock(\"span\", {\n class: normalizeClass([\"avatardiv popovermenu-wrapper\", {\n \"avatardiv--unknown\": $data.userDoesNotExist,\n \"avatardiv--with-menu\": $options.hasMenu,\n \"avatardiv--with-menu-loading\": $data.contactsMenuLoading\n }]),\n style: normalizeStyle($options.avatarStyle),\n title: $options.tooltip\n }, [\n renderSlot(_ctx.$slots, \"icon\", {}, () => [\n $props.iconClass ? (openBlock(), createElementBlock(\"span\", {\n key: 0,\n class: normalizeClass([$props.iconClass, \"avatar-class-icon\"])\n }, null, 2)) : $data.isAvatarLoaded && !$data.userDoesNotExist ? (openBlock(), createElementBlock(\"img\", {\n key: 1,\n src: $data.avatarUrlLoaded,\n srcset: $data.avatarSrcSetLoaded,\n alt: \"\"\n }, null, 8, _hoisted_2)) : createCommentVNode(\"\", true)\n ], true),\n $options.hasMenu && $options.menu.length === 0 ? (openBlock(), createBlock(_component_NcButton, {\n key: 0,\n \"aria-label\": $options.avatarAriaLabel,\n class: \"action-item action-item__menutoggle\",\n variant: \"tertiary-no-background\",\n onClick: $options.toggleMenu\n }, {\n icon: withCtx(() => [\n $data.contactsMenuLoading ? (openBlock(), createBlock(_component_NcLoadingIcon, { key: 0 })) : (openBlock(), createBlock(_component_IconDotsHorizontal, {\n key: 1,\n size: 20\n }))\n ]),\n _: 1\n }, 8, [\"aria-label\", \"onClick\"])) : $options.hasMenu ? (openBlock(), createBlock(_component_NcActions, {\n key: 1,\n open: $data.contactsMenuOpenState,\n \"onUpdate:open\": _cache[0] || (_cache[0] = ($event) => $data.contactsMenuOpenState = $event),\n \"aria-label\": $options.avatarAriaLabel,\n container: $props.menuContainer,\n forceMenu: \"\",\n manualOpen: \"\",\n variant: \"tertiary-no-background\",\n onClick: $options.toggleMenu\n }, createSlots({\n default: withCtx(() => [\n (openBlock(true), createElementBlock(Fragment, null, renderList($options.menu, (item, key) => {\n return openBlock(), createBlock(resolveDynamicComponent(item.ncActionComponent), mergeProps({ key }, { ref_for: true }, item.ncActionComponentProps), createSlots({\n default: withCtx(() => [\n createTextVNode(\" \" + toDisplayString(item.text), 1)\n ]),\n _: 2\n }, [\n item.iconSvg ? {\n name: \"icon\",\n fn: withCtx(() => [\n createVNode(_component_NcIconSvgWrapper, {\n svg: item.iconSvg\n }, null, 8, [\"svg\"])\n ]),\n key: \"0\"\n } : void 0\n ]), 1040);\n }), 128))\n ]),\n _: 2\n }, [\n $data.contactsMenuLoading ? {\n name: \"icon\",\n fn: withCtx(() => [\n createVNode(_component_NcLoadingIcon)\n ]),\n key: \"0\"\n } : void 0\n ]), 1032, [\"open\", \"aria-label\", \"container\", \"onClick\"])) : createCommentVNode(\"\", true),\n $options.showUserStatusIconOnAvatar ? (openBlock(), createElementBlock(\"span\", _hoisted_3, toDisplayString(_ctx.userStatus.icon), 1)) : $options.canDisplayUserStatus ? (openBlock(), createBlock(_component_NcUserStatusIcon, {\n key: 3,\n class: \"avatardiv__user-status\",\n status: _ctx.userStatus.status,\n \"aria-hidden\": String($options.hasMenu)\n }, null, 8, [\"status\", \"aria-hidden\"])) : createCommentVNode(\"\", true),\n $options.showInitials ? (openBlock(), createElementBlock(\"span\", {\n key: 4,\n style: normalizeStyle($options.initialsWrapperStyle),\n class: \"avatardiv__initials-wrapper\"\n }, [\n createElementVNode(\"span\", {\n style: normalizeStyle($options.initialsStyle),\n class: \"avatardiv__initials\"\n }, toDisplayString($options.initials), 5)\n ], 4)) : createCommentVNode(\"\", true)\n ], 14, _hoisted_1)), [\n [_directive_click_outside, $options.closeMenu]\n ]);\n}\nconst NcAvatar = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render], [\"__scopeId\", \"data-v-72a1eed6\"]]);\nexport {\n NcAvatar as N,\n userStatus as u\n};\n//# sourceMappingURL=NcAvatar-C9d7Wrc8.mjs.map\n"],"names":["_sfc_main","ActionTextMixin","NC_ACTIONS_IS_SEMANTIC_MENU","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_sfc_render","_ctx","_cache","$props","$setup","$data","$options","openBlock","createElementBlock","createElementVNode","args","renderSlot","normalizeClass","normalizeStyle","createCommentVNode","toDisplayString","NcActionText","_export_sfc","INJECTION_KEY_THEME","useIsDarkThemeElement","el","element","computed","toValue","isDarkTheme","ref","checkIfDarkTheme","isDarkSystemTheme","usePreferredDark","updateIsDarkTheme","useMutationObserver","watch","readonly","useInternalIsDarkTheme","createSharedComposable","useIsDarkTheme","enforcedTheme","inject","stopClickOutsideMap","vOnClickOutside","binding","capture","stop","onClickOutside","handler","options","u","type","props","value","node","convert","test","ok","castFactory","anyFactory","propertiesFactory","typeFactory","tests","checks","index","any","parameters","check","checkAsRecord","all","nodeAsRecord","key","testFunction","parent","looksLikeANode","empty","CONTINUE","EXIT","SKIP","visitParents","tree","visitor","reverse","is","step","factory","parents","name","visit","result","subresult","offset","grandparents","toResult","nodeAsParent","child","testOrVisitor","visitorOrReverse","maybeReverse","overload","URL_PATTERN","URL_PATTERN_AUTOLINK","NcLink","defineComponent","h","remarkAutolink","autolink","useMarkdown","useExtendedMarkdown","parsed","parseUrl","n","x","text","match","list","start","href","textAfter","textBefore","lastChar","joinedText","item","logger","getRoute","router","url","removePrefix","str","prefix","removePrefixes","prefixes","acc","isAbsoluteURL","isNonHttpLink","getBaseUrl","relativeUrl","relativeRouterBase","getRootUrl","potentialRouterPath","route","getEnabledContactsMenuActions","entry","action","c","i","a","t","e","s","r","o","_","hashCode","hash","Md5","finalInt","usernameToColor","username","finalPalette","generatePalette","global","Symbol","STATE_PLAINTEXT","STATE_HTML","STATE_COMMENT","ALLOWED_TAGS_REGEX","NORMALIZE_TAG_REGEX","striptags","html","allowable_tags","tag_replacement","context","init_context","striptags_internal","init_striptags_stream","parse_allowable_tags","state","tag_buffer","depth","in_quote_char","output","idx","length","char","normalize_tag","tag_set","module","this","getAvatarUrl","user","size","guestUrl","themeUrl","generateUrl","register","t10","userStatus","userId","capabilities","getCapabilities","getCurrentUser","data","axios","generateOcsUrl","status","message","icon","browserStorage","getBuilder","getUserHasAvatar","flag","setUserHasAvatar","IconDotsHorizontal","NcActions","NcButton","NcIconSvgWrapper","NcLoadingIcon","NcUserStatusIcon","getUserStatusText","g","b","initials","filteredChars","filtered","actions","NcActionRouter","NcActionLink","NcActionButton","error","escape","p","emojiIcon","subscribe","unsubscribe","event","avatarUrl","srcset","userHasAvatar","img","_component_NcLoadingIcon","resolveComponent","_component_IconDotsHorizontal","_component_NcButton","_component_NcIconSvgWrapper","_component_NcActions","_component_NcUserStatusIcon","_directive_click_outside","resolveDirective","withDirectives","createBlock","withCtx","$event","createSlots","Fragment","renderList","resolveDynamicComponent","mergeProps","createTextVNode","createVNode","NcAvatar"],"mappings":"8mCAKA,MAAMA,GAAY,CAChB,KAAM,eACN,OAAQ,CAACC,EAAe,EACxB,OAAQ,CACN,iBAAkB,CAChB,KAAMC,GACN,QAAS,EACf,CACA,CACA,EACMC,GAAa,CAAC,MAAM,EACpBC,GAAa,CACjB,IAAK,EACL,MAAO,+BACT,EACMC,GAAa,CAAE,MAAO,mBAAmB,EACzCC,GAAa,CAAC,aAAa,EAC3BC,GAAa,CAAC,aAAa,EAC3BC,GAAa,CACjB,IAAK,EACL,MAAO,mBACT,EACA,SAASC,GAAYC,EAAMC,EAAQC,EAAQC,EAAQC,EAAOC,EAAU,CAClE,OAAOC,EAAS,EAAIC,EAAmB,KAAM,CAC3C,MAAO,SACP,KAAMF,EAAS,kBAAoB,cACvC,EAAK,CACDG,EAAmB,OAAQ,CACzB,MAAO,cACP,QAASP,EAAO,CAAC,IAAMA,EAAO,CAAC,EAAI,IAAIQ,IAAST,EAAK,SAAWA,EAAK,QAAQ,GAAGS,CAAI,EAC1F,EAAO,CACDC,GAAWV,EAAK,OAAQ,OAAQ,CAAA,EAAI,IAAM,CACxCA,EAAK,OAAS,IAAMM,EAAS,EAAIC,EAAmB,OAAQ,CAC1D,IAAK,EACL,cAAe,OACf,MAAOI,EAAe,CAAC,oBAAqB,CAACX,EAAK,UAAY,yBAA2BA,EAAK,IAAI,CAAC,CAAC,EACpG,MAAOY,EAAe,CAAE,gBAAiBZ,EAAK,UAAY,OAAOA,EAAK,IAAI,IAAM,IAAI,CAAE,CAChG,EAAW,KAAM,CAAC,GAAKa,EAA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