@editora/core 1.0.7 → 1.0.8

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.
Files changed (34) hide show
  1. package/LICENSE +21 -0
  2. package/dist/ApprovalWorkflowPlugin.native-C3jtAYjG.mjs +1076 -0
  3. package/dist/BlocksLibraryPlugin.native-HMWKxWNs.mjs +1327 -0
  4. package/dist/CitationsPlugin.native-BnU0qCwR.mjs +1464 -0
  5. package/dist/ConditionalContentPlugin.native-CfhY46rU.mjs +1367 -0
  6. package/dist/ContentRulesPlugin.native-nBLQ8QFZ.mjs +1099 -0
  7. package/dist/DataBindingPlugin.native-jQ1JPRTp.mjs +917 -0
  8. package/dist/DocSchemaPlugin.native-CHOge18O.mjs +1325 -0
  9. package/dist/MentionPlugin.native-BMDlOqur.mjs +734 -0
  10. package/dist/PIIRedactionPlugin.native-DcsjmtV1.mjs +1396 -0
  11. package/dist/{PageBreakPlugin.native-CXdX5fAv.mjs → PageBreakPlugin.native-DijGuHJZ.mjs} +37 -37
  12. package/dist/{PreviewPlugin.native-DBvfpmIv.mjs → PreviewPlugin.native-WuIwOAOR.mjs} +30 -30
  13. package/dist/SlashCommandsPlugin.native-CmxvMEaE.mjs +755 -0
  14. package/dist/SmartPastePlugin.native-BOKKtF07.mjs +1398 -0
  15. package/dist/TrackChangesPlugin.native-Bghu2q4a.mjs +761 -0
  16. package/dist/TranslationWorkflowPlugin.native-Bz6jDGvj.mjs +1728 -0
  17. package/dist/VersionDiffPlugin.native-Bvxgy--t.mjs +776 -0
  18. package/dist/editora.min.js +13 -13
  19. package/dist/editora.umd.js +13 -13
  20. package/dist/index-D1LOqg5C.js +10 -0
  21. package/dist/{index-yzU4NdPT.mjs → index-DqC57IEH.mjs} +424 -331
  22. package/dist/index.cjs.js +1 -1
  23. package/dist/index.esm.js +2 -2
  24. package/dist/plugin-loader.js +77 -40
  25. package/dist/webcomponent-core.js +479 -386
  26. package/dist/webcomponent-core.min.css +1 -1
  27. package/dist/webcomponent-core.min.js +39 -39
  28. package/dist/webcomponent.cjs.js +1 -1
  29. package/dist/webcomponent.esm.js +1 -1
  30. package/dist/webcomponent.js +417 -287
  31. package/dist/webcomponent.min.css +1 -1
  32. package/dist/webcomponent.min.js +5664 -394
  33. package/package.json +2 -2
  34. package/dist/index-BpE6GFbz.js +0 -10
