html-to-docx-lite
Version:
HTML to DOCX converter
1,320 lines (1,314 loc) • 355 kB
JavaScript
import vt from "jszip";
import { fragment as y, create as re } from "xmlbuilder2";
import * as Ua from "htmlparser2";
import yi from "color-name";
const Fi = globalThis || void 0 || self;
var un = {}, Ge = {};
Ge.byteLength = wt;
Ge.toByteArray = Ft;
Ge.fromByteArray = jt;
var K = [], q = [], gt = typeof Uint8Array < "u" ? Uint8Array : Array, wa = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
for (var he = 0, bt = wa.length; he < bt; ++he)
K[he] = wa[he], q[wa.charCodeAt(he)] = he;
q[45] = 62;
q[95] = 63;
function mn(e) {
var a = e.length;
if (a % 4 > 0)
throw new Error("Invalid string. Length must be a multiple of 4");
var i = e.indexOf("=");
i === -1 && (i = a);
var s = i === a ? 0 : 4 - i % 4;
return [i, s];
}
function wt(e) {
var a = mn(e), i = a[0], s = a[1];
return (i + s) * 3 / 4 - s;
}
function yt(e, a, i) {
return (a + i) * 3 / 4 - i;
}
function Ft(e) {
var a, i = mn(e), s = i[0], o = i[1], r = new gt(yt(e, s, o)), p = 0, m = o > 0 ? s - 4 : s, d;
for (d = 0; d < m; d += 4)
a = q[e.charCodeAt(d)] << 18 | q[e.charCodeAt(d + 1)] << 12 | q[e.charCodeAt(d + 2)] << 6 | q[e.charCodeAt(d + 3)], r[p++] = a >> 16 & 255, r[p++] = a >> 8 & 255, r[p++] = a & 255;
return o === 2 && (a = q[e.charCodeAt(d)] << 2 | q[e.charCodeAt(d + 1)] >> 4, r[p++] = a & 255), o === 1 && (a = q[e.charCodeAt(d)] << 10 | q[e.charCodeAt(d + 1)] << 4 | q[e.charCodeAt(d + 2)] >> 2, r[p++] = a >> 8 & 255, r[p++] = a & 255), r;
}
function kt(e) {
return K[e >> 18 & 63] + K[e >> 12 & 63] + K[e >> 6 & 63] + K[e & 63];
}
function Et(e, a, i) {
for (var s, o = [], r = a; r < i; r += 3)
s = (e[r] << 16 & 16711680) + (e[r + 1] << 8 & 65280) + (e[r + 2] & 255), o.push(kt(s));
return o.join("");
}
function jt(e) {
for (var a, i = e.length, s = i % 3, o = [], r = 16383, p = 0, m = i - s; p < m; p += r)
o.push(Et(e, p, p + r > m ? m : p + r));
return s === 1 ? (a = e[i - 1], o.push(
K[a >> 2] + K[a << 4 & 63] + "=="
)) : s === 2 && (a = (e[i - 2] << 8) + e[i - 1], o.push(
K[a >> 10] + K[a >> 4 & 63] + K[a << 2 & 63] + "="
)), o.join("");
}
var Ja = {};
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
Ja.read = function(e, a, i, s, o) {
var r, p, m = o * 8 - s - 1, d = (1 << m) - 1, x = d >> 1, l = -7, v = i ? o - 1 : 0, E = i ? -1 : 1, I = e[a + v];
for (v += E, r = I & (1 << -l) - 1, I >>= -l, l += m; l > 0; r = r * 256 + e[a + v], v += E, l -= 8)
;
for (p = r & (1 << -l) - 1, r >>= -l, l += s; l > 0; p = p * 256 + e[a + v], v += E, l -= 8)
;
if (r === 0)
r = 1 - x;
else {
if (r === d)
return p ? NaN : (I ? -1 : 1) * (1 / 0);
p = p + Math.pow(2, s), r = r - x;
}
return (I ? -1 : 1) * p * Math.pow(2, r - s);
};
Ja.write = function(e, a, i, s, o, r) {
var p, m, d, x = r * 8 - o - 1, l = (1 << x) - 1, v = l >> 1, E = o === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, I = s ? 0 : r - 1, k = s ? 1 : -1, w = a < 0 || a === 0 && 1 / a < 0 ? 1 : 0;
for (a = Math.abs(a), isNaN(a) || a === 1 / 0 ? (m = isNaN(a) ? 1 : 0, p = l) : (p = Math.floor(Math.log(a) / Math.LN2), a * (d = Math.pow(2, -p)) < 1 && (p--, d *= 2), p + v >= 1 ? a += E / d : a += E * Math.pow(2, 1 - v), a * d >= 2 && (p++, d /= 2), p + v >= l ? (m = 0, p = l) : p + v >= 1 ? (m = (a * d - 1) * Math.pow(2, o), p = p + v) : (m = a * Math.pow(2, v - 1) * Math.pow(2, o), p = 0)); o >= 8; e[i + I] = m & 255, I += k, m /= 256, o -= 8)
;
for (p = p << o | m, x += o; x > 0; e[i + I] = p & 255, I += k, p /= 256, x -= 8)
;
e[i + I - k] |= w * 128;
};
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
(function(e) {
const a = Ge, i = Ja, s = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
e.Buffer = l, e.SlowBuffer = pe, e.INSPECT_MAX_BYTES = 50;
const o = 2147483647;
e.kMaxLength = o;
const { Uint8Array: r, ArrayBuffer: p, SharedArrayBuffer: m } = globalThis;
l.TYPED_ARRAY_SUPPORT = d(), !l.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
);
function d() {
try {
const c = new r(1), n = { foo: function() {
return 42;
} };
return Object.setPrototypeOf(n, r.prototype), Object.setPrototypeOf(c, n), c.foo() === 42;
} catch {
return !1;
}
}
Object.defineProperty(l.prototype, "parent", {
enumerable: !0,
get: function() {
if (l.isBuffer(this))
return this.buffer;
}
}), Object.defineProperty(l.prototype, "offset", {
enumerable: !0,
get: function() {
if (l.isBuffer(this))
return this.byteOffset;
}
});
function x(c) {
if (c > o)
throw new RangeError('The value "' + c + '" is invalid for option "size"');
const n = new r(c);
return Object.setPrototypeOf(n, l.prototype), n;
}
function l(c, n, t) {
if (typeof c == "number") {
if (typeof n == "string")
throw new TypeError(
'The "string" argument must be of type string. Received type number'
);
return k(c);
}
return v(c, n, t);
}
l.poolSize = 8192;
function v(c, n, t) {
if (typeof c == "string")
return w(c, n);
if (p.isView(c))
return j(c);
if (c == null)
throw new TypeError(
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof c
);
if (G(c, p) || c && G(c.buffer, p) || typeof m < "u" && (G(c, m) || c && G(c.buffer, m)))
return S(c, n, t);
if (typeof c == "number")
throw new TypeError(
'The "value" argument must not be of type number. Received type number'
);
const u = c.valueOf && c.valueOf();
if (u != null && u !== c)
return l.from(u, n, t);
const f = C(c);
if (f)
return f;
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof c[Symbol.toPrimitive] == "function")
return l.from(c[Symbol.toPrimitive]("string"), n, t);
throw new TypeError(
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof c
);
}
l.from = function(c, n, t) {
return v(c, n, t);
}, Object.setPrototypeOf(l.prototype, r.prototype), Object.setPrototypeOf(l, r);
function E(c) {
if (typeof c != "number")
throw new TypeError('"size" argument must be of type number');
if (c < 0)
throw new RangeError('The value "' + c + '" is invalid for option "size"');
}
function I(c, n, t) {
return E(c), c <= 0 ? x(c) : n !== void 0 ? typeof t == "string" ? x(c).fill(n, t) : x(c).fill(n) : x(c);
}
l.alloc = function(c, n, t) {
return I(c, n, t);
};
function k(c) {
return E(c), x(c < 0 ? 0 : U(c) | 0);
}
l.allocUnsafe = function(c) {
return k(c);
}, l.allocUnsafeSlow = function(c) {
return k(c);
};
function w(c, n) {
if ((typeof n != "string" || n === "") && (n = "utf8"), !l.isEncoding(n))
throw new TypeError("Unknown encoding: " + n);
const t = ci(c, n) | 0;
let u = x(t);
const f = u.write(c, n);
return f !== t && (u = u.slice(0, f)), u;
}
function F(c) {
const n = c.length < 0 ? 0 : U(c.length) | 0, t = x(n);
for (let u = 0; u < n; u += 1)
t[u] = c[u] & 255;
return t;
}
function j(c) {
if (G(c, r)) {
const n = new r(c);
return S(n.buffer, n.byteOffset, n.byteLength);
}
return F(c);
}
function S(c, n, t) {
if (n < 0 || c.byteLength < n)
throw new RangeError('"offset" is outside of buffer bounds');
if (c.byteLength < n + (t || 0))
throw new RangeError('"length" is outside of buffer bounds');
let u;
return n === void 0 && t === void 0 ? u = new r(c) : t === void 0 ? u = new r(c, n) : u = new r(c, n, t), Object.setPrototypeOf(u, l.prototype), u;
}
function C(c) {
if (l.isBuffer(c)) {
const n = U(c.length) | 0, t = x(n);
return t.length === 0 || c.copy(t, 0, 0, n), t;
}
if (c.length !== void 0)
return typeof c.length != "number" || ba(c.length) ? x(0) : F(c);
if (c.type === "Buffer" && Array.isArray(c.data))
return F(c.data);
}
function U(c) {
if (c >= o)
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + o.toString(16) + " bytes");
return c | 0;
}
function pe(c) {
return +c != c && (c = 0), l.alloc(+c);
}
l.isBuffer = function(n) {
return n != null && n._isBuffer === !0 && n !== l.prototype;
}, l.compare = function(n, t) {
if (G(n, r) && (n = l.from(n, n.offset, n.byteLength)), G(t, r) && (t = l.from(t, t.offset, t.byteLength)), !l.isBuffer(n) || !l.isBuffer(t))
throw new TypeError(
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
);
if (n === t)
return 0;
let u = n.length, f = t.length;
for (let g = 0, b = Math.min(u, f); g < b; ++g)
if (n[g] !== t[g]) {
u = n[g], f = t[g];
break;
}
return u < f ? -1 : f < u ? 1 : 0;
}, l.isEncoding = function(n) {
switch (String(n).toLowerCase()) {
case "hex":
case "utf8":
case "utf-8":
case "ascii":
case "latin1":
case "binary":
case "base64":
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return !0;
default:
return !1;
}
}, l.concat = function(n, t) {
if (!Array.isArray(n))
throw new TypeError('"list" argument must be an Array of Buffers');
if (n.length === 0)
return l.alloc(0);
let u;
if (t === void 0)
for (t = 0, u = 0; u < n.length; ++u)
t += n[u].length;
const f = l.allocUnsafe(t);
let g = 0;
for (u = 0; u < n.length; ++u) {
let b = n[u];
if (G(b, r))
g + b.length > f.length ? (l.isBuffer(b) || (b = l.from(b)), b.copy(f, g)) : r.prototype.set.call(
f,
b,
g
);
else if (l.isBuffer(b))
b.copy(f, g);
else
throw new TypeError('"list" argument must be an Array of Buffers');
g += b.length;
}
return f;
};
function ci(c, n) {
if (l.isBuffer(c))
return c.length;
if (p.isView(c) || G(c, p))
return c.byteLength;
if (typeof c != "string")
throw new TypeError(
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof c
);
const t = c.length, u = arguments.length > 2 && arguments[2] === !0;
if (!u && t === 0)
return 0;
let f = !1;
for (; ; )
switch (n) {
case "ascii":
case "latin1":
case "binary":
return t;
case "utf8":
case "utf-8":
return ga(c).length;
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return t * 2;
case "hex":
return t >>> 1;
case "base64":
return wi(c).length;
default:
if (f)
return u ? -1 : ga(c).length;
n = ("" + n).toLowerCase(), f = !0;
}
}
l.byteLength = ci;
function Zn(c, n, t) {
let u = !1;
if ((n === void 0 || n < 0) && (n = 0), n > this.length || ((t === void 0 || t > this.length) && (t = this.length), t <= 0) || (t >>>= 0, n >>>= 0, t <= n))
return "";
for (c || (c = "utf8"); ; )
switch (c) {
case "hex":
return ct(this, n, t);
case "utf8":
case "utf-8":
return ui(this, n, t);
case "ascii":
return ot(this, n, t);
case "latin1":
case "binary":
return rt(this, n, t);
case "base64":
return tt(this, n, t);
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return pt(this, n, t);
default:
if (u)
throw new TypeError("Unknown encoding: " + c);
c = (c + "").toLowerCase(), u = !0;
}
}
l.prototype._isBuffer = !0;
function le(c, n, t) {
const u = c[n];
c[n] = c[t], c[t] = u;
}
l.prototype.swap16 = function() {
const n = this.length;
if (n % 2 !== 0)
throw new RangeError("Buffer size must be a multiple of 16-bits");
for (let t = 0; t < n; t += 2)
le(this, t, t + 1);
return this;
}, l.prototype.swap32 = function() {
const n = this.length;
if (n % 4 !== 0)
throw new RangeError("Buffer size must be a multiple of 32-bits");
for (let t = 0; t < n; t += 4)
le(this, t, t + 3), le(this, t + 1, t + 2);
return this;
}, l.prototype.swap64 = function() {
const n = this.length;
if (n % 8 !== 0)
throw new RangeError("Buffer size must be a multiple of 64-bits");
for (let t = 0; t < n; t += 8)
le(this, t, t + 7), le(this, t + 1, t + 6), le(this, t + 2, t + 5), le(this, t + 3, t + 4);
return this;
}, l.prototype.toString = function() {
const n = this.length;
return n === 0 ? "" : arguments.length === 0 ? ui(this, 0, n) : Zn.apply(this, arguments);
}, l.prototype.toLocaleString = l.prototype.toString, l.prototype.equals = function(n) {
if (!l.isBuffer(n))
throw new TypeError("Argument must be a Buffer");
return this === n ? !0 : l.compare(this, n) === 0;
}, l.prototype.inspect = function() {
let n = "";
const t = e.INSPECT_MAX_BYTES;
return n = this.toString("hex", 0, t).replace(/(.{2})/g, "$1 ").trim(), this.length > t && (n += " ... "), "<Buffer " + n + ">";
}, s && (l.prototype[s] = l.prototype.inspect), l.prototype.compare = function(n, t, u, f, g) {
if (G(n, r) && (n = l.from(n, n.offset, n.byteLength)), !l.isBuffer(n))
throw new TypeError(
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof n
);
if (t === void 0 && (t = 0), u === void 0 && (u = n ? n.length : 0), f === void 0 && (f = 0), g === void 0 && (g = this.length), t < 0 || u > n.length || f < 0 || g > this.length)
throw new RangeError("out of range index");
if (f >= g && t >= u)
return 0;
if (f >= g)
return -1;
if (t >= u)
return 1;
if (t >>>= 0, u >>>= 0, f >>>= 0, g >>>= 0, this === n)
return 0;
let b = g - f, T = u - t;
const _ = Math.min(b, T), L = this.slice(f, g), M = n.slice(t, u);
for (let B = 0; B < _; ++B)
if (L[B] !== M[B]) {
b = L[B], T = M[B];
break;
}
return b < T ? -1 : T < b ? 1 : 0;
};
function pi(c, n, t, u, f) {
if (c.length === 0)
return -1;
if (typeof t == "string" ? (u = t, t = 0) : t > 2147483647 ? t = 2147483647 : t < -2147483648 && (t = -2147483648), t = +t, ba(t) && (t = f ? 0 : c.length - 1), t < 0 && (t = c.length + t), t >= c.length) {
if (f)
return -1;
t = c.length - 1;
} else if (t < 0)
if (f)
t = 0;
else
return -1;
if (typeof n == "string" && (n = l.from(n, u)), l.isBuffer(n))
return n.length === 0 ? -1 : li(c, n, t, u, f);
if (typeof n == "number")
return n = n & 255, typeof r.prototype.indexOf == "function" ? f ? r.prototype.indexOf.call(c, n, t) : r.prototype.lastIndexOf.call(c, n, t) : li(c, [n], t, u, f);
throw new TypeError("val must be string, number or Buffer");
}
function li(c, n, t, u, f) {
let g = 1, b = c.length, T = n.length;
if (u !== void 0 && (u = String(u).toLowerCase(), u === "ucs2" || u === "ucs-2" || u === "utf16le" || u === "utf-16le")) {
if (c.length < 2 || n.length < 2)
return -1;
g = 2, b /= 2, T /= 2, t /= 2;
}
function _(M, B) {
return g === 1 ? M[B] : M.readUInt16BE(B * g);
}
let L;
if (f) {
let M = -1;
for (L = t; L < b; L++)
if (_(c, L) === _(n, M === -1 ? 0 : L - M)) {
if (M === -1 && (M = L), L - M + 1 === T)
return M * g;
} else
M !== -1 && (L -= L - M), M = -1;
} else
for (t + T > b && (t = b - T), L = t; L >= 0; L--) {
let M = !0;
for (let B = 0; B < T; B++)
if (_(c, L + B) !== _(n, B)) {
M = !1;
break;
}
if (M)
return L;
}
return -1;
}
l.prototype.includes = function(n, t, u) {
return this.indexOf(n, t, u) !== -1;
}, l.prototype.indexOf = function(n, t, u) {
return pi(this, n, t, u, !0);
}, l.prototype.lastIndexOf = function(n, t, u) {
return pi(this, n, t, u, !1);
};
function Qn(c, n, t, u) {
t = Number(t) || 0;
const f = c.length - t;
u ? (u = Number(u), u > f && (u = f)) : u = f;
const g = n.length;
u > g / 2 && (u = g / 2);
let b;
for (b = 0; b < u; ++b) {
const T = parseInt(n.substr(b * 2, 2), 16);
if (ba(T))
return b;
c[t + b] = T;
}
return b;
}
function et(c, n, t, u) {
return _e(ga(n, c.length - t), c, t, u);
}
function at(c, n, t, u) {
return _e(dt(n), c, t, u);
}
function it(c, n, t, u) {
return _e(wi(n), c, t, u);
}
function nt(c, n, t, u) {
return _e(ft(n, c.length - t), c, t, u);
}
l.prototype.write = function(n, t, u, f) {
if (t === void 0)
f = "utf8", u = this.length, t = 0;
else if (u === void 0 && typeof t == "string")
f = t, u = this.length, t = 0;
else if (isFinite(t))
t = t >>> 0, isFinite(u) ? (u = u >>> 0, f === void 0 && (f = "utf8")) : (f = u, u = void 0);
else
throw new Error(
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
);
const g = this.length - t;
if ((u === void 0 || u > g) && (u = g), n.length > 0 && (u < 0 || t < 0) || t > this.length)
throw new RangeError("Attempt to write outside buffer bounds");
f || (f = "utf8");
let b = !1;
for (; ; )
switch (f) {
case "hex":
return Qn(this, n, t, u);
case "utf8":
case "utf-8":
return et(this, n, t, u);
case "ascii":
case "latin1":
case "binary":
return at(this, n, t, u);
case "base64":
return it(this, n, t, u);
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return nt(this, n, t, u);
default:
if (b)
throw new TypeError("Unknown encoding: " + f);
f = ("" + f).toLowerCase(), b = !0;
}
}, l.prototype.toJSON = function() {
return {
type: "Buffer",
data: Array.prototype.slice.call(this._arr || this, 0)
};
};
function tt(c, n, t) {
return n === 0 && t === c.length ? a.fromByteArray(c) : a.fromByteArray(c.slice(n, t));
}
function ui(c, n, t) {
t = Math.min(c.length, t);
const u = [];
let f = n;
for (; f < t; ) {
const g = c[f];
let b = null, T = g > 239 ? 4 : g > 223 ? 3 : g > 191 ? 2 : 1;
if (f + T <= t) {
let _, L, M, B;
switch (T) {
case 1:
g < 128 && (b = g);
break;
case 2:
_ = c[f + 1], (_ & 192) === 128 && (B = (g & 31) << 6 | _ & 63, B > 127 && (b = B));
break;
case 3:
_ = c[f + 1], L = c[f + 2], (_ & 192) === 128 && (L & 192) === 128 && (B = (g & 15) << 12 | (_ & 63) << 6 | L & 63, B > 2047 && (B < 55296 || B > 57343) && (b = B));
break;
case 4:
_ = c[f + 1], L = c[f + 2], M = c[f + 3], (_ & 192) === 128 && (L & 192) === 128 && (M & 192) === 128 && (B = (g & 15) << 18 | (_ & 63) << 12 | (L & 63) << 6 | M & 63, B > 65535 && B < 1114112 && (b = B));
}
}
b === null ? (b = 65533, T = 1) : b > 65535 && (b -= 65536, u.push(b >>> 10 & 1023 | 55296), b = 56320 | b & 1023), u.push(b), f += T;
}
return st(u);
}
const mi = 4096;
function st(c) {
const n = c.length;
if (n <= mi)
return String.fromCharCode.apply(String, c);
let t = "", u = 0;
for (; u < n; )
t += String.fromCharCode.apply(
String,
c.slice(u, u += mi)
);
return t;
}
function ot(c, n, t) {
let u = "";
t = Math.min(c.length, t);
for (let f = n; f < t; ++f)
u += String.fromCharCode(c[f] & 127);
return u;
}
function rt(c, n, t) {
let u = "";
t = Math.min(c.length, t);
for (let f = n; f < t; ++f)
u += String.fromCharCode(c[f]);
return u;
}
function ct(c, n, t) {
const u = c.length;
(!n || n < 0) && (n = 0), (!t || t < 0 || t > u) && (t = u);
let f = "";
for (let g = n; g < t; ++g)
f += xt[c[g]];
return f;
}
function pt(c, n, t) {
const u = c.slice(n, t);
let f = "";
for (let g = 0; g < u.length - 1; g += 2)
f += String.fromCharCode(u[g] + u[g + 1] * 256);
return f;
}
l.prototype.slice = function(n, t) {
const u = this.length;
n = ~~n, t = t === void 0 ? u : ~~t, n < 0 ? (n += u, n < 0 && (n = 0)) : n > u && (n = u), t < 0 ? (t += u, t < 0 && (t = 0)) : t > u && (t = u), t < n && (t = n);
const f = this.subarray(n, t);
return Object.setPrototypeOf(f, l.prototype), f;
};
function O(c, n, t) {
if (c % 1 !== 0 || c < 0)
throw new RangeError("offset is not uint");
if (c + n > t)
throw new RangeError("Trying to access beyond buffer length");
}
l.prototype.readUintLE = l.prototype.readUIntLE = function(n, t, u) {
n = n >>> 0, t = t >>> 0, u || O(n, t, this.length);
let f = this[n], g = 1, b = 0;
for (; ++b < t && (g *= 256); )
f += this[n + b] * g;
return f;
}, l.prototype.readUintBE = l.prototype.readUIntBE = function(n, t, u) {
n = n >>> 0, t = t >>> 0, u || O(n, t, this.length);
let f = this[n + --t], g = 1;
for (; t > 0 && (g *= 256); )
f += this[n + --t] * g;
return f;
}, l.prototype.readUint8 = l.prototype.readUInt8 = function(n, t) {
return n = n >>> 0, t || O(n, 1, this.length), this[n];
}, l.prototype.readUint16LE = l.prototype.readUInt16LE = function(n, t) {
return n = n >>> 0, t || O(n, 2, this.length), this[n] | this[n + 1] << 8;
}, l.prototype.readUint16BE = l.prototype.readUInt16BE = function(n, t) {
return n = n >>> 0, t || O(n, 2, this.length), this[n] << 8 | this[n + 1];
}, l.prototype.readUint32LE = l.prototype.readUInt32LE = function(n, t) {
return n = n >>> 0, t || O(n, 4, this.length), (this[n] | this[n + 1] << 8 | this[n + 2] << 16) + this[n + 3] * 16777216;
}, l.prototype.readUint32BE = l.prototype.readUInt32BE = function(n, t) {
return n = n >>> 0, t || O(n, 4, this.length), this[n] * 16777216 + (this[n + 1] << 16 | this[n + 2] << 8 | this[n + 3]);
}, l.prototype.readBigUInt64LE = te(function(n) {
n = n >>> 0, xe(n, "offset");
const t = this[n], u = this[n + 7];
(t === void 0 || u === void 0) && je(n, this.length - 8);
const f = t + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24, g = this[++n] + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + u * 2 ** 24;
return BigInt(f) + (BigInt(g) << BigInt(32));
}), l.prototype.readBigUInt64BE = te(function(n) {
n = n >>> 0, xe(n, "offset");
const t = this[n], u = this[n + 7];
(t === void 0 || u === void 0) && je(n, this.length - 8);
const f = t * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + this[++n], g = this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + u;
return (BigInt(f) << BigInt(32)) + BigInt(g);
}), l.prototype.readIntLE = function(n, t, u) {
n = n >>> 0, t = t >>> 0, u || O(n, t, this.length);
let f = this[n], g = 1, b = 0;
for (; ++b < t && (g *= 256); )
f += this[n + b] * g;
return g *= 128, f >= g && (f -= Math.pow(2, 8 * t)), f;
}, l.prototype.readIntBE = function(n, t, u) {
n = n >>> 0, t = t >>> 0, u || O(n, t, this.length);
let f = t, g = 1, b = this[n + --f];
for (; f > 0 && (g *= 256); )
b += this[n + --f] * g;
return g *= 128, b >= g && (b -= Math.pow(2, 8 * t)), b;
}, l.prototype.readInt8 = function(n, t) {
return n = n >>> 0, t || O(n, 1, this.length), this[n] & 128 ? (255 - this[n] + 1) * -1 : this[n];
}, l.prototype.readInt16LE = function(n, t) {
n = n >>> 0, t || O(n, 2, this.length);
const u = this[n] | this[n + 1] << 8;
return u & 32768 ? u | 4294901760 : u;
}, l.prototype.readInt16BE = function(n, t) {
n = n >>> 0, t || O(n, 2, this.length);
const u = this[n + 1] | this[n] << 8;
return u & 32768 ? u | 4294901760 : u;
}, l.prototype.readInt32LE = function(n, t) {
return n = n >>> 0, t || O(n, 4, this.length), this[n] | this[n + 1] << 8 | this[n + 2] << 16 | this[n + 3] << 24;
}, l.prototype.readInt32BE = function(n, t) {
return n = n >>> 0, t || O(n, 4, this.length), this[n] << 24 | this[n + 1] << 16 | this[n + 2] << 8 | this[n + 3];
}, l.prototype.readBigInt64LE = te(function(n) {
n = n >>> 0, xe(n, "offset");
const t = this[n], u = this[n + 7];
(t === void 0 || u === void 0) && je(n, this.length - 8);
const f = this[n + 4] + this[n + 5] * 2 ** 8 + this[n + 6] * 2 ** 16 + (u << 24);
return (BigInt(f) << BigInt(32)) + BigInt(t + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24);
}), l.prototype.readBigInt64BE = te(function(n) {
n = n >>> 0, xe(n, "offset");
const t = this[n], u = this[n + 7];
(t === void 0 || u === void 0) && je(n, this.length - 8);
const f = (t << 24) + // Overflow
this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + this[++n];
return (BigInt(f) << BigInt(32)) + BigInt(this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + u);
}), l.prototype.readFloatLE = function(n, t) {
return n = n >>> 0, t || O(n, 4, this.length), i.read(this, n, !0, 23, 4);
}, l.prototype.readFloatBE = function(n, t) {
return n = n >>> 0, t || O(n, 4, this.length), i.read(this, n, !1, 23, 4);
}, l.prototype.readDoubleLE = function(n, t) {
return n = n >>> 0, t || O(n, 8, this.length), i.read(this, n, !0, 52, 8);
}, l.prototype.readDoubleBE = function(n, t) {
return n = n >>> 0, t || O(n, 8, this.length), i.read(this, n, !1, 52, 8);
};
function $(c, n, t, u, f, g) {
if (!l.isBuffer(c))
throw new TypeError('"buffer" argument must be a Buffer instance');
if (n > f || n < g)
throw new RangeError('"value" argument is out of bounds');
if (t + u > c.length)
throw new RangeError("Index out of range");
}
l.prototype.writeUintLE = l.prototype.writeUIntLE = function(n, t, u, f) {
if (n = +n, t = t >>> 0, u = u >>> 0, !f) {
const T = Math.pow(2, 8 * u) - 1;
$(this, n, t, u, T, 0);
}
let g = 1, b = 0;
for (this[t] = n & 255; ++b < u && (g *= 256); )
this[t + b] = n / g & 255;
return t + u;
}, l.prototype.writeUintBE = l.prototype.writeUIntBE = function(n, t, u, f) {
if (n = +n, t = t >>> 0, u = u >>> 0, !f) {
const T = Math.pow(2, 8 * u) - 1;
$(this, n, t, u, T, 0);
}
let g = u - 1, b = 1;
for (this[t + g] = n & 255; --g >= 0 && (b *= 256); )
this[t + g] = n / b & 255;
return t + u;
}, l.prototype.writeUint8 = l.prototype.writeUInt8 = function(n, t, u) {
return n = +n, t = t >>> 0, u || $(this, n, t, 1, 255, 0), this[t] = n & 255, t + 1;
}, l.prototype.writeUint16LE = l.prototype.writeUInt16LE = function(n, t, u) {
return n = +n, t = t >>> 0, u || $(this, n, t, 2, 65535, 0), this[t] = n & 255, this[t + 1] = n >>> 8, t + 2;
}, l.prototype.writeUint16BE = l.prototype.writeUInt16BE = function(n, t, u) {
return n = +n, t = t >>> 0, u || $(this, n, t, 2, 65535, 0), this[t] = n >>> 8, this[t + 1] = n & 255, t + 2;
}, l.prototype.writeUint32LE = l.prototype.writeUInt32LE = function(n, t, u) {
return n = +n, t = t >>> 0, u || $(this, n, t, 4, 4294967295, 0), this[t + 3] = n >>> 24, this[t + 2] = n >>> 16, this[t + 1] = n >>> 8, this[t] = n & 255, t + 4;
}, l.prototype.writeUint32BE = l.prototype.writeUInt32BE = function(n, t, u) {
return n = +n, t = t >>> 0, u || $(this, n, t, 4, 4294967295, 0), this[t] = n >>> 24, this[t + 1] = n >>> 16, this[t + 2] = n >>> 8, this[t + 3] = n & 255, t + 4;
};
function di(c, n, t, u, f) {
bi(n, u, f, c, t, 7);
let g = Number(n & BigInt(4294967295));
c[t++] = g, g = g >> 8, c[t++] = g, g = g >> 8, c[t++] = g, g = g >> 8, c[t++] = g;
let b = Number(n >> BigInt(32) & BigInt(4294967295));
return c[t++] = b, b = b >> 8, c[t++] = b, b = b >> 8, c[t++] = b, b = b >> 8, c[t++] = b, t;
}
function fi(c, n, t, u, f) {
bi(n, u, f, c, t, 7);
let g = Number(n & BigInt(4294967295));
c[t + 7] = g, g = g >> 8, c[t + 6] = g, g = g >> 8, c[t + 5] = g, g = g >> 8, c[t + 4] = g;
let b = Number(n >> BigInt(32) & BigInt(4294967295));
return c[t + 3] = b, b = b >> 8, c[t + 2] = b, b = b >> 8, c[t + 1] = b, b = b >> 8, c[t] = b, t + 8;
}
l.prototype.writeBigUInt64LE = te(function(n, t = 0) {
return di(this, n, t, BigInt(0), BigInt("0xffffffffffffffff"));
}), l.prototype.writeBigUInt64BE = te(function(n, t = 0) {
return fi(this, n, t, BigInt(0), BigInt("0xffffffffffffffff"));
}), l.prototype.writeIntLE = function(n, t, u, f) {
if (n = +n, t = t >>> 0, !f) {
const _ = Math.pow(2, 8 * u - 1);
$(this, n, t, u, _ - 1, -_);
}
let g = 0, b = 1, T = 0;
for (this[t] = n & 255; ++g < u && (b *= 256); )
n < 0 && T === 0 && this[t + g - 1] !== 0 && (T = 1), this[t + g] = (n / b >> 0) - T & 255;
return t + u;
}, l.prototype.writeIntBE = function(n, t, u, f) {
if (n = +n, t = t >>> 0, !f) {
const _ = Math.pow(2, 8 * u - 1);
$(this, n, t, u, _ - 1, -_);
}
let g = u - 1, b = 1, T = 0;
for (this[t + g] = n & 255; --g >= 0 && (b *= 256); )
n < 0 && T === 0 && this[t + g + 1] !== 0 && (T = 1), this[t + g] = (n / b >> 0) - T & 255;
return t + u;
}, l.prototype.writeInt8 = function(n, t, u) {
return n = +n, t = t >>> 0, u || $(this, n, t, 1, 127, -128), n < 0 && (n = 255 + n + 1), this[t] = n & 255, t + 1;
}, l.prototype.writeInt16LE = function(n, t, u) {
return n = +n, t = t >>> 0, u || $(this, n, t, 2, 32767, -32768), this[t] = n & 255, this[t + 1] = n >>> 8, t + 2;
}, l.prototype.writeInt16BE = function(n, t, u) {
return n = +n, t = t >>> 0, u || $(this, n, t, 2, 32767, -32768), this[t] = n >>> 8, this[t + 1] = n & 255, t + 2;
}, l.prototype.writeInt32LE = function(n, t, u) {
return n = +n, t = t >>> 0, u || $(this, n, t, 4, 2147483647, -2147483648), this[t] = n & 255, this[t + 1] = n >>> 8, this[t + 2] = n >>> 16, this[t + 3] = n >>> 24, t + 4;
}, l.prototype.writeInt32BE = function(n, t, u) {
return n = +n, t = t >>> 0, u || $(this, n, t, 4, 2147483647, -2147483648), n < 0 && (n = 4294967295 + n + 1), this[t] = n >>> 24, this[t + 1] = n >>> 16, this[t + 2] = n >>> 8, this[t + 3] = n & 255, t + 4;
}, l.prototype.writeBigInt64LE = te(function(n, t = 0) {
return di(this, n, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
}), l.prototype.writeBigInt64BE = te(function(n, t = 0) {
return fi(this, n, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
});
function xi(c, n, t, u, f, g) {
if (t + u > c.length)
throw new RangeError("Index out of range");
if (t < 0)
throw new RangeError("Index out of range");
}
function hi(c, n, t, u, f) {
return n = +n, t = t >>> 0, f || xi(c, n, t, 4), i.write(c, n, t, u, 23, 4), t + 4;
}
l.prototype.writeFloatLE = function(n, t, u) {
return hi(this, n, t, !0, u);
}, l.prototype.writeFloatBE = function(n, t, u) {
return hi(this, n, t, !1, u);
};
function vi(c, n, t, u, f) {
return n = +n, t = t >>> 0, f || xi(c, n, t, 8), i.write(c, n, t, u, 52, 8), t + 8;
}
l.prototype.writeDoubleLE = function(n, t, u) {
return vi(this, n, t, !0, u);
}, l.prototype.writeDoubleBE = function(n, t, u) {
return vi(this, n, t, !1, u);
}, l.prototype.copy = function(n, t, u, f) {
if (!l.isBuffer(n))
throw new TypeError("argument should be a Buffer");
if (u || (u = 0), !f && f !== 0 && (f = this.length), t >= n.length && (t = n.length), t || (t = 0), f > 0 && f < u && (f = u), f === u || n.length === 0 || this.length === 0)
return 0;
if (t < 0)
throw new RangeError("targetStart out of bounds");
if (u < 0 || u >= this.length)
throw new RangeError("Index out of range");
if (f < 0)
throw new RangeError("sourceEnd out of bounds");
f > this.length && (f = this.length), n.length - t < f - u && (f = n.length - t + u);
const g = f - u;
return this === n && typeof r.prototype.copyWithin == "function" ? this.copyWithin(t, u, f) : r.prototype.set.call(
n,
this.subarray(u, f),
t
), g;
}, l.prototype.fill = function(n, t, u, f) {
if (typeof n == "string") {
if (typeof t == "string" ? (f = t, t = 0, u = this.length) : typeof u == "string" && (f = u, u = this.length), f !== void 0 && typeof f != "string")
throw new TypeError("encoding must be a string");
if (typeof f == "string" && !l.isEncoding(f))
throw new TypeError("Unknown encoding: " + f);
if (n.length === 1) {
const b = n.charCodeAt(0);
(f === "utf8" && b < 128 || f === "latin1") && (n = b);
}
} else
typeof n == "number" ? n = n & 255 : typeof n == "boolean" && (n = Number(n));
if (t < 0 || this.length < t || this.length < u)
throw new RangeError("Out of range index");
if (u <= t)
return this;
t = t >>> 0, u = u === void 0 ? this.length : u >>> 0, n || (n = 0);
let g;
if (typeof n == "number")
for (g = t; g < u; ++g)
this[g] = n;
else {
const b = l.isBuffer(n) ? n : l.from(n, f), T = b.length;
if (T === 0)
throw new TypeError('The value "' + n + '" is invalid for argument "value"');
for (g = 0; g < u - t; ++g)
this[g + t] = b[g % T];
}
return this;
};
const fe = {};
function va(c, n, t) {
fe[c] = class extends t {
constructor() {
super(), Object.defineProperty(this, "message", {
value: n.apply(this, arguments),
writable: !0,
configurable: !0
}), this.name = `${this.name} [${c}]`, this.stack, delete this.name;
}
get code() {
return c;
}
set code(f) {
Object.defineProperty(this, "code", {
configurable: !0,
enumerable: !0,
value: f,
writable: !0
});
}
toString() {
return `${this.name} [${c}]: ${this.message}`;
}
};
}
va(
"ERR_BUFFER_OUT_OF_BOUNDS",
function(c) {
return c ? `${c} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
},
RangeError
), va(
"ERR_INVALID_ARG_TYPE",
function(c, n) {
return `The "${c}" argument must be of type number. Received type ${typeof n}`;
},
TypeError
), va(
"ERR_OUT_OF_RANGE",
function(c, n, t) {
let u = `The value of "${c}" is out of range.`, f = t;
return Number.isInteger(t) && Math.abs(t) > 2 ** 32 ? f = gi(String(t)) : typeof t == "bigint" && (f = String(t), (t > BigInt(2) ** BigInt(32) || t < -(BigInt(2) ** BigInt(32))) && (f = gi(f)), f += "n"), u += ` It must be ${n}. Received ${f}`, u;
},
RangeError
);
function gi(c) {
let n = "", t = c.length;
const u = c[0] === "-" ? 1 : 0;
for (; t >= u + 4; t -= 3)
n = `_${c.slice(t - 3, t)}${n}`;
return `${c.slice(0, t)}${n}`;
}
function lt(c, n, t) {
xe(n, "offset"), (c[n] === void 0 || c[n + t] === void 0) && je(n, c.length - (t + 1));
}
function bi(c, n, t, u, f, g) {
if (c > t || c < n) {
const b = typeof n == "bigint" ? "n" : "";
let T;
throw g > 3 ? n === 0 || n === BigInt(0) ? T = `>= 0${b} and < 2${b} ** ${(g + 1) * 8}${b}` : T = `>= -(2${b} ** ${(g + 1) * 8 - 1}${b}) and < 2 ** ${(g + 1) * 8 - 1}${b}` : T = `>= ${n}${b} and <= ${t}${b}`, new fe.ERR_OUT_OF_RANGE("value", T, c);
}
lt(u, f, g);
}
function xe(c, n) {
if (typeof c != "number")
throw new fe.ERR_INVALID_ARG_TYPE(n, "number", c);
}
function je(c, n, t) {
throw Math.floor(c) !== c ? (xe(c, t), new fe.ERR_OUT_OF_RANGE(t || "offset", "an integer", c)) : n < 0 ? new fe.ERR_BUFFER_OUT_OF_BOUNDS() : new fe.ERR_OUT_OF_RANGE(
t || "offset",
`>= ${t ? 1 : 0} and <= ${n}`,
c
);
}
const ut = /[^+/0-9A-Za-z-_]/g;
function mt(c) {
if (c = c.split("=")[0], c = c.trim().replace(ut, ""), c.length < 2)
return "";
for (; c.length % 4 !== 0; )
c = c + "=";
return c;
}
function ga(c, n) {
n = n || 1 / 0;
let t;
const u = c.length;
let f = null;
const g = [];
for (let b = 0; b < u; ++b) {
if (t = c.charCodeAt(b), t > 55295 && t < 57344) {
if (!f) {
if (t > 56319) {
(n -= 3) > -1 && g.push(239, 191, 189);
continue;
} else if (b + 1 === u) {
(n -= 3) > -1 && g.push(239, 191, 189);
continue;
}
f = t;
continue;
}
if (t < 56320) {
(n -= 3) > -1 && g.push(239, 191, 189), f = t;
continue;
}
t = (f - 55296 << 10 | t - 56320) + 65536;
} else
f && (n -= 3) > -1 && g.push(239, 191, 189);
if (f = null, t < 128) {
if ((n -= 1) < 0)
break;
g.push(t);
} else if (t < 2048) {
if ((n -= 2) < 0)
break;
g.push(
t >> 6 | 192,
t & 63 | 128
);
} else if (t < 65536) {
if ((n -= 3) < 0)
break;
g.push(
t >> 12 | 224,
t >> 6 & 63 | 128,
t & 63 | 128
);
} else if (t < 1114112) {
if ((n -= 4) < 0)
break;
g.push(
t >> 18 | 240,
t >> 12 & 63 | 128,
t >> 6 & 63 | 128,
t & 63 | 128
);
} else
throw new Error("Invalid code point");
}
return g;
}
function dt(c) {
const n = [];
for (let t = 0; t < c.length; ++t)
n.push(c.charCodeAt(t) & 255);
return n;
}
function ft(c, n) {
let t, u, f;
const g = [];
for (let b = 0; b < c.length && !((n -= 2) < 0); ++b)
t = c.charCodeAt(b), u = t >> 8, f = t % 256, g.push(f), g.push(u);
return g;
}
function wi(c) {
return a.toByteArray(mt(c));
}
function _e(c, n, t, u) {
let f;
for (f = 0; f < u && !(f + t >= n.length || f >= c.length); ++f)
n[f + t] = c[f];
return f;
}
function G(c, n) {
return c instanceof n || c != null && c.constructor != null && c.constructor.name != null && c.constructor.name === n.name;
}
function ba(c) {
return c !== c;
}
const xt = function() {
const c = "0123456789abcdef", n = new Array(256);
for (let t = 0; t < 16; ++t) {
const u = t * 16;
for (let f = 0; f < 16; ++f)
n[u + f] = c[t] + c[f];
}
return n;
}();
function te(c) {
return typeof BigInt > "u" ? ht : c;
}
function ht() {
throw new Error("BigInt not supported");
}
})(un);
const Tt = un.Buffer, It = `
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
<Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" />
<Default Extension="jpeg" ContentType="image/jpeg"/>
<Default Extension="png" ContentType="image/png"/>
<Default Extension="xml" ContentType="application/xml"/>
<Override PartName="/_rels/.rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
<Override PartName="/word/_rels/document.xml.rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>
<Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/>
<Override PartName="/word/numbering.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"/>
<Override PartName="/word/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/>
<Override PartName="/word/fontTable.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"/>
<Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>
<Override PartName="/word/settings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"/>
<Override PartName="/word/webSettings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml"/>
</Types>
`, h = {
a: "http://schemas.openxmlformats.org/drawingml/2006/main",
b: "http://schemas.openxmlformats.org/officeDocument/2006/bibliography",
cdr: "http://schemas.openxmlformats.org/drawingml/2006/chartDrawing",
dc: "http://purl.org/dc/elements/1.1/",
dcmitype: "http://purl.org/dc/dcmitype/",
dcterms: "http://purl.org/dc/terms/",
o: "urn:schemas-microsoft-com:office:office",
pic: "http://schemas.openxmlformats.org/drawingml/2006/picture",
r: "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
v: "urn:schemas-microsoft-com:vml",
ve: "http://schemas.openxmlformats.org/markup-compatibility/2006",
vt: "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",
w: "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
w10: "urn:schemas-microsoft-com:office:word",
wp: "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",
wne: "http://schemas.microsoft.com/office/word/2006/wordml",
xsd: "http://www.w3.org/2001/XMLSchema",
xsi: "http://www.w3.org/2001/XMLSchema-instance",
numbering: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",
fontTable: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",
hyperlinks: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",
images: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",
styles: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",
headers: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",
footers: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",
themes: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",
coreProperties: "http://schemas.openxmlformats.org/package/2006/metadata/core-properties",
officeDocumentRelation: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",
corePropertiesRelation: "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",
settingsRelation: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",
webSettingsRelation: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",
sl: "http://schemas.openxmlformats.org/schemaLibrary/2006/main",
contentTypes: "http://schemas.openxmlformats.org/package/2006/content-types",
relationship: "http://schemas.openxmlformats.org/package/2006/relationships"
}, ie = "html-to-docx", dn = "portrait", fn = 15840, xn = 12240, St = {
top: 1800,
right: 1440,
bottom: 1800,
left: 1440,
header: 720,
footer: 720,
gutter: 0
}, hn = {
top: 1440,
right: 1800,
bottom: 1440,
left: 1800,
header: 720,
footer: 720,
gutter: 0
}, Le = "Times New Roman", Fe = 22, Ka = "en-US", Za = {
orientation: dn,
margins: structuredClone(hn),
title: "",
subject: "",
creator: ie,
keywords: [ie],
description: "",
lastModifiedBy: ie,
revision: 1,
createdAt: /* @__PURE__ */ new Date(),
modifiedAt: /* @__PURE__ */ new Date(),
headerType: "default",
header: !1,
footerType: "default",
footer: !1,
font: Le,
fontSize: Fe,
complexScriptFontSize: Fe,
table: {
row: {
cantSplit: !1
}
},
pageSize: {
width: xn,
height: fn
},
pageNumber: !1,
skipFirstHeaderFooter: !1,
lineNumber: !1,
lineNumberOptions: {
countBy: 1,
start: 0,
restart: "continuous"
},
numbering: {
defaultOrderedListStyleType: "decimal"
},
decodeUnicode: !1,
defaultLang: Ka
}, ki = "<p></p>", Ei = "_rels", Ct = "header1", At = "footer1", Bt = "theme1", Ce = "document", _a = "header", Ma = "footer", vn = "theme", gn = "hyperlink", Qa = "image", Ae = "Internal", Te = "word", ji = "theme", Lt = {
top: {
size: 0,
spacing: 3,
color: "FFFFFF"
},
left: {
size: 0,
spacing: 3,
color: "FFFFFF"
},
bottom: {
size: 0,
spacing: 3,
color: "FFFFFF"
},
right: {
size: 0,
spacing: 3,
color: "FFFFFF"
}
}, Ti = ["transparent", "auto"], Pt = ["top", "middle", "bottom"], Ut = (e = "", a = "", i = ie, s = [ie], o = "", r = ie, p = 1, m = /* @__PURE__ */ new Date(), d = /* @__PURE__ */ new Date()) => `
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cp:coreProperties
xmlns:cp="${h.coreProperties}"
xmlns:dc="${h.dc}"
xmlns:dcterms="${h.dcterms}"
xmlns:dcmitype="${h.dcmitype}"
xmlns:xsi="${h.xsi}"
>
<dc:title>${e}</dc:title>
<dc:subject>${a}</dc:subject>
<dc:creator>${i}</dc:creator>
${s && Array.isArray(s) ? `<cp:keywords>${s.join(", ")}</cp:keywords>` : ""}
<dc:description>${o}</dc:description>
<cp:lastModifiedBy>${r}</cp:lastModifiedBy>
<cp:revision>${p}</cp:revision>
<dcterms:created xsi:type="dcterms:W3CDTF">${m instanceof Date ? m.toISOString() : (/* @__PURE__ */ new Date()).toISOString()}</dcterms:created>
<dcterms:modified xsi:type="dcterms:W3CDTF">${d instanceof Date ? d.toISOString() : (/* @__PURE__ */ new Date()).toISOString()}</dcterms:modified>
</cp:coreProperties>
`, _t = `
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Id="rId1" Type="${h.numbering}" Target="numbering.xml"/>
<Relationship Id="rId2" Type="${h.styles}" Target="styles.xml"/>
<Relationship Id="rId3" Type="${h.settingsRelation}" Target="settings.xml"/>
<Relationship Id="rId4" Type="${h.webSettingsRelation}" Target="webSettings.xml"/>
<Relationship Id="rId5" Type="${h.fontTable}" Target="fontTable.xml"/>
</Relationships>
`, Mt = `
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Id="rId1" Type="${h.officeDocumentRelation}" Target="word/document.xml"/>
<Relationship Id="rId2" Type="${h.corePropertiesRelation}" Target="docProps/core.xml"/>
</Relationships>
`, Rt = () => `
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:numbering
xmlns:w="${h.w}"
xmlns:ve="${h.ve}"
xmlns:o="${h.o}"
xmlns:r="${h.r}"
xmlns:v="${h.v}"
xmlns:wp="${h.wp}"
xmlns:w10="${h.w10}"
xmlns:wne="${h.wne}">
</w:numbering>
`, zt = (e = Le, a = Fe, i = Fe, s = Ka) => `
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:styles xmlns:w="${h.w}" xmlns:r="${h.r}">
<w:docDefaults>
<w:rPrDefault>
<w:rPr>
<w:rFonts w:ascii="${e}" w:eastAsiaTheme="minorHAnsi" w:hAnsiTheme="minorHAnsi" w:cstheme="minorBidi" />
<w:sz w:val="${a}" />
<w:szCs w:val="${i}" />
<w:lang w:val="${s}" w:eastAsia="${s}" w:bidi="ar-SA" />
</w:rPr>
</w:rPrDefault>
<w:pPrDefault>
<w:pPr>
<w:spacing w:after="120" w:line="240" w:lineRule="atLeast" />
</w:pPr>
</w:pPrDefault>
</w:docDefaults>
<w:style w:type="character" w:styleId="Hyperlink">
<w:name w:val="Hyperlink" />
<w:rPr>
<w:color w:val="0000FF" />
<w:u w:val="single" />
</w:rPr>
</w:style>
<w:style w:type="paragraph" w:styleId="Heading1">
<w:name w:val="heading 1" />
<w:basedOn w:val="Normal" />
<w:next w:val="Normal" />
<w:uiPriority w:val="9" />
<w:qFormat />
<w:pPr>
<w:keepNext />
<w:keepLines />
<w:spacing w:before="480" />
<w:outlineLvl w:val="0" />
</w:pPr>
<w:rPr>
<w:b />
<w:sz w:val="48" />
<w:szCs w:val="48" />
</w:rPr>
</w:style>
<w:style w:type="paragraph" w:styleId="Heading2">
<w:name w:val="heading 2" />
<w:basedOn w:val="Normal" />
<w:next w:val="Normal" />
<w:uiPriority w:val="9" />
<w:unhideWhenUsed />
<w:qFormat />
<w:pPr>
<w:keepNext />
<w:keepLines />
<w:spacing w:before="360" w:after="80" />
<w:outlineLvl w:val="1" />
</w:pPr>
<w:rPr>
<w:b />
<w:sz w:val="36" />
<w:szCs w:val="36" />
</w:rPr>
</w:style>
<w:style w:type="paragraph" w:styleId="Heading3">
<w:name w:val="heading 3" />
<w:basedOn w:val="Normal" />
<w:next w:val="Normal" />
<w:uiPriority w:val="9" />
<w:semiHidden />
<w:unhideWhenUsed />
<w:qFormat />
<w:pPr>
<w:keepNext />
<w:keepLines />
<w:spacing w:before="280" w:after="80" />
<w:outlineLvl w:val="2" />
</w:pPr>
<w:rPr>
<w:b />
<w:sz w:val="28" />
<w:szCs w:val="28" />
</w:r