strapi-plugin-comments
Version:
1,479 lines (1,475 loc) • 1.53 MB
JavaScript
import { jsxs as w, Fragment as nt, jsx as m } from "react/jsx-runtime";
import { useNotification as bt, useIsMobile as ld, Form as _d, Page as Fe, Layouts as ye, useQueryParams as Yt, SearchInput as dd, Pagination as je } from "@strapi/strapi/admin";
import { NavLink as dt, useParams as ud, useNavigate as pd, Routes as tu, Route as Dt, Navigate as nu } from "react-router-dom";
import { SubNav as ru, SubNavHeader as au, SubNavSections as ou, SubNavSection as iu, SubNavLink as Ii, Box as re, Flex as $, Link as mt, Typography as Q, Divider as Bt, Checkbox as gt, Button as Se, IconButton as ee, Badge as su, IconButtonGroup as Ht, Portal as cu, FocusTrap as lu, Field as Je, SingleSelect as Xo, SingleSelectOption as be, Popover as nn, Modal as ne, Table as oi, Thead as ii, Tr as rt, Th as pe, Tbody as si, Avatar as wt, Tooltip as Zo, Loader as _u, Grid as rn, Td as ge, SimpleMenu as du, MenuItem as Mt } from "@strapi/design-system";
import { l as oe, C as J, R as Re, g as y, u as fe, a as Tt, U as uu, b as qe, c as Ae, d as Di, e as Jo, f as pu } from "./index-BIaTg-pL.mjs";
import { useQuery as Et, useQueryClient as ve, useMutation as me } from "@tanstack/react-query";
import { create as mu } from "zustand/react";
import * as Ee from "react";
import { useCallback as ht, useMemo as Ct, useContext as gu, useState as Ge, useRef as md, Fragment as Eu } from "react";
import { Check as Rt, Cross as Su, Collapse as fu, Expand as bu, Bold as wi, Italic as Mi, Underline as xi, More as Li, StrikeThrough as Tu, BulletList as hu, NumberList as Cu, Code as Ru, Link as Nu, Quotes as vu, Pencil as Ou, Trash as gd, Eye as ci, Plus as yu, Shield as Au, ArrowUp as Iu, ChevronDown as Du, ChevronUp as wu } from "@strapi/icons";
import at, { styled as Ie } from "styled-components";
import { p as li } from "./index-CynNsAVf.mjs";
import jo from "codemirror5";
import Mu from "punycode";
import xu from "sanitize-html";
import "codemirror5/addon/display/placeholder";
const Lu = (t = "") => `/plugins/${li}/${t}`, ku = (t = null, e = null, n = "app.components.notification.error") => {
throw e({
type: "warning",
message: `${li}.${n}`
}), t || new Error("error");
}, ki = (t = "") => oe.isString(t) ? t.split(" ").map((e) => oe.first(e)).join("").toUpperCase() : "", Pu = ({
removed: t,
blocked: e,
blockedThread: n,
approvalStatus: r,
reviewFlowEnabled: a
}) => {
const o = !oe.isNil(r);
if (t)
return J.REMOVED;
if (e || n)
return J.BLOCKED;
if (a)
return J.TO_REVIEW;
if (o) {
const i = r.toUpperCase();
return Object.keys(J).includes(i) ? i : J.UNKNOWN;
}
return J.OPEN;
}, Uu = (t) => {
if (Object.values(J).includes(t))
switch (t) {
case J.REMOVED:
return "secondary";
case J.TO_REVIEW:
case J.REJECTED:
return "warning";
case J.BLOCKED:
return "danger";
case J.OPEN:
case J.APPROVED:
return "success";
}
return "secondary";
}, Fu = ({
resolved: t,
related: { blocked: e, blockedThread: n },
approvalStatus: r
}) => {
const a = !oe.isNil(r);
if (e || n)
return Re.BLOCKED;
if (t)
return Re.RESOLVED;
if (a) {
const o = r.toUpperCase();
return Object.keys(Re).includes(o) ? o : Re.PENDING;
}
return Re.PENDING;
}, Bu = (t) => {
switch (t) {
case Re.PENDING:
return "primary";
case Re.RESOLVED:
return "success";
case Re.BLOCKED:
return "danger";
default:
return "primary";
}
}, Pi = (t) => {
const [e, n] = t.split("/").filter((r) => r.length > 0);
return {
value: e,
flags: n
};
}, Gu = () => /* @__PURE__ */ w(nt, { children: [
/* @__PURE__ */ w(ru, { "aria-label": "Comments sub nav", display: { initial: "none", large: "block" }, children: [
/* @__PURE__ */ m(au, { label: y("plugin.name") }),
/* @__PURE__ */ m(ou, { children: /* @__PURE__ */ w(iu, { label: y("nav.header.moderation"), children: [
/* @__PURE__ */ m(Ii, { tag: dt, to: "/plugins/comments/discover", children: y("nav.item.discover") }),
/* @__PURE__ */ m(Ii, { to: "/plugins/comments/reports", tag: dt, withBullet: !1, children: y("nav.item.reports") })
] }) })
] }),
/* @__PURE__ */ m(
re,
{
display: { initial: "flex", large: "none" },
top: "80px",
right: "20px",
position: "absolute",
children: /* @__PURE__ */ w(
$,
{
direction: "column",
gap: 2,
children: [
/* @__PURE__ */ m(mt, { tag: dt, to: "/plugins/comments/discover", children: y("nav.item.discover") }),
/* @__PURE__ */ m(mt, { tag: dt, to: "/plugins/comments/reports", children: y("nav.item.reports") })
]
}
)
}
)
] }), qu = (t) => {
const e = fe();
return Et({
queryKey: e.config.getKey(),
queryFn: () => e.config.query().then((n) => (t(n), n))
});
}, Yu = mu((t) => ({
settings: {
entryLabel: {},
approvalFlow: [],
blockedAuthorProps: [],
reportReasons: {
BAD_LANGUAGE: "BAD_LANGUAGE",
DISCRIMINATION: "DISCRIMINATION",
OTHER: "OTHER"
},
regex: {
uid: "",
relatedUid: "",
email: "",
sorting: ""
},
enabledCollections: [],
moderatorRoles: [],
isGQLPluginEnabled: !1,
client: {
url: "",
contactEmail: ""
}
},
setSettings: (e) => t({ settings: e })
})), Hu = ({ config: t, entity: e, filters: n, onChangeFilters: r, schema: a }) => {
const { entryLabel: o = {} } = t, { attributes: i = {} } = a, { removed: c = !1 } = n;
ve();
const s = Object.keys(i), l = oe.first(o[e?.uid]), p = oe.take(
s.filter(
(S) => i[S].type === "string" && !oe.isNil(e[S]) && S !== l
),
5
), u = (S = "") => S.split("_").map((E) => oe.capitalize(E)).join(" "), d = e && !oe.isEmpty(e) && (!oe.isEmpty(p) || e[l]), g = ht((S) => {
r({
...n,
removed: S || void 0
});
}, [r, n]);
return /* @__PURE__ */ w(re, { padding: 4, background: "neutral0", width: "100%", children: [
d && /* @__PURE__ */ w(re, { marginBottom: 4, children: [
/* @__PURE__ */ m(
Q,
{
variant: "sigma",
textColor: "neutral600",
id: "entity-details",
children: y("page.details.panel.entity", "Details")
}
),
/* @__PURE__ */ m(re, { paddingTop: 2, paddingBottom: 4, children: /* @__PURE__ */ m(Bt, {}) }),
/* @__PURE__ */ w($, { children: [
/* @__PURE__ */ w($, { direction: "column", alignItems: "flex-start", children: [
/* @__PURE__ */ m(Q, { fontWeight: "bold", children: u(l) }),
/* @__PURE__ */ m(Q, { children: e[l] })
] }),
/* @__PURE__ */ m(
$,
{
direction: "column",
alignItems: "flex-start",
space: 4,
children: p.map((S) => /* @__PURE__ */ w(
$,
{
direction: "column",
alignItems: "flex-start",
marginBottom: 2,
children: [
/* @__PURE__ */ m(Q, { fontWeight: "bold", children: u(S) }),
/* @__PURE__ */ m(Q, { children: e[S] })
]
},
`prop_${S}`
))
}
)
] })
] }),
/* @__PURE__ */ w(re, { children: [
/* @__PURE__ */ m(Q, { variant: "sigma", textColor: "neutral600", id: "view-filters", children: y("page.details.filters.label", "View") }),
/* @__PURE__ */ m(re, { paddingTop: 2, paddingBottom: 4, children: /* @__PURE__ */ m(Bt, {}) }),
/* @__PURE__ */ m($, { children: /* @__PURE__ */ m(
gt,
{
checked: c,
onCheckedChange: g,
children: y(
"page.details.filters.removed.visibility",
"Show removed comments"
)
}
) })
] })
] });
}, Ke = (t = { comment: {}, report: {} }) => {
const e = fe(), { canModerate: n } = Tt(), r = (S) => n ? S : void 0, a = me({
mutationFn: r(e.comments.block),
onSuccess: t.comment?.blockSuccess,
onError: t.comment?.blockError
}), o = me({
mutationFn: r(e.comments.unblock),
onSuccess: t.comment?.unBlockSuccess,
onError: t.comment?.unBlockError
}), i = me({
mutationFn: r(e.comments.blockThread),
onSuccess: t.comment?.blockThreadSuccess,
onError: t.comment?.blockThreadError
}), c = me({
mutationFn: r(e.comments.unBlockThread),
onSuccess: t.comment?.unBlockThreadSuccess,
onError: t.comment?.unBlockThreadError
}), s = me({
mutationFn: r(e.comments.delete),
onSuccess: t.comment?.deleteSuccess,
onError: t.comment?.deleteError
}), l = me({
mutationFn: r(e.comments.postComment),
onSuccess: t.comment?.postCommentSuccess,
onError: t.comment?.postCommentError
}), _ = me({
mutationFn: r(e.reports.resolveMultipleReports),
onSuccess: t.report?.resolveMultipleSuccess,
onError: t.report?.resolveMultipleError
}), p = me({
mutationFn: r(e.reports.resolveCommentMultipleReports),
onSuccess: t.report?.resolveCommentMultipleReportsSuccess,
onError: t.report?.resolveCommentMultipleReportsError
}), u = me({
mutationFn: r(e.reports.resolve),
onSuccess: t.report?.resolveSuccess,
onError: t.report?.resolveError
}), d = me({
mutationFn: r(e.reports.resolveAllAbuseReportsForComment),
onSuccess: t.report?.resolveAllAbuseSuccess,
onError: t.report?.resolveAllAbuseError
}), g = me({
mutationFn: r(e.reports.resolveAllAbuseReportsForThread),
onSuccess: t.report?.resolveAllAbuseThreadSuccess,
onError: t.report?.resolveAllAbuseThreadError
});
return Ct(() => ({
commentMutation: {
block: a,
unBlock: o,
blockThread: i,
unBlockThread: c,
delete: s,
postComment: l
},
reportMutation: {
resolve: u,
resolveMultiple: _,
resolveAllAbuse: d,
resolveAllAbuseThread: g,
resolveCommentMultipleReports: p
}
}), [
a,
o,
i,
c,
_,
d,
g,
s,
u
]);
}, _i = () => {
const t = gu(uu);
if (!t)
throw new Error("UserContext is not provided");
return t;
}, ei = at(Se)(({ isSingle: t }) => ({
padding: "7px 16px",
marginLeft: t ? "0" : ".5rem",
whiteSpace: "nowrap"
})), Ed = ({ id: t, canModerate: e, queryKey: n }) => {
const { toggleNotification: r } = bt(), { formatMessage: a } = qe(), o = ve(), i = fe(), c = (d) => async () => {
await o.invalidateQueries({
exact: !1,
queryKey: n
}), r({
type: "success",
message: a({
id: `${li}.${d}`,
defaultMessage: d
})
});
}, s = (d) => {
ku(d, r);
}, l = me({
mutationKey: ["approveItem", t],
mutationFn: i.comments.approve,
onSuccess: c("success.approveItem"),
onError: s
}), _ = () => {
l.mutate(t);
}, p = me({
mutationKey: ["rejectItem", t],
mutationFn: i.comments.reject,
onSuccess: c("success.rejectItem"),
onError: s
}), u = () => {
p.mutate(t);
};
return e ? /* @__PURE__ */ w(nt, { children: [
/* @__PURE__ */ m(
ee,
{
onClick: _,
label: y("page.details.actions.comment.reports.approve", "Approve"),
children: /* @__PURE__ */ m(Rt, {})
}
),
/* @__PURE__ */ m(
ee,
{
label: y("page.details.actions.comment.reports.reject", "Reject"),
onClick: u,
children: /* @__PURE__ */ m(Su, {})
}
)
] }) : null;
}, Vu = at(su)`
padding: 5px 8px;
border: 1px ${({ theme: t, color: e }) => {
if (!e) return t.colors.neutral200;
const n = `${e}200`;
return t.colors[n] || t.colors.neutral200;
}} solid;
overflow: hidden;
text-overflow: ellipsis;
cursor: default;
span {
text-transform: none;
}
`, Vt = ({ children: t, textColor: e, ...n }) => /* @__PURE__ */ m(Vu, { ...n, children: /* @__PURE__ */ m(Q, { variant: "omega", fontWeight: "semibold", textColor: e, children: t }) }), ti = ({ item: t, canAccessReports: e, hasReports: n }) => {
const r = e && n && !(t.blocked || t.blockedThread), a = Pu({ ...t, reviewFlowEnabled: r }), o = Uu(a), i = t.reports?.filter((c) => !c.resolved) ?? [];
return /* @__PURE__ */ m(
Vt,
{
backgroundColor: `${o}100`,
textColor: `${o}700`,
color: o,
children: y(
{
id: `page.common.item.status.${a}`,
props: {
count: i.length
}
},
a
)
}
);
}, Ut = at(Ht)(({ isSingle: t, withMargin: e }) => ({
...t ? {
button: {
"&:first-child": {
borderRadius: "4px !important"
},
"&:last-child": {
borderRadius: "4px !important"
}
}
} : {},
...e ? {
marginLeft: ".5rem"
} : {}
})), zu = 330, ut = ({ width: t, height: e, size: n = 16 }) => /* @__PURE__ */ m(
"svg",
{
width: t || n,
height: e || n,
viewBox: `0 0 ${t || n} ${e || n}`,
style: { width: `${t || n}px`, height: `${e || n}px` },
xmlns: "http://www.w3.org/2000/svg",
fill: "currentColor",
children: /* @__PURE__ */ m("g", { style: { transform: `scale(${(t || n) / zu})` }, children: /* @__PURE__ */ m(
"path",
{
d: `M165,330c63.411,0,115-51.589,115-115c0-29.771-11.373-56.936-30-77.379V85c0-46.869-38.131-85-85-85
S80.001,38.131,80.001,85v52.619C61.373,158.064,50,185.229,50,215C50,278.411,101.589,330,165,330z M180,219.986V240
c0,8.284-6.716,15-15,15s-15-6.716-15-15v-20.014c-6.068-4.565-10-11.824-10-19.986c0-13.785,11.215-25,25-25s25,11.215,25,25
C190,208.162,186.068,215.421,180,219.986z M110.001,85c0-30.327,24.673-55,54.999-55c30.327,0,55,24.673,55,55v29.029
C203.652,105.088,184.91,100,165,100c-19.909,0-38.651,5.088-54.999,14.028V85z`
}
) })
}
), $u = 330, Ui = ({ width: t, height: e, size: n = 16 }) => /* @__PURE__ */ m(
"svg",
{
width: t || n,
height: e || n,
viewBox: `0 0 ${t || n} ${e || n}`,
style: { width: `${t || n}px`, height: `${e || n}px` },
xmlns: "http://www.w3.org/2000/svg",
children: /* @__PURE__ */ m("g", { style: { transform: `scale(${(t || n) / $u})` }, children: /* @__PURE__ */ m(
"path",
{
d: `M15,160c8.283,0,15-6.716,15-15V85c0-30.327,24.672-55,55-55c30.326,0,55,24.673,55,55v42.893
c-24.479,21.105-40,52.327-40,87.107c0,63.411,51.588,115,115,115c63.41,0,115-51.589,115-115s-51.59-115-115-115
c-15.961,0-31.172,3.271-45,9.174V85c0-46.869-38.131-85-85-85S0,38.131,0,85v60C0,153.284,6.715,160,15,160z`
}
) })
}
);
function di(t) {
return t instanceof Map ? t.clear = t.delete = t.set = function() {
throw new Error("map is read-only");
} : t instanceof Set && (t.add = t.clear = t.delete = function() {
throw new Error("set is read-only");
}), Object.freeze(t), Object.getOwnPropertyNames(t).forEach(function(e) {
var n = t[e];
typeof n == "object" && !Object.isFrozen(n) && di(n);
}), t;
}
var Sd = di, Wu = di;
Sd.default = Wu;
class Fi {
/**
* @param {CompiledMode} mode
*/
constructor(e) {
e.data === void 0 && (e.data = {}), this.data = e.data, this.isMatchIgnored = !1;
}
ignoreMatch() {
this.isMatchIgnored = !0;
}
}
function et(t) {
return t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
}
function Be(t, ...e) {
const n = /* @__PURE__ */ Object.create(null);
for (const r in t)
n[r] = t[r];
return e.forEach(function(r) {
for (const a in r)
n[a] = r[a];
}), /** @type {T} */
n;
}
const Ku = "</span>", Bi = (t) => !!t.kind;
class Qu {
/**
* Creates a new HTMLRenderer
*
* @param {Tree} parseTree - the parse tree (must support `walk` API)
* @param {{classPrefix: string}} options
*/
constructor(e, n) {
this.buffer = "", this.classPrefix = n.classPrefix, e.walk(this);
}
/**
* Adds texts to the output stream
*
* @param {string} text */
addText(e) {
this.buffer += et(e);
}
/**
* Adds a node open to the output stream (if needed)
*
* @param {Node} node */
openNode(e) {
if (!Bi(e)) return;
let n = e.kind;
e.sublanguage || (n = `${this.classPrefix}${n}`), this.span(n);
}
/**
* Adds a node close to the output stream (if needed)
*
* @param {Node} node */
closeNode(e) {
Bi(e) && (this.buffer += Ku);
}
/**
* returns the accumulated buffer
*/
value() {
return this.buffer;
}
// helpers
/**
* Builds a span element
*
* @param {string} className */
span(e) {
this.buffer += `<span class="${e}">`;
}
}
class ui {
constructor() {
this.rootNode = { children: [] }, this.stack = [this.rootNode];
}
get top() {
return this.stack[this.stack.length - 1];
}
get root() {
return this.rootNode;
}
/** @param {Node} node */
add(e) {
this.top.children.push(e);
}
/** @param {string} kind */
openNode(e) {
const n = { kind: e, children: [] };
this.add(n), this.stack.push(n);
}
closeNode() {
if (this.stack.length > 1)
return this.stack.pop();
}
closeAllNodes() {
for (; this.closeNode(); ) ;
}
toJSON() {
return JSON.stringify(this.rootNode, null, 4);
}
/**
* @typedef { import("./html_renderer").Renderer } Renderer
* @param {Renderer} builder
*/
walk(e) {
return this.constructor._walk(e, this.rootNode);
}
/**
* @param {Renderer} builder
* @param {Node} node
*/
static _walk(e, n) {
return typeof n == "string" ? e.addText(n) : n.children && (e.openNode(n), n.children.forEach((r) => this._walk(e, r)), e.closeNode(n)), e;
}
/**
* @param {Node} node
*/
static _collapse(e) {
typeof e != "string" && e.children && (e.children.every((n) => typeof n == "string") ? e.children = [e.children.join("")] : e.children.forEach((n) => {
ui._collapse(n);
}));
}
}
class Xu extends ui {
/**
* @param {*} options
*/
constructor(e) {
super(), this.options = e;
}
/**
* @param {string} text
* @param {string} kind
*/
addKeyword(e, n) {
e !== "" && (this.openNode(n), this.addText(e), this.closeNode());
}
/**
* @param {string} text
*/
addText(e) {
e !== "" && this.add(e);
}
/**
* @param {Emitter & {root: DataNode}} emitter
* @param {string} name
*/
addSublanguage(e, n) {
const r = e.root;
r.kind = n, r.sublanguage = !0, this.add(r);
}
toHTML() {
return new Qu(this, this.options).value();
}
finalize() {
return !0;
}
}
function Zu(t) {
return new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), "m");
}
function St(t) {
return t ? typeof t == "string" ? t : t.source : null;
}
function Ju(...t) {
return t.map((n) => St(n)).join("");
}
function ju(...t) {
return "(" + t.map((n) => St(n)).join("|") + ")";
}
function ep(t) {
return new RegExp(t.toString() + "|").exec("").length - 1;
}
function tp(t, e) {
const n = t && t.exec(e);
return n && n.index === 0;
}
const np = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
function rp(t, e = "|") {
let n = 0;
return t.map((r) => {
n += 1;
const a = n;
let o = St(r), i = "";
for (; o.length > 0; ) {
const c = np.exec(o);
if (!c) {
i += o;
break;
}
i += o.substring(0, c.index), o = o.substring(c.index + c[0].length), c[0][0] === "\\" && c[1] ? i += "\\" + String(Number(c[1]) + a) : (i += c[0], c[0] === "(" && n++);
}
return i;
}).map((r) => `(${r})`).join(e);
}
const ap = /\b\B/, fd = "[a-zA-Z]\\w*", pi = "[a-zA-Z_]\\w*", mi = "\\b\\d+(\\.\\d+)?", bd = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", Td = "\\b(0b[01]+)", op = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", ip = (t = {}) => {
const e = /^#![ ]*\//;
return t.binary && (t.begin = Ju(
e,
/.*\b/,
t.binary,
/\b.*/
)), Be({
className: "meta",
begin: e,
end: /$/,
relevance: 0,
/** @type {ModeCallback} */
"on:begin": (n, r) => {
n.index !== 0 && r.ignoreMatch();
}
}, t);
}, ft = {
begin: "\\\\[\\s\\S]",
relevance: 0
}, sp = {
className: "string",
begin: "'",
end: "'",
illegal: "\\n",
contains: [ft]
}, cp = {
className: "string",
begin: '"',
end: '"',
illegal: "\\n",
contains: [ft]
}, hd = {
begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
}, zt = function(t, e, n = {}) {
const r = Be(
{
className: "comment",
begin: t,
end: e,
contains: []
},
n
);
return r.contains.push(hd), r.contains.push({
className: "doctag",
begin: "(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",
relevance: 0
}), r;
}, lp = zt("//", "$"), _p = zt("/\\*", "\\*/"), dp = zt("#", "$"), up = {
className: "number",
begin: mi,
relevance: 0
}, pp = {
className: "number",
begin: bd,
relevance: 0
}, mp = {
className: "number",
begin: Td,
relevance: 0
}, gp = {
className: "number",
begin: mi + "(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",
relevance: 0
}, Ep = {
// this outer rule makes sure we actually have a WHOLE regex and not simply
// an expression such as:
//
// 3 / something
//
// (which will then blow up when regex's `illegal` sees the newline)
begin: /(?=\/[^/\n]*\/)/,
contains: [{
className: "regexp",
begin: /\//,
end: /\/[gimuy]*/,
illegal: /\n/,
contains: [
ft,
{
begin: /\[/,
end: /\]/,
relevance: 0,
contains: [ft]
}
]
}]
}, Sp = {
className: "title",
begin: fd,
relevance: 0
}, fp = {
className: "title",
begin: pi,
relevance: 0
}, bp = {
// excludes method names from keyword processing
begin: "\\.\\s*" + pi,
relevance: 0
}, Tp = function(t) {
return Object.assign(
t,
{
/** @type {ModeCallback} */
"on:begin": (e, n) => {
n.data._beginMatch = e[1];
},
/** @type {ModeCallback} */
"on:end": (e, n) => {
n.data._beginMatch !== e[1] && n.ignoreMatch();
}
}
);
};
var xt = /* @__PURE__ */ Object.freeze({
__proto__: null,
MATCH_NOTHING_RE: ap,
IDENT_RE: fd,
UNDERSCORE_IDENT_RE: pi,
NUMBER_RE: mi,
C_NUMBER_RE: bd,
BINARY_NUMBER_RE: Td,
RE_STARTERS_RE: op,
SHEBANG: ip,
BACKSLASH_ESCAPE: ft,
APOS_STRING_MODE: sp,
QUOTE_STRING_MODE: cp,
PHRASAL_WORDS_MODE: hd,
COMMENT: zt,
C_LINE_COMMENT_MODE: lp,
C_BLOCK_COMMENT_MODE: _p,
HASH_COMMENT_MODE: dp,
NUMBER_MODE: up,
C_NUMBER_MODE: pp,
BINARY_NUMBER_MODE: mp,
CSS_NUMBER_MODE: gp,
REGEXP_MODE: Ep,
TITLE_MODE: Sp,
UNDERSCORE_TITLE_MODE: fp,
METHOD_GUARD: bp,
END_SAME_AS_BEGIN: Tp
});
function hp(t, e) {
t.input[t.index - 1] === "." && e.ignoreMatch();
}
function Cp(t, e) {
e && t.beginKeywords && (t.begin = "\\b(" + t.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", t.__beforeBegin = hp, t.keywords = t.keywords || t.beginKeywords, delete t.beginKeywords, t.relevance === void 0 && (t.relevance = 0));
}
function Rp(t, e) {
Array.isArray(t.illegal) && (t.illegal = ju(...t.illegal));
}
function Np(t, e) {
if (t.match) {
if (t.begin || t.end) throw new Error("begin & end are not supported with match");
t.begin = t.match, delete t.match;
}
}
function vp(t, e) {
t.relevance === void 0 && (t.relevance = 1);
}
const Op = [
"of",
"and",
"for",
"in",
"not",
"or",
"if",
"then",
"parent",
// common variable name
"list",
// common variable name
"value"
// common variable name
], yp = "keyword";
function Cd(t, e, n = yp) {
const r = {};
return typeof t == "string" ? a(n, t.split(" ")) : Array.isArray(t) ? a(n, t) : Object.keys(t).forEach(function(o) {
Object.assign(
r,
Cd(t[o], e, o)
);
}), r;
function a(o, i) {
e && (i = i.map((c) => c.toLowerCase())), i.forEach(function(c) {
const s = c.split("|");
r[s[0]] = [o, Ap(s[0], s[1])];
});
}
}
function Ap(t, e) {
return e ? Number(e) : Ip(t) ? 0 : 1;
}
function Ip(t) {
return Op.includes(t.toLowerCase());
}
function Dp(t, { plugins: e }) {
function n(c, s) {
return new RegExp(
St(c),
"m" + (t.case_insensitive ? "i" : "") + (s ? "g" : "")
);
}
class r {
constructor() {
this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
}
// @ts-ignore
addRule(s, l) {
l.position = this.position++, this.matchIndexes[this.matchAt] = l, this.regexes.push([l, s]), this.matchAt += ep(s) + 1;
}
compile() {
this.regexes.length === 0 && (this.exec = () => null);
const s = this.regexes.map((l) => l[1]);
this.matcherRe = n(rp(s), !0), this.lastIndex = 0;
}
/** @param {string} s */
exec(s) {
this.matcherRe.lastIndex = this.lastIndex;
const l = this.matcherRe.exec(s);
if (!l)
return null;
const _ = l.findIndex((u, d) => d > 0 && u !== void 0), p = this.matchIndexes[_];
return l.splice(0, _), Object.assign(l, p);
}
}
class a {
constructor() {
this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
}
// @ts-ignore
getMatcher(s) {
if (this.multiRegexes[s]) return this.multiRegexes[s];
const l = new r();
return this.rules.slice(s).forEach(([_, p]) => l.addRule(_, p)), l.compile(), this.multiRegexes[s] = l, l;
}
resumingScanAtSamePosition() {
return this.regexIndex !== 0;
}
considerAll() {
this.regexIndex = 0;
}
// @ts-ignore
addRule(s, l) {
this.rules.push([s, l]), l.type === "begin" && this.count++;
}
/** @param {string} s */
exec(s) {
const l = this.getMatcher(this.regexIndex);
l.lastIndex = this.lastIndex;
let _ = l.exec(s);
if (this.resumingScanAtSamePosition() && !(_ && _.index === this.lastIndex)) {
const p = this.getMatcher(0);
p.lastIndex = this.lastIndex + 1, _ = p.exec(s);
}
return _ && (this.regexIndex += _.position + 1, this.regexIndex === this.count && this.considerAll()), _;
}
}
function o(c) {
const s = new a();
return c.contains.forEach((l) => s.addRule(l.begin, { rule: l, type: "begin" })), c.terminatorEnd && s.addRule(c.terminatorEnd, { type: "end" }), c.illegal && s.addRule(c.illegal, { type: "illegal" }), s;
}
function i(c, s) {
const l = (
/** @type CompiledMode */
c
);
if (c.isCompiled) return l;
[
// do this early so compiler extensions generally don't have to worry about
// the distinction between match/begin
Np
].forEach((p) => p(c, s)), t.compilerExtensions.forEach((p) => p(c, s)), c.__beforeBegin = null, [
Cp,
// do this later so compiler extensions that come earlier have access to the
// raw array if they wanted to perhaps manipulate it, etc.
Rp,
// default to 1 relevance if not specified
vp
].forEach((p) => p(c, s)), c.isCompiled = !0;
let _ = null;
if (typeof c.keywords == "object" && (_ = c.keywords.$pattern, delete c.keywords.$pattern), c.keywords && (c.keywords = Cd(c.keywords, t.case_insensitive)), c.lexemes && _)
throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");
return _ = _ || c.lexemes || /\w+/, l.keywordPatternRe = n(_, !0), s && (c.begin || (c.begin = /\B|\b/), l.beginRe = n(c.begin), c.endSameAsBegin && (c.end = c.begin), !c.end && !c.endsWithParent && (c.end = /\B|\b/), c.end && (l.endRe = n(c.end)), l.terminatorEnd = St(c.end) || "", c.endsWithParent && s.terminatorEnd && (l.terminatorEnd += (c.end ? "|" : "") + s.terminatorEnd)), c.illegal && (l.illegalRe = n(
/** @type {RegExp | string} */
c.illegal
)), c.contains || (c.contains = []), c.contains = [].concat(...c.contains.map(function(p) {
return wp(p === "self" ? c : p);
})), c.contains.forEach(function(p) {
i(
/** @type Mode */
p,
l
);
}), c.starts && i(c.starts, s), l.matcher = o(l), l;
}
if (t.compilerExtensions || (t.compilerExtensions = []), t.contains && t.contains.includes("self"))
throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
return t.classNameAliases = Be(t.classNameAliases || {}), i(
/** @type Mode */
t
);
}
function Rd(t) {
return t ? t.endsWithParent || Rd(t.starts) : !1;
}
function wp(t) {
return t.variants && !t.cachedVariants && (t.cachedVariants = t.variants.map(function(e) {
return Be(t, { variants: null }, e);
})), t.cachedVariants ? t.cachedVariants : Rd(t) ? Be(t, { starts: t.starts ? Be(t.starts) : null }) : Object.isFrozen(t) ? Be(t) : t;
}
var Mp = "10.7.3";
function xp(t) {
return !!(t || t === "");
}
function Lp(t) {
const e = {
props: ["language", "code", "autodetect"],
data: function() {
return {
detectedLanguage: "",
unknownLanguage: !1
};
},
computed: {
className() {
return this.unknownLanguage ? "" : "hljs " + this.detectedLanguage;
},
highlighted() {
if (!this.autoDetect && !t.getLanguage(this.language))
return console.warn(`The language "${this.language}" you specified could not be found.`), this.unknownLanguage = !0, et(this.code);
let r = {};
return this.autoDetect ? (r = t.highlightAuto(this.code), this.detectedLanguage = r.language) : (r = t.highlight(this.language, this.code, this.ignoreIllegals), this.detectedLanguage = this.language), r.value;
},
autoDetect() {
return !this.language || xp(this.autodetect);
},
ignoreIllegals() {
return !0;
}
},
// this avoids needing to use a whole Vue compilation pipeline just
// to build Highlight.js
render(r) {
return r("pre", {}, [
r("code", {
class: this.className,
domProps: { innerHTML: this.highlighted }
})
]);
}
// template: `<pre><code :class="className" v-html="highlighted"></code></pre>`
};
return { Component: e, VuePlugin: {
install(r) {
r.component("highlightjs", e);
}
} };
}
const kp = {
"after:highlightElement": ({ el: t, result: e, text: n }) => {
const r = Gi(t);
if (!r.length) return;
const a = document.createElement("div");
a.innerHTML = e.value, e.value = Pp(r, Gi(a), n);
}
};
function ni(t) {
return t.nodeName.toLowerCase();
}
function Gi(t) {
const e = [];
return function n(r, a) {
for (let o = r.firstChild; o; o = o.nextSibling)
o.nodeType === 3 ? a += o.nodeValue.length : o.nodeType === 1 && (e.push({
event: "start",
offset: a,
node: o
}), a = n(o, a), ni(o).match(/br|hr|img|input/) || e.push({
event: "stop",
offset: a,
node: o
}));
return a;
}(t, 0), e;
}
function Pp(t, e, n) {
let r = 0, a = "";
const o = [];
function i() {
return !t.length || !e.length ? t.length ? t : e : t[0].offset !== e[0].offset ? t[0].offset < e[0].offset ? t : e : e[0].event === "start" ? t : e;
}
function c(_) {
function p(u) {
return " " + u.nodeName + '="' + et(u.value) + '"';
}
a += "<" + ni(_) + [].map.call(_.attributes, p).join("") + ">";
}
function s(_) {
a += "</" + ni(_) + ">";
}
function l(_) {
(_.event === "start" ? c : s)(_.node);
}
for (; t.length || e.length; ) {
let _ = i();
if (a += et(n.substring(r, _[0].offset)), r = _[0].offset, _ === t) {
o.reverse().forEach(s);
do
l(_.splice(0, 1)[0]), _ = i();
while (_ === t && _.length && _[0].offset === r);
o.reverse().forEach(c);
} else
_[0].event === "start" ? o.push(_[0].node) : o.pop(), l(_.splice(0, 1)[0]);
}
return a + et(n.substr(r));
}
const qi = {}, an = (t) => {
console.error(t);
}, Yi = (t, ...e) => {
console.log(`WARN: ${t}`, ...e);
}, Ce = (t, e) => {
qi[`${t}/${e}`] || (console.log(`Deprecated as of ${t}. ${e}`), qi[`${t}/${e}`] = !0);
}, on = et, Hi = Be, Vi = Symbol("nomatch"), Up = function(t) {
const e = /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null), r = [];
let a = !0;
const o = /(^(<[^>]+>|\t|)+|\n)/gm, i = "Could not find the language '{}', did you forget to load/include a language module?", c = { disableAutodetect: !0, name: "Plain text", contains: [] };
let s = {
noHighlightRe: /^(no-?highlight)$/i,
languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
classPrefix: "hljs-",
tabReplace: null,
useBR: !1,
languages: null,
// beta configuration options, subject to change, welcome to discuss
// https://github.com/highlightjs/highlight.js/issues/1086
__emitter: Xu
};
function l(O) {
return s.noHighlightRe.test(O);
}
function _(O) {
let x = O.className + " ";
x += O.parentNode ? O.parentNode.className : "";
const Y = s.languageDetectRe.exec(x);
if (Y) {
const z = k(Y[1]);
return z || (Yi(i.replace("{}", Y[1])), Yi("Falling back to no-highlight mode for this block.", O)), z ? Y[1] : "no-highlight";
}
return x.split(/\s+/).find((z) => l(z) || k(z));
}
function p(O, x, Y, z) {
let X = "", de = "";
typeof x == "object" ? (X = O, Y = x.ignoreIllegals, de = x.language, z = void 0) : (Ce("10.7.0", "highlight(lang, code, ...args) has been deprecated."), Ce("10.7.0", `Please use highlight(code, options) instead.
https://github.com/highlightjs/highlight.js/issues/2277`), de = O, X = x);
const ie = {
code: X,
language: de
};
_e("before:highlight", ie);
const Z = ie.result ? ie.result : u(ie.language, ie.code, Y, z);
return Z.code = ie.code, _e("after:highlight", Z), Z;
}
function u(O, x, Y, z) {
function X(U, F) {
const V = xe.case_insensitive ? F[0].toLowerCase() : F[0];
return Object.prototype.hasOwnProperty.call(U.keywords, V) && U.keywords[V];
}
function de() {
if (!H.keywords) {
ae.addText(j);
return;
}
let U = 0;
H.keywordPatternRe.lastIndex = 0;
let F = H.keywordPatternRe.exec(j), V = "";
for (; F; ) {
V += j.substring(U, F.index);
const B = X(H, F);
if (B) {
const [ce, Ue] = B;
if (ae.addText(V), V = "", Pe += Ue, ce.startsWith("_"))
V += F[0];
else {
const At = xe.classNameAliases[ce] || ce;
ae.addKeyword(F[0], At);
}
} else
V += F[0];
U = H.keywordPatternRe.lastIndex, F = H.keywordPatternRe.exec(j);
}
V += j.substr(U), ae.addText(V);
}
function ie() {
if (j === "") return;
let U = null;
if (typeof H.subLanguage == "string") {
if (!e[H.subLanguage]) {
ae.addText(j);
return;
}
U = u(H.subLanguage, j, !0, _t[H.subLanguage]), _t[H.subLanguage] = /** @type {CompiledMode} */
U.top;
} else
U = g(j, H.subLanguage.length ? H.subLanguage : null);
H.relevance > 0 && (Pe += U.relevance), ae.addSublanguage(U.emitter, U.language);
}
function Z() {
H.subLanguage != null ? ie() : de(), j = "";
}
function se(U) {
return U.className && ae.openNode(xe.classNameAliases[U.className] || U.className), H = Object.create(U, { parent: { value: H } }), H;
}
function ue(U, F, V) {
let B = tp(U.endRe, V);
if (B) {
if (U["on:end"]) {
const ce = new Fi(U);
U["on:end"](F, ce), ce.isMatchIgnored && (B = !1);
}
if (B) {
for (; U.endsParent && U.parent; )
U = U.parent;
return U;
}
}
if (U.endsWithParent)
return ue(U.parent, F, V);
}
function ct(U) {
return H.matcher.regexIndex === 0 ? (j += U[0], 1) : (Xe = !0, 0);
}
function Ot(U) {
const F = U[0], V = U.rule, B = new Fi(V), ce = [V.__beforeBegin, V["on:begin"]];
for (const Ue of ce)
if (Ue && (Ue(U, B), B.isMatchIgnored))
return ct(F);
return V && V.endSameAsBegin && (V.endRe = Zu(F)), V.skip ? j += F : (V.excludeBegin && (j += F), Z(), !V.returnBegin && !V.excludeBegin && (j = F)), se(V), V.returnBegin ? 0 : F.length;
}
function yt(U) {
const F = U[0], V = x.substr(U.index), B = ue(H, U, V);
if (!B)
return Vi;
const ce = H;
ce.skip ? j += F : (ce.returnEnd || ce.excludeEnd || (j += F), Z(), ce.excludeEnd && (j = F));
do
H.className && ae.closeNode(), !H.skip && !H.subLanguage && (Pe += H.relevance), H = H.parent;
while (H !== B.parent);
return B.starts && (B.endSameAsBegin && (B.starts.endRe = B.endRe), se(B.starts)), ce.returnEnd ? 0 : F.length;
}
function Qe() {
const U = [];
for (let F = H; F !== xe; F = F.parent)
F.className && U.unshift(F.className);
U.forEach((F) => ae.openNode(F));
}
let Ye = {};
function lt(U, F) {
const V = F && F[0];
if (j += U, V == null)
return Z(), 0;
if (Ye.type === "begin" && F.type === "end" && Ye.index === F.index && V === "") {
if (j += x.slice(F.index, F.index + 1), !a) {
const B = new Error("0 width match regex");
throw B.languageName = O, B.badRule = Ye.rule, B;
}
return 1;
}
if (Ye = F, F.type === "begin")
return Ot(F);
if (F.type === "illegal" && !Y) {
const B = new Error('Illegal lexeme "' + V + '" for mode "' + (H.className || "<unnamed>") + '"');
throw B.mode = H, B;
} else if (F.type === "end") {
const B = yt(F);
if (B !== Vi)
return B;
}
if (F.type === "illegal" && V === "")
return 1;
if (Ve > 1e5 && Ve > F.index * 3)
throw new Error("potential infinite loop, way more iterations than matches");
return j += V, V.length;
}
const xe = k(O);
if (!xe)
throw an(i.replace("{}", O)), new Error('Unknown language: "' + O + '"');
const He = Dp(xe, { plugins: r });
let he = "", H = z || He;
const _t = {}, ae = new s.__emitter(s);
Qe();
let j = "", Pe = 0, Le = 0, Ve = 0, Xe = !1;
try {
for (H.matcher.considerAll(); ; ) {
Ve++, Xe ? Xe = !1 : H.matcher.considerAll(), H.matcher.lastIndex = Le;
const U = H.matcher.exec(x);
if (!U) break;
const F = x.substring(Le, U.index), V = lt(F, U);
Le = U.index + V;
}
return lt(x.substr(Le)), ae.closeAllNodes(), ae.finalize(), he = ae.toHTML(), {
// avoid possible breakage with v10 clients expecting
// this to always be an integer
relevance: Math.floor(Pe),
value: he,
language: O,
illegal: !1,
emitter: ae,
top: H
};
} catch (U) {
if (U.message && U.message.includes("Illegal"))
return {
illegal: !0,
illegalBy: {
msg: U.message,
context: x.slice(Le - 100, Le + 100),
mode: U.mode
},
sofar: he,
relevance: 0,
value: on(x),
emitter: ae
};
if (a)
return {
illegal: !1,
relevance: 0,
value: on(x),
emitter: ae,
language: O,
top: H,
errorRaised: U
};
throw U;
}
}
function d(O) {
const x = {
relevance: 0,
emitter: new s.__emitter(s),
value: on(O),
illegal: !1,
top: c
};
return x.emitter.addText(O), x;
}
function g(O, x) {
x = x || s.languages || Object.keys(e);
const Y = d(O), z = x.filter(k).filter(W).map(
(se) => u(se, O, !1)
);
z.unshift(Y);
const X = z.sort((se, ue) => {
if (se.relevance !== ue.relevance) return ue.relevance - se.relevance;
if (se.language && ue.language) {
if (k(se.language).supersetOf === ue.language)
return 1;
if (k(ue.language).supersetOf === se.language)
return -1;
}
return 0;
}), [de, ie] = X, Z = de;
return Z.second_best = ie, Z;
}
function S(O) {
return s.tabReplace || s.useBR ? O.replace(o, (x) => x === `
` ? s.useBR ? "<br>" : x : s.tabReplace ? x.replace(/\t/g, s.tabReplace) : x) : O;
}
function E(O, x, Y) {
const z = x ? n[x] : Y;
O.classList.add("hljs"), z && O.classList.add(z);
}
const f = {
"before:highlightElement": ({ el: O }) => {
s.useBR && (O.innerHTML = O.innerHTML.replace(/\n/g, "").replace(/<br[ /]*>/g, `
`));
},
"after:highlightElement": ({ result: O }) => {
s.useBR && (O.value = O.value.replace(/\n/g, "<br>"));
}
}, b = /^(<[^>]+>|\t)+/gm, C = {
"after:highlightElement": ({ result: O }) => {
s.tabReplace && (O.value = O.value.replace(
b,
(x) => x.replace(/\t/g, s.tabReplace)
));
}
};
function R(O) {
let x = null;
const Y = _(O);
if (l(Y)) return;
_e(
"before:highlightElement",
{ el: O, language: Y }
), x = O;
const z = x.textContent, X = Y ? p(z, { language: Y, ignoreIllegals: !0 }) : g(z);
_e("after:highlightElement", { el: O, result: X, text: z }), O.innerHTML = X.value, E(O, Y, X.language), O.result = {
language: X.language,
// TODO: remove with version 11.0
re: X.relevance,
relavance: X.relevance
}, X.second_best && (O.second_best = {
language: X.second_best.language,
// TODO: remove with version 11.0
re: X.second_best.relevance,
relavance: X.second_best.relevance
});
}
function v(O) {
O.useBR && (Ce("10.3.0", "'useBR' will be removed entirely in v11.0"), Ce("10.3.0", "Please see https://github.com/highlightjs/highlight.js/issues/2559")), s = Hi(s, O);
}
const h = () => {
if (h.called) return;
h.called = !0, Ce("10.6.0", "initHighlighting() is deprecated. Use highlightAll() instead."), document.querySelectorAll("pre code").forEach(R);
};
function N() {
Ce("10.6.0", "initHighlightingOnLoad() is deprecated. Use highlightAll() instead."), M = !0;
}
let M = !1;
function L() {
if (document.readyState === "loading") {
M = !0;
return;
}
document.querySelectorAll("pre code").forEach(R);
}
function A() {
M && L();
}
typeof window < "u" && window.addEventListener && window.addEventListener("DOMContentLoaded", A, !1);
function G(O, x) {
let Y = null;
try {
Y = x(t);
} catch (z) {
if (an("Language definition for '{}' could not be registered.".replace("{}", O)), a)
an(z);
else
throw z;
Y = c;
}
Y.name || (Y.name = O), e[O] = Y, Y.rawDefinition = x.bind(null, t), Y.aliases && D(Y.aliases, { languageName: O });
}
function P(O) {
delete e[O];
for (const x of Object.keys(n))
n[x] === O && delete n[x];
}
function q() {
return Object.keys(e);
}
function I(O) {
Ce("10.4.0", "requireLanguage will be removed entirely in v11."), Ce("10.4.0", "Please see https://github.com/highlightjs/highlight.js/pull/2844");
const x = k(O);
if (x)
return x;
throw new Error("The '{}' language is required, but not loaded.".replace("{}", O));
}
function k(O) {
return O = (O || "").toLowerCase(), e[O] || e[n[O]];
}
function D(O, { languageName: x }) {
typeof O == "string" && (O = [O]), O.forEach((Y) => {
n[Y.toLowerCase()] = x;
});
}
function W(O) {
const x = k(O);
return x && !x.disableAutodetect;
}
function te(O) {
O["before:highlightBlock"] && !O["before:highlightElement"] && (O["before:highlightElement"] = (x) => {
O["before:highlightBlock"](
Object.assign({ block: x.el }, x)
);
}), O["after:highlightBlock"] && !O["after:highlightElement"] && (O["after:highlightElement"] = (x) => {
O["after:highlightBlock"](
Object.assign({ block: x.el }, x)
);
});
}
function le(O) {
te(O), r.push(O);
}
function _e(O, x) {
const Y = O;
r.forEach(function(z) {
z[Y] && z[Y](x);
});
}
function Me(O) {
return Ce("10.2.0", "fixMarkup will be removed entirely in v11.0"), Ce("10.2.0", "Please see https://github.com/highlightjs/highlight.js/issues/2534"), S(O);
}
function ke(O) {
return Ce("10.7.0", "highlightBlock will be removed entirely in v12.0"), Ce("10.7.0", "Please use highlightElement now."), R(O);
}
Object.assign(t, {
highlight: p,
highlightAuto: g,
highlightAll: L,
fixMarkup: Me,
highlightElement: R,
// TODO: Remove with v12 API
highlightBlock: ke,
configure: v,
initHighlighting: h,
initHighlightingOnLoad: N,
registerLanguage: G,
unregisterLanguage: P,
listLanguages: q,
getLanguage: k,
registerAliases: D,
requireLanguage: I,
autoDetection: W,
inherit: Hi,
addPlugin: le,
// plugins for frameworks
vuePlugin: Lp(t).VuePlugin
}), t.debugMode = function() {
a = !1;
}, t.safeMode = function() {
a = !0;
}, t.versionString = Mp;
for (const O in xt)
typeof xt[O] == "object" && Sd(xt[O]);
return Object.assign(t, xt), t.addPlugin(f), t.addPlugin(kp), t.addPlugin(C), t;
};
var Fp = Up({}), Bp = Fp, sn, zi;
function Gp() {
if (zi) return sn;
zi = 1;
function t(e) {
var n = "[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+", r = "далее ", a = "возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ", o = r + a, i = "загрузитьизфайла ", c = "вебклиент вместо внешнеесоединение клиент конецобласти мобильноеприложениеклиент мобильноеприложениесервер наклиенте наклиентенасервере наклиентенасерверебезконтекста насервере насерверебезконтекста область перед после сервер толстыйклиентобычноеприложение толстыйклиентуправляемоеприложение тонкийклиент ", s = i + c, l = "разделительстраниц разделительстрок символтабуляции ", _ = "ansitooem oemtoansi ввестивидсубконто ввестиперечисление ввестипериод ввестиплансчетов выбранныйплансчетов датагод датамесяц датачисло заголовоксистемы значениевстроку значениеизстроки каталогиб каталогпользователя кодсимв конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лог лог10 максимальноеколичествосубконто названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найтиссылки началопериодаби началостандартногоинтервала начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода обработкаожидания основнойжурналрасчетов основнойплансчетов основнойязык очиститьокносообщений периодстр получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта префиксавтонумерации пропись пустоезначение разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо симв создатьобъект статусвозврата стрколичествострок сформироватьпозициюдокумента счетпокоду текущеевремя типзначения типзначениястр установитьтана установитьтапо фиксшаблон шаблон ", p = "acos asin atan base64значение base64строка cos exp log log10 pow sin sqrt tan xmlзначение xmlстрока xmlтип xmlтипзнч активноеокно безопасныйрежим безопасныйрежимразделенияданных булево ввестидату ввестизначение ввестистроку ввестичисло возможностьчтенияxml вопрос восстановитьзначение врег выгрузитьжурналрегистрации выполнитьобработкуоповещения выполнитьпроверкуправдоступа вычислить год данныеформывзначение дата день деньгода деньнедели добавитьмесяц заблокироватьданныедляредактирования заблокироватьработупользователя завершитьработусистемы загрузитьвнешнююкомпоненту закрытьсправку записатьjson записатьxml записатьдатуjson записьжурналарегистрации заполнитьзначениясвойств запроситьразрешениепользователя запуститьприложение запуститьсистему зафиксироватьтранзакцию значениевданныеформы значениевстрокувнутр значениевфайл значениезаполнено значениеизстрокивнутр значениеизфайла изxmlтипа импортмоделиxdto имякомпьютера имяпользователя инициализироватьпредопределенныеданные информацияобошибке каталогбиблиотекимобильногоустройства каталогвременныхфайлов каталогдокументов каталогпрограммы кодироватьстроку кодлокализацииинформационнойбазы кодсимвола командасистемы конецгода конецдня конецквартала конецмесяца конецминуты конецнедели конецчаса конфигурациябазыданныхизмененадинамически конфигурацияизменена копироватьданныеформы копироватьфайл краткоепредставлениеошибки лев макс местноевремя месяц мин минута монопольныйрежим найти найтинедопустимыесимволыxml найтиокнопонавигационнойссылке найтипомеченныенаудаление найтипоссылкам найтифайлы началогода началодня началоквартала началомесяца началоминуты началонедели началочаса начатьзапросразрешенияпользователя начатьзапускприложения начатькопированиефайла начатьперемещениефайла начатьподключениевнешнейкомпоненты начатьподключениерасширенияработыскриптографией начатьподключениерасширенияработысфайлами начатьпоискфайлов начатьполучениекаталогавременныхфайлов начатьполучениекаталогадокументов начатьполучениерабочегокаталогаданныхпользователя начатьполучениефайлов начатьпомещениефайла начатьпомещениефайлов начатьсозданиедвоичныхданныхизфайла начатьсозданиекаталога начатьтранзакцию начатьудалениефайлов начатьустановкувнешнейкомпоненты начатьустановкурасширенияработыскриптографией начатьустановкурасширенияработысфайлами неделягода необходимостьзавершениясоединения номерсеансаинформационной