@neobiotechlabs/neobiotech-dev-agent 0.1.36 → 0.1.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1146,12 +1146,12 @@ var require_util = __commonJS({
1146
1146
  return str.replace(/~1/g, "/").replace(/~0/g, "~");
1147
1147
  }
1148
1148
  exports.unescapeJsonPointer = unescapeJsonPointer;
1149
- function eachItem(xs, f3) {
1149
+ function eachItem(xs, f4) {
1150
1150
  if (Array.isArray(xs)) {
1151
1151
  for (const x3 of xs)
1152
- f3(x3);
1152
+ f4(x3);
1153
1153
  } else {
1154
- f3(xs);
1154
+ f4(xs);
1155
1155
  }
1156
1156
  }
1157
1157
  exports.eachItem = eachItem;
@@ -1198,10 +1198,10 @@ var require_util = __commonJS({
1198
1198
  }
1199
1199
  exports.setEvaluated = setEvaluated;
1200
1200
  var snippets = {};
1201
- function useFunc(gen, f3) {
1201
+ function useFunc(gen, f4) {
1202
1202
  return gen.scopeValue("func", {
1203
- ref: f3,
1204
- code: snippets[f3.code] || (snippets[f3.code] = new code_1._Code(f3.code))
1203
+ ref: f4,
1204
+ code: snippets[f4.code] || (snippets[f4.code] = new code_1._Code(f4.code))
1205
1205
  });
1206
1206
  }
1207
1207
  exports.useFunc = useFunc;
@@ -1339,7 +1339,7 @@ var require_errors = __commonJS({
1339
1339
  gen.return(false);
1340
1340
  }
1341
1341
  }
1342
- var E2 = {
1342
+ var E = {
1343
1343
  keyword: new codegen_1.Name("keyword"),
1344
1344
  schemaPath: new codegen_1.Name("schemaPath"),
1345
1345
  // also used in JTD errors
@@ -1373,20 +1373,20 @@ var require_errors = __commonJS({
1373
1373
  if (schemaPath) {
1374
1374
  schPath = (0, codegen_1.str)`${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`;
1375
1375
  }
1376
- return [E2.schemaPath, schPath];
1376
+ return [E.schemaPath, schPath];
1377
1377
  }
1378
1378
  function extraErrorProps(cxt, { params, message }, keyValues) {
1379
1379
  const { keyword, data, schemaValue, it: it2 } = cxt;
1380
1380
  const { opts, propertyName, topSchemaRef, schemaPath } = it2;
1381
- keyValues.push([E2.keyword, keyword], [E2.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._)`{}`]);
1381
+ keyValues.push([E.keyword, keyword], [E.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._)`{}`]);
1382
1382
  if (opts.messages) {
1383
- keyValues.push([E2.message, typeof message == "function" ? message(cxt) : message]);
1383
+ keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]);
1384
1384
  }
1385
1385
  if (opts.verbose) {
1386
- keyValues.push([E2.schema, schemaValue], [E2.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data]);
1386
+ keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data]);
1387
1387
  }
1388
1388
  if (propertyName)
1389
- keyValues.push([E2.propertyName, propertyName]);
1389
+ keyValues.push([E.propertyName, propertyName]);
1390
1390
  }
1391
1391
  }
1392
1392
  });
@@ -3122,7 +3122,25 @@ var require_utils = __commonJS({
3122
3122
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
3123
3123
  var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
3124
3124
  var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
3125
- var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
3125
+ var isPathCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u);
3126
+ var isQueryFragmentCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u);
3127
+ var isUserinfoCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u);
3128
+ var BYTE_HEX = new Array(256);
3129
+ {
3130
+ const HEX_DIGITS = "0123456789ABCDEF";
3131
+ for (let i2 = 0; i2 < 256; i2++) {
3132
+ BYTE_HEX[i2] = "%" + HEX_DIGITS[i2 >> 4] + HEX_DIGITS[i2 & 15];
3133
+ }
3134
+ }
3135
+ function percentEncodeNonAscii(cp) {
3136
+ if (cp < 2048) {
3137
+ return BYTE_HEX[192 | cp >> 6] + BYTE_HEX[128 | cp & 63];
3138
+ }
3139
+ if (cp < 65536) {
3140
+ return BYTE_HEX[224 | cp >> 12] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
3141
+ }
3142
+ return BYTE_HEX[240 | cp >> 18] + BYTE_HEX[128 | cp >> 12 & 63] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
3143
+ }
3126
3144
  function stringArrayToHexStripped(input) {
3127
3145
  let acc = "";
3128
3146
  let code = 0;
@@ -3147,91 +3165,105 @@ var require_utils = __commonJS({
3147
3165
  }
3148
3166
  return acc;
3149
3167
  }
3168
+ var isHextet = RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/);
3169
+ var isIPvFuture = RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/);
3170
+ var isZoneCharacter = RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/);
3150
3171
  var nonSimpleDomain = RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);
