memi-board 0.64.0 → 0.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{commentImages-xb5Y4ySe.js → commentImages-DHIuwvex.js} +158 -150
- package/dist/commentImages-DHIuwvex.js.map +1 -0
- package/dist/composables/useMemiBoardAuthorMemo.d.ts +18 -0
- package/dist/{en-I7auZHra.js → en-yS55nNno.js} +8 -3
- package/dist/en-yS55nNno.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1395 -1316
- package/dist/index.js.map +1 -1
- package/dist/runtime/components/AuthorMemoList.vue +83 -0
- package/dist/runtime/components/AuthorMemoListItem.vue +47 -0
- package/dist/runtime/components/AuthorMenu.vue +54 -21
- package/dist/runtime/components/CategorySettings.vue +2 -0
- package/dist/runtime/components/ListCard.vue +18 -11
- package/dist/runtime/components/OrphanCleanup.vue +2 -0
- package/dist/runtime/components/Profile.vue +14 -0
- package/dist/runtime/components/ReportList.vue +2 -0
- package/dist/runtime/components/Settings.vue +2 -0
- package/dist/runtime/components/SettingsVersion.vue +10 -0
- package/dist/runtime/components/UsersSettings.vue +2 -0
- package/dist/storage.js +19 -19
- package/dist/utils/boardPaths.d.ts +2 -0
- package/package.json +1 -1
- package/dist/commentImages-xb5Y4ySe.js.map +0 -1
- package/dist/en-I7auZHra.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { computed as e, getCurrentInstance as t, hasInjectionContext as n, inject as r, onServerPrefetch as i, provide as a, reactive as o, shallowRef as s, toValue as c, watch as
|
|
2
|
-
import { collection as
|
|
1
|
+
import { computed as e, getCurrentInstance as t, hasInjectionContext as n, inject as r, onServerPrefetch as i, provide as a, reactive as o, shallowRef as s, toValue as c, watch as ee } from "vue";
|
|
2
|
+
import { collection as l, doc as u } from "firebase/firestore";
|
|
3
3
|
//#region src/i18n/locales.ts
|
|
4
|
-
var
|
|
4
|
+
var d = [
|
|
5
5
|
{
|
|
6
6
|
code: "ko",
|
|
7
7
|
name: "한국어",
|
|
@@ -62,19 +62,19 @@ var f = [
|
|
|
62
62
|
intl: "id-ID",
|
|
63
63
|
dir: "ltr"
|
|
64
64
|
}
|
|
65
|
-
],
|
|
66
|
-
function
|
|
65
|
+
], f = "ko", p = "en", m = new Set(d.map((e) => e.code));
|
|
66
|
+
function h(e) {
|
|
67
67
|
if (typeof e != "string") return;
|
|
68
68
|
let t = e.trim().toLowerCase().split(/[-_]/)[0];
|
|
69
|
-
return t &&
|
|
69
|
+
return t && m.has(t) ? t : void 0;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
return
|
|
71
|
+
function g(e) {
|
|
72
|
+
return d.find((t) => t.code === e) ?? d[0];
|
|
73
73
|
}
|
|
74
74
|
//#endregion
|
|
75
75
|
//#region src/utils/boardPaths.ts
|
|
76
|
-
var
|
|
77
|
-
function
|
|
76
|
+
var _ = "memiBoardPosts", v = "memiBoardComments", y = "memiBoardLikes", b = "memiBoardReports", x = "memiBoardSettings", S = "memiBoardUsers";
|
|
77
|
+
function C(e) {
|
|
78
78
|
return {
|
|
79
79
|
postsCollection: e.postsCollection?.trim() || "memiBoardPosts",
|
|
80
80
|
commentsCollection: e.commentsCollection?.trim() || "memiBoardComments",
|
|
@@ -84,96 +84,99 @@ function w(e) {
|
|
|
84
84
|
usersCollection: e.usersCollection?.trim() || "memiBoardUsers"
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
return
|
|
87
|
+
function te(e, t) {
|
|
88
|
+
return l(e, t.settingsCollection);
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
return
|
|
90
|
+
function ne(e, t, n) {
|
|
91
|
+
return u(e, t.settingsCollection, n);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
return
|
|
95
|
-
}
|
|
96
|
-
function re(e, t, n) {
|
|
97
|
-
return d(e, t.postsCollection, n);
|
|
93
|
+
function re(e, t) {
|
|
94
|
+
return l(e, t.postsCollection);
|
|
98
95
|
}
|
|
99
96
|
function ie(e, t, n) {
|
|
100
|
-
return
|
|
97
|
+
return u(e, t.postsCollection, n);
|
|
101
98
|
}
|
|
102
99
|
function ae(e, t, n) {
|
|
103
|
-
return u(e, t.postsCollection, n, "
|
|
100
|
+
return u(e, t.postsCollection, n, "body", "main");
|
|
104
101
|
}
|
|
105
|
-
function oe(e, t, n
|
|
106
|
-
return
|
|
102
|
+
function oe(e, t, n) {
|
|
103
|
+
return l(e, t.postsCollection, n, "revisions");
|
|
107
104
|
}
|
|
108
|
-
function se(e, t) {
|
|
109
|
-
return u(e, t.
|
|
105
|
+
function se(e, t, n, r) {
|
|
106
|
+
return u(e, t.postsCollection, n, "revisions", String(r));
|
|
110
107
|
}
|
|
111
|
-
function ce(e, t
|
|
112
|
-
return
|
|
108
|
+
function ce(e, t) {
|
|
109
|
+
return l(e, t.commentsCollection);
|
|
113
110
|
}
|
|
114
111
|
function le(e, t, n) {
|
|
115
|
-
return u(e, t.commentsCollection, n
|
|
112
|
+
return u(e, t.commentsCollection, n);
|
|
116
113
|
}
|
|
117
|
-
function
|
|
118
|
-
return
|
|
114
|
+
function ue(e, t, n) {
|
|
115
|
+
return l(e, t.commentsCollection, n, "revisions");
|
|
119
116
|
}
|
|
120
|
-
function
|
|
121
|
-
return u(e, t.
|
|
117
|
+
function w(e, t, n, r) {
|
|
118
|
+
return u(e, t.commentsCollection, n, "revisions", String(r));
|
|
122
119
|
}
|
|
123
|
-
function
|
|
120
|
+
function T(e, t) {
|
|
121
|
+
return l(e, t.likesCollection);
|
|
122
|
+
}
|
|
123
|
+
function E(e, t) {
|
|
124
124
|
return `${e}_${t}`;
|
|
125
125
|
}
|
|
126
|
-
function
|
|
127
|
-
return
|
|
126
|
+
function de(e, t, n, r) {
|
|
127
|
+
return u(e, t.likesCollection, E(n, r));
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
return
|
|
129
|
+
function fe(e, t) {
|
|
130
|
+
return l(e, t.reportsCollection);
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function D(e, t) {
|
|
133
133
|
return `${e}_${t}`;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
return
|
|
135
|
+
function pe(e, t, n, r) {
|
|
136
|
+
return u(e, t.reportsCollection, D(n, r));
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function O(e, t) {
|
|
139
139
|
return `c_${e}_${t}`;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
return
|
|
141
|
+
function me(e, t, n, r) {
|
|
142
|
+
return u(e, t.reportsCollection, O(n, r));
|
|
143
|
+
}
|
|
144
|
+
function he(e, t, n) {
|
|
145
|
+
return u(e, t.reportsCollection, n);
|
|
143
146
|
}
|
|
144
|
-
function
|
|
145
|
-
return
|
|
147
|
+
function ge(e, t) {
|
|
148
|
+
return l(e, t.usersCollection);
|
|
146
149
|
}
|
|
147
|
-
function
|
|
148
|
-
return u(e, t.usersCollection);
|
|
150
|
+
function _e(e, t, n) {
|
|
151
|
+
return u(e, t.usersCollection, n);
|
|
149
152
|
}
|
|
150
|
-
function
|
|
151
|
-
return
|
|
153
|
+
function ve(e, t, n) {
|
|
154
|
+
return u(e, t.usersCollection, n, "private", "info");
|
|
152
155
|
}
|
|
153
|
-
function
|
|
154
|
-
return
|
|
156
|
+
function ye(e, t, n, r) {
|
|
157
|
+
return u(e, t.usersCollection, n, "memos", r);
|
|
155
158
|
}
|
|
156
|
-
function
|
|
157
|
-
return
|
|
159
|
+
function be(e, t, n) {
|
|
160
|
+
return l(e, t.usersCollection, n, "memos");
|
|
158
161
|
}
|
|
159
|
-
function
|
|
162
|
+
function xe(e, t) {
|
|
160
163
|
return `${e.postsCollection}/${t}`;
|
|
161
164
|
}
|
|
162
|
-
function
|
|
165
|
+
function k(e, t) {
|
|
163
166
|
return `${e.postsCollection}/${e.usersCollection}/${t}`;
|
|
164
167
|
}
|
|
165
168
|
//#endregion
|
|
166
169
|
//#region src/config.ts
|
|
167
|
-
var
|
|
168
|
-
function
|
|
170
|
+
var A = "__MEMI_BOARD_CONFIG__";
|
|
171
|
+
function j() {
|
|
169
172
|
let e = globalThis;
|
|
170
|
-
return e[
|
|
171
|
-
postsCollection:
|
|
172
|
-
commentsCollection:
|
|
173
|
-
likesCollection:
|
|
174
|
-
reportsCollection:
|
|
175
|
-
settingsCollection:
|
|
176
|
-
usersCollection:
|
|
173
|
+
return e[A] || (e[A] = o({
|
|
174
|
+
postsCollection: _,
|
|
175
|
+
commentsCollection: v,
|
|
176
|
+
likesCollection: y,
|
|
177
|
+
reportsCollection: b,
|
|
178
|
+
settingsCollection: x,
|
|
179
|
+
usersCollection: S,
|
|
177
180
|
auth: { providers: ["google", "apple"] },
|
|
178
181
|
moderation: {
|
|
179
182
|
enabled: !0,
|
|
@@ -191,10 +194,10 @@ function M() {
|
|
|
191
194
|
defaultOgImage: "",
|
|
192
195
|
basePath: "/board"
|
|
193
196
|
}
|
|
194
|
-
})), e[
|
|
197
|
+
})), e[A];
|
|
195
198
|
}
|
|
196
|
-
function
|
|
197
|
-
let t =
|
|
199
|
+
function M(e) {
|
|
200
|
+
let t = j();
|
|
198
201
|
e.postsCollection != null && e.postsCollection !== "" && (t.postsCollection = e.postsCollection.trim()), e.commentsCollection != null && e.commentsCollection !== "" && (t.commentsCollection = e.commentsCollection.trim()), e.likesCollection != null && e.likesCollection !== "" && (t.likesCollection = e.likesCollection.trim()), e.reportsCollection != null && e.reportsCollection !== "" && (t.reportsCollection = e.reportsCollection.trim()), e.settingsCollection != null && e.settingsCollection !== "" && (t.settingsCollection = e.settingsCollection.trim()), e.usersCollection != null && e.usersCollection !== "" && (t.usersCollection = e.usersCollection.trim()), e.auth && Object.assign(t.auth, e.auth), e.moderation && Object.assign(t.moderation, e.moderation), e.seo && Object.assign(t.seo, e.seo), e.i18n && (t.i18n = {
|
|
199
202
|
...t.i18n,
|
|
200
203
|
...e.i18n
|
|
@@ -206,49 +209,49 @@ function N(e) {
|
|
|
206
209
|
...e.bannerGeneration
|
|
207
210
|
}), e.roleLabels && (t.roleLabels = { ...e.roleLabels }), e.locale && (t.locale = e.locale);
|
|
208
211
|
}
|
|
212
|
+
function N() {
|
|
213
|
+
return j();
|
|
214
|
+
}
|
|
209
215
|
function P() {
|
|
210
|
-
return
|
|
216
|
+
return N().site?.disableAi !== !0;
|
|
211
217
|
}
|
|
212
|
-
function
|
|
213
|
-
|
|
218
|
+
function Se() {
|
|
219
|
+
if (!P()) throw Object.assign(/* @__PURE__ */ Error("AI features are disabled for this board service."), { code: "memi-board/ai-disabled" });
|
|
214
220
|
}
|
|
215
|
-
function
|
|
216
|
-
|
|
221
|
+
function F() {
|
|
222
|
+
let e = N();
|
|
223
|
+
return e.site?.disableI18n !== !0 && e.i18n?.enabled !== !1;
|
|
217
224
|
}
|
|
218
225
|
function I() {
|
|
219
|
-
|
|
220
|
-
return e.site?.disableI18n !== !0 && e.i18n?.enabled !== !1;
|
|
226
|
+
return P() && F() && N().translation?.enabled !== !1;
|
|
221
227
|
}
|
|
222
228
|
function L() {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
let e = f.map((e) => e.code), t = P().site?.locales;
|
|
227
|
-
if (!I() || !t?.length) return e;
|
|
228
|
-
let n = new Set(t.map((e) => g(e)).filter(Boolean)), r = e.filter((e) => n.has(e));
|
|
229
|
+
let e = d.map((e) => e.code), t = N().site?.locales;
|
|
230
|
+
if (!F() || !t?.length) return e;
|
|
231
|
+
let n = new Set(t.map((e) => h(e)).filter(Boolean)), r = e.filter((e) => n.has(e));
|
|
229
232
|
return r.length ? r : e;
|
|
230
233
|
}
|
|
231
|
-
function
|
|
232
|
-
let e =
|
|
233
|
-
return n.length ===
|
|
234
|
+
function R() {
|
|
235
|
+
let e = N(), t = e.site?.locale || e.locale, n = L(), r = h(t);
|
|
236
|
+
return n.length === d.length || r && n.includes(r) ? t : n[0];
|
|
234
237
|
}
|
|
235
|
-
function
|
|
236
|
-
|
|
238
|
+
function Ce(e) {
|
|
239
|
+
N().site = {
|
|
237
240
|
disableAi: e?.disableAi === !0,
|
|
238
241
|
disableI18n: e?.disableI18n === !0,
|
|
239
242
|
locale: typeof e?.locale == "string" && e.locale ? e.locale : void 0,
|
|
240
243
|
locales: Array.isArray(e?.locales) ? e.locales.filter((e) => typeof e == "string") : void 0
|
|
241
244
|
};
|
|
242
245
|
}
|
|
243
|
-
function
|
|
244
|
-
if (!
|
|
246
|
+
function we() {
|
|
247
|
+
if (!I()) throw Object.assign(/* @__PURE__ */ Error("Content translation is disabled for this board service."), { code: "memi-board/translation-disabled" });
|
|
245
248
|
}
|
|
246
|
-
function
|
|
247
|
-
return
|
|
249
|
+
function Te() {
|
|
250
|
+
return C(N());
|
|
248
251
|
}
|
|
249
252
|
//#endregion
|
|
250
253
|
//#region src/i18n/messages/ko/index.ts
|
|
251
|
-
var
|
|
254
|
+
var Ee = {
|
|
252
255
|
accountDeletion: {
|
|
253
256
|
title: "회원 탈퇴",
|
|
254
257
|
intro: "계정과 개인정보를 삭제하려면 탈퇴를 진행해 주세요.",
|
|
@@ -290,7 +293,10 @@ var we = {
|
|
|
290
293
|
strikeRestricted: " 경고 {count}회가 되어 글·댓글 작성이 제한됩니다.",
|
|
291
294
|
notInitialized: "[memi-board] Firebase Auth가 초기화되지 않았습니다."
|
|
292
295
|
},
|
|
293
|
-
authorMemo: {
|
|
296
|
+
authorMemo: {
|
|
297
|
+
tooLong: "메모는 {max}자까지 작성할 수 있습니다.",
|
|
298
|
+
limitReached: "메모는 최대 {max}개까지 남길 수 있습니다. 내 프로필에서 안 쓰는 메모를 지워주세요."
|
|
299
|
+
},
|
|
294
300
|
authorMenu: {
|
|
295
301
|
menu: "작성자 메뉴",
|
|
296
302
|
viewProfile: "프로필 보기",
|
|
@@ -300,7 +306,9 @@ var we = {
|
|
|
300
306
|
memoTitle: "나만 보는 메모",
|
|
301
307
|
memoPlaceholder: "이 작성자에 대해 적어두기…",
|
|
302
308
|
bad: "나쁨",
|
|
303
|
-
good: "좋음"
|
|
309
|
+
good: "좋음",
|
|
310
|
+
myMemosTitle: "내가 남긴 메모",
|
|
311
|
+
myMemosEmpty: "아직 남긴 메모가 없어요. 작성자 이름을 눌러 메모를 남길 수 있어요."
|
|
304
312
|
},
|
|
305
313
|
avatarCropModal: {
|
|
306
314
|
title: "프로필 사진 자르기",
|
|
@@ -1284,8 +1292,8 @@ var we = {
|
|
|
1284
1292
|
custom: "커스텀 스타일로 바꾸기…"
|
|
1285
1293
|
}
|
|
1286
1294
|
}
|
|
1287
|
-
},
|
|
1288
|
-
en: () => import("./en-
|
|
1295
|
+
}, De = {
|
|
1296
|
+
en: () => import("./en-yS55nNno.js"),
|
|
1289
1297
|
ja: () => import("./ja-3SXam5Sk.js"),
|
|
1290
1298
|
de: () => import("./de-CpGJ3KkZ.js"),
|
|
1291
1299
|
fr: () => import("./fr-BFXp_PeM.js"),
|
|
@@ -1294,30 +1302,30 @@ var we = {
|
|
|
1294
1302
|
zh: () => import("./zh-CuOjIYyr.js"),
|
|
1295
1303
|
ar: () => import("./ar-Dg9e1ruU.js"),
|
|
1296
1304
|
id: () => import("./id-B7lgKUHZ.js")
|
|
1297
|
-
},
|
|
1298
|
-
function
|
|
1305
|
+
}, z = "__MEMI_BOARD_I18N__";
|
|
1306
|
+
function B() {
|
|
1299
1307
|
let e = globalThis;
|
|
1300
|
-
return e[
|
|
1301
|
-
messages: { ko:
|
|
1308
|
+
return e[z] ??= {
|
|
1309
|
+
messages: { ko: Ee },
|
|
1302
1310
|
pending: {},
|
|
1303
1311
|
version: s(0)
|
|
1304
|
-
}, e[
|
|
1312
|
+
}, e[z];
|
|
1305
1313
|
}
|
|
1306
|
-
function
|
|
1307
|
-
let t =
|
|
1308
|
-
return t.messages[e] || e === "ko" ? Promise.resolve() : (t.pending[e] ??=
|
|
1314
|
+
function V(e) {
|
|
1315
|
+
let t = B();
|
|
1316
|
+
return t.messages[e] || e === "ko" ? Promise.resolve() : (t.pending[e] ??= De[e]().then((n) => {
|
|
1309
1317
|
t.messages[e] = n.default, t.version.value++;
|
|
1310
1318
|
}).catch((n) => {
|
|
1311
1319
|
delete t.pending[e], console.warn(`[memi-board] failed to load locale "${e}"`, n);
|
|
1312
1320
|
}), t.pending[e]);
|
|
1313
1321
|
}
|
|
1314
|
-
function
|
|
1315
|
-
return e === "ko" ? Promise.resolve() : Promise.all([
|
|
1322
|
+
function H(e) {
|
|
1323
|
+
return e === "ko" ? Promise.resolve() : Promise.all([V(e), V("en")]).then(() => void 0);
|
|
1316
1324
|
}
|
|
1317
|
-
function
|
|
1318
|
-
return !!
|
|
1325
|
+
function Oe(e) {
|
|
1326
|
+
return !!B().messages[e];
|
|
1319
1327
|
}
|
|
1320
|
-
function
|
|
1328
|
+
function U(e, t) {
|
|
1321
1329
|
let n = e;
|
|
1322
1330
|
for (let e of t.split(".")) {
|
|
1323
1331
|
if (!n || typeof n == "string") return;
|
|
@@ -1325,36 +1333,36 @@ function W(e, t) {
|
|
|
1325
1333
|
}
|
|
1326
1334
|
return typeof n == "string" ? n : void 0;
|
|
1327
1335
|
}
|
|
1328
|
-
function
|
|
1336
|
+
function ke(e, t) {
|
|
1329
1337
|
return t ? e.replace(/\{(\w+)\}/g, (e, n) => {
|
|
1330
1338
|
let r = t[n];
|
|
1331
1339
|
return r == null ? e : String(r);
|
|
1332
1340
|
}) : e;
|
|
1333
1341
|
}
|
|
1334
|
-
function
|
|
1335
|
-
let r =
|
|
1342
|
+
function W(e, t, n) {
|
|
1343
|
+
let r = B();
|
|
1336
1344
|
r.version.value;
|
|
1337
|
-
let i = e ?? "ko", a =
|
|
1338
|
-
return a == null ? t :
|
|
1345
|
+
let i = e ?? "ko", a = U(r.messages[i], t) ?? (i === "ko" ? void 0 : U(r.messages.en, t)) ?? U(r.messages.ko, t);
|
|
1346
|
+
return a == null ? t : ke(a, n);
|
|
1339
1347
|
}
|
|
1340
1348
|
//#endregion
|
|
1341
1349
|
//#region src/utils/formatDate.ts
|
|
1342
|
-
function
|
|
1343
|
-
return
|
|
1350
|
+
function G(e) {
|
|
1351
|
+
return g(e ?? "ko").intl;
|
|
1344
1352
|
}
|
|
1345
|
-
function
|
|
1346
|
-
return e?.toDate ? e.toDate().toLocaleDateString(
|
|
1353
|
+
function K(e, t) {
|
|
1354
|
+
return e?.toDate ? e.toDate().toLocaleDateString(G(t)) : "";
|
|
1347
1355
|
}
|
|
1348
|
-
var
|
|
1356
|
+
var Ae = 60, q = 3600, J = 24 * q;
|
|
1349
1357
|
function Y(e, t = Date.now(), n) {
|
|
1350
|
-
if (!e?.toDate) return
|
|
1358
|
+
if (!e?.toDate) return W(n, "common.date.justNow");
|
|
1351
1359
|
let r = Math.max(0, Math.round((t - e.toDate().getTime()) / 1e3));
|
|
1352
|
-
if (r < 45) return
|
|
1353
|
-
let i = new Intl.RelativeTimeFormat(
|
|
1354
|
-
return r < 90 ? i.format(-1, "minute") : r < 2700 ? i.format(-Math.round(r /
|
|
1360
|
+
if (r < 45) return W(n, "common.date.fewSecondsAgo");
|
|
1361
|
+
let i = new Intl.RelativeTimeFormat(G(n), { numeric: "always" }), a = r / J;
|
|
1362
|
+
return r < 90 ? i.format(-1, "minute") : r < 2700 ? i.format(-Math.round(r / Ae), "minute") : r < 5400 ? i.format(-1, "hour") : r < 22 * q ? i.format(-Math.round(r / q), "hour") : r < 36 * q ? i.format(-1, "day") : a < 26 ? i.format(-Math.round(a), "day") : a < 46 ? i.format(-1, "month") : a < 320 ? i.format(-Math.round(a / 30.4), "month") : a < 548 ? i.format(-1, "year") : i.format(-Math.round(a / 365), "year");
|
|
1355
1363
|
}
|
|
1356
1364
|
function X(e, t) {
|
|
1357
|
-
return e?.toDate ? new Intl.DateTimeFormat(
|
|
1365
|
+
return e?.toDate ? new Intl.DateTimeFormat(G(t), {
|
|
1358
1366
|
year: "numeric",
|
|
1359
1367
|
month: "long",
|
|
1360
1368
|
day: "numeric",
|
|
@@ -1362,57 +1370,57 @@ function X(e, t) {
|
|
|
1362
1370
|
minute: "2-digit",
|
|
1363
1371
|
second: "2-digit",
|
|
1364
1372
|
hourCycle: "h23"
|
|
1365
|
-
}).format(e.toDate()) :
|
|
1373
|
+
}).format(e.toDate()) : W(t, "common.date.checking");
|
|
1366
1374
|
}
|
|
1367
1375
|
function Z(e, t, n) {
|
|
1368
1376
|
let r = X(e, n), i = e?.toMillis?.(), a = t?.toMillis?.();
|
|
1369
|
-
return a == null || i == null || i === a ? [r] : [
|
|
1377
|
+
return a == null || i == null || i === a ? [r] : [W(n, "common.date.createdAt", { time: r }), W(n, "common.date.updatedAt", { time: X(t, n) })];
|
|
1370
1378
|
}
|
|
1371
1379
|
//#endregion
|
|
1372
1380
|
//#region src/i18n/useMemiBoardI18n.ts
|
|
1373
1381
|
var Q = "memiBoard:hostLocale", $ = Symbol("memiBoard:boardLocale");
|
|
1374
|
-
function
|
|
1375
|
-
let s = n(),
|
|
1376
|
-
o.boardLocale !== void 0 && s && a($,
|
|
1377
|
-
let
|
|
1382
|
+
function je(o = {}) {
|
|
1383
|
+
let s = n(), l = s ? r($, null) : null, u = s ? r(Q, null) : null, d = N(), f = e(F), p = e(I), m = e(P), _ = e(() => f.value ? h(c(o.boardLocale)) ?? l?.value ?? h(c(u)) ?? h(R()) ?? "ko" : h(R()) ?? "ko");
|
|
1384
|
+
o.boardLocale !== void 0 && s && a($, _), ee(_, (e) => void H(e), { immediate: !0 }), t() && i(() => H(_.value));
|
|
1385
|
+
let v = e(() => g(_.value));
|
|
1378
1386
|
return {
|
|
1379
|
-
locale:
|
|
1380
|
-
i18nEnabled:
|
|
1381
|
-
translationEnabled:
|
|
1382
|
-
aiEnabled:
|
|
1383
|
-
dir: e(() =>
|
|
1384
|
-
intlLocale: e(() =>
|
|
1387
|
+
locale: _,
|
|
1388
|
+
i18nEnabled: f,
|
|
1389
|
+
translationEnabled: p,
|
|
1390
|
+
aiEnabled: m,
|
|
1391
|
+
dir: e(() => v.value.dir),
|
|
1392
|
+
intlLocale: e(() => v.value.intl),
|
|
1385
1393
|
t: (e, t) => {
|
|
1386
1394
|
let n = e.startsWith("common.role.") ? e.slice(12) : "";
|
|
1387
|
-
return
|
|
1395
|
+
return d.roleLabels?.[n] ?? W(_.value, e, t);
|
|
1388
1396
|
},
|
|
1389
|
-
formatDate: (e) =>
|
|
1390
|
-
formatFullDate: (e) => X(e,
|
|
1391
|
-
formatRelativeDate: (e, t) => Y(e, t,
|
|
1392
|
-
formatTimestampDetails: (e, t) => Z(e, t,
|
|
1393
|
-
formatNumber: (e) => e.toLocaleString(
|
|
1397
|
+
formatDate: (e) => K(e, _.value),
|
|
1398
|
+
formatFullDate: (e) => X(e, _.value),
|
|
1399
|
+
formatRelativeDate: (e, t) => Y(e, t, _.value),
|
|
1400
|
+
formatTimestampDetails: (e, t) => Z(e, t, _.value),
|
|
1401
|
+
formatNumber: (e) => e.toLocaleString(v.value.intl)
|
|
1394
1402
|
};
|
|
1395
1403
|
}
|
|
1396
1404
|
//#endregion
|
|
1397
1405
|
//#region src/utils/slugify.ts
|
|
1398
|
-
var
|
|
1399
|
-
function
|
|
1406
|
+
var Me = 40;
|
|
1407
|
+
function Ne(e) {
|
|
1400
1408
|
return e.trim().replace(/\s+/g, "-").replace(/[^a-zA-Z0-9가-힣ㄱ-ㅎㅏ-ㅣ-]/g, "").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
|
|
1401
1409
|
}
|
|
1402
|
-
function
|
|
1410
|
+
function Pe(e, t = 60) {
|
|
1403
1411
|
return e.replace(/[^a-zA-Z0-9가-힣ㄱ-ㅎ._-]/g, "-").slice(0, t);
|
|
1404
1412
|
}
|
|
1405
1413
|
//#endregion
|
|
1406
1414
|
//#region src/utils/commentImages.ts
|
|
1407
|
-
var
|
|
1415
|
+
var Fe = /* @__PURE__ */ new Set([
|
|
1408
1416
|
"image/jpeg",
|
|
1409
1417
|
"image/png",
|
|
1410
1418
|
"image/gif",
|
|
1411
1419
|
"image/webp"
|
|
1412
1420
|
]);
|
|
1413
|
-
function
|
|
1421
|
+
function Ie(e) {
|
|
1414
1422
|
let t = (e.type || "").toLowerCase();
|
|
1415
|
-
if (
|
|
1423
|
+
if (Fe.has(t)) return !0;
|
|
1416
1424
|
let n = e.name.toLowerCase();
|
|
1417
1425
|
return [
|
|
1418
1426
|
".jpg",
|
|
@@ -1422,7 +1430,7 @@ function Fe(e) {
|
|
|
1422
1430
|
".webp"
|
|
1423
1431
|
].some((e) => n.endsWith(e));
|
|
1424
1432
|
}
|
|
1425
|
-
function
|
|
1433
|
+
function Le(e) {
|
|
1426
1434
|
if (!e?.length) return [];
|
|
1427
1435
|
for (let t of e) if (t?.name && t.url?.startsWith("https://") && t.path && !t.path.includes("..") && t.type?.startsWith("image/") && !(!Number.isFinite(t.size) || t.size <= 0)) return [{
|
|
1428
1436
|
name: t.name.slice(0, 200),
|
|
@@ -1433,7 +1441,7 @@ function Ie(e) {
|
|
|
1433
1441
|
}];
|
|
1434
1442
|
return [];
|
|
1435
1443
|
}
|
|
1436
|
-
function
|
|
1444
|
+
function Re(e, t) {
|
|
1437
1445
|
let n = t.endsWith("/") ? t : `${t}/`;
|
|
1438
1446
|
if (!Array.isArray(e)) return [];
|
|
1439
1447
|
let r = /* @__PURE__ */ new Set();
|
|
@@ -1445,6 +1453,6 @@ function Le(e, t) {
|
|
|
1445
1453
|
return [...r];
|
|
1446
1454
|
}
|
|
1447
1455
|
//#endregion
|
|
1448
|
-
export {
|
|
1456
|
+
export { re as $, b as A, me as B, R as C, v as D, N as E, k as F, de as G, w as H, _e as I, ae as J, E as K, ve as L, S as M, ye as N, y as O, be as P, xe as Q, ge as R, I as S, Te as T, ue as U, O as V, ce as W, se as X, ie as Y, oe as Z, Se as _, Pe as a, te as at, P as b, je as c, p as ct, Y as d, h as dt, pe as et, Z as f, Ce as g, W as h, Me as i, C as it, x as j, _ as k, K as l, d as lt, H as m, Ie as n, D as nt, Ne as o, ne as ot, Oe as p, T as q, Le as r, fe as rt, Q as s, f as st, Re as t, he as tt, X as u, g as ut, we as v, L as w, F as x, M as y, le as z };
|
|
1449
1457
|
|
|
1450
|
-
//# sourceMappingURL=commentImages-
|
|
1458
|
+
//# sourceMappingURL=commentImages-DHIuwvex.js.map
|