@@ -0,0 +1,1076 @@
1
+ const w = ".rte-content, .editora-content", F = "[data-editora-editor], .rte-editor, .editora-editor, editora-editor", ee = "__editoraCommandEditorRoot", te = "rte-approval-workflow-styles", d = "rte-approval-panel", h = "approval", y = "approvalWorkflow", v = ':is([data-theme="dark"], .dark, .editora-theme-dark, .rte-theme-dark)', ue = {
2
+ panelTitle: "Approval Workflow",
3
+ panelAriaLabel: "Approval workflow panel",
4
+ statusLabel: "Status",
5
+ statusDraftText: "Draft",
6
+ statusReviewText: "In Review",
7
+ statusApprovedText: "Approved",
8
+ requestReviewText: "Request Review",
9
+ approveText: "Approve",
10
+ reopenDraftText: "Reopen Draft",
11
+ addCommentText: "Add Comment",
12
+ actorLabel: "Actor",
13
+ actorPlaceholder: "Reviewer name",
14
+ commentLabel: "Comment",
15
+ commentPlaceholder: "Add review note or sign-off context",
16
+ closeText: "Close",
17
+ commentsHeading: "Comments",
18
+ signoffsHeading: "Sign-offs",
19
+ noCommentsText: "No comments yet.",
20
+ noSignoffsText: "No sign-offs yet.",
21
+ summaryPrefix: "Workflow",
22
+ lockedSuffix: "Locked",
23
+ shortcutText: "Shortcuts: Ctrl/Cmd+Alt+Shift+A/R/P/D",
24
+ approveCommentRequiredText: "Approval comment is required."
25
+ }, fe = {
26
+ draft: "statusDraftText",
27
+ review: "statusReviewText",
28
+ approved: "statusApprovedText"
29
+ }, p = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new Set();
30
+ let _ = 0, me = 0, oe = 0, re = 0, R = null, g = null, T = null, L = null, S = null;
31
+ function c(e) {
32
+ return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
33
+ }
34
+ function be(e) {
35
+ return e.replace(/\u00A0/g, " ").replace(/\s+/g, " ").trim();
36
+ }
37
+ function ne(e) {
38
+ return e === "review" || e === "approved" ? e : "draft";
39
+ }
40
+ function z(e = {}) {
41
+ var t;
42
+ return {
43
+ defaultStatus: ne(e.defaultStatus),
44
+ lockOnApproval: e.lockOnApproval !== !1,
45
+ maxHistoryEntries: Math.max(10, Math.min(500, Number((t = e.maxHistoryEntries) != null ? t : 120))),
46
+ requireCommentOnApprove: !!e.requireCommentOnApprove,
47
+ defaultActor: (e.defaultActor || "system").trim() || "system",
48
+ labels: {
49
+ ...ue,
50
+ ...e.labels || {}
51
+ },
52
+ normalizeText: e.normalizeText || be
53
+ };
54
+ }
55
+ function U(e) {
56
+ return e.closest(F) || e;
57
+ }
58
+ function B(e) {
59
+ if (!e) return null;
60
+ if (e.matches(w)) return e;
61
+ const t = e.querySelector(w);
62
+ return t instanceof HTMLElement ? t : null;
63
+ }
64
+ function ve() {
65
+ if (typeof window == "undefined") return null;
66
+ const e = window[ee];
67
+ if (!(e instanceof HTMLElement)) return null;
68
+ window[ee] = null;
69
+ const t = B(e);
70
+ if (t) return t;
71
+ const o = e.closest(F);
72
+ if (o) {
73
+ const a = B(o);
74
+ if (a) return a;
75
+ }
76
+ return null;
77
+ }
78
+ function ge(e) {
79
+ const t = e.closest("[data-editora-editor]");
80
+ if (t && B(t) === e)
81
+ return t;
82
+ let o = e;
83
+ for (; o; ) {
84
+ if (o.matches(F) && (o === e || B(o) === e))
85
+ return o;
86
+ o = o.parentElement;
87
+ }
88
+ return U(e);
89
+ }
90
+ function W(e) {
91
+ return e ? (e.getAttribute("data-theme") || e.getAttribute("theme") || "").toLowerCase() === "dark" ? !0 : e.classList.contains("dark") || e.classList.contains("editora-theme-dark") || e.classList.contains("rte-theme-dark") : !1;
92
+ }
93
+ function he(e) {
94
+ const t = U(e);
95
+ if (W(t)) return !0;
96
+ const o = t.closest("[data-theme], [theme], .dark, .editora-theme-dark, .rte-theme-dark");
97
+ return W(o) ? !0 : W(document.documentElement) || W(document.body);
98
+ }
99
+ function K(e, t) {
100
+ e.classList.remove("rte-approval-theme-dark"), he(t) && e.classList.add("rte-approval-theme-dark");
101
+ }
102
+ function le(e) {
103
+ return e ? e.nodeType === Node.ELEMENT_NODE ? e : e.parentElement : null;
104
+ }
105
+ function x(e, t = !0) {
106
+ if (D(), (e == null ? void 0 : e.contentElement) instanceof HTMLElement) return e.contentElement;
107
+ if ((e == null ? void 0 : e.editorElement) instanceof HTMLElement) {
108
+ const n = e.editorElement;
109
+ if (n.matches(w)) return n;
110
+ const l = n.querySelector(w);
111
+ if (l instanceof HTMLElement) return l;
112
+ }
113
+ const o = ve();
114
+ if (o) return o;
115
+ const a = window.getSelection();
116
+ if (a && a.rangeCount > 0) {
117
+ const n = le(a.getRangeAt(0).startContainer), l = n == null ? void 0 : n.closest(w);
118
+ if (l) return l;
119
+ }
120
+ const r = document.activeElement;
121
+ if (r) {
122
+ if (r.matches(w)) return r;
123
+ const n = r.closest(w);
124
+ if (n) return n;
125
+ }
126
+ return g && g.isConnected ? g : (g && !g.isConnected && (g = null), t ? document.querySelector(w) : null);
127
+ }
128
+ function D() {
129
+ Array.from(H).forEach((t) => {
130
+ var o;
131
+ t.isConnected || ((o = k.get(t)) == null || o.remove(), k.delete(t), O.delete(t), p.delete(t), I.delete(t), H.delete(t), g === t && (g = null));
132
+ });
133
+ }
134
+ function xe(e) {
135
+ return e ? !!(e.closest(`.${d}`) || e.closest(w) || e.closest(F)) : !1;
136
+ }
137
+ function we() {
138
+ const e = window.getSelection();
139
+ if (!e || e.rangeCount === 0) return !1;
140
+ const t = e.getRangeAt(0).startContainer, o = le(t);
141
+ return !!(o != null && o.closest(w));
142
+ }
143
+ function C(e, t, o) {
144
+ const a = ge(e);
145
+ Array.from(
146
+ a.querySelectorAll(
147
+ `.rte-toolbar-button[data-command="${t}"], .editora-toolbar-button[data-command="${t}"]`
148
+ )
149
+ ).forEach((n) => {
150
+ n.classList.toggle("active", o), n.setAttribute("aria-pressed", o ? "true" : "false"), n.setAttribute("data-active", o ? "true" : "false");
151
+ });
152
+ }
153
+ function ie(e, t, o) {
154
+ t !== null ? e.setAttribute("contenteditable", t) : e.setAttribute("contenteditable", "true"), o !== null ? e.setAttribute("data-readonly", o) : e.removeAttribute("data-readonly");
155
+ }
156
+ function Y(e) {
157
+ e.dispatchEvent(new Event("input", { bubbles: !0 }));
158
+ }
159
+ function X(e, t) {
160
+ if (t === e.innerHTML) return;
161
+ const o = window.execEditorCommand || window.executeEditorCommand;
162
+ if (typeof o == "function")
163
+ try {
164
+ o("recordDomTransaction", e, t, e.innerHTML);
165
+ } catch (a) {
166
+ }
167
+ }
168
+ function J() {
169
+ return oe += 1, `approval-comment-${Date.now().toString(36)}-${oe.toString(36)}`;
170
+ }
171
+ function ke() {
172
+ return re += 1, `approval-signoff-${Date.now().toString(36)}-${re.toString(36)}`;
173
+ }
174
+ function se(e) {
175
+ return {
176
+ status: e.status,
177
+ locked: e.locked,
178
+ comments: e.comments.map((t) => ({ ...t })),
179
+ signoffs: e.signoffs.map((t) => ({ ...t })),
180
+ updatedAt: e.updatedAt
181
+ };
182
+ }
183
+ function ye(e, t) {
184
+ const o = fe[e];
185
+ return t.labels[o] || e;
186
+ }
187
+ function pe(e, t, o) {
188
+ var a, r;
189
+ if (e.setAttribute("data-approval-status", t.status), e.setAttribute("data-approval-locked", t.locked ? "true" : "false"), e.classList.toggle("rte-approval-locked-editor", t.locked), C(e, "toggleApprovalWorkflowPanel", Z(e)), C(e, "requestApprovalReview", t.status === "review"), C(e, "approveDocument", t.status === "approved"), C(e, "reopenDraft", t.status === "draft"), t.status === "approved" && o.lockOnApproval) {
190
+ t.locked || (t.preApprovalContentEditable = e.getAttribute("contenteditable"), t.preApprovalReadonly = e.getAttribute("data-readonly")), e.setAttribute("contenteditable", "false"), e.setAttribute("data-readonly", "true"), t.locked = !0;
191
+ return;
192
+ }
193
+ t.locked = !1, ie(
194
+ e,
195
+ (a = t.preApprovalContentEditable) != null ? a : t.originalContentEditable,
196
+ (r = t.preApprovalReadonly) != null ? r : t.originalReadonly
197
+ ), t.preApprovalContentEditable = null, t.preApprovalReadonly = null;
198
+ }
199
+ function f(e, t) {
200
+ let o = I.get(e);
201
+ return o || (o = {
202
+ status: t.defaultStatus,
203
+ locked: !1,
204
+ comments: [],
205
+ signoffs: [],
206
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
207
+ originalContentEditable: e.getAttribute("contenteditable"),
208
+ originalReadonly: e.getAttribute("data-readonly"),
209
+ preApprovalContentEditable: null,
210
+ preApprovalReadonly: null
211
+ }, I.set(e, o), H.add(e), pe(e, o, t), o);
212
+ }
213
+ function j(e, t) {
214
+ return e.length <= t ? e : e.slice(e.length - t);
215
+ }
216
+ function M(e, t) {
217
+ const o = e.querySelector(".rte-approval-live");
218
+ o && (o.textContent = t);
219
+ }
220
+ function Ae(e, t) {
221
+ const o = se(t);
222
+ e.__approvalWorkflowState = o, e.dispatchEvent(
223
+ new CustomEvent("editora:approval-state-changed", {
224
+ bubbles: !0,
225
+ detail: {
226
+ state: o
227
+ }
228
+ })
229
+ );
230
+ }
231
+ function q(e) {
232
+ const t = k.get(e);
233
+ if (!t) return;
234
+ const o = p.get(e) || R;
235
+ if (!o) return;
236
+ const a = f(e, o), r = t.querySelector(".rte-approval-summary"), n = t.querySelector('[data-action="request-review"]'), l = t.querySelector('[data-action="approve"]'), s = t.querySelector('[data-action="reopen-draft"]'), u = t.querySelector(".rte-approval-comments-list"), m = t.querySelector(".rte-approval-signoffs-list");
237
+ if (r) {
238
+ const i = ye(a.status, o);
239
+ r.textContent = `${o.labels.summaryPrefix}: ${i} | Comments: ${a.comments.length} | Sign-offs: ${a.signoffs.length}${a.locked ? ` | ${o.labels.lockedSuffix}` : ""}`;
240
+ }
241
+ n && (n.disabled = a.status !== "draft"), l && (l.disabled = a.status === "approved"), s && (s.disabled = a.status === "draft"), u && (a.comments.length === 0 ? u.innerHTML = `<li class="rte-approval-empty">${c(o.labels.noCommentsText)}</li>` : u.innerHTML = a.comments.slice().reverse().map(
242
+ (i) => `
243
+ <li class="rte-approval-item rte-approval-item-${i.kind}" role="listitem">
244
+ <div class="rte-approval-item-head">
245
+ <span class="rte-approval-item-author">${c(i.author)}</span>
246
+ <time class="rte-approval-item-time" datetime="${c(i.createdAt)}">${c(
247
+ new Date(i.createdAt).toLocaleString()
248
+ )}</time>
249
+ </div>
250
+ <p class="rte-approval-item-message">${c(i.message)}</p>
251
+ </li>
252
+ `
253
+ ).join("")), m && (a.signoffs.length === 0 ? m.innerHTML = `<li class="rte-approval-empty">${c(o.labels.noSignoffsText)}</li>` : m.innerHTML = a.signoffs.slice().reverse().map(
254
+ (i) => `
255
+ <li class="rte-approval-item" role="listitem">
256
+ <div class="rte-approval-item-head">
257
+ <span class="rte-approval-item-author">${c(i.author)}</span>
258
+ <time class="rte-approval-item-time" datetime="${c(i.createdAt)}">${c(
259
+ new Date(i.createdAt).toLocaleString()
260
+ )}</time>
261
+ </div>
262
+ <p class="rte-approval-item-message">${c(i.comment || "Approved")}</p>
263
+ </li>
264
+ `
265
+ ).join(""));
266
+ }
267
+ function G(e, t, o) {
268
+ t.updatedAt = (/* @__PURE__ */ new Date()).toISOString(), pe(e, t, o), q(e), Ae(e, t);
269
+ }
270
+ function ae(e, t, o, a) {
271
+ e.comments.push({
272
+ id: J(),
273
+ author: o || t.defaultActor,
274
+ message: a,
275
+ kind: "system",
276
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
277
+ }), e.comments = j(e.comments, t.maxHistoryEntries);
278
+ }
279
+ function E(e, t, o, a) {
280
+ const r = f(e, o);
281
+ if (r.status === t) return !1;
282
+ const n = e.innerHTML;
283
+ return r.status = t, t === "review" ? ae(r, o, a, "Review requested.") : t === "draft" && ae(r, o, a, "Returned to draft."), G(e, r, o), Y(e), X(e, n), !0;
284
+ }
285
+ function ce(e, t, o, a) {
286
+ const r = a.normalizeText(t);
287
+ if (!r) return !1;
288
+ const n = a.normalizeText(o) || a.defaultActor, l = f(e, a), s = e.innerHTML;
289
+ return l.comments.push({
290
+ id: J(),
291
+ author: n,
292
+ message: r,
293
+ kind: "comment",
294
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
295
+ }), l.comments = j(l.comments, a.maxHistoryEntries), G(e, l, a), Y(e), X(e, s), !0;
296
+ }
297
+ function Q(e, t, o, a) {
298
+ const r = t.normalizeText(o) || t.defaultActor, n = t.normalizeText(a);
299
+ if (t.requireCommentOnApprove && !n) return !1;
300
+ const l = f(e, t), s = e.innerHTML;
301
+ return l.status = "approved", l.signoffs.push({
302
+ id: ke(),
303
+ author: r,
304
+ comment: n || void 0,
305
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
306
+ }), l.signoffs = j(l.signoffs, t.maxHistoryEntries), n && (l.comments.push({
307
+ id: J(),
308
+ author: r,
309
+ message: n,
310
+ kind: "system",
311
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
312
+ }), l.comments = j(l.comments, t.maxHistoryEntries)), G(e, l, t), Y(e), X(e, s), !0;
313
+ }
314
+ function N(e, t) {
315
+ return e.querySelector(`[data-field="${t}"]`);
316
+ }
317
+ function Se(e) {
318
+ var a, r;
319
+ const t = ((a = N(e, "actor")) == null ? void 0 : a.value) || "", o = ((r = N(e, "comment")) == null ? void 0 : r.value) || "";
320
+ return { actor: t, comment: o };
321
+ }
322
+ function V(e, t) {
323
+ if (!t.classList.contains("show")) return;
324
+ const a = U(e).getBoundingClientRect(), r = Math.min(window.innerWidth - 20, 420), n = Math.max(10, window.innerWidth - r - 10), l = Math.min(Math.max(10, a.right - r), n), s = Math.max(10, Math.min(window.innerHeight - 10 - 280, a.top + 12));
325
+ t.style.width = `${r}px`, t.style.left = `${l}px`, t.style.top = `${s}px`, t.style.maxHeight = `${Math.max(280, window.innerHeight - 24)}px`;
326
+ }
327
+ function $e(e) {
328
+ const t = k.get(e);
329
+ if (t) return t;
330
+ const o = p.get(e) || R || z(), a = `rte-approval-panel-${me++}`, r = document.createElement("section");
331
+ return r.className = d, r.id = a, r.setAttribute("role", "dialog"), r.setAttribute("aria-modal", "false"), r.setAttribute("aria-label", o.labels.panelAriaLabel), r.setAttribute("tabindex", "-1"), r.innerHTML = `
332
+ <header class="rte-approval-header">
333
+ <h2 class="rte-approval-title">${c(o.labels.panelTitle)}</h2>
334
+ <button type="button" class="rte-approval-icon-btn" data-action="close" aria-label="${c(
335
+ o.labels.closeText
336
+ )}">✕</button>
337
+ </header>
338
+ <div class="rte-approval-body">
339
+ <p class="rte-approval-summary" aria-live="polite"></p>
340
+
341
+ <div class="rte-approval-controls" role="toolbar" aria-label="Approval actions">
342
+ <button type="button" class="rte-approval-btn" data-action="request-review">${c(
343
+ o.labels.requestReviewText
344
+ )}</button>
345
+ <button type="button" class="rte-approval-btn rte-approval-btn-primary" data-action="approve">${c(
346
+ o.labels.approveText
347
+ )}</button>
348
+ <button type="button" class="rte-approval-btn" data-action="reopen-draft">${c(
349
+ o.labels.reopenDraftText
350
+ )}</button>
351
+ </div>
352
+
353
+ <div class="rte-approval-form">
354
+ <label class="rte-approval-label">
355
+ ${c(o.labels.actorLabel)}
356
+ <input type="text" data-field="actor" class="rte-approval-field" autocomplete="off" placeholder="${c(
357
+ o.labels.actorPlaceholder
358
+ )}" />
359
+ </label>
360
+ <label class="rte-approval-label">
361
+ ${c(o.labels.commentLabel)}
362
+ <textarea data-field="comment" class="rte-approval-field" rows="2" placeholder="${c(
363
+ o.labels.commentPlaceholder
364
+ )}"></textarea>
365
+ </label>
366
+ <button type="button" class="rte-approval-btn" data-action="add-comment">${c(
367
+ o.labels.addCommentText
368
+ )}</button>
369
+ </div>
370
+
371
+ <section class="rte-approval-section" aria-label="${c(o.labels.commentsHeading)}">
372
+ <h3 class="rte-approval-section-title">${c(o.labels.commentsHeading)}</h3>
373
+ <ul class="rte-approval-comments-list" role="list"></ul>
374
+ </section>
375
+
376
+ <section class="rte-approval-section" aria-label="${c(o.labels.signoffsHeading)}">
377
+ <h3 class="rte-approval-section-title">${c(o.labels.signoffsHeading)}</h3>
378
+ <ul class="rte-approval-signoffs-list" role="list"></ul>
379
+ </section>
380
+
381
+ <p class="rte-approval-shortcut">${c(o.labels.shortcutText)}</p>
382
+ <span class="rte-approval-live" aria-live="polite"></span>
383
+ </div>
384
+ `, r.addEventListener("click", (n) => {
385
+ const l = n.target;
386
+ if (!l) return;
387
+ const s = l.closest("[data-action]");
388
+ if (!s) return;
389
+ const u = s.getAttribute("data-action") || "", m = p.get(e) || R || o;
390
+ if (p.set(e, m), f(e, m), u === "close") {
391
+ P(e, !0);
392
+ return;
393
+ }
394
+ const i = Se(r);
395
+ if (u === "request-review") {
396
+ E(e, "review", m, i.actor || m.defaultActor) && M(r, "Status changed to review.");
397
+ return;
398
+ }
399
+ if (u === "reopen-draft") {
400
+ E(e, "draft", m, i.actor || m.defaultActor) && M(r, "Status changed to draft.");
401
+ return;
402
+ }
403
+ if (u === "approve") {
404
+ const b = Q(e, m, i.actor, i.comment);
405
+ if (!b && m.requireCommentOnApprove) {
406
+ M(r, m.labels.approveCommentRequiredText);
407
+ return;
408
+ }
409
+ if (b) {
410
+ const $ = N(r, "comment");
411
+ $ && ($.value = ""), M(r, "Document approved and signed off.");
412
+ }
413
+ return;
414
+ }
415
+ if (u === "add-comment") {
416
+ if (!ce(e, i.comment, i.actor, m)) return;
417
+ const $ = N(r, "comment");
418
+ $ && ($.value = ""), M(r, "Comment added.");
419
+ return;
420
+ }
421
+ }), r.addEventListener("keydown", (n) => {
422
+ n.key === "Escape" && (n.preventDefault(), P(e, !0));
423
+ }), K(r, e), document.body.appendChild(r), k.set(e, r), O.set(e, !1), q(e), r;
424
+ }
425
+ function Z(e) {
426
+ return O.get(e) === !0;
427
+ }
428
+ function A(e) {
429
+ D();
430
+ const t = $e(e);
431
+ k.forEach((o, a) => {
432
+ a !== e && P(a, !1);
433
+ }), t.classList.add("show"), O.set(e, !0), C(e, "toggleApprovalWorkflowPanel", !0), K(t, e), V(e, t), q(e);
434
+ }
435
+ function P(e, t = !1) {
436
+ const o = k.get(e);
437
+ o && (o.classList.remove("show"), O.set(e, !1), C(e, "toggleApprovalWorkflowPanel", !1), t && e.focus({ preventScroll: !0 }));
438
+ }
439
+ function de(e, t) {
440
+ const o = Z(e);
441
+ return (typeof t == "boolean" ? t : !o) ? A(e) : P(e), !0;
442
+ }
443
+ function Ee(e) {
444
+ const t = e.key.toLowerCase();
445
+ return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "a";
446
+ }
447
+ function Ce(e) {
448
+ const t = e.key.toLowerCase();
449
+ return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "r";
450
+ }
451
+ function Te(e) {
452
+ const t = e.key.toLowerCase();
453
+ return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "p";
454
+ }
455
+ function Le(e) {
456
+ const t = e.key.toLowerCase();
457
+ return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "d";
458
+ }
459
+ function Re(e) {
460
+ R = e, T || (T = (t) => {
461
+ D();
462
+ const o = t.target, a = o == null ? void 0 : o.closest(w);
463
+ if (!a) return;
464
+ g = a;
465
+ const r = p.get(a) || e;
466
+ p.set(a, r), f(a, r);
467
+ const n = k.get(a);
468
+ n && (K(n, a), V(a, n));
469
+ }, document.addEventListener("focusin", T, !0)), L || (L = (t) => {
470
+ if (t.defaultPrevented) return;
471
+ const o = Ee(t), a = Ce(t), r = Te(t), n = Le(t), l = t.key === "Escape";
472
+ if (!l && !o && !a && !r && !n)
473
+ return;
474
+ D();
475
+ const s = t.target, u = !!(s != null && s.closest(`.${d} input, .${d} textarea, .${d} select`));
476
+ if (!xe(s) && !we())
477
+ return;
478
+ const i = x(void 0, !1);
479
+ if (!i) return;
480
+ const b = p.get(i) || R || e;
481
+ p.set(i, b);
482
+ const $ = f(i, b);
483
+ if (g = i, l && Z(i)) {
484
+ t.preventDefault(), P(i, !0);
485
+ return;
486
+ }
487
+ if (!u) {
488
+ if (o) {
489
+ t.preventDefault(), t.stopPropagation(), de(i);
490
+ return;
491
+ }
492
+ if (a) {
493
+ t.preventDefault(), t.stopPropagation(), E(i, "review", b, b.defaultActor) && A(i);
494
+ return;
495
+ }
496
+ if (r) {
497
+ t.preventDefault(), t.stopPropagation(), Q(i, b, b.defaultActor, "Approved via keyboard shortcut.") && A(i);
498
+ return;
499
+ }
500
+ n && (t.preventDefault(), t.stopPropagation(), $.status !== "draft" && E(i, "draft", b, b.defaultActor) && A(i));
501
+ }
502
+ }, document.addEventListener("keydown", L, !0)), S || (S = () => {
503
+ D(), k.forEach((t, o) => {
504
+ !o.isConnected || !t.isConnected || (K(t, o), V(o, t));
505
+ });
506
+ }, window.addEventListener("scroll", S, !0), window.addEventListener("resize", S));
507
+ }
508
+ function Me(e) {
509
+ var o, a;
510
+ const t = I.get(e);
511
+ t && (e.classList.remove("rte-approval-locked-editor"), e.removeAttribute("data-approval-status"), e.removeAttribute("data-approval-locked"), ie(
512
+ e,
513
+ (o = t.preApprovalContentEditable) != null ? o : t.originalContentEditable,
514
+ (a = t.preApprovalReadonly) != null ? a : t.originalReadonly
515
+ ));
516
+ }
517
+ function De() {
518
+ T && (document.removeEventListener("focusin", T, !0), T = null), L && (document.removeEventListener("keydown", L, !0), L = null), S && (window.removeEventListener("scroll", S, !0), window.removeEventListener("resize", S), S = null), k.forEach((e) => e.remove()), k.clear(), H.forEach((e) => Me(e)), H.clear(), R = null, g = null;
519
+ }
520
+ function He() {
521
+ if (typeof document == "undefined" || document.getElementById(te)) return;
522
+ const e = document.createElement("style");
523
+ e.id = te, e.textContent = `
524
+ .rte-toolbar-group-items.${h},
525
+ .editora-toolbar-group-items.${h},
526
+ .rte-toolbar-group-items.${y},
527
+ .editora-toolbar-group-items.${y} {
528
+ display: flex;
529
+ border: 1px solid #ccc;
530
+ border-radius: 3px;
531
+ background: #fff;
532
+ }
533
+
534
+ .rte-toolbar-group-items.${h} .rte-toolbar-button,
535
+ .editora-toolbar-group-items.${h} .editora-toolbar-button,
536
+ .rte-toolbar-group-items.${y} .rte-toolbar-button,
537
+ .editora-toolbar-group-items.${y} .editora-toolbar-button {
538
+ border: none;
539
+ border-radius: 0;
540
+ border-right: 1px solid #ccc;
541
+ }
542
+
543
+ .rte-toolbar-button[data-command="toggleApprovalWorkflowPanel"].active,
544
+ .editora-toolbar-button[data-command="toggleApprovalWorkflowPanel"].active,
545
+ .rte-toolbar-button[data-command="reopenDraft"].active,
546
+ .editora-toolbar-button[data-command="reopenDraft"].active {
547
+ background-color: #ccc;
548
+ }
549
+
550
+ ${v} .rte-toolbar-button[data-command="toggleApprovalWorkflowPanel"].active,
551
+ ${v} .editora-toolbar-button[data-command="toggleApprovalWorkflowPanel"].active,
552
+ ${v} .rte-toolbar-button[data-command="reopenDraft"].active,
553
+ ${v} .editora-toolbar-button[data-command="reopenDraft"].active {
554
+ background: linear-gradient(180deg, #5eaaf6 0%, #4a95de 100%);
555
+ }
556
+
557
+ .rte-toolbar-group-items.${h} .rte-toolbar-item:last-child .rte-toolbar-button,
558
+ .editora-toolbar-group-items.${h} .editora-toolbar-item:last-child .editora-toolbar-button,
559
+ .rte-toolbar-group-items.${y} .rte-toolbar-item:last-child .rte-toolbar-button,
560
+ .editora-toolbar-group-items.${y} .editora-toolbar-item:last-child .editora-toolbar-button {
561
+ border-right: none;
562
+ }
563
+
564
+ ${v} .rte-toolbar-group-items.${h},
565
+ ${v} .editora-toolbar-group-items.${h},
566
+ ${v} .rte-toolbar-group-items.${y},
567
+ ${v} .editora-toolbar-group-items.${y},
568
+ .${d}.rte-approval-theme-dark {
569
+ border-color: #566275;
570
+ }
571
+ ${v} .rte-toolbar-group-items.${h} .rte-toolbar-button svg,
572
+ ${v} .editora-toolbar-group-items.${h} .editora-toolbar-button svg,
573
+ ${v} .rte-toolbar-group-items.${y} .rte-toolbar-button svg,
574
+ ${v} .editora-toolbar-group-items.${y} .editora-toolbar-button svg
575
+ {
576
+ fill: none;
577
+ }
578
+
579
+ ${v} .rte-toolbar-group-items.${h} .rte-toolbar-button,
580
+ ${v} .editora-toolbar-group-items.${h} .editora-toolbar-button
581
+ {
582
+ border-color: #566275;
583
+ }
584
+
585
+ .rte-approval-locked-editor {
586
+ background-image: repeating-linear-gradient(
587
+ -45deg,
588
+ rgba(30, 64, 175, 0.04),
589
+ rgba(30, 64, 175, 0.04) 8px,
590
+ rgba(30, 64, 175, 0.08) 8px,
591
+ rgba(30, 64, 175, 0.08) 16px
592
+ );
593
+ }
594
+
595
+ .${d} {
596
+ position: fixed;
597
+ z-index: 1500;
598
+ right: 16px;
599
+ top: 16px;
600
+ width: min(420px, calc(100vw - 20px));
601
+ max-height: calc(100vh - 24px);
602
+ display: none;
603
+ flex-direction: column;
604
+ border-radius: 12px;
605
+ border: 1px solid #d1d5db;
606
+ background: #ffffff;
607
+ color: #0f172a;
608
+ box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
609
+ overflow: hidden;
610
+ }
611
+
612
+ .${d}.show {
613
+ display: flex;
614
+ }
615
+
616
+ .${d}.rte-approval-theme-dark {
617
+ background: #0f172a;
618
+ color: #e2e8f0;
619
+ border-color: #334155;
620
+ box-shadow: 0 20px 40px rgba(2, 6, 23, 0.5);
621
+ }
622
+
623
+ .rte-approval-header {
624
+ display: flex;
625
+ align-items: center;
626
+ justify-content: space-between;
627
+ padding: 10px 12px;
628
+ border-bottom: 1px solid #e2e8f0;
629
+ background: #f8fafc;
630
+ }
631
+
632
+ .${d}.rte-approval-theme-dark .rte-approval-header {
633
+ border-bottom-color: #334155;
634
+ background: #111827;
635
+ }
636
+
637
+ .rte-approval-title {
638
+ margin: 0;
639
+ font-size: 14px;
640
+ font-weight: 700;
641
+ }
642
+
643
+ .rte-approval-icon-btn {
644
+ border: 1px solid #cbd5e1;
645
+ background: #ffffff;
646
+ color: #0f172a;
647
+ border-radius: 6px;
648
+ cursor: pointer;
649
+ min-width: 34px;
650
+ min-height: 34px;
651
+ width: 34px;
652
+ height: 34px;
653
+ padding: 0;
654
+ display: inline-flex;
655
+ align-items: center;
656
+ justify-content: center;
657
+ font-size: 16px;
658
+ line-height: 1;
659
+ font-weight: 600;
660
+ }
661
+
662
+ .rte-approval-icon-btn:hover,
663
+ .rte-approval-icon-btn:focus-visible {
664
+ outline: none;
665
+ border-color: #3b82f6;
666
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
667
+ }
668
+
669
+ .${d}.rte-approval-theme-dark .rte-approval-icon-btn {
670
+ background: #0f172a;
671
+ border-color: #475569;
672
+ color: #e2e8f0;
673
+ }
674
+
675
+ .${d}.rte-approval-theme-dark .rte-approval-icon-btn:hover,
676
+ .${d}.rte-approval-theme-dark .rte-approval-icon-btn:focus-visible {
677
+ border-color: #60a5fa;
678
+ box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.24);
679
+ }
680
+
681
+ .rte-approval-body {
682
+ display: flex;
683
+ flex-direction: column;
684
+ gap: 10px;
685
+ padding: 12px;
686
+ overflow: auto;
687
+ }
688
+
689
+ .rte-approval-summary {
690
+ margin: 0;
691
+ font-size: 12px;
692
+ color: #475569;
693
+ }
694
+
695
+ .${d}.rte-approval-theme-dark .rte-approval-summary {
696
+ color: #94a3b8;
697
+ }
698
+
699
+ .rte-approval-controls {
700
+ display: flex;
701
+ flex-wrap: wrap;
702
+ gap: 8px;
703
+ }
704
+
705
+ .rte-approval-btn {
706
+ border: 1px solid #cbd5e1;
707
+ background: #f8fafc;
708
+ color: inherit;
709
+ border-radius: 8px;
710
+ padding: 6px 10px;
711
+ font-size: 12px;
712
+ font-weight: 600;
713
+ cursor: pointer;
714
+ }
715
+
716
+ .rte-approval-btn:disabled {
717
+ opacity: 0.5;
718
+ cursor: not-allowed;
719
+ }
720
+
721
+ .rte-approval-btn:hover:not(:disabled),
722
+ .rte-approval-btn:focus-visible:not(:disabled) {
723
+ outline: none;
724
+ border-color: #1d4ed8;
725
+ box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.2);
726
+ }
727
+
728
+ .rte-approval-btn-primary {
729
+ background: #1d4ed8;
730
+ border-color: #1d4ed8;
731
+ color: #ffffff;
732
+ }
733
+
734
+ .rte-approval-btn-primary:hover:not(:disabled),
735
+ .rte-approval-btn-primary:focus-visible:not(:disabled) {
736
+ background: #1e40af;
737
+ border-color: #1e40af;
738
+ }
739
+
740
+ .${d}.rte-approval-theme-dark .rte-approval-btn {
741
+ border-color: #334155;
742
+ background: #0b1220;
743
+ color: #e2e8f0;
744
+ }
745
+
746
+ .${d}.rte-approval-theme-dark .rte-approval-btn-primary {
747
+ border-color: #2563eb;
748
+ background: #2563eb;
749
+ color: #ffffff;
750
+ }
751
+
752
+ .rte-approval-form {
753
+ display: grid;
754
+ grid-template-columns: 1fr;
755
+ gap: 8px;
756
+ border: 1px solid #e2e8f0;
757
+ border-radius: 10px;
758
+ padding: 8px;
759
+ }
760
+
761
+ .${d}.rte-approval-theme-dark .rte-approval-form {
762
+ border-color: #334155;
763
+ }
764
+
765
+ .rte-approval-label {
766
+ display: flex;
767
+ flex-direction: column;
768
+ gap: 4px;
769
+ font-size: 12px;
770
+ font-weight: 600;
771
+ }
772
+
773
+ .rte-approval-field {
774
+ width: 100%;
775
+ box-sizing: border-box;
776
+ min-height: 30px;
777
+ border-radius: 8px;
778
+ border: 1px solid #cbd5e1;
779
+ background: #ffffff;
780
+ color: inherit;
781
+ font-size: 13px;
782
+ padding: 6px 8px;
783
+ }
784
+
785
+ .rte-approval-field:focus-visible {
786
+ outline: none;
787
+ border-color: #1d4ed8;
788
+ box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.2);
789
+ }
790
+
791
+ .${d}.rte-approval-theme-dark .rte-approval-field {
792
+ border-color: #334155;
793
+ background: #0b1220;
794
+ color: #e2e8f0;
795
+ }
796
+
797
+ .rte-approval-section {
798
+ border: 1px solid #e2e8f0;
799
+ border-radius: 10px;
800
+ padding: 8px;
801
+ }
802
+
803
+ .${d}.rte-approval-theme-dark .rte-approval-section {
804
+ border-color: #334155;
805
+ }
806
+
807
+ .rte-approval-section-title {
808
+ margin: 0 0 8px;
809
+ font-size: 12px;
810
+ font-weight: 700;
811
+ }
812
+
813
+ .rte-approval-comments-list,
814
+ .rte-approval-signoffs-list {
815
+ margin: 0;
816
+ padding: 0;
817
+ list-style: none;
818
+ display: flex;
819
+ flex-direction: column;
820
+ gap: 6px;
821
+ max-height: 150px;
822
+ overflow: auto;
823
+ }
824
+
825
+ .rte-approval-item {
826
+ border: 1px solid #dbeafe;
827
+ background: #eff6ff;
828
+ border-radius: 8px;
829
+ padding: 6px;
830
+ }
831
+
832
+ .rte-approval-item-comment {
833
+ border-color: #e2e8f0;
834
+ background: #f8fafc;
835
+ }
836
+
837
+ .${d}.rte-approval-theme-dark .rte-approval-item {
838
+ border-color: #334155;
839
+ background: #111827;
840
+ }
841
+
842
+ .rte-approval-item-head {
843
+ display: flex;
844
+ align-items: center;
845
+ justify-content: space-between;
846
+ gap: 8px;
847
+ margin-bottom: 4px;
848
+ }
849
+
850
+ .rte-approval-item-author {
851
+ font-size: 12px;
852
+ font-weight: 700;
853
+ }
854
+
855
+ .rte-approval-item-time {
856
+ font-size: 11px;
857
+ color: #64748b;
858
+ }
859
+
860
+ .${d}.rte-approval-theme-dark .rte-approval-item-time {
861
+ color: #94a3b8;
862
+ }
863
+
864
+ .rte-approval-item-message {
865
+ margin: 0;
866
+ font-size: 12px;
867
+ line-height: 1.35;
868
+ white-space: pre-wrap;
869
+ }
870
+
871
+ .rte-approval-empty {
872
+ border: 1px dashed #cbd5e1;
873
+ border-radius: 8px;
874
+ padding: 8px;
875
+ font-size: 12px;
876
+ color: #64748b;
877
+ }
878
+
879
+ .${d}.rte-approval-theme-dark .rte-approval-empty {
880
+ border-color: #334155;
881
+ color: #94a3b8;
882
+ }
883
+
884
+ .rte-approval-shortcut {
885
+ margin: 0;
886
+ font-size: 11px;
887
+ color: #64748b;
888
+ }
889
+
890
+ .${d}.rte-approval-theme-dark .rte-approval-shortcut {
891
+ color: #94a3b8;
892
+ }
893
+
894
+ .rte-approval-live {
895
+ position: absolute;
896
+ width: 1px;
897
+ height: 1px;
898
+ margin: -1px;
899
+ padding: 0;
900
+ overflow: hidden;
901
+ clip: rect(0 0 0 0);
902
+ border: 0;
903
+ }
904
+
905
+ @media (max-width: 768px) {
906
+ .${d} {
907
+ left: 10px !important;
908
+ right: 10px;
909
+ top: 10px !important;
910
+ width: auto !important;
911
+ max-height: calc(100vh - 20px);
912
+ }
913
+ }
914
+ `, document.head.appendChild(e);
915
+ }
916
+ const qe = (e = {}) => {
917
+ const t = z(e);
918
+ return He(), {
919
+ name: "approvalWorkflow",
920
+ toolbar: [
921
+ {
922
+ id: "approvalWorkflowGroup",
923
+ label: "Approval",
924
+ type: "group",
925
+ command: "approvalWorkflow",
926
+ items: [
927
+ {
928
+ id: "approvalWorkflow",
929
+ label: "Approval Workflow",
930
+ command: "toggleApprovalWorkflowPanel",
931
+ shortcut: "Mod-Alt-Shift-a",
932
+ icon: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" focusable="false" aria-hidden="true"><rect x="4" y="5" width="16" height="14" rx="2.5" stroke="currentColor" stroke-width="1.7"/><path d="M8 10h8M8 14h5" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"/><path d="m16.5 16 1.8 1.8 3.2-3.2" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/></svg>'
933
+ },
934
+ {
935
+ id: "approvalRequestReview",
936
+ label: "Request Review",
937
+ command: "requestApprovalReview",
938
+ shortcut: "Mod-Alt-Shift-r",
939
+ icon: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" focusable="false" aria-hidden="true"><circle cx="11" cy="11" r="6.5" stroke="currentColor" stroke-width="1.7"/><path d="M11 8v3l2 2" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"/><path d="M17.5 17.5 20 20" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"/></svg>'
940
+ },
941
+ {
942
+ id: "approvalApprove",
943
+ label: "Approve",
944
+ command: "approveDocument",
945
+ shortcut: "Mod-Alt-Shift-p",
946
+ icon: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" focusable="false" aria-hidden="true"><path d="M5 12.5 9.5 17 19 7.5" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/><rect x="3.8" y="3.8" width="16.4" height="16.4" rx="3" stroke="currentColor" stroke-width="1.4"/></svg>'
947
+ },
948
+ {
949
+ id: "approvalReopen",
950
+ label: "Reopen Draft",
951
+ command: "reopenDraft",
952
+ shortcut: "Mod-Alt-Shift-d",
953
+ icon: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" focusable="false" aria-hidden="true"><path d="M8 8H4v4" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"/><path d="M5 12a7 7 0 1 0 2-4.95" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"/></svg>'
954
+ }
955
+ ]
956
+ }
957
+ ],
958
+ commands: {
959
+ approvalWorkflow: (o, a) => {
960
+ const r = x(a);
961
+ if (!r) return !1;
962
+ const n = p.get(r) || t;
963
+ return p.set(r, n), f(r, n), g = r, A(r), q(r), !0;
964
+ },
965
+ toggleApprovalWorkflowPanel: (o, a) => {
966
+ const r = x(a);
967
+ if (!r) return !1;
968
+ const n = p.get(r) || t;
969
+ return p.set(r, n), f(r, n), g = r, de(r, typeof o == "boolean" ? o : void 0);
970
+ },
971
+ requestApprovalReview: (o, a) => {
972
+ const r = x(a);
973
+ if (!r) return !1;
974
+ const n = p.get(r) || t;
975
+ p.set(r, n), f(r, n);
976
+ const l = E(r, "review", n, n.defaultActor);
977
+ return A(r), l;
978
+ },
979
+ approveDocument: (o, a) => {
980
+ const r = x(a);
981
+ if (!r) return !1;
982
+ const n = p.get(r) || t;
983
+ p.set(r, n), f(r, n);
984
+ const l = typeof o == "object" && o ? String(o.author || "") : n.defaultActor, s = typeof o == "object" && o ? String(o.comment || "") : typeof o == "string" ? o : "", u = Q(r, n, l, s);
985
+ return u && A(r), u;
986
+ },
987
+ reopenDraft: (o, a) => {
988
+ const r = x(a);
989
+ if (!r) return !1;
990
+ const n = p.get(r) || t;
991
+ p.set(r, n), f(r, n);
992
+ const l = E(r, "draft", n, n.defaultActor);
993
+ return l && A(r), l;
994
+ },
995
+ addApprovalComment: (o, a) => {
996
+ const r = x(a);
997
+ if (!r) return !1;
998
+ const n = p.get(r) || t;
999
+ p.set(r, n), f(r, n);
1000
+ const l = typeof o == "object" && o ? String(o.author || "") : n.defaultActor, s = typeof o == "object" && o ? String(o.message || "") : typeof o == "string" ? o : "", u = ce(r, s, l, n);
1001
+ return u && A(r), u;
1002
+ },
1003
+ setApprovalStatus: (o, a) => {
1004
+ const r = x(a);
1005
+ if (!r || !o) return !1;
1006
+ const n = ne(o), l = p.get(r) || t;
1007
+ p.set(r, l), f(r, l);
1008
+ const s = E(r, n, l, l.defaultActor);
1009
+ return s && A(r), s;
1010
+ },
1011
+ setApprovalWorkflowOptions: (o, a) => {
1012
+ const r = x(a);
1013
+ if (!r || !o || typeof o != "object") return !1;
1014
+ const n = p.get(r) || t, l = z({
1015
+ ...n,
1016
+ ...o,
1017
+ labels: {
1018
+ ...n.labels,
1019
+ ...o.labels || {}
1020
+ },
1021
+ normalizeText: o.normalizeText || n.normalizeText
1022
+ });
1023
+ p.set(r, l);
1024
+ const s = f(r, l);
1025
+ return G(r, s, l), !0;
1026
+ },
1027
+ getApprovalWorkflowState: (o, a) => {
1028
+ const r = x(a);
1029
+ if (!r) return !1;
1030
+ const n = p.get(r) || t;
1031
+ p.set(r, n);
1032
+ const l = f(r, n), s = se(l);
1033
+ if (typeof o == "function")
1034
+ try {
1035
+ o(s);
1036
+ } catch (u) {
1037
+ }
1038
+ return r.__approvalWorkflowState = s, r.dispatchEvent(
1039
+ new CustomEvent("editora:approval-state", {
1040
+ bubbles: !0,
1041
+ detail: {
1042
+ state: s
1043
+ }
1044
+ })
1045
+ ), !0;
1046
+ }
1047
+ },
1048
+ keymap: {
1049
+ "Mod-Alt-Shift-a": "toggleApprovalWorkflowPanel",
1050
+ "Mod-Alt-Shift-A": "toggleApprovalWorkflowPanel",
1051
+ "Mod-Alt-Shift-r": "requestApprovalReview",
1052
+ "Mod-Alt-Shift-R": "requestApprovalReview",
1053
+ "Mod-Alt-Shift-p": "approveDocument",
1054
+ "Mod-Alt-Shift-P": "approveDocument",
1055
+ "Mod-Alt-Shift-d": "reopenDraft",
1056
+ "Mod-Alt-Shift-D": "reopenDraft"
1057
+ },
1058
+ init: function(a) {
1059
+ _ += 1;
1060
+ const r = this && typeof this.__pluginConfig == "object" ? z({ ...t, ...this.__pluginConfig }) : t;
1061
+ Re(r);
1062
+ const n = x(
1063
+ a != null && a.editorElement ? { editorElement: a.editorElement } : void 0,
1064
+ !1
1065
+ );
1066
+ n && (p.set(n, r), f(n, r), g = n, q(n));
1067
+ },
1068
+ destroy: () => {
1069
+ _ = Math.max(0, _ - 1), !(_ > 0) && De();
1070
+ }
1071
+ };
1072
+ };
1073
+ export {
1074
+ qe as ApprovalWorkflowPlugin
1075
+ };
1076
+ //# sourceMappingURL=ApprovalWorkflowPlugin.native-C3jtAYjG.mjs.map