import { defineComponent, ref, resolveDirective, mergeProps, unref, reactive, withCtx, createVNode, watch, createBlock, createCommentVNode, withDirectives, openBlock, Fragment, renderList, vShow, toDisplayString, nextTick, shallowRef, computed, watchEffect, provide, toRef, inject, useSSRContext } from 'vue'; import { ssrRenderAttrs, ssrInterpolate, ssrGetDirectiveProps, ssrRenderComponent, ssrRenderAttr, ssrRenderClass, ssrRenderList, ssrRenderStyle } from 'vue/server-renderer'; import { u as useRouter, a as useConfigStore, b as useUserStore, x as getSupabaseStorageUrl, y as supabaseService, z as useElementSize, n as useIntersectionObserver, o as getToken, B as myAxios, e as api$1, t as reactiveProjectName, s as supabase, C as useConfigInject, D as genComponentStyleHook, E as omit, F as classNames, G as arrayType, P as PropTypes, H as flattenChildren, I as getOptionProps, J as initDefaultProps, K as objectType, L as anyType, M as tuple, N as resetComponent, O as textEllipsis, Q as KeyCode } from './server.mjs'; import { e as empty_user } from './empty_user-BaUNCdgf.mjs'; import { f as formatTime } from './useDateTime-D8RCoGwW.mjs'; import { Swiper, SwiperSlide } from 'swiper/vue'; import { Pagination } from 'swiper/modules'; import { i as img_gif } from './post_loading-BiySI7bp.mjs'; import { B as BasicIconOld } from './BasicIconOld-I4c2ShMu.mjs'; import { _ as _export_sfc } from './_plugin-vue_export-helper-1tPrXgE0.mjs'; import { _ as _sfc_main$7 } from './like-BhIOg3YL.mjs'; import { ContentLoader } from 'vue-content-loader'; import { B as BasicSheet } from './index-6lAQNCiO.mjs'; import { a as _sfc_main$2$1, b as _sfc_main$1$1 } from './moreOptionProduct-Wbm_Qic5.mjs'; import { U as UserProfilePic } from './UserProfilePic-DXA233hi.mjs'; import { _ as _sfc_main$8 } from './BasicButton-B-4QDu9v.mjs'; import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2'; import _extends from '@babel/runtime/helpers/esm/extends'; import { T as Trigger } from './index-Dxyzjwb5.mjs'; import { u as useProvideOverride, M as Menu, _ as __nuxt_component_1 } from './index-BlNIpVst.mjs'; import { S as Spin } from './index-DqCYDGJX.mjs'; import { B as BaseInput } from './BaseInput-_gwhwanN.mjs'; import { u as useInjectFormItemContext, F as FormItemInputContext } from './FormItemContext-CDDW52IT.mjs'; import { g as getMergedStatus, a as getStatusClassNames } from './statusUtils-C3ZNzkeD.mjs'; import { i as initInputToken, g as genBasicInputStyle, a as genStatusStyle, b as genPlaceholderStyle, c as genActiveStyle, d as genDisabledStyle } from './index-C1mihc8c.mjs'; function getBeforeSelectionText(input) { const { selectionStart } = input; return input.value.slice(0, selectionStart); } function getLastMeasureIndex(text) { let prefix = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""; const prefixList = Array.isArray(prefix) ? prefix : [prefix]; return prefixList.reduce((lastMatch, prefixStr) => { const lastIndex = text.lastIndexOf(prefixStr); if (lastIndex > lastMatch.location) { return { location: lastIndex, prefix: prefixStr }; } return lastMatch; }, { location: -1, prefix: "" }); } function lower(char) { return (char || "").toLowerCase(); } function reduceText(text, targetText, split) { const firstChar = text[0]; if (!firstChar || firstChar === split) { return text; } let restText = text; const targetTextLen = targetText.length; for (let i = 0; i < targetTextLen; i += 1) { if (lower(restText[i]) !== lower(targetText[i])) { restText = restText.slice(i); break; } else if (i === targetTextLen - 1) { restText = restText.slice(targetTextLen); } } return restText; } function replaceWithMeasure(text, measureConfig) { const { measureLocation, prefix, targetText, selectionStart, split } = measureConfig; let beforeMeasureText = text.slice(0, measureLocation); if (beforeMeasureText[beforeMeasureText.length - split.length] === split) { beforeMeasureText = beforeMeasureText.slice(0, beforeMeasureText.length - split.length); } if (beforeMeasureText) { beforeMeasureText = `${beforeMeasureText}${split}`; } let restText = reduceText(text.slice(selectionStart), targetText.slice(selectionStart - measureLocation - prefix.length), split); if (restText.slice(0, split.length) === split) { restText = restText.slice(split.length); } const connectedStartText = `${beforeMeasureText}${prefix}${targetText}${split}`; return { text: `${connectedStartText}${restText}`, selectionLocation: connectedStartText.length }; } function setInputSelection(input, location) { input.setSelectionRange(location, location); input.blur(); input.focus(); } function validateSearch(text, props) { const { split } = props; return !split || text.indexOf(split) === -1; } function filterOption(input, _ref) { let { value = "" } = _ref; const lowerCase = input.toLowerCase(); return value.toLowerCase().indexOf(lowerCase) !== -1; } const MentionsContextKey = Symbol("MentionsContextKey"); function noop$1() { } const DropdownMenu = defineComponent({ compatConfig: { MODE: 3 }, name: "DropdownMenu", props: { prefixCls: String, options: { type: Array, default: () => [] } }, setup(props, _ref) { let { slots } = _ref; const { activeIndex, setActiveIndex, selectOption, onFocus = noop$1, loading } = inject(MentionsContextKey, { activeIndex: shallowRef(), loading: shallowRef(false) }); let timeoutId; const onMousedown = (e) => { clearTimeout(timeoutId); timeoutId = setTimeout(() => { onFocus(e); }); }; return () => { var _a; const { prefixCls, options } = props; const activeOption = options[activeIndex.value] || {}; return createVNode(Menu, { "prefixCls": `${prefixCls}-menu`, "activeKey": activeOption.value, "onSelect": (_ref2) => { let { key } = _ref2; const option = options.find((_ref3) => { let { value } = _ref3; return value === key; }); selectOption(option); }, "onMousedown": onMousedown }, { default: () => [!loading.value && options.map((option, index) => { var _a2, _b; const { value, disabled, label = option.value, class: className, style } = option; return createVNode(__nuxt_component_1, { "key": value, "disabled": disabled, "onMouseenter": () => { setActiveIndex(index); }, "class": className, "style": style }, { default: () => [(_b = (_a2 = slots.option) === null || _a2 === void 0 ? void 0 : _a2.call(slots, option)) !== null && _b !== void 0 ? _b : typeof label === "function" ? label(option) : label] }); }), !loading.value && options.length === 0 ? createVNode(__nuxt_component_1, { "key": "notFoundContent", "disabled": true }, { default: () => [(_a = slots.notFoundContent) === null || _a === void 0 ? void 0 : _a.call(slots)] }) : null, loading.value && createVNode(__nuxt_component_1, { "key": "loading", "disabled": true }, { default: () => [createVNode(Spin, { "size": "small" }, null)] })] }); }; } }); const BUILT_IN_PLACEMENTS = { bottomRight: { points: ["tl", "br"], offset: [0, 4], overflow: { adjustX: 0, adjustY: 1 } }, bottomLeft: { points: ["tr", "bl"], offset: [0, 4], overflow: { adjustX: 0, adjustY: 1 } }, topRight: { points: ["bl", "tr"], offset: [0, -4], overflow: { adjustX: 0, adjustY: 1 } }, topLeft: { points: ["br", "tl"], offset: [0, -4], overflow: { adjustX: 0, adjustY: 1 } } }; const KeywordTrigger = defineComponent({ compatConfig: { MODE: 3 }, name: "KeywordTrigger", props: { loading: { type: Boolean, default: void 0 }, options: { type: Array, default: () => [] }, prefixCls: String, placement: String, visible: { type: Boolean, default: void 0 }, transitionName: String, getPopupContainer: Function, direction: String, dropdownClassName: String }, setup(props, _ref) { let { slots } = _ref; const getDropdownPrefix = () => { return `${props.prefixCls}-dropdown`; }; const getDropdownElement = () => { const { options } = props; return createVNode(DropdownMenu, { "prefixCls": getDropdownPrefix(), "options": options }, { notFoundContent: slots.notFoundContent, option: slots.option }); }; const popupPlacement = computed(() => { const { placement, direction } = props; let popupPlacement2 = "topRight"; if (direction === "rtl") { popupPlacement2 = placement === "top" ? "topLeft" : "bottomLeft"; } else { popupPlacement2 = placement === "top" ? "topRight" : "bottomRight"; } return popupPlacement2; }); return () => { const { visible, transitionName, getPopupContainer } = props; return createVNode(Trigger, { "prefixCls": getDropdownPrefix(), "popupVisible": visible, "popup": getDropdownElement(), "popupClassName": props.dropdownClassName, "popupPlacement": popupPlacement.value, "popupTransitionName": transitionName, "builtinPlacements": BUILT_IN_PLACEMENTS, "getPopupContainer": getPopupContainer }, { default: slots.default }); }; } }); const PlaceMent = tuple("top", "bottom"); const mentionsProps$1 = { autofocus: { type: Boolean, default: void 0 }, prefix: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]), prefixCls: String, value: String, disabled: { type: Boolean, default: void 0 }, split: String, transitionName: String, placement: PropTypes.oneOf(PlaceMent), character: PropTypes.any, characterRender: Function, filterOption: { type: [Boolean, Function] }, validateSearch: Function, getPopupContainer: { type: Function }, options: arrayType(), loading: { type: Boolean, default: void 0 }, rows: [Number, String], direction: { type: String } }; const vcMentionsProps = _extends(_extends({}, mentionsProps$1), { dropdownClassName: String }); const defaultProps = { prefix: "@", split: " ", rows: 1, validateSearch, filterOption: () => filterOption }; initDefaultProps(vcMentionsProps, defaultProps); var __rest$1 = function(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; function noop() { } const Mentions$1 = defineComponent({ compatConfig: { MODE: 3 }, name: "Mentions", inheritAttrs: false, props: initDefaultProps(vcMentionsProps, defaultProps), emits: ["change", "select", "search", "focus", "blur", "pressenter"], setup(props, _ref) { let { emit, attrs, expose, slots } = _ref; const measure = ref(null); const textarea = ref(null); const focusId = ref(); const state = reactive({ value: props.value || "", measuring: false, measureLocation: 0, measureText: null, measurePrefix: "", activeIndex: 0, isFocus: false }); watchEffect(() => { state.value = props.value; }); const triggerChange = (val) => { emit("change", val); }; const onChange = (_ref2) => { let { target: { value } } = _ref2; triggerChange(value); }; const startMeasure = (measureText, measurePrefix, measureLocation) => { _extends(state, { measuring: true, measureText, measurePrefix, measureLocation, activeIndex: 0 }); }; const stopMeasure = (callback) => { _extends(state, { measuring: false, measureLocation: 0, measureText: null }); callback === null || callback === void 0 ? void 0 : callback(); }; const onKeyDown = (event) => { const { which } = event; if (!state.measuring) { return; } if (which === KeyCode.UP || which === KeyCode.DOWN) { const optionLen = options.value.length; const offset = which === KeyCode.UP ? -1 : 1; const newActiveIndex = (state.activeIndex + offset + optionLen) % optionLen; state.activeIndex = newActiveIndex; event.preventDefault(); } else if (which === KeyCode.ESC) { stopMeasure(); } else if (which === KeyCode.ENTER) { event.preventDefault(); if (!options.value.length) { stopMeasure(); return; } const option = options.value[state.activeIndex]; selectOption(option); } }; const onKeyUp = (event) => { const { key, which } = event; const { measureText: prevMeasureText, measuring } = state; const { prefix, validateSearch: validateSearch2 } = props; const target = event.target; if (target.composing) { return; } const selectionStartText = getBeforeSelectionText(target); const { location: measureIndex, prefix: measurePrefix } = getLastMeasureIndex(selectionStartText, prefix); if ([KeyCode.ESC, KeyCode.UP, KeyCode.DOWN, KeyCode.ENTER].indexOf(which) !== -1) { return; } if (measureIndex !== -1) { const measureText = selectionStartText.slice(measureIndex + measurePrefix.length); const validateMeasure = validateSearch2(measureText, props); const matchOption = !!getOptions(measureText).length; if (validateMeasure) { if (key === measurePrefix || key === "Shift" || measuring || measureText !== prevMeasureText && matchOption) { startMeasure(measureText, measurePrefix, measureIndex); } } else if (measuring) { stopMeasure(); } if (validateMeasure) { emit("search", measureText, measurePrefix); } } else if (measuring) { stopMeasure(); } }; const onPressEnter = (event) => { if (!state.measuring) { emit("pressenter", event); } }; const onInputFocus = (event) => { onFocus(event); }; const onInputBlur = (event) => { onBlur(event); }; const onFocus = (event) => { clearTimeout(focusId.value); const { isFocus } = state; if (!isFocus && event) { emit("focus", event); } state.isFocus = true; }; const onBlur = (event) => { focusId.value = setTimeout(() => { state.isFocus = false; stopMeasure(); emit("blur", event); }, 100); }; const selectOption = (option) => { const { split } = props; const { value: mentionValue = "" } = option; const { text, selectionLocation } = replaceWithMeasure(state.value, { measureLocation: state.measureLocation, targetText: mentionValue, prefix: state.measurePrefix, selectionStart: textarea.value.getSelectionStart(), split }); triggerChange(text); stopMeasure(() => { setInputSelection(textarea.value.input, selectionLocation); }); emit("select", option, state.measurePrefix); }; const setActiveIndex = (activeIndex) => { state.activeIndex = activeIndex; }; const getOptions = (measureText) => { const targetMeasureText = measureText || state.measureText || ""; const { filterOption: filterOption2 } = props; const list = props.options.filter((option) => { if (!!filterOption2 === false) { return true; } return filterOption2(targetMeasureText, option); }); return list; }; const options = computed(() => { return getOptions(); }); const focus = () => { textarea.value.focus(); }; const blur = () => { textarea.value.blur(); }; expose({ blur, focus }); provide(MentionsContextKey, { activeIndex: toRef(state, "activeIndex"), setActiveIndex, selectOption, onFocus, onBlur, loading: toRef(props, "loading") }); return () => { const { measureLocation, measurePrefix, measuring } = state; const { prefixCls, placement, transitionName, getPopupContainer, direction } = props, restProps = __rest$1(props, ["prefixCls", "placement", "transitionName", "getPopupContainer", "direction"]); const { class: className, style } = attrs, otherAttrs = __rest$1(attrs, ["class", "style"]); const inputProps = omit(restProps, ["value", "prefix", "split", "validateSearch", "filterOption", "options", "loading"]); const textareaProps = _extends(_extends(_extends({}, inputProps), otherAttrs), { onChange: noop, onSelect: noop, value: state.value, onInput: onChange, onBlur: onInputBlur, onKeydown: onKeyDown, onKeyup: onKeyUp, onFocus: onInputFocus, onPressenter: onPressEnter }); return createVNode("div", { "class": classNames(prefixCls, className), "style": style }, [createVNode(BaseInput, _objectSpread(_objectSpread({}, textareaProps), {}, { "ref": textarea, "tag": "textarea" }), null), measuring && createVNode("div", { "ref": measure, "class": `${prefixCls}-measure` }, [state.value.slice(0, measureLocation), createVNode(KeywordTrigger, { "prefixCls": prefixCls, "transitionName": transitionName, "dropdownClassName": props.dropdownClassName, "placement": placement, "options": measuring ? options.value : [], "visible": true, "direction": direction, "getPopupContainer": getPopupContainer }, { default: () => [createVNode("span", null, [measurePrefix])], notFoundContent: slots.notFoundContent, option: slots.option }), state.value.slice(measureLocation + measurePrefix.length)])]); }; } }); const baseOptionsProps = { value: String, disabled: Boolean, payload: objectType() }; const optionProps = _extends(_extends({}, baseOptionsProps), { label: anyType([]) }); const optionOptions = { name: "Option", props: optionProps, render(_props, _ref) { let { slots } = _ref; var _a; return (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots); } }; defineComponent(_extends({ compatConfig: { MODE: 3 } }, optionOptions)); const genMentionsStyle = (token) => { const { componentCls, colorTextDisabled, controlItemBgHover, controlPaddingHorizontal, colorText, motionDurationSlow, lineHeight, controlHeight, inputPaddingHorizontal, inputPaddingVertical, fontSize, colorBgElevated, borderRadiusLG, boxShadowSecondary } = token; const itemPaddingVertical = Math.round((token.controlHeight - token.fontSize * token.lineHeight) / 2); return { [componentCls]: _extends(_extends(_extends(_extends(_extends({}, resetComponent(token)), genBasicInputStyle(token)), { position: "relative", display: "inline-block", height: "auto", padding: 0, overflow: "hidden", lineHeight, whiteSpace: "pre-wrap", verticalAlign: "bottom" }), genStatusStyle(token, componentCls)), { "&-disabled": { "> textarea": _extends({}, genDisabledStyle(token)) }, "&-focused": _extends({}, genActiveStyle(token)), [`&-affix-wrapper ${componentCls}-suffix`]: { position: "absolute", top: 0, insetInlineEnd: inputPaddingHorizontal, bottom: 0, zIndex: 1, display: "inline-flex", alignItems: "center", margin: "auto" }, // ================= Input Area ================= [`> textarea, ${componentCls}-measure`]: { color: colorText, boxSizing: "border-box", minHeight: controlHeight - 2, margin: 0, padding: `${inputPaddingVertical}px ${inputPaddingHorizontal}px`, overflow: "inherit", overflowX: "hidden", overflowY: "auto", fontWeight: "inherit", fontSize: "inherit", fontFamily: "inherit", fontStyle: "inherit", fontVariant: "inherit", fontSizeAdjust: "inherit", fontStretch: "inherit", lineHeight: "inherit", direction: "inherit", letterSpacing: "inherit", whiteSpace: "inherit", textAlign: "inherit", verticalAlign: "top", wordWrap: "break-word", wordBreak: "inherit", tabSize: "inherit" }, "> textarea": _extends({ width: "100%", border: "none", outline: "none", resize: "none", backgroundColor: "inherit" }, genPlaceholderStyle(token.colorTextPlaceholder)), [`${componentCls}-measure`]: { position: "absolute", top: 0, insetInlineEnd: 0, bottom: 0, insetInlineStart: 0, zIndex: -1, color: "transparent", pointerEvents: "none", "> span": { display: "inline-block", minHeight: "1em" } }, // ================== Dropdown ================== "&-dropdown": _extends(_extends({}, resetComponent(token)), { position: "absolute", top: -9999, insetInlineStart: -9999, zIndex: token.zIndexPopup, boxSizing: "border-box", fontSize, fontVariant: "initial", backgroundColor: colorBgElevated, borderRadius: borderRadiusLG, outline: "none", boxShadow: boxShadowSecondary, "&-hidden": { display: "none" }, [`${componentCls}-dropdown-menu`]: { maxHeight: token.dropdownHeight, marginBottom: 0, paddingInlineStart: 0, overflow: "auto", listStyle: "none", outline: "none", "&-item": _extends(_extends({}, textEllipsis), { position: "relative", display: "block", minWidth: token.controlItemWidth, padding: `${itemPaddingVertical}px ${controlPaddingHorizontal}px`, color: colorText, fontWeight: "normal", lineHeight, cursor: "pointer", transition: `background ${motionDurationSlow} ease`, "&:hover": { backgroundColor: controlItemBgHover }, "&:first-child": { borderStartStartRadius: borderRadiusLG, borderStartEndRadius: borderRadiusLG, borderEndStartRadius: 0, borderEndEndRadius: 0 }, "&:last-child": { borderStartStartRadius: 0, borderStartEndRadius: 0, borderEndStartRadius: borderRadiusLG, borderEndEndRadius: borderRadiusLG }, "&-disabled": { color: colorTextDisabled, cursor: "not-allowed", "&:hover": { color: colorTextDisabled, backgroundColor: controlItemBgHover, cursor: "not-allowed" } }, "&-selected": { color: colorText, fontWeight: token.fontWeightStrong, backgroundColor: controlItemBgHover }, "&-active": { backgroundColor: controlItemBgHover } }) } }) }) }; }; const useStyle = genComponentStyleHook("Mentions", (token) => { const mentionsToken = initInputToken(token); return [genMentionsStyle(mentionsToken)]; }, (token) => ({ dropdownHeight: 250, controlItemWidth: 100, zIndexPopup: token.zIndexPopupBase + 50 })); var __rest = function(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; function loadingFilterOption() { return true; } const getMentions = function() { let value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; let config = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; const { prefix = "@", split = " " } = config; const prefixList = Array.isArray(prefix) ? prefix : [prefix]; return value.split(split).map(function() { let str = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; let hitPrefix = null; prefixList.some((prefixStr) => { const startStr = str.slice(0, prefixStr.length); if (startStr === prefixStr) { hitPrefix = prefixStr; return true; } return false; }); if (hitPrefix !== null) { return { prefix: hitPrefix, value: str.slice(hitPrefix.length) }; } return null; }).filter((entity) => !!entity && !!entity.value); }; const mentionsProps = () => _extends(_extends({}, mentionsProps$1), { loading: { type: Boolean, default: void 0 }, onFocus: { type: Function }, onBlur: { type: Function }, onSelect: { type: Function }, onChange: { type: Function }, onPressenter: { type: Function }, "onUpdate:value": { type: Function }, notFoundContent: PropTypes.any, defaultValue: String, id: String, status: String }); const Mentions = defineComponent({ compatConfig: { MODE: 3 }, name: "AMentions", inheritAttrs: false, props: mentionsProps(), slots: Object, setup(props, _ref) { let { slots, emit, attrs, expose } = _ref; var _b, _c; const { prefixCls, renderEmpty, direction } = useConfigInject("mentions", props); const [wrapSSR, hashId] = useStyle(prefixCls); const focused = shallowRef(false); const vcMentions = shallowRef(null); const value = shallowRef((_c = (_b = props.value) !== null && _b !== void 0 ? _b : props.defaultValue) !== null && _c !== void 0 ? _c : ""); const formItemContext = useInjectFormItemContext(); const formItemInputContext = FormItemInputContext.useInject(); const mergedStatus = computed(() => getMergedStatus(formItemInputContext.status, props.status)); useProvideOverride({ prefixCls: computed(() => `${prefixCls.value}-menu`), mode: computed(() => "vertical"), selectable: computed(() => false), onClick: () => { }, validator: (_ref2) => { let { mode } = _ref2; } }); watch(() => props.value, (val) => { value.value = val; }); const handleFocus = (e) => { focused.value = true; emit("focus", e); }; const handleBlur = (e) => { focused.value = false; emit("blur", e); formItemContext.onFieldBlur(); }; const handleSelect = function() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } emit("select", ...args); focused.value = true; }; const handleChange = (val) => { if (props.value === void 0) { value.value = val; } emit("update:value", val); emit("change", val); formItemContext.onFieldChange(); }; const getNotFoundContent = () => { const notFoundContent = props.notFoundContent; if (notFoundContent !== void 0) { return notFoundContent; } if (slots.notFoundContent) { return slots.notFoundContent(); } return renderEmpty("Select"); }; const getOptions = () => { var _a2; return flattenChildren(((_a2 = slots.default) === null || _a2 === void 0 ? void 0 : _a2.call(slots)) || []).map((item) => { var _a3, _b2; return _extends(_extends({}, getOptionProps(item)), { label: (_b2 = (_a3 = item.children) === null || _a3 === void 0 ? void 0 : _a3.default) === null || _b2 === void 0 ? void 0 : _b2.call(_a3) }); }); }; const focus = () => { vcMentions.value.focus(); }; const blur = () => { vcMentions.value.blur(); }; expose({ focus, blur }); const mentionsfilterOption = computed(() => props.loading ? loadingFilterOption : props.filterOption); return () => { const { disabled, getPopupContainer, rows = 1, id = formItemContext.id.value } = props, restProps = __rest(props, ["disabled", "getPopupContainer", "rows", "id"]); const { hasFeedback, feedbackIcon } = formItemInputContext; const { class: className } = attrs, otherAttrs = __rest(attrs, ["class"]); const otherProps = omit(restProps, ["defaultValue", "onUpdate:value", "prefixCls"]); const mergedClassName = classNames({ [`${prefixCls.value}-disabled`]: disabled, [`${prefixCls.value}-focused`]: focused.value, [`${prefixCls.value}-rtl`]: direction.value === "rtl" }, getStatusClassNames(prefixCls.value, mergedStatus.value), !hasFeedback && className, hashId.value); const mentionsProps2 = _extends(_extends(_extends(_extends({ prefixCls: prefixCls.value }, otherProps), { disabled, direction: direction.value, filterOption: mentionsfilterOption.value, getPopupContainer, options: props.loading ? [{ value: "ANTDV_SEARCHING", disabled: true, label: createVNode(Spin, { "size": "small" }, null) }] : props.options || getOptions(), class: mergedClassName }), otherAttrs), { rows, onChange: handleChange, onSelect: handleSelect, onFocus: handleFocus, onBlur: handleBlur, ref: vcMentions, value: value.value, id }); const mentions = createVNode(Mentions$1, _objectSpread(_objectSpread({}, mentionsProps2), {}, { "dropdownClassName": hashId.value }), { notFoundContent: getNotFoundContent, option: slots.option }); if (hasFeedback) { return wrapSSR(createVNode("div", { "class": classNames(`${prefixCls.value}-affix-wrapper`, getStatusClassNames(`${prefixCls.value}-affix-wrapper`, mergedStatus.value, hasFeedback), className, hashId.value) }, [mentions, createVNode("span", { "class": `${prefixCls.value}-suffix` }, [feedbackIcon])])); } return wrapSSR(mentions); }; } }); const MentionsOption = defineComponent(_extends(_extends({ compatConfig: { MODE: 3 } }, optionOptions), { name: "AMentionsOption", props: optionProps })); const __nuxt_component_0 = _extends(Mentions, { Option: MentionsOption, getMentions, install: (app) => { app.component(Mentions.name, Mentions); app.component(MentionsOption.name, MentionsOption); return app; } }); const _sfc_main$6 = /* @__PURE__ */ defineComponent({ __name: "Content", __ssrInlineRender: true, props: { media: {}, name: {}, id: {}, scrollSave: {} }, setup(__props) { useRouter(); const config = useConfigStore(); const videos = ref([]); const modules = [Pagination]; return (_ctx, _push, _parent, _attrs) => { const _directive_lazy = resolveDirective("lazy"); let _temp0; _push(`