memi-board 0.63.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.
@@ -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 l } from "vue";
2
- import { collection as u, doc as d } from "firebase/firestore";
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 f = [
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
- ], p = "ko", m = "en", h = new Set(f.map((e) => e.code));
66
- function g(e) {
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 && h.has(t) ? t : void 0;
69
+ return t && m.has(t) ? t : void 0;
70
70
  }
71
- function _(e) {
72
- return f.find((t) => t.code === e) ?? f[0];
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 v = "memiBoardPosts", y = "memiBoardComments", b = "memiBoardLikes", x = "memiBoardReports", S = "memiBoardSettings", C = "memiBoardUsers";
77
- function w(e) {
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 ee(e, t) {
88
- return u(e, t.settingsCollection);
87
+ function te(e, t) {
88
+ return l(e, t.settingsCollection);
89
89
  }
90
- function te(e, t, n) {
91
- return d(e, t.settingsCollection, n);
90
+ function ne(e, t, n) {
91
+ return u(e, t.settingsCollection, n);
92
92
  }
93
- function ne(e, t) {
94
- return u(e, t.postsCollection);
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 d(e, t.postsCollection, n, "body", "main");
97
+ return u(e, t.postsCollection, n);
101
98
  }
102
99
  function ae(e, t, n) {
103
- return u(e, t.postsCollection, n, "revisions");
100
+ return u(e, t.postsCollection, n, "body", "main");
104
101
  }
105
- function oe(e, t, n, r) {
106
- return d(e, t.postsCollection, n, "revisions", String(r));
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.commentsCollection);
105
+ function se(e, t, n, r) {
106
+ return u(e, t.postsCollection, n, "revisions", String(r));
110
107
  }
111
- function ce(e, t, n) {
112
- return d(e, t.commentsCollection, n);
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, "revisions");
112
+ return u(e, t.commentsCollection, n);
116
113
  }
117
- function T(e, t, n, r) {
118
- return d(e, t.commentsCollection, n, "revisions", String(r));
114
+ function ue(e, t, n) {
115
+ return l(e, t.commentsCollection, n, "revisions");
119
116
  }
120
- function E(e, t) {
121
- return u(e, t.likesCollection);
117
+ function w(e, t, n, r) {
118
+ return u(e, t.commentsCollection, n, "revisions", String(r));
122
119
  }
123
- function D(e, t) {
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 ue(e, t, n, r) {
127
- return d(e, t.likesCollection, D(n, r));
126
+ function de(e, t, n, r) {
127
+ return u(e, t.likesCollection, E(n, r));
128
128
  }
129
- function de(e, t) {
130
- return u(e, t.reportsCollection);
129
+ function fe(e, t) {
130
+ return l(e, t.reportsCollection);
131
131
  }
132
- function O(e, t) {
132
+ function D(e, t) {
133
133
  return `${e}_${t}`;
134
134
  }
135
- function fe(e, t, n, r) {
136
- return d(e, t.reportsCollection, O(n, r));
135
+ function pe(e, t, n, r) {
136
+ return u(e, t.reportsCollection, D(n, r));
137
137
  }
138
- function k(e, t) {
138
+ function O(e, t) {
139
139
  return `c_${e}_${t}`;
140
140
  }
141
- function pe(e, t, n, r) {
142
- return d(e, t.reportsCollection, k(n, r));
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 A(e, t, n) {
145
- return d(e, t.reportsCollection, n);
147
+ function ge(e, t) {
148
+ return l(e, t.usersCollection);
146
149
  }
147
- function me(e, t) {
148
- return u(e, t.usersCollection);
150
+ function _e(e, t, n) {
151
+ return u(e, t.usersCollection, n);
149
152
  }
150
- function he(e, t, n) {
151
- return d(e, t.usersCollection, n);
153
+ function ve(e, t, n) {
154
+ return u(e, t.usersCollection, n, "private", "info");
152
155
  }
153
- function ge(e, t, n) {
154
- return d(e, t.usersCollection, n, "private", "info");
156
+ function ye(e, t, n, r) {
157
+ return u(e, t.usersCollection, n, "memos", r);
155
158
  }
156
- function _e(e, t, n, r) {
157
- return d(e, t.usersCollection, n, "memos", r);
159
+ function be(e, t, n) {
160
+ return l(e, t.usersCollection, n, "memos");
158
161
  }
159
- function ve(e, t) {
162
+ function xe(e, t) {
160
163
  return `${e.postsCollection}/${t}`;
161
164
  }
162
- function ye(e, t) {
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 j = "__MEMI_BOARD_CONFIG__";
168
- function M() {
170
+ var A = "__MEMI_BOARD_CONFIG__";
171
+ function j() {
169
172
  let e = globalThis;
170
- return e[j] || (e[j] = o({
171
- postsCollection: v,
172
- commentsCollection: y,
173
- likesCollection: b,
174
- reportsCollection: x,
175
- settingsCollection: S,
176
- usersCollection: C,
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[j];
197
+ })), e[A];
195
198
  }
196
- function N(e) {
197
- let t = M();
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 M();
216
+ return N().site?.disableAi !== !0;
211
217
  }
212
- function F() {
213
- return P().site?.disableAi !== !0;
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 be() {
216
- if (!F()) throw Object.assign(/* @__PURE__ */ Error("AI features are disabled for this board service."), { code: "memi-board/ai-disabled" });
221
+ function F() {
222
+ let e = N();
223
+ return e.site?.disableI18n !== !0 && e.i18n?.enabled !== !1;
217
224
  }
218
225
  function I() {
219
- let e = P();
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
- return F() && I() && P().translation?.enabled !== !1;
224
- }
225
- function R() {
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 z() {
232
- let e = P(), t = e.site?.locale || e.locale, n = R(), r = g(t);
233
- return n.length === f.length || r && n.includes(r) ? t : n[0];
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 xe(e) {
236
- P().site = {
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 Se() {
244
- if (!L()) throw Object.assign(/* @__PURE__ */ Error("Content translation is disabled for this board service."), { code: "memi-board/translation-disabled" });
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 Ce() {
247
- return w(P());
249
+ function Te() {
250
+ return C(N());
248
251
  }
249
252
  //#endregion
250
253
  //#region src/i18n/messages/ko/index.ts
251
- var we = {
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: { tooLong: "메모는 {max}자까지 작성할 수 있습니다." },
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
- }, Te = {
1288
- en: () => import("./en-I7auZHra.js"),
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
- }, B = "__MEMI_BOARD_I18N__";
1298
- function V() {
1305
+ }, z = "__MEMI_BOARD_I18N__";
1306
+ function B() {
1299
1307
  let e = globalThis;
1300
- return e[B] ??= {
1301
- messages: { ko: we },
1308
+ return e[z] ??= {
1309
+ messages: { ko: Ee },
1302
1310
  pending: {},
1303
1311
  version: s(0)
1304
- }, e[B];
1312
+ }, e[z];
1305
1313
  }
1306
- function H(e) {
1307
- let t = V();
1308
- return t.messages[e] || e === "ko" ? Promise.resolve() : (t.pending[e] ??= Te[e]().then((n) => {
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 U(e) {
1315
- return e === "ko" ? Promise.resolve() : Promise.all([H(e), H("en")]).then(() => void 0);
1322
+ function H(e) {
1323
+ return e === "ko" ? Promise.resolve() : Promise.all([V(e), V("en")]).then(() => void 0);
1316
1324
  }
1317
- function Ee(e) {
1318
- return !!V().messages[e];
1325
+ function Oe(e) {
1326
+ return !!B().messages[e];
1319
1327
  }
1320
- function W(e, t) {
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 De(e, t) {
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 G(e, t, n) {
1335
- let r = V();
1342
+ function W(e, t, n) {
1343
+ let r = B();
1336
1344
  r.version.value;
1337
- let i = e ?? "ko", a = W(r.messages[i], t) ?? (i === "ko" ? void 0 : W(r.messages.en, t)) ?? W(r.messages.ko, t);
1338
- return a == null ? t : De(a, n);
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 K(e) {
1343
- return _(e ?? "ko").intl;
1350
+ function G(e) {
1351
+ return g(e ?? "ko").intl;
1344
1352
  }
1345
- function q(e, t) {
1346
- return e?.toDate ? e.toDate().toLocaleDateString(K(t)) : "";
1353
+ function K(e, t) {
1354
+ return e?.toDate ? e.toDate().toLocaleDateString(G(t)) : "";
1347
1355
  }
1348
- var Oe = 60, J = 3600, ke = 24 * J;
1356
+ var Ae = 60, q = 3600, J = 24 * q;
1349
1357
  function Y(e, t = Date.now(), n) {
1350
- if (!e?.toDate) return G(n, "common.date.justNow");
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 G(n, "common.date.fewSecondsAgo");
1353
- let i = new Intl.RelativeTimeFormat(K(n), { numeric: "always" }), a = r / ke;
1354
- return r < 90 ? i.format(-1, "minute") : r < 2700 ? i.format(-Math.round(r / Oe), "minute") : r < 5400 ? i.format(-1, "hour") : r < 22 * J ? i.format(-Math.round(r / J), "hour") : r < 36 * J ? 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");
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(K(t), {
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()) : G(t, "common.date.checking");
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] : [G(n, "common.date.createdAt", { time: r }), G(n, "common.date.updatedAt", { time: X(t, n) })];
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 Ae(o = {}) {
1375
- let s = n(), u = s ? r($, null) : null, d = s ? r(Q, null) : null, f = P(), p = e(I), m = e(L), h = e(F), v = e(() => p.value ? g(c(o.boardLocale)) ?? u?.value ?? g(c(d)) ?? g(z()) ?? "ko" : g(z()) ?? "ko");
1376
- o.boardLocale !== void 0 && s && a($, v), l(v, (e) => void U(e), { immediate: !0 }), t() && i(() => U(v.value));
1377
- let y = e(() => _(v.value));
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: v,
1380
- i18nEnabled: p,
1381
- translationEnabled: m,
1382
- aiEnabled: h,
1383
- dir: e(() => y.value.dir),
1384
- intlLocale: e(() => y.value.intl),
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 f.roleLabels?.[n] ?? G(v.value, e, t);
1395
+ return d.roleLabels?.[n] ?? W(_.value, e, t);
1388
1396
  },
1389
- formatDate: (e) => q(e, v.value),
1390
- formatFullDate: (e) => X(e, v.value),
1391
- formatRelativeDate: (e, t) => Y(e, t, v.value),
1392
- formatTimestampDetails: (e, t) => Z(e, t, v.value),
1393
- formatNumber: (e) => e.toLocaleString(y.value.intl)
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 je = 40;
1399
- function Me(e) {
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 Ne(e, t = 60) {
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 Pe = /* @__PURE__ */ new Set([
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 Fe(e) {
1421
+ function Ie(e) {
1414
1422
  let t = (e.type || "").toLowerCase();
1415
- if (Pe.has(t)) return !0;
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 Ie(e) {
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 Le(e, t) {
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 { fe as $, x as A, k as B, z as C, y as D, P as E, he as F, D as G, le as H, ge as I, re as J, E as K, me as L, C as M, _e as N, b as O, ye as P, ne as Q, ce as R, L as S, Ce as T, se as U, T as V, ue as W, ae as X, oe as Y, ve as Z, be as _, Ne as a, te as at, F as b, Ae as c, f as ct, Y as d, A as et, Z as f, xe as g, G as h, je as i, ee as it, S as j, v as k, q as l, _ as lt, U as m, Fe as n, de as nt, Me as o, p as ot, Ee as p, ie as q, Ie as r, w as rt, Q as s, m as st, Le as t, O as tt, X as u, g as ut, Se as v, R as w, I as x, N as y, pe as z };
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-xb5Y4ySe.js.map
1458
+ //# sourceMappingURL=commentImages-DHIuwvex.js.map