3151
- function consumeIsZone(buffer) {
3152
- buffer.length = 0;
3153
- return true;
3154
- }
3155
- function consumeHextets(buffer, address, output) {
3156
- if (buffer.length) {
3157
- const hex = stringArrayToHexStripped(buffer);
3158
- if (hex !== "") {
3159
- address.push(hex);
3160
- } else {
3161
- output.error = true;
3162
- return false;
3172
+ function isZoneIdentifier(zone) {
3173
+ if (zone.length === 0) return false;
3174
+ for (let i2 = 0; i2 < zone.length; i2++) {
3175
+ if (isZoneCharacter(zone[i2])) continue;
3176
+ if (zone[i2] === "%" && i2 + 2 < zone.length && isHexPair(zone.slice(i2 + 1, i2 + 3))) {
3177
+ i2 += 2;
3178
+ continue;
3163
3179
  }
3164
- buffer.length = 0;
3180
+ return false;
3165
3181
  }
3166
3182
  return true;
3167
3183
  }
3168
- function getIPV6(input) {
3169
- let tokenCount = 0;
3170
- const output = { error: false, address: "", zone: "" };
3171
- const address = [];
3172
- const buffer = [];
3173
- let endipv6Encountered = false;
3174
- let endIpv6 = false;
3175
- let consume = consumeHextets;
3176
- for (let i2 = 0; i2 < input.length; i2++) {
3177
- const cursor = input[i2];
3178
- if (cursor === "[" || cursor === "]") {
3179
- continue;
3180
- }
3181
- if (cursor === ":") {
3182
- if (endipv6Encountered === true) {
3183
- endIpv6 = true;
3184
- }
3185
- if (!consume(buffer, address, output)) {
3186
- break;
3187
- }
3188
- if (++tokenCount > 7) {
3189
- output.error = true;
3190
- break;
3191
- }
3192
- if (i2 > 0 && input[i2 - 1] === ":") {
3193
- endipv6Encountered = true;
3194
- }
3195
- address.push(":");
3196
- continue;
3197
- } else if (cursor === "%") {
3198
- if (!consume(buffer, address, output)) {
3199
- break;
3184
+ function compressIPv6ZeroRun(hextets) {
3185
+ let bestStart = -1;
3186
+ let bestLength = 0;
3187
+ let runStart = -1;
3188
+ let runLength = 0;
3189
+ for (let i2 = 0; i2 < hextets.length; i2++) {
3190
+ if (hextets[i2] === "0") {
3191
+ if (runStart === -1) runStart = i2;
3192
+ runLength++;
3193
+ if (runLength > bestLength) {
3194
+ bestLength = runLength;
3195
+ bestStart = runStart;
3200
3196
  }
3201
- consume = consumeIsZone;
3202
3197
  } else {
3203
- buffer.push(cursor);
3198
+ runStart = -1;
3199
+ runLength = 0;
3200
+ }
3201
+ }
3202
+ if (bestLength < 2) return hextets.join(":");
3203
+ const head = hextets.slice(0, bestStart).join(":");
3204
+ const tail = hextets.slice(bestStart + bestLength).join(":");
3205
+ return head + "::" + tail;
3206
+ }
3207
+ function normalizeIPv6Address(input) {
3208
+ const compression = input.indexOf("::");
3209
+ if (compression !== -1 && input.indexOf("::", compression + 1) !== -1) return void 0;
3210
+ const left = compression === -1 ? input.split(":") : input.slice(0, compression).split(":");
3211
+ const right = compression === -1 ? [] : input.slice(compression + 2).split(":");
3212
+ if (compression !== -1) {
3213
+ if (left.length === 1 && left[0] === "") left.length = 0;
3214
+ if (right.length === 1 && right[0] === "") right.length = 0;
3215
+ }
3216
+ const parts = left.concat(right);
3217
+ let hextetCount = 0;
3218
+ for (let i2 = 0; i2 < parts.length; i2++) {
3219
+ const part = parts[i2];
3220
+ if (part === "") return void 0;
3221
+ if (part.indexOf(".") !== -1) {
3222
+ if (i2 !== parts.length - 1 || compression !== -1 && right.length === 0 || !isIPv4(part)) return void 0;
3223
+ hextetCount += 2;
3204
3224
  continue;
3205
3225
  }
3226
+ if (!isHextet(part)) return void 0;
3227
+ parts[i2] = parseInt(part, 16).toString(16);
3228
+ hextetCount++;
3206
3229
  }
3207
- if (buffer.length) {
3208
- if (consume === consumeIsZone) {
3209
- output.zone = buffer.join("");
3210
- } else if (endIpv6) {
3211
- address.push(buffer.join(""));
3212
- } else {
3213
- address.push(stringArrayToHexStripped(buffer));
3214
- }
3230
+ if (compression === -1) {
3231
+ if (hextetCount !== 8) return void 0;
3232
+ return compressIPv6ZeroRun(parts);
3215
3233
  }
3216
- output.address = address.join("");
3217
- return output;
3234
+ if (hextetCount >= 8) return void 0;
3235
+ const expanded = parts.slice(0, left.length);
3236
+ for (let i2 = hextetCount; i2 < 8; i2++) expanded.push("0");
3237
+ for (let i2 = left.length; i2 < parts.length; i2++) expanded.push(parts[i2]);
3238
+ return compressIPv6ZeroRun(expanded);
3218
3239
  }
3219
3240
  function normalizeIPv6(host) {
3220
- if (findToken(host, ":") < 2) {
3221
- return { host, isIPV6: false };
3222
- }
3223
- const ipv62 = getIPV6(host);
3224
- if (!ipv62.error) {
3225
- let newHost = ipv62.address;
3226
- let escapedHost = ipv62.address;
3227
- if (ipv62.zone) {
3228
- newHost += "%" + ipv62.zone;
3229
- escapedHost += "%25" + ipv62.zone;
3230
- }
3231
- return { host: newHost, isIPV6: true, escapedHost };
3232
- } else {
3233
- return { host, isIPV6: false };
3234
- }
3241
+ const bracketed = host[0] === "[" && host[host.length - 1] === "]";
3242
+ const hasBracket = host[0] === "[" || host[host.length - 1] === "]";
3243
+ if (hasBracket && !bracketed) return { host, isIPV6: false, error: true };
3244
+ let input = bracketed ? host.slice(1, -1) : host;
3245
+ if (bracketed && isIPvFuture(input)) {
3246
+ input = input.toLowerCase();
3247
+ return { host: `[${input}]`, escapedHost: input, isIPV6: false, isIPVFuture: true };
3248
+ }
3249
+ if (findToken(input, ":") < 2) {
3250
+ return { host, isIPV6: false, error: bracketed };
3251
+ }
3252
+ let zoneIdentifier = "";
3253
+ const zoneSeparator = input.indexOf("%");
3254
+ if (zoneSeparator !== -1) {
3255
+ const separatorLength = input.slice(zoneSeparator, zoneSeparator + 3).toLowerCase() === "%25" ? 3 : 1;
3256
+ zoneIdentifier = input.slice(zoneSeparator + separatorLength);
3257
+ if (!isZoneIdentifier(zoneIdentifier)) return { host, isIPV6: false, error: true };
3258
+ input = input.slice(0, zoneSeparator);
3259
+ }
3260
+ const address = normalizeIPv6Address(input);
3261
+ if (address === void 0) return { host, isIPV6: false, error: true };
3262
+ return {
3263
+ host: address + (zoneIdentifier ? "%" + zoneIdentifier : ""),
3264
+ escapedHost: address + (zoneIdentifier ? "%25" + zoneIdentifier : ""),
3265
+ isIPV6: true
3266
+ };
3235
3267
  }
3236
3268
  function findToken(str, token) {
3237
3269
  let ind = 0;
@@ -3350,7 +3382,8 @@ var require_utils = __commonJS({
3350
3382
  function normalizePathEncoding(input) {
3351
3383
  let output = "";
3352
3384
  for (let i2 = 0; i2 < input.length; i2++) {
3353
- if (input[i2] === "%" && i2 + 2 < input.length) {
3385
+ const ch = input[i2];
3386
+ if (ch === "%" && i2 + 2 < input.length) {
3354
3387
  const hex = input.slice(i2 + 1, i2 + 3);
3355
3388
  if (isHexPair(hex)) {
3356
3389
  const normalizedHex = hex.toUpperCase();
@@ -3364,10 +3397,152 @@ var require_utils = __commonJS({
3364
3397
  continue;
3365
3398
  }
3366
3399
  }
3367
- if (isPathCharacter(input[i2])) {
3368
- output += input[i2];
3400
+ if (isPathCharacter(ch)) {
3401
+ output += ch;
3402
+ } else {
3403
+ const code = input.charCodeAt(i2);
3404
+ if (code < 128) {
3405
+ output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
3406
+ } else if (code < 55296 || code > 57343) {
3407
+ output += percentEncodeNonAscii(code);
3408
+ } else if (code <= 56319 && i2 + 1 < input.length) {
3409
+ const low = input.charCodeAt(i2 + 1);
3410
+ if (low >= 56320 && low <= 57343) {
3411
+ output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
3412
+ i2++;
3413
+ } else {
3414
+ output += percentEncodeNonAscii(65533);
3415
+ }
3416
+ } else {
3417
+ output += percentEncodeNonAscii(65533);
3418
+ }
3419
+ }
3420
+ }
3421
+ return output;
3422
+ }
3423
+ function serializePathEncoding(input, pathNoScheme = false) {
3424
+ let output = "";
3425
+ let firstSegment = pathNoScheme && input[0] !== "/";
3426
+ for (let i2 = 0; i2 < input.length; i2++) {
3427
+ const ch = input[i2];
3428
+ if (ch === "%" && i2 + 2 < input.length) {
3429
+ const hex = input.slice(i2 + 1, i2 + 3);
3430
+ if (isHexPair(hex)) {
3431
+ output += "%" + hex.toUpperCase();
3432
+ i2 += 2;
3433
+ continue;
3434
+ }
3435
+ }
3436
+ if (ch === "/") {
3437
+ firstSegment = false;
3438
+ }
3439
+ if (isPathCharacter(ch) && (ch !== ":" || !firstSegment)) {
3440
+ output += ch;
3441
+ } else {
3442
+ const code = input.charCodeAt(i2);
3443
+ if (code < 128) {
3444
+ output += BYTE_HEX[code];
3445
+ } else if (code < 55296 || code > 57343) {
3446
+ output += percentEncodeNonAscii(code);
3447
+ } else if (code <= 56319 && i2 + 1 < input.length) {
3448
+ const low = input.charCodeAt(i2 + 1);
3449
+ if (low >= 56320 && low <= 57343) {
3450
+ output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
3451
+ i2++;
3452
+ } else {
3453
+ output += percentEncodeNonAscii(65533);
3454
+ }
3455
+ } else {
3456
+ output += percentEncodeNonAscii(65533);
3457
+ }
3458
+ }
3459
+ }
3460
+ return output;
3461
+ }
3462
+ function encodeComponent(input, isAllowed) {
3463
+ let output = "";
3464
+ for (let i2 = 0; i2 < input.length; i2++) {
3465
+ const ch = input[i2];
3466
+ if (ch === "%" && i2 + 2 < input.length) {
3467
+ const hex = input.slice(i2 + 1, i2 + 3);
3468
+ if (isHexPair(hex)) {
3469
+ output += "%" + hex.toUpperCase();
3470
+ i2 += 2;
3471
+ continue;
3472
+ }
3473
+ }
3474
+ if (isAllowed(ch)) {
3475
+ output += ch;
3476
+ } else {
3477
+ const code = input.charCodeAt(i2);
3478
+ if (code < 128) {
3479
+ output += BYTE_HEX[code];
3480
+ } else if (code < 55296 || code > 57343) {
3481
+ output += percentEncodeNonAscii(code);
3482
+ } else if (code <= 56319 && i2 + 1 < input.length) {
3483
+ const low = input.charCodeAt(i2 + 1);
3484
+ if (low >= 56320 && low <= 57343) {
3485
+ output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
3486
+ i2++;
3487
+ } else {
3488
+ output += percentEncodeNonAscii(65533);
3489
+ }
3490
+ } else {
3491
+ output += percentEncodeNonAscii(65533);
3492
+ }
3493
+ }
3494
+ }
3495
+ return output;
3496
+ }
3497
+ function encodeUserinfo(input) {
3498
+ return encodeComponent(input, isUserinfoCharacter);
3499
+ }
3500
+ function encodeQuery(input) {
3501
+ return encodeComponent(input, isQueryFragmentCharacter);
3502
+ }
3503
+ function encodeFragment(input) {
3504
+ return encodeComponent(input, isQueryFragmentCharacter);
3505
+ }
3506
+ function isEscapeSafe(cp) {
3507
+ return cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 42 || cp === 43 || cp === 45 || cp === 46 || cp === 47 || cp === 64 || cp === 95;
3508
+ }
3509
+ function normalizeQueryFragmentEncoding(input) {
3510
+ let output = "";
3511
+ for (let i2 = 0; i2 < input.length; i2++) {
3512
+ const ch = input[i2];
3513
+ if (ch === "%" && i2 + 2 < input.length) {
3514
+ const hex = input.slice(i2 + 1, i2 + 3);
3515
+ if (isHexPair(hex)) {
3516
+ const normalizedHex = hex.toUpperCase();
3517
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
3518
+ if (isUnreserved(decoded)) {
3519
+ output += decoded;
3520
+ } else {
3521
+ output += "%" + normalizedHex;
3522
+ }
3523
+ i2 += 2;
3524
+ continue;
3525
+ }
3526
+ }
3527
+ if (isQueryFragmentCharacter(ch)) {
3528
+ output += ch;
3369
3529
  } else {
3370
- output += escape(input[i2]);
3530
+ const code = input.charCodeAt(i2);
3531
+ if (code < 128) {
3532
+ output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
3533
+ } else if (code < 55296 || code > 57343) {
3534
+ output += percentEncodeNonAscii(code);
3535
+ } else if (code <= 56319 && i2 + 1 < input.length) {
3536
+ const low = input.charCodeAt(i2 + 1);
3537
+ if (low >= 56320 && low <= 57343) {
3538
+ output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
3539
+ i2++;
3540
+ } else {
3541
+ output += percentEncodeNonAscii(65533);
3542
+ }
3543
+ } else {
3544
+ output += percentEncodeNonAscii(65533);
3545
+ }
3371
3546
  }
3372
3547
  }
3373
3548
  return output;
@@ -3390,14 +3565,18 @@ var require_utils = __commonJS({
3390
3565
  function recomposeAuthority(component) {
3391
3566
  const uriTokens = [];
3392
3567
  if (component.userinfo !== void 0) {
3393
- uriTokens.push(component.userinfo);
3568
+ uriTokens.push(encodeUserinfo(component.userinfo));
3394
3569
  uriTokens.push("@");
3395
3570
  }
3396
3571
  if (component.host !== void 0) {
3397
- let host = unescape(component.host);
3572
+ let host = component.host;
3398
3573
  if (!isIPv4(host)) {
3399
- const ipV6res = normalizeIPv6(host);
3400
- if (ipV6res.isIPV6 === true) {
3574
+ let ipV6res = normalizeIPv6(host);
3575
+ if (ipV6res.isIPV6 !== true && ipV6res.isIPVFuture !== true) {
3576
+ host = normalizePercentEncoding(host, true);
3577
+ ipV6res = normalizeIPv6(host);
3578
+ }
3579
+ if (ipV6res.isIPV6 === true || ipV6res.isIPVFuture === true) {
3401
3580
  host = `[${ipV6res.escapedHost}]`;
3402
3581
  } else {
3403
3582
  host = reescapeHostDelimiters(host, false);
@@ -3417,6 +3596,11 @@ var require_utils = __commonJS({
3417
3596
  reescapeHostDelimiters,
3418
3597
  normalizePercentEncoding,
3419
3598
  normalizePathEncoding,
3599
+ serializePathEncoding,
3600
+ normalizeQueryFragmentEncoding,
3601
+ encodeUserinfo,
3602
+ encodeQuery,
3603
+ encodeFragment,
3420
3604
  escapePreservingEscapes,
3421
3605
  removeDotSegments,
3422
3606
  isIPv4,
@@ -3432,7 +3616,7 @@ var require_schemes = __commonJS({
3432
3616
  "node_modules/fast-uri/lib/schemes.js"(exports, module) {
3433
3617
  "use strict";
3434
3618
  var { isUUID } = require_utils();
3435
- var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
3619
+ var URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;
3436
3620
  var supportedSchemeNames = (
3437
3621
  /** @type {const} */
3438
3622
  [
@@ -3493,9 +3677,10 @@ var require_schemes = __commonJS({
3493
3677
  wsComponent.secure = void 0;
3494
3678
  }
3495
3679
  if (wsComponent.resourceName) {
3496
- const [path3, query] = wsComponent.resourceName.split("?");
3680
+ const queryIndex = wsComponent.resourceName.indexOf("?");
3681
+ const path3 = queryIndex === -1 ? wsComponent.resourceName : wsComponent.resourceName.slice(0, queryIndex);
3497
3682
  wsComponent.path = path3 && path3 !== "/" ? path3 : void 0;
3498
- wsComponent.query = query;
3683
+ wsComponent.query = queryIndex === -1 ? void 0 : wsComponent.resourceName.slice(queryIndex + 1);
3499
3684
  wsComponent.resourceName = void 0;
3500
3685
  }
3501
3686
  wsComponent.fragment = void 0;
@@ -3507,7 +3692,7 @@ var require_schemes = __commonJS({
3507
3692
  return urnComponent;
3508
3693
  }
3509
3694
  const matches = urnComponent.path.match(URN_REG);
3510
- if (matches) {
3695
+ if (matches && matches[0] === urnComponent.path) {
3511
3696
  const scheme = options.scheme || urnComponent.scheme || "urn";
3512
3697
  urnComponent.nid = matches[1].toLowerCase();
3513
3698
  urnComponent.nss = matches[2];
@@ -3641,8 +3826,17 @@ var require_schemes = __commonJS({
3641
3826
  var require_fast_uri = __commonJS({
3642
3827
  "node_modules/fast-uri/index.js"(exports, module) {
3643
3828
  "use strict";
3644
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3829
+ var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3645
3830
  var { SCHEMES, getSchemeHandler } = require_schemes();
3831
+ var VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
3832
+ var MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
3833
+ function decodeValidScheme(scheme) {
3834
+ const decodedScheme = unescape(String(scheme));
3835
+ if (!VALID_SCHEME.test(decodedScheme)) {
3836
+ throw new TypeError(MALFORMED_SCHEME_ERROR);
3837
+ }
3838
+ return decodedScheme;
3839
+ }
3646
3840
  function normalize(uri, options) {
3647
3841
  if (typeof uri === "string") {
3648
3842
  uri = /** @type {T} */
@@ -3655,7 +3849,34 @@ var require_fast_uri = __commonJS({
3655
3849
  }
3656
3850
  function resolve3(baseURI, relativeURI, options) {
3657
3851
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
3658
- const resolved = resolveComponent(parse4(baseURI, schemelessOptions), parse4(relativeURI, schemelessOptions), schemelessOptions, true);
3852
+ const {
3853
+ parsed: baseParsed,
3854
+ malformedAuthorityOrPort: baseMalformed,
3855
+ malformedPercentEncoding: baseMalformedPercentEncoding,
3856
+ malformedSchemeSpecific: baseMalformedSchemeSpecific,
3857
+ malformedHost: baseMalformedHost,
3858
+ malformedScheme: baseMalformedScheme
3859
+ } = parseWithStatus(baseURI, schemelessOptions);
3860
+ const {
3861
+ parsed: relativeParsed,
3862
+ malformedAuthorityOrPort: relativeMalformed,
3863
+ malformedPercentEncoding: relativeMalformedPercentEncoding,
3864
+ malformedSchemeSpecific: relativeMalformedSchemeSpecific,
3865
+ malformedHost: relativeMalformedHost,
3866
+ malformedScheme: relativeMalformedScheme
3867
+ } = parseWithStatus(relativeURI, schemelessOptions);
3868
+ if (baseMalformed || relativeMalformed || baseMalformedPercentEncoding || relativeMalformedPercentEncoding || baseMalformedSchemeSpecific || relativeMalformedSchemeSpecific || baseMalformedHost || relativeMalformedHost || baseMalformedScheme || relativeMalformedScheme) {
3869
+ throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
3870
+ }
3871
+ const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
3872
+ const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved.scheme);
3873
+ const resolvedHost = resolved.host;
3874
+ const resolvedHostIsIP = resolvedHost !== void 0 && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
3875
+ canonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
3876
+ const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !/\P{ASCII}/u.test(resolvedHost);
3877
+ if (resolved.error && !encodedASCIIHost) {
3878
+ throw new Error(resolved.error);
3879
+ }
3659
3880
  schemelessOptions.skipEscape = true;
3660
3881
  return serialize(resolved, schemelessOptions);
3661
3882
  }
@@ -3715,7 +3936,7 @@ var require_fast_uri = __commonJS({
3715
3936
  function equal(uriA, uriB, options) {
3716
3937
  const normalizedA = normalizeComparableURI(uriA, options);
3717
3938
  const normalizedB = normalizeComparableURI(uriB, options);
3718
- return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA.toLowerCase() === normalizedB.toLowerCase();
3939
+ return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA === normalizedB;
3719
3940
  }
3720
3941
  function serialize(cmpts, opts) {
3721
3942
  const component = {
@@ -3736,19 +3957,22 @@ var require_fast_uri = __commonJS({
3736
3957
  };
3737
3958
  const options = Object.assign({}, opts);
3738
3959
  const uriTokens = [];
3960
+ if (component.scheme) {
3961
+ component.scheme = decodeValidScheme(component.scheme);
3962
+ }
3739
3963
  const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
3740
3964
  if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
3965
+ const hasAuthority = component.userinfo !== void 0 || component.host !== void 0 || component.port !== void 0;
3966
+ const pathNoScheme = !options.skipEscape && component.scheme === void 0 && !hasAuthority;
3741
3967
  if (component.path !== void 0) {
3742
3968
  if (!options.skipEscape) {
3743
- component.path = escapePreservingEscapes(component.path);
3744
- if (component.scheme !== void 0) {
3745
- component.path = component.path.split("%3A").join(":");
3746
- }
3969
+ component.path = serializePathEncoding(component.path, pathNoScheme);
3747
3970
  } else {
3748
3971
  component.path = normalizePercentEncoding(component.path);
3749
3972
  }
3750
3973
  }
3751
3974
  if (options.reference !== "suffix" && component.scheme) {
3975
+ component.scheme = decodeValidScheme(component.scheme);
3752
3976
  uriTokens.push(component.scheme, ":");
3753
3977
  }
3754
3978
  const authority = recomposeAuthority(component);
@@ -3766,21 +3990,25 @@ var require_fast_uri = __commonJS({
3766
3990
  if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
3767
3991
  s2 = removeDotSegments(s2);
3768
3992
  }
3993
+ if (pathNoScheme) {
3994
+ s2 = serializePathEncoding(s2, true);
3995
+ }
3769
3996
  if (authority === void 0 && s2[0] === "/" && s2[1] === "/") {
3770
3997
  s2 = "/%2F" + s2.slice(2);
3771
3998
  }
3772
3999
  uriTokens.push(s2);
3773
4000
  }
3774
4001
  if (component.query !== void 0) {
3775
- uriTokens.push("?", component.query);
4002
+ uriTokens.push("?", encodeQuery(component.query));
3776
4003
  }
3777
4004
  if (component.fragment !== void 0) {
3778
- uriTokens.push("#", component.fragment);
4005
+ uriTokens.push("#", encodeFragment(component.fragment));
3779
4006
  }
3780
4007
  return uriTokens.join("");
3781
4008
  }
3782
4009
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
3783
4010
  var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
4011
+ var AUTHORITY_INTRODUCER_REGION = /^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;
3784
4012
  function getParseError(parsed, matches) {
3785
4013
  if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
3786
4014
  return 'URI path must start with "/" when authority is present.';
@@ -3790,6 +4018,32 @@ var require_fast_uri = __commonJS({
3790
4018
  }
3791
4019
  return void 0;
3792
4020
  }
4021
+ function hasMalformedPercentEncoding(component) {
4022
+ if (component === void 0) return false;
4023
+ let percent = component.indexOf("%");
4024
+ while (percent !== -1) {
4025
+ if (percent + 2 >= component.length || !/^[\da-f]{2}$/iu.test(component.slice(percent + 1, percent + 3))) {
4026
+ return true;
4027
+ }
4028
+ percent = component.indexOf("%", percent + 3);
4029
+ }
4030
+ return false;
4031
+ }
4032
+ function hasMalformedComponentPercentEncoding(matches) {
4033
+ const host = matches[4];
4034
+ return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !(host[0] === "[" && host[host.length - 1] === "]") && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
4035
+ }
4036
+ function canonicalizeHost(parsed, options, schemeHandler, isIP2) {
4037
+ if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && parsed.host[0] !== "[" && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP2 === false && nonSimpleDomain(parsed.host)) {
4038
+ try {
4039
+ parsed.host = new URL("http://" + parsed.host).hostname;
4040
+ } catch (e2) {
4041
+ parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e2;
4042
+ return true;
4043
+ }
4044
+ }
4045
+ return false;
4046
+ }
3793
4047
  function parseWithStatus(uri, opts) {
3794
4048
  const options = Object.assign({}, opts);
3795
4049
  const parsed = {
@@ -3802,6 +4056,11 @@ var require_fast_uri = __commonJS({
3802
4056
  fragment: void 0
3803
4057
  };
3804
4058
  let malformedAuthorityOrPort = false;
4059
+ let malformedPercentEncoding = false;
4060
+ let malformedSchemeSpecific = false;
4061
+ let malformedHost = false;
4062
+ let malformedIPLiteral = false;
4063
+ let malformedScheme = false;
3805
4064
  let isIP2 = false;
3806
4065
  if (options.reference === "suffix") {
3807
4066
  if (options.scheme) {
@@ -3815,6 +4074,20 @@ var require_fast_uri = __commonJS({
3815
4074
  parsed.error = "URI authority must not contain a literal backslash.";
3816
4075
  malformedAuthorityOrPort = true;
3817
4076
  }
4077
+ const introducerMatch = uri.match(AUTHORITY_INTRODUCER_REGION);
4078
+ if (introducerMatch !== null) {
4079
+ const region = introducerMatch[1];
4080
+ const normalizedRegion = region.replace(/[\t\n\r]/g, "");
4081
+ if (normalizedRegion.length >= 2) {
4082
+ if (normalizedRegion.slice(0, 2) !== "//") {
4083
+ parsed.error = parsed.error || "URI authority must not contain a literal backslash.";
4084
+ malformedAuthorityOrPort = true;
4085
+ } else if (region.length !== normalizedRegion.length) {
4086
+ parsed.error = parsed.error || "URI authority introducer must not contain whitespace.";
4087
+ malformedAuthorityOrPort = true;
4088
+ }
4089
+ }
4090
+ }
3818
4091
  const matches = uri.match(URI_PARSE);
3819
4092
  if (matches) {
3820
4093
  parsed.scheme = matches[1];
@@ -3824,6 +4097,19 @@ var require_fast_uri = __commonJS({
3824
4097
  parsed.path = matches[6] || "";
3825
4098
  parsed.query = matches[7];
3826
4099
  parsed.fragment = matches[8];
4100
+ if (parsed.scheme !== void 0) {
4101
+ const decodedScheme = unescape(parsed.scheme);
4102
+ if (VALID_SCHEME.test(decodedScheme)) {
4103
+ parsed.scheme = decodedScheme.toLowerCase();
4104
+ } else {
4105
+ parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
4106
+ malformedScheme = true;
4107
+ }
4108
+ }
4109
+ malformedPercentEncoding = hasMalformedComponentPercentEncoding(matches);
4110
+ if (malformedPercentEncoding) {
4111
+ parsed.error = parsed.error || "URI contains malformed percent-encoding.";
4112
+ }
3827
4113
  if (isNaN(parsed.port)) {
3828
4114
  parsed.port = matches[5];
3829
4115
  }
@@ -3835,9 +4121,15 @@ var require_fast_uri = __commonJS({
3835
4121
  if (parsed.host) {
3836
4122
  const ipv4result = isIPv4(parsed.host);
3837
4123
  if (ipv4result === false) {
4124
+ const bracketedIPLiteral = parsed.host[0] === "[" && parsed.host[parsed.host.length - 1] === "]";
3838
4125
  const ipv6result = normalizeIPv6(parsed.host);
3839
- parsed.host = ipv6result.host.toLowerCase();
3840
- isIP2 = ipv6result.isIPV6;
4126
+ isIP2 = ipv6result.isIPV6 || ipv6result.isIPVFuture === true;
4127
+ malformedIPLiteral = bracketedIPLiteral && ipv6result.error === true;
4128
+ parsed.host = isIP2 ? ipv6result.host : ipv6result.host.toLowerCase();
4129
+ if (malformedIPLiteral) {
4130
+ parsed.error = parsed.error || "URI host is malformed.";
4131
+ malformedAuthorityOrPort = true;
4132
+ }
3841
4133
  } else {
3842
4134
  isIP2 = true;
3843
4135
  }
@@ -3855,42 +4147,34 @@ var require_fast_uri = __commonJS({
3855
4147
  parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
3856
4148
  }
3857
4149
  const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
3858
- if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
3859
- if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP2 === false && nonSimpleDomain(parsed.host)) {
3860
- try {
3861
- parsed.host = new URL("http://" + parsed.host).hostname;
3862
- } catch (e2) {
3863
- parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e2;
3864
- }
3865
- }
3866
- }
4150
+ malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP2);
3867
4151
  if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
3868
4152
  if (uri.indexOf("%") !== -1) {
3869
- if (parsed.scheme !== void 0) {
3870
- parsed.scheme = unescape(parsed.scheme);
3871
- }
3872
- if (parsed.host !== void 0) {
3873
- parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP2);
4153
+ if (parsed.host !== void 0 && !malformedIPLiteral) {
4154
+ const host = isIP2 ? parsed.host : normalizePercentEncoding(parsed.host, true);
4155
+ parsed.host = reescapeHostDelimiters(host, isIP2);
3874
4156
  }
3875
4157
  }
3876
4158
  if (parsed.path) {
3877
4159
  parsed.path = normalizePathEncoding(parsed.path);
3878
4160
  }
4161
+ if (parsed.query) {
4162
+ parsed.query = normalizeQueryFragmentEncoding(parsed.query);
4163
+ }
3879
4164
  if (parsed.fragment) {
3880
- try {
3881
- parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
3882
- } catch {
3883
- parsed.error = parsed.error || "URI malformed";
3884
- }
4165
+ parsed.fragment = normalizeQueryFragmentEncoding(parsed.fragment);
3885
4166
  }
3886
4167
  }
3887
4168
  if (schemeHandler && schemeHandler.parse) {
3888
4169
  schemeHandler.parse(parsed, options);
4170
+ if (schemeHandler === SCHEMES.urn && parsed.nid === void 0) {
4171
+ malformedSchemeSpecific = true;
4172
+ }
3889
4173
  }
3890
4174
  } else {
3891
4175
  parsed.error = parsed.error || "URI can not be parsed.";
3892
4176
  }
3893
- return { parsed, malformedAuthorityOrPort };
4177
+ return { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme };
3894
4178
  }
3895
4179
  function parse4(uri, opts) {
3896
4180
  return parseWithStatus(uri, opts).parsed;
@@ -3899,20 +4183,28 @@ var require_fast_uri = __commonJS({
3899
4183
  return normalizeStringWithStatus(uri, opts).normalized;
3900
4184
  }
3901
4185
  function normalizeStringWithStatus(uri, opts) {
3902
- const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
4186
+ const { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = parseWithStatus(uri, opts);
3903
4187
  return {
3904
- normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
3905
- malformedAuthorityOrPort
4188
+ normalized: malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? uri : serialize(parsed, opts),
4189
+ malformedAuthorityOrPort,
4190
+ malformedPercentEncoding,
4191
+ malformedSchemeSpecific,
4192
+ malformedHost,
4193
+ malformedScheme
3906
4194
  };
3907
4195
  }
3908
4196
  function normalizeComparableURI(uri, opts) {
3909
- if (typeof uri === "string") {
3910
- const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
3911
- return malformedAuthorityOrPort ? void 0 : normalized;
4197
+ if (typeof uri !== "string" && typeof uri !== "object") {
4198
+ return void 0;
3912
4199
  }
3913
- if (typeof uri === "object") {
3914
- return serialize(uri, opts);
4200
+ let value;
4201
+ try {
4202
+ value = typeof uri === "string" ? uri : serialize(uri, opts);
4203
+ } catch {
4204
+ return void 0;
3915
4205
  }
4206
+ const { normalized, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = normalizeStringWithStatus(value, opts);
4207
+ return malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? void 0 : normalized;
3916
4208
  }
3917
4209
  var fastUri = {
3918
4210
  SCHEMES,
@@ -4303,7 +4595,7 @@ var require_core = __commonJS({
4303
4595
  type: (0, dataType_1.getJSONTypes)(def.type),
4304
4596
  schemaType: (0, dataType_1.getJSONTypes)(def.schemaType)
4305
4597
  };
4306
- (0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k) => addRule.call(this, k, definition) : (k) => definition.type.forEach((t2) => addRule.call(this, k, definition, t2)));
4598
+ (0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k2) => addRule.call(this, k2, definition) : (k2) => definition.type.forEach((t2) => addRule.call(this, k2, definition, t2)));
4307
4599
  return this;
4308
4600
  }
4309
4601
  getKeyword(keyword) {
@@ -6888,17 +7180,17 @@ var require_dist = __commonJS({
6888
7180
  };
6889
7181
  formatsPlugin.get = (name, mode = "full") => {
6890
7182
  const formats = mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats;
6891
- const f3 = formats[name];
6892
- if (!f3)
7183
+ const f4 = formats[name];
7184
+ if (!f4)
6893
7185
  throw new Error(`Unknown format "${name}"`);
6894
- return f3;
7186
+ return f4;
6895
7187
  };
6896
7188
  function addFormats(ajv, list, fs4, exportName) {
6897
7189
  var _a;
6898
7190
  var _b;
6899
7191
  (_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 ? _a : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
6900
- for (const f3 of list)
6901
- ajv.addFormat(f3, fs4[f3]);
7192
+ for (const f4 of list)
7193
+ ajv.addFormat(f4, fs4[f4]);
6902
7194
  }
6903
7195
  module.exports = exports = formatsPlugin;
6904
7196
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -7521,23 +7813,23 @@ var require_ponyfill_es2018 = __commonJS({
7521
7813
  function CopyDataBlockBytes(dest, destOffset, src, srcOffset, n) {
7522
7814
  new Uint8Array(dest).set(new Uint8Array(src, srcOffset, n), destOffset);
7523
7815
  }
7524
- let TransferArrayBuffer = (O2) => {
7525
- if (typeof O2.transfer === "function") {
7816
+ let TransferArrayBuffer = (O) => {
7817
+ if (typeof O.transfer === "function") {
7526
7818
  TransferArrayBuffer = (buffer) => buffer.transfer();
7527
7819
  } else if (typeof structuredClone === "function") {
7528
7820
  TransferArrayBuffer = (buffer) => structuredClone(buffer, { transfer: [buffer] });
7529
7821
  } else {
7530
7822
  TransferArrayBuffer = (buffer) => buffer;
7531
7823
  }
7532
- return TransferArrayBuffer(O2);
7824
+ return TransferArrayBuffer(O);
7533
7825
  };
7534
- let IsDetachedBuffer = (O2) => {
7535
- if (typeof O2.detached === "boolean") {
7826
+ let IsDetachedBuffer = (O) => {
7827
+ if (typeof O.detached === "boolean") {
7536
7828
  IsDetachedBuffer = (buffer) => buffer.detached;
7537
7829
  } else {
7538
7830
  IsDetachedBuffer = (buffer) => buffer.byteLength === 0;
7539
7831
  }
7540
- return IsDetachedBuffer(O2);
7832
+ return IsDetachedBuffer(O);
7541
7833
  };
7542
7834
  function ArrayBufferSlice(buffer, begin, end) {
7543
7835
  if (buffer.slice) {
@@ -7617,8 +7909,8 @@ var require_ponyfill_es2018 = __commonJS({
7617
7909
  }
7618
7910
  return true;
7619
7911
  }
7620
- function CloneAsUint8Array(O2) {
7621
- const buffer = ArrayBufferSlice(O2.buffer, O2.byteOffset, O2.byteOffset + O2.byteLength);
7912
+ function CloneAsUint8Array(O) {
7913
+ const buffer = ArrayBufferSlice(O.buffer, O.byteOffset, O.byteOffset + O.byteLength);
7622
7914
  return new Uint8Array(buffer);
7623
7915
  }
7624
7916
  function DequeueValue(container) {
@@ -11548,7 +11840,7 @@ var init_esm_min = __esm({
11548
11840
  r = Math.random;
11549
11841
  m = "append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(",");
11550
11842
  f = (a, b2, c) => (a += "", /^(Blob|File)$/.test(b2 && b2[t]) ? [(c = c !== void 0 ? c + "" : b2[t] == "File" ? b2.name : "blob", a), b2.name !== c || b2[t] == "blob" ? new file_default([b2], c, b2) : b2] : [a, b2 + ""]);
11551
- e = (c, f3) => (f3 ? c : c.replace(/\r?\n|\r/g, "\r\n")).replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22");
11843
+ e = (c, f4) => (f4 ? c : c.replace(/\r?\n|\r/g, "\r\n")).replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22");
11552
11844
  x = (n, a, e2) => {
11553
11845
  if (a.length < e2) {
11554
11846
  throw new TypeError(`Failed to execute '${n}' on 'FormData': ${e2} arguments required, but only ${a.length} present.`);
@@ -11597,14 +11889,14 @@ var init_esm_min = __esm({
11597
11889
  }
11598
11890
  forEach(a, b2) {
11599
11891
  x("forEach", arguments, 1);
11600
- for (var [c, d2] of this) a.call(b2, d2, c, this);
11892
+ for (var [c, d] of this) a.call(b2, d, c, this);
11601
11893
  }
11602
11894
  set(...a) {
11603
11895
  x("set", arguments, 2);
11604
11896
  var b2 = [], c = true;
11605
11897
  a = f(...a);
11606
- this.#d.forEach((d2) => {
11607
- d2[0] === a[0] ? c && (c = !b2.push(a)) : b2.push(d2);
11898
+ this.#d.forEach((d) => {
11899
+ d[0] === a[0] ? c && (c = !b2.push(a)) : b2.push(d);
11608
11900
  });
11609
11901
  c && b2.push(a);
11610
11902
  this.#d = b2;
@@ -11742,11 +12034,11 @@ function _fileName(headerValue) {
11742
12034
  });
11743
12035
  return filename;
11744
12036
  }
11745
- async function toFormData(Body2, ct) {
11746
- if (!/multipart/i.test(ct)) {
12037
+ async function toFormData(Body2, ct2) {
12038
+ if (!/multipart/i.test(ct2)) {
11747
12039
  throw new TypeError("Failed to fetch");
11748
12040
  }
11749
- const m3 = ct.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
12041
+ const m3 = ct2.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
11750
12042
  if (!m3) {
11751
12043
  throw new TypeError("no or bad content-type header, no multipart boundary");
11752
12044
  }
@@ -12205,8 +12497,8 @@ var init_body = __esm({
12205
12497
  return buffer.slice(byteOffset, byteOffset + byteLength2);
12206
12498
  }
12207
12499
  async formData() {
12208
- const ct = this.headers.get("content-type");
12209
- if (ct.startsWith("application/x-www-form-urlencoded")) {
12500
+ const ct2 = this.headers.get("content-type");
12501
+ if (ct2.startsWith("application/x-www-form-urlencoded")) {
12210
12502
  const formData = new FormData();
12211
12503
  const parameters2 = new URLSearchParams(await this.text());
12212
12504
  for (const [name, value] of parameters2) {
@@ -12215,7 +12507,7 @@ var init_body = __esm({
12215
12507
  return formData;
12216
12508
  }
12217
12509
  const { toFormData: toFormData2 } = await Promise.resolve().then(() => (init_multipart_parser(), multipart_parser_exports));
12218
- return toFormData2(this.body, ct);
12510
+ return toFormData2(this.body, ct2);
12219
12511
  }
12220
12512
  /**
12221
12513
  * Return raw response as Blob
@@ -12223,10 +12515,10 @@ var init_body = __esm({
12223
12515
  * @return Promise
12224
12516
  */
12225
12517
  async blob() {
12226
- const ct = this.headers && this.headers.get("content-type") || this[INTERNALS].body && this[INTERNALS].body.type || "";
12518
+ const ct2 = this.headers && this.headers.get("content-type") || this[INTERNALS].body && this[INTERNALS].body.type || "";
12227
12519
  const buf = await this.arrayBuffer();
12228
12520
  return new fetch_blob_default([buf], {
12229
- type: ct
12521
+ type: ct2
12230
12522
  });
12231
12523
  }
12232
12524
  /**
@@ -13423,33 +13715,33 @@ var init_adf = __esm({
13423
13715
  });
13424
13716
 
13425
13717
  // node_modules/marked/lib/marked.esm.js
13426
- function z() {
13718
+ function A2() {
13427
13719
  return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
13428
13720
  }
13429
- function N(l3) {
13430
- T = l3;
13721
+ function j(l3) {
13722
+ R = l3;
13431
13723
  }
13432
- function E(l3) {
13724
+ function I(l3) {
13433
13725
  let e2 = [];
13434
13726
  return (t2) => {
13435
13727
  let n = Math.max(0, Math.min(3, t2 - 1)), s2 = e2[n];
13436
13728
  return s2 || (s2 = l3(n), e2[n] = s2), s2;
13437
13729
  };
13438
13730
  }
13439
- function d(l3, e2 = "") {
13731
+ function k(l3, e2 = "") {
13440
13732
  let t2 = typeof l3 == "string" ? l3 : l3.source, n = { replace: (s2, r2) => {
13441
13733
  let i2 = typeof r2 == "string" ? r2 : r2.source;
13442
13734
  return i2 = i2.replace(m2.caret, "$1"), t2 = t2.replace(s2, i2), n;
13443
13735
  }, getRegex: () => new RegExp(t2, e2) };
13444
13736
  return n;
13445
13737
  }
13446
- function O(l3, e2) {
13738
+ function T(l3, e2) {
13447
13739
  if (e2) {
13448
13740
  if (m2.escapeTest.test(l3)) return l3.replace(m2.escapeReplace, ge);
13449
13741
  } else if (m2.escapeTestNoEncode.test(l3)) return l3.replace(m2.escapeReplaceNoEncode, ge);
13450
13742
  return l3;
13451
13743
  }
13452
- function V(l3) {
13744
+ function Y(l3) {
13453
13745
  try {
13454
13746
  l3 = encodeURI(l3).replace(m2.percentDecode, "%");
13455
13747
  } catch {
@@ -13457,7 +13749,7 @@ function V(l3) {
13457
13749
  }
13458
13750
  return l3;
13459
13751
  }
13460
- function Y(l3, e2) {
13752
+ function ee(l3, e2) {
13461
13753
  let t2 = l3.replace(m2.findPipe, (r2, i2, o) => {
13462
13754
  let u = false, a = i2;
13463
13755
  for (; --a >= 0 && o[a] === "\\"; ) u = !u;
@@ -13480,7 +13772,7 @@ function $(l3, e2, t2) {
13480
13772
  }
13481
13773
  return l3.slice(0, n - s2);
13482
13774
  }
13483
- function ee(l3) {
13775
+ function te(l3) {
13484
13776
  let e2 = l3.split(`
13485
13777
  `), t2 = e2.length - 1;
13486
13778
  for (; t2 >= 0 && m2.blankLine.test(e2[t2]); ) t2--;
@@ -13504,12 +13796,21 @@ function me(l3, e2 = 0) {
13504
13796
  return n;
13505
13797
  }
13506
13798
  function xe(l3, e2, t2, n, s2) {
13507
- let r2 = e2.href, i2 = e2.title || null, o = l3[1].replace(s2.other.outputLinkReplace, "$1");
13799
+ let r2 = e2.href, i2 = e2.title || null, o = l3[1].replace(s2.other.outputLinkReplace, "$1"), u = l3[0].charAt(0) === "!";
13508
13800
  n.state.inLink = true;
13509
- let u = { type: l3[0].charAt(0) === "!" ? "image" : "link", raw: t2, href: r2, title: i2, text: o, tokens: n.inlineTokens(o) };
13510
- return n.state.inLink = false, u;
13801
+ let a = n.state.linkEmitted, p = n.state.inRawBlock;
13802
+ n.state.linkEmitted = false;
13803
+ let c = n.inlineTokens(o), h2 = n.state.linkEmitted;
13804
+ if (n.state.linkEmitted = a, n.state.inLink = false, !u) {
13805
+ if (h2) {
13806
+ n.state.inRawBlock = p;
13807
+ return;
13808
+ }
13809
+ n.state.linkEmitted = true;
13810
+ }
13811
+ return { type: u ? "image" : "link", raw: t2, href: r2, title: i2, text: o, tokens: c };
13511
13812
  }
13512
- function ot(l3, e2, t2) {
13813
+ function kt(l3, e2, t2) {
13513
13814
  let n = l3.match(t2.other.indentCodeCompensation);
13514
13815
  if (n === null) return e2;
13515
13816
  let s2 = n[1];
@@ -13522,95 +13823,105 @@ function ot(l3, e2, t2) {
13522
13823
  }).join(`
13523
13824
  `);
13524
13825
  }
13525
- function g(l3, e2) {
13826
+ function f3(l3, e2) {
13526
13827
  return M.parse(l3, e2);
13527
13828
  }
13528
- var T, _, Te, m2, Oe, we, ye, B, Pe, j, oe, ae, Se, F2, $e, U, Le, _e, H, K, Me, le, ze, Ee, Ce, W, se, Ae, Ie, Be, qe, ue, De, C, Z2, X, ve, pe, He, Ze, Ge, ce, Ne, Qe, he, je, Fe, Ue, Ke, We, Xe, Je, Ve, Ye, et, v, tt, ke, de, nt, ie, J, rt, Q, st, q, A2, it, ge, w, x2, y, L, b, P, D, M, Kt, Wt, Xt, Jt, Vt, en, tn;
13829
+ function dt(...l3) {
13830
+ return M.use(...l3), f3.defaults = M.defaults, j(f3.defaults), f3;
13831
+ }
13832
+ var R, z, Oe, m2, Te, we, ye, q, Pe, U, oe, ae, Se, K, _e, W, $e, Le, Q, X, Ee, le, ze, Me, Ae, J, se, Ie, Ce, Be, De, ue, qe, _, C, v, ve, He, pe, Ze, Ge, Qe, ce, Ne, je, Fe, Ue, he, Ke, We, Xe, Je, Ve, Ye, et, tt, nt, rt, st, it, ot, at, G, lt, ke, de, ut, ie, V, pt, F2, ct, H, B, ht, ge, y, x2, P, L, b, S2, Z2, M, nn, rn, sn, on, ln, un;
13529
13833
  var init_marked_esm = __esm({
13530
13834
  "node_modules/marked/lib/marked.esm.js"() {
13531
13835
  "use strict";
13532
- T = z();
13533
- _ = { exec: () => null };
13534
- Te = ((l3 = "") => {
13836
+ R = A2();
13837
+ z = { exec: () => null };
13838
+ Oe = ((l3 = "") => {
13535
13839
  try {
13536
13840
  return !!new RegExp("(?<=1)(?<!1)" + l3);
13537
13841
  } catch {
13538
13842
  return false;
13539
13843
  }
13540
13844
  })();
13541
- m2 = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l3) => new RegExp(`^( {0,3}${l3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: E((l3) => new RegExp(`^ {0,${l3}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: E((l3) => new RegExp(`^ {0,${l3}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: E((l3) => new RegExp(`^ {0,${l3}}(?:\`\`\`|~~~)`)), headingBeginRegex: E((l3) => new RegExp(`^ {0,${l3}}#`)), htmlBeginRegex: E((l3) => new RegExp(`^ {0,${l3}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: E((l3) => new RegExp(`^ {0,${l3}}>`)) };
13542
- Oe = /^(?:[ \t]*(?:\n|$))+/;
13845
+ m2 = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l3) => new RegExp(`^( {0,3}${l3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: I((l3) => new RegExp(`^ {0,${l3}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: I((l3) => new RegExp(`^ {0,${l3}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: I((l3) => new RegExp(`^ {0,${l3}}(?:\`\`\`|~~~)`)), headingBeginRegex: I((l3) => new RegExp(`^ {0,${l3}}#`)), htmlBeginRegex: I((l3) => new RegExp(`^ {0,${l3}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: I((l3) => new RegExp(`^ {0,${l3}}>`)) };
13846
+ Te = /^(?:[ \t]*(?:\n|$))+/;
13543
13847
  we = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;
13544
13848
  ye = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
13545
- B = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
13849
+ q = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
13546
13850
  Pe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
13547
- j = / {0,3}(?:[*+-]|\d{1,9}[.)])/;
13851
+ U = / {0,3}(?:[*+-]|\d{1,9}[.)])/;
13548
13852
  oe = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
13549
- ae = d(oe).replace(/bull/g, j).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
13550
- Se = d(oe).replace(/bull/g, j).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
13551
- F2 = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/;
13552
- $e = /^[^\n]+/;
13553
- U = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
13554
- Le = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", U).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
13555
- _e = d(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, j).getRegex();
13556
- H = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
13557
- K = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
13558
- Me = d("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", K).replace("tag", H).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
13559
- le = (l3) => d(F2).replace("hr", B).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", l3).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex();
13853
+ ae = k(oe).replace(/bull/g, U).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
13854
+ Se = k(oe).replace(/bull/g, U).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
13855
+ K = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/;
13856
+ _e = /^[^\n]+/;
13857
+ W = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
13858
+ $e = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", W).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
13859
+ Le = k(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, U).getRegex();
13860
+ Q = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
13861
+ X = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
13862
+ Ee = k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", X).replace("tag", Q).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
13863
+ le = (l3) => k(K).replace("hr", q).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", l3).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Q).getRegex();
13560
13864
  ze = le(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/);
13561
- Ee = le(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/);
13562
- Ce = d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ee).getRegex();
13563
- W = { blockquote: Ce, code: we, def: Le, fences: ye, heading: Pe, hr: B, html: Me, lheading: ae, list: _e, newline: Oe, paragraph: ze, table: _, text: $e };
13564
- se = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", B).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex();
13565
- Ae = { ...W, lheading: Se, table: se, paragraph: d(F2).replace("hr", B).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", se).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex() };
13566
- Ie = { ...W, html: d(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", K).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: _, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: d(F2).replace("hr", B).replace("heading", ` *#{1,6} *[^
13865
+ Me = le(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/);
13866
+ Ae = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Me).getRegex();
13867
+ J = { blockquote: Ae, code: we, def: $e, fences: ye, heading: Pe, hr: q, html: Ee, lheading: ae, list: Le, newline: Te, paragraph: ze, table: z, text: _e };
13868
+ se = k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", q).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Q).getRegex();
13869
+ Ie = { ...J, lheading: Se, table: se, paragraph: k(K).replace("hr", q).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", se).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Q).getRegex() };
13870
+ Ce = { ...J, html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", X).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: z, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: k(K).replace("hr", q).replace("heading", ` *#{1,6} *[^
13567
13871
  ]`).replace("lheading", ae).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() };
13568
13872
  Be = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
13569
- qe = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
13873
+ De = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
13570
13874
  ue = /^( {2,}|\\)\n(?!\s*$)/;
13571
- De = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
13572
- C = /[\p{P}\p{S}]/u;
13573
- Z2 = /[\s\p{P}\p{S}]/u;
13574
- X = /[^\s\p{P}\p{S}]/u;
13575
- ve = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Z2).getRegex();
13875
+ qe = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
13876
+ _ = /[\p{P}\p{S}]/u;
13877
+ C = /[\s\p{P}\p{S}]/u;
13878
+ v = /[^\s\p{P}\p{S}]/u;
13879
+ ve = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, C).getRegex();
13880
+ He = /[\p{Pi}\p{Ps}"']/u;
13576
13881
  pe = /(?!~)[\p{P}\p{S}]/u;
13577
- He = /(?!~)[\s\p{P}\p{S}]/u;
13578
- Ze = /(?:[^\s\p{P}\p{S}]|~)/u;
13579
- Ge = d(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Te ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex();
13882
+ Ze = /(?!~)[\s\p{P}\p{S}]/u;
13883
+ Ge = /(?:[^\s\p{P}\p{S}]|~)/u;
13884
+ Qe = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Oe ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex();
13580
13885
  ce = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/;
13581
- Ne = d(ce, "u").replace(/punct/g, C).getRegex();
13582
- Qe = d(ce, "u").replace(/punct/g, pe).getRegex();
13886
+ Ne = k(ce, "u").replace(/punct/g, _).getRegex();
13887
+ je = k(ce, "u").replace(/punct/g, pe).getRegex();
13888
+ Fe = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/;
13889
+ Ue = k(Fe, "u").replace(/openQuote/g, He).replace(/punct/g, _).getRegex();
13583
13890
  he = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
13584
- je = d(he, "gu").replace(/notPunctSpace/g, X).replace(/punctSpace/g, Z2).replace(/punct/g, C).getRegex();
13585
- Fe = d(he, "gu").replace(/notPunctSpace/g, Ze).replace(/punctSpace/g, He).replace(/punct/g, pe).getRegex();
13586
- Ue = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, X).replace(/punctSpace/g, Z2).replace(/punct/g, C).getRegex();
13587
- Ke = d(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, C).getRegex();
13588
- We = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)";
13589
- Xe = d(We, "gu").replace(/notPunctSpace/g, X).replace(/punctSpace/g, Z2).replace(/punct/g, C).getRegex();
13590
- Je = d(/\\(punct)/, "gu").replace(/punct/g, C).getRegex();
13591
- Ve = d(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
13592
- Ye = d(K).replace("(?:-->|$)", "-->").getRegex();
13593
- et = d("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Ye).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
13594
- v = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/;
13595
- tt = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", v).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
13596
- ke = d(/^!?\[(label)\]\[(ref)\]/).replace("label", v).replace("ref", U).getRegex();
13597
- de = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", U).getRegex();
13598
- nt = d("reflink|nolink(?!\\()", "g").replace("reflink", ke).replace("nolink", de).getRegex();
13891
+ Ke = k(he, "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, C).replace(/punct/g, _).getRegex();
13892
+ We = k(he, "gu").replace(/notPunctSpace/g, Ge).replace(/punctSpace/g, Ze).replace(/punct/g, pe).getRegex();
13893
+ Xe = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)";
13894
+ Je = k(Xe, "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, C).replace(/punct/g, _).getRegex();
13895
+ Ve = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, C).replace(/punct/g, _).getRegex();
13896
+ Ye = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)";
13897
+ et = k(Ye, "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, C).replace(/punct/g, _).getRegex();
13898
+ tt = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, _).getRegex();
13899
+ nt = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)";
13900
+ rt = k(nt, "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, C).replace(/punct/g, _).getRegex();
13901
+ st = k(/\\(punct)/, "gu").replace(/punct/g, _).getRegex();
13902
+ it = k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
13903
+ ot = k(X).replace("(?:-->|$)", "-->").getRegex();
13904
+ at = k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", ot).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
13905
+ G = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/;
13906
+ lt = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", G).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
13907
+ ke = k(/^!?\[(label)\]\[(ref)\]/).replace("label", G).replace("ref", W).getRegex();
13908
+ de = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", W).getRegex();
13909
+ ut = k("reflink|nolink(?!\\()", "g").replace("reflink", ke).replace("nolink", de).getRegex();
13599
13910
  ie = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/;
13600
- J = { _backpedal: _, anyPunctuation: Je, autolink: Ve, blockSkip: Ge, br: ue, code: qe, del: _, delLDelim: _, delRDelim: _, emStrongLDelim: Ne, emStrongRDelimAst: je, emStrongRDelimUnd: Ue, escape: Be, link: tt, nolink: de, punctuation: ve, reflink: ke, reflinkSearch: nt, tag: et, text: De, url: _ };
13601
- rt = { ...J, link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", v).getRegex(), reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", v).getRegex() };
13602
- Q = { ...J, emStrongRDelimAst: Fe, emStrongLDelim: Qe, delLDelim: Ke, delRDelim: Xe, url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ie).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: d(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ie).getRegex() };
13603
- st = { ...Q, br: d(ue).replace("{2,}", "*").getRegex(), text: d(Q.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() };
13604
- q = { normal: W, gfm: Ae, pedantic: Ie };
13605
- A2 = { normal: J, gfm: Q, breaks: st, pedantic: rt };
13606
- it = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" };
13607
- ge = (l3) => it[l3];
13608
- w = class {
13911
+ V = { _backpedal: z, anyPunctuation: st, autolink: it, blockSkip: Qe, br: ue, code: De, del: z, delLDelim: z, delRDelim: z, emStrongLDelim: Ne, emStrongRDelimAst: Ke, emStrongRDelimUnd: Ve, escape: Be, link: lt, nolink: de, punctuation: ve, reflink: ke, reflinkSearch: ut, tag: at, text: qe, url: z };
13912
+ pt = { ...V, emStrongLDelim: Ue, emStrongRDelimAst: Je, emStrongRDelimUnd: et, link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", G).getRegex(), reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", G).getRegex() };
13913
+ F2 = { ...V, emStrongRDelimAst: We, emStrongLDelim: je, delLDelim: tt, delRDelim: rt, url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ie).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: k(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ie).getRegex() };
13914
+ ct = { ...F2, br: k(ue).replace("{2,}", "*").getRegex(), text: k(F2.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() };
13915
+ H = { normal: J, gfm: Ie, pedantic: Ce };
13916
+ B = { normal: V, gfm: F2, breaks: ct, pedantic: pt };
13917
+ ht = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" };
13918
+ ge = (l3) => ht[l3];
13919
+ y = class {
13609
13920
  options;
13610
13921
  rules;
13611
13922
  lexer;
13612
13923
  constructor(e2) {
13613
- this.options = e2 || T;
13924
+ this.options = e2 || R;
13614
13925
  }
13615
13926
  space(e2) {
13616
13927
  let t2 = this.rules.block.newline.exec(e2);
@@ -13619,14 +13930,14 @@ var init_marked_esm = __esm({
13619
13930
  code(e2) {
13620
13931
  let t2 = this.rules.block.code.exec(e2);
13621
13932
  if (t2) {
13622
- let n = this.options.pedantic ? t2[0] : ee(t2[0]), s2 = n.replace(this.rules.other.codeRemoveIndent, "");
13933
+ let n = this.options.pedantic ? t2[0] : te(t2[0]), s2 = n.replace(this.rules.other.codeRemoveIndent, "");
13623
13934
  return { type: "code", raw: n, codeBlockStyle: "indented", text: s2 };
13624
13935
  }
13625
13936
  }
13626
13937
  fences(e2) {
13627
13938
  let t2 = this.rules.block.fences.exec(e2);
13628
13939
  if (t2) {
13629
- let n = t2[0], s2 = ot(n, t2[3] || "", this.rules);
13940
+ let n = t2[0], s2 = kt(n, t2[3] || "", this.rules);
13630
13941
  return { type: "code", raw: n, lang: t2[2] ? t2[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t2[2], text: s2 };
13631
13942
  }
13632
13943
  }
@@ -13667,19 +13978,20 @@ ${p}` : p, r2 = r2 ? `${r2}
13667
13978
  ${c}` : c;
13668
13979
  let h2 = this.lexer.state.top;
13669
13980
  if (this.lexer.state.top = true, this.lexer.blockTokens(c, i2, true), this.lexer.state.top = h2, n.length === 0) break;
13670
- let k = i2.at(-1);
13671
- if (k?.type === "code") break;
13672
- if (k?.type === "blockquote") {
13673
- let R = k, f3 = R.raw + `
13674
- ` + n.join(`
13675
- `), S2 = this.blockquote(f3);
13676
- i2[i2.length - 1] = S2, s2 = s2.substring(0, s2.length - R.raw.length) + S2.raw, r2 = r2.substring(0, r2.length - R.text.length) + S2.text;
13981
+ let d = i2.at(-1);
13982
+ if (d?.type === "code") break;
13983
+ if (d?.type === "blockquote") {
13984
+ let O = d, g = n.join(`
13985
+ `), w = O.raw + `
13986
+ ` + g.replace(this.rules.other.blockquoteSetextReplace2, ""), E = this.blockquote(w);
13987
+ i2[i2.length - 1] = E, s2 = `${s2}
13988
+ ${g}`, r2 = r2.substring(0, r2.length - O.text.length) + E.text;
13677
13989
  break;
13678
- } else if (k?.type === "list") {
13679
- let R = k, f3 = R.raw + `
13990
+ } else if (d?.type === "list") {
13991
+ let O = d, g = O.raw + `
13680
13992
  ` + n.join(`
13681
- `), S2 = this.list(f3);
13682
- i2[i2.length - 1] = S2, s2 = s2.substring(0, s2.length - k.raw.length) + S2.raw, r2 = r2.substring(0, r2.length - R.raw.length) + S2.raw, n = f3.substring(i2.at(-1).raw.length).split(`
13993
+ `), w = this.list(g);
13994
+ i2[i2.length - 1] = w, s2 = s2.substring(0, s2.length - d.raw.length) + w.raw, r2 = r2.substring(0, r2.length - O.raw.length) + w.raw, n = g.substring(i2.at(-1).raw.length).split(`
13683
13995
  `);
13684
13996
  continue;
13685
13997
  }
@@ -13698,24 +14010,24 @@ ${c}` : c;
13698
14010
  if (!(t2 = i2.exec(e2)) || this.rules.block.hr.test(e2)) break;
13699
14011
  p = t2[0], e2 = e2.substring(p.length);
13700
14012
  let h2 = me(t2[2].split(`
13701
- `, 1)[0], t2[1].length), k = e2.split(`
13702
- `, 1)[0], R = !h2.trim(), f3 = 0;
13703
- if (this.options.pedantic ? (f3 = 2, c = h2.trimStart()) : R ? f3 = t2[1].length + 1 : (f3 = h2.search(this.rules.other.nonSpaceChar), f3 = f3 > 4 ? 1 : f3, c = h2.slice(f3), f3 += t2[1].length), R && this.rules.other.blankLine.test(k) && (p += k + `
13704
- `, e2 = e2.substring(k.length + 1), a = true), !a) {
13705
- let S2 = this.rules.other.nextBulletRegex(f3), te = this.rules.other.hrRegex(f3), ne = this.rules.other.fencesBeginRegex(f3), re = this.rules.other.headingBeginRegex(f3), be = this.rules.other.htmlBeginRegex(f3), Re = this.rules.other.blockquoteBeginRegex(f3);
14013
+ `, 1)[0], t2[1].length), d = e2.split(`
14014
+ `, 1)[0], O = !h2.trim(), g = 0;
14015
+ if (this.options.pedantic ? (g = 2, c = h2.trimStart()) : O ? g = t2[1].length + 1 : (g = h2.search(this.rules.other.nonSpaceChar), g = g > 4 ? 1 : g, c = h2.slice(g), g += t2[1].length), O && this.rules.other.blankLine.test(d) && (p += d + `
14016
+ `, e2 = e2.substring(d.length + 1), a = true), !a) {
14017
+ let w = this.rules.other.nextBulletRegex(g), E = this.rules.other.hrRegex(g), ne = this.rules.other.fencesBeginRegex(g), re = this.rules.other.headingBeginRegex(g), be = this.rules.other.htmlBeginRegex(g), Re = this.rules.other.blockquoteBeginRegex(g);
13706
14018
  for (; e2; ) {
13707
- let G = e2.split(`
13708
- `, 1)[0], I;
13709
- if (k = G, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), I = k) : I = k.replace(this.rules.other.tabCharGlobal, " "), ne.test(k) || re.test(k) || be.test(k) || Re.test(k) || S2.test(k) || te.test(k)) break;
13710
- if (I.search(this.rules.other.nonSpaceChar) >= f3 || !k.trim()) c += `
13711
- ` + I.slice(f3);
14019
+ let N = e2.split(`
14020
+ `, 1)[0], D;
14021
+ if (d = N, this.options.pedantic ? (d = d.replace(this.rules.other.listReplaceNesting, " "), D = d) : D = d.replace(this.rules.other.tabCharGlobal, " "), ne.test(d) || re.test(d) || be.test(d) || Re.test(d) || w.test(d) || E.test(d)) break;
14022
+ if (D.search(this.rules.other.nonSpaceChar) >= g || !d.trim()) c += `
14023
+ ` + D.slice(g);
13712
14024
  else {
13713
- if (R || h2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ne.test(h2) || re.test(h2) || te.test(h2)) break;
14025
+ if (O || h2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ne.test(h2) || re.test(h2) || E.test(h2)) break;
13714
14026
  c += `
13715
- ` + k;
14027
+ ` + d;
13716
14028
  }
13717
- R = !k.trim(), p += G + `
13718
- `, e2 = e2.substring(G.length + 1), h2 = I.slice(f3);
14029
+ O = !d.trim(), p += N + `
14030
+ `, e2 = e2.substring(N.length + 1), h2 = D.slice(g);
13719
14031
  }
13720
14032
  }
13721
14033
  r2.loose || (o ? r2.loose = true : this.rules.other.doubleBlankLine.test(p) && (o = true)), r2.items.push({ type: "list_item", raw: p, task: !!this.options.gfm && this.rules.other.listIsTask.test(c), loose: false, text: c, tokens: [] }), r2.raw += p;
@@ -13724,8 +14036,11 @@ ${c}` : c;
13724
14036
  if (u) u.raw = u.raw.trimEnd(), u.text = u.text.trimEnd();
13725
14037
  else return;
13726
14038
  r2.raw = r2.raw.trimEnd();
14039
+ for (let a of r2.items) if (this.lexer.state.top = false, a.tokens = this.lexer.blockTokens(a.text, []), !r2.loose) {
14040
+ let p = a.tokens.filter((h2) => h2.type === "space"), c = p.length > 0 && p.some((h2) => this.rules.other.anyLine.test(h2.raw));
14041
+ r2.loose = c;
14042
+ }
13727
14043
  for (let a of r2.items) {
13728
- this.lexer.state.top = false, a.tokens = this.lexer.blockTokens(a.text, []);
13729
14044
  let p = a.tokens[0];
13730
14045
  if (a.task && (p?.type === "text" || p?.type === "paragraph")) {
13731
14046
  a.text = a.text.replace(this.rules.other.listReplaceTask, ""), p.raw = p.raw.replace(this.rules.other.listReplaceTask, ""), p.text = p.text.replace(this.rules.other.listReplaceTask, "");
@@ -13739,10 +14054,6 @@ ${c}` : c;
13739
14054
  a.checked = h2.checked, r2.loose ? a.tokens[0] && ["paragraph", "text"].includes(a.tokens[0].type) && "tokens" in a.tokens[0] && a.tokens[0].tokens ? (a.tokens[0].raw = h2.raw + a.tokens[0].raw, a.tokens[0].text = h2.raw + a.tokens[0].text, a.tokens[0].tokens.unshift(h2)) : a.tokens.unshift({ type: "paragraph", raw: h2.raw, text: h2.raw, tokens: [h2] }) : a.tokens.unshift(h2);
13740
14055
  }
13741
14056
  } else a.task && (a.task = false);
13742
- if (!r2.loose) {
13743
- let c = a.tokens.filter((k) => k.type === "space"), h2 = c.length > 0 && c.some((k) => this.rules.other.anyLine.test(k.raw));
13744
- r2.loose = h2;
13745
- }
13746
14057
  }
13747
14058
  if (r2.loose) for (let a of r2.items) {
13748
14059
  a.loose = true;
@@ -13754,7 +14065,7 @@ ${c}` : c;
13754
14065
  html(e2) {
13755
14066
  let t2 = this.rules.block.html.exec(e2);
13756
14067
  if (t2) {
13757
- let n = ee(t2[0]);
14068
+ let n = te(t2[0]);
13758
14069
  return { type: "html", block: true, raw: n, pre: t2[1] === "pre" || t2[1] === "script" || t2[1] === "style", text: n };
13759
14070
  }
13760
14071
  }
@@ -13769,13 +14080,13 @@ ${c}` : c;
13769
14080
  table(e2) {
13770
14081
  let t2 = this.rules.block.table.exec(e2);
13771
14082
  if (!t2 || !this.rules.other.tableDelimiter.test(t2[2])) return;
13772
- let n = Y(t2[1]), s2 = t2[2].replace(this.rules.other.tableAlignChars, "").split("|"), r2 = t2[3]?.trim() ? t2[3].replace(this.rules.other.tableRowBlankLine, "").split(`
14083
+ let n = ee(t2[1]), s2 = t2[2].replace(this.rules.other.tableAlignChars, "").split("|"), r2 = t2[3]?.trim() ? t2[3].replace(this.rules.other.tableRowBlankLine, "").split(`
13773
14084
  `) : [], i2 = { type: "table", raw: $(t2[0], `
13774
14085
  `), header: [], align: [], rows: [] };
13775
14086
  if (n.length === s2.length) {
13776
14087
  for (let o of s2) this.rules.other.tableAlignRight.test(o) ? i2.align.push("right") : this.rules.other.tableAlignCenter.test(o) ? i2.align.push("center") : this.rules.other.tableAlignLeft.test(o) ? i2.align.push("left") : i2.align.push(null);
13777
14088
  for (let o = 0; o < n.length; o++) i2.header.push({ text: n[o], tokens: this.lexer.inline(n[o]), header: true, align: i2.align[o] });
13778
- for (let o of r2) i2.rows.push(Y(o, i2.header.length).map((u, a) => ({ text: u, tokens: this.lexer.inline(u), header: false, align: i2.align[a] })));
14089
+ for (let o of r2) i2.rows.push(ee(o, i2.header.length).map((u, a) => ({ text: u, tokens: this.lexer.inline(u), header: false, align: i2.align[a] })));
13779
14090
  return i2;
13780
14091
  }
13781
14092
  }
@@ -13846,25 +14157,28 @@ ${c}` : c;
13846
14157
  let s2 = this.rules.inline.emStrongLDelim.exec(e2);
13847
14158
  if (!s2 || !s2[1] && !s2[2] && !s2[3] && !s2[4] || s2[4] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
13848
14159
  if (!(s2[1] || s2[3] || "") || !n || this.rules.inline.punctuation.exec(n)) {
13849
- let i2 = [...s2[0]].length - 1, o, u, a = i2, p = 0, c = s2[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
13850
- for (c.lastIndex = 0, t2 = t2.slice(-1 * e2.length + i2); (s2 = c.exec(t2)) !== null; ) {
14160
+ let i2 = [...s2[0]].length - 1, o, u, a = i2, p = 0, c = s2[0][0], h2 = n === c, d = c === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
14161
+ for (d.lastIndex = 0, t2 = t2.slice(-1 * e2.length + i2); (s2 = d.exec(t2)) !== null; ) {
13851
14162
  if (o = s2[1] || s2[2] || s2[3] || s2[4] || s2[5] || s2[6], !o) continue;
13852
14163
  if (u = [...o].length, s2[3] || s2[4]) {
13853
14164
  a += u;
13854
14165
  continue;
13855
- } else if ((s2[5] || s2[6]) && i2 % 3 && !((i2 + u) % 3)) {
13856
- p += u;
13857
- continue;
14166
+ } else if (s2[5] || s2[6]) {
14167
+ if (i2 % 3 && !((i2 + u) % 3)) {
14168
+ p += u;
14169
+ continue;
14170
+ }
14171
+ if (h2) break;
13858
14172
  }
13859
14173
  if (a -= u, a > 0) continue;
13860
14174
  u = Math.min(u, u + a + p);
13861
- let h2 = [...s2[0]][0].length, k = e2.slice(0, i2 + s2.index + h2 + u);
14175
+ let O = [...s2[0]][0].length, g = e2.slice(0, i2 + s2.index + O + u);
13862
14176
  if (Math.min(i2, u) % 2) {
13863
- let f3 = k.slice(1, -1);
13864
- return { type: "em", raw: k, text: f3, tokens: this.lexer.inlineTokens(f3) };
14177
+ let E = g.slice(1, -1);
14178
+ return { type: "em", raw: g, text: E, tokens: this.lexer.inlineTokens(E) };
13865
14179
  }
13866
- let R = k.slice(2, -2);
13867
- return { type: "strong", raw: k, text: R, tokens: this.lexer.inlineTokens(R) };
14180
+ let w = g.slice(2, -2);
14181
+ return { type: "strong", raw: g, text: w, tokens: this.lexer.inlineTokens(w) };
13868
14182
  }
13869
14183
  }
13870
14184
  }
@@ -13892,8 +14206,8 @@ ${c}` : c;
13892
14206
  }
13893
14207
  if (a -= u, a > 0) continue;
13894
14208
  u = Math.min(u, u + a);
13895
- let c = [...s2[0]][0].length, h2 = e2.slice(0, i2 + s2.index + c + u), k = h2.slice(i2, -i2);
13896
- return { type: "del", raw: h2, text: k, tokens: this.lexer.inlineTokens(k) };
14209
+ let c = [...s2[0]][0].length, h2 = e2.slice(0, i2 + s2.index + c + u), d = h2.slice(i2, -i2);
14210
+ return { type: "del", raw: h2, text: d, tokens: this.lexer.inlineTokens(d) };
13897
14211
  }
13898
14212
  }
13899
14213
  }
@@ -13934,12 +14248,12 @@ ${c}` : c;
13934
14248
  inlineQueue;
13935
14249
  tokenizer;
13936
14250
  constructor(e2) {
13937
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e2 || T, this.options.tokenizer = this.options.tokenizer || new w(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
13938
- let t2 = { other: m2, block: q.normal, inline: A2.normal };
13939
- this.options.pedantic ? (t2.block = q.pedantic, t2.inline = A2.pedantic) : this.options.gfm && (t2.block = q.gfm, this.options.breaks ? t2.inline = A2.breaks : t2.inline = A2.gfm), this.tokenizer.rules = t2;
14251
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e2 || R, this.options.tokenizer = this.options.tokenizer || new y(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, linkEmitted: false, top: true };
14252
+ let t2 = { other: m2, block: H.normal, inline: B.normal };
14253
+ this.options.pedantic ? (t2.block = H.pedantic, t2.inline = B.pedantic) : this.options.gfm && (t2.block = H.gfm, this.options.breaks ? t2.inline = B.breaks : t2.inline = B.gfm), this.tokenizer.rules = t2;
13940
14254
  }
13941
14255
  static get rules() {
13942
- return { block: q, inline: A2 };
14256
+ return { block: H, inline: B };
13943
14257
  }
13944
14258
  static lex(e2, t2) {
13945
14259
  return new l(t2).lex(e2);
@@ -14058,14 +14372,32 @@ ${c}` : c;
14058
14372
  inline(e2, t2 = []) {
14059
14373
  return this.inlineQueue.push({ src: e2, tokens: t2 }), t2;
14060
14374
  }
14375
+ linkInText(e2) {
14376
+ if (!e2.includes("[")) return false;
14377
+ let t2 = this.tokenizer.rules.inline.link;
14378
+ for (let n of e2.matchAll(this.tokenizer.rules.inline.blockSkip)) if (t2.test(n[0]) && e2.charAt(n.index - 1) !== "!") return true;
14379
+ for (let n of e2.matchAll(this.tokenizer.rules.inline.reflinkSearch)) {
14380
+ let s2 = n[0], r2 = s2.lastIndexOf("[");
14381
+ if (!(s2.charAt(0) === "!" || !Object.hasOwn(this.tokens.links, s2.slice(r2 + 1, -1))) && !(r2 > 1 && this.linkInText(s2.slice(1, r2 - 1)))) return true;
14382
+ }
14383
+ return false;
14384
+ }
14061
14385
  inlineTokens(e2, t2 = []) {
14062
14386
  this.tokenizer.lexer = this;
14063
14387
  let n = e2;
14064
- if (this.tokens.links) {
14065
- let o = Object.keys(this.tokens.links);
14066
- o.length > 0 && (n = n.replace(this.tokenizer.rules.inline.reflinkSearch, (u) => o.includes(u.slice(u.lastIndexOf("[") + 1, -1)) ? "[" + "a".repeat(u.length - 2) + "]" : u));
14388
+ if (this.tokens.links && e2.includes("[")) {
14389
+ let o = this.tokenizer.rules.inline.reflinkSearch, u = (a) => {
14390
+ let p = a.lastIndexOf("[");
14391
+ if (!Object.hasOwn(this.tokens.links, a.slice(p + 1, -1))) return a;
14392
+ if (p > 1 && a.charAt(0) !== "!") {
14393
+ let c = a.slice(1, p - 1);
14394
+ if (this.linkInText(c)) return "[" + c.replace(o, u) + "][" + "a".repeat(a.length - p - 2) + "]";
14395
+ }
14396
+ return "[" + "a".repeat(a.length - 2) + "]";
14397
+ };
14398
+ n = n.replace(o, u);
14067
14399
  }
14068
- n = n.replace(this.tokenizer.rules.inline.anyPunctuation, "++"), n = n.replace(this.tokenizer.rules.inline.blockSkip, (o, u, a) => {
14400
+ n = n.replace(this.tokenizer.rules.inline.anyPunctuation, (o) => "+".repeat(o.length)), n = n.replace(this.tokenizer.rules.inline.blockSkip, (o, u, a) => {
14069
14401
  let p = a ? a.length : 0;
14070
14402
  return o.slice(0, p) + "[" + "a".repeat(o.length - p - 2) + "]";
14071
14403
  }), n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
@@ -14147,11 +14479,11 @@ ${c}` : c;
14147
14479
  else throw new Error(t2);
14148
14480
  }
14149
14481
  };
14150
- y = class {
14482
+ P = class {
14151
14483
  options;
14152
14484
  parser;
14153
14485
  constructor(e2) {
14154
- this.options = e2 || T;
14486
+ this.options = e2 || R;
14155
14487
  }
14156
14488
  space(e2) {
14157
14489
  return "";
@@ -14159,8 +14491,8 @@ ${c}` : c;
14159
14491
  code({ text: e2, lang: t2, escaped: n }) {
14160
14492
  let s2 = (t2 || "").match(m2.notSpaceStart)?.[0], r2 = e2.replace(m2.endingNewline, "") + `
14161
14493
  `;
14162
- return s2 ? '<pre><code class="language-' + O(s2) + '">' + (n ? r2 : O(r2, true)) + `</code></pre>
14163
- ` : "<pre><code>" + (n ? r2 : O(r2, true)) + `</code></pre>
14494
+ return s2 ? '<pre><code class="language-' + T(s2) + '">' + (n ? r2 : T(r2, true)) + `</code></pre>
14495
+ ` : "<pre><code>" + (n ? r2 : T(r2, true)) + `</code></pre>
14164
14496
  `;
14165
14497
  }
14166
14498
  blockquote({ tokens: e2 }) {
@@ -14238,7 +14570,7 @@ ${e2}</tr>
14238
14570
  return `<em>${this.parser.parseInline(e2)}</em>`;
14239
14571
  }
14240
14572
  codespan({ text: e2 }) {
14241
- return `<code>${O(e2, true)}</code>`;
14573
+ return `<code>${T(e2, true)}</code>`;
14242
14574
  }
14243
14575
  br(e2) {
14244
14576
  return "<br>";
@@ -14247,22 +14579,22 @@ ${e2}</tr>
14247
14579
  return `<del>${this.parser.parseInline(e2)}</del>`;
14248
14580
  }
14249
14581
  link({ href: e2, title: t2, tokens: n }) {
14250
- let s2 = this.parser.parseInline(n), r2 = V(e2);
14582
+ let s2 = this.parser.parseInline(n), r2 = Y(e2);
14251
14583
  if (r2 === null) return s2;
14252
14584
  e2 = r2;
14253
14585
  let i2 = '<a href="' + e2 + '"';
14254
- return t2 && (i2 += ' title="' + O(t2) + '"'), i2 += ">" + s2 + "</a>", i2;
14586
+ return t2 && (i2 += ' title="' + T(t2) + '"'), i2 += ">" + s2 + "</a>", i2;
14255
14587
  }
14256
14588
  image({ href: e2, title: t2, text: n, tokens: s2 }) {
14257
14589
  s2 && (n = this.parser.parseInline(s2, this.parser.textRenderer));
14258
- let r2 = V(e2);
14259
- if (r2 === null) return O(n);
14590
+ let r2 = Y(e2);
14591
+ if (r2 === null) return T(n);
14260
14592
  e2 = r2;
14261
- let i2 = `<img src="${e2}" alt="${O(n)}"`;
14262
- return t2 && (i2 += ` title="${O(t2)}"`), i2 += ">", i2;
14593
+ let i2 = `<img src="${e2}" alt="${T(n)}"`;
14594
+ return t2 && (i2 += ` title="${T(t2)}"`), i2 += ">", i2;
14263
14595
  }
14264
14596
  text(e2) {
14265
- return "tokens" in e2 && e2.tokens ? this.parser.parseInline(e2.tokens) : "escaped" in e2 && e2.escaped ? e2.text : O(e2.text);
14597
+ return "tokens" in e2 && e2.tokens ? this.parser.parseInline(e2.tokens) : "escaped" in e2 && e2.escaped ? e2.text : T(e2.text);
14266
14598
  }
14267
14599
  };
14268
14600
  L = class {
@@ -14302,7 +14634,7 @@ ${e2}</tr>
14302
14634
  renderer;
14303
14635
  textRenderer;
14304
14636
  constructor(e2) {
14305
- this.options = e2 || T, this.options.renderer = this.options.renderer || new y(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L();
14637
+ this.options = e2 || R, this.options.renderer = this.options.renderer || new P(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L();
14306
14638
  }
14307
14639
  static parse(e2, t2) {
14308
14640
  return new l2(t2).parse(e2);
@@ -14317,7 +14649,7 @@ ${e2}</tr>
14317
14649
  let s2 = e2[n];
14318
14650
  if (this.options.extensions?.renderers?.[s2.type]) {
14319
14651
  let i2 = s2, o = this.options.extensions.renderers[i2.type].call({ parser: this }, i2);
14320
- if (o !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(i2.type)) {
14652
+ if (o !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "checkbox", "html", "def", "paragraph", "text"].includes(i2.type)) {
14321
14653
  t2 += o || "";
14322
14654
  continue;
14323
14655
  }
@@ -14388,7 +14720,7 @@ ${e2}</tr>
14388
14720
  let r2 = e2[s2];
14389
14721
  if (this.options.extensions?.renderers?.[r2.type]) {
14390
14722
  let o = this.options.extensions.renderers[r2.type].call({ parser: this }, r2);
14391
- if (o !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(r2.type)) {
14723
+ if (o !== false || !["escape", "html", "link", "image", "checkbox", "strong", "em", "codespan", "br", "del", "text"].includes(r2.type)) {
14392
14724
  n += o || "";
14393
14725
  continue;
14394
14726
  }
@@ -14449,11 +14781,11 @@ ${e2}</tr>
14449
14781
  return n;
14450
14782
  }
14451
14783
  };
14452
- P = class {
14784
+ S2 = class {
14453
14785
  options;
14454
14786
  block;
14455
14787
  constructor(e2) {
14456
- this.options = e2 || T;
14788
+ this.options = e2 || R;
14457
14789
  }
14458
14790
  static passThroughHooks = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"]);
14459
14791
  static passThroughHooksRespectAsync = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"]);
@@ -14476,17 +14808,17 @@ ${e2}</tr>
14476
14808
  return e2 ? b.parse : b.parseInline;
14477
14809
  }
14478
14810
  };
14479
- D = class {
14480
- defaults = z();
14811
+ Z2 = class {
14812
+ defaults = A2();
14481
14813
  options = this.setOptions;
14482
14814
  parse = this.parseMarkdown(true);
14483
14815
  parseInline = this.parseMarkdown(false);
14484
14816
  Parser = b;
14485
- Renderer = y;
14817
+ Renderer = P;
14486
14818
  TextRenderer = L;
14487
14819
  Lexer = x2;
14488
- Tokenizer = w;
14489
- Hooks = P;
14820
+ Tokenizer = y;
14821
+ Hooks = S2;
14490
14822
  constructor(...e2) {
14491
14823
  this.use(...e2);
14492
14824
  }
@@ -14534,7 +14866,7 @@ ${e2}</tr>
14534
14866
  }
14535
14867
  "childTokens" in r2 && r2.childTokens && (t2.childTokens[r2.name] = r2.childTokens);
14536
14868
  }), s2.extensions = t2), n.renderer) {
14537
- let r2 = this.defaults.renderer || new y(this.defaults);
14869
+ let r2 = this.defaults.renderer || new P(this.defaults);
14538
14870
  for (let i2 in n.renderer) {
14539
14871
  if (!(i2 in r2)) throw new Error(`renderer '${i2}' does not exist`);
14540
14872
  if (["options", "parser"].includes(i2)) continue;
@@ -14547,7 +14879,7 @@ ${e2}</tr>
14547
14879
  s2.renderer = r2;
14548
14880
  }
14549
14881
  if (n.tokenizer) {
14550
- let r2 = this.defaults.tokenizer || new w(this.defaults);
14882
+ let r2 = this.defaults.tokenizer || new y(this.defaults);
14551
14883
  for (let i2 in n.tokenizer) {
14552
14884
  if (!(i2 in r2)) throw new Error(`tokenizer '${i2}' does not exist`);
14553
14885
  if (["options", "rules", "lexer"].includes(i2)) continue;
@@ -14560,13 +14892,13 @@ ${e2}</tr>
14560
14892
  s2.tokenizer = r2;
14561
14893
  }
14562
14894
  if (n.hooks) {
14563
- let r2 = this.defaults.hooks || new P();
14895
+ let r2 = this.defaults.hooks || new S2();
14564
14896
  for (let i2 in n.hooks) {
14565
14897
  if (!(i2 in r2)) throw new Error(`hook '${i2}' does not exist`);
14566
14898
  if (["options", "block"].includes(i2)) continue;
14567
14899
  let o = i2, u = n.hooks[o], a = r2[o];
14568
- P.passThroughHooks.has(i2) ? r2[o] = (p) => {
14569
- if (this.defaults.async && P.passThroughHooksRespectAsync.has(i2)) return (async () => {
14900
+ S2.passThroughHooks.has(i2) ? r2[o] = (p) => {
14901
+ if (this.defaults.async && S2.passThroughHooksRespectAsync.has(i2)) return (async () => {
14570
14902
  let h2 = await u.call(r2, p);
14571
14903
  return a.call(r2, h2);
14572
14904
  })();
@@ -14611,8 +14943,8 @@ ${e2}</tr>
14611
14943
  if (i2.hooks && (i2.hooks.options = i2, i2.hooks.block = e2), i2.async) return (async () => {
14612
14944
  let u = i2.hooks ? await i2.hooks.preprocess(n) : n, p = await (i2.hooks ? await i2.hooks.provideLexer(e2) : e2 ? x2.lex : x2.lexInline)(u, i2), c = i2.hooks ? await i2.hooks.processAllTokens(p) : p;
14613
14945
  i2.walkTokens && await Promise.all(this.walkTokens(c, i2.walkTokens));
14614
- let k = await (i2.hooks ? await i2.hooks.provideParser(e2) : e2 ? b.parse : b.parseInline)(c, i2);
14615
- return i2.hooks ? await i2.hooks.postprocess(k) : k;
14946
+ let d = await (i2.hooks ? await i2.hooks.provideParser(e2) : e2 ? b.parse : b.parseInline)(c, i2);
14947
+ return i2.hooks ? await i2.hooks.postprocess(d) : d;
14616
14948
  })().catch(o);
14617
14949
  try {
14618
14950
  i2.hooks && (n = i2.hooks.preprocess(n));
@@ -14629,7 +14961,7 @@ ${e2}</tr>
14629
14961
  return (n) => {
14630
14962
  if (n.message += `
14631
14963
  Please report this to https://github.com/markedjs/marked.`, e2) {
14632
- let s2 = "<p>An error occurred:</p><pre>" + O(n.message + "", true) + "</pre>";
14964
+ let s2 = "<p>An error occurred:</p><pre>" + T(n.message + "", true) + "</pre>";
14633
14965
  return t2 ? Promise.resolve(s2) : s2;
14634
14966
  }
14635
14967
  if (t2) return Promise.reject(n);
@@ -14637,35 +14969,32 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
14637
14969
  };
14638
14970
  }
14639
14971
  };
14640
- M = new D();
14641
- g.options = g.setOptions = function(l3) {
14642
- return M.setOptions(l3), g.defaults = M.defaults, N(g.defaults), g;
14643
- };
14644
- g.getDefaults = z;
14645
- g.defaults = T;
14646
- g.use = function(...l3) {
14647
- return M.use(...l3), g.defaults = M.defaults, N(g.defaults), g;
14972
+ M = new Z2();
14973
+ f3.options = f3.setOptions = function(l3) {
14974
+ return M.setOptions(l3), f3.defaults = M.defaults, j(f3.defaults), f3;
14648
14975
  };
14649
- g.walkTokens = function(l3, e2) {
14976
+ f3.getDefaults = A2;
14977
+ f3.defaults = R;
14978
+ f3.use = dt;
14979
+ f3.walkTokens = function(l3, e2) {
14650
14980
  return M.walkTokens(l3, e2);
14651
14981
  };
14652
- g.parseInline = M.parseInline;
14653
- g.Parser = b;
14654
- g.parser = b.parse;
14655
- g.Renderer = y;
14656
- g.TextRenderer = L;
14657
- g.Lexer = x2;
14658
- g.lexer = x2.lex;
14659
- g.Tokenizer = w;
14660
- g.Hooks = P;
14661
- g.parse = g;
14662
- Kt = g.options;
14663
- Wt = g.setOptions;
14664
- Xt = g.use;
14665
- Jt = g.walkTokens;
14666
- Vt = g.parseInline;
14667
- en = b.parse;
14668
- tn = x2.lex;
14982
+ f3.parseInline = M.parseInline;
14983
+ f3.Parser = b;
14984
+ f3.parser = b.parse;
14985
+ f3.Renderer = P;
14986
+ f3.TextRenderer = L;
14987
+ f3.Lexer = x2;
14988
+ f3.lexer = x2.lex;
14989
+ f3.Tokenizer = y;
14990
+ f3.Hooks = S2;
14991
+ f3.parse = f3;
14992
+ nn = f3.options;
14993
+ rn = f3.setOptions;
14994
+ sn = f3.walkTokens;
14995
+ on = f3.parseInline;
14996
+ ln = b.parse;
14997
+ un = x2.lex;
14669
14998
  }
14670
14999
  });
14671
15000
 
@@ -14820,7 +15149,7 @@ function tokenToAdfBlock(tok) {
14820
15149
  }
14821
15150
  }
14822
15151
  function markdownToAdf(md) {
14823
- const tokens = g.lexer(stripFrontmatter(md ?? ""));
15152
+ const tokens = f3.lexer(stripFrontmatter(md ?? ""));
14824
15153
  const content = [];
14825
15154
  for (const tok of tokens) {
14826
15155
  const block = tokenToAdfBlock(tok);
@@ -14836,7 +15165,7 @@ function stripLeftoverStarsFromHtml(html) {
14836
15165
  return html.split(/(<code>[\s\S]*?<\/code>)/g).map((part, i2) => i2 % 2 === 1 ? part : part.replace(/\*\*/g, "")).join("");
14837
15166
  }
14838
15167
  function inlineToHtml(text) {
14839
- const html = g.parseInline(text ?? "");
15168
+ const html = f3.parseInline(text ?? "");
14840
15169
  return stripLeftoverStarsFromHtml(typeof html === "string" ? html : "").replace(/<br\s*\/?>/gi, "<br/>");
14841
15170
  }
14842
15171
  function listItemToHtml(item) {
@@ -14883,7 +15212,7 @@ function tokenToStorageHtml(tok, nextPumlId, pumlRegistry) {
14883
15212
  }
14884
15213
  }
14885
15214
  function markdownToStorageFormat(md) {
14886
- const tokens = g.lexer(stripFrontmatter(md ?? ""));
15215
+ const tokens = f3.lexer(stripFrontmatter(md ?? ""));
14887
15216
  const pumlRegistry = /* @__PURE__ */ new Map();
14888
15217
  const parts = [];
14889
15218
  let pumlCounter = 0;
@@ -14914,7 +15243,7 @@ function inferFieldFormat(type, custom3, hasAllowedValues = false) {
14914
15243
  return type;
14915
15244
  }
14916
15245
  function inferAdfFields(fields, explicitKeys) {
14917
- const fromSchema = fields.filter((f3) => f3.inferredFormat === "adf" || f3.inferredFormat === "adf-suspect").map((f3) => f3.key);
15246
+ const fromSchema = fields.filter((f4) => f4.inferredFormat === "adf" || f4.inferredFormat === "adf-suspect").map((f4) => f4.key);
14918
15247
  const merged = explicitKeys?.length ? [...fromSchema, ...explicitKeys] : fromSchema;
14919
15248
  return Array.from(new Set(merged));
14920
15249
  }
@@ -15032,8 +15361,8 @@ var init_jira_client = __esm({
15032
15361
  this.request("/field")
15033
15362
  ]);
15034
15363
  const customFieldMap = /* @__PURE__ */ new Map();
15035
- for (const f3 of fields) {
15036
- customFieldMap.set(f3.id, { name: f3.name, type: f3.schema?.type || "unknown", custom: f3.schema?.custom });
15364
+ for (const f4 of fields) {
15365
+ customFieldMap.set(f4.id, { name: f4.name, type: f4.schema?.type || "unknown", custom: f4.schema?.custom });
15037
15366
  }
15038
15367
  const project = createmeta.projects?.[0];
15039
15368
  if (!project) return { issueTypes: [] };
@@ -15396,7 +15725,7 @@ var require_errors2 = __commonJS({
15396
15725
  // Comment can be max 65535 bytes long (NOTE: some non-US characters may take more space)
15397
15726
  EXTRA_FIELD_PARSE_ERROR: "Extra field parsing error"
15398
15727
  };
15399
- function E2(message) {
15728
+ function E(message) {
15400
15729
  return function(...args) {
15401
15730
  if (args.length) {
15402
15731
  message = message.replace(/\{(\d)\}/g, (_2, n) => args[n] || "");
@@ -15405,7 +15734,7 @@ var require_errors2 = __commonJS({
15405
15734
  };
15406
15735
  }
15407
15736
  for (const msg of Object.keys(errors)) {
15408
- exports[msg] = E2(errors[msg]);
15737
+ exports[msg] = E(errors[msg]);
15409
15738
  }
15410
15739
  }
15411
15740
  });
@@ -15421,7 +15750,7 @@ var require_utils2 = __commonJS({
15421
15750
  var isWin = typeof process === "object" && "win32" === process.platform;
15422
15751
  var is_Obj = (obj) => typeof obj === "object" && obj !== null;
15423
15752
  var crcTable = new Uint32Array(256).map((t2, c) => {
15424
- for (let k = 0; k < 8; k++) {
15753
+ for (let k2 = 0; k2 < 8; k2++) {
15425
15754
  if ((c & 1) !== 0) {
15426
15755
  c = 3988292384 ^ c >>> 1;
15427
15756
  } else {
@@ -16300,8 +16629,8 @@ var require_zipcrypto = __commonJS({
16300
16629
  return byteValue;
16301
16630
  };
16302
16631
  Initkeys.prototype.next = function() {
16303
- const k = (this.keys[2] | 2) >>> 0;
16304
- return uMul(k, k ^ 1) >> 8 & 255;
16632
+ const k2 = (this.keys[2] | 2) >>> 0;
16633
+ return uMul(k2, k2 ^ 1) >> 8 & 255;
16305
16634
  };
16306
16635
  function make_decrypter(pwd) {
16307
16636
  const keys = new Initkeys(pwd);
@@ -16319,8 +16648,8 @@ var require_zipcrypto = __commonJS({
16319
16648
  return function(data, result, pos = 0) {
16320
16649
  if (!result) result = Buffer.alloc(data.length);
16321
16650
  for (let c of data) {
16322
- const k = keys.next();
16323
- result[pos++] = c ^ k;
16651
+ const k2 = keys.next();
16652
+ result[pos++] = c ^ k2;
16324
16653
  keys.updateKeys(c);
16325
16654
  }
16326
16655
  return result;
@@ -18098,169 +18427,169 @@ var require_md5 = __commonJS({
18098
18427
  this.hash();
18099
18428
  };
18100
18429
  Md5.prototype.hash = function() {
18101
- var a, b2, c, d2, bc, da, blocks2 = this.blocks;
18430
+ var a, b2, c, d, bc, da, blocks2 = this.blocks;
18102
18431
  if (this.first) {
18103
18432
  a = blocks2[0] - 680876937;
18104
18433
  a = (a << 7 | a >>> 25) - 271733879 << 0;
18105
- d2 = (-1732584194 ^ a & 2004318071) + blocks2[1] - 117830708;
18106
- d2 = (d2 << 12 | d2 >>> 20) + a << 0;
18107
- c = (-271733879 ^ d2 & (a ^ -271733879)) + blocks2[2] - 1126478375;
18108
- c = (c << 17 | c >>> 15) + d2 << 0;
18109
- b2 = (a ^ c & (d2 ^ a)) + blocks2[3] - 1316259209;
18434
+ d = (-1732584194 ^ a & 2004318071) + blocks2[1] - 117830708;
18435
+ d = (d << 12 | d >>> 20) + a << 0;
18436
+ c = (-271733879 ^ d & (a ^ -271733879)) + blocks2[2] - 1126478375;
18437
+ c = (c << 17 | c >>> 15) + d << 0;
18438
+ b2 = (a ^ c & (d ^ a)) + blocks2[3] - 1316259209;
18110
18439
  b2 = (b2 << 22 | b2 >>> 10) + c << 0;
18111
18440
  } else {
18112
18441
  a = this.h0;
18113
18442
  b2 = this.h1;
18114
18443
  c = this.h2;
18115
- d2 = this.h3;
18116
- a += (d2 ^ b2 & (c ^ d2)) + blocks2[0] - 680876936;
18444
+ d = this.h3;
18445
+ a += (d ^ b2 & (c ^ d)) + blocks2[0] - 680876936;
18117
18446
  a = (a << 7 | a >>> 25) + b2 << 0;
18118
- d2 += (c ^ a & (b2 ^ c)) + blocks2[1] - 389564586;
18119
- d2 = (d2 << 12 | d2 >>> 20) + a << 0;
18120
- c += (b2 ^ d2 & (a ^ b2)) + blocks2[2] + 606105819;
18121
- c = (c << 17 | c >>> 15) + d2 << 0;
18122
- b2 += (a ^ c & (d2 ^ a)) + blocks2[3] - 1044525330;
18447
+ d += (c ^ a & (b2 ^ c)) + blocks2[1] - 389564586;
18448
+ d = (d << 12 | d >>> 20) + a << 0;
18449
+ c += (b2 ^ d & (a ^ b2)) + blocks2[2] + 606105819;
18450
+ c = (c << 17 | c >>> 15) + d << 0;
18451
+ b2 += (a ^ c & (d ^ a)) + blocks2[3] - 1044525330;
18123
18452
  b2 = (b2 << 22 | b2 >>> 10) + c << 0;
18124
18453
  }
18125
- a += (d2 ^ b2 & (c ^ d2)) + blocks2[4] - 176418897;
18454
+ a += (d ^ b2 & (c ^ d)) + blocks2[4] - 176418897;
18126
18455
  a = (a << 7 | a >>> 25) + b2 << 0;
18127
- d2 += (c ^ a & (b2 ^ c)) + blocks2[5] + 1200080426;
18128
- d2 = (d2 << 12 | d2 >>> 20) + a << 0;
18129
- c += (b2 ^ d2 & (a ^ b2)) + blocks2[6] - 1473231341;
18130
- c = (c << 17 | c >>> 15) + d2 << 0;
18131
- b2 += (a ^ c & (d2 ^ a)) + blocks2[7] - 45705983;
18456
+ d += (c ^ a & (b2 ^ c)) + blocks2[5] + 1200080426;
18457
+ d = (d << 12 | d >>> 20) + a << 0;
18458
+ c += (b2 ^ d & (a ^ b2)) + blocks2[6] - 1473231341;
18459
+ c = (c << 17 | c >>> 15) + d << 0;
18460
+ b2 += (a ^ c & (d ^ a)) + blocks2[7] - 45705983;
18132
18461
  b2 = (b2 << 22 | b2 >>> 10) + c << 0;
18133
- a += (d2 ^ b2 & (c ^ d2)) + blocks2[8] + 1770035416;
18462
+ a += (d ^ b2 & (c ^ d)) + blocks2[8] + 1770035416;
18134
18463
  a = (a << 7 | a >>> 25) + b2 << 0;
18135
- d2 += (c ^ a & (b2 ^ c)) + blocks2[9] - 1958414417;
18136
- d2 = (d2 << 12 | d2 >>> 20) + a << 0;
18137
- c += (b2 ^ d2 & (a ^ b2)) + blocks2[10] - 42063;
18138
- c = (c << 17 | c >>> 15) + d2 << 0;
18139
- b2 += (a ^ c & (d2 ^ a)) + blocks2[11] - 1990404162;
18464
+ d += (c ^ a & (b2 ^ c)) + blocks2[9] - 1958414417;
18465
+ d = (d << 12 | d >>> 20) + a << 0;
18466
+ c += (b2 ^ d & (a ^ b2)) + blocks2[10] - 42063;
18467
+ c = (c << 17 | c >>> 15) + d << 0;
18468
+ b2 += (a ^ c & (d ^ a)) + blocks2[11] - 1990404162;
18140
18469
  b2 = (b2 << 22 | b2 >>> 10) + c << 0;
18141
- a += (d2 ^ b2 & (c ^ d2)) + blocks2[12] + 1804603682;
18470
+ a += (d ^ b2 & (c ^ d)) + blocks2[12] + 1804603682;
18142
18471
  a = (a << 7 | a >>> 25) + b2 << 0;
18143
- d2 += (c ^ a & (b2 ^ c)) + blocks2[13] - 40341101;
18144
- d2 = (d2 << 12 | d2 >>> 20) + a << 0;
18145
- c += (b2 ^ d2 & (a ^ b2)) + blocks2[14] - 1502002290;
18146
- c = (c << 17 | c >>> 15) + d2 << 0;
18147
- b2 += (a ^ c & (d2 ^ a)) + blocks2[15] + 1236535329;
18472
+ d += (c ^ a & (b2 ^ c)) + blocks2[13] - 40341101;
18473
+ d = (d << 12 | d >>> 20) + a << 0;
18474
+ c += (b2 ^ d & (a ^ b2)) + blocks2[14] - 1502002290;
18475
+ c = (c << 17 | c >>> 15) + d << 0;
18476
+ b2 += (a ^ c & (d ^ a)) + blocks2[15] + 1236535329;
18148
18477
  b2 = (b2 << 22 | b2 >>> 10) + c << 0;
18149
- a += (c ^ d2 & (b2 ^ c)) + blocks2[1] - 165796510;
18478
+ a += (c ^ d & (b2 ^ c)) + blocks2[1] - 165796510;
18150
18479
  a = (a << 5 | a >>> 27) + b2 << 0;
18151
- d2 += (b2 ^ c & (a ^ b2)) + blocks2[6] - 1069501632;
18152
- d2 = (d2 << 9 | d2 >>> 23) + a << 0;
18153
- c += (a ^ b2 & (d2 ^ a)) + blocks2[11] + 643717713;
18154
- c = (c << 14 | c >>> 18) + d2 << 0;
18155
- b2 += (d2 ^ a & (c ^ d2)) + blocks2[0] - 373897302;
18480
+ d += (b2 ^ c & (a ^ b2)) + blocks2[6] - 1069501632;
18481
+ d = (d << 9 | d >>> 23) + a << 0;
18482
+ c += (a ^ b2 & (d ^ a)) + blocks2[11] + 643717713;
18483
+ c = (c << 14 | c >>> 18) + d << 0;
18484
+ b2 += (d ^ a & (c ^ d)) + blocks2[0] - 373897302;
18156
18485
  b2 = (b2 << 20 | b2 >>> 12) + c << 0;
18157
- a += (c ^ d2 & (b2 ^ c)) + blocks2[5] - 701558691;
18486
+ a += (c ^ d & (b2 ^ c)) + blocks2[5] - 701558691;
18158
18487
  a = (a << 5 | a >>> 27) + b2 << 0;
18159
- d2 += (b2 ^ c & (a ^ b2)) + blocks2[10] + 38016083;
18160
- d2 = (d2 << 9 | d2 >>> 23) + a << 0;
18161
- c += (a ^ b2 & (d2 ^ a)) + blocks2[15] - 660478335;
18162
- c = (c << 14 | c >>> 18) + d2 << 0;
18163
- b2 += (d2 ^ a & (c ^ d2)) + blocks2[4] - 405537848;
18488
+ d += (b2 ^ c & (a ^ b2)) + blocks2[10] + 38016083;
18489
+ d = (d << 9 | d >>> 23) + a << 0;
18490
+ c += (a ^ b2 & (d ^ a)) + blocks2[15] - 660478335;
18491
+ c = (c << 14 | c >>> 18) + d << 0;
18492
+ b2 += (d ^ a & (c ^ d)) + blocks2[4] - 405537848;
18164
18493
  b2 = (b2 << 20 | b2 >>> 12) + c << 0;
18165
- a += (c ^ d2 & (b2 ^ c)) + blocks2[9] + 568446438;
18494
+ a += (c ^ d & (b2 ^ c)) + blocks2[9] + 568446438;
18166
18495
  a = (a << 5 | a >>> 27) + b2 << 0;
18167
- d2 += (b2 ^ c & (a ^ b2)) + blocks2[14] - 1019803690;
18168
- d2 = (d2 << 9 | d2 >>> 23) + a << 0;
18169
- c += (a ^ b2 & (d2 ^ a)) + blocks2[3] - 187363961;
18170
- c = (c << 14 | c >>> 18) + d2 << 0;
18171
- b2 += (d2 ^ a & (c ^ d2)) + blocks2[8] + 1163531501;
18496
+ d += (b2 ^ c & (a ^ b2)) + blocks2[14] - 1019803690;
18497
+ d = (d << 9 | d >>> 23) + a << 0;
18498
+ c += (a ^ b2 & (d ^ a)) + blocks2[3] - 187363961;
18499
+ c = (c << 14 | c >>> 18) + d << 0;
18500
+ b2 += (d ^ a & (c ^ d)) + blocks2[8] + 1163531501;
18172
18501
  b2 = (b2 << 20 | b2 >>> 12) + c << 0;
18173
- a += (c ^ d2 & (b2 ^ c)) + blocks2[13] - 1444681467;
18502
+ a += (c ^ d & (b2 ^ c)) + blocks2[13] - 1444681467;
18174
18503
  a = (a << 5 | a >>> 27) + b2 << 0;
18175
- d2 += (b2 ^ c & (a ^ b2)) + blocks2[2] - 51403784;
18176
- d2 = (d2 << 9 | d2 >>> 23) + a << 0;
18177
- c += (a ^ b2 & (d2 ^ a)) + blocks2[7] + 1735328473;
18178
- c = (c << 14 | c >>> 18) + d2 << 0;
18179
- b2 += (d2 ^ a & (c ^ d2)) + blocks2[12] - 1926607734;
18504
+ d += (b2 ^ c & (a ^ b2)) + blocks2[2] - 51403784;
18505
+ d = (d << 9 | d >>> 23) + a << 0;
18506
+ c += (a ^ b2 & (d ^ a)) + blocks2[7] + 1735328473;
18507
+ c = (c << 14 | c >>> 18) + d << 0;
18508
+ b2 += (d ^ a & (c ^ d)) + blocks2[12] - 1926607734;
18180
18509
  b2 = (b2 << 20 | b2 >>> 12) + c << 0;
18181
18510
  bc = b2 ^ c;
18182
- a += (bc ^ d2) + blocks2[5] - 378558;
18511
+ a += (bc ^ d) + blocks2[5] - 378558;
18183
18512
  a = (a << 4 | a >>> 28) + b2 << 0;
18184
- d2 += (bc ^ a) + blocks2[8] - 2022574463;
18185
- d2 = (d2 << 11 | d2 >>> 21) + a << 0;
18186
- da = d2 ^ a;
18513
+ d += (bc ^ a) + blocks2[8] - 2022574463;
18514
+ d = (d << 11 | d >>> 21) + a << 0;
18515
+ da = d ^ a;
18187
18516
  c += (da ^ b2) + blocks2[11] + 1839030562;
18188
- c = (c << 16 | c >>> 16) + d2 << 0;
18517
+ c = (c << 16 | c >>> 16) + d << 0;
18189
18518
  b2 += (da ^ c) + blocks2[14] - 35309556;
18190
18519
  b2 = (b2 << 23 | b2 >>> 9) + c << 0;
18191
18520
  bc = b2 ^ c;
18192
- a += (bc ^ d2) + blocks2[1] - 1530992060;
18521
+ a += (bc ^ d) + blocks2[1] - 1530992060;
18193
18522
  a = (a << 4 | a >>> 28) + b2 << 0;
18194
- d2 += (bc ^ a) + blocks2[4] + 1272893353;
18195
- d2 = (d2 << 11 | d2 >>> 21) + a << 0;
18196
- da = d2 ^ a;
18523
+ d += (bc ^ a) + blocks2[4] + 1272893353;
18524
+ d = (d << 11 | d >>> 21) + a << 0;
18525
+ da = d ^ a;
18197
18526
  c += (da ^ b2) + blocks2[7] - 155497632;
18198
- c = (c << 16 | c >>> 16) + d2 << 0;
18527
+ c = (c << 16 | c >>> 16) + d << 0;
18199
18528
  b2 += (da ^ c) + blocks2[10] - 1094730640;
18200
18529
  b2 = (b2 << 23 | b2 >>> 9) + c << 0;
18201
18530
  bc = b2 ^ c;
18202
- a += (bc ^ d2) + blocks2[13] + 681279174;
18531
+ a += (bc ^ d) + blocks2[13] + 681279174;
18203
18532
  a = (a << 4 | a >>> 28) + b2 << 0;
18204
- d2 += (bc ^ a) + blocks2[0] - 358537222;
18205
- d2 = (d2 << 11 | d2 >>> 21) + a << 0;
18206
- da = d2 ^ a;
18533
+ d += (bc ^ a) + blocks2[0] - 358537222;
18534
+ d = (d << 11 | d >>> 21) + a << 0;
18535
+ da = d ^ a;
18207
18536
  c += (da ^ b2) + blocks2[3] - 722521979;
18208
- c = (c << 16 | c >>> 16) + d2 << 0;
18537
+ c = (c << 16 | c >>> 16) + d << 0;
18209
18538
  b2 += (da ^ c) + blocks2[6] + 76029189;
18210
18539
  b2 = (b2 << 23 | b2 >>> 9) + c << 0;
18211
18540
  bc = b2 ^ c;
18212
- a += (bc ^ d2) + blocks2[9] - 640364487;
18541
+ a += (bc ^ d) + blocks2[9] - 640364487;
18213
18542
  a = (a << 4 | a >>> 28) + b2 << 0;
18214
- d2 += (bc ^ a) + blocks2[12] - 421815835;
18215
- d2 = (d2 << 11 | d2 >>> 21) + a << 0;
18216
- da = d2 ^ a;
18543
+ d += (bc ^ a) + blocks2[12] - 421815835;
18544
+ d = (d << 11 | d >>> 21) + a << 0;
18545
+ da = d ^ a;
18217
18546
  c += (da ^ b2) + blocks2[15] + 530742520;
18218
- c = (c << 16 | c >>> 16) + d2 << 0;
18547
+ c = (c << 16 | c >>> 16) + d << 0;
18219
18548
  b2 += (da ^ c) + blocks2[2] - 995338651;
18220
18549
  b2 = (b2 << 23 | b2 >>> 9) + c << 0;
18221
- a += (c ^ (b2 | ~d2)) + blocks2[0] - 198630844;
18550
+ a += (c ^ (b2 | ~d)) + blocks2[0] - 198630844;
18222
18551
  a = (a << 6 | a >>> 26) + b2 << 0;
18223
- d2 += (b2 ^ (a | ~c)) + blocks2[7] + 1126891415;
18224
- d2 = (d2 << 10 | d2 >>> 22) + a << 0;
18225
- c += (a ^ (d2 | ~b2)) + blocks2[14] - 1416354905;
18226
- c = (c << 15 | c >>> 17) + d2 << 0;
18227
- b2 += (d2 ^ (c | ~a)) + blocks2[5] - 57434055;
18552
+ d += (b2 ^ (a | ~c)) + blocks2[7] + 1126891415;
18553
+ d = (d << 10 | d >>> 22) + a << 0;
18554
+ c += (a ^ (d | ~b2)) + blocks2[14] - 1416354905;
18555
+ c = (c << 15 | c >>> 17) + d << 0;
18556
+ b2 += (d ^ (c | ~a)) + blocks2[5] - 57434055;
18228
18557
  b2 = (b2 << 21 | b2 >>> 11) + c << 0;
18229
- a += (c ^ (b2 | ~d2)) + blocks2[12] + 1700485571;
18558
+ a += (c ^ (b2 | ~d)) + blocks2[12] + 1700485571;
18230
18559
  a = (a << 6 | a >>> 26) + b2 << 0;
18231
- d2 += (b2 ^ (a | ~c)) + blocks2[3] - 1894986606;
18232
- d2 = (d2 << 10 | d2 >>> 22) + a << 0;
18233
- c += (a ^ (d2 | ~b2)) + blocks2[10] - 1051523;
18234
- c = (c << 15 | c >>> 17) + d2 << 0;
18235
- b2 += (d2 ^ (c | ~a)) + blocks2[1] - 2054922799;
18560
+ d += (b2 ^ (a | ~c)) + blocks2[3] - 1894986606;
18561
+ d = (d << 10 | d >>> 22) + a << 0;
18562
+ c += (a ^ (d | ~b2)) + blocks2[10] - 1051523;
18563
+ c = (c << 15 | c >>> 17) + d << 0;
18564
+ b2 += (d ^ (c | ~a)) + blocks2[1] - 2054922799;
18236
18565
  b2 = (b2 << 21 | b2 >>> 11) + c << 0;
18237
- a += (c ^ (b2 | ~d2)) + blocks2[8] + 1873313359;
18566
+ a += (c ^ (b2 | ~d)) + blocks2[8] + 1873313359;
18238
18567
  a = (a << 6 | a >>> 26) + b2 << 0;
18239
- d2 += (b2 ^ (a | ~c)) + blocks2[15] - 30611744;
18240
- d2 = (d2 << 10 | d2 >>> 22) + a << 0;
18241
- c += (a ^ (d2 | ~b2)) + blocks2[6] - 1560198380;
18242
- c = (c << 15 | c >>> 17) + d2 << 0;
18243
- b2 += (d2 ^ (c | ~a)) + blocks2[13] + 1309151649;
18568
+ d += (b2 ^ (a | ~c)) + blocks2[15] - 30611744;
18569
+ d = (d << 10 | d >>> 22) + a << 0;
18570
+ c += (a ^ (d | ~b2)) + blocks2[6] - 1560198380;
18571
+ c = (c << 15 | c >>> 17) + d << 0;
18572
+ b2 += (d ^ (c | ~a)) + blocks2[13] + 1309151649;
18244
18573
  b2 = (b2 << 21 | b2 >>> 11) + c << 0;
18245
- a += (c ^ (b2 | ~d2)) + blocks2[4] - 145523070;
18574
+ a += (c ^ (b2 | ~d)) + blocks2[4] - 145523070;
18246
18575
  a = (a << 6 | a >>> 26) + b2 << 0;
18247
- d2 += (b2 ^ (a | ~c)) + blocks2[11] - 1120210379;
18248
- d2 = (d2 << 10 | d2 >>> 22) + a << 0;
18249
- c += (a ^ (d2 | ~b2)) + blocks2[2] + 718787259;
18250
- c = (c << 15 | c >>> 17) + d2 << 0;
18251
- b2 += (d2 ^ (c | ~a)) + blocks2[9] - 343485551;
18576
+ d += (b2 ^ (a | ~c)) + blocks2[11] - 1120210379;
18577
+ d = (d << 10 | d >>> 22) + a << 0;
18578
+ c += (a ^ (d | ~b2)) + blocks2[2] + 718787259;
18579
+ c = (c << 15 | c >>> 17) + d << 0;
18580
+ b2 += (d ^ (c | ~a)) + blocks2[9] - 343485551;
18252
18581
  b2 = (b2 << 21 | b2 >>> 11) + c << 0;
18253
18582
  if (this.first) {
18254
18583
  this.h0 = a + 1732584193 << 0;
18255
18584
  this.h1 = b2 - 271733879 << 0;
18256
18585
  this.h2 = c - 1732584194 << 0;
18257
- this.h3 = d2 + 271733878 << 0;
18586
+ this.h3 = d + 271733878 << 0;
18258
18587
  this.first = false;
18259
18588
  } else {
18260
18589
  this.h0 = this.h0 + a << 0;
18261
18590
  this.h1 = this.h1 + b2 << 0;
18262
18591
  this.h2 = this.h2 + c << 0;
18263
- this.h3 = this.h3 + d2 << 0;
18592
+ this.h3 = this.h3 + d << 0;
18264
18593
  }
18265
18594
  };
18266
18595
  Md5.prototype.hex = function() {
@@ -18544,19 +18873,19 @@ var require_tiny_inflate = __commonJS({
18544
18873
  sum += 1 << bits[i2];
18545
18874
  }
18546
18875
  }
18547
- function tinf_build_fixed_trees(lt, dt) {
18876
+ function tinf_build_fixed_trees(lt2, dt2) {
18548
18877
  var i2;
18549
- for (i2 = 0; i2 < 7; ++i2) lt.table[i2] = 0;
18550
- lt.table[7] = 24;
18551
- lt.table[8] = 152;
18552
- lt.table[9] = 112;
18553
- for (i2 = 0; i2 < 24; ++i2) lt.trans[i2] = 256 + i2;
18554
- for (i2 = 0; i2 < 144; ++i2) lt.trans[24 + i2] = i2;
18555
- for (i2 = 0; i2 < 8; ++i2) lt.trans[24 + 144 + i2] = 280 + i2;
18556
- for (i2 = 0; i2 < 112; ++i2) lt.trans[24 + 144 + 8 + i2] = 144 + i2;
18557
- for (i2 = 0; i2 < 5; ++i2) dt.table[i2] = 0;
18558
- dt.table[5] = 32;
18559
- for (i2 = 0; i2 < 32; ++i2) dt.trans[i2] = i2;
18878
+ for (i2 = 0; i2 < 7; ++i2) lt2.table[i2] = 0;
18879
+ lt2.table[7] = 24;
18880
+ lt2.table[8] = 152;
18881
+ lt2.table[9] = 112;
18882
+ for (i2 = 0; i2 < 24; ++i2) lt2.trans[i2] = 256 + i2;
18883
+ for (i2 = 0; i2 < 144; ++i2) lt2.trans[24 + i2] = i2;
18884
+ for (i2 = 0; i2 < 8; ++i2) lt2.trans[24 + 144 + i2] = 280 + i2;
18885
+ for (i2 = 0; i2 < 112; ++i2) lt2.trans[24 + 144 + 8 + i2] = 144 + i2;
18886
+ for (i2 = 0; i2 < 5; ++i2) dt2.table[i2] = 0;
18887
+ dt2.table[5] = 32;
18888
+ for (i2 = 0; i2 < 32; ++i2) dt2.trans[i2] = i2;
18560
18889
  }
18561
18890
  var offs = new Uint16Array(16);
18562
18891
  function tinf_build_tree(t2, lengths2, off, num) {
@@ -18572,34 +18901,34 @@ var require_tiny_inflate = __commonJS({
18572
18901
  if (lengths2[off + i2]) t2.trans[offs[lengths2[off + i2]]++] = i2;
18573
18902
  }
18574
18903
  }
18575
- function tinf_getbit(d2) {
18576
- if (!d2.bitcount--) {
18577
- d2.tag = d2.source[d2.sourceIndex++];
18578
- d2.bitcount = 7;
18904
+ function tinf_getbit(d) {
18905
+ if (!d.bitcount--) {
18906
+ d.tag = d.source[d.sourceIndex++];
18907
+ d.bitcount = 7;
18579
18908
  }
18580
- var bit = d2.tag & 1;
18581
- d2.tag >>>= 1;
18909
+ var bit = d.tag & 1;
18910
+ d.tag >>>= 1;
18582
18911
  return bit;
18583
18912
  }
18584
- function tinf_read_bits(d2, num, base) {
18913
+ function tinf_read_bits(d, num, base) {
18585
18914
  if (!num)
18586
18915
  return base;
18587
- while (d2.bitcount < 24) {
18588
- d2.tag |= d2.source[d2.sourceIndex++] << d2.bitcount;
18589
- d2.bitcount += 8;
18916
+ while (d.bitcount < 24) {
18917
+ d.tag |= d.source[d.sourceIndex++] << d.bitcount;
18918
+ d.bitcount += 8;
18590
18919
  }
18591
- var val = d2.tag & 65535 >>> 16 - num;
18592
- d2.tag >>>= num;
18593
- d2.bitcount -= num;
18920
+ var val = d.tag & 65535 >>> 16 - num;
18921
+ d.tag >>>= num;
18922
+ d.bitcount -= num;
18594
18923
  return val + base;
18595
18924
  }
18596
- function tinf_decode_symbol(d2, t2) {
18597
- while (d2.bitcount < 24) {
18598
- d2.tag |= d2.source[d2.sourceIndex++] << d2.bitcount;
18599
- d2.bitcount += 8;
18925
+ function tinf_decode_symbol(d, t2) {
18926
+ while (d.bitcount < 24) {
18927
+ d.tag |= d.source[d.sourceIndex++] << d.bitcount;
18928
+ d.bitcount += 8;
18600
18929
  }
18601
18930
  var sum = 0, cur = 0, len = 0;
18602
- var tag = d2.tag;
18931
+ var tag = d.tag;
18603
18932
  do {
18604
18933
  cur = 2 * cur + (tag & 1);
18605
18934
  tag >>>= 1;
@@ -18607,38 +18936,38 @@ var require_tiny_inflate = __commonJS({
18607
18936
  sum += t2.table[len];
18608
18937
  cur -= t2.table[len];
18609
18938
  } while (cur >= 0);
18610
- d2.tag = tag;
18611
- d2.bitcount -= len;
18939
+ d.tag = tag;
18940
+ d.bitcount -= len;
18612
18941
  return t2.trans[sum + cur];
18613
18942
  }
18614
- function tinf_decode_trees(d2, lt, dt) {
18943
+ function tinf_decode_trees(d, lt2, dt2) {
18615
18944
  var hlit, hdist, hclen;
18616
18945
  var i2, num, length;
18617
- hlit = tinf_read_bits(d2, 5, 257);
18618
- hdist = tinf_read_bits(d2, 5, 1);
18619
- hclen = tinf_read_bits(d2, 4, 4);
18946
+ hlit = tinf_read_bits(d, 5, 257);
18947
+ hdist = tinf_read_bits(d, 5, 1);
18948
+ hclen = tinf_read_bits(d, 4, 4);
18620
18949
  for (i2 = 0; i2 < 19; ++i2) lengths[i2] = 0;
18621
18950
  for (i2 = 0; i2 < hclen; ++i2) {
18622
- var clen = tinf_read_bits(d2, 3, 0);
18951
+ var clen = tinf_read_bits(d, 3, 0);
18623
18952
  lengths[clcidx[i2]] = clen;
18624
18953
  }
18625
18954
  tinf_build_tree(code_tree, lengths, 0, 19);
18626
18955
  for (num = 0; num < hlit + hdist; ) {
18627
- var sym = tinf_decode_symbol(d2, code_tree);
18956
+ var sym = tinf_decode_symbol(d, code_tree);
18628
18957
  switch (sym) {
18629
18958
  case 16:
18630
18959
  var prev = lengths[num - 1];
18631
- for (length = tinf_read_bits(d2, 2, 3); length; --length) {
18960
+ for (length = tinf_read_bits(d, 2, 3); length; --length) {
18632
18961
  lengths[num++] = prev;
18633
18962
  }
18634
18963
  break;
18635
18964
  case 17:
18636
- for (length = tinf_read_bits(d2, 3, 3); length; --length) {
18965
+ for (length = tinf_read_bits(d, 3, 3); length; --length) {
18637
18966
  lengths[num++] = 0;
18638
18967
  }
18639
18968
  break;
18640
18969
  case 18:
18641
- for (length = tinf_read_bits(d2, 7, 11); length; --length) {
18970
+ for (length = tinf_read_bits(d, 7, 11); length; --length) {
18642
18971
  lengths[num++] = 0;
18643
18972
  }
18644
18973
  break;
@@ -18647,65 +18976,65 @@ var require_tiny_inflate = __commonJS({
18647
18976
  break;
18648
18977
  }
18649
18978
  }
18650
- tinf_build_tree(lt, lengths, 0, hlit);
18651
- tinf_build_tree(dt, lengths, hlit, hdist);
18979
+ tinf_build_tree(lt2, lengths, 0, hlit);
18980
+ tinf_build_tree(dt2, lengths, hlit, hdist);
18652
18981
  }
18653
- function tinf_inflate_block_data(d2, lt, dt) {
18982
+ function tinf_inflate_block_data(d, lt2, dt2) {
18654
18983
  while (1) {
18655
- var sym = tinf_decode_symbol(d2, lt);
18984
+ var sym = tinf_decode_symbol(d, lt2);
18656
18985
  if (sym === 256) {
18657
18986
  return TINF_OK;
18658
18987
  }
18659
18988
  if (sym < 256) {
18660
- d2.dest[d2.destLen++] = sym;
18989
+ d.dest[d.destLen++] = sym;
18661
18990
  } else {
18662
18991
  var length, dist, offs2;
18663
18992
  var i2;
18664
18993
  sym -= 257;
18665
- length = tinf_read_bits(d2, length_bits[sym], length_base[sym]);
18666
- dist = tinf_decode_symbol(d2, dt);
18667
- offs2 = d2.destLen - tinf_read_bits(d2, dist_bits[dist], dist_base[dist]);
18994
+ length = tinf_read_bits(d, length_bits[sym], length_base[sym]);
18995
+ dist = tinf_decode_symbol(d, dt2);
18996
+ offs2 = d.destLen - tinf_read_bits(d, dist_bits[dist], dist_base[dist]);
18668
18997
  for (i2 = offs2; i2 < offs2 + length; ++i2) {
18669
- d2.dest[d2.destLen++] = d2.dest[i2];
18998
+ d.dest[d.destLen++] = d.dest[i2];
18670
18999
  }
18671
19000
  }
18672
19001
  }
18673
19002
  }
18674
- function tinf_inflate_uncompressed_block(d2) {
19003
+ function tinf_inflate_uncompressed_block(d) {
18675
19004
  var length, invlength;
18676
19005
  var i2;
18677
- while (d2.bitcount > 8) {
18678
- d2.sourceIndex--;
18679
- d2.bitcount -= 8;
18680
- }
18681
- length = d2.source[d2.sourceIndex + 1];
18682
- length = 256 * length + d2.source[d2.sourceIndex];
18683
- invlength = d2.source[d2.sourceIndex + 3];
18684
- invlength = 256 * invlength + d2.source[d2.sourceIndex + 2];
19006
+ while (d.bitcount > 8) {
19007
+ d.sourceIndex--;
19008
+ d.bitcount -= 8;
19009
+ }
19010
+ length = d.source[d.sourceIndex + 1];
19011
+ length = 256 * length + d.source[d.sourceIndex];
19012
+ invlength = d.source[d.sourceIndex + 3];
19013
+ invlength = 256 * invlength + d.source[d.sourceIndex + 2];
18685
19014
  if (length !== (~invlength & 65535))
18686
19015
  return TINF_DATA_ERROR;
18687
- d2.sourceIndex += 4;
19016
+ d.sourceIndex += 4;
18688
19017
  for (i2 = length; i2; --i2)
18689
- d2.dest[d2.destLen++] = d2.source[d2.sourceIndex++];
18690
- d2.bitcount = 0;
19018
+ d.dest[d.destLen++] = d.source[d.sourceIndex++];
19019
+ d.bitcount = 0;
18691
19020
  return TINF_OK;
18692
19021
  }
18693
19022
  function tinf_uncompress(source, dest) {
18694
- var d2 = new Data(source, dest);
19023
+ var d = new Data(source, dest);
18695
19024
  var bfinal, btype, res;
18696
19025
  do {
18697
- bfinal = tinf_getbit(d2);
18698
- btype = tinf_read_bits(d2, 2, 0);
19026
+ bfinal = tinf_getbit(d);
19027
+ btype = tinf_read_bits(d, 2, 0);
18699
19028
  switch (btype) {
18700
19029
  case 0:
18701
- res = tinf_inflate_uncompressed_block(d2);
19030
+ res = tinf_inflate_uncompressed_block(d);
18702
19031
  break;
18703
19032
  case 1:
18704
- res = tinf_inflate_block_data(d2, sltree, sdtree);
19033
+ res = tinf_inflate_block_data(d, sltree, sdtree);
18705
19034
  break;
18706
19035
  case 2:
18707
- tinf_decode_trees(d2, d2.ltree, d2.dtree);
18708
- res = tinf_inflate_block_data(d2, d2.ltree, d2.dtree);
19036
+ tinf_decode_trees(d, d.ltree, d.dtree);
19037
+ res = tinf_inflate_block_data(d, d.ltree, d.dtree);
18709
19038
  break;
18710
19039
  default:
18711
19040
  res = TINF_DATA_ERROR;
@@ -18713,13 +19042,13 @@ var require_tiny_inflate = __commonJS({
18713
19042
  if (res !== TINF_OK)
18714
19043
  throw new Error("Data error");
18715
19044
  } while (!bfinal);
18716
- if (d2.destLen < d2.dest.length) {
18717
- if (typeof d2.dest.slice === "function")
18718
- return d2.dest.slice(0, d2.destLen);
19045
+ if (d.destLen < d.dest.length) {
19046
+ if (typeof d.dest.slice === "function")
19047
+ return d.dest.slice(0, d.destLen);
18719
19048
  else
18720
- return d2.dest.subarray(0, d2.destLen);
19049
+ return d.dest.subarray(0, d.destLen);
18721
19050
  }
18722
- return d2.dest;
19051
+ return d.dest;
18723
19052
  }
18724
19053
  tinf_build_fixed_trees(sltree, sdtree);
18725
19054
  tinf_build_bits_base(length_bits, length_base, 4, 3);
@@ -145441,10 +145770,10 @@ var util;
145441
145770
  return obj;
145442
145771
  };
145443
145772
  util2.getValidEnumValues = (obj) => {
145444
- const validKeys = util2.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
145773
+ const validKeys = util2.objectKeys(obj).filter((k2) => typeof obj[obj[k2]] !== "number");
145445
145774
  const filtered = {};
145446
- for (const k of validKeys) {
145447
- filtered[k] = obj[k];
145775
+ for (const k2 of validKeys) {
145776
+ filtered[k2] = obj[k2];
145448
145777
  }
145449
145778
  return util2.objectValues(filtered);
145450
145779
  };
@@ -149365,9 +149694,9 @@ function $constructor(name, initializer3, params) {
149365
149694
  (_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set());
149366
149695
  inst._zod.traits.add(name);
149367
149696
  initializer3(inst, def);
149368
- for (const k in _2.prototype) {
149369
- if (!(k in inst))
149370
- Object.defineProperty(inst, k, { value: _2.prototype[k].bind(inst) });
149697
+ for (const k2 in _2.prototype) {
149698
+ if (!(k2 in inst))
149699
+ Object.defineProperty(inst, k2, { value: _2.prototype[k2].bind(inst) });
149371
149700
  }
149372
149701
  inst._zod.constr = _2;
149373
149702
  inst._zod.def = def;
@@ -149477,7 +149806,7 @@ function assert(_2) {
149477
149806
  }
149478
149807
  function getEnumValues(entries) {
149479
149808
  const numericValues = Object.values(entries).filter((v2) => typeof v2 === "number");
149480
- const values = Object.entries(entries).filter(([k, _2]) => numericValues.indexOf(+k) === -1).map(([_2, v2]) => v2);
149809
+ const values = Object.entries(entries).filter(([k2, _2]) => numericValues.indexOf(+k2) === -1).map(([_2, v2]) => v2);
149481
149810
  return values;
149482
149811
  }
149483
149812
  function joinValues(array2, separator = "|") {
@@ -149724,8 +150053,8 @@ function stringifyPrimitive(value) {
149724
150053
  return `${value}`;
149725
150054
  }
149726
150055
  function optionalKeys(shape) {
149727
- return Object.keys(shape).filter((k) => {
149728
- return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional";
150056
+ return Object.keys(shape).filter((k2) => {
150057
+ return shape[k2]._zod.optin === "optional" && shape[k2]._zod.optout === "optional";
149729
150058
  });
149730
150059
  }
149731
150060
  var NUMBER_FORMAT_RANGES = {
@@ -149921,8 +150250,8 @@ function issue(...args) {
149921
150250
  return { ...iss };
149922
150251
  }
149923
150252
  function cleanEnum(obj) {
149924
- return Object.entries(obj).filter(([k, _2]) => {
149925
- return Number.isNaN(Number.parseInt(k, 10));
150253
+ return Object.entries(obj).filter(([k2, _2]) => {
150254
+ return Number.isNaN(Number.parseInt(k2, 10));
149926
150255
  }).map((el) => el[1]);
149927
150256
  }
149928
150257
  var Class = class {
@@ -151076,9 +151405,9 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
151076
151405
  $ZodType.init(inst, def);
151077
151406
  const _normalized = cached(() => {
151078
151407
  const keys = Object.keys(def.shape);
151079
- for (const k of keys) {
151080
- if (!(def.shape[k] instanceof $ZodType)) {
151081
- throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
151408
+ for (const k2 of keys) {
151409
+ if (!(def.shape[k2] instanceof $ZodType)) {
151410
+ throw new Error(`Invalid element at key "${k2}": expected a Zod schema`);
151082
151411
  }
151083
151412
  }
151084
151413
  const okeys = optionalKeys(def.shape);
@@ -151107,8 +151436,8 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
151107
151436
  const doc = new Doc(["shape", "payload", "ctx"]);
151108
151437
  const normalized = _normalized.value;
151109
151438
  const parseStr = (key) => {
151110
- const k = esc(key);
151111
- return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
151439
+ const k2 = esc(key);
151440
+ return `shape[${k2}]._zod.run({ value: input[${k2}], issues: [] }, ctx)`;
151112
151441
  };
151113
151442
  doc.write(`const input = payload.value;`);
151114
151443
  const ids = /* @__PURE__ */ Object.create(null);
@@ -151121,25 +151450,25 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
151121
151450
  if (normalized.optionalKeys.has(key)) {
151122
151451
  const id = ids[key];
151123
151452
  doc.write(`const ${id} = ${parseStr(key)};`);
151124
- const k = esc(key);
151453
+ const k2 = esc(key);
151125
151454
  doc.write(`
151126
151455
  if (${id}.issues.length) {
151127
- if (input[${k}] === undefined) {
151128
- if (${k} in input) {
151129
- newResult[${k}] = undefined;
151456
+ if (input[${k2}] === undefined) {
151457
+ if (${k2} in input) {
151458
+ newResult[${k2}] = undefined;
151130
151459
  }
151131
151460
  } else {
151132
151461
  payload.issues = payload.issues.concat(
151133
151462
  ${id}.issues.map((iss) => ({
151134
151463
  ...iss,
151135
- path: iss.path ? [${k}, ...iss.path] : [${k}],
151464
+ path: iss.path ? [${k2}, ...iss.path] : [${k2}],
151136
151465
  }))
151137
151466
  );
151138
151467
  }
151139
151468
  } else if (${id}.value === undefined) {
151140
- if (${k} in input) newResult[${k}] = undefined;
151469
+ if (${k2} in input) newResult[${k2}] = undefined;
151141
151470
  } else {
151142
- newResult[${k}] = ${id}.value;
151471
+ newResult[${k2}] = ${id}.value;
151143
151472
  }
151144
151473
  `);
151145
151474
  } else {
@@ -151299,11 +151628,11 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
151299
151628
  const pv = option._zod.propValues;
151300
151629
  if (!pv || Object.keys(pv).length === 0)
151301
151630
  throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
151302
- for (const [k, v2] of Object.entries(pv)) {
151303
- if (!propValues[k])
151304
- propValues[k] = /* @__PURE__ */ new Set();
151631
+ for (const [k2, v2] of Object.entries(pv)) {
151632
+ if (!propValues[k2])
151633
+ propValues[k2] = /* @__PURE__ */ new Set();
151305
151634
  for (const val of v2) {
151306
- propValues[k].add(val);
151635
+ propValues[k2].add(val);
151307
151636
  }
151308
151637
  }
151309
151638
  }
@@ -151526,7 +151855,7 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
151526
151855
  $ZodType.init(inst, def);
151527
151856
  const values = getEnumValues(def.entries);
151528
151857
  inst._zod.values = new Set(values);
151529
- inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
151858
+ inst._zod.pattern = new RegExp(`^(${values.filter((k2) => propertyKeyTypes.has(typeof k2)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
151530
151859
  inst._zod.parse = (payload, _ctx) => {
151531
151860
  const input = payload.value;
151532
151861
  if (inst._zod.values.has(input)) {
@@ -157856,15 +158185,15 @@ function isPlainObject2(value) {
157856
158185
  function mergeCapabilities(base, additional) {
157857
158186
  const result = { ...base };
157858
158187
  for (const key in additional) {
157859
- const k = key;
157860
- const addValue = additional[k];
158188
+ const k2 = key;
158189
+ const addValue = additional[k2];
157861
158190
  if (addValue === void 0)
157862
158191
  continue;
157863
- const baseValue = result[k];
158192
+ const baseValue = result[k2];
157864
158193
  if (isPlainObject2(baseValue) && isPlainObject2(addValue)) {
157865
- result[k] = { ...baseValue, ...addValue };
158194
+ result[k2] = { ...baseValue, ...addValue };
157866
158195
  } else {
157867
- result[k] = addValue;
158196
+ result[k2] = addValue;
157868
158197
  }
157869
158198
  }
157870
158199
  return result;
@@ -159735,6 +160064,30 @@ true\r
159735
160064
  clearTimeout(timer);
159736
160065
  }
159737
160066
  }
160067
+ /**
160068
+ * 페이지 첨부 목록 조회. Confluence REST는 페이지 자체 attachments 도 expand 가능하지만
160069
+ * 명시적 list도 지원 — 여기선 GET child/attachment?limit=N.
160070
+ */
160071
+ async listAttachments(pageId, limit = 100) {
160072
+ const resp = await this.request(
160073
+ `${this.baseUrl}/wiki/rest/api/content/${encodeURIComponent(pageId)}/child/attachment?limit=${limit}`,
160074
+ { label: "listAttachments" }
160075
+ );
160076
+ const data = resp;
160077
+ const items = Array.isArray(data?.results) ? data.results : [];
160078
+ return items.map((it2) => ({ id: String(it2.id), title: String(it2.title ?? "") }));
160079
+ }
160080
+ /**
160081
+ * 첨부 삭제. Confluence REST API는 attachment를 v1 endpoint의 POST .../remove action 형태로만
160082
+ * 삭제 허용 (DELETE method는 405 reject — Atlassian gateway 필터링).
160083
+ * POST /wiki/rest/api/content/{pageId}/child/attachment/{attachmentId}/remove
160084
+ */
160085
+ async deleteAttachment(pageId, attachmentId) {
160086
+ await this.request(
160087
+ `${this.baseUrl}/wiki/rest/api/content/${encodeURIComponent(pageId)}/child/attachment/${encodeURIComponent(attachmentId)}/remove`,
160088
+ { method: "POST", label: "deleteAttachment" }
160089
+ );
160090
+ }
159738
160091
  };
159739
160092
  function escapeMimeFilename2(name) {
159740
160093
  return name.replace(/"/g, "%22").replace(/\r/g, "%0D").replace(/\n/g, "%0A");
@@ -159923,7 +160276,7 @@ var XrayClient = class {
159923
160276
  writeFileSync(zipPath, buffer);
159924
160277
  const zip = new import_adm_zip.default(zipPath);
159925
160278
  zip.extractAllTo(outputDir, true);
159926
- const files = readdirSync(outputDir).filter((f3) => f3.endsWith(".feature"));
160279
+ const files = readdirSync(outputDir).filter((f4) => f4.endsWith(".feature"));
159927
160280
  return { zip_path: zipPath, feature_dir: outputDir, files, count: files.length };
159928
160281
  }
159929
160282
  async importResults(results) {
@@ -159967,7 +160320,7 @@ var registerJiraCrudTools = (ctx2) => {
159967
160320
  issue_key: external_exports.string().describe("Issue key (e.g. PROJ-123)"),
159968
160321
  fields: external_exports.string().optional().describe("Comma-separated list of fields to return")
159969
160322
  }, async ({ issue_key, fields }) => {
159970
- const fieldList = fields ? fields.split(",").map((f3) => f3.trim()) : void 0;
160323
+ const fieldList = fields ? fields.split(",").map((f4) => f4.trim()) : void 0;
159971
160324
  const data = await jira2.getIssue(issue_key, fieldList);
159972
160325
  return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
159973
160326
  });
@@ -160115,7 +160468,7 @@ function resolveJar() {
160115
160468
  `PlantUML jar directory not found at ${JAR_DIR}. Run 'npm run build' to copy the jar.`
160116
160469
  );
160117
160470
  }
160118
- const jars = readdirSync2(JAR_DIR).filter((f3) => f3.endsWith(".jar"));
160471
+ const jars = readdirSync2(JAR_DIR).filter((f4) => f4.endsWith(".jar"));
160119
160472
  if (jars.length === 0) {
160120
160473
  throw new Error(`No .jar files in ${JAR_DIR}. Run 'npm run build' to copy the jar.`);
160121
160474
  }
@@ -160267,9 +160620,10 @@ var registerConfluenceTools = (ctx2) => {
160267
160620
  parent_page_id: external_exports.string().optional().describe("Parent page ID \u2014 create mode only, nests the new page under this parent. Ignored in update mode."),
160268
160621
  page_id: external_exports.string().optional().describe("Existing page ID. When provided, the page is UPDATED (current version fetched then incremented). When omitted, a NEW page is created."),
160269
160622
  render_diagrams: external_exports.boolean().optional().default(true).describe("Render ```plantuml fences to PNG/SVG and embed as attachments. Default true. Falls back to code block on render failure."),
160623
+ clean_stale_attachments: external_exports.boolean().optional().default(false).describe("update \uBAA8\uB4DC\uC77C \uB54C \uAC8C\uC7AC \uC9C1\uC804 \uD398\uC774\uC9C0\uC5D0\uC11C diagram-* prefix \uCCA8\uBD80 \uC77C\uAD04 \uC0AD\uC81C. \uB204\uC801 \uBC29\uC9C0\uC6A9. Default false (\uC548\uC804). \uCCAB \uAC8C\uC7AC(create)\uC5D4 \uD6A8\uACFC \uC5C6\uC74C."),
160270
160624
  diagram_format: external_exports.enum(["png", "svg"]).optional().default("png").describe("Image format for rendered diagrams. Default png."),
160271
160625
  diagram_dpi: external_exports.number().optional().default(96).describe("Rendering DPI (PNG only, ignored for SVG). Default 96.")
160272
- }, async ({ space_key, title, markdown, markdown_file, parent_page_id, page_id, render_diagrams = true, diagram_format = "png", diagram_dpi = 96 }) => {
160626
+ }, async ({ space_key, title, markdown, markdown_file, parent_page_id, page_id, render_diagrams = true, clean_stale_attachments = false, diagram_format = "png", diagram_dpi = 96 }) => {
160273
160627
  if (!markdown && !markdown_file) {
160274
160628
  throw new Error("Either markdown or markdown_file must be provided");
160275
160629
  }
@@ -160287,7 +160641,6 @@ var registerConfluenceTools = (ctx2) => {
160287
160641
  md = markdown;
160288
160642
  }
160289
160643
  const { storage, pumlRegistry } = markdownToStorageFormat(md);
160290
- console.error(`[confluence_publish_doc] pumlRegistry.size=${pumlRegistry.size}, render_diagrams=${render_diagrams}, md_len=${md.length}`);
160291
160644
  const bodyBytes = Buffer.byteLength(storage, "utf8");
160292
160645
  const warning = bodyBytes > STORAGE_BODY_WARN_BYTES ? `storage body is ${bodyBytes} bytes (> ${STORAGE_BODY_WARN_BYTES}). Confluence may reject or render slowly \u2014 consider splitting into child pages.` : void 0;
160293
160646
  if (warning) console.error(`[confluence_publish_doc] ${warning}`);
@@ -160329,25 +160682,45 @@ var registerConfluenceTools = (ctx2) => {
160329
160682
  currentPageId = result?.id;
160330
160683
  currentVersion = result?.version?.number ?? 1;
160331
160684
  }
160685
+ if (mode === "update" && clean_stale_attachments) {
160686
+ renderTrace.push("cleanup entry");
160687
+ try {
160688
+ const existing = await confluence2.listAttachments(currentPageId);
160689
+ const targets = existing.filter((a) => /^diagram-/.test(a.title));
160690
+ let deleted = 0;
160691
+ for (const att of targets) {
160692
+ try {
160693
+ await confluence2.deleteAttachment(currentPageId, att.id);
160694
+ deleted++;
160695
+ } catch (err) {
160696
+ renderTrace.push(`cleanup delete FAIL ${att.title}: ${err?.message ?? err}`);
160697
+ }
160698
+ }
160699
+ renderTrace.push(`cleanup done: deleted=${deleted}/${targets.length}`);
160700
+ } catch (err) {
160701
+ renderTrace.push(`cleanup FAIL: ${err?.message ?? err}`);
160702
+ }
160703
+ }
160332
160704
  let finalStorage = storage;
160333
160705
  renderTrace.push(`round2 entry: renderedDiagrams.size=${renderedDiagrams.size}`);
160334
160706
  if (render_diagrams && renderedDiagrams.size > 0) {
160335
160707
  let attIter = 0;
160708
+ const attachmentNames = /* @__PURE__ */ new Map();
160336
160709
  for (const [id, diag] of renderedDiagrams) {
160337
160710
  attIter++;
160338
- const filename = `diagram-${id}.${diag.format}`;
160711
+ const filename = `diagram-${id}-${Date.now()}.${diag.format}`;
160339
160712
  try {
160340
160713
  await confluence2.addAttachment(currentPageId, filename, diag.buffer, diag.contentType);
160714
+ attachmentNames.set(id, filename);
160341
160715
  renderTrace.push(`attach ${attIter}/${renderedDiagrams.size}: ${filename} OK`);
160342
160716
  } catch (err) {
160343
160717
  renderTrace.push(`attach ${attIter}/${renderedDiagrams.size}: ${filename} FAIL \u2014 ${err?.message ?? err}`);
160344
- console.error(`[confluence_publish_doc] attachment upload failed for ${id}: ${err?.message ?? err}`);
160345
160718
  renderedDiagrams.delete(id);
160346
160719
  diagramStats.rendered--;
160347
160720
  }
160348
160721
  }
160349
160722
  renderTrace.push(`round2 pre-replace: renderedDiagrams.size=${renderedDiagrams.size}`);
160350
- finalStorage = replacePumlMarkers(storage, renderedDiagrams, pumlRegistry);
160723
+ finalStorage = replacePumlMarkers(storage, renderedDiagrams, pumlRegistry, attachmentNames);
160351
160724
  renderTrace.push(`round2 post-replace: finalStorage.length=${finalStorage.length}, contains-image=${finalStorage.includes("<ac:image")}`);
160352
160725
  result = await confluence2.updatePage(currentPageId, title, finalStorage, currentVersion);
160353
160726
  renderTrace.push(`round2 update: v${result?.version?.number}, body_chars=${finalStorage.length}`);
@@ -160382,10 +160755,10 @@ var registerConfluenceTools = (ctx2) => {
160382
160755
  };
160383
160756
  });
160384
160757
  };
160385
- function replacePumlMarkers(storage, rendered, pumlRegistry) {
160758
+ function replacePumlMarkers(storage, rendered, pumlRegistry, attachmentNames) {
160386
160759
  let out = storage;
160387
160760
  for (const [id, diag] of rendered) {
160388
- const filename = `diagram-${id}.${diag.format}`;
160761
+ const filename = attachmentNames?.get(id) ?? `diagram-${id}.${diag.format}`;
160389
160762
  const imageMacro = `<ac:image ac:alt="PlantUML Diagram ${id}"><ri:attachment ri:filename="${filename}"/></ac:image>`;
160390
160763
  out = out.replace(
160391
160764
  new RegExp(`<p data-puml-id="${id}"></p>`),
@@ -160718,7 +161091,7 @@ var registerRiskTools = (ctx2) => {
160718
161091
  if (out.details.length === 0 && (out.skipped ?? []).length === 0) {
160719
161092
  lines.push(`(no risk values specified for ${project_key})`);
160720
161093
  }
160721
- for (const d2 of out.details) lines.push(formatSetDetail(d2));
161094
+ for (const d of out.details) lines.push(formatSetDetail(d));
160722
161095
  for (const s2 of out.skipped ?? []) lines.push(`SKIPPED ${s2.classifier} (${s2.reason})`);
160723
161096
  return { content: [{ type: "text", text: lines.join("\n") }] };
160724
161097
  }
@@ -160737,9 +161110,9 @@ var registerRiskTools = (ctx2) => {
160737
161110
  token_present: tokenPresent,
160738
161111
  diagnostic_note: "token\uC774 \uC5C6\uAC70\uB098 endpoint\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC73C\uBA74 setRiskValue \uD638\uCD9C\uC774 \uC2E4\uD328\uD569\uB2C8\uB2E4. /plugin configure \uB85C RISK_PLUGIN_ENDPOINT / RISK_PLUGIN_AUTH_TOKEN \uC744 \uC785\uB825.",
160739
161112
  models: Object.fromEntries(
160740
- Object.keys(RISK_MODELS).map((k) => {
160741
- const m3 = RISK_MODELS[k];
160742
- return [k, {
161113
+ Object.keys(RISK_MODELS).map((k2) => {
161114
+ const m3 = RISK_MODELS[k2];
161115
+ return [k2, {
160743
161116
  label: m3.label,
160744
161117
  modelKey: m3.modelKey,
160745
161118
  riskSets: m3.riskSets,
@@ -160791,7 +161164,7 @@ var registerRiskTools = (ctx2) => {
160791
161164
  { model: "cia", name: "CIA", res: planSetRisk("cia", "initial", h2.cia ?? {}, issueKey), issueKey }
160792
161165
  ];
160793
161166
  const out = await runSetPlans(risk2, tasks);
160794
- const riskOk = out.details.every((d2) => d2.result.ok);
161167
+ const riskOk = out.details.every((d) => d.result.ok);
160795
161168
  const riskSkipped = out.skipped ?? [];
160796
161169
  for (const srcKey of h2.source_keys) {
160797
161170
  await jira2.createLink("Risk Source", issueKey, srcKey);
@@ -160913,9 +161286,9 @@ function parseCvssVector(vector) {
160913
161286
  for (const part of vector.split("/")) {
160914
161287
  const colonIdx = part.indexOf(":");
160915
161288
  if (colonIdx > 0) {
160916
- const k = part.substring(0, colonIdx);
161289
+ const k2 = part.substring(0, colonIdx);
160917
161290
  const v2 = part.substring(colonIdx + 1);
160918
- if (k !== "CVSS") result[k] = v2;
161291
+ if (k2 !== "CVSS") result[k2] = v2;
160919
161292
  }
160920
161293
  }
160921
161294
  return result;
@@ -160947,10 +161320,10 @@ function calculateCvssScore(metrics) {
160947
161320
  }
160948
161321
  function validateMetrics(metrics) {
160949
161322
  const errors = [];
160950
- for (const [k, v2] of Object.entries(metrics)) {
160951
- const valid = METRIC_VALUES[k];
160952
- if (!valid) errors.push(`Unknown metric: ${k}`);
160953
- else if (!valid.includes(v2)) errors.push(`Invalid value ${v2} for ${k}. Valid: ${valid.join(", ")}`);
161323
+ for (const [k2, v2] of Object.entries(metrics)) {
161324
+ const valid = METRIC_VALUES[k2];
161325
+ if (!valid) errors.push(`Unknown metric: ${k2}`);
161326
+ else if (!valid.includes(v2)) errors.push(`Invalid value ${v2} for ${k2}. Valid: ${valid.join(", ")}`);
160954
161327
  }
160955
161328
  return errors;
160956
161329
  }
@@ -160968,7 +161341,7 @@ ${errors.join("\n")}` }] };
160968
161341
  }
160969
161342
  const vector = buildCvssVector(metrics);
160970
161343
  const { score, severity } = calculateCvssScore(metrics);
160971
- const details = Object.entries(metrics).map(([k, v2]) => ` ${k} = ${v2} (${METRIC_LABELS[k] || k})`).join("\n");
161344
+ const details = Object.entries(metrics).map(([k2, v2]) => ` ${k2} = ${v2} (${METRIC_LABELS[k2] || k2})`).join("\n");
160972
161345
  return { content: [{ type: "text", text: `CVSS Vector: ${vector}
160973
161346
  Score: ${score} (${severity})
160974
161347
 
@@ -161006,15 +161379,15 @@ ${errors.join("\n")}` }] };
161006
161379
  issue_key: external_exports.string().describe("Vulnerability issue key")
161007
161380
  }, async ({ issue_key }) => {
161008
161381
  const data = await jira2.getIssue(issue_key, ["summary", "customfield_10166", "customfield_10167"]);
161009
- const f3 = data.fields;
161010
- const vector = f3?.customfield_10166 || "";
161011
- const score = f3?.customfield_10167 || "";
161382
+ const f4 = data.fields;
161383
+ const vector = f4?.customfield_10166 || "";
161384
+ const score = f4?.customfield_10167 || "";
161012
161385
  let details = "";
161013
161386
  if (vector) {
161014
161387
  const metrics = parseCvssVector(vector);
161015
- details = "\n\nMetrics:\n" + Object.entries(metrics).map(([k, v2]) => ` ${k} = ${v2} (${METRIC_LABELS[k] || k})`).join("\n");
161388
+ details = "\n\nMetrics:\n" + Object.entries(metrics).map(([k2, v2]) => ` ${k2} = ${v2} (${METRIC_LABELS[k2] || k2})`).join("\n");
161016
161389
  }
161017
- return { content: [{ type: "text", text: `${issue_key}: ${f3?.summary}
161390
+ return { content: [{ type: "text", text: `${issue_key}: ${f4?.summary}
161018
161391
  CVSS Vector: ${vector}
161019
161392
  CVSS Score: ${score}${details}` }] };
161020
161393
  });
@@ -161073,14 +161446,14 @@ var registerTraceabilityTools = (ctx2) => {
161073
161446
  issue_key: external_exports.string().describe("Issue key to check")
161074
161447
  }, async ({ issue_key }) => {
161075
161448
  const data = await jira2.getIssue(issue_key, ["summary", "issuetype", "status", "issuelinks", "subtasks", "parent"]);
161076
- const f3 = data.fields;
161449
+ const f4 = data.fields;
161077
161450
  const links = extractLinks(data);
161078
161451
  const report = [
161079
- `=== ${issue_key}: ${f3.summary} ===`,
161080
- `Type: ${f3.issuetype?.name} | Status: ${f3.status?.name}`,
161452
+ `=== ${issue_key}: ${f4.summary} ===`,
161453
+ `Type: ${f4.issuetype?.name} | Status: ${f4.status?.name}`,
161081
161454
  "",
161082
- `Parent: ${f3.parent?.key || "(none)"}`,
161083
- `Subtasks: ${(f3.subtasks || []).map((s2) => s2.key).join(", ") || "(none)"}`,
161455
+ `Parent: ${f4.parent?.key || "(none)"}`,
161456
+ `Subtasks: ${(f4.subtasks || []).map((s2) => s2.key).join(", ") || "(none)"}`,
161084
161457
  "",
161085
161458
  `Links (${links.length}):`,
161086
161459
  ...links.map((l3) => ` ${l3.direction === "inward" ? "\u2190" : "\u2192"} [${l3.link_type}] ${l3.key}: ${l3.summary}`)
@@ -161152,7 +161525,7 @@ var EA_DOCUMENTS = [
161152
161525
  "[Clinical Evaluation Plan]",
161153
161526
  "[List of Hazard-Related Use Scenarios]"
161154
161527
  ];
161155
- var LINK_GUIDE = '\n\nIMPORTANT - Link type rules:\n\u2022 Document \u2192 Gate: jira_create_link("Blocks", gateKey, documentKey) \u2014 Document blocks Gate\n\u2022 Sub-ticket \u2192 Document: jira_create_link("Relates", documentKey, subTicketKey) \u2014 Relates is bidirectional\n\u2022 Hazard \u2192 IU/SyRS: jira_create_link("Risk Source", hazardKey, syrsKey) \u2014 SyRS gives rise to Hazard\n\u2022 Requirement \u2192 Hazard: jira_create_link("Mitigates", requirementKey, hazardKey) \u2014 Requirement mitigates Hazard\n\u2022 Requirement \u2192 System Requirement: jira_create_link("Implements", requirementKey, syrsKey)\n\u2022 Architecture \u2192 Requirement: jira_create_link("Implements", architectureKey, requirementKey)\n\u2022 Detailed Design \u2192 Requirement/Architecture: jira_create_link("Implements", ddKey, targetKey)\n\u2022 Task \u2192 Detailed Design: jira_create_link("Implements", taskKey, ddKey)\n\u2022 \uC120\uD589 Task \u2192 \uD6C4\uD589 Task: jira_create_link("Blocks", \uD6C4\uD589taskKey, \uC120\uD589taskKey) \u2014 \uC120\uD589\uC774 \uD6C4\uD589\uC744 block\n\nIMPORTANT - Git commit message rules:\n\u2022 Every commit MUST start with the Jira ticket key: "SCW-xxx type: message"\n\u2022 Example: "SCW-77 feat: set up project scaffold and dev environment"\n\u2022 Multiple tickets: "SCW-30 SCW-69 chore: add dental 3D scan test files"\n\u2022 This enables Jira to auto-link commits to tickets\n\u2022 Commit after each meaningful change (document written, task completed, bug fixed)\n\u2022 Push after each commit or group of related commits\n\nIMPORTANT - Scope of action rules:\n\u2022 "\uAC8C\uC774\uD2B8 \uB9CC\uB4E4\uC5B4" \u2192 ONLY create the Gate. Do NOT create Document tickets.\n\u2022 "\uBB38\uC11C \uB9CC\uB4E4\uC5B4" \u2192 ONLY create the specified Documents. Do NOT create sub-tickets.\n\u2022 Do NOT chain-create beyond what the user explicitly asked for.\n\u2022 When in doubt, ask the user before creating additional items.\n\nIMPORTANT - Ticket creation rules:\n\u2022 Before creating a ticket, search JQL for existing similar tickets to avoid duplicates.\n\u2022 Bug description format: \u{1F629} Problem \u2192 \u{1F50E} Root Cause \u2192 \u{1F527} Fix \u2192 \u{1F41B} Reproduction\n\u2022 Task/Feature description format: \u{1F3AF} Goal \u2192 \u{1F4CB} Tasks \u2192 \u2705 Acceptance Criteria\n\u2022 Do NOT auto-transition ticket status (e.g. In Progress \u2192 Done) unless explicitly asked.\n\u2022 When creating 3+ tickets at once, show the plan first and wait for user approval.\n\nIMPORTANT - Commit-ticket linking:\n\u2022 After pushing commits, verify the ticket has the commit linked (auto-linked via ticket key in message).\n\u2022 If commits are not linked, add a comment to the ticket with the commit details.';
161528
+ var LINK_GUIDE = '\n\nIMPORTANT - Link type rules:\n\u2022 Document \u2192 Gate: jira_create_link("Blocks", gateKey, documentKey) \u2014 Document blocks Gate\n\u2022 Sub-ticket \u2192 Document: jira_create_link("Relates", documentKey, subTicketKey) \u2014 Relates is bidirectional\n\u2022 Hazard \u2192 IU/SyRS: jira_create_link("Risk Source", hazardKey, syrsKey) \u2014 SyRS gives rise to Hazard\n\u2022 Requirement \u2192 Hazard: jira_create_link("Mitigates", requirementKey, hazardKey) \u2014 Requirement mitigates Hazard\n\u2022 Requirement \u2192 System Requirement: jira_create_link("Implements", requirementKey, syrsKey)\n\u2022 Architecture \u2192 Requirement: jira_create_link("Implements", architectureKey, requirementKey)\n\u2022 Detailed Design \u2192 Requirement/Architecture: jira_create_link("Implements", ddKey, targetKey)\n\u2022 Task \u2192 Detailed Design: jira_create_link("Implements", taskKey, ddKey)\n\u2022 \uC120\uD589 Task \u2192 \uD6C4\uD589 Task: jira_create_link("Blocks", \uD6C4\uD589taskKey, \uC120\uD589taskKey) \u2014 \uC120\uD589\uC774 \uD6C4\uD589\uC744 block\n\nIMPORTANT - Git commit message rules:\n\u2022 Every commit MUST start with the Jira ticket key: "DYN-xxx type: message"\n\u2022 Example: "DYN-77 feat: set up project scaffold and dev environment"\n\u2022 Multiple tickets: "DYN-30 DYN-69 chore: add dental 3D scan test files"\n\u2022 This enables Jira to auto-link commits to tickets\n\u2022 Commit after each meaningful change (document written, task completed, bug fixed)\n\u2022 Push after each commit or group of related commits\n\nIMPORTANT - Scope of action rules:\n\u2022 "\uAC8C\uC774\uD2B8 \uB9CC\uB4E4\uC5B4" \u2192 ONLY create the Gate. Do NOT create Document tickets.\n\u2022 "\uBB38\uC11C \uB9CC\uB4E4\uC5B4" \u2192 ONLY create the specified Documents. Do NOT create sub-tickets.\n\u2022 Do NOT chain-create beyond what the user explicitly asked for.\n\u2022 When in doubt, ask the user before creating additional items.\n\nIMPORTANT - Ticket creation rules:\n\u2022 Before creating a ticket, search JQL for existing similar tickets to avoid duplicates.\n\u2022 Bug description format: \u{1F629} Problem \u2192 \u{1F50E} Root Cause \u2192 \u{1F527} Fix \u2192 \u{1F41B} Reproduction\n\u2022 Task/Feature description format: \u{1F3AF} Goal \u2192 \u{1F4CB} Tasks \u2192 \u2705 Acceptance Criteria\n\u2022 Do NOT auto-transition ticket status (e.g. In Progress \u2192 Done) unless explicitly asked.\n\u2022 When creating 3+ tickets at once, show the plan first and wait for user approval.\n\nIMPORTANT - Commit-ticket linking:\n\u2022 After pushing commits, verify the ticket has the commit linked (auto-linked via ticket key in message).\n\u2022 If commits are not linked, add a comment to the ticket with the commit details.';
161156
161529
  var registerIecTools = (ctx2) => {
161157
161530
  const { server: server2, jira: jira2 } = ctx2;
161158
161531
  server2.tool("iec_create_gate", "Create a PA or EA Gate with all required Document tickets and Blocks links. Based on IEC 62304 lifecycle.", {
@@ -161193,9 +161566,9 @@ var registerIecTools = (ctx2) => {
161193
161566
  issue_key: external_exports.string().describe("Current ticket key")
161194
161567
  }, async ({ issue_key }) => {
161195
161568
  const data = await jira2.getIssue(issue_key, ["summary", "issuetype", "status"]);
161196
- const f3 = data.fields;
161197
- const type = f3.issuetype?.name;
161198
- const summary = f3.summary || "";
161569
+ const f4 = data.fields;
161570
+ const type = f4.issuetype?.name;
161571
+ const summary = f4.summary || "";
161199
161572
  const steps = [];
161200
161573
  if (type === "Gate") {
161201
161574
  steps.push("Gate created. For each Document ticket, call iec_get_next_steps to see what sub-tickets to create.");
@@ -161538,15 +161911,15 @@ var WORKFLOWS = [
161538
161911
  related: ["confluence_publish_doc", "markdown_to_pdf", "jira_attach_pdf_from_markdown"]
161539
161912
  }
161540
161913
  ];
161541
- function workflowToText(w2) {
161914
+ function workflowToText(w) {
161542
161915
  const lines = [];
161543
- lines.push(`=== ${w2.title} ===`);
161916
+ lines.push(`=== ${w.title} ===`);
161544
161917
  lines.push("");
161545
- if (w2.description) {
161546
- lines.push(w2.description);
161918
+ if (w.description) {
161919
+ lines.push(w.description);
161547
161920
  lines.push("");
161548
161921
  }
161549
- for (const step of w2.steps) {
161922
+ for (const step of w.steps) {
161550
161923
  lines.push(step);
161551
161924
  }
161552
161925
  return lines.join("\n");
@@ -161569,12 +161942,12 @@ var registerHelpTools = ({ server: server2 }) => {
161569
161942
  }
161570
161943
  lines.push("");
161571
161944
  }
161572
- const wfIds2 = WORKFLOWS.map((w2) => w2.id).join(", ");
161945
+ const wfIds2 = WORKFLOWS.map((w) => w.id).join(", ");
161573
161946
  lines.push(`\uC6CC\uD06C\uD50C\uB85C\uC6B0 \uAC00\uC774\uB4DC: help(topic="workflows") \uB610\uB294 help(topic="<id>") \u2014 \uC0AC\uC6A9 \uAC00\uB2A5 id: ${wfIds2}`);
161574
161947
  lines.push('\uD2B9\uC815 \uD234 \uC0C1\uC138: help(topic="\uD234\uC774\uB984")');
161575
161948
  return { content: [{ type: "text", text: lines.join("\n") }] };
161576
161949
  }
161577
- const workflow = WORKFLOWS.find((w2) => w2.id === topic);
161950
+ const workflow = WORKFLOWS.find((w) => w.id === topic);
161578
161951
  if (workflow) {
161579
161952
  return { content: [{ type: "text", text: workflowToText(workflow) }] };
161580
161953
  }
@@ -161593,7 +161966,7 @@ ${tool.description}
161593
161966
 
161594
161967
  \uC790\uC138\uD55C \uD30C\uB77C\uBBF8\uD130\uB294 \uC774 \uD234\uC744 \uC9C1\uC811 \uD638\uCD9C\uD558\uC5EC \uD655\uC778\uD558\uC138\uC694.` }] };
161595
161968
  }
161596
- const wfIds = WORKFLOWS.map((w2) => w2.id).join(", ");
161969
+ const wfIds = WORKFLOWS.map((w) => w.id).join(", ");
161597
161970
  return { content: [{ type: "text", text: `\uC54C \uC218 \uC5C6\uB294 \uD1A0\uD53D: "${topic}"
161598
161971
  \uC0AC\uC6A9 \uAC00\uB2A5: tools, workflows, ${wfIds}, \uB610\uB294 \uD234 \uC774\uB984` }] };
161599
161972
  });
@@ -162090,7 +162463,7 @@ var registerInitTools = ({ server: server2 }) => {
162090
162463
  "jira_init_project",
162091
162464
  "Initialize Jira project for the current workspace. Appends the project key to CLAUDE.md so Claude knows which Jira project to use. Run this once per project folder.",
162092
162465
  {
162093
- project_key: external_exports.string().describe("Jira project key (e.g. SCW, NEO)")
162466
+ project_key: external_exports.string().describe("Jira project key (e.g. DYN, NEO)")
162094
162467
  },
162095
162468
  async ({ project_key }) => {
162096
162469
  const cwd = process.cwd();
@@ -162567,18 +162940,18 @@ var SHA256 = class extends HashMD {
162567
162940
  this.H = SHA256_IV[7] | 0;
162568
162941
  }
162569
162942
  get() {
162570
- const { A: A3, B: B2, C: C2, D: D2, E: E2, F: F3, G, H: H2 } = this;
162571
- return [A3, B2, C2, D2, E2, F3, G, H2];
162943
+ const { A: A3, B: B2, C: C2, D, E, F: F3, G: G2, H: H2 } = this;
162944
+ return [A3, B2, C2, D, E, F3, G2, H2];
162572
162945
  }
162573
162946
  // prettier-ignore
162574
- set(A3, B2, C2, D2, E2, F3, G, H2) {
162947
+ set(A3, B2, C2, D, E, F3, G2, H2) {
162575
162948
  this.A = A3 | 0;
162576
162949
  this.B = B2 | 0;
162577
162950
  this.C = C2 | 0;
162578
- this.D = D2 | 0;
162579
- this.E = E2 | 0;
162951
+ this.D = D | 0;
162952
+ this.E = E | 0;
162580
162953
  this.F = F3 | 0;
162581
- this.G = G | 0;
162954
+ this.G = G2 | 0;
162582
162955
  this.H = H2 | 0;
162583
162956
  }
162584
162957
  process(view, offset) {
@@ -162591,17 +162964,17 @@ var SHA256 = class extends HashMD {
162591
162964
  const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ W2 >>> 10;
162592
162965
  SHA256_W[i2] = s1 + SHA256_W[i2 - 7] + s0 + SHA256_W[i2 - 16] | 0;
162593
162966
  }
162594
- let { A: A3, B: B2, C: C2, D: D2, E: E2, F: F3, G, H: H2 } = this;
162967
+ let { A: A3, B: B2, C: C2, D, E, F: F3, G: G2, H: H2 } = this;
162595
162968
  for (let i2 = 0; i2 < 64; i2++) {
162596
- const sigma1 = rotr(E2, 6) ^ rotr(E2, 11) ^ rotr(E2, 25);
162597
- const T1 = H2 + sigma1 + Chi(E2, F3, G) + SHA256_K[i2] + SHA256_W[i2] | 0;
162969
+ const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);
162970
+ const T1 = H2 + sigma1 + Chi(E, F3, G2) + SHA256_K[i2] + SHA256_W[i2] | 0;
162598
162971
  const sigma0 = rotr(A3, 2) ^ rotr(A3, 13) ^ rotr(A3, 22);
162599
162972
  const T2 = sigma0 + Maj(A3, B2, C2) | 0;
162600
- H2 = G;
162601
- G = F3;
162602
- F3 = E2;
162603
- E2 = D2 + T1 | 0;
162604
- D2 = C2;
162973
+ H2 = G2;
162974
+ G2 = F3;
162975
+ F3 = E;
162976
+ E = D + T1 | 0;
162977
+ D = C2;
162605
162978
  C2 = B2;
162606
162979
  B2 = A3;
162607
162980
  A3 = T1 + T2 | 0;
@@ -162609,12 +162982,12 @@ var SHA256 = class extends HashMD {
162609
162982
  A3 = A3 + this.A | 0;
162610
162983
  B2 = B2 + this.B | 0;
162611
162984
  C2 = C2 + this.C | 0;
162612
- D2 = D2 + this.D | 0;
162613
- E2 = E2 + this.E | 0;
162985
+ D = D + this.D | 0;
162986
+ E = E + this.E | 0;
162614
162987
  F3 = F3 + this.F | 0;
162615
- G = G + this.G | 0;
162988
+ G2 = G2 + this.G | 0;
162616
162989
  H2 = H2 + this.H | 0;
162617
- this.set(A3, B2, C2, D2, E2, F3, G, H2);
162990
+ this.set(A3, B2, C2, D, E, F3, G2, H2);
162618
162991
  }
162619
162992
  roundClean() {
162620
162993
  clean(SHA256_W);
@@ -162816,8 +163189,8 @@ function expandKeyDecLE(key) {
162816
163189
  clean2(encKey);
162817
163190
  for (let i2 = 4; i2 < Nk - 4; i2++) {
162818
163191
  const x3 = xk[i2];
162819
- const w2 = applySbox(sbox2, x3, x3, x3, x3);
162820
- xk[i2] = T0[w2 & 255] ^ T1[w2 >>> 8 & 255] ^ T2[w2 >>> 16 & 255] ^ T3[w2 >>> 24];
163192
+ const w = applySbox(sbox2, x3, x3, x3, x3);
163193
+ xk[i2] = T0[w & 255] ^ T1[w >>> 8 & 255] ^ T2[w >>> 16 & 255] ^ T3[w >>> 24];
162821
163194
  }
162822
163195
  return xk;
162823
163196
  }
@@ -162829,38 +163202,38 @@ function applySbox(sbox2, s0, s1, s2, s3) {
162829
163202
  }
162830
163203
  function encrypt(xk, s0, s1, s2, s3) {
162831
163204
  const { sbox2, T01, T23 } = tableEncoding;
162832
- let k = 0;
162833
- s0 ^= xk[k++], s1 ^= xk[k++], s2 ^= xk[k++], s3 ^= xk[k++];
163205
+ let k2 = 0;
163206
+ s0 ^= xk[k2++], s1 ^= xk[k2++], s2 ^= xk[k2++], s3 ^= xk[k2++];
162834
163207
  const rounds = xk.length / 4 - 2;
162835
163208
  for (let i2 = 0; i2 < rounds; i2++) {
162836
- const t02 = xk[k++] ^ apply0123(T01, T23, s0, s1, s2, s3);
162837
- const t12 = xk[k++] ^ apply0123(T01, T23, s1, s2, s3, s0);
162838
- const t22 = xk[k++] ^ apply0123(T01, T23, s2, s3, s0, s1);
162839
- const t32 = xk[k++] ^ apply0123(T01, T23, s3, s0, s1, s2);
163209
+ const t02 = xk[k2++] ^ apply0123(T01, T23, s0, s1, s2, s3);
163210
+ const t12 = xk[k2++] ^ apply0123(T01, T23, s1, s2, s3, s0);
163211
+ const t22 = xk[k2++] ^ apply0123(T01, T23, s2, s3, s0, s1);
163212
+ const t32 = xk[k2++] ^ apply0123(T01, T23, s3, s0, s1, s2);
162840
163213
  s0 = t02, s1 = t12, s2 = t22, s3 = t32;
162841
163214
  }
162842
- const t0 = xk[k++] ^ applySbox(sbox2, s0, s1, s2, s3);
162843
- const t1 = xk[k++] ^ applySbox(sbox2, s1, s2, s3, s0);
162844
- const t2 = xk[k++] ^ applySbox(sbox2, s2, s3, s0, s1);
162845
- const t3 = xk[k++] ^ applySbox(sbox2, s3, s0, s1, s2);
163215
+ const t0 = xk[k2++] ^ applySbox(sbox2, s0, s1, s2, s3);
163216
+ const t1 = xk[k2++] ^ applySbox(sbox2, s1, s2, s3, s0);
163217
+ const t2 = xk[k2++] ^ applySbox(sbox2, s2, s3, s0, s1);
163218
+ const t3 = xk[k2++] ^ applySbox(sbox2, s3, s0, s1, s2);
162846
163219
  return { s0: t0, s1: t1, s2: t2, s3: t3 };
162847
163220
  }
162848
163221
  function decrypt(xk, s0, s1, s2, s3) {
162849
163222
  const { sbox2, T01, T23 } = tableDecoding;
162850
- let k = 0;
162851
- s0 ^= xk[k++], s1 ^= xk[k++], s2 ^= xk[k++], s3 ^= xk[k++];
163223
+ let k2 = 0;
163224
+ s0 ^= xk[k2++], s1 ^= xk[k2++], s2 ^= xk[k2++], s3 ^= xk[k2++];
162852
163225
  const rounds = xk.length / 4 - 2;
162853
163226
  for (let i2 = 0; i2 < rounds; i2++) {
162854
- const t02 = xk[k++] ^ apply0123(T01, T23, s0, s3, s2, s1);
162855
- const t12 = xk[k++] ^ apply0123(T01, T23, s1, s0, s3, s2);
162856
- const t22 = xk[k++] ^ apply0123(T01, T23, s2, s1, s0, s3);
162857
- const t32 = xk[k++] ^ apply0123(T01, T23, s3, s2, s1, s0);
163227
+ const t02 = xk[k2++] ^ apply0123(T01, T23, s0, s3, s2, s1);
163228
+ const t12 = xk[k2++] ^ apply0123(T01, T23, s1, s0, s3, s2);
163229
+ const t22 = xk[k2++] ^ apply0123(T01, T23, s2, s1, s0, s3);
163230
+ const t32 = xk[k2++] ^ apply0123(T01, T23, s3, s2, s1, s0);
162858
163231
  s0 = t02, s1 = t12, s2 = t22, s3 = t32;
162859
163232
  }
162860
- const t0 = xk[k++] ^ applySbox(sbox2, s0, s3, s2, s1);
162861
- const t1 = xk[k++] ^ applySbox(sbox2, s1, s0, s3, s2);
162862
- const t2 = xk[k++] ^ applySbox(sbox2, s2, s1, s0, s3);
162863
- const t3 = xk[k++] ^ applySbox(sbox2, s3, s2, s1, s0);
163233
+ const t0 = xk[k2++] ^ applySbox(sbox2, s0, s3, s2, s1);
163234
+ const t1 = xk[k2++] ^ applySbox(sbox2, s1, s0, s3, s2);
163235
+ const t2 = xk[k2++] ^ applySbox(sbox2, s2, s1, s0, s3);
163236
+ const t3 = xk[k2++] ^ applySbox(sbox2, s3, s2, s1, s0);
162864
163237
  return { s0: t0, s1: t1, s2: t2, s3: t3 };
162865
163238
  }
162866
163239
  function validateBlockDecrypt(data) {
@@ -164057,9 +164430,9 @@ function _define_property(obj, key, value) {
164057
164430
 
164058
164431
  // node_modules/tslib/tslib.es6.mjs
164059
164432
  function __decorate(decorators, target, key, desc) {
164060
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d2;
164433
+ var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
164061
164434
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
164062
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d2 = decorators[i2]) r2 = (c < 3 ? d2(r2) : c > 3 ? d2(target, key, r2) : d2(target, key)) || r2;
164435
+ else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
164063
164436
  return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
164064
164437
  }
164065
164438
 
@@ -165357,8 +165730,8 @@ var $61aa549f16d58b9b$export$2e2bcd8739ae039 = class {
165357
165730
  startOffset: parent.startOffset || 0
165358
165731
  };
165359
165732
  let len = 0;
165360
- for (let k in this.fields) {
165361
- let field = this.fields[k];
165733
+ for (let k2 in this.fields) {
165734
+ let field = this.fields[k2];
165362
165735
  let val = dict[field[1]];
165363
165736
  if (val == null || (0, import_fast_deep_equal.default)(val, field[3])) continue;
165364
165737
  let operands = this.encodeOperands(field[2], null, ctx2, val);
@@ -169384,14 +169757,14 @@ var $f08dd41ef10b694c$export$2e2bcd8739ae039 = class {
169384
169757
  let rangeOffset = cmap.idRangeOffset.get(i2);
169385
169758
  let delta = cmap.idDelta.get(i2);
169386
169759
  for (var c = start; c <= end; c++) {
169387
- let g2 = 0;
169388
- if (rangeOffset === 0) g2 = c + delta;
169760
+ let g = 0;
169761
+ if (rangeOffset === 0) g = c + delta;
169389
169762
  else {
169390
169763
  let index = rangeOffset / 2 + (c - start) - (cmap.segCount - i2);
169391
- g2 = cmap.glyphIndexArray.get(index) || 0;
169392
- if (g2 !== 0) g2 += delta;
169764
+ g = cmap.glyphIndexArray.get(index) || 0;
169765
+ if (g !== 0) g += delta;
169393
169766
  }
169394
- if (g2 === gid) res.push(c);
169767
+ if (g === gid) res.push(c);
169395
169768
  }
169396
169769
  }
169397
169770
  return res;
@@ -170472,17 +170845,17 @@ for (let ot2 in $3b6302b64eccc32c$var$OTMapping) {
170472
170845
  }
170473
170846
  function $3b6302b64eccc32c$export$b813f7d2a1677c16(features) {
170474
170847
  let res = {};
170475
- for (let k in features) {
170848
+ for (let k2 in features) {
170476
170849
  let r2;
170477
- if (r2 = $3b6302b64eccc32c$var$OTMapping[k]) {
170850
+ if (r2 = $3b6302b64eccc32c$var$OTMapping[k2]) {
170478
170851
  if (res[r2[0]] == null) res[r2[0]] = {};
170479
- res[r2[0]][r2[1]] = features[k];
170852
+ res[r2[0]][r2[1]] = features[k2];
170480
170853
  }
170481
170854
  }
170482
170855
  return res;
170483
170856
  }
170484
- function $3b6302b64eccc32c$var$mapFeatureStrings(f3) {
170485
- let [type, setting] = f3;
170857
+ function $3b6302b64eccc32c$var$mapFeatureStrings(f4) {
170858
+ let [type, setting] = f4;
170486
170859
  if (isNaN(type)) var typeCode = $3b6302b64eccc32c$var$features[type] && $3b6302b64eccc32c$var$features[type].code;
170487
170860
  else var typeCode = type;
170488
170861
  if (isNaN(setting)) var settingCode = $3b6302b64eccc32c$var$features[type] && $3b6302b64eccc32c$var$features[type][setting];
@@ -170494,20 +170867,20 @@ function $3b6302b64eccc32c$var$mapFeatureStrings(f3) {
170494
170867
  }
170495
170868
  function $3b6302b64eccc32c$export$bd6df347a4f391c4(features) {
170496
170869
  let res = {};
170497
- if (Array.isArray(features)) for (let k = 0; k < features.length; k++) {
170870
+ if (Array.isArray(features)) for (let k2 = 0; k2 < features.length; k2++) {
170498
170871
  let r2;
170499
- let f3 = $3b6302b64eccc32c$var$mapFeatureStrings(features[k]);
170500
- if (r2 = $3b6302b64eccc32c$var$AATMapping[f3[0]] && $3b6302b64eccc32c$var$AATMapping[f3[0]][f3[1]]) res[r2] = true;
170872
+ let f4 = $3b6302b64eccc32c$var$mapFeatureStrings(features[k2]);
170873
+ if (r2 = $3b6302b64eccc32c$var$AATMapping[f4[0]] && $3b6302b64eccc32c$var$AATMapping[f4[0]][f4[1]]) res[r2] = true;
170501
170874
  }
170502
170875
  else if (typeof features === "object") for (let type in features) {
170503
170876
  let feature = features[type];
170504
170877
  for (let setting in feature) {
170505
170878
  let r2;
170506
- let f3 = $3b6302b64eccc32c$var$mapFeatureStrings([
170879
+ let f4 = $3b6302b64eccc32c$var$mapFeatureStrings([
170507
170880
  type,
170508
170881
  setting
170509
170882
  ]);
170510
- if (feature[setting] && (r2 = $3b6302b64eccc32c$var$AATMapping[f3[0]] && $3b6302b64eccc32c$var$AATMapping[f3[0]][f3[1]])) res[r2] = true;
170883
+ if (feature[setting] && (r2 = $3b6302b64eccc32c$var$AATMapping[f4[0]] && $3b6302b64eccc32c$var$AATMapping[f4[0]][f4[1]])) res[r2] = true;
170511
170884
  }
170512
170885
  }
170513
170886
  return Object.keys(res);
@@ -170661,12 +171034,12 @@ var $55f71433a605c87d$export$2e2bcd8739ae039 = class {
170661
171034
  for (let chain of this.morx.chains) {
170662
171035
  let flags = chain.defaultFlags;
170663
171036
  for (let feature of chain.features) {
170664
- let f3;
170665
- if (f3 = features[feature.featureType]) {
170666
- if (f3[feature.featureSetting]) {
171037
+ let f4;
171038
+ if (f4 = features[feature.featureType]) {
171039
+ if (f4[feature.featureSetting]) {
170667
171040
  flags &= feature.disableFlags;
170668
171041
  flags |= feature.enableFlags;
170669
- } else if (f3[feature.featureSetting] === false) {
171042
+ } else if (f4[feature.featureSetting] === false) {
170670
171043
  flags |= ~feature.disableFlags;
170671
171044
  flags &= ~feature.enableFlags;
170672
171045
  }
@@ -170841,8 +171214,8 @@ var $55f71433a605c87d$export$2e2bcd8739ae039 = class {
170841
171214
  glyphs: glyphs.slice(),
170842
171215
  ligatureStack: this.ligatureStack.slice()
170843
171216
  });
170844
- let g2 = this.font.getGlyph(glyph);
170845
- input.push(g2);
171217
+ let g = this.font.getGlyph(glyph);
171218
+ input.push(g);
170846
171219
  glyphs.push(input[input.length - 1]);
170847
171220
  process3(glyphs[glyphs.length - 1], entry, glyphs.length - 1);
170848
171221
  let count = 0;
@@ -170852,7 +171225,7 @@ var $55f71433a605c87d$export$2e2bcd8739ae039 = class {
170852
171225
  found = glyphs[i2].id;
170853
171226
  }
170854
171227
  if (count === 1) {
170855
- let result = input.map((g3) => g3.id);
171228
+ let result = input.map((g2) => g2.id);
170856
171229
  let cache2 = this.inputCache[found];
170857
171230
  if (cache2) cache2.push(result);
170858
171231
  else this.inputCache[found] = [
@@ -172388,11 +172761,11 @@ var $7826f90f6f0cecc9$export$2e2bcd8739ae039 = class extends (0, $649970d87335b3
172388
172761
  static assignFeatures(plan, glyphs) {
172389
172762
  for (let i2 = glyphs.length - 1; i2 >= 0; i2--) {
172390
172763
  let codepoint = glyphs[i2].codePoints[0];
172391
- let d2 = (0, $90a9d3398ee54fe5$export$f647c9cfdd77d95a)[codepoint] || $7826f90f6f0cecc9$var$decompositions[codepoint];
172392
- if (d2) {
172393
- let decomposed = d2.map((c) => {
172394
- let g2 = plan.font.glyphForCodePoint(c);
172395
- return new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(plan.font, g2.id, [
172764
+ let d = (0, $90a9d3398ee54fe5$export$f647c9cfdd77d95a)[codepoint] || $7826f90f6f0cecc9$var$decompositions[codepoint];
172765
+ if (d) {
172766
+ let decomposed = d.map((c) => {
172767
+ let g = plan.font.glyphForCodePoint(c);
172768
+ return new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(plan.font, g.id, [
172396
172769
  c
172397
172770
  ], glyphs[i2].features);
172398
172771
  });
@@ -172478,25 +172851,25 @@ function $7826f90f6f0cecc9$var$initialReordering(font, glyphs, plan) {
172478
172851
  let { category, syllableType } = glyphs[start].shaperInfo;
172479
172852
  if (syllableType === "symbol_cluster" || syllableType === "non_indic_cluster") continue;
172480
172853
  if (syllableType === "broken_cluster" && dottedCircle) {
172481
- let g2 = new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(font, dottedCircle, [
172854
+ let g = new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(font, dottedCircle, [
172482
172855
  9676
172483
172856
  ]);
172484
- g2.shaperInfo = new $7826f90f6f0cecc9$var$IndicInfo(1 << $7826f90f6f0cecc9$var$indicCategory(g2), $7826f90f6f0cecc9$var$indicPosition(g2), glyphs[start].shaperInfo.syllableType, glyphs[start].shaperInfo.syllable);
172857
+ g.shaperInfo = new $7826f90f6f0cecc9$var$IndicInfo(1 << $7826f90f6f0cecc9$var$indicCategory(g), $7826f90f6f0cecc9$var$indicPosition(g), glyphs[start].shaperInfo.syllableType, glyphs[start].shaperInfo.syllable);
172485
172858
  let i2 = start;
172486
172859
  while (i2 < end && glyphs[i2].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).Repha) i2++;
172487
- glyphs.splice(i2++, 0, g2);
172860
+ glyphs.splice(i2++, 0, g);
172488
172861
  end++;
172489
172862
  }
172490
172863
  let base = end;
172491
172864
  let limit = start;
172492
172865
  let hasReph = false;
172493
172866
  if (indicConfig.rephPos !== (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Ra_To_Become_Reph && features.rphf && start + 3 <= end && (indicConfig.rephMode === "Implicit" && !$7826f90f6f0cecc9$var$isJoiner(glyphs[start + 2]) || indicConfig.rephMode === "Explicit" && glyphs[start + 2].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).ZWJ)) {
172494
- let g2 = [
172867
+ let g = [
172495
172868
  glyphs[start].copy(),
172496
172869
  glyphs[start + 1].copy(),
172497
172870
  glyphs[start + 2].copy()
172498
172871
  ];
172499
- if ($7826f90f6f0cecc9$var$wouldSubstitute(g2.slice(0, 2), "rphf") || indicConfig.rephMode === "Explicit" && $7826f90f6f0cecc9$var$wouldSubstitute(g2, "rphf")) {
172872
+ if ($7826f90f6f0cecc9$var$wouldSubstitute(g.slice(0, 2), "rphf") || indicConfig.rephMode === "Explicit" && $7826f90f6f0cecc9$var$wouldSubstitute(g, "rphf")) {
172500
172873
  limit += 2;
172501
172874
  while (limit < end && $7826f90f6f0cecc9$var$isJoiner(glyphs[limit])) limit++;
172502
172875
  base = start;
@@ -172605,11 +172978,11 @@ function $7826f90f6f0cecc9$var$initialReordering(font, glyphs, plan) {
172605
172978
  let prefLen = 2;
172606
172979
  if (features.pref && base + prefLen < end)
172607
172980
  for (let i2 = base + 1; i2 + prefLen - 1 < end; i2++) {
172608
- let g2 = [
172981
+ let g = [
172609
172982
  glyphs[i2].copy(),
172610
172983
  glyphs[i2 + 1].copy()
172611
172984
  ];
172612
- if ($7826f90f6f0cecc9$var$wouldSubstitute(g2, "pref")) {
172985
+ if ($7826f90f6f0cecc9$var$wouldSubstitute(g, "pref")) {
172613
172986
  for (let j2 = 0; j2 < prefLen; j2++) glyphs[i2++].features.pref = true;
172614
172987
  if (features.cfar) for (; i2 < end; i2++) glyphs[i2].features.cfar = true;
172615
172988
  break;
@@ -172801,8 +173174,8 @@ var $7ab494fe977143c6$export$2e2bcd8739ae039 = class extends (0, $649970d87335b3
172801
173174
  let codepoint = glyphs[i2].codePoints[0];
172802
173175
  if ($7ab494fe977143c6$var$decompositions[codepoint]) {
172803
173176
  let decomposed = $7ab494fe977143c6$var$decompositions[codepoint].map((c) => {
172804
- let g2 = plan.font.glyphForCodePoint(c);
172805
- return new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(plan.font, g2.id, [
173177
+ let g = plan.font.glyphForCodePoint(c);
173178
+ return new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(plan.font, g.id, [
172806
173179
  c
172807
173180
  ], glyphs[i2].features);
172808
173181
  });
@@ -172850,12 +173223,12 @@ function $7ab494fe977143c6$var$reorder(font, glyphs) {
172850
173223
  let type = info.syllableType;
172851
173224
  if (type !== "virama_terminated_cluster" && type !== "standard_cluster" && type !== "broken_cluster") continue;
172852
173225
  if (type === "broken_cluster" && dottedCircle) {
172853
- let g2 = new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(font, dottedCircle, [
173226
+ let g = new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(font, dottedCircle, [
172854
173227
  9676
172855
173228
  ]);
172856
- g2.shaperInfo = info;
173229
+ g.shaperInfo = info;
172857
173230
  for (i2 = start; i2 < end && glyphs[i2].shaperInfo.category === "R"; i2++) ;
172858
- glyphs.splice(++i2, 0, g2);
173231
+ glyphs.splice(++i2, 0, g);
172859
173232
  end++;
172860
173233
  }
172861
173234
  if (info.category === "R" && end - start > 1)
@@ -173149,18 +173522,18 @@ var $c96c93587d49c14d$export$2e2bcd8739ae039 = class extends (0, $a83b9c36aaa94f
173149
173522
  let exit = this.getAnchor(curRecord.exitAnchor);
173150
173523
  let cur = this.positions[this.glyphIterator.index];
173151
173524
  let next = this.positions[nextIndex];
173152
- let d2;
173525
+ let d;
173153
173526
  switch (this.direction) {
173154
173527
  case "ltr":
173155
173528
  cur.xAdvance = exit.x + cur.xOffset;
173156
- d2 = entry.x + next.xOffset;
173157
- next.xAdvance -= d2;
173158
- next.xOffset -= d2;
173529
+ d = entry.x + next.xOffset;
173530
+ next.xAdvance -= d;
173531
+ next.xOffset -= d;
173159
173532
  break;
173160
173533
  case "rtl":
173161
- d2 = exit.x + cur.xOffset;
173162
- cur.xAdvance -= d2;
173163
- cur.xOffset -= d2;
173534
+ d = exit.x + cur.xOffset;
173535
+ cur.xAdvance -= d;
173536
+ cur.xOffset -= d;
173164
173537
  next.xAdvance = entry.x + next.xOffset;
173165
173538
  break;
173166
173539
  }
@@ -173277,13 +173650,13 @@ var $c96c93587d49c14d$export$2e2bcd8739ae039 = class extends (0, $a83b9c36aaa94f
173277
173650
  let j2 = glyph.markAttachment;
173278
173651
  this.positions[i2].xOffset += this.positions[j2].xOffset;
173279
173652
  this.positions[i2].yOffset += this.positions[j2].yOffset;
173280
- if (this.direction === "ltr") for (let k = j2; k < i2; k++) {
173281
- this.positions[i2].xOffset -= this.positions[k].xAdvance;
173282
- this.positions[i2].yOffset -= this.positions[k].yAdvance;
173653
+ if (this.direction === "ltr") for (let k2 = j2; k2 < i2; k2++) {
173654
+ this.positions[i2].xOffset -= this.positions[k2].xAdvance;
173655
+ this.positions[i2].yOffset -= this.positions[k2].yAdvance;
173283
173656
  }
173284
- else for (let k = j2 + 1; k < i2 + 1; k++) {
173285
- this.positions[i2].xOffset += this.positions[k].xAdvance;
173286
- this.positions[i2].yOffset += this.positions[k].yAdvance;
173657
+ else for (let k2 = j2 + 1; k2 < i2 + 1; k2++) {
173658
+ this.positions[i2].xOffset += this.positions[k2].xAdvance;
173659
+ this.positions[i2].yOffset += this.positions[k2].yAdvance;
173287
173660
  }
173288
173661
  }
173289
173662
  }
@@ -173517,7 +173890,7 @@ var $f43aec954cdfdf21$export$2e2bcd8739ae039 = class _$f43aec954cdfdf21$export$2
173517
173890
  if (this._bbox) return this._bbox;
173518
173891
  let bbox = new (0, $f34600ab9d7f70d8$export$2e2bcd8739ae039)();
173519
173892
  let cx2 = 0, cy2 = 0;
173520
- let f3 = (t2) => Math.pow(1 - t2, 3) * p0[i2] + 3 * Math.pow(1 - t2, 2) * t2 * p1[i2] + 3 * (1 - t2) * Math.pow(t2, 2) * p2[i2] + Math.pow(t2, 3) * p3[i2];
173893
+ let f4 = (t2) => Math.pow(1 - t2, 3) * p0[i2] + 3 * Math.pow(1 - t2, 2) * t2 * p1[i2] + 3 * (1 - t2) * Math.pow(t2, 2) * p2[i2] + Math.pow(t2, 3) * p3[i2];
173521
173894
  for (let c of this.commands) switch (c.command) {
173522
173895
  case "moveTo":
173523
173896
  case "lineTo":
@@ -173560,8 +173933,8 @@ var $f43aec954cdfdf21$export$2e2bcd8739ae039 = class _$f43aec954cdfdf21$export$2
173560
173933
  if (b2 === 0) continue;
173561
173934
  let t3 = -c / b2;
173562
173935
  if (0 < t3 && t3 < 1) {
173563
- if (i2 === 0) bbox.addPoint(f3(t3), bbox.maxY);
173564
- else if (i2 === 1) bbox.addPoint(bbox.maxX, f3(t3));
173936
+ if (i2 === 0) bbox.addPoint(f4(t3), bbox.maxY);
173937
+ else if (i2 === 1) bbox.addPoint(bbox.maxX, f4(t3));
173565
173938
  }
173566
173939
  continue;
173567
173940
  }
@@ -173569,13 +173942,13 @@ var $f43aec954cdfdf21$export$2e2bcd8739ae039 = class _$f43aec954cdfdf21$export$2
173569
173942
  if (b2ac < 0) continue;
173570
173943
  let t1 = (-b2 + Math.sqrt(b2ac)) / (2 * a);
173571
173944
  if (0 < t1 && t1 < 1) {
173572
- if (i2 === 0) bbox.addPoint(f3(t1), bbox.maxY);
173573
- else if (i2 === 1) bbox.addPoint(bbox.maxX, f3(t1));
173945
+ if (i2 === 0) bbox.addPoint(f4(t1), bbox.maxY);
173946
+ else if (i2 === 1) bbox.addPoint(bbox.maxX, f4(t1));
173574
173947
  }
173575
173948
  let t2 = (-b2 - Math.sqrt(b2ac)) / (2 * a);
173576
173949
  if (0 < t2 && t2 < 1) {
173577
- if (i2 === 0) bbox.addPoint(f3(t2), bbox.maxY);
173578
- else if (i2 === 1) bbox.addPoint(bbox.maxX, f3(t2));
173950
+ if (i2 === 0) bbox.addPoint(f4(t2), bbox.maxY);
173951
+ else if (i2 === 1) bbox.addPoint(bbox.maxX, f4(t2));
173579
173952
  }
173580
173953
  }
173581
173954
  cx2 = p3x;
@@ -174271,8 +174644,8 @@ var $69aac16029968692$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
174271
174644
  }
174272
174645
  let contours = [];
174273
174646
  let cur = [];
174274
- for (let k = 0; k < points.length; k++) {
174275
- var point = points[k];
174647
+ for (let k2 = 0; k2 < points.length; k2++) {
174648
+ var point = points[k2];
174276
174649
  cur.push(point);
174277
174650
  if (point.endContour) {
174278
174651
  contours.push(cur);
@@ -174310,17 +174683,17 @@ var $69aac16029968692$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
174310
174683
  }
174311
174684
  path3.moveTo(firstPt.x, firstPt.y);
174312
174685
  for (let j2 = start; j2 < contour.length; j2++) {
174313
- let pt = contour[j2];
174686
+ let pt2 = contour[j2];
174314
174687
  let prevPt = j2 === 0 ? firstPt : contour[j2 - 1];
174315
- if (prevPt.onCurve && pt.onCurve) path3.lineTo(pt.x, pt.y);
174316
- else if (prevPt.onCurve && !pt.onCurve) var curvePt = pt;
174317
- else if (!prevPt.onCurve && !pt.onCurve) {
174318
- let midX = (prevPt.x + pt.x) / 2;
174319
- let midY = (prevPt.y + pt.y) / 2;
174688
+ if (prevPt.onCurve && pt2.onCurve) path3.lineTo(pt2.x, pt2.y);
174689
+ else if (prevPt.onCurve && !pt2.onCurve) var curvePt = pt2;
174690
+ else if (!prevPt.onCurve && !pt2.onCurve) {
174691
+ let midX = (prevPt.x + pt2.x) / 2;
174692
+ let midY = (prevPt.y + pt2.y) / 2;
174320
174693
  path3.quadraticCurveTo(prevPt.x, prevPt.y, midX, midY);
174321
- var curvePt = pt;
174322
- } else if (!prevPt.onCurve && pt.onCurve) {
174323
- path3.quadraticCurveTo(curvePt.x, curvePt.y, pt.x, pt.y);
174694
+ var curvePt = pt2;
174695
+ } else if (!prevPt.onCurve && pt2.onCurve) {
174696
+ path3.quadraticCurveTo(curvePt.x, curvePt.y, pt2.x, pt2.y);
174324
174697
  var curvePt = null;
174325
174698
  } else throw new Error("Unknown TTF path state");
174326
174699
  }
@@ -174867,7 +175240,7 @@ var $0d411f0165859681$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
174867
175240
  }
174868
175241
  }
174869
175242
  if (baseLayer == null) {
174870
- var g2 = this._font._getBaseGlyph(this.id);
175243
+ var g = this._font._getBaseGlyph(this.id);
174871
175244
  var color = {
174872
175245
  red: 0,
174873
175246
  green: 0,
@@ -174875,15 +175248,15 @@ var $0d411f0165859681$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
174875
175248
  alpha: 255
174876
175249
  };
174877
175250
  return [
174878
- new $0d411f0165859681$var$COLRLayer(g2, color)
175251
+ new $0d411f0165859681$var$COLRLayer(g, color)
174879
175252
  ];
174880
175253
  }
174881
175254
  let layers = [];
174882
175255
  for (let i2 = baseLayer.firstLayerIndex; i2 < baseLayer.firstLayerIndex + baseLayer.numLayers; i2++) {
174883
175256
  var rec = colr.layerRecords[i2];
174884
175257
  var color = cpal.colorRecords[rec.paletteIndex];
174885
- var g2 = this._font._getBaseGlyph(rec.gid);
174886
- layers.push(new $0d411f0165859681$var$COLRLayer(g2, color));
175258
+ var g = this._font._getBaseGlyph(rec.gid);
175259
+ layers.push(new $0d411f0165859681$var$COLRLayer(g, color));
174887
175260
  }
174888
175261
  return layers;
174889
175262
  }
@@ -174953,7 +175326,7 @@ var $0bb840cac04e911b$export$2e2bcd8739ae039 = class {
174953
175326
  offsetToData = stream2.pos;
174954
175327
  stream2.pos = here;
174955
175328
  }
174956
- let origPoints = glyphPoints.map((pt) => pt.copy());
175329
+ let origPoints = glyphPoints.map((pt2) => pt2.copy());
174957
175330
  tupleCount &= $0bb840cac04e911b$var$TUPLE_COUNT_MASK;
174958
175331
  for (let i2 = 0; i2 < tupleCount; i2++) {
174959
175332
  let tupleDataSize = stream2.readUInt16BE();
@@ -174989,7 +175362,7 @@ var $0bb840cac04e911b$export$2e2bcd8739ae039 = class {
174989
175362
  point.y += Math.round(yDeltas[i3] * factor);
174990
175363
  }
174991
175364
  else {
174992
- let outPoints = origPoints.map((pt) => pt.copy());
175365
+ let outPoints = origPoints.map((pt2) => pt2.copy());
174993
175366
  let hasDelta = glyphPoints.map(() => false);
174994
175367
  for (let i3 = 0; i3 < points.length; i3++) {
174995
175368
  let idx = points[i3];
@@ -175072,8 +175445,8 @@ var $0bb840cac04e911b$export$2e2bcd8739ae039 = class {
175072
175445
  while (point < points.length) {
175073
175446
  let firstPoint = point;
175074
175447
  let endPoint = point;
175075
- let pt = points[endPoint];
175076
- while (!pt.endContour) pt = points[++endPoint];
175448
+ let pt2 = points[endPoint];
175449
+ while (!pt2.endContour) pt2 = points[++endPoint];
175077
175450
  while (point <= endPoint && !hasDelta[point]) point++;
175078
175451
  if (point > endPoint) continue;
175079
175452
  let firstDelta = point;
@@ -175101,24 +175474,24 @@ var $0bb840cac04e911b$export$2e2bcd8739ae039 = class {
175101
175474
  "y"
175102
175475
  ];
175103
175476
  for (let i2 = 0; i2 < iterable.length; i2++) {
175104
- let k = iterable[i2];
175105
- if (inPoints[ref1][k] > inPoints[ref2][k]) {
175477
+ let k2 = iterable[i2];
175478
+ if (inPoints[ref1][k2] > inPoints[ref2][k2]) {
175106
175479
  var p = ref1;
175107
175480
  ref1 = ref2;
175108
175481
  ref2 = p;
175109
175482
  }
175110
- let in1 = inPoints[ref1][k];
175111
- let in2 = inPoints[ref2][k];
175112
- let out1 = outPoints[ref1][k];
175113
- let out2 = outPoints[ref2][k];
175483
+ let in1 = inPoints[ref1][k2];
175484
+ let in2 = inPoints[ref2][k2];
175485
+ let out1 = outPoints[ref1][k2];
175486
+ let out2 = outPoints[ref2][k2];
175114
175487
  if (in1 !== in2 || out1 === out2) {
175115
175488
  let scale = in1 === in2 ? 0 : (out2 - out1) / (in2 - in1);
175116
175489
  for (let p3 = p1; p3 <= p2; p3++) {
175117
- let out = inPoints[p3][k];
175490
+ let out = inPoints[p3][k2];
175118
175491
  if (out <= in1) out += out1 - in1;
175119
175492
  else if (out >= in2) out += out2 - in2;
175120
175493
  else out = out1 + (out - in1) * scale;
175121
- outPoints[p3][k] = out;
175494
+ outPoints[p3][k2] = out;
175122
175495
  }
175123
175496
  }
175124
175497
  }
@@ -177888,9 +178261,9 @@ var PNG = class _PNG {
177888
178261
  const { length } = data;
177889
178262
  let pos = 0;
177890
178263
  function pass(x0, y0, dx, dy, singlePass = false) {
177891
- const w2 = Math.ceil((width - x0) / dx);
178264
+ const w = Math.ceil((width - x0) / dx);
177892
178265
  const h2 = Math.ceil((height - y0) / dy);
177893
- const scanlineLength = pixelBytes * w2;
178266
+ const scanlineLength = pixelBytes * w;
177894
178267
  const buffer = singlePass ? pixels : Buffer.alloc(scanlineLength * h2);
177895
178268
  let row = 0;
177896
178269
  let c = 0;
@@ -177958,7 +178331,7 @@ var PNG = class _PNG {
177958
178331
  if (!singlePass) {
177959
178332
  let pixelsPos = ((y0 + row * dy) * width + x0) * pixelBytes;
177960
178333
  let bufferPos = row * scanlineLength;
177961
- for (i2 = 0; i2 < w2; i2++) {
178334
+ for (i2 = 0; i2 < w; i2++) {
177962
178335
  for (let j2 = 0; j2 < pixelBytes; j2++)
177963
178336
  pixels[pixelsPos++] = buffer[bufferPos++];
177964
178337
  pixelsPos += (dx - 1) * pixelBytes;
@@ -177998,7 +178371,7 @@ var PNG = class _PNG {
177998
178371
  return ret;
177999
178372
  }
178000
178373
  copyToImageData(imageData, pixels) {
178001
- let j2, k;
178374
+ let j2, k2;
178002
178375
  let { colors } = this;
178003
178376
  let palette = null;
178004
178377
  let alpha = this.hasAlphaChannel;
@@ -178013,22 +178386,22 @@ var PNG = class _PNG {
178013
178386
  let i2 = j2 = 0;
178014
178387
  if (colors === 1) {
178015
178388
  while (i2 < length) {
178016
- k = palette ? pixels[i2 / 4] * 4 : j2;
178017
- const v2 = input[k++];
178389
+ k2 = palette ? pixels[i2 / 4] * 4 : j2;
178390
+ const v2 = input[k2++];
178018
178391
  data[i2++] = v2;
178019
178392
  data[i2++] = v2;
178020
178393
  data[i2++] = v2;
178021
- data[i2++] = alpha ? input[k++] : 255;
178022
- j2 = k;
178394
+ data[i2++] = alpha ? input[k2++] : 255;
178395
+ j2 = k2;
178023
178396
  }
178024
178397
  } else {
178025
178398
  while (i2 < length) {
178026
- k = palette ? pixels[i2 / 4] * 4 : j2;
178027
- data[i2++] = input[k++];
178028
- data[i2++] = input[k++];
178029
- data[i2++] = input[k++];
178030
- data[i2++] = alpha ? input[k++] : 255;
178031
- j2 = k;
178399
+ k2 = palette ? pixels[i2 / 4] * 4 : j2;
178400
+ data[i2++] = input[k2++];
178401
+ data[i2++] = input[k2++];
178402
+ data[i2++] = input[k2++];
178403
+ data[i2++] = alpha ? input[k2++] : 255;
178404
+ j2 = k2;
178032
178405
  }
178033
178406
  }
178034
178407
  }
@@ -178484,8 +178857,8 @@ var PDFNameTree = class extends PDFTree {
178484
178857
  _keysName() {
178485
178858
  return "Names";
178486
178859
  }
178487
- _dataForKey(k) {
178488
- return new String(k);
178860
+ _dataForKey(k2) {
178861
+ return new String(k2);
178489
178862
  }
178490
178863
  };
178491
178864
  function md5Hash(data) {
@@ -178518,11 +178891,11 @@ function rc4(data, key) {
178518
178891
  [s2[i2], s2[j2]] = [s2[j2], s2[i2]];
178519
178892
  }
178520
178893
  const output = new Uint8Array(data.length);
178521
- for (let i2 = 0, j3 = 0, k = 0; k < data.length; k++) {
178894
+ for (let i2 = 0, j3 = 0, k2 = 0; k2 < data.length; k2++) {
178522
178895
  i2 = i2 + 1 & 255;
178523
178896
  j3 = j3 + s2[i2] & 255;
178524
178897
  [s2[i2], s2[j3]] = [s2[j3], s2[i2]];
178525
- output[k] = data[k] ^ s2[s2[i2] + s2[j3] & 255];
178898
+ output[k2] = data[k2] ^ s2[s2[i2] + s2[j3] & 255];
178526
178899
  }
178527
178900
  return output;
178528
178901
  }
@@ -179907,8 +180280,8 @@ var arcToSegments = function(x3, y2, rx, ry, large, sweep, rotateX, ox, oy) {
179907
180280
  const y0 = a10 * ox + a11 * oy;
179908
180281
  const x1 = a00 * x3 + a01 * y2;
179909
180282
  const y1 = a10 * x3 + a11 * y2;
179910
- const d2 = (x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0);
179911
- let sfactor_sq = 1 / d2 - 0.25;
180283
+ const d = (x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0);
180284
+ let sfactor_sq = 1 / d - 0.25;
179912
180285
  if (sfactor_sq < 0) {
179913
180286
  sfactor_sq = 0;
179914
180287
  }
@@ -179976,8 +180349,8 @@ var VectorMixin = {
179976
180349
  closePath() {
179977
180350
  return this.addContent("h");
179978
180351
  },
179979
- lineWidth(w2) {
179980
- return this.addContent(`${number$1(w2)} w`);
180352
+ lineWidth(w) {
180353
+ return this.addContent(`${number$1(w)} w`);
179981
180354
  },
179982
180355
  _CAP_STYLES: {
179983
180356
  BUTT: 0,
@@ -180031,10 +180404,10 @@ var VectorMixin = {
180031
180404
  quadraticCurveTo(cpx, cpy, x3, y2) {
180032
180405
  return this.addContent(`${number$1(cpx)} ${number$1(cpy)} ${number$1(x3)} ${number$1(y2)} v`);
180033
180406
  },
180034
- rect(x3, y2, w2, h2) {
180035
- return this.addContent(`${number$1(x3)} ${number$1(y2)} ${number$1(w2)} ${number$1(h2)} re`);
180407
+ rect(x3, y2, w, h2) {
180408
+ return this.addContent(`${number$1(x3)} ${number$1(y2)} ${number$1(w)} ${number$1(h2)} re`);
180036
180409
  },
180037
- roundedRect(x3, y2, w2, h2, borderRadius) {
180410
+ roundedRect(x3, y2, w, h2, borderRadius) {
180038
180411
  if (borderRadius == null) {
180039
180412
  borderRadius = 0;
180040
180413
  }
@@ -180044,7 +180417,7 @@ var VectorMixin = {
180044
180417
  } else {
180045
180418
  radii = [borderRadius, borderRadius, borderRadius, borderRadius];
180046
180419
  }
180047
- const limit = Math.min(0.5 * w2, 0.5 * h2);
180420
+ const limit = Math.min(0.5 * w, 0.5 * h2);
180048
180421
  const rTL = Math.max(0, Math.min(radii[0] || 0, limit));
180049
180422
  const rTR = Math.max(0, Math.min(radii[1] || 0, limit));
180050
180423
  const rBR = Math.max(0, Math.min(radii[2] || 0, limit));
@@ -180054,13 +180427,13 @@ var VectorMixin = {
180054
180427
  const cpBL = rBL * (1 - KAPPA);
180055
180428
  const cpTL = rTL * (1 - KAPPA);
180056
180429
  this.moveTo(x3 + rTL, y2);
180057
- this.lineTo(x3 + w2 - rTR, y2);
180430
+ this.lineTo(x3 + w - rTR, y2);
180058
180431
  if (rTR > 0) {
180059
- this.bezierCurveTo(x3 + w2 - cpTR, y2, x3 + w2, y2 + cpTR, x3 + w2, y2 + rTR);
180432
+ this.bezierCurveTo(x3 + w - cpTR, y2, x3 + w, y2 + cpTR, x3 + w, y2 + rTR);
180060
180433
  }
180061
- this.lineTo(x3 + w2, y2 + h2 - rBR);
180434
+ this.lineTo(x3 + w, y2 + h2 - rBR);
180062
180435
  if (rBR > 0) {
180063
- this.bezierCurveTo(x3 + w2, y2 + h2 - cpBR, x3 + w2 - cpBR, y2 + h2, x3 + w2 - rBR, y2 + h2);
180436
+ this.bezierCurveTo(x3 + w, y2 + h2 - cpBR, x3 + w - cpBR, y2 + h2, x3 + w - rBR, y2 + h2);
180064
180437
  }
180065
180438
  this.lineTo(x3 + rBL, y2 + h2);
180066
180439
  if (rBL > 0) {
@@ -181026,11 +181399,11 @@ var LineWrapper = class {
181026
181399
  wordWidth(word) {
181027
181400
  return PDFNumber(this.document.widthOfString(word, this) + this.characterSpacing + this.wordSpacing);
181028
181401
  }
181029
- canFit(word, w2) {
181402
+ canFit(word, w) {
181030
181403
  if (word[word.length - 1] != SOFT_HYPHEN) {
181031
- return w2 <= this.spaceLeft;
181404
+ return w <= this.spaceLeft;
181032
181405
  }
181033
- return w2 + this.wordWidth(HYPHEN2) <= this.spaceLeft;
181406
+ return w + this.wordWidth(HYPHEN2) <= this.spaceLeft;
181034
181407
  }
181035
181408
  eachWord(text, fn) {
181036
181409
  let bk;
@@ -181040,46 +181413,46 @@ var LineWrapper = class {
181040
181413
  while (bk = breaker.nextBreak()) {
181041
181414
  var shouldContinue;
181042
181415
  let word = text.slice((last2 != null ? last2.position : void 0) || 0, bk.position);
181043
- let w2 = wordWidths[word] != null ? wordWidths[word] : wordWidths[word] = this.wordWidth(word);
181044
- if (w2 > this.lineWidth + this.continuedX) {
181416
+ let w = wordWidths[word] != null ? wordWidths[word] : wordWidths[word] = this.wordWidth(word);
181417
+ if (w > this.lineWidth + this.continuedX) {
181045
181418
  let lbk = last2;
181046
181419
  const fbk = {};
181047
181420
  while (word.length) {
181048
181421
  var l3, mightGrow;
181049
- if (w2 > this.spaceLeft) {
181050
- l3 = Math.ceil(this.spaceLeft / (w2 / word.length));
181051
- w2 = this.wordWidth(word.slice(0, l3));
181052
- mightGrow = w2 <= this.spaceLeft && l3 < word.length;
181422
+ if (w > this.spaceLeft) {
181423
+ l3 = Math.ceil(this.spaceLeft / (w / word.length));
181424
+ w = this.wordWidth(word.slice(0, l3));
181425
+ mightGrow = w <= this.spaceLeft && l3 < word.length;
181053
181426
  } else {
181054
181427
  l3 = word.length;
181055
181428
  }
181056
- let mustShrink = w2 > this.spaceLeft && l3 > 0;
181429
+ let mustShrink = w > this.spaceLeft && l3 > 0;
181057
181430
  while (mustShrink || mightGrow) {
181058
181431
  if (mustShrink) {
181059
- w2 = this.wordWidth(word.slice(0, --l3));
181060
- mustShrink = w2 > this.spaceLeft && l3 > 0;
181432
+ w = this.wordWidth(word.slice(0, --l3));
181433
+ mustShrink = w > this.spaceLeft && l3 > 0;
181061
181434
  } else {
181062
- w2 = this.wordWidth(word.slice(0, ++l3));
181063
- mustShrink = w2 > this.spaceLeft && l3 > 0;
181064
- mightGrow = w2 <= this.spaceLeft && l3 < word.length;
181435
+ w = this.wordWidth(word.slice(0, ++l3));
181436
+ mustShrink = w > this.spaceLeft && l3 > 0;
181437
+ mightGrow = w <= this.spaceLeft && l3 < word.length;
181065
181438
  }
181066
181439
  }
181067
181440
  if (l3 === 0 && this.spaceLeft === this.lineWidth) {
181068
181441
  l3 = 1;
181069
181442
  }
181070
181443
  fbk.required = bk.required || l3 < word.length;
181071
- shouldContinue = fn(word.slice(0, l3), w2, fbk, lbk);
181444
+ shouldContinue = fn(word.slice(0, l3), w, fbk, lbk);
181072
181445
  lbk = {
181073
181446
  required: false
181074
181447
  };
181075
181448
  word = word.slice(l3);
181076
- w2 = this.wordWidth(word);
181449
+ w = this.wordWidth(word);
181077
181450
  if (shouldContinue === false) {
181078
181451
  break;
181079
181452
  }
181080
181453
  }
181081
181454
  } else {
181082
- shouldContinue = fn(word, w2, bk, last2);
181455
+ shouldContinue = fn(word, w, bk, last2);
181083
181456
  }
181084
181457
  if (shouldContinue === false) {
181085
181458
  break;
@@ -181122,17 +181495,17 @@ var LineWrapper = class {
181122
181495
  return lc++;
181123
181496
  };
181124
181497
  this.emit("sectionStart", options, this);
181125
- this.eachWord(text, (word, w2, bk, last2) => {
181498
+ this.eachWord(text, (word, w, bk, last2) => {
181126
181499
  if (last2 == null || last2.required) {
181127
181500
  this.emit("firstLine", options, this);
181128
181501
  this.spaceLeft = this.lineWidth;
181129
181502
  }
181130
- if (this.canFit(word, w2)) {
181503
+ if (this.canFit(word, w)) {
181131
181504
  buffer += word;
181132
- textWidth += w2;
181505
+ textWidth += w;
181133
181506
  wc++;
181134
181507
  }
181135
- if (bk.required || !this.canFit(word, w2)) {
181508
+ if (bk.required || !this.canFit(word, w)) {
181136
181509
  const lh = document.currentLineHeight(true);
181137
181510
  if (this.height != null && this.ellipsis && PDFNumber(document.y + lh * 2) > this.maxY && this.column >= this.columns) {
181138
181511
  if (this.ellipsis === true) {
@@ -181150,10 +181523,10 @@ var LineWrapper = class {
181150
181523
  textWidth = this.wordWidth(buffer);
181151
181524
  }
181152
181525
  if (bk.required) {
181153
- if (w2 > this.spaceLeft) {
181526
+ if (w > this.spaceLeft) {
181154
181527
  emitLine();
181155
181528
  buffer = word;
181156
- textWidth = w2;
181529
+ textWidth = w;
181157
181530
  wc = 1;
181158
181531
  }
181159
181532
  this.emit("lastLine", options, this);
@@ -181179,13 +181552,13 @@ var LineWrapper = class {
181179
181552
  textWidth = 0;
181180
181553
  return wc = 0;
181181
181554
  } else {
181182
- this.spaceLeft = this.lineWidth - w2;
181555
+ this.spaceLeft = this.lineWidth - w;
181183
181556
  buffer = word;
181184
- textWidth = w2;
181557
+ textWidth = w;
181185
181558
  return wc = 1;
181186
181559
  }
181187
181560
  } else {
181188
- return this.spaceLeft -= w2;
181561
+ return this.spaceLeft -= w;
181189
181562
  }
181190
181563
  });
181191
181564
  if (wc > 0) {
@@ -182064,29 +182437,29 @@ var ImagesMixin = {
182064
182437
  if (!ignoreOrientation && image.orientation > 4) {
182065
182438
  [width, height] = [height, width];
182066
182439
  }
182067
- let w2 = options.width || width;
182440
+ let w = options.width || width;
182068
182441
  let h2 = options.height || height;
182069
182442
  if (options.width && !options.height) {
182070
- const wp = w2 / width;
182071
- w2 = width * wp;
182443
+ const wp = w / width;
182444
+ w = width * wp;
182072
182445
  h2 = height * wp;
182073
182446
  } else if (options.height && !options.width) {
182074
182447
  const hp = h2 / height;
182075
- w2 = width * hp;
182448
+ w = width * hp;
182076
182449
  h2 = height * hp;
182077
182450
  } else if (options.scale) {
182078
- w2 = width * options.scale;
182451
+ w = width * options.scale;
182079
182452
  h2 = height * options.scale;
182080
182453
  } else if (options.fit) {
182081
182454
  [bw, bh] = options.fit;
182082
182455
  bp = bw / bh;
182083
182456
  ip = width / height;
182084
182457
  if (ip > bp) {
182085
- w2 = bw;
182458
+ w = bw;
182086
182459
  h2 = bw / ip;
182087
182460
  } else {
182088
182461
  h2 = bh;
182089
- w2 = bh * ip;
182462
+ w = bh * ip;
182090
182463
  }
182091
182464
  } else if (options.cover) {
182092
182465
  [bw, bh] = options.cover;
@@ -182094,17 +182467,17 @@ var ImagesMixin = {
182094
182467
  ip = width / height;
182095
182468
  if (ip > bp) {
182096
182469
  h2 = bh;
182097
- w2 = bh * ip;
182470
+ w = bh * ip;
182098
182471
  } else {
182099
- w2 = bw;
182472
+ w = bw;
182100
182473
  h2 = bw / ip;
182101
182474
  }
182102
182475
  }
182103
182476
  if (options.fit || options.cover) {
182104
182477
  if (options.align === "center") {
182105
- x3 = x3 + bw / 2 - w2 / 2;
182478
+ x3 = x3 + bw / 2 - w / 2;
182106
182479
  } else if (options.align === "right") {
182107
- x3 = x3 + bw - w2;
182480
+ x3 = x3 + bw - w;
182108
182481
  }
182109
182482
  if (options.valign === "center") {
182110
182483
  y2 = y2 + bh / 2 - h2 / 2;
@@ -182116,7 +182489,7 @@ var ImagesMixin = {
182116
182489
  let xTransform = x3;
182117
182490
  let yTransform = y2;
182118
182491
  let hTransform = h2;
182119
- let wTransform = w2;
182492
+ let wTransform = w;
182120
182493
  if (!ignoreOrientation) {
182121
182494
  switch (image.orientation) {
182122
182495
  default:
@@ -182125,16 +182498,16 @@ var ImagesMixin = {
182125
182498
  yTransform += h2;
182126
182499
  break;
182127
182500
  case 2:
182128
- wTransform = -w2;
182501
+ wTransform = -w;
182129
182502
  hTransform = -h2;
182130
- xTransform += w2;
182503
+ xTransform += w;
182131
182504
  yTransform += h2;
182132
182505
  break;
182133
182506
  case 3:
182134
182507
  originX = x3;
182135
182508
  originY = y2;
182136
182509
  hTransform = -h2;
182137
- xTransform -= w2;
182510
+ xTransform -= w;
182138
182511
  rotateAngle = 180;
182139
182512
  break;
182140
182513
  case 4:
@@ -182143,7 +182516,7 @@ var ImagesMixin = {
182143
182516
  originX = x3;
182144
182517
  originY = y2;
182145
182518
  wTransform = h2;
182146
- hTransform = w2;
182519
+ hTransform = w;
182147
182520
  yTransform -= hTransform;
182148
182521
  rotateAngle = 90;
182149
182522
  break;
@@ -182151,13 +182524,13 @@ var ImagesMixin = {
182151
182524
  originX = x3;
182152
182525
  originY = y2;
182153
182526
  wTransform = h2;
182154
- hTransform = -w2;
182527
+ hTransform = -w;
182155
182528
  rotateAngle = 90;
182156
182529
  break;
182157
182530
  case 7:
182158
182531
  originX = x3;
182159
182532
  originY = y2;
182160
- hTransform = -w2;
182533
+ hTransform = -w;
182161
182534
  wTransform = -h2;
182162
182535
  xTransform += h2;
182163
182536
  rotateAngle = 90;
@@ -182166,9 +182539,9 @@ var ImagesMixin = {
182166
182539
  originX = x3;
182167
182540
  originY = y2;
182168
182541
  wTransform = h2;
182169
- hTransform = -w2;
182542
+ hTransform = -w;
182170
182543
  xTransform -= h2;
182171
- yTransform += w2;
182544
+ yTransform += w;
182172
182545
  rotateAngle = -90;
182173
182546
  break;
182174
182547
  }
@@ -182177,10 +182550,10 @@ var ImagesMixin = {
182177
182550
  yTransform += h2;
182178
182551
  }
182179
182552
  if (options.link != null) {
182180
- this.link(x3, y2, w2, h2, options.link);
182553
+ this.link(x3, y2, w, h2, options.link);
182181
182554
  }
182182
182555
  if (options.goTo != null) {
182183
- this.goTo(x3, y2, w2, h2, options.goTo);
182556
+ this.goTo(x3, y2, w, h2, options.goTo);
182184
182557
  }
182185
182558
  if (options.destination != null) {
182186
182559
  this.addNamedDestination(options.destination, "XYZ", x3, y2, null);
@@ -182222,9 +182595,9 @@ var PDFAnnotationReference = class {
182222
182595
  }
182223
182596
  };
182224
182597
  var AnnotationsMixin = {
182225
- annotate(x3, y2, w2, h2, options) {
182598
+ annotate(x3, y2, w, h2, options) {
182226
182599
  options.Type = "Annot";
182227
- options.Rect = this._convertRect(x3, y2, w2, h2);
182600
+ options.Rect = this._convertRect(x3, y2, w, h2);
182228
182601
  options.Border = [0, 0, 0];
182229
182602
  if (options.Subtype === "Link" && typeof options.F === "undefined") {
182230
182603
  options.F = 1 << 2;
@@ -182253,7 +182626,7 @@ var AnnotationsMixin = {
182253
182626
  ref.end();
182254
182627
  return this;
182255
182628
  },
182256
- note(x3, y2, w2, h2, contents, options = {}) {
182629
+ note(x3, y2, w, h2, contents, options = {}) {
182257
182630
  options.Subtype = "Text";
182258
182631
  options.Contents = new String(contents);
182259
182632
  if (options.Name == null) {
@@ -182262,18 +182635,18 @@ var AnnotationsMixin = {
182262
182635
  if (options.color == null) {
182263
182636
  options.color = [243, 223, 92];
182264
182637
  }
182265
- return this.annotate(x3, y2, w2, h2, options);
182638
+ return this.annotate(x3, y2, w, h2, options);
182266
182639
  },
182267
- goTo(x3, y2, w2, h2, name, options = {}) {
182640
+ goTo(x3, y2, w, h2, name, options = {}) {
182268
182641
  options.Subtype = "Link";
182269
182642
  options.A = this.ref({
182270
182643
  S: "GoTo",
182271
182644
  D: new String(name)
182272
182645
  });
182273
182646
  options.A.end();
182274
- return this.annotate(x3, y2, w2, h2, options);
182647
+ return this.annotate(x3, y2, w, h2, options);
182275
182648
  },
182276
- link(x3, y2, w2, h2, url, options = {}) {
182649
+ link(x3, y2, w, h2, url, options = {}) {
182277
182650
  options.Subtype = "Link";
182278
182651
  if (typeof url === "number") {
182279
182652
  const pages = this._root.data.Pages.data;
@@ -182296,28 +182669,28 @@ var AnnotationsMixin = {
182296
182669
  if (options.structParent && !options.Contents) {
182297
182670
  options.Contents = new String("");
182298
182671
  }
182299
- return this.annotate(x3, y2, w2, h2, options);
182672
+ return this.annotate(x3, y2, w, h2, options);
182300
182673
  },
182301
- _markup(x3, y2, w2, h2, options = {}) {
182302
- const [x1, y1, x22, y22] = this._convertRect(x3, y2, w2, h2);
182674
+ _markup(x3, y2, w, h2, options = {}) {
182675
+ const [x1, y1, x22, y22] = this._convertRect(x3, y2, w, h2);
182303
182676
  options.QuadPoints = [x1, y22, x22, y22, x1, y1, x22, y1];
182304
182677
  options.Contents = new String();
182305
- return this.annotate(x3, y2, w2, h2, options);
182678
+ return this.annotate(x3, y2, w, h2, options);
182306
182679
  },
182307
- highlight(x3, y2, w2, h2, options = {}) {
182680
+ highlight(x3, y2, w, h2, options = {}) {
182308
182681
  options.Subtype = "Highlight";
182309
182682
  if (options.color == null) {
182310
182683
  options.color = [241, 238, 148];
182311
182684
  }
182312
- return this._markup(x3, y2, w2, h2, options);
182685
+ return this._markup(x3, y2, w, h2, options);
182313
182686
  },
182314
- underline(x3, y2, w2, h2, options = {}) {
182687
+ underline(x3, y2, w, h2, options = {}) {
182315
182688
  options.Subtype = "Underline";
182316
- return this._markup(x3, y2, w2, h2, options);
182689
+ return this._markup(x3, y2, w, h2, options);
182317
182690
  },
182318
- strike(x3, y2, w2, h2, options = {}) {
182691
+ strike(x3, y2, w, h2, options = {}) {
182319
182692
  options.Subtype = "StrikeOut";
182320
- return this._markup(x3, y2, w2, h2, options);
182693
+ return this._markup(x3, y2, w, h2, options);
182321
182694
  },
182322
182695
  lineAnnotation(x1, y1, x22, y2, options = {}) {
182323
182696
  options.Subtype = "Line";
@@ -182325,23 +182698,23 @@ var AnnotationsMixin = {
182325
182698
  options.L = [x1, this.page.height - y1, x22, this.page.height - y2];
182326
182699
  return this.annotate(x1, y1, x22, y2, options);
182327
182700
  },
182328
- rectAnnotation(x3, y2, w2, h2, options = {}) {
182701
+ rectAnnotation(x3, y2, w, h2, options = {}) {
182329
182702
  options.Subtype = "Square";
182330
182703
  options.Contents = new String();
182331
- return this.annotate(x3, y2, w2, h2, options);
182704
+ return this.annotate(x3, y2, w, h2, options);
182332
182705
  },
182333
- ellipseAnnotation(x3, y2, w2, h2, options = {}) {
182706
+ ellipseAnnotation(x3, y2, w, h2, options = {}) {
182334
182707
  options.Subtype = "Circle";
182335
182708
  options.Contents = new String();
182336
- return this.annotate(x3, y2, w2, h2, options);
182709
+ return this.annotate(x3, y2, w, h2, options);
182337
182710
  },
182338
- textAnnotation(x3, y2, w2, h2, text, options = {}) {
182711
+ textAnnotation(x3, y2, w, h2, text, options = {}) {
182339
182712
  options.Subtype = "FreeText";
182340
182713
  options.Contents = new String(text);
182341
182714
  options.DA = new String();
182342
- return this.annotate(x3, y2, w2, h2, options);
182715
+ return this.annotate(x3, y2, w, h2, options);
182343
182716
  },
182344
- fileAnnotation(x3, y2, w2, h2, file = {}, options = {}) {
182717
+ fileAnnotation(x3, y2, w, h2, file = {}, options = {}) {
182345
182718
  const filespec = this.file(file.src, Object.assign({
182346
182719
  hidden: true
182347
182720
  }, file));
@@ -182352,12 +182725,12 @@ var AnnotationsMixin = {
182352
182725
  } else if (filespec.data.Desc) {
182353
182726
  options.Contents = filespec.data.Desc;
182354
182727
  }
182355
- return this.annotate(x3, y2, w2, h2, options);
182728
+ return this.annotate(x3, y2, w, h2, options);
182356
182729
  },
182357
- _convertRect(x1, y1, w2, h2) {
182730
+ _convertRect(x1, y1, w, h2) {
182358
182731
  let y2 = y1;
182359
182732
  y1 += h2;
182360
- let x22 = x1 + w2;
182733
+ let x22 = x1 + w;
182361
182734
  const [m0, m1, m22, m3, m4, m5] = this._ctm;
182362
182735
  x1 = m0 * x1 + m22 * y1 + m4;
182363
182736
  y1 = m1 * x1 + m3 * y1 + m5;
@@ -182658,8 +183031,8 @@ var PDFNumberTree = class extends PDFTree {
182658
183031
  _keysName() {
182659
183032
  return "Nums";
182660
183033
  }
182661
- _dataForKey(k) {
182662
- return parseInt(k);
183034
+ _dataForKey(k2) {
183035
+ return parseInt(k2);
182663
183036
  }
182664
183037
  };
182665
183038
  var MarkingsMixin = {
@@ -182919,33 +183292,33 @@ var AcroFormMixin = {
182919
183292
  this._addToParent(fieldRef);
182920
183293
  return fieldRef;
182921
183294
  },
182922
- formAnnotation(name, type, x3, y2, w2, h2, options = {}) {
183295
+ formAnnotation(name, type, x3, y2, w, h2, options = {}) {
182923
183296
  let fieldDict = this._fieldDict(name, type, options);
182924
183297
  fieldDict.Subtype = "Widget";
182925
183298
  if (fieldDict.F === void 0) {
182926
183299
  fieldDict.F = 4;
182927
183300
  }
182928
- this.annotate(x3, y2, w2, h2, fieldDict);
183301
+ this.annotate(x3, y2, w, h2, fieldDict);
182929
183302
  let annotRef = this.page.annotations[this.page.annotations.length - 1];
182930
183303
  return this._addToParent(annotRef);
182931
183304
  },
182932
- formText(name, x3, y2, w2, h2, options = {}) {
182933
- return this.formAnnotation(name, "text", x3, y2, w2, h2, options);
183305
+ formText(name, x3, y2, w, h2, options = {}) {
183306
+ return this.formAnnotation(name, "text", x3, y2, w, h2, options);
182934
183307
  },
182935
- formPushButton(name, x3, y2, w2, h2, options = {}) {
182936
- return this.formAnnotation(name, "pushButton", x3, y2, w2, h2, options);
183308
+ formPushButton(name, x3, y2, w, h2, options = {}) {
183309
+ return this.formAnnotation(name, "pushButton", x3, y2, w, h2, options);
182937
183310
  },
182938
- formCombo(name, x3, y2, w2, h2, options = {}) {
182939
- return this.formAnnotation(name, "combo", x3, y2, w2, h2, options);
183311
+ formCombo(name, x3, y2, w, h2, options = {}) {
183312
+ return this.formAnnotation(name, "combo", x3, y2, w, h2, options);
182940
183313
  },
182941
- formList(name, x3, y2, w2, h2, options = {}) {
182942
- return this.formAnnotation(name, "list", x3, y2, w2, h2, options);
183314
+ formList(name, x3, y2, w, h2, options = {}) {
183315
+ return this.formAnnotation(name, "list", x3, y2, w, h2, options);
182943
183316
  },
182944
- formRadioButton(name, x3, y2, w2, h2, options = {}) {
182945
- return this.formAnnotation(name, "radioButton", x3, y2, w2, h2, options);
183317
+ formRadioButton(name, x3, y2, w, h2, options = {}) {
183318
+ return this.formAnnotation(name, "radioButton", x3, y2, w, h2, options);
182946
183319
  },
182947
- formCheckbox(name, x3, y2, w2, h2, options = {}) {
182948
- return this.formAnnotation(name, "checkbox", x3, y2, w2, h2, options);
183320
+ formCheckbox(name, x3, y2, w, h2, options = {}) {
183321
+ return this.formAnnotation(name, "checkbox", x3, y2, w, h2, options);
182949
183322
  },
182950
183323
  _addToParent(fieldRef) {
182951
183324
  let parent = fieldRef.data.Parent;
@@ -183002,29 +183375,29 @@ var AcroFormMixin = {
183002
183375
  return opts;
183003
183376
  },
183004
183377
  _resolveFormat(opts) {
183005
- const f3 = opts.format;
183006
- if (f3 && f3.type) {
183378
+ const f4 = opts.format;
183379
+ if (f4 && f4.type) {
183007
183380
  let fnKeystroke;
183008
183381
  let fnFormat;
183009
183382
  let params = "";
183010
- if (FORMAT_SPECIAL[f3.type] !== void 0) {
183383
+ if (FORMAT_SPECIAL[f4.type] !== void 0) {
183011
183384
  fnKeystroke = `AFSpecial_Keystroke`;
183012
183385
  fnFormat = `AFSpecial_Format`;
183013
- params = FORMAT_SPECIAL[f3.type];
183386
+ params = FORMAT_SPECIAL[f4.type];
183014
183387
  } else {
183015
- let format = f3.type.charAt(0).toUpperCase() + f3.type.slice(1);
183388
+ let format = f4.type.charAt(0).toUpperCase() + f4.type.slice(1);
183016
183389
  fnKeystroke = `AF${format}_Keystroke`;
183017
183390
  fnFormat = `AF${format}_Format`;
183018
- if (f3.type === "date") {
183391
+ if (f4.type === "date") {
183019
183392
  fnKeystroke += "Ex";
183020
- params = String(f3.param);
183021
- } else if (f3.type === "time") {
183022
- params = String(f3.param);
183023
- } else if (f3.type === "number") {
183024
- let p = Object.assign({}, FORMAT_DEFAULT.number, f3);
183393
+ params = String(f4.param);
183394
+ } else if (f4.type === "time") {
183395
+ params = String(f4.param);
183396
+ } else if (f4.type === "number") {
183397
+ let p = Object.assign({}, FORMAT_DEFAULT.number, f4);
183025
183398
  params = String([String(p.nDec), p.sepComma ? "0" : "1", '"' + p.negStyle + '"', "null", '"' + p.currency + '"', String(p.currencyPrepend)].join(","));
183026
- } else if (f3.type === "percent") {
183027
- let p = Object.assign({}, FORMAT_DEFAULT.percent, f3);
183399
+ } else if (f4.type === "percent") {
183400
+ let p = Object.assign({}, FORMAT_DEFAULT.percent, f4);
183028
183401
  params = String([String(p.nDec), p.sepComma ? "0" : "1"].join(","));
183029
183402
  }
183030
183403
  }
@@ -183368,8 +183741,8 @@ function normalizedDefaultStyle(defaultStyleInternal) {
183368
183741
  if (typeof defaultStyle !== "object") defaultStyle = {
183369
183742
  text: defaultStyle
183370
183743
  };
183371
- const defaultRowStyle = Object.fromEntries(Object.entries(defaultStyle).filter(([k]) => ROW_FIELDS.includes(k)));
183372
- const defaultColStyle = Object.fromEntries(Object.entries(defaultStyle).filter(([k]) => COLUMN_FIELDS.includes(k)));
183744
+ const defaultRowStyle = Object.fromEntries(Object.entries(defaultStyle).filter(([k2]) => ROW_FIELDS.includes(k2)));
183745
+ const defaultColStyle = Object.fromEntries(Object.entries(defaultStyle).filter(([k2]) => COLUMN_FIELDS.includes(k2)));
183373
183746
  defaultStyle.padding = normalizeSides(defaultStyle.padding);
183374
183747
  defaultStyle.border = normalizeSides(defaultStyle.border);
183375
183748
  defaultStyle.borderColor = normalizeSides(defaultStyle.borderColor);
@@ -183885,7 +184258,7 @@ function renderCellText(cell) {
183885
184258
  if (cell.font) doc.font(rollbackFont, rollbackFontFamily, rollbackFontSize);
183886
184259
  }
183887
184260
  function renderBorder(border, borderColor, x3, y2, width, height, mask) {
183888
- border = Object.fromEntries(Object.entries(border).map(([k, v2]) => [k, mask && !mask[k] ? 0 : v2]));
184261
+ border = Object.fromEntries(Object.entries(border).map(([k2, v2]) => [k2, mask && !mask[k2] ? 0 : v2]));
183889
184262
  const doc = this.document;
183890
184263
  if ([border.right, border.bottom, border.left].every((val) => val === border.top)) {
183891
184264
  if (border.top > 0) {
@@ -184347,7 +184720,7 @@ function bundledFontPaths() {
184347
184720
  const rootFromSrc = join4(here, "..", "..");
184348
184721
  const candidates = [join4(here, "fonts"), join4(rootFromSrc, "dist", "fonts")];
184349
184722
  const fontsDir = candidates.find(
184350
- (d2) => existsSync3(join4(d2, "Pretendard-Regular.ttf")) && existsSync3(join4(d2, "Pretendard-Bold.ttf"))
184723
+ (d) => existsSync3(join4(d, "Pretendard-Regular.ttf")) && existsSync3(join4(d, "Pretendard-Bold.ttf"))
184351
184724
  );
184352
184725
  const dir = fontsDir || candidates[0];
184353
184726
  return {
@@ -184388,7 +184761,7 @@ function stripFrontmatter2(md) {
184388
184761
  return md.replace(FRONTMATTER_RE2, "");
184389
184762
  }
184390
184763
  function lexAndExtractPlantUml(body) {
184391
- const tokens = g.lexer(stripFrontmatter2(body ?? ""));
184764
+ const tokens = f3.lexer(stripFrontmatter2(body ?? ""));
184392
184765
  const pumlRegistry = /* @__PURE__ */ new Map();
184393
184766
  let counter = 0;
184394
184767
  for (const tok of tokens) {
@@ -185563,7 +185936,7 @@ var xrayClientSecret = process.env.XRAY_CLIENT_SECRET || "";
185563
185936
  var xray = xrayClientId && xrayClientSecret ? new XrayClient(xrayClientId, xrayClientSecret, jiraUrl, jiraEmail, jiraToken) : null;
185564
185937
  var server = new McpServer({
185565
185938
  name: "jira-confluence",
185566
- version: "0.1.36"
185939
+ version: "0.1.39"
185567
185940
  });
185568
185941
  var ctx = { server, jira, confluence, risk, xray };
185569
185942
  registerJiraCrudTools(ctx);