github.com/minio/console@v1.4.1/web-app/build/scripts/pdf.worker.min.js (about)

     1  /**
     2   * @licstart The following is the entire license notice for the
     3   * JavaScript code in this page
     4   *
     5   * Copyright 2023 Mozilla Foundation
     6   *
     7   * Licensed under the Apache License, Version 2.0 (the "License");
     8   * you may not use this file except in compliance with the License.
     9   * You may obtain a copy of the License at
    10   *
    11   *     http://www.apache.org/licenses/LICENSE-2.0
    12   *
    13   * Unless required by applicable law or agreed to in writing, software
    14   * distributed under the License is distributed on an "AS IS" BASIS,
    15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    16   * See the License for the specific language governing permissions and
    17   * limitations under the License.
    18   *
    19   * @licend The above is the entire license notice for the
    20   * JavaScript code in this page
    21   */
    22  !(function webpackUniversalModuleDefinition(e, t) {
    23    "object" == typeof exports && "object" == typeof module
    24      ? (module.exports = e.pdfjsWorker = t())
    25      : "function" == typeof define && define.amd
    26        ? define("pdfjs-dist/build/pdf.worker", [], () => (e.pdfjsWorker = t()))
    27        : "object" == typeof exports
    28          ? (exports["pdfjs-dist/build/pdf.worker"] = e.pdfjsWorker = t())
    29          : (e["pdfjs-dist/build/pdf.worker"] = e.pdfjsWorker = t());
    30  })(globalThis, () =>
    31    (() => {
    32      "use strict";
    33      var e = [
    34          ,
    35          (e, t, a) => {
    36            Object.defineProperty(t, "__esModule", { value: !0 });
    37            t.WorkerTask = t.WorkerMessageHandler = void 0;
    38            var r = a(2),
    39              n = a(3),
    40              i = a(4),
    41              s = a(6),
    42              o = a(10),
    43              c = a(68),
    44              l = a(73),
    45              h = a(104),
    46              u = a(105),
    47              d = a(72);
    48            class WorkerTask {
    49              constructor(e) {
    50                this.name = e;
    51                this.terminated = !1;
    52                this._capability = new r.PromiseCapability();
    53              }
    54              get finished() {
    55                return this._capability.promise;
    56              }
    57              finish() {
    58                this._capability.resolve();
    59              }
    60              terminate() {
    61                this.terminated = !0;
    62              }
    63              ensureNotTerminated() {
    64                if (this.terminated)
    65                  throw new Error("Worker task was terminated");
    66              }
    67            }
    68            t.WorkerTask = WorkerTask;
    69            class WorkerMessageHandler {
    70              static setup(e, t) {
    71                let a = !1;
    72                e.on("test", function (t) {
    73                  if (!a) {
    74                    a = !0;
    75                    e.send("test", t instanceof Uint8Array);
    76                  }
    77                });
    78                e.on("configure", function (e) {
    79                  (0, r.setVerbosityLevel)(e.verbosity);
    80                });
    81                e.on("GetDocRequest", function (e) {
    82                  return WorkerMessageHandler.createDocumentHandler(e, t);
    83                });
    84              }
    85              static createDocumentHandler(e, t) {
    86                let a,
    87                  f = !1,
    88                  g = null;
    89                const p = new Set(),
    90                  m = (0, r.getVerbosityLevel)(),
    91                  { docId: b, apiVersion: y } = e,
    92                  w = "3.11.174";
    93                if (y !== w)
    94                  throw new Error(
    95                    `The API version "${y}" does not match the Worker version "${w}".`,
    96                  );
    97                const S = [];
    98                for (const e in []) S.push(e);
    99                if (S.length)
   100                  throw new Error(
   101                    "The `Array.prototype` contains unexpected enumerable properties: " +
   102                      S.join(", ") +
   103                      "; thus breaking e.g. `for...in` iteration of `Array`s.",
   104                  );
   105                const x = b + "_worker";
   106                let C = new h.MessageHandler(x, b, t);
   107                function ensureNotTerminated() {
   108                  if (f) throw new Error("Worker was terminated");
   109                }
   110                function startWorkerTask(e) {
   111                  p.add(e);
   112                }
   113                function finishWorkerTask(e) {
   114                  e.finish();
   115                  p.delete(e);
   116                }
   117                async function loadDocument(e) {
   118                  await a.ensureDoc("checkHeader");
   119                  await a.ensureDoc("parseStartXRef");
   120                  await a.ensureDoc("parse", [e]);
   121                  await a.ensureDoc("checkFirstPage", [e]);
   122                  await a.ensureDoc("checkLastPage", [e]);
   123                  const t = await a.ensureDoc("isPureXfa");
   124                  if (t) {
   125                    const e = new WorkerTask("loadXfaFonts");
   126                    startWorkerTask(e);
   127                    await Promise.all([
   128                      a
   129                        .loadXfaFonts(C, e)
   130                        .catch((e) => {})
   131                        .then(() => finishWorkerTask(e)),
   132                      a.loadXfaImages(),
   133                    ]);
   134                  }
   135                  const [r, n] = await Promise.all([
   136                    a.ensureDoc("numPages"),
   137                    a.ensureDoc("fingerprints"),
   138                  ]);
   139                  return {
   140                    numPages: r,
   141                    fingerprints: n,
   142                    htmlForXfa: t ? await a.ensureDoc("htmlForXfa") : null,
   143                  };
   144                }
   145                function getPdfManager({
   146                  data: e,
   147                  password: t,
   148                  disableAutoFetch: a,
   149                  rangeChunkSize: i,
   150                  length: o,
   151                  docBaseUrl: c,
   152                  enableXfa: l,
   153                  evaluatorOptions: h,
   154                }) {
   155                  const d = {
   156                      source: null,
   157                      disableAutoFetch: a,
   158                      docBaseUrl: c,
   159                      docId: b,
   160                      enableXfa: l,
   161                      evaluatorOptions: h,
   162                      handler: C,
   163                      length: o,
   164                      password: t,
   165                      rangeChunkSize: i,
   166                    },
   167                    f = new r.PromiseCapability();
   168                  let p;
   169                  if (e) {
   170                    try {
   171                      d.source = e;
   172                      p = new s.LocalPdfManager(d);
   173                      f.resolve(p);
   174                    } catch (e) {
   175                      f.reject(e);
   176                    }
   177                    return f.promise;
   178                  }
   179                  let m,
   180                    y = [];
   181                  try {
   182                    m = new u.PDFWorkerStream(C);
   183                  } catch (e) {
   184                    f.reject(e);
   185                    return f.promise;
   186                  }
   187                  const w = m.getFullReader();
   188                  w.headersReady
   189                    .then(function () {
   190                      if (w.isRangeSupported) {
   191                        d.source = m;
   192                        d.length = w.contentLength;
   193                        d.disableAutoFetch ||= w.isStreamingSupported;
   194                        p = new s.NetworkPdfManager(d);
   195                        for (const e of y) p.sendProgressiveData(e);
   196                        y = [];
   197                        f.resolve(p);
   198                        g = null;
   199                      }
   200                    })
   201                    .catch(function (e) {
   202                      f.reject(e);
   203                      g = null;
   204                    });
   205                  let S = 0;
   206                  new Promise(function (e, t) {
   207                    const readChunk = function ({ value: e, done: a }) {
   208                      try {
   209                        ensureNotTerminated();
   210                        if (a) {
   211                          p ||
   212                            (function () {
   213                              const e = (0, n.arrayBuffersToBytes)(y);
   214                              o &&
   215                                e.length !== o &&
   216                                (0, r.warn)(
   217                                  "reported HTTP length is different from actual",
   218                                );
   219                              try {
   220                                d.source = e;
   221                                p = new s.LocalPdfManager(d);
   222                                f.resolve(p);
   223                              } catch (e) {
   224                                f.reject(e);
   225                              }
   226                              y = [];
   227                            })();
   228                          g = null;
   229                          return;
   230                        }
   231                        S += e.byteLength;
   232                        w.isStreamingSupported ||
   233                          C.send("DocProgress", {
   234                            loaded: S,
   235                            total: Math.max(S, w.contentLength || 0),
   236                          });
   237                        p ? p.sendProgressiveData(e) : y.push(e);
   238                        w.read().then(readChunk, t);
   239                      } catch (e) {
   240                        t(e);
   241                      }
   242                    };
   243                    w.read().then(readChunk, t);
   244                  }).catch(function (e) {
   245                    f.reject(e);
   246                    g = null;
   247                  });
   248                  g = function (e) {
   249                    m.cancelAllRequests(e);
   250                  };
   251                  return f.promise;
   252                }
   253                C.on("GetPage", function (e) {
   254                  return a.getPage(e.pageIndex).then(function (e) {
   255                    return Promise.all([
   256                      a.ensure(e, "rotate"),
   257                      a.ensure(e, "ref"),
   258                      a.ensure(e, "userUnit"),
   259                      a.ensure(e, "view"),
   260                    ]).then(function ([e, t, a, r]) {
   261                      return { rotate: e, ref: t, userUnit: a, view: r };
   262                    });
   263                  });
   264                });
   265                C.on("GetPageIndex", function (e) {
   266                  const t = i.Ref.get(e.num, e.gen);
   267                  return a.ensureCatalog("getPageIndex", [t]);
   268                });
   269                C.on("GetDestinations", function (e) {
   270                  return a.ensureCatalog("destinations");
   271                });
   272                C.on("GetDestination", function (e) {
   273                  return a.ensureCatalog("getDestination", [e.id]);
   274                });
   275                C.on("GetPageLabels", function (e) {
   276                  return a.ensureCatalog("pageLabels");
   277                });
   278                C.on("GetPageLayout", function (e) {
   279                  return a.ensureCatalog("pageLayout");
   280                });
   281                C.on("GetPageMode", function (e) {
   282                  return a.ensureCatalog("pageMode");
   283                });
   284                C.on("GetViewerPreferences", function (e) {
   285                  return a.ensureCatalog("viewerPreferences");
   286                });
   287                C.on("GetOpenAction", function (e) {
   288                  return a.ensureCatalog("openAction");
   289                });
   290                C.on("GetAttachments", function (e) {
   291                  return a.ensureCatalog("attachments");
   292                });
   293                C.on("GetDocJSActions", function (e) {
   294                  return a.ensureCatalog("jsActions");
   295                });
   296                C.on("GetPageJSActions", function ({ pageIndex: e }) {
   297                  return a.getPage(e).then(function (e) {
   298                    return a.ensure(e, "jsActions");
   299                  });
   300                });
   301                C.on("GetOutline", function (e) {
   302                  return a.ensureCatalog("documentOutline");
   303                });
   304                C.on("GetOptionalContentConfig", function (e) {
   305                  return a.ensureCatalog("optionalContentConfig");
   306                });
   307                C.on("GetPermissions", function (e) {
   308                  return a.ensureCatalog("permissions");
   309                });
   310                C.on("GetMetadata", function (e) {
   311                  return Promise.all([
   312                    a.ensureDoc("documentInfo"),
   313                    a.ensureCatalog("metadata"),
   314                  ]);
   315                });
   316                C.on("GetMarkInfo", function (e) {
   317                  return a.ensureCatalog("markInfo");
   318                });
   319                C.on("GetData", function (e) {
   320                  return a.requestLoadedStream().then(function (e) {
   321                    return e.bytes;
   322                  });
   323                });
   324                C.on("GetAnnotations", function ({ pageIndex: e, intent: t }) {
   325                  return a.getPage(e).then(function (a) {
   326                    const r = new WorkerTask(`GetAnnotations: page ${e}`);
   327                    startWorkerTask(r);
   328                    return a.getAnnotationsData(C, r, t).then(
   329                      (e) => {
   330                        finishWorkerTask(r);
   331                        return e;
   332                      },
   333                      (e) => {
   334                        finishWorkerTask(r);
   335                        throw e;
   336                      },
   337                    );
   338                  });
   339                });
   340                C.on("GetFieldObjects", function (e) {
   341                  return a.ensureDoc("fieldObjects");
   342                });
   343                C.on("HasJSActions", function (e) {
   344                  return a.ensureDoc("hasJSActions");
   345                });
   346                C.on("GetCalculationOrderIds", function (e) {
   347                  return a.ensureDoc("calculationOrderIds");
   348                });
   349                C.on(
   350                  "SaveDocument",
   351                  async function ({
   352                    isPureXfa: e,
   353                    numPages: t,
   354                    annotationStorage: s,
   355                    filename: c,
   356                  }) {
   357                    const h = [
   358                        a.requestLoadedStream(),
   359                        a.ensureCatalog("acroForm"),
   360                        a.ensureCatalog("acroFormRef"),
   361                        a.ensureDoc("startXRef"),
   362                        a.ensureDoc("xref"),
   363                        a.ensureDoc("linearization"),
   364                        a.ensureCatalog("structTreeRoot"),
   365                      ],
   366                      u = [],
   367                      f = e ? null : (0, n.getNewAnnotationsMap)(s),
   368                      [g, p, m, b, y, w, S] = await Promise.all(h),
   369                      x = y.trailer.getRaw("Root") || null;
   370                    let k;
   371                    if (f) {
   372                      S
   373                        ? (await S.canUpdateStructTree({
   374                            pdfManager: a,
   375                            newAnnotationsByPage: f,
   376                          })) && (k = S)
   377                        : (await d.StructTreeRoot.canCreateStructureTree({
   378                            catalogRef: x,
   379                            pdfManager: a,
   380                            newAnnotationsByPage: f,
   381                          })) && (k = null);
   382                      const e = o.AnnotationFactory.generateImages(
   383                          s.values(),
   384                          y,
   385                          a.evaluatorOptions.isOffscreenCanvasSupported,
   386                        ),
   387                        t = void 0 === k ? u : [];
   388                      for (const [r, n] of f)
   389                        t.push(
   390                          a.getPage(r).then((t) => {
   391                            const a = new WorkerTask(`Save (editor): page ${r}`);
   392                            return t
   393                              .saveNewAnnotations(C, a, n, e)
   394                              .finally(function () {
   395                                finishWorkerTask(a);
   396                              });
   397                          }),
   398                        );
   399                      null === k
   400                        ? u.push(
   401                            Promise.all(t).then(async (e) => {
   402                              await d.StructTreeRoot.createStructureTree({
   403                                newAnnotationsByPage: f,
   404                                xref: y,
   405                                catalogRef: x,
   406                                pdfManager: a,
   407                                newRefs: e,
   408                              });
   409                              return e;
   410                            }),
   411                          )
   412                        : k &&
   413                          u.push(
   414                            Promise.all(t).then(async (e) => {
   415                              await k.updateStructureTree({
   416                                newAnnotationsByPage: f,
   417                                pdfManager: a,
   418                                newRefs: e,
   419                              });
   420                              return e;
   421                            }),
   422                          );
   423                    }
   424                    if (e) u.push(a.serializeXfaData(s));
   425                    else
   426                      for (let e = 0; e < t; e++)
   427                        u.push(
   428                          a.getPage(e).then(function (t) {
   429                            const a = new WorkerTask(`Save: page ${e}`);
   430                            return t.save(C, a, s).finally(function () {
   431                              finishWorkerTask(a);
   432                            });
   433                          }),
   434                        );
   435                    const v = await Promise.all(u);
   436                    let F = [],
   437                      O = null;
   438                    if (e) {
   439                      O = v[0];
   440                      if (!O) return g.bytes;
   441                    } else {
   442                      F = v.flat(2);
   443                      if (0 === F.length) return g.bytes;
   444                    }
   445                    const T =
   446                        m &&
   447                        p instanceof i.Dict &&
   448                        F.some((e) => e.needAppearances),
   449                      M = (p instanceof i.Dict && p.get("XFA")) || null;
   450                    let D = null,
   451                      E = !1;
   452                    if (Array.isArray(M)) {
   453                      for (let e = 0, t = M.length; e < t; e += 2)
   454                        if ("datasets" === M[e]) {
   455                          D = M[e + 1];
   456                          E = !0;
   457                        }
   458                      null === D && (D = y.getNewTemporaryRef());
   459                    } else M && (0, r.warn)("Unsupported XFA type.");
   460                    let N = Object.create(null);
   461                    if (y.trailer) {
   462                      const e = Object.create(null),
   463                        t = y.trailer.get("Info") || null;
   464                      t instanceof i.Dict &&
   465                        t.forEach((t, a) => {
   466                          "string" == typeof a &&
   467                            (e[t] = (0, r.stringToPDFString)(a));
   468                        });
   469                      N = {
   470                        rootRef: x,
   471                        encryptRef: y.trailer.getRaw("Encrypt") || null,
   472                        newRef: y.getNewTemporaryRef(),
   473                        infoRef: y.trailer.getRaw("Info") || null,
   474                        info: e,
   475                        fileIds: y.trailer.get("ID") || null,
   476                        startXRef: w ? b : y.lastXRefStreamPos ?? b,
   477                        filename: c,
   478                      };
   479                    }
   480                    return (0, l.incrementalUpdate)({
   481                      originalData: g.bytes,
   482                      xrefInfo: N,
   483                      newRefs: F,
   484                      xref: y,
   485                      hasXfa: !!M,
   486                      xfaDatasetsRef: D,
   487                      hasXfaDatasetsEntry: E,
   488                      needAppearances: T,
   489                      acroFormRef: m,
   490                      acroForm: p,
   491                      xfaData: O,
   492                    }).finally(() => {
   493                      y.resetNewTemporaryRef();
   494                    });
   495                  },
   496                );
   497                C.on("GetOperatorList", function (e, t) {
   498                  const n = e.pageIndex;
   499                  a.getPage(n).then(function (a) {
   500                    const i = new WorkerTask(`GetOperatorList: page ${n}`);
   501                    startWorkerTask(i);
   502                    const s = m >= r.VerbosityLevel.INFOS ? Date.now() : 0;
   503                    a.getOperatorList({
   504                      handler: C,
   505                      sink: t,
   506                      task: i,
   507                      intent: e.intent,
   508                      cacheKey: e.cacheKey,
   509                      annotationStorage: e.annotationStorage,
   510                    }).then(
   511                      function (e) {
   512                        finishWorkerTask(i);
   513                        s &&
   514                          (0, r.info)(
   515                            `page=${n + 1} - getOperatorList: time=${Date.now() - s}ms, len=${e.length}`,
   516                          );
   517                        t.close();
   518                      },
   519                      function (e) {
   520                        finishWorkerTask(i);
   521                        i.terminated || t.error(e);
   522                      },
   523                    );
   524                  });
   525                });
   526                C.on("GetTextContent", function (e, t) {
   527                  const {
   528                    pageIndex: n,
   529                    includeMarkedContent: i,
   530                    disableNormalization: s,
   531                  } = e;
   532                  a.getPage(n).then(function (e) {
   533                    const a = new WorkerTask("GetTextContent: page " + n);
   534                    startWorkerTask(a);
   535                    const o = m >= r.VerbosityLevel.INFOS ? Date.now() : 0;
   536                    e.extractTextContent({
   537                      handler: C,
   538                      task: a,
   539                      sink: t,
   540                      includeMarkedContent: i,
   541                      disableNormalization: s,
   542                    }).then(
   543                      function () {
   544                        finishWorkerTask(a);
   545                        o &&
   546                          (0, r.info)(
   547                            `page=${n + 1} - getTextContent: time=` +
   548                              (Date.now() - o) +
   549                              "ms",
   550                          );
   551                        t.close();
   552                      },
   553                      function (e) {
   554                        finishWorkerTask(a);
   555                        a.terminated || t.error(e);
   556                      },
   557                    );
   558                  });
   559                });
   560                C.on("GetStructTree", function (e) {
   561                  return a.getPage(e.pageIndex).then(function (e) {
   562                    return a.ensure(e, "getStructTree");
   563                  });
   564                });
   565                C.on("FontFallback", function (e) {
   566                  return a.fontFallback(e.id, C);
   567                });
   568                C.on("Cleanup", function (e) {
   569                  return a.cleanup(!0);
   570                });
   571                C.on("Terminate", function (e) {
   572                  f = !0;
   573                  const t = [];
   574                  if (a) {
   575                    a.terminate(new r.AbortException("Worker was terminated."));
   576                    const e = a.cleanup();
   577                    t.push(e);
   578                    a = null;
   579                  } else (0, c.clearGlobalCaches)();
   580                  g && g(new r.AbortException("Worker was terminated."));
   581                  for (const e of p) {
   582                    t.push(e.finished);
   583                    e.terminate();
   584                  }
   585                  return Promise.all(t).then(function () {
   586                    C.destroy();
   587                    C = null;
   588                  });
   589                });
   590                C.on("Ready", function (t) {
   591                  !(function setupDoc(e) {
   592                    function onSuccess(e) {
   593                      ensureNotTerminated();
   594                      C.send("GetDoc", { pdfInfo: e });
   595                    }
   596                    function onFailure(e) {
   597                      ensureNotTerminated();
   598                      if (e instanceof r.PasswordException) {
   599                        const t = new WorkerTask(
   600                          `PasswordException: response ${e.code}`,
   601                        );
   602                        startWorkerTask(t);
   603                        C.sendWithPromise("PasswordRequest", e)
   604                          .then(function ({ password: e }) {
   605                            finishWorkerTask(t);
   606                            a.updatePassword(e);
   607                            pdfManagerReady();
   608                          })
   609                          .catch(function () {
   610                            finishWorkerTask(t);
   611                            C.send("DocException", e);
   612                          });
   613                      } else
   614                        e instanceof r.InvalidPDFException ||
   615                        e instanceof r.MissingPDFException ||
   616                        e instanceof r.UnexpectedResponseException ||
   617                        e instanceof r.UnknownErrorException
   618                          ? C.send("DocException", e)
   619                          : C.send(
   620                              "DocException",
   621                              new r.UnknownErrorException(
   622                                e.message,
   623                                e.toString(),
   624                              ),
   625                            );
   626                    }
   627                    function pdfManagerReady() {
   628                      ensureNotTerminated();
   629                      loadDocument(!1).then(onSuccess, function (e) {
   630                        ensureNotTerminated();
   631                        e instanceof n.XRefParseException
   632                          ? a.requestLoadedStream().then(function () {
   633                              ensureNotTerminated();
   634                              loadDocument(!0).then(onSuccess, onFailure);
   635                            })
   636                          : onFailure(e);
   637                      });
   638                    }
   639                    ensureNotTerminated();
   640                    getPdfManager(e)
   641                      .then(function (e) {
   642                        if (f) {
   643                          e.terminate(
   644                            new r.AbortException("Worker was terminated."),
   645                          );
   646                          throw new Error("Worker was terminated");
   647                        }
   648                        a = e;
   649                        a.requestLoadedStream(!0).then((e) => {
   650                          C.send("DataLoaded", { length: e.bytes.byteLength });
   651                        });
   652                      })
   653                      .then(pdfManagerReady, onFailure);
   654                  })(e);
   655                  e = null;
   656                });
   657                return x;
   658              }
   659              static initializeFromPort(e) {
   660                const t = new h.MessageHandler("worker", "main", e);
   661                WorkerMessageHandler.setup(t, e);
   662                t.send("ready", null);
   663              }
   664            }
   665            t.WorkerMessageHandler = WorkerMessageHandler;
   666            "undefined" == typeof window &&
   667              !r.isNodeJS &&
   668              "undefined" != typeof self &&
   669              (function isMessagePort(e) {
   670                return "function" == typeof e.postMessage && "onmessage" in e;
   671              })(self) &&
   672              WorkerMessageHandler.initializeFromPort(self);
   673          },
   674          (e, t) => {
   675            Object.defineProperty(t, "__esModule", { value: !0 });
   676            t.VerbosityLevel =
   677              t.Util =
   678              t.UnknownErrorException =
   679              t.UnexpectedResponseException =
   680              t.TextRenderingMode =
   681              t.RenderingIntentFlag =
   682              t.PromiseCapability =
   683              t.PermissionFlag =
   684              t.PasswordResponses =
   685              t.PasswordException =
   686              t.PageActionEventType =
   687              t.OPS =
   688              t.MissingPDFException =
   689              t.MAX_IMAGE_SIZE_TO_CACHE =
   690              t.LINE_FACTOR =
   691              t.LINE_DESCENT_FACTOR =
   692              t.InvalidPDFException =
   693              t.ImageKind =
   694              t.IDENTITY_MATRIX =
   695              t.FormatError =
   696              t.FeatureTest =
   697              t.FONT_IDENTITY_MATRIX =
   698              t.DocumentActionEventType =
   699              t.CMapCompressionType =
   700              t.BaseException =
   701              t.BASELINE_FACTOR =
   702              t.AnnotationType =
   703              t.AnnotationReplyType =
   704              t.AnnotationPrefix =
   705              t.AnnotationMode =
   706              t.AnnotationFlag =
   707              t.AnnotationFieldFlag =
   708              t.AnnotationEditorType =
   709              t.AnnotationEditorPrefix =
   710              t.AnnotationEditorParamsType =
   711              t.AnnotationBorderStyleType =
   712              t.AnnotationActionEventType =
   713              t.AbortException =
   714                void 0;
   715            t.assert = function assert(e, t) {
   716              e || unreachable(t);
   717            };
   718            t.bytesToString = bytesToString;
   719            t.createValidAbsoluteUrl = function createValidAbsoluteUrl(
   720              e,
   721              t = null,
   722              a = null,
   723            ) {
   724              if (!e) return null;
   725              try {
   726                if (a && "string" == typeof e) {
   727                  if (a.addDefaultProtocol && e.startsWith("www.")) {
   728                    const t = e.match(/\./g);
   729                    t?.length >= 2 && (e = `http://${e}`);
   730                  }
   731                  if (a.tryConvertEncoding)
   732                    try {
   733                      e = stringToUTF8String(e);
   734                    } catch {}
   735                }
   736                const r = t ? new URL(e, t) : new URL(e);
   737                if (
   738                  (function _isValidProtocol(e) {
   739                    switch (e?.protocol) {
   740                      case "http:":
   741                      case "https:":
   742                      case "ftp:":
   743                      case "mailto:":
   744                      case "tel:":
   745                        return !0;
   746                      default:
   747                        return !1;
   748                    }
   749                  })(r)
   750                )
   751                  return r;
   752              } catch {}
   753              return null;
   754            };
   755            t.getModificationDate = function getModificationDate(e = new Date()) {
   756              return [
   757                e.getUTCFullYear().toString(),
   758                (e.getUTCMonth() + 1).toString().padStart(2, "0"),
   759                e.getUTCDate().toString().padStart(2, "0"),
   760                e.getUTCHours().toString().padStart(2, "0"),
   761                e.getUTCMinutes().toString().padStart(2, "0"),
   762                e.getUTCSeconds().toString().padStart(2, "0"),
   763              ].join("");
   764            };
   765            t.getUuid = function getUuid() {
   766              if (
   767                "undefined" != typeof crypto &&
   768                "function" == typeof crypto?.randomUUID
   769              )
   770                return crypto.randomUUID();
   771              const e = new Uint8Array(32);
   772              if (
   773                "undefined" != typeof crypto &&
   774                "function" == typeof crypto?.getRandomValues
   775              )
   776                crypto.getRandomValues(e);
   777              else
   778                for (let t = 0; t < 32; t++)
   779                  e[t] = Math.floor(255 * Math.random());
   780              return bytesToString(e);
   781            };
   782            t.getVerbosityLevel = function getVerbosityLevel() {
   783              return n;
   784            };
   785            t.info = function info(e) {
   786              n >= r.INFOS && console.log(`Info: ${e}`);
   787            };
   788            t.isArrayBuffer = function isArrayBuffer(e) {
   789              return "object" == typeof e && void 0 !== e?.byteLength;
   790            };
   791            t.isArrayEqual = function isArrayEqual(e, t) {
   792              if (e.length !== t.length) return !1;
   793              for (let a = 0, r = e.length; a < r; a++)
   794                if (e[a] !== t[a]) return !1;
   795              return !0;
   796            };
   797            t.isNodeJS = void 0;
   798            t.normalizeUnicode = function normalizeUnicode(e) {
   799              if (!c) {
   800                c =
   801                  /([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu;
   802                l = new Map([["ſt", "ſt"]]);
   803              }
   804              return e.replaceAll(c, (e, t, a) =>
   805                t ? t.normalize("NFKC") : l.get(a),
   806              );
   807            };
   808            t.objectFromMap = function objectFromMap(e) {
   809              const t = Object.create(null);
   810              for (const [a, r] of e) t[a] = r;
   811              return t;
   812            };
   813            t.objectSize = function objectSize(e) {
   814              return Object.keys(e).length;
   815            };
   816            t.setVerbosityLevel = function setVerbosityLevel(e) {
   817              Number.isInteger(e) && (n = e);
   818            };
   819            t.shadow = shadow;
   820            t.string32 = function string32(e) {
   821              return String.fromCharCode(
   822                (e >> 24) & 255,
   823                (e >> 16) & 255,
   824                (e >> 8) & 255,
   825                255 & e,
   826              );
   827            };
   828            t.stringToBytes = stringToBytes;
   829            t.stringToPDFString = function stringToPDFString(e) {
   830              if (e[0] >= "ï") {
   831                let t;
   832                "þ" === e[0] && "ÿ" === e[1]
   833                  ? (t = "utf-16be")
   834                  : "ÿ" === e[0] && "þ" === e[1]
   835                    ? (t = "utf-16le")
   836                    : "ï" === e[0] &&
   837                      "»" === e[1] &&
   838                      "¿" === e[2] &&
   839                      (t = "utf-8");
   840                if (t)
   841                  try {
   842                    const a = new TextDecoder(t, { fatal: !0 }),
   843                      r = stringToBytes(e);
   844                    return a.decode(r);
   845                  } catch (e) {
   846                    warn(`stringToPDFString: "${e}".`);
   847                  }
   848              }
   849              const t = [];
   850              for (let a = 0, r = e.length; a < r; a++) {
   851                const r = o[e.charCodeAt(a)];
   852                t.push(r ? String.fromCharCode(r) : e.charAt(a));
   853              }
   854              return t.join("");
   855            };
   856            t.stringToUTF8String = stringToUTF8String;
   857            t.unreachable = unreachable;
   858            t.utf8StringToString = function utf8StringToString(e) {
   859              return unescape(encodeURIComponent(e));
   860            };
   861            t.warn = warn;
   862            const a = !(
   863              "object" != typeof process ||
   864              process + "" != "[object process]" ||
   865              process.versions.nw ||
   866              (process.versions.electron &&
   867                process.type &&
   868                "browser" !== process.type)
   869            );
   870            t.isNodeJS = a;
   871            t.IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];
   872            t.FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];
   873            t.MAX_IMAGE_SIZE_TO_CACHE = 1e7;
   874            t.LINE_FACTOR = 1.35;
   875            t.LINE_DESCENT_FACTOR = 0.35;
   876            t.BASELINE_FACTOR = 0.25925925925925924;
   877            t.RenderingIntentFlag = {
   878              ANY: 1,
   879              DISPLAY: 2,
   880              PRINT: 4,
   881              SAVE: 8,
   882              ANNOTATIONS_FORMS: 16,
   883              ANNOTATIONS_STORAGE: 32,
   884              ANNOTATIONS_DISABLE: 64,
   885              OPLIST: 256,
   886            };
   887            t.AnnotationMode = {
   888              DISABLE: 0,
   889              ENABLE: 1,
   890              ENABLE_FORMS: 2,
   891              ENABLE_STORAGE: 3,
   892            };
   893            t.AnnotationEditorPrefix = "pdfjs_internal_editor_";
   894            t.AnnotationEditorType = {
   895              DISABLE: -1,
   896              NONE: 0,
   897              FREETEXT: 3,
   898              STAMP: 13,
   899              INK: 15,
   900            };
   901            t.AnnotationEditorParamsType = {
   902              RESIZE: 1,
   903              CREATE: 2,
   904              FREETEXT_SIZE: 11,
   905              FREETEXT_COLOR: 12,
   906              FREETEXT_OPACITY: 13,
   907              INK_COLOR: 21,
   908              INK_THICKNESS: 22,
   909              INK_OPACITY: 23,
   910            };
   911            t.PermissionFlag = {
   912              PRINT: 4,
   913              MODIFY_CONTENTS: 8,
   914              COPY: 16,
   915              MODIFY_ANNOTATIONS: 32,
   916              FILL_INTERACTIVE_FORMS: 256,
   917              COPY_FOR_ACCESSIBILITY: 512,
   918              ASSEMBLE: 1024,
   919              PRINT_HIGH_QUALITY: 2048,
   920            };
   921            t.TextRenderingMode = {
   922              FILL: 0,
   923              STROKE: 1,
   924              FILL_STROKE: 2,
   925              INVISIBLE: 3,
   926              FILL_ADD_TO_PATH: 4,
   927              STROKE_ADD_TO_PATH: 5,
   928              FILL_STROKE_ADD_TO_PATH: 6,
   929              ADD_TO_PATH: 7,
   930              FILL_STROKE_MASK: 3,
   931              ADD_TO_PATH_FLAG: 4,
   932            };
   933            t.ImageKind = { GRAYSCALE_1BPP: 1, RGB_24BPP: 2, RGBA_32BPP: 3 };
   934            t.AnnotationType = {
   935              TEXT: 1,
   936              LINK: 2,
   937              FREETEXT: 3,
   938              LINE: 4,
   939              SQUARE: 5,
   940              CIRCLE: 6,
   941              POLYGON: 7,
   942              POLYLINE: 8,
   943              HIGHLIGHT: 9,
   944              UNDERLINE: 10,
   945              SQUIGGLY: 11,
   946              STRIKEOUT: 12,
   947              STAMP: 13,
   948              CARET: 14,
   949              INK: 15,
   950              POPUP: 16,
   951              FILEATTACHMENT: 17,
   952              SOUND: 18,
   953              MOVIE: 19,
   954              WIDGET: 20,
   955              SCREEN: 21,
   956              PRINTERMARK: 22,
   957              TRAPNET: 23,
   958              WATERMARK: 24,
   959              THREED: 25,
   960              REDACT: 26,
   961            };
   962            t.AnnotationReplyType = { GROUP: "Group", REPLY: "R" };
   963            t.AnnotationFlag = {
   964              INVISIBLE: 1,
   965              HIDDEN: 2,
   966              PRINT: 4,
   967              NOZOOM: 8,
   968              NOROTATE: 16,
   969              NOVIEW: 32,
   970              READONLY: 64,
   971              LOCKED: 128,
   972              TOGGLENOVIEW: 256,
   973              LOCKEDCONTENTS: 512,
   974            };
   975            t.AnnotationFieldFlag = {
   976              READONLY: 1,
   977              REQUIRED: 2,
   978              NOEXPORT: 4,
   979              MULTILINE: 4096,
   980              PASSWORD: 8192,
   981              NOTOGGLETOOFF: 16384,
   982              RADIO: 32768,
   983              PUSHBUTTON: 65536,
   984              COMBO: 131072,
   985              EDIT: 262144,
   986              SORT: 524288,
   987              FILESELECT: 1048576,
   988              MULTISELECT: 2097152,
   989              DONOTSPELLCHECK: 4194304,
   990              DONOTSCROLL: 8388608,
   991              COMB: 16777216,
   992              RICHTEXT: 33554432,
   993              RADIOSINUNISON: 33554432,
   994              COMMITONSELCHANGE: 67108864,
   995            };
   996            t.AnnotationBorderStyleType = {
   997              SOLID: 1,
   998              DASHED: 2,
   999              BEVELED: 3,
  1000              INSET: 4,
  1001              UNDERLINE: 5,
  1002            };
  1003            t.AnnotationActionEventType = {
  1004              E: "Mouse Enter",
  1005              X: "Mouse Exit",
  1006              D: "Mouse Down",
  1007              U: "Mouse Up",
  1008              Fo: "Focus",
  1009              Bl: "Blur",
  1010              PO: "PageOpen",
  1011              PC: "PageClose",
  1012              PV: "PageVisible",
  1013              PI: "PageInvisible",
  1014              K: "Keystroke",
  1015              F: "Format",
  1016              V: "Validate",
  1017              C: "Calculate",
  1018            };
  1019            t.DocumentActionEventType = {
  1020              WC: "WillClose",
  1021              WS: "WillSave",
  1022              DS: "DidSave",
  1023              WP: "WillPrint",
  1024              DP: "DidPrint",
  1025            };
  1026            t.PageActionEventType = { O: "PageOpen", C: "PageClose" };
  1027            const r = { ERRORS: 0, WARNINGS: 1, INFOS: 5 };
  1028            t.VerbosityLevel = r;
  1029            t.CMapCompressionType = { NONE: 0, BINARY: 1 };
  1030            t.OPS = {
  1031              dependency: 1,
  1032              setLineWidth: 2,
  1033              setLineCap: 3,
  1034              setLineJoin: 4,
  1035              setMiterLimit: 5,
  1036              setDash: 6,
  1037              setRenderingIntent: 7,
  1038              setFlatness: 8,
  1039              setGState: 9,
  1040              save: 10,
  1041              restore: 11,
  1042              transform: 12,
  1043              moveTo: 13,
  1044              lineTo: 14,
  1045              curveTo: 15,
  1046              curveTo2: 16,
  1047              curveTo3: 17,
  1048              closePath: 18,
  1049              rectangle: 19,
  1050              stroke: 20,
  1051              closeStroke: 21,
  1052              fill: 22,
  1053              eoFill: 23,
  1054              fillStroke: 24,
  1055              eoFillStroke: 25,
  1056              closeFillStroke: 26,
  1057              closeEOFillStroke: 27,
  1058              endPath: 28,
  1059              clip: 29,
  1060              eoClip: 30,
  1061              beginText: 31,
  1062              endText: 32,
  1063              setCharSpacing: 33,
  1064              setWordSpacing: 34,
  1065              setHScale: 35,
  1066              setLeading: 36,
  1067              setFont: 37,
  1068              setTextRenderingMode: 38,
  1069              setTextRise: 39,
  1070              moveText: 40,
  1071              setLeadingMoveText: 41,
  1072              setTextMatrix: 42,
  1073              nextLine: 43,
  1074              showText: 44,
  1075              showSpacedText: 45,
  1076              nextLineShowText: 46,
  1077              nextLineSetSpacingShowText: 47,
  1078              setCharWidth: 48,
  1079              setCharWidthAndBounds: 49,
  1080              setStrokeColorSpace: 50,
  1081              setFillColorSpace: 51,
  1082              setStrokeColor: 52,
  1083              setStrokeColorN: 53,
  1084              setFillColor: 54,
  1085              setFillColorN: 55,
  1086              setStrokeGray: 56,
  1087              setFillGray: 57,
  1088              setStrokeRGBColor: 58,
  1089              setFillRGBColor: 59,
  1090              setStrokeCMYKColor: 60,
  1091              setFillCMYKColor: 61,
  1092              shadingFill: 62,
  1093              beginInlineImage: 63,
  1094              beginImageData: 64,
  1095              endInlineImage: 65,
  1096              paintXObject: 66,
  1097              markPoint: 67,
  1098              markPointProps: 68,
  1099              beginMarkedContent: 69,
  1100              beginMarkedContentProps: 70,
  1101              endMarkedContent: 71,
  1102              beginCompat: 72,
  1103              endCompat: 73,
  1104              paintFormXObjectBegin: 74,
  1105              paintFormXObjectEnd: 75,
  1106              beginGroup: 76,
  1107              endGroup: 77,
  1108              beginAnnotation: 80,
  1109              endAnnotation: 81,
  1110              paintImageMaskXObject: 83,
  1111              paintImageMaskXObjectGroup: 84,
  1112              paintImageXObject: 85,
  1113              paintInlineImageXObject: 86,
  1114              paintInlineImageXObjectGroup: 87,
  1115              paintImageXObjectRepeat: 88,
  1116              paintImageMaskXObjectRepeat: 89,
  1117              paintSolidColorImageMask: 90,
  1118              constructPath: 91,
  1119            };
  1120            t.PasswordResponses = { NEED_PASSWORD: 1, INCORRECT_PASSWORD: 2 };
  1121            let n = r.WARNINGS;
  1122            function warn(e) {
  1123              n >= r.WARNINGS && console.log(`Warning: ${e}`);
  1124            }
  1125            function unreachable(e) {
  1126              throw new Error(e);
  1127            }
  1128            function shadow(e, t, a, r = !1) {
  1129              Object.defineProperty(e, t, {
  1130                value: a,
  1131                enumerable: !r,
  1132                configurable: !0,
  1133                writable: !1,
  1134              });
  1135              return a;
  1136            }
  1137            const i = (function BaseExceptionClosure() {
  1138              function BaseException(e, t) {
  1139                this.constructor === BaseException &&
  1140                  unreachable("Cannot initialize BaseException.");
  1141                this.message = e;
  1142                this.name = t;
  1143              }
  1144              BaseException.prototype = new Error();
  1145              BaseException.constructor = BaseException;
  1146              return BaseException;
  1147            })();
  1148            t.BaseException = i;
  1149            t.PasswordException = class PasswordException extends i {
  1150              constructor(e, t) {
  1151                super(e, "PasswordException");
  1152                this.code = t;
  1153              }
  1154            };
  1155            t.UnknownErrorException = class UnknownErrorException extends i {
  1156              constructor(e, t) {
  1157                super(e, "UnknownErrorException");
  1158                this.details = t;
  1159              }
  1160            };
  1161            t.InvalidPDFException = class InvalidPDFException extends i {
  1162              constructor(e) {
  1163                super(e, "InvalidPDFException");
  1164              }
  1165            };
  1166            t.MissingPDFException = class MissingPDFException extends i {
  1167              constructor(e) {
  1168                super(e, "MissingPDFException");
  1169              }
  1170            };
  1171            t.UnexpectedResponseException = class UnexpectedResponseException extends (
  1172              i
  1173            ) {
  1174              constructor(e, t) {
  1175                super(e, "UnexpectedResponseException");
  1176                this.status = t;
  1177              }
  1178            };
  1179            t.FormatError = class FormatError extends i {
  1180              constructor(e) {
  1181                super(e, "FormatError");
  1182              }
  1183            };
  1184            t.AbortException = class AbortException extends i {
  1185              constructor(e) {
  1186                super(e, "AbortException");
  1187              }
  1188            };
  1189            function bytesToString(e) {
  1190              ("object" == typeof e && void 0 !== e?.length) ||
  1191                unreachable("Invalid argument for bytesToString");
  1192              const t = e.length,
  1193                a = 8192;
  1194              if (t < a) return String.fromCharCode.apply(null, e);
  1195              const r = [];
  1196              for (let n = 0; n < t; n += a) {
  1197                const i = Math.min(n + a, t),
  1198                  s = e.subarray(n, i);
  1199                r.push(String.fromCharCode.apply(null, s));
  1200              }
  1201              return r.join("");
  1202            }
  1203            function stringToBytes(e) {
  1204              "string" != typeof e &&
  1205                unreachable("Invalid argument for stringToBytes");
  1206              const t = e.length,
  1207                a = new Uint8Array(t);
  1208              for (let r = 0; r < t; ++r) a[r] = 255 & e.charCodeAt(r);
  1209              return a;
  1210            }
  1211            t.FeatureTest = class FeatureTest {
  1212              static get isLittleEndian() {
  1213                return shadow(
  1214                  this,
  1215                  "isLittleEndian",
  1216                  (function isLittleEndian() {
  1217                    const e = new Uint8Array(4);
  1218                    e[0] = 1;
  1219                    return 1 === new Uint32Array(e.buffer, 0, 1)[0];
  1220                  })(),
  1221                );
  1222              }
  1223              static get isEvalSupported() {
  1224                return shadow(
  1225                  this,
  1226                  "isEvalSupported",
  1227                  (function isEvalSupported() {
  1228                    try {
  1229                      new Function("");
  1230                      return !0;
  1231                    } catch {
  1232                      return !1;
  1233                    }
  1234                  })(),
  1235                );
  1236              }
  1237              static get isOffscreenCanvasSupported() {
  1238                return shadow(
  1239                  this,
  1240                  "isOffscreenCanvasSupported",
  1241                  "undefined" != typeof OffscreenCanvas,
  1242                );
  1243              }
  1244              static get platform() {
  1245                return "undefined" == typeof navigator
  1246                  ? shadow(this, "platform", { isWin: !1, isMac: !1 })
  1247                  : shadow(this, "platform", {
  1248                      isWin: navigator.platform.includes("Win"),
  1249                      isMac: navigator.platform.includes("Mac"),
  1250                    });
  1251              }
  1252              static get isCSSRoundSupported() {
  1253                return shadow(
  1254                  this,
  1255                  "isCSSRoundSupported",
  1256                  globalThis.CSS?.supports?.("width: round(1.5px, 1px)"),
  1257                );
  1258              }
  1259            };
  1260            const s = [...Array(256).keys()].map((e) =>
  1261              e.toString(16).padStart(2, "0"),
  1262            );
  1263            t.Util = class Util {
  1264              static makeHexColor(e, t, a) {
  1265                return `#${s[e]}${s[t]}${s[a]}`;
  1266              }
  1267              static scaleMinMax(e, t) {
  1268                let a;
  1269                if (e[0]) {
  1270                  if (e[0] < 0) {
  1271                    a = t[0];
  1272                    t[0] = t[1];
  1273                    t[1] = a;
  1274                  }
  1275                  t[0] *= e[0];
  1276                  t[1] *= e[0];
  1277                  if (e[3] < 0) {
  1278                    a = t[2];
  1279                    t[2] = t[3];
  1280                    t[3] = a;
  1281                  }
  1282                  t[2] *= e[3];
  1283                  t[3] *= e[3];
  1284                } else {
  1285                  a = t[0];
  1286                  t[0] = t[2];
  1287                  t[2] = a;
  1288                  a = t[1];
  1289                  t[1] = t[3];
  1290                  t[3] = a;
  1291                  if (e[1] < 0) {
  1292                    a = t[2];
  1293                    t[2] = t[3];
  1294                    t[3] = a;
  1295                  }
  1296                  t[2] *= e[1];
  1297                  t[3] *= e[1];
  1298                  if (e[2] < 0) {
  1299                    a = t[0];
  1300                    t[0] = t[1];
  1301                    t[1] = a;
  1302                  }
  1303                  t[0] *= e[2];
  1304                  t[1] *= e[2];
  1305                }
  1306                t[0] += e[4];
  1307                t[1] += e[4];
  1308                t[2] += e[5];
  1309                t[3] += e[5];
  1310              }
  1311              static transform(e, t) {
  1312                return [
  1313                  e[0] * t[0] + e[2] * t[1],
  1314                  e[1] * t[0] + e[3] * t[1],
  1315                  e[0] * t[2] + e[2] * t[3],
  1316                  e[1] * t[2] + e[3] * t[3],
  1317                  e[0] * t[4] + e[2] * t[5] + e[4],
  1318                  e[1] * t[4] + e[3] * t[5] + e[5],
  1319                ];
  1320              }
  1321              static applyTransform(e, t) {
  1322                return [
  1323                  e[0] * t[0] + e[1] * t[2] + t[4],
  1324                  e[0] * t[1] + e[1] * t[3] + t[5],
  1325                ];
  1326              }
  1327              static applyInverseTransform(e, t) {
  1328                const a = t[0] * t[3] - t[1] * t[2];
  1329                return [
  1330                  (e[0] * t[3] - e[1] * t[2] + t[2] * t[5] - t[4] * t[3]) / a,
  1331                  (-e[0] * t[1] + e[1] * t[0] + t[4] * t[1] - t[5] * t[0]) / a,
  1332                ];
  1333              }
  1334              static getAxialAlignedBoundingBox(e, t) {
  1335                const a = this.applyTransform(e, t),
  1336                  r = this.applyTransform(e.slice(2, 4), t),
  1337                  n = this.applyTransform([e[0], e[3]], t),
  1338                  i = this.applyTransform([e[2], e[1]], t);
  1339                return [
  1340                  Math.min(a[0], r[0], n[0], i[0]),
  1341                  Math.min(a[1], r[1], n[1], i[1]),
  1342                  Math.max(a[0], r[0], n[0], i[0]),
  1343                  Math.max(a[1], r[1], n[1], i[1]),
  1344                ];
  1345              }
  1346              static inverseTransform(e) {
  1347                const t = e[0] * e[3] - e[1] * e[2];
  1348                return [
  1349                  e[3] / t,
  1350                  -e[1] / t,
  1351                  -e[2] / t,
  1352                  e[0] / t,
  1353                  (e[2] * e[5] - e[4] * e[3]) / t,
  1354                  (e[4] * e[1] - e[5] * e[0]) / t,
  1355                ];
  1356              }
  1357              static singularValueDecompose2dScale(e) {
  1358                const t = [e[0], e[2], e[1], e[3]],
  1359                  a = e[0] * t[0] + e[1] * t[2],
  1360                  r = e[0] * t[1] + e[1] * t[3],
  1361                  n = e[2] * t[0] + e[3] * t[2],
  1362                  i = e[2] * t[1] + e[3] * t[3],
  1363                  s = (a + i) / 2,
  1364                  o = Math.sqrt((a + i) ** 2 - 4 * (a * i - n * r)) / 2,
  1365                  c = s + o || 1,
  1366                  l = s - o || 1;
  1367                return [Math.sqrt(c), Math.sqrt(l)];
  1368              }
  1369              static normalizeRect(e) {
  1370                const t = e.slice(0);
  1371                if (e[0] > e[2]) {
  1372                  t[0] = e[2];
  1373                  t[2] = e[0];
  1374                }
  1375                if (e[1] > e[3]) {
  1376                  t[1] = e[3];
  1377                  t[3] = e[1];
  1378                }
  1379                return t;
  1380              }
  1381              static intersect(e, t) {
  1382                const a = Math.max(Math.min(e[0], e[2]), Math.min(t[0], t[2])),
  1383                  r = Math.min(Math.max(e[0], e[2]), Math.max(t[0], t[2]));
  1384                if (a > r) return null;
  1385                const n = Math.max(Math.min(e[1], e[3]), Math.min(t[1], t[3])),
  1386                  i = Math.min(Math.max(e[1], e[3]), Math.max(t[1], t[3]));
  1387                return n > i ? null : [a, n, r, i];
  1388              }
  1389              static bezierBoundingBox(e, t, a, r, n, i, s, o) {
  1390                const c = [],
  1391                  l = [[], []];
  1392                let h, u, d, f, g, p, m, b;
  1393                for (let l = 0; l < 2; ++l) {
  1394                  if (0 === l) {
  1395                    u = 6 * e - 12 * a + 6 * n;
  1396                    h = -3 * e + 9 * a - 9 * n + 3 * s;
  1397                    d = 3 * a - 3 * e;
  1398                  } else {
  1399                    u = 6 * t - 12 * r + 6 * i;
  1400                    h = -3 * t + 9 * r - 9 * i + 3 * o;
  1401                    d = 3 * r - 3 * t;
  1402                  }
  1403                  if (Math.abs(h) < 1e-12) {
  1404                    if (Math.abs(u) < 1e-12) continue;
  1405                    f = -d / u;
  1406                    0 < f && f < 1 && c.push(f);
  1407                  } else {
  1408                    m = u * u - 4 * d * h;
  1409                    b = Math.sqrt(m);
  1410                    if (!(m < 0)) {
  1411                      g = (-u + b) / (2 * h);
  1412                      0 < g && g < 1 && c.push(g);
  1413                      p = (-u - b) / (2 * h);
  1414                      0 < p && p < 1 && c.push(p);
  1415                    }
  1416                  }
  1417                }
  1418                let y,
  1419                  w = c.length;
  1420                const S = w;
  1421                for (; w--; ) {
  1422                  f = c[w];
  1423                  y = 1 - f;
  1424                  l[0][w] =
  1425                    y * y * y * e +
  1426                    3 * y * y * f * a +
  1427                    3 * y * f * f * n +
  1428                    f * f * f * s;
  1429                  l[1][w] =
  1430                    y * y * y * t +
  1431                    3 * y * y * f * r +
  1432                    3 * y * f * f * i +
  1433                    f * f * f * o;
  1434                }
  1435                l[0][S] = e;
  1436                l[1][S] = t;
  1437                l[0][S + 1] = s;
  1438                l[1][S + 1] = o;
  1439                l[0].length = l[1].length = S + 2;
  1440                return [
  1441                  Math.min(...l[0]),
  1442                  Math.min(...l[1]),
  1443                  Math.max(...l[0]),
  1444                  Math.max(...l[1]),
  1445                ];
  1446              }
  1447            };
  1448            const o = [
  1449              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1450              0, 728, 711, 710, 729, 733, 731, 730, 732, 0, 0, 0, 0, 0, 0, 0, 0,
  1451              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1452              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1453              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1454              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8226, 8224,
  1455              8225, 8230, 8212, 8211, 402, 8260, 8249, 8250, 8722, 8240, 8222,
  1456              8220, 8221, 8216, 8217, 8218, 8482, 64257, 64258, 321, 338, 352,
  1457              376, 381, 305, 322, 339, 353, 382, 0, 8364,
  1458            ];
  1459            function stringToUTF8String(e) {
  1460              return decodeURIComponent(escape(e));
  1461            }
  1462            t.PromiseCapability = class PromiseCapability {
  1463              #e = !1;
  1464              constructor() {
  1465                this.promise = new Promise((e, t) => {
  1466                  this.resolve = (t) => {
  1467                    this.#e = !0;
  1468                    e(t);
  1469                  };
  1470                  this.reject = (e) => {
  1471                    this.#e = !0;
  1472                    t(e);
  1473                  };
  1474                });
  1475              }
  1476              get settled() {
  1477                return this.#e;
  1478              }
  1479            };
  1480            let c = null,
  1481              l = null;
  1482            t.AnnotationPrefix = "pdfjs_internal_id_";
  1483          },
  1484          (e, t, a) => {
  1485            Object.defineProperty(t, "__esModule", { value: !0 });
  1486            t.XRefParseException =
  1487              t.XRefEntryException =
  1488              t.ParserEOFException =
  1489              t.PDF_VERSION_REGEXP =
  1490              t.MissingDataException =
  1491                void 0;
  1492            t.arrayBuffersToBytes = function arrayBuffersToBytes(e) {
  1493              const t = e.length;
  1494              if (0 === t) return new Uint8Array(0);
  1495              if (1 === t) return new Uint8Array(e[0]);
  1496              let a = 0;
  1497              for (let r = 0; r < t; r++) a += e[r].byteLength;
  1498              const r = new Uint8Array(a);
  1499              let n = 0;
  1500              for (let a = 0; a < t; a++) {
  1501                const t = new Uint8Array(e[a]);
  1502                r.set(t, n);
  1503                n += t.byteLength;
  1504              }
  1505              return r;
  1506            };
  1507            t.collectActions = function collectActions(e, t, a) {
  1508              const i = Object.create(null),
  1509                s = getInheritableProperty({
  1510                  dict: t,
  1511                  key: "AA",
  1512                  stopWhenFound: !1,
  1513                });
  1514              if (s)
  1515                for (let t = s.length - 1; t >= 0; t--) {
  1516                  const r = s[t];
  1517                  if (r instanceof n.Dict)
  1518                    for (const t of r.getKeys()) {
  1519                      const s = a[t];
  1520                      if (!s) continue;
  1521                      const o = [];
  1522                      _collectJS(r.getRaw(t), e, o, new n.RefSet());
  1523                      o.length > 0 && (i[s] = o);
  1524                    }
  1525                }
  1526              if (t.has("A")) {
  1527                const a = [];
  1528                _collectJS(t.get("A"), e, a, new n.RefSet());
  1529                a.length > 0 && (i.Action = a);
  1530              }
  1531              return (0, r.objectSize)(i) > 0 ? i : null;
  1532            };
  1533            t.encodeToXmlString = function encodeToXmlString(e) {
  1534              const t = [];
  1535              let a = 0;
  1536              for (let r = 0, n = e.length; r < n; r++) {
  1537                const n = e.codePointAt(r);
  1538                if (32 <= n && n <= 126) {
  1539                  const i = o[n];
  1540                  if (i) {
  1541                    a < r && t.push(e.substring(a, r));
  1542                    t.push(i);
  1543                    a = r + 1;
  1544                  }
  1545                } else {
  1546                  a < r && t.push(e.substring(a, r));
  1547                  t.push(`&#x${n.toString(16).toUpperCase()};`);
  1548                  n > 55295 && (n < 57344 || n > 65533) && r++;
  1549                  a = r + 1;
  1550                }
  1551              }
  1552              if (0 === t.length) return e;
  1553              a < e.length && t.push(e.substring(a, e.length));
  1554              return t.join("");
  1555            };
  1556            t.escapePDFName = function escapePDFName(e) {
  1557              const t = [];
  1558              let a = 0;
  1559              for (let r = 0, n = e.length; r < n; r++) {
  1560                const n = e.charCodeAt(r);
  1561                if (
  1562                  n < 33 ||
  1563                  n > 126 ||
  1564                  35 === n ||
  1565                  40 === n ||
  1566                  41 === n ||
  1567                  60 === n ||
  1568                  62 === n ||
  1569                  91 === n ||
  1570                  93 === n ||
  1571                  123 === n ||
  1572                  125 === n ||
  1573                  47 === n ||
  1574                  37 === n
  1575                ) {
  1576                  a < r && t.push(e.substring(a, r));
  1577                  t.push(`#${n.toString(16)}`);
  1578                  a = r + 1;
  1579                }
  1580              }
  1581              if (0 === t.length) return e;
  1582              a < e.length && t.push(e.substring(a, e.length));
  1583              return t.join("");
  1584            };
  1585            t.escapeString = function escapeString(e) {
  1586              return e.replaceAll(/([()\\\n\r])/g, (e) =>
  1587                "\n" === e ? "\\n" : "\r" === e ? "\\r" : `\\${e}`,
  1588              );
  1589            };
  1590            t.getInheritableProperty = getInheritableProperty;
  1591            t.getLookupTableFactory = function getLookupTableFactory(e) {
  1592              let t;
  1593              return function () {
  1594                if (e) {
  1595                  t = Object.create(null);
  1596                  e(t);
  1597                  e = null;
  1598                }
  1599                return t;
  1600              };
  1601            };
  1602            t.getNewAnnotationsMap = function getNewAnnotationsMap(e) {
  1603              if (!e) return null;
  1604              const t = new Map();
  1605              for (const [a, n] of e) {
  1606                if (!a.startsWith(r.AnnotationEditorPrefix)) continue;
  1607                let e = t.get(n.pageIndex);
  1608                if (!e) {
  1609                  e = [];
  1610                  t.set(n.pageIndex, e);
  1611                }
  1612                e.push(n);
  1613              }
  1614              return t.size > 0 ? t : null;
  1615            };
  1616            t.getRotationMatrix = function getRotationMatrix(e, t, a) {
  1617              switch (e) {
  1618                case 90:
  1619                  return [0, 1, -1, 0, t, 0];
  1620                case 180:
  1621                  return [-1, 0, 0, -1, t, a];
  1622                case 270:
  1623                  return [0, -1, 1, 0, 0, a];
  1624                default:
  1625                  throw new Error("Invalid rotation");
  1626              }
  1627            };
  1628            t.isAscii = function isAscii(e) {
  1629              return /^[\x00-\x7F]*$/.test(e);
  1630            };
  1631            t.isWhiteSpace = function isWhiteSpace(e) {
  1632              return 32 === e || 9 === e || 13 === e || 10 === e;
  1633            };
  1634            t.log2 = function log2(e) {
  1635              if (e <= 0) return 0;
  1636              return Math.ceil(Math.log2(e));
  1637            };
  1638            t.numberToString = function numberToString(e) {
  1639              if (Number.isInteger(e)) return e.toString();
  1640              const t = Math.round(100 * e);
  1641              if (t % 100 == 0) return (t / 100).toString();
  1642              if (t % 10 == 0) return e.toFixed(1);
  1643              return e.toFixed(2);
  1644            };
  1645            t.parseXFAPath = function parseXFAPath(e) {
  1646              const t = /(.+)\[(\d+)\]$/;
  1647              return e.split(".").map((e) => {
  1648                const a = e.match(t);
  1649                return a
  1650                  ? { name: a[1], pos: parseInt(a[2], 10) }
  1651                  : { name: e, pos: 0 };
  1652              });
  1653            };
  1654            t.readInt8 = function readInt8(e, t) {
  1655              return (e[t] << 24) >> 24;
  1656            };
  1657            t.readUint16 = function readUint16(e, t) {
  1658              return (e[t] << 8) | e[t + 1];
  1659            };
  1660            t.readUint32 = function readUint32(e, t) {
  1661              return (
  1662                ((e[t] << 24) | (e[t + 1] << 16) | (e[t + 2] << 8) | e[t + 3]) >>>
  1663                0
  1664              );
  1665            };
  1666            t.recoverJsURL = function recoverJsURL(e) {
  1667              const t = new RegExp(
  1668                "^\\s*(" +
  1669                  ["app.launchURL", "window.open", "xfa.host.gotoURL"]
  1670                    .join("|")
  1671                    .replaceAll(".", "\\.") +
  1672                  ")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))",
  1673                "i",
  1674              ).exec(e);
  1675              if (t?.[2]) {
  1676                const e = t[2];
  1677                let a = !1;
  1678                "true" === t[3] && "app.launchURL" === t[1] && (a = !0);
  1679                return { url: e, newWindow: a };
  1680              }
  1681              return null;
  1682            };
  1683            t.stringToUTF16HexString = function stringToUTF16HexString(e) {
  1684              const t = [];
  1685              for (let a = 0, r = e.length; a < r; a++) {
  1686                const r = e.charCodeAt(a);
  1687                t.push(
  1688                  ((r >> 8) & 255).toString(16).padStart(2, "0"),
  1689                  (255 & r).toString(16).padStart(2, "0"),
  1690                );
  1691              }
  1692              return t.join("");
  1693            };
  1694            t.stringToUTF16String = function stringToUTF16String(e, t = !1) {
  1695              const a = [];
  1696              t && a.push("þÿ");
  1697              for (let t = 0, r = e.length; t < r; t++) {
  1698                const r = e.charCodeAt(t);
  1699                a.push(
  1700                  String.fromCharCode((r >> 8) & 255),
  1701                  String.fromCharCode(255 & r),
  1702                );
  1703              }
  1704              return a.join("");
  1705            };
  1706            t.toRomanNumerals = function toRomanNumerals(e, t = !1) {
  1707              (0, r.assert)(
  1708                Number.isInteger(e) && e > 0,
  1709                "The number should be a positive integer.",
  1710              );
  1711              const a = [];
  1712              let n;
  1713              for (; e >= 1e3; ) {
  1714                e -= 1e3;
  1715                a.push("M");
  1716              }
  1717              n = (e / 100) | 0;
  1718              e %= 100;
  1719              a.push(s[n]);
  1720              n = (e / 10) | 0;
  1721              e %= 10;
  1722              a.push(s[10 + n]);
  1723              a.push(s[20 + e]);
  1724              const i = a.join("");
  1725              return t ? i.toLowerCase() : i;
  1726            };
  1727            t.validateCSSFont = function validateCSSFont(e) {
  1728              const t = new Set([
  1729                  "100",
  1730                  "200",
  1731                  "300",
  1732                  "400",
  1733                  "500",
  1734                  "600",
  1735                  "700",
  1736                  "800",
  1737                  "900",
  1738                  "1000",
  1739                  "normal",
  1740                  "bold",
  1741                  "bolder",
  1742                  "lighter",
  1743                ]),
  1744                { fontFamily: a, fontWeight: r, italicAngle: n } = e;
  1745              if (!validateFontName(a, !0)) return !1;
  1746              const i = r ? r.toString() : "";
  1747              e.fontWeight = t.has(i) ? i : "400";
  1748              const s = parseFloat(n);
  1749              e.italicAngle = isNaN(s) || s < -90 || s > 90 ? "14" : n.toString();
  1750              return !0;
  1751            };
  1752            t.validateFontName = validateFontName;
  1753            var r = a(2),
  1754              n = a(4),
  1755              i = a(5);
  1756            t.PDF_VERSION_REGEXP = /^[1-9]\.\d$/;
  1757            class MissingDataException extends r.BaseException {
  1758              constructor(e, t) {
  1759                super(`Missing data [${e}, ${t})`, "MissingDataException");
  1760                this.begin = e;
  1761                this.end = t;
  1762              }
  1763            }
  1764            t.MissingDataException = MissingDataException;
  1765            class ParserEOFException extends r.BaseException {
  1766              constructor(e) {
  1767                super(e, "ParserEOFException");
  1768              }
  1769            }
  1770            t.ParserEOFException = ParserEOFException;
  1771            class XRefEntryException extends r.BaseException {
  1772              constructor(e) {
  1773                super(e, "XRefEntryException");
  1774              }
  1775            }
  1776            t.XRefEntryException = XRefEntryException;
  1777            class XRefParseException extends r.BaseException {
  1778              constructor(e) {
  1779                super(e, "XRefParseException");
  1780              }
  1781            }
  1782            t.XRefParseException = XRefParseException;
  1783            function getInheritableProperty({
  1784              dict: e,
  1785              key: t,
  1786              getArray: a = !1,
  1787              stopWhenFound: r = !0,
  1788            }) {
  1789              let i;
  1790              const s = new n.RefSet();
  1791              for (; e instanceof n.Dict && (!e.objId || !s.has(e.objId)); ) {
  1792                e.objId && s.put(e.objId);
  1793                const n = a ? e.getArray(t) : e.get(t);
  1794                if (void 0 !== n) {
  1795                  if (r) return n;
  1796                  (i ||= []).push(n);
  1797                }
  1798                e = e.get("Parent");
  1799              }
  1800              return i;
  1801            }
  1802            const s = [
  1803              "",
  1804              "C",
  1805              "CC",
  1806              "CCC",
  1807              "CD",
  1808              "D",
  1809              "DC",
  1810              "DCC",
  1811              "DCCC",
  1812              "CM",
  1813              "",
  1814              "X",
  1815              "XX",
  1816              "XXX",
  1817              "XL",
  1818              "L",
  1819              "LX",
  1820              "LXX",
  1821              "LXXX",
  1822              "XC",
  1823              "",
  1824              "I",
  1825              "II",
  1826              "III",
  1827              "IV",
  1828              "V",
  1829              "VI",
  1830              "VII",
  1831              "VIII",
  1832              "IX",
  1833            ];
  1834            function _collectJS(e, t, a, s) {
  1835              if (!e) return;
  1836              let o = null;
  1837              if (e instanceof n.Ref) {
  1838                if (s.has(e)) return;
  1839                o = e;
  1840                s.put(o);
  1841                e = t.fetch(e);
  1842              }
  1843              if (Array.isArray(e)) for (const r of e) _collectJS(r, t, a, s);
  1844              else if (e instanceof n.Dict) {
  1845                if ((0, n.isName)(e.get("S"), "JavaScript")) {
  1846                  const t = e.get("JS");
  1847                  let n;
  1848                  t instanceof i.BaseStream
  1849                    ? (n = t.getString())
  1850                    : "string" == typeof t && (n = t);
  1851                  n &&= (0, r.stringToPDFString)(n).replaceAll("\0", "");
  1852                  n && a.push(n);
  1853                }
  1854                _collectJS(e.getRaw("Next"), t, a, s);
  1855              }
  1856              o && s.remove(o);
  1857            }
  1858            const o = {
  1859              60: "&lt;",
  1860              62: "&gt;",
  1861              38: "&amp;",
  1862              34: "&quot;",
  1863              39: "&apos;",
  1864            };
  1865            function validateFontName(e, t = !1) {
  1866              const a = /^("|').*("|')$/.exec(e);
  1867              if (a && a[1] === a[2]) {
  1868                if (new RegExp(`[^\\\\]${a[1]}`).test(e.slice(1, -1))) {
  1869                  t &&
  1870                    (0, r.warn)(`FontFamily contains unescaped ${a[1]}: ${e}.`);
  1871                  return !1;
  1872                }
  1873              } else
  1874                for (const a of e.split(/[ \t]+/))
  1875                  if (/^(\d|(-(\d|-)))/.test(a) || !/^[\w-\\]+$/.test(a)) {
  1876                    t &&
  1877                      (0, r.warn)(
  1878                        `FontFamily contains invalid <custom-ident>: ${e}.`,
  1879                      );
  1880                    return !1;
  1881                  }
  1882              return !0;
  1883            }
  1884          },
  1885          (e, t, a) => {
  1886            Object.defineProperty(t, "__esModule", { value: !0 });
  1887            t.RefSetCache =
  1888              t.RefSet =
  1889              t.Ref =
  1890              t.Name =
  1891              t.EOF =
  1892              t.Dict =
  1893              t.Cmd =
  1894              t.CIRCULAR_REF =
  1895                void 0;
  1896            t.clearPrimitiveCaches = function clearPrimitiveCaches() {
  1897              s = Object.create(null);
  1898              o = Object.create(null);
  1899              c = Object.create(null);
  1900            };
  1901            t.isCmd = function isCmd(e, t) {
  1902              return e instanceof Cmd && (void 0 === t || e.cmd === t);
  1903            };
  1904            t.isDict = function isDict(e, t) {
  1905              return (
  1906                e instanceof Dict && (void 0 === t || isName(e.get("Type"), t))
  1907              );
  1908            };
  1909            t.isName = isName;
  1910            t.isRefsEqual = function isRefsEqual(e, t) {
  1911              return e.num === t.num && e.gen === t.gen;
  1912            };
  1913            var r = a(2);
  1914            const n = Symbol("CIRCULAR_REF");
  1915            t.CIRCULAR_REF = n;
  1916            const i = Symbol("EOF");
  1917            t.EOF = i;
  1918            let s = Object.create(null),
  1919              o = Object.create(null),
  1920              c = Object.create(null);
  1921            class Name {
  1922              constructor(e) {
  1923                this.name = e;
  1924              }
  1925              static get(e) {
  1926                return (o[e] ||= new Name(e));
  1927              }
  1928            }
  1929            t.Name = Name;
  1930            class Cmd {
  1931              constructor(e) {
  1932                this.cmd = e;
  1933              }
  1934              static get(e) {
  1935                return (s[e] ||= new Cmd(e));
  1936              }
  1937            }
  1938            t.Cmd = Cmd;
  1939            const l = function nonSerializableClosure() {
  1940              return l;
  1941            };
  1942            class Dict {
  1943              constructor(e = null) {
  1944                this._map = Object.create(null);
  1945                this.xref = e;
  1946                this.objId = null;
  1947                this.suppressEncryption = !1;
  1948                this.__nonSerializable__ = l;
  1949              }
  1950              assignXref(e) {
  1951                this.xref = e;
  1952              }
  1953              get size() {
  1954                return Object.keys(this._map).length;
  1955              }
  1956              get(e, t, a) {
  1957                let r = this._map[e];
  1958                if (void 0 === r && void 0 !== t) {
  1959                  r = this._map[t];
  1960                  void 0 === r && void 0 !== a && (r = this._map[a]);
  1961                }
  1962                return r instanceof Ref && this.xref
  1963                  ? this.xref.fetch(r, this.suppressEncryption)
  1964                  : r;
  1965              }
  1966              async getAsync(e, t, a) {
  1967                let r = this._map[e];
  1968                if (void 0 === r && void 0 !== t) {
  1969                  r = this._map[t];
  1970                  void 0 === r && void 0 !== a && (r = this._map[a]);
  1971                }
  1972                return r instanceof Ref && this.xref
  1973                  ? this.xref.fetchAsync(r, this.suppressEncryption)
  1974                  : r;
  1975              }
  1976              getArray(e, t, a) {
  1977                let r = this._map[e];
  1978                if (void 0 === r && void 0 !== t) {
  1979                  r = this._map[t];
  1980                  void 0 === r && void 0 !== a && (r = this._map[a]);
  1981                }
  1982                r instanceof Ref &&
  1983                  this.xref &&
  1984                  (r = this.xref.fetch(r, this.suppressEncryption));
  1985                if (Array.isArray(r)) {
  1986                  r = r.slice();
  1987                  for (let e = 0, t = r.length; e < t; e++)
  1988                    r[e] instanceof Ref &&
  1989                      this.xref &&
  1990                      (r[e] = this.xref.fetch(r[e], this.suppressEncryption));
  1991                }
  1992                return r;
  1993              }
  1994              getRaw(e) {
  1995                return this._map[e];
  1996              }
  1997              getKeys() {
  1998                return Object.keys(this._map);
  1999              }
  2000              getRawValues() {
  2001                return Object.values(this._map);
  2002              }
  2003              set(e, t) {
  2004                this._map[e] = t;
  2005              }
  2006              has(e) {
  2007                return void 0 !== this._map[e];
  2008              }
  2009              forEach(e) {
  2010                for (const t in this._map) e(t, this.get(t));
  2011              }
  2012              static get empty() {
  2013                const e = new Dict(null);
  2014                e.set = (e, t) => {
  2015                  (0, r.unreachable)(
  2016                    "Should not call `set` on the empty dictionary.",
  2017                  );
  2018                };
  2019                return (0, r.shadow)(this, "empty", e);
  2020              }
  2021              static merge({ xref: e, dictArray: t, mergeSubDicts: a = !1 }) {
  2022                const r = new Dict(e),
  2023                  n = new Map();
  2024                for (const e of t)
  2025                  if (e instanceof Dict)
  2026                    for (const [t, r] of Object.entries(e._map)) {
  2027                      let e = n.get(t);
  2028                      if (void 0 === e) {
  2029                        e = [];
  2030                        n.set(t, e);
  2031                      } else if (!(a && r instanceof Dict)) continue;
  2032                      e.push(r);
  2033                    }
  2034                for (const [t, a] of n) {
  2035                  if (1 === a.length || !(a[0] instanceof Dict)) {
  2036                    r._map[t] = a[0];
  2037                    continue;
  2038                  }
  2039                  const n = new Dict(e);
  2040                  for (const e of a)
  2041                    for (const [t, a] of Object.entries(e._map))
  2042                      void 0 === n._map[t] && (n._map[t] = a);
  2043                  n.size > 0 && (r._map[t] = n);
  2044                }
  2045                n.clear();
  2046                return r.size > 0 ? r : Dict.empty;
  2047              }
  2048              clone() {
  2049                const e = new Dict(this.xref);
  2050                for (const t of this.getKeys()) e.set(t, this.getRaw(t));
  2051                return e;
  2052              }
  2053            }
  2054            t.Dict = Dict;
  2055            class Ref {
  2056              constructor(e, t) {
  2057                this.num = e;
  2058                this.gen = t;
  2059              }
  2060              toString() {
  2061                return 0 === this.gen
  2062                  ? `${this.num}R`
  2063                  : `${this.num}R${this.gen}`;
  2064              }
  2065              static fromString(e) {
  2066                const t = c[e];
  2067                if (t) return t;
  2068                const a = /^(\d+)R(\d*)$/.exec(e);
  2069                return a && "0" !== a[1]
  2070                  ? (c[e] = new Ref(parseInt(a[1]), a[2] ? parseInt(a[2]) : 0))
  2071                  : null;
  2072              }
  2073              static get(e, t) {
  2074                const a = 0 === t ? `${e}R` : `${e}R${t}`;
  2075                return (c[a] ||= new Ref(e, t));
  2076              }
  2077            }
  2078            t.Ref = Ref;
  2079            class RefSet {
  2080              constructor(e = null) {
  2081                this._set = new Set(e?._set);
  2082              }
  2083              has(e) {
  2084                return this._set.has(e.toString());
  2085              }
  2086              put(e) {
  2087                this._set.add(e.toString());
  2088              }
  2089              remove(e) {
  2090                this._set.delete(e.toString());
  2091              }
  2092              [Symbol.iterator]() {
  2093                return this._set.values();
  2094              }
  2095              clear() {
  2096                this._set.clear();
  2097              }
  2098            }
  2099            t.RefSet = RefSet;
  2100            class RefSetCache {
  2101              constructor() {
  2102                this._map = new Map();
  2103              }
  2104              get size() {
  2105                return this._map.size;
  2106              }
  2107              get(e) {
  2108                return this._map.get(e.toString());
  2109              }
  2110              has(e) {
  2111                return this._map.has(e.toString());
  2112              }
  2113              put(e, t) {
  2114                this._map.set(e.toString(), t);
  2115              }
  2116              putAlias(e, t) {
  2117                this._map.set(e.toString(), this.get(t));
  2118              }
  2119              [Symbol.iterator]() {
  2120                return this._map.values();
  2121              }
  2122              clear() {
  2123                this._map.clear();
  2124              }
  2125            }
  2126            t.RefSetCache = RefSetCache;
  2127            function isName(e, t) {
  2128              return e instanceof Name && (void 0 === t || e.name === t);
  2129            }
  2130          },
  2131          (e, t, a) => {
  2132            Object.defineProperty(t, "__esModule", { value: !0 });
  2133            t.BaseStream = void 0;
  2134            var r = a(2);
  2135            class BaseStream {
  2136              constructor() {
  2137                this.constructor === BaseStream &&
  2138                  (0, r.unreachable)("Cannot initialize BaseStream.");
  2139              }
  2140              get length() {
  2141                (0, r.unreachable)("Abstract getter `length` accessed");
  2142              }
  2143              get isEmpty() {
  2144                (0, r.unreachable)("Abstract getter `isEmpty` accessed");
  2145              }
  2146              get isDataLoaded() {
  2147                return (0, r.shadow)(this, "isDataLoaded", !0);
  2148              }
  2149              getByte() {
  2150                (0, r.unreachable)("Abstract method `getByte` called");
  2151              }
  2152              getBytes(e) {
  2153                (0, r.unreachable)("Abstract method `getBytes` called");
  2154              }
  2155              peekByte() {
  2156                const e = this.getByte();
  2157                -1 !== e && this.pos--;
  2158                return e;
  2159              }
  2160              peekBytes(e) {
  2161                const t = this.getBytes(e);
  2162                this.pos -= t.length;
  2163                return t;
  2164              }
  2165              getUint16() {
  2166                const e = this.getByte(),
  2167                  t = this.getByte();
  2168                return -1 === e || -1 === t ? -1 : (e << 8) + t;
  2169              }
  2170              getInt32() {
  2171                return (
  2172                  (this.getByte() << 24) +
  2173                  (this.getByte() << 16) +
  2174                  (this.getByte() << 8) +
  2175                  this.getByte()
  2176                );
  2177              }
  2178              getByteRange(e, t) {
  2179                (0, r.unreachable)("Abstract method `getByteRange` called");
  2180              }
  2181              getString(e) {
  2182                return (0, r.bytesToString)(this.getBytes(e));
  2183              }
  2184              skip(e) {
  2185                this.pos += e || 1;
  2186              }
  2187              reset() {
  2188                (0, r.unreachable)("Abstract method `reset` called");
  2189              }
  2190              moveStart() {
  2191                (0, r.unreachable)("Abstract method `moveStart` called");
  2192              }
  2193              makeSubStream(e, t, a = null) {
  2194                (0, r.unreachable)("Abstract method `makeSubStream` called");
  2195              }
  2196              getBaseStreams() {
  2197                return null;
  2198              }
  2199            }
  2200            t.BaseStream = BaseStream;
  2201          },
  2202          (e, t, a) => {
  2203            Object.defineProperty(t, "__esModule", { value: !0 });
  2204            t.NetworkPdfManager = t.LocalPdfManager = void 0;
  2205            var r = a(2),
  2206              n = a(7),
  2207              i = a(3),
  2208              s = a(9),
  2209              o = a(8);
  2210            class BasePdfManager {
  2211              constructor(e) {
  2212                this.constructor === BasePdfManager &&
  2213                  (0, r.unreachable)("Cannot initialize BasePdfManager.");
  2214                this._docBaseUrl = (function parseDocBaseUrl(e) {
  2215                  if (e) {
  2216                    const t = (0, r.createValidAbsoluteUrl)(e);
  2217                    if (t) return t.href;
  2218                    (0, r.warn)(`Invalid absolute docBaseUrl: "${e}".`);
  2219                  }
  2220                  return null;
  2221                })(e.docBaseUrl);
  2222                this._docId = e.docId;
  2223                this._password = e.password;
  2224                this.enableXfa = e.enableXfa;
  2225                e.evaluatorOptions.isOffscreenCanvasSupported &&=
  2226                  r.FeatureTest.isOffscreenCanvasSupported;
  2227                this.evaluatorOptions = e.evaluatorOptions;
  2228              }
  2229              get docId() {
  2230                return this._docId;
  2231              }
  2232              get password() {
  2233                return this._password;
  2234              }
  2235              get docBaseUrl() {
  2236                return this._docBaseUrl;
  2237              }
  2238              get catalog() {
  2239                return this.pdfDocument.catalog;
  2240              }
  2241              ensureDoc(e, t) {
  2242                return this.ensure(this.pdfDocument, e, t);
  2243              }
  2244              ensureXRef(e, t) {
  2245                return this.ensure(this.pdfDocument.xref, e, t);
  2246              }
  2247              ensureCatalog(e, t) {
  2248                return this.ensure(this.pdfDocument.catalog, e, t);
  2249              }
  2250              getPage(e) {
  2251                return this.pdfDocument.getPage(e);
  2252              }
  2253              fontFallback(e, t) {
  2254                return this.pdfDocument.fontFallback(e, t);
  2255              }
  2256              loadXfaFonts(e, t) {
  2257                return this.pdfDocument.loadXfaFonts(e, t);
  2258              }
  2259              loadXfaImages() {
  2260                return this.pdfDocument.loadXfaImages();
  2261              }
  2262              serializeXfaData(e) {
  2263                return this.pdfDocument.serializeXfaData(e);
  2264              }
  2265              cleanup(e = !1) {
  2266                return this.pdfDocument.cleanup(e);
  2267              }
  2268              async ensure(e, t, a) {
  2269                (0, r.unreachable)("Abstract method `ensure` called");
  2270              }
  2271              requestRange(e, t) {
  2272                (0, r.unreachable)("Abstract method `requestRange` called");
  2273              }
  2274              requestLoadedStream(e = !1) {
  2275                (0, r.unreachable)(
  2276                  "Abstract method `requestLoadedStream` called",
  2277                );
  2278              }
  2279              sendProgressiveData(e) {
  2280                (0, r.unreachable)(
  2281                  "Abstract method `sendProgressiveData` called",
  2282                );
  2283              }
  2284              updatePassword(e) {
  2285                this._password = e;
  2286              }
  2287              terminate(e) {
  2288                (0, r.unreachable)("Abstract method `terminate` called");
  2289              }
  2290            }
  2291            t.LocalPdfManager = class LocalPdfManager extends BasePdfManager {
  2292              constructor(e) {
  2293                super(e);
  2294                const t = new o.Stream(e.source);
  2295                this.pdfDocument = new s.PDFDocument(this, t);
  2296                this._loadedStreamPromise = Promise.resolve(t);
  2297              }
  2298              async ensure(e, t, a) {
  2299                const r = e[t];
  2300                return "function" == typeof r ? r.apply(e, a) : r;
  2301              }
  2302              requestRange(e, t) {
  2303                return Promise.resolve();
  2304              }
  2305              requestLoadedStream(e = !1) {
  2306                return this._loadedStreamPromise;
  2307              }
  2308              terminate(e) {}
  2309            };
  2310            t.NetworkPdfManager = class NetworkPdfManager extends BasePdfManager {
  2311              constructor(e) {
  2312                super(e);
  2313                this.streamManager = new n.ChunkedStreamManager(e.source, {
  2314                  msgHandler: e.handler,
  2315                  length: e.length,
  2316                  disableAutoFetch: e.disableAutoFetch,
  2317                  rangeChunkSize: e.rangeChunkSize,
  2318                });
  2319                this.pdfDocument = new s.PDFDocument(
  2320                  this,
  2321                  this.streamManager.getStream(),
  2322                );
  2323              }
  2324              async ensure(e, t, a) {
  2325                try {
  2326                  const r = e[t];
  2327                  return "function" == typeof r ? r.apply(e, a) : r;
  2328                } catch (r) {
  2329                  if (!(r instanceof i.MissingDataException)) throw r;
  2330                  await this.requestRange(r.begin, r.end);
  2331                  return this.ensure(e, t, a);
  2332                }
  2333              }
  2334              requestRange(e, t) {
  2335                return this.streamManager.requestRange(e, t);
  2336              }
  2337              requestLoadedStream(e = !1) {
  2338                return this.streamManager.requestAllChunks(e);
  2339              }
  2340              sendProgressiveData(e) {
  2341                this.streamManager.onReceiveData({ chunk: e });
  2342              }
  2343              terminate(e) {
  2344                this.streamManager.abort(e);
  2345              }
  2346            };
  2347          },
  2348          (e, t, a) => {
  2349            Object.defineProperty(t, "__esModule", { value: !0 });
  2350            t.ChunkedStreamManager = t.ChunkedStream = void 0;
  2351            var r = a(3),
  2352              n = a(2),
  2353              i = a(8);
  2354            class ChunkedStream extends i.Stream {
  2355              constructor(e, t, a) {
  2356                super(new Uint8Array(e), 0, e, null);
  2357                this.chunkSize = t;
  2358                this._loadedChunks = new Set();
  2359                this.numChunks = Math.ceil(e / t);
  2360                this.manager = a;
  2361                this.progressiveDataLength = 0;
  2362                this.lastSuccessfulEnsureByteChunk = -1;
  2363              }
  2364              getMissingChunks() {
  2365                const e = [];
  2366                for (let t = 0, a = this.numChunks; t < a; ++t)
  2367                  this._loadedChunks.has(t) || e.push(t);
  2368                return e;
  2369              }
  2370              get numChunksLoaded() {
  2371                return this._loadedChunks.size;
  2372              }
  2373              get isDataLoaded() {
  2374                return this.numChunksLoaded === this.numChunks;
  2375              }
  2376              onReceiveData(e, t) {
  2377                const a = this.chunkSize;
  2378                if (e % a != 0) throw new Error(`Bad begin offset: ${e}`);
  2379                const r = e + t.byteLength;
  2380                if (r % a != 0 && r !== this.bytes.length)
  2381                  throw new Error(`Bad end offset: ${r}`);
  2382                this.bytes.set(new Uint8Array(t), e);
  2383                const n = Math.floor(e / a),
  2384                  i = Math.floor((r - 1) / a) + 1;
  2385                for (let e = n; e < i; ++e) this._loadedChunks.add(e);
  2386              }
  2387              onReceiveProgressiveData(e) {
  2388                let t = this.progressiveDataLength;
  2389                const a = Math.floor(t / this.chunkSize);
  2390                this.bytes.set(new Uint8Array(e), t);
  2391                t += e.byteLength;
  2392                this.progressiveDataLength = t;
  2393                const r =
  2394                  t >= this.end ? this.numChunks : Math.floor(t / this.chunkSize);
  2395                for (let e = a; e < r; ++e) this._loadedChunks.add(e);
  2396              }
  2397              ensureByte(e) {
  2398                if (e < this.progressiveDataLength) return;
  2399                const t = Math.floor(e / this.chunkSize);
  2400                if (
  2401                  !(t > this.numChunks) &&
  2402                  t !== this.lastSuccessfulEnsureByteChunk
  2403                ) {
  2404                  if (!this._loadedChunks.has(t))
  2405                    throw new r.MissingDataException(e, e + 1);
  2406                  this.lastSuccessfulEnsureByteChunk = t;
  2407                }
  2408              }
  2409              ensureRange(e, t) {
  2410                if (e >= t) return;
  2411                if (t <= this.progressiveDataLength) return;
  2412                const a = Math.floor(e / this.chunkSize);
  2413                if (a > this.numChunks) return;
  2414                const n = Math.min(
  2415                  Math.floor((t - 1) / this.chunkSize) + 1,
  2416                  this.numChunks,
  2417                );
  2418                for (let i = a; i < n; ++i)
  2419                  if (!this._loadedChunks.has(i))
  2420                    throw new r.MissingDataException(e, t);
  2421              }
  2422              nextEmptyChunk(e) {
  2423                const t = this.numChunks;
  2424                for (let a = 0; a < t; ++a) {
  2425                  const r = (e + a) % t;
  2426                  if (!this._loadedChunks.has(r)) return r;
  2427                }
  2428                return null;
  2429              }
  2430              hasChunk(e) {
  2431                return this._loadedChunks.has(e);
  2432              }
  2433              getByte() {
  2434                const e = this.pos;
  2435                if (e >= this.end) return -1;
  2436                e >= this.progressiveDataLength && this.ensureByte(e);
  2437                return this.bytes[this.pos++];
  2438              }
  2439              getBytes(e) {
  2440                const t = this.bytes,
  2441                  a = this.pos,
  2442                  r = this.end;
  2443                if (!e) {
  2444                  r > this.progressiveDataLength && this.ensureRange(a, r);
  2445                  return t.subarray(a, r);
  2446                }
  2447                let n = a + e;
  2448                n > r && (n = r);
  2449                n > this.progressiveDataLength && this.ensureRange(a, n);
  2450                this.pos = n;
  2451                return t.subarray(a, n);
  2452              }
  2453              getByteRange(e, t) {
  2454                e < 0 && (e = 0);
  2455                t > this.end && (t = this.end);
  2456                t > this.progressiveDataLength && this.ensureRange(e, t);
  2457                return this.bytes.subarray(e, t);
  2458              }
  2459              makeSubStream(e, t, a = null) {
  2460                t
  2461                  ? e + t > this.progressiveDataLength &&
  2462                    this.ensureRange(e, e + t)
  2463                  : e >= this.progressiveDataLength && this.ensureByte(e);
  2464                function ChunkedStreamSubstream() {}
  2465                ChunkedStreamSubstream.prototype = Object.create(this);
  2466                ChunkedStreamSubstream.prototype.getMissingChunks = function () {
  2467                  const e = this.chunkSize,
  2468                    t = Math.floor(this.start / e),
  2469                    a = Math.floor((this.end - 1) / e) + 1,
  2470                    r = [];
  2471                  for (let e = t; e < a; ++e)
  2472                    this._loadedChunks.has(e) || r.push(e);
  2473                  return r;
  2474                };
  2475                Object.defineProperty(
  2476                  ChunkedStreamSubstream.prototype,
  2477                  "isDataLoaded",
  2478                  {
  2479                    get() {
  2480                      return (
  2481                        this.numChunksLoaded === this.numChunks ||
  2482                        0 === this.getMissingChunks().length
  2483                      );
  2484                    },
  2485                    configurable: !0,
  2486                  },
  2487                );
  2488                const r = new ChunkedStreamSubstream();
  2489                r.pos = r.start = e;
  2490                r.end = e + t || this.end;
  2491                r.dict = a;
  2492                return r;
  2493              }
  2494              getBaseStreams() {
  2495                return [this];
  2496              }
  2497            }
  2498            t.ChunkedStream = ChunkedStream;
  2499            t.ChunkedStreamManager = class ChunkedStreamManager {
  2500              constructor(e, t) {
  2501                this.length = t.length;
  2502                this.chunkSize = t.rangeChunkSize;
  2503                this.stream = new ChunkedStream(
  2504                  this.length,
  2505                  this.chunkSize,
  2506                  this,
  2507                );
  2508                this.pdfNetworkStream = e;
  2509                this.disableAutoFetch = t.disableAutoFetch;
  2510                this.msgHandler = t.msgHandler;
  2511                this.currRequestId = 0;
  2512                this._chunksNeededByRequest = new Map();
  2513                this._requestsByChunk = new Map();
  2514                this._promisesByRequest = new Map();
  2515                this.progressiveDataLength = 0;
  2516                this.aborted = !1;
  2517                this._loadedStreamCapability = new n.PromiseCapability();
  2518              }
  2519              sendRequest(e, t) {
  2520                const a = this.pdfNetworkStream.getRangeReader(e, t);
  2521                a.isStreamingSupported ||
  2522                  (a.onProgress = this.onProgress.bind(this));
  2523                let n = [],
  2524                  i = 0;
  2525                return new Promise((e, t) => {
  2526                  const readChunk = ({ value: s, done: o }) => {
  2527                    try {
  2528                      if (o) {
  2529                        const t = (0, r.arrayBuffersToBytes)(n);
  2530                        n = null;
  2531                        e(t);
  2532                        return;
  2533                      }
  2534                      i += s.byteLength;
  2535                      a.isStreamingSupported && this.onProgress({ loaded: i });
  2536                      n.push(s);
  2537                      a.read().then(readChunk, t);
  2538                    } catch (e) {
  2539                      t(e);
  2540                    }
  2541                  };
  2542                  a.read().then(readChunk, t);
  2543                }).then((t) => {
  2544                  this.aborted || this.onReceiveData({ chunk: t, begin: e });
  2545                });
  2546              }
  2547              requestAllChunks(e = !1) {
  2548                if (!e) {
  2549                  const e = this.stream.getMissingChunks();
  2550                  this._requestChunks(e);
  2551                }
  2552                return this._loadedStreamCapability.promise;
  2553              }
  2554              _requestChunks(e) {
  2555                const t = this.currRequestId++,
  2556                  a = new Set();
  2557                this._chunksNeededByRequest.set(t, a);
  2558                for (const t of e) this.stream.hasChunk(t) || a.add(t);
  2559                if (0 === a.size) return Promise.resolve();
  2560                const r = new n.PromiseCapability();
  2561                this._promisesByRequest.set(t, r);
  2562                const i = [];
  2563                for (const e of a) {
  2564                  let a = this._requestsByChunk.get(e);
  2565                  if (!a) {
  2566                    a = [];
  2567                    this._requestsByChunk.set(e, a);
  2568                    i.push(e);
  2569                  }
  2570                  a.push(t);
  2571                }
  2572                if (i.length > 0) {
  2573                  const e = this.groupChunks(i);
  2574                  for (const t of e) {
  2575                    const e = t.beginChunk * this.chunkSize,
  2576                      a = Math.min(t.endChunk * this.chunkSize, this.length);
  2577                    this.sendRequest(e, a).catch(r.reject);
  2578                  }
  2579                }
  2580                return r.promise.catch((e) => {
  2581                  if (!this.aborted) throw e;
  2582                });
  2583              }
  2584              getStream() {
  2585                return this.stream;
  2586              }
  2587              requestRange(e, t) {
  2588                t = Math.min(t, this.length);
  2589                const a = this.getBeginChunk(e),
  2590                  r = this.getEndChunk(t),
  2591                  n = [];
  2592                for (let e = a; e < r; ++e) n.push(e);
  2593                return this._requestChunks(n);
  2594              }
  2595              requestRanges(e = []) {
  2596                const t = [];
  2597                for (const a of e) {
  2598                  const e = this.getBeginChunk(a.begin),
  2599                    r = this.getEndChunk(a.end);
  2600                  for (let a = e; a < r; ++a) t.includes(a) || t.push(a);
  2601                }
  2602                t.sort(function (e, t) {
  2603                  return e - t;
  2604                });
  2605                return this._requestChunks(t);
  2606              }
  2607              groupChunks(e) {
  2608                const t = [];
  2609                let a = -1,
  2610                  r = -1;
  2611                for (let n = 0, i = e.length; n < i; ++n) {
  2612                  const i = e[n];
  2613                  a < 0 && (a = i);
  2614                  if (r >= 0 && r + 1 !== i) {
  2615                    t.push({ beginChunk: a, endChunk: r + 1 });
  2616                    a = i;
  2617                  }
  2618                  n + 1 === e.length &&
  2619                    t.push({ beginChunk: a, endChunk: i + 1 });
  2620                  r = i;
  2621                }
  2622                return t;
  2623              }
  2624              onProgress(e) {
  2625                this.msgHandler.send("DocProgress", {
  2626                  loaded: this.stream.numChunksLoaded * this.chunkSize + e.loaded,
  2627                  total: this.length,
  2628                });
  2629              }
  2630              onReceiveData(e) {
  2631                const t = e.chunk,
  2632                  a = void 0 === e.begin,
  2633                  r = a ? this.progressiveDataLength : e.begin,
  2634                  n = r + t.byteLength,
  2635                  i = Math.floor(r / this.chunkSize),
  2636                  s =
  2637                    n < this.length
  2638                      ? Math.floor(n / this.chunkSize)
  2639                      : Math.ceil(n / this.chunkSize);
  2640                if (a) {
  2641                  this.stream.onReceiveProgressiveData(t);
  2642                  this.progressiveDataLength = n;
  2643                } else this.stream.onReceiveData(r, t);
  2644                this.stream.isDataLoaded &&
  2645                  this._loadedStreamCapability.resolve(this.stream);
  2646                const o = [];
  2647                for (let e = i; e < s; ++e) {
  2648                  const t = this._requestsByChunk.get(e);
  2649                  if (t) {
  2650                    this._requestsByChunk.delete(e);
  2651                    for (const a of t) {
  2652                      const t = this._chunksNeededByRequest.get(a);
  2653                      t.has(e) && t.delete(e);
  2654                      t.size > 0 || o.push(a);
  2655                    }
  2656                  }
  2657                }
  2658                if (!this.disableAutoFetch && 0 === this._requestsByChunk.size) {
  2659                  let e;
  2660                  if (1 === this.stream.numChunksLoaded) {
  2661                    const t = this.stream.numChunks - 1;
  2662                    this.stream.hasChunk(t) || (e = t);
  2663                  } else e = this.stream.nextEmptyChunk(s);
  2664                  Number.isInteger(e) && this._requestChunks([e]);
  2665                }
  2666                for (const e of o) {
  2667                  const t = this._promisesByRequest.get(e);
  2668                  this._promisesByRequest.delete(e);
  2669                  t.resolve();
  2670                }
  2671                this.msgHandler.send("DocProgress", {
  2672                  loaded: this.stream.numChunksLoaded * this.chunkSize,
  2673                  total: this.length,
  2674                });
  2675              }
  2676              onError(e) {
  2677                this._loadedStreamCapability.reject(e);
  2678              }
  2679              getBeginChunk(e) {
  2680                return Math.floor(e / this.chunkSize);
  2681              }
  2682              getEndChunk(e) {
  2683                return Math.floor((e - 1) / this.chunkSize) + 1;
  2684              }
  2685              abort(e) {
  2686                this.aborted = !0;
  2687                this.pdfNetworkStream?.cancelAllRequests(e);
  2688                for (const t of this._promisesByRequest.values()) t.reject(e);
  2689              }
  2690            };
  2691          },
  2692          (e, t, a) => {
  2693            Object.defineProperty(t, "__esModule", { value: !0 });
  2694            t.StringStream = t.Stream = t.NullStream = void 0;
  2695            var r = a(5),
  2696              n = a(2);
  2697            class Stream extends r.BaseStream {
  2698              constructor(e, t, a, r) {
  2699                super();
  2700                this.bytes = e instanceof Uint8Array ? e : new Uint8Array(e);
  2701                this.start = t || 0;
  2702                this.pos = this.start;
  2703                this.end = t + a || this.bytes.length;
  2704                this.dict = r;
  2705              }
  2706              get length() {
  2707                return this.end - this.start;
  2708              }
  2709              get isEmpty() {
  2710                return 0 === this.length;
  2711              }
  2712              getByte() {
  2713                return this.pos >= this.end ? -1 : this.bytes[this.pos++];
  2714              }
  2715              getBytes(e) {
  2716                const t = this.bytes,
  2717                  a = this.pos,
  2718                  r = this.end;
  2719                if (!e) return t.subarray(a, r);
  2720                let n = a + e;
  2721                n > r && (n = r);
  2722                this.pos = n;
  2723                return t.subarray(a, n);
  2724              }
  2725              getByteRange(e, t) {
  2726                e < 0 && (e = 0);
  2727                t > this.end && (t = this.end);
  2728                return this.bytes.subarray(e, t);
  2729              }
  2730              reset() {
  2731                this.pos = this.start;
  2732              }
  2733              moveStart() {
  2734                this.start = this.pos;
  2735              }
  2736              makeSubStream(e, t, a = null) {
  2737                return new Stream(this.bytes.buffer, e, t, a);
  2738              }
  2739            }
  2740            t.Stream = Stream;
  2741            t.StringStream = class StringStream extends Stream {
  2742              constructor(e) {
  2743                super((0, n.stringToBytes)(e));
  2744              }
  2745            };
  2746            t.NullStream = class NullStream extends Stream {
  2747              constructor() {
  2748                super(new Uint8Array(0));
  2749              }
  2750            };
  2751          },
  2752          (e, t, a) => {
  2753            Object.defineProperty(t, "__esModule", { value: !0 });
  2754            t.Page = t.PDFDocument = void 0;
  2755            var r = a(2),
  2756              n = a(10),
  2757              i = a(3),
  2758              s = a(4),
  2759              o = a(51),
  2760              c = a(5),
  2761              l = a(74),
  2762              h = a(66),
  2763              u = a(68),
  2764              d = a(102),
  2765              f = a(16),
  2766              g = a(8),
  2767              p = a(76),
  2768              m = a(64),
  2769              b = a(13),
  2770              y = a(18),
  2771              w = a(72),
  2772              S = a(73),
  2773              x = a(77),
  2774              C = a(103);
  2775            const k = [0, 0, 612, 792];
  2776            class Page {
  2777              constructor({
  2778                pdfManager: e,
  2779                xref: t,
  2780                pageIndex: a,
  2781                pageDict: r,
  2782                ref: n,
  2783                globalIdFactory: i,
  2784                fontCache: s,
  2785                builtInCMapCache: o,
  2786                standardFontDataCache: c,
  2787                globalImageCache: l,
  2788                systemFontCache: h,
  2789                nonBlendModesSet: u,
  2790                xfaFactory: d,
  2791              }) {
  2792                this.pdfManager = e;
  2793                this.pageIndex = a;
  2794                this.pageDict = r;
  2795                this.xref = t;
  2796                this.ref = n;
  2797                this.fontCache = s;
  2798                this.builtInCMapCache = o;
  2799                this.standardFontDataCache = c;
  2800                this.globalImageCache = l;
  2801                this.systemFontCache = h;
  2802                this.nonBlendModesSet = u;
  2803                this.evaluatorOptions = e.evaluatorOptions;
  2804                this.resourcesPromise = null;
  2805                this.xfaFactory = d;
  2806                const f = { obj: 0 };
  2807                this._localIdFactory = class extends i {
  2808                  static createObjId() {
  2809                    return `p${a}_${++f.obj}`;
  2810                  }
  2811                  static getPageObjId() {
  2812                    return `p${n.toString()}`;
  2813                  }
  2814                };
  2815              }
  2816              _getInheritableProperty(e, t = !1) {
  2817                const a = (0, i.getInheritableProperty)({
  2818                  dict: this.pageDict,
  2819                  key: e,
  2820                  getArray: t,
  2821                  stopWhenFound: !1,
  2822                });
  2823                return Array.isArray(a)
  2824                  ? 1 !== a.length && a[0] instanceof s.Dict
  2825                    ? s.Dict.merge({ xref: this.xref, dictArray: a })
  2826                    : a[0]
  2827                  : a;
  2828              }
  2829              get content() {
  2830                return this.pageDict.getArray("Contents");
  2831              }
  2832              get resources() {
  2833                const e = this._getInheritableProperty("Resources");
  2834                return (0, r.shadow)(
  2835                  this,
  2836                  "resources",
  2837                  e instanceof s.Dict ? e : s.Dict.empty,
  2838                );
  2839              }
  2840              _getBoundingBox(e) {
  2841                if (this.xfaData) return this.xfaData.bbox;
  2842                let t = this._getInheritableProperty(e, !0);
  2843                if (Array.isArray(t) && 4 === t.length) {
  2844                  t = r.Util.normalizeRect(t);
  2845                  if (t[2] - t[0] > 0 && t[3] - t[1] > 0) return t;
  2846                  (0, r.warn)(`Empty, or invalid, /${e} entry.`);
  2847                }
  2848                return null;
  2849              }
  2850              get mediaBox() {
  2851                return (0, r.shadow)(
  2852                  this,
  2853                  "mediaBox",
  2854                  this._getBoundingBox("MediaBox") || k,
  2855                );
  2856              }
  2857              get cropBox() {
  2858                return (0, r.shadow)(
  2859                  this,
  2860                  "cropBox",
  2861                  this._getBoundingBox("CropBox") || this.mediaBox,
  2862                );
  2863              }
  2864              get userUnit() {
  2865                let e = this.pageDict.get("UserUnit");
  2866                ("number" != typeof e || e <= 0) && (e = 1);
  2867                return (0, r.shadow)(this, "userUnit", e);
  2868              }
  2869              get view() {
  2870                const { cropBox: e, mediaBox: t } = this;
  2871                if (e !== t && !(0, r.isArrayEqual)(e, t)) {
  2872                  const a = r.Util.intersect(e, t);
  2873                  if (a && a[2] - a[0] > 0 && a[3] - a[1] > 0)
  2874                    return (0, r.shadow)(this, "view", a);
  2875                  (0, r.warn)("Empty /CropBox and /MediaBox intersection.");
  2876                }
  2877                return (0, r.shadow)(this, "view", t);
  2878              }
  2879              get rotate() {
  2880                let e = this._getInheritableProperty("Rotate") || 0;
  2881                e % 90 != 0
  2882                  ? (e = 0)
  2883                  : e >= 360
  2884                    ? (e %= 360)
  2885                    : e < 0 && (e = ((e % 360) + 360) % 360);
  2886                return (0, r.shadow)(this, "rotate", e);
  2887              }
  2888              _onSubStreamError(e, t) {
  2889                if (!this.evaluatorOptions.ignoreErrors) throw e;
  2890                (0, r.warn)(
  2891                  `getContentStream - ignoring sub-stream (${t}): "${e}".`,
  2892                );
  2893              }
  2894              getContentStream() {
  2895                return this.pdfManager
  2896                  .ensure(this, "content")
  2897                  .then((e) =>
  2898                    e instanceof c.BaseStream
  2899                      ? e
  2900                      : Array.isArray(e)
  2901                        ? new y.StreamsSequenceStream(
  2902                            e,
  2903                            this._onSubStreamError.bind(this),
  2904                          )
  2905                        : new g.NullStream(),
  2906                  );
  2907              }
  2908              get xfaData() {
  2909                return (0, r.shadow)(
  2910                  this,
  2911                  "xfaData",
  2912                  this.xfaFactory
  2913                    ? { bbox: this.xfaFactory.getBoundingBox(this.pageIndex) }
  2914                    : null,
  2915                );
  2916              }
  2917              #t(e, t, a) {
  2918                for (const n of e)
  2919                  if (n.id) {
  2920                    const e = s.Ref.fromString(n.id);
  2921                    if (!e) {
  2922                      (0, r.warn)(
  2923                        `A non-linked annotation cannot be modified: ${n.id}`,
  2924                      );
  2925                      continue;
  2926                    }
  2927                    if (n.deleted) {
  2928                      t.put(e);
  2929                      continue;
  2930                    }
  2931                    a?.put(e);
  2932                    n.ref = e;
  2933                    delete n.id;
  2934                  }
  2935              }
  2936              async saveNewAnnotations(e, t, a, r) {
  2937                if (this.xfaFactory)
  2938                  throw new Error("XFA: Cannot save new annotations.");
  2939                const i = new b.PartialEvaluator({
  2940                    xref: this.xref,
  2941                    handler: e,
  2942                    pageIndex: this.pageIndex,
  2943                    idFactory: this._localIdFactory,
  2944                    fontCache: this.fontCache,
  2945                    builtInCMapCache: this.builtInCMapCache,
  2946                    standardFontDataCache: this.standardFontDataCache,
  2947                    globalImageCache: this.globalImageCache,
  2948                    systemFontCache: this.systemFontCache,
  2949                    options: this.evaluatorOptions,
  2950                  }),
  2951                  o = new s.RefSet(),
  2952                  c = new s.RefSet();
  2953                this.#t(a, o, c);
  2954                const l = this.pageDict,
  2955                  h = this.annotations.filter(
  2956                    (e) => !(e instanceof s.Ref && o.has(e)),
  2957                  ),
  2958                  u = await n.AnnotationFactory.saveNewAnnotations(i, t, a, r);
  2959                for (const { ref: e } of u.annotations)
  2960                  e instanceof s.Ref && !c.has(e) && h.push(e);
  2961                const d = l.get("Annots");
  2962                l.set("Annots", h);
  2963                const f = [];
  2964                await (0, S.writeObject)(this.ref, l, f, this.xref);
  2965                d && l.set("Annots", d);
  2966                const g = u.dependencies;
  2967                g.push({ ref: this.ref, data: f.join("") }, ...u.annotations);
  2968                return g;
  2969              }
  2970              save(e, t, a) {
  2971                const n = new b.PartialEvaluator({
  2972                  xref: this.xref,
  2973                  handler: e,
  2974                  pageIndex: this.pageIndex,
  2975                  idFactory: this._localIdFactory,
  2976                  fontCache: this.fontCache,
  2977                  builtInCMapCache: this.builtInCMapCache,
  2978                  standardFontDataCache: this.standardFontDataCache,
  2979                  globalImageCache: this.globalImageCache,
  2980                  systemFontCache: this.systemFontCache,
  2981                  options: this.evaluatorOptions,
  2982                });
  2983                return this._parsedAnnotations.then(function (e) {
  2984                  const i = [];
  2985                  for (const s of e)
  2986                    s.mustBePrinted(a) &&
  2987                      i.push(
  2988                        s.save(n, t, a).catch(function (e) {
  2989                          (0, r.warn)(
  2990                            `save - ignoring annotation data during "${t.name}" task: "${e}".`,
  2991                          );
  2992                          return null;
  2993                        }),
  2994                      );
  2995                  return Promise.all(i).then(function (e) {
  2996                    return e.filter((e) => !!e);
  2997                  });
  2998                });
  2999              }
  3000              loadResources(e) {
  3001                this.resourcesPromise ||
  3002                  (this.resourcesPromise = this.pdfManager.ensure(
  3003                    this,
  3004                    "resources",
  3005                  ));
  3006                return this.resourcesPromise.then(() =>
  3007                  new p.ObjectLoader(this.resources, e, this.xref).load(),
  3008                );
  3009              }
  3010              getOperatorList({
  3011                handler: e,
  3012                sink: t,
  3013                task: a,
  3014                intent: o,
  3015                cacheKey: c,
  3016                annotationStorage: l = null,
  3017              }) {
  3018                const h = this.getContentStream(),
  3019                  u = this.loadResources([
  3020                    "ColorSpace",
  3021                    "ExtGState",
  3022                    "Font",
  3023                    "Pattern",
  3024                    "Properties",
  3025                    "Shading",
  3026                    "XObject",
  3027                  ]),
  3028                  d = new b.PartialEvaluator({
  3029                    xref: this.xref,
  3030                    handler: e,
  3031                    pageIndex: this.pageIndex,
  3032                    idFactory: this._localIdFactory,
  3033                    fontCache: this.fontCache,
  3034                    builtInCMapCache: this.builtInCMapCache,
  3035                    standardFontDataCache: this.standardFontDataCache,
  3036                    globalImageCache: this.globalImageCache,
  3037                    systemFontCache: this.systemFontCache,
  3038                    options: this.evaluatorOptions,
  3039                  }),
  3040                  f = this.xfaFactory ? null : (0, i.getNewAnnotationsMap)(l);
  3041                let g = null,
  3042                  p = Promise.resolve(null);
  3043                if (f) {
  3044                  const e = f.get(this.pageIndex);
  3045                  if (e) {
  3046                    const t = this.pdfManager.ensureDoc("annotationGlobals");
  3047                    let i;
  3048                    const o = new Set();
  3049                    for (const { bitmapId: t, bitmap: a } of e)
  3050                      !t || a || o.has(t) || o.add(t);
  3051                    const { isOffscreenCanvasSupported: c } =
  3052                      this.evaluatorOptions;
  3053                    if (o.size > 0) {
  3054                      const t = e.slice();
  3055                      for (const [e, a] of l)
  3056                        e.startsWith(r.AnnotationEditorPrefix) &&
  3057                          a.bitmap &&
  3058                          o.has(a.bitmapId) &&
  3059                          t.push(a);
  3060                      i = n.AnnotationFactory.generateImages(t, this.xref, c);
  3061                    } else
  3062                      i = n.AnnotationFactory.generateImages(e, this.xref, c);
  3063                    g = new s.RefSet();
  3064                    this.#t(e, g, null);
  3065                    p = t.then((t) =>
  3066                      t
  3067                        ? n.AnnotationFactory.printNewAnnotations(t, d, a, e, i)
  3068                        : null,
  3069                    );
  3070                  }
  3071                }
  3072                const y = Promise.all([h, u]).then(([r]) => {
  3073                  const n = new m.OperatorList(o, t);
  3074                  e.send("StartRenderPage", {
  3075                    transparency: d.hasBlendModes(
  3076                      this.resources,
  3077                      this.nonBlendModesSet,
  3078                    ),
  3079                    pageIndex: this.pageIndex,
  3080                    cacheKey: c,
  3081                  });
  3082                  return d
  3083                    .getOperatorList({
  3084                      stream: r,
  3085                      task: a,
  3086                      resources: this.resources,
  3087                      operatorList: n,
  3088                    })
  3089                    .then(function () {
  3090                      return n;
  3091                    });
  3092                });
  3093                return Promise.all([y, this._parsedAnnotations, p]).then(
  3094                  function ([e, t, n]) {
  3095                    if (n) {
  3096                      t = t.filter((e) => !(e.ref && g.has(e.ref)));
  3097                      for (let e = 0, a = n.length; e < a; e++) {
  3098                        const r = n[e];
  3099                        if (r.refToReplace) {
  3100                          const i = t.findIndex(
  3101                            (e) =>
  3102                              e.ref && (0, s.isRefsEqual)(e.ref, r.refToReplace),
  3103                          );
  3104                          if (i >= 0) {
  3105                            t.splice(i, 1, r);
  3106                            n.splice(e--, 1);
  3107                            a--;
  3108                          }
  3109                        }
  3110                      }
  3111                      t = t.concat(n);
  3112                    }
  3113                    if (
  3114                      0 === t.length ||
  3115                      o & r.RenderingIntentFlag.ANNOTATIONS_DISABLE
  3116                    ) {
  3117                      e.flush(!0);
  3118                      return { length: e.totalLength };
  3119                    }
  3120                    const i = !!(o & r.RenderingIntentFlag.ANNOTATIONS_FORMS),
  3121                      c = !!(o & r.RenderingIntentFlag.ANY),
  3122                      h = !!(o & r.RenderingIntentFlag.DISPLAY),
  3123                      u = !!(o & r.RenderingIntentFlag.PRINT),
  3124                      f = [];
  3125                    for (const e of t)
  3126                      (c ||
  3127                        (h && e.mustBeViewed(l, i)) ||
  3128                        (u && e.mustBePrinted(l))) &&
  3129                        f.push(
  3130                          e.getOperatorList(d, a, o, i, l).catch(function (e) {
  3131                            (0, r.warn)(
  3132                              `getOperatorList - ignoring annotation data during "${a.name}" task: "${e}".`,
  3133                            );
  3134                            return {
  3135                              opList: null,
  3136                              separateForm: !1,
  3137                              separateCanvas: !1,
  3138                            };
  3139                          }),
  3140                        );
  3141                    return Promise.all(f).then(function (t) {
  3142                      let a = !1,
  3143                        r = !1;
  3144                      for (const {
  3145                        opList: n,
  3146                        separateForm: i,
  3147                        separateCanvas: s,
  3148                      } of t) {
  3149                        e.addOpList(n);
  3150                        a ||= i;
  3151                        r ||= s;
  3152                      }
  3153                      e.flush(!0, { form: a, canvas: r });
  3154                      return { length: e.totalLength };
  3155                    });
  3156                  },
  3157                );
  3158              }
  3159              extractTextContent({
  3160                handler: e,
  3161                task: t,
  3162                includeMarkedContent: a,
  3163                disableNormalization: r,
  3164                sink: n,
  3165              }) {
  3166                const i = this.getContentStream(),
  3167                  s = this.loadResources([
  3168                    "ExtGState",
  3169                    "Font",
  3170                    "Properties",
  3171                    "XObject",
  3172                  ]);
  3173                return Promise.all([i, s]).then(([i]) =>
  3174                  new b.PartialEvaluator({
  3175                    xref: this.xref,
  3176                    handler: e,
  3177                    pageIndex: this.pageIndex,
  3178                    idFactory: this._localIdFactory,
  3179                    fontCache: this.fontCache,
  3180                    builtInCMapCache: this.builtInCMapCache,
  3181                    standardFontDataCache: this.standardFontDataCache,
  3182                    globalImageCache: this.globalImageCache,
  3183                    systemFontCache: this.systemFontCache,
  3184                    options: this.evaluatorOptions,
  3185                  }).getTextContent({
  3186                    stream: i,
  3187                    task: t,
  3188                    resources: this.resources,
  3189                    includeMarkedContent: a,
  3190                    disableNormalization: r,
  3191                    sink: n,
  3192                    viewBox: this.view,
  3193                  }),
  3194                );
  3195              }
  3196              async getStructTree() {
  3197                const e = await this.pdfManager.ensureCatalog("structTreeRoot");
  3198                if (!e) return null;
  3199                await this._parsedAnnotations;
  3200                return (
  3201                  await this.pdfManager.ensure(this, "_parseStructTree", [e])
  3202                ).serializable;
  3203              }
  3204              _parseStructTree(e) {
  3205                const t = new w.StructTreePage(e, this.pageDict);
  3206                t.parse(this.ref);
  3207                return t;
  3208              }
  3209              async getAnnotationsData(e, t, a) {
  3210                const n = await this._parsedAnnotations;
  3211                if (0 === n.length) return n;
  3212                const i = [],
  3213                  s = [];
  3214                let o;
  3215                const c = !!(a & r.RenderingIntentFlag.ANY),
  3216                  l = !!(a & r.RenderingIntentFlag.DISPLAY),
  3217                  h = !!(a & r.RenderingIntentFlag.PRINT);
  3218                for (const a of n) {
  3219                  const n = c || (l && a.viewable);
  3220                  (n || (h && a.printable)) && i.push(a.data);
  3221                  if (a.hasTextContent && n) {
  3222                    o ||= new b.PartialEvaluator({
  3223                      xref: this.xref,
  3224                      handler: e,
  3225                      pageIndex: this.pageIndex,
  3226                      idFactory: this._localIdFactory,
  3227                      fontCache: this.fontCache,
  3228                      builtInCMapCache: this.builtInCMapCache,
  3229                      standardFontDataCache: this.standardFontDataCache,
  3230                      globalImageCache: this.globalImageCache,
  3231                      systemFontCache: this.systemFontCache,
  3232                      options: this.evaluatorOptions,
  3233                    });
  3234                    s.push(
  3235                      a
  3236                        .extractTextContent(o, t, [-1 / 0, -1 / 0, 1 / 0, 1 / 0])
  3237                        .catch(function (e) {
  3238                          (0, r.warn)(
  3239                            `getAnnotationsData - ignoring textContent during "${t.name}" task: "${e}".`,
  3240                          );
  3241                        }),
  3242                    );
  3243                  }
  3244                }
  3245                await Promise.all(s);
  3246                return i;
  3247              }
  3248              get annotations() {
  3249                const e = this._getInheritableProperty("Annots");
  3250                return (0, r.shadow)(
  3251                  this,
  3252                  "annotations",
  3253                  Array.isArray(e) ? e : [],
  3254                );
  3255              }
  3256              get _parsedAnnotations() {
  3257                const e = this.pdfManager
  3258                  .ensure(this, "annotations")
  3259                  .then(async (e) => {
  3260                    if (0 === e.length) return e;
  3261                    const t =
  3262                      await this.pdfManager.ensureDoc("annotationGlobals");
  3263                    if (!t) return [];
  3264                    const a = [];
  3265                    for (const i of e)
  3266                      a.push(
  3267                        n.AnnotationFactory.create(
  3268                          this.xref,
  3269                          i,
  3270                          t,
  3271                          this._localIdFactory,
  3272                          !1,
  3273                          this.ref,
  3274                        ).catch(function (e) {
  3275                          (0, r.warn)(`_parsedAnnotations: "${e}".`);
  3276                          return null;
  3277                        }),
  3278                      );
  3279                    const i = [];
  3280                    let s;
  3281                    for (const e of await Promise.all(a))
  3282                      e &&
  3283                        (e instanceof n.PopupAnnotation
  3284                          ? (s ||= []).push(e)
  3285                          : i.push(e));
  3286                    s && i.push(...s);
  3287                    return i;
  3288                  });
  3289                return (0, r.shadow)(this, "_parsedAnnotations", e);
  3290              }
  3291              get jsActions() {
  3292                const e = (0, i.collectActions)(
  3293                  this.xref,
  3294                  this.pageDict,
  3295                  r.PageActionEventType,
  3296                );
  3297                return (0, r.shadow)(this, "jsActions", e);
  3298              }
  3299            }
  3300            t.Page = Page;
  3301            const v = new Uint8Array([37, 80, 68, 70, 45]),
  3302              F = new Uint8Array([115, 116, 97, 114, 116, 120, 114, 101, 102]),
  3303              O = new Uint8Array([101, 110, 100, 111, 98, 106]);
  3304            function find(e, t, a = 1024, r = !1) {
  3305              const n = t.length,
  3306                i = e.peekBytes(a),
  3307                s = i.length - n;
  3308              if (s <= 0) return !1;
  3309              if (r) {
  3310                const a = n - 1;
  3311                let r = i.length - 1;
  3312                for (; r >= a; ) {
  3313                  let s = 0;
  3314                  for (; s < n && i[r - s] === t[a - s]; ) s++;
  3315                  if (s >= n) {
  3316                    e.pos += r - a;
  3317                    return !0;
  3318                  }
  3319                  r--;
  3320                }
  3321              } else {
  3322                let a = 0;
  3323                for (; a <= s; ) {
  3324                  let r = 0;
  3325                  for (; r < n && i[a + r] === t[r]; ) r++;
  3326                  if (r >= n) {
  3327                    e.pos += a;
  3328                    return !0;
  3329                  }
  3330                  a++;
  3331                }
  3332              }
  3333              return !1;
  3334            }
  3335            t.PDFDocument = class PDFDocument {
  3336              constructor(e, t) {
  3337                if (t.length <= 0)
  3338                  throw new r.InvalidPDFException(
  3339                    "The PDF file is empty, i.e. its size is zero bytes.",
  3340                  );
  3341                this.pdfManager = e;
  3342                this.stream = t;
  3343                this.xref = new C.XRef(t, e);
  3344                this._pagePromises = new Map();
  3345                this._version = null;
  3346                const a = { font: 0 };
  3347                this._globalIdFactory = class {
  3348                  static getDocId() {
  3349                    return `g_${e.docId}`;
  3350                  }
  3351                  static createFontId() {
  3352                    return "f" + ++a.font;
  3353                  }
  3354                  static createObjId() {
  3355                    (0, r.unreachable)("Abstract method `createObjId` called.");
  3356                  }
  3357                  static getPageObjId() {
  3358                    (0, r.unreachable)("Abstract method `getPageObjId` called.");
  3359                  }
  3360                };
  3361              }
  3362              parse(e) {
  3363                this.xref.parse(e);
  3364                this.catalog = new h.Catalog(this.pdfManager, this.xref);
  3365              }
  3366              get linearization() {
  3367                let e = null;
  3368                try {
  3369                  e = f.Linearization.create(this.stream);
  3370                } catch (e) {
  3371                  if (e instanceof i.MissingDataException) throw e;
  3372                  (0, r.info)(e);
  3373                }
  3374                return (0, r.shadow)(this, "linearization", e);
  3375              }
  3376              get startXRef() {
  3377                const e = this.stream;
  3378                let t = 0;
  3379                if (this.linearization) {
  3380                  e.reset();
  3381                  find(e, O) && (t = e.pos + 6 - e.start);
  3382                } else {
  3383                  const a = 1024,
  3384                    r = F.length;
  3385                  let n = !1,
  3386                    s = e.end;
  3387                  for (; !n && s > 0; ) {
  3388                    s -= a - r;
  3389                    s < 0 && (s = 0);
  3390                    e.pos = s;
  3391                    n = find(e, F, a, !0);
  3392                  }
  3393                  if (n) {
  3394                    e.skip(9);
  3395                    let a;
  3396                    do {
  3397                      a = e.getByte();
  3398                    } while ((0, i.isWhiteSpace)(a));
  3399                    let r = "";
  3400                    for (; a >= 32 && a <= 57; ) {
  3401                      r += String.fromCharCode(a);
  3402                      a = e.getByte();
  3403                    }
  3404                    t = parseInt(r, 10);
  3405                    isNaN(t) && (t = 0);
  3406                  }
  3407                }
  3408                return (0, r.shadow)(this, "startXRef", t);
  3409              }
  3410              checkHeader() {
  3411                const e = this.stream;
  3412                e.reset();
  3413                if (!find(e, v)) return;
  3414                e.moveStart();
  3415                e.skip(v.length);
  3416                let t,
  3417                  a = "";
  3418                for (; (t = e.getByte()) > 32 && a.length < 7; )
  3419                  a += String.fromCharCode(t);
  3420                i.PDF_VERSION_REGEXP.test(a)
  3421                  ? (this._version = a)
  3422                  : (0, r.warn)(`Invalid PDF header version: ${a}`);
  3423              }
  3424              parseStartXRef() {
  3425                this.xref.setStartXRef(this.startXRef);
  3426              }
  3427              get numPages() {
  3428                let e = 0;
  3429                e = this.catalog.hasActualNumPages
  3430                  ? this.catalog.numPages
  3431                  : this.xfaFactory
  3432                    ? this.xfaFactory.getNumPages()
  3433                    : this.linearization
  3434                      ? this.linearization.numPages
  3435                      : this.catalog.numPages;
  3436                return (0, r.shadow)(this, "numPages", e);
  3437              }
  3438              _hasOnlyDocumentSignatures(e, t = 0) {
  3439                return (
  3440                  !!Array.isArray(e) &&
  3441                  e.every((e) => {
  3442                    if (!((e = this.xref.fetchIfRef(e)) instanceof s.Dict))
  3443                      return !1;
  3444                    if (e.has("Kids")) {
  3445                      if (++t > 10) {
  3446                        (0, r.warn)(
  3447                          "_hasOnlyDocumentSignatures: maximum recursion depth reached",
  3448                        );
  3449                        return !1;
  3450                      }
  3451                      return this._hasOnlyDocumentSignatures(e.get("Kids"), t);
  3452                    }
  3453                    const a = (0, s.isName)(e.get("FT"), "Sig"),
  3454                      n = e.get("Rect"),
  3455                      i = Array.isArray(n) && n.every((e) => 0 === e);
  3456                    return a && i;
  3457                  })
  3458                );
  3459              }
  3460              get _xfaStreams() {
  3461                const e = this.catalog.acroForm;
  3462                if (!e) return null;
  3463                const t = e.get("XFA"),
  3464                  a = {
  3465                    "xdp:xdp": "",
  3466                    template: "",
  3467                    datasets: "",
  3468                    config: "",
  3469                    connectionSet: "",
  3470                    localeSet: "",
  3471                    stylesheet: "",
  3472                    "/xdp:xdp": "",
  3473                  };
  3474                if (t instanceof c.BaseStream && !t.isEmpty) {
  3475                  a["xdp:xdp"] = t;
  3476                  return a;
  3477                }
  3478                if (!Array.isArray(t) || 0 === t.length) return null;
  3479                for (let e = 0, r = t.length; e < r; e += 2) {
  3480                  let n;
  3481                  n = 0 === e ? "xdp:xdp" : e === r - 2 ? "/xdp:xdp" : t[e];
  3482                  if (!a.hasOwnProperty(n)) continue;
  3483                  const i = this.xref.fetchIfRef(t[e + 1]);
  3484                  i instanceof c.BaseStream && !i.isEmpty && (a[n] = i);
  3485                }
  3486                return a;
  3487              }
  3488              get xfaDatasets() {
  3489                const e = this._xfaStreams;
  3490                if (!e) return (0, r.shadow)(this, "xfaDatasets", null);
  3491                for (const t of ["datasets", "xdp:xdp"]) {
  3492                  const a = e[t];
  3493                  if (a)
  3494                    try {
  3495                      const e = { [t]: (0, r.stringToUTF8String)(a.getString()) };
  3496                      return (0, r.shadow)(
  3497                        this,
  3498                        "xfaDatasets",
  3499                        new d.DatasetReader(e),
  3500                      );
  3501                    } catch {
  3502                      (0, r.warn)("XFA - Invalid utf-8 string.");
  3503                      break;
  3504                    }
  3505                }
  3506                return (0, r.shadow)(this, "xfaDatasets", null);
  3507              }
  3508              get xfaData() {
  3509                const e = this._xfaStreams;
  3510                if (!e) return null;
  3511                const t = Object.create(null);
  3512                for (const [a, n] of Object.entries(e))
  3513                  if (n)
  3514                    try {
  3515                      t[a] = (0, r.stringToUTF8String)(n.getString());
  3516                    } catch {
  3517                      (0, r.warn)("XFA - Invalid utf-8 string.");
  3518                      return null;
  3519                    }
  3520                return t;
  3521              }
  3522              get xfaFactory() {
  3523                let e;
  3524                this.pdfManager.enableXfa &&
  3525                  this.catalog.needsRendering &&
  3526                  this.formInfo.hasXfa &&
  3527                  !this.formInfo.hasAcroForm &&
  3528                  (e = this.xfaData);
  3529                return (0, r.shadow)(
  3530                  this,
  3531                  "xfaFactory",
  3532                  e ? new x.XFAFactory(e) : null,
  3533                );
  3534              }
  3535              get isPureXfa() {
  3536                return !!this.xfaFactory && this.xfaFactory.isValid();
  3537              }
  3538              get htmlForXfa() {
  3539                return this.xfaFactory ? this.xfaFactory.getPages() : null;
  3540              }
  3541              async loadXfaImages() {
  3542                const e = await this.pdfManager.ensureCatalog("xfaImages");
  3543                if (!e) return;
  3544                const t = e.getKeys(),
  3545                  a = new p.ObjectLoader(e, t, this.xref);
  3546                await a.load();
  3547                const r = new Map();
  3548                for (const a of t) {
  3549                  const t = e.get(a);
  3550                  t instanceof c.BaseStream && r.set(a, t.getBytes());
  3551                }
  3552                this.xfaFactory.setImages(r);
  3553              }
  3554              async loadXfaFonts(e, t) {
  3555                const a = await this.pdfManager.ensureCatalog("acroForm");
  3556                if (!a) return;
  3557                const n = await a.getAsync("DR");
  3558                if (!(n instanceof s.Dict)) return;
  3559                const c = new p.ObjectLoader(n, ["Font"], this.xref);
  3560                await c.load();
  3561                const l = n.get("Font");
  3562                if (!(l instanceof s.Dict)) return;
  3563                const h = Object.assign(
  3564                  Object.create(null),
  3565                  this.pdfManager.evaluatorOptions,
  3566                );
  3567                h.useSystemFonts = !1;
  3568                const u = new b.PartialEvaluator({
  3569                    xref: this.xref,
  3570                    handler: e,
  3571                    pageIndex: -1,
  3572                    idFactory: this._globalIdFactory,
  3573                    fontCache: this.catalog.fontCache,
  3574                    builtInCMapCache: this.catalog.builtInCMapCache,
  3575                    standardFontDataCache: this.catalog.standardFontDataCache,
  3576                    options: h,
  3577                  }),
  3578                  d = new m.OperatorList(),
  3579                  f = [],
  3580                  g = {
  3581                    get font() {
  3582                      return f.at(-1);
  3583                    },
  3584                    set font(e) {
  3585                      f.push(e);
  3586                    },
  3587                    clone() {
  3588                      return this;
  3589                    },
  3590                  },
  3591                  y = new Map();
  3592                l.forEach((e, t) => {
  3593                  y.set(e, t);
  3594                });
  3595                const w = [];
  3596                for (const [e, a] of y) {
  3597                  const o = a.get("FontDescriptor");
  3598                  if (!(o instanceof s.Dict)) continue;
  3599                  let c = o.get("FontFamily");
  3600                  c = c.replaceAll(/[ ]+(\d)/g, "$1");
  3601                  const l = {
  3602                    fontFamily: c,
  3603                    fontWeight: o.get("FontWeight"),
  3604                    italicAngle: -o.get("ItalicAngle"),
  3605                  };
  3606                  (0, i.validateCSSFont)(l) &&
  3607                    w.push(
  3608                      u
  3609                        .handleSetFont(
  3610                          n,
  3611                          [s.Name.get(e), 1],
  3612                          null,
  3613                          d,
  3614                          t,
  3615                          g,
  3616                          null,
  3617                          l,
  3618                        )
  3619                        .catch(function (e) {
  3620                          (0, r.warn)(`loadXfaFonts: "${e}".`);
  3621                          return null;
  3622                        }),
  3623                    );
  3624                }
  3625                await Promise.all(w);
  3626                const S = this.xfaFactory.setFonts(f);
  3627                if (!S) return;
  3628                h.ignoreErrors = !0;
  3629                w.length = 0;
  3630                f.length = 0;
  3631                const x = new Set();
  3632                for (const e of S)
  3633                  (0, o.getXfaFontName)(`${e}-Regular`) || x.add(e);
  3634                x.size && S.push("PdfJS-Fallback");
  3635                for (const e of S)
  3636                  if (!x.has(e))
  3637                    for (const a of [
  3638                      { name: "Regular", fontWeight: 400, italicAngle: 0 },
  3639                      { name: "Bold", fontWeight: 700, italicAngle: 0 },
  3640                      { name: "Italic", fontWeight: 400, italicAngle: 12 },
  3641                      { name: "BoldItalic", fontWeight: 700, italicAngle: 12 },
  3642                    ]) {
  3643                      const i = `${e}-${a.name}`,
  3644                        c = (0, o.getXfaFontDict)(i);
  3645                      w.push(
  3646                        u
  3647                          .handleSetFont(
  3648                            n,
  3649                            [s.Name.get(i), 1],
  3650                            null,
  3651                            d,
  3652                            t,
  3653                            g,
  3654                            c,
  3655                            {
  3656                              fontFamily: e,
  3657                              fontWeight: a.fontWeight,
  3658                              italicAngle: a.italicAngle,
  3659                            },
  3660                          )
  3661                          .catch(function (e) {
  3662                            (0, r.warn)(`loadXfaFonts: "${e}".`);
  3663                            return null;
  3664                          }),
  3665                      );
  3666                    }
  3667                await Promise.all(w);
  3668                this.xfaFactory.appendFonts(f, x);
  3669              }
  3670              async serializeXfaData(e) {
  3671                return this.xfaFactory ? this.xfaFactory.serializeData(e) : null;
  3672              }
  3673              get version() {
  3674                return this.catalog.version || this._version;
  3675              }
  3676              get formInfo() {
  3677                const e = {
  3678                    hasFields: !1,
  3679                    hasAcroForm: !1,
  3680                    hasXfa: !1,
  3681                    hasSignatures: !1,
  3682                  },
  3683                  t = this.catalog.acroForm;
  3684                if (!t) return (0, r.shadow)(this, "formInfo", e);
  3685                try {
  3686                  const a = t.get("Fields"),
  3687                    r = Array.isArray(a) && a.length > 0;
  3688                  e.hasFields = r;
  3689                  const n = t.get("XFA");
  3690                  e.hasXfa =
  3691                    (Array.isArray(n) && n.length > 0) ||
  3692                    (n instanceof c.BaseStream && !n.isEmpty);
  3693                  const i = !!(1 & t.get("SigFlags")),
  3694                    s = i && this._hasOnlyDocumentSignatures(a);
  3695                  e.hasAcroForm = r && !s;
  3696                  e.hasSignatures = i;
  3697                } catch (e) {
  3698                  if (e instanceof i.MissingDataException) throw e;
  3699                  (0, r.warn)(`Cannot fetch form information: "${e}".`);
  3700                }
  3701                return (0, r.shadow)(this, "formInfo", e);
  3702              }
  3703              get documentInfo() {
  3704                const e = {
  3705                  PDFFormatVersion: this.version,
  3706                  Language: this.catalog.lang,
  3707                  EncryptFilterName: this.xref.encrypt
  3708                    ? this.xref.encrypt.filterName
  3709                    : null,
  3710                  IsLinearized: !!this.linearization,
  3711                  IsAcroFormPresent: this.formInfo.hasAcroForm,
  3712                  IsXFAPresent: this.formInfo.hasXfa,
  3713                  IsCollectionPresent: !!this.catalog.collection,
  3714                  IsSignaturesPresent: this.formInfo.hasSignatures,
  3715                };
  3716                let t;
  3717                try {
  3718                  t = this.xref.trailer.get("Info");
  3719                } catch (e) {
  3720                  if (e instanceof i.MissingDataException) throw e;
  3721                  (0, r.info)("The document information dictionary is invalid.");
  3722                }
  3723                if (!(t instanceof s.Dict))
  3724                  return (0, r.shadow)(this, "documentInfo", e);
  3725                for (const a of t.getKeys()) {
  3726                  const n = t.get(a);
  3727                  switch (a) {
  3728                    case "Title":
  3729                    case "Author":
  3730                    case "Subject":
  3731                    case "Keywords":
  3732                    case "Creator":
  3733                    case "Producer":
  3734                    case "CreationDate":
  3735                    case "ModDate":
  3736                      if ("string" == typeof n) {
  3737                        e[a] = (0, r.stringToPDFString)(n);
  3738                        continue;
  3739                      }
  3740                      break;
  3741                    case "Trapped":
  3742                      if (n instanceof s.Name) {
  3743                        e[a] = n;
  3744                        continue;
  3745                      }
  3746                      break;
  3747                    default:
  3748                      let t;
  3749                      switch (typeof n) {
  3750                        case "string":
  3751                          t = (0, r.stringToPDFString)(n);
  3752                          break;
  3753                        case "number":
  3754                        case "boolean":
  3755                          t = n;
  3756                          break;
  3757                        default:
  3758                          n instanceof s.Name && (t = n);
  3759                      }
  3760                      if (void 0 === t) {
  3761                        (0, r.warn)(
  3762                          `Bad value, for custom key "${a}", in Info: ${n}.`,
  3763                        );
  3764                        continue;
  3765                      }
  3766                      e.Custom || (e.Custom = Object.create(null));
  3767                      e.Custom[a] = t;
  3768                      continue;
  3769                  }
  3770                  (0, r.warn)(`Bad value, for key "${a}", in Info: ${n}.`);
  3771                }
  3772                return (0, r.shadow)(this, "documentInfo", e);
  3773              }
  3774              get fingerprints() {
  3775                function validate(e) {
  3776                  return (
  3777                    "string" == typeof e &&
  3778                    e.length > 0 &&
  3779                    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" !== e
  3780                  );
  3781                }
  3782                function hexString(e) {
  3783                  const t = [];
  3784                  for (const a of e) {
  3785                    const e = a.toString(16);
  3786                    t.push(e.padStart(2, "0"));
  3787                  }
  3788                  return t.join("");
  3789                }
  3790                const e = this.xref.trailer.get("ID");
  3791                let t, a;
  3792                if (Array.isArray(e) && validate(e[0])) {
  3793                  t = (0, r.stringToBytes)(e[0]);
  3794                  e[1] !== e[0] &&
  3795                    validate(e[1]) &&
  3796                    (a = (0, r.stringToBytes)(e[1]));
  3797                } else
  3798                  t = (0, l.calculateMD5)(
  3799                    this.stream.getByteRange(0, 1024),
  3800                    0,
  3801                    1024,
  3802                  );
  3803                return (0, r.shadow)(this, "fingerprints", [
  3804                  hexString(t),
  3805                  a ? hexString(a) : null,
  3806                ]);
  3807              }
  3808              async _getLinearizationPage(e) {
  3809                const { catalog: t, linearization: a, xref: n } = this,
  3810                  i = s.Ref.get(a.objectNumberFirst, 0);
  3811                try {
  3812                  const e = await n.fetchAsync(i);
  3813                  if (e instanceof s.Dict) {
  3814                    let a = e.getRaw("Type");
  3815                    a instanceof s.Ref && (a = await n.fetchAsync(a));
  3816                    if (
  3817                      (0, s.isName)(a, "Page") ||
  3818                      (!e.has("Type") && !e.has("Kids"))
  3819                    ) {
  3820                      t.pageKidsCountCache.has(i) ||
  3821                        t.pageKidsCountCache.put(i, 1);
  3822                      t.pageIndexCache.has(i) || t.pageIndexCache.put(i, 0);
  3823                      return [e, i];
  3824                    }
  3825                  }
  3826                  throw new r.FormatError(
  3827                    "The Linearization dictionary doesn't point to a valid Page dictionary.",
  3828                  );
  3829                } catch (a) {
  3830                  (0, r.warn)(`_getLinearizationPage: "${a.message}".`);
  3831                  return t.getPageDict(e);
  3832                }
  3833              }
  3834              getPage(e) {
  3835                const t = this._pagePromises.get(e);
  3836                if (t) return t;
  3837                const { catalog: a, linearization: r, xfaFactory: n } = this;
  3838                let i;
  3839                i = n
  3840                  ? Promise.resolve([s.Dict.empty, null])
  3841                  : r?.pageFirst === e
  3842                    ? this._getLinearizationPage(e)
  3843                    : a.getPageDict(e);
  3844                i = i.then(
  3845                  ([t, r]) =>
  3846                    new Page({
  3847                      pdfManager: this.pdfManager,
  3848                      xref: this.xref,
  3849                      pageIndex: e,
  3850                      pageDict: t,
  3851                      ref: r,
  3852                      globalIdFactory: this._globalIdFactory,
  3853                      fontCache: a.fontCache,
  3854                      builtInCMapCache: a.builtInCMapCache,
  3855                      standardFontDataCache: a.standardFontDataCache,
  3856                      globalImageCache: a.globalImageCache,
  3857                      systemFontCache: a.systemFontCache,
  3858                      nonBlendModesSet: a.nonBlendModesSet,
  3859                      xfaFactory: n,
  3860                    }),
  3861                );
  3862                this._pagePromises.set(e, i);
  3863                return i;
  3864              }
  3865              async checkFirstPage(e = !1) {
  3866                if (!e)
  3867                  try {
  3868                    await this.getPage(0);
  3869                  } catch (e) {
  3870                    if (e instanceof i.XRefEntryException) {
  3871                      this._pagePromises.delete(0);
  3872                      await this.cleanup();
  3873                      throw new i.XRefParseException();
  3874                    }
  3875                  }
  3876              }
  3877              async checkLastPage(e = !1) {
  3878                const { catalog: t, pdfManager: a } = this;
  3879                t.setActualNumPages();
  3880                let n;
  3881                try {
  3882                  await Promise.all([
  3883                    a.ensureDoc("xfaFactory"),
  3884                    a.ensureDoc("linearization"),
  3885                    a.ensureCatalog("numPages"),
  3886                  ]);
  3887                  if (this.xfaFactory) return;
  3888                  n = this.linearization
  3889                    ? this.linearization.numPages
  3890                    : t.numPages;
  3891                  if (!Number.isInteger(n))
  3892                    throw new r.FormatError("Page count is not an integer.");
  3893                  if (n <= 1) return;
  3894                  await this.getPage(n - 1);
  3895                } catch (s) {
  3896                  this._pagePromises.delete(n - 1);
  3897                  await this.cleanup();
  3898                  if (s instanceof i.XRefEntryException && !e)
  3899                    throw new i.XRefParseException();
  3900                  (0, r.warn)(
  3901                    `checkLastPage - invalid /Pages tree /Count: ${n}.`,
  3902                  );
  3903                  let o;
  3904                  try {
  3905                    o = await t.getAllPageDicts(e);
  3906                  } catch (a) {
  3907                    if (a instanceof i.XRefEntryException && !e)
  3908                      throw new i.XRefParseException();
  3909                    t.setActualNumPages(1);
  3910                    return;
  3911                  }
  3912                  for (const [e, [r, n]] of o) {
  3913                    let i;
  3914                    if (r instanceof Error) {
  3915                      i = Promise.reject(r);
  3916                      i.catch(() => {});
  3917                    } else
  3918                      i = Promise.resolve(
  3919                        new Page({
  3920                          pdfManager: a,
  3921                          xref: this.xref,
  3922                          pageIndex: e,
  3923                          pageDict: r,
  3924                          ref: n,
  3925                          globalIdFactory: this._globalIdFactory,
  3926                          fontCache: t.fontCache,
  3927                          builtInCMapCache: t.builtInCMapCache,
  3928                          standardFontDataCache: t.standardFontDataCache,
  3929                          globalImageCache: t.globalImageCache,
  3930                          systemFontCache: t.systemFontCache,
  3931                          nonBlendModesSet: t.nonBlendModesSet,
  3932                          xfaFactory: null,
  3933                        }),
  3934                      );
  3935                    this._pagePromises.set(e, i);
  3936                  }
  3937                  t.setActualNumPages(o.size);
  3938                }
  3939              }
  3940              fontFallback(e, t) {
  3941                return this.catalog.fontFallback(e, t);
  3942              }
  3943              async cleanup(e = !1) {
  3944                return this.catalog
  3945                  ? this.catalog.cleanup(e)
  3946                  : (0, u.clearGlobalCaches)();
  3947              }
  3948              #a(e, t, a, i) {
  3949                const s = this.xref.fetchIfRef(t);
  3950                if (s.has("T")) {
  3951                  const t = (0, r.stringToPDFString)(s.get("T"));
  3952                  e = "" === e ? t : `${e}.${t}`;
  3953                }
  3954                a.has(e) || a.set(e, []);
  3955                a.get(e).push(
  3956                  n.AnnotationFactory.create(
  3957                    this.xref,
  3958                    t,
  3959                    i,
  3960                    this._localIdFactory,
  3961                    !0,
  3962                    null,
  3963                  )
  3964                    .then((e) => e?.getFieldObject())
  3965                    .catch(function (e) {
  3966                      (0, r.warn)(`#collectFieldObjects: "${e}".`);
  3967                      return null;
  3968                    }),
  3969                );
  3970                if (s.has("Kids"))
  3971                  for (const t of s.get("Kids")) this.#a(e, t, a, i);
  3972              }
  3973              get fieldObjects() {
  3974                if (!this.formInfo.hasFields)
  3975                  return (0, r.shadow)(
  3976                    this,
  3977                    "fieldObjects",
  3978                    Promise.resolve(null),
  3979                  );
  3980                const e = this.pdfManager
  3981                  .ensureDoc("annotationGlobals")
  3982                  .then(async (e) => {
  3983                    if (!e) return null;
  3984                    const t = Object.create(null),
  3985                      a = new Map();
  3986                    for (const t of this.catalog.acroForm.get("Fields"))
  3987                      this.#a("", t, a, e);
  3988                    const r = [];
  3989                    for (const [e, n] of a)
  3990                      r.push(
  3991                        Promise.all(n).then((a) => {
  3992                          (a = a.filter((e) => !!e)).length > 0 && (t[e] = a);
  3993                        }),
  3994                      );
  3995                    await Promise.all(r);
  3996                    return t;
  3997                  });
  3998                return (0, r.shadow)(this, "fieldObjects", e);
  3999              }
  4000              get hasJSActions() {
  4001                const e = this.pdfManager.ensureDoc("_parseHasJSActions");
  4002                return (0, r.shadow)(this, "hasJSActions", e);
  4003              }
  4004              async _parseHasJSActions() {
  4005                const [e, t] = await Promise.all([
  4006                  this.pdfManager.ensureCatalog("jsActions"),
  4007                  this.pdfManager.ensureDoc("fieldObjects"),
  4008                ]);
  4009                return (
  4010                  !!e ||
  4011                  (!!t &&
  4012                    Object.values(t).some((e) =>
  4013                      e.some((e) => null !== e.actions),
  4014                    ))
  4015                );
  4016              }
  4017              get calculationOrderIds() {
  4018                const e = this.catalog.acroForm;
  4019                if (!e?.has("CO"))
  4020                  return (0, r.shadow)(this, "calculationOrderIds", null);
  4021                const t = e.get("CO");
  4022                if (!Array.isArray(t) || 0 === t.length)
  4023                  return (0, r.shadow)(this, "calculationOrderIds", null);
  4024                const a = [];
  4025                for (const e of t) e instanceof s.Ref && a.push(e.toString());
  4026                return 0 === a.length
  4027                  ? (0, r.shadow)(this, "calculationOrderIds", null)
  4028                  : (0, r.shadow)(this, "calculationOrderIds", a);
  4029              }
  4030              get annotationGlobals() {
  4031                return (0, r.shadow)(
  4032                  this,
  4033                  "annotationGlobals",
  4034                  n.AnnotationFactory.createGlobals(this.pdfManager),
  4035                );
  4036              }
  4037            };
  4038          },
  4039          (e, t, a) => {
  4040            Object.defineProperty(t, "__esModule", { value: !0 });
  4041            t.PopupAnnotation =
  4042              t.MarkupAnnotation =
  4043              t.AnnotationFactory =
  4044              t.AnnotationBorderStyle =
  4045              t.Annotation =
  4046                void 0;
  4047            t.getQuadPoints = getQuadPoints;
  4048            var r = a(2),
  4049              n = a(3),
  4050              i = a(11),
  4051              s = a(4),
  4052              o = a(8),
  4053              c = a(5),
  4054              l = a(60),
  4055              h = a(66),
  4056              u = a(12),
  4057              d = a(69),
  4058              f = a(26),
  4059              g = a(76),
  4060              p = a(64),
  4061              m = a(73),
  4062              b = a(77);
  4063            t.AnnotationFactory = class AnnotationFactory {
  4064              static createGlobals(e) {
  4065                return Promise.all([
  4066                  e.ensureCatalog("acroForm"),
  4067                  e.ensureDoc("xfaDatasets"),
  4068                  e.ensureCatalog("structTreeRoot"),
  4069                  e.ensureCatalog("baseUrl"),
  4070                  e.ensureCatalog("attachments"),
  4071                ]).then(
  4072                  ([t, a, r, n, i]) => ({
  4073                    pdfManager: e,
  4074                    acroForm: t instanceof s.Dict ? t : s.Dict.empty,
  4075                    xfaDatasets: a,
  4076                    structTreeRoot: r,
  4077                    baseUrl: n,
  4078                    attachments: i,
  4079                  }),
  4080                  (e) => {
  4081                    (0, r.warn)(`createGlobals: "${e}".`);
  4082                    return null;
  4083                  },
  4084                );
  4085              }
  4086              static async create(e, t, a, r, n, i) {
  4087                const s = n ? await this._getPageIndex(e, t, a.pdfManager) : null;
  4088                return a.pdfManager.ensure(this, "_create", [
  4089                  e,
  4090                  t,
  4091                  a,
  4092                  r,
  4093                  n,
  4094                  s,
  4095                  i,
  4096                ]);
  4097              }
  4098              static _create(e, t, a, i, o = !1, c = null, l = null) {
  4099                const h = e.fetchIfRef(t);
  4100                if (!(h instanceof s.Dict)) return;
  4101                const { acroForm: u, pdfManager: d } = a,
  4102                  f =
  4103                    t instanceof s.Ref
  4104                      ? t.toString()
  4105                      : `annot_${i.createObjId()}`;
  4106                let g = h.get("Subtype");
  4107                g = g instanceof s.Name ? g.name : null;
  4108                const p = {
  4109                  xref: e,
  4110                  ref: t,
  4111                  dict: h,
  4112                  subtype: g,
  4113                  id: f,
  4114                  annotationGlobals: a,
  4115                  collectFields: o,
  4116                  needAppearances: !o && !0 === u.get("NeedAppearances"),
  4117                  pageIndex: c,
  4118                  evaluatorOptions: d.evaluatorOptions,
  4119                  pageRef: l,
  4120                };
  4121                switch (g) {
  4122                  case "Link":
  4123                    return new LinkAnnotation(p);
  4124                  case "Text":
  4125                    return new TextAnnotation(p);
  4126                  case "Widget":
  4127                    let e = (0, n.getInheritableProperty)({ dict: h, key: "FT" });
  4128                    e = e instanceof s.Name ? e.name : null;
  4129                    switch (e) {
  4130                      case "Tx":
  4131                        return new TextWidgetAnnotation(p);
  4132                      case "Btn":
  4133                        return new ButtonWidgetAnnotation(p);
  4134                      case "Ch":
  4135                        return new ChoiceWidgetAnnotation(p);
  4136                      case "Sig":
  4137                        return new SignatureWidgetAnnotation(p);
  4138                    }
  4139                    (0, r.warn)(
  4140                      `Unimplemented widget field type "${e}", falling back to base field type.`,
  4141                    );
  4142                    return new WidgetAnnotation(p);
  4143                  case "Popup":
  4144                    return new PopupAnnotation(p);
  4145                  case "FreeText":
  4146                    return new FreeTextAnnotation(p);
  4147                  case "Line":
  4148                    return new LineAnnotation(p);
  4149                  case "Square":
  4150                    return new SquareAnnotation(p);
  4151                  case "Circle":
  4152                    return new CircleAnnotation(p);
  4153                  case "PolyLine":
  4154                    return new PolylineAnnotation(p);
  4155                  case "Polygon":
  4156                    return new PolygonAnnotation(p);
  4157                  case "Caret":
  4158                    return new CaretAnnotation(p);
  4159                  case "Ink":
  4160                    return new InkAnnotation(p);
  4161                  case "Highlight":
  4162                    return new HighlightAnnotation(p);
  4163                  case "Underline":
  4164                    return new UnderlineAnnotation(p);
  4165                  case "Squiggly":
  4166                    return new SquigglyAnnotation(p);
  4167                  case "StrikeOut":
  4168                    return new StrikeOutAnnotation(p);
  4169                  case "Stamp":
  4170                    return new StampAnnotation(p);
  4171                  case "FileAttachment":
  4172                    return new FileAttachmentAnnotation(p);
  4173                  default:
  4174                    o ||
  4175                      (g
  4176                        ? (0, r.warn)(
  4177                            `Unimplemented annotation type "${g}", falling back to base annotation.`,
  4178                          )
  4179                        : (0, r.warn)(
  4180                            "Annotation is missing the required /Subtype.",
  4181                          ));
  4182                    return new Annotation(p);
  4183                }
  4184              }
  4185              static async _getPageIndex(e, t, a) {
  4186                try {
  4187                  const n = await e.fetchIfRefAsync(t);
  4188                  if (!(n instanceof s.Dict)) return -1;
  4189                  const i = n.getRaw("P");
  4190                  if (i instanceof s.Ref)
  4191                    try {
  4192                      return await a.ensureCatalog("getPageIndex", [i]);
  4193                    } catch (e) {
  4194                      (0, r.info)(
  4195                        `_getPageIndex -- not a valid page reference: "${e}".`,
  4196                      );
  4197                    }
  4198                  if (n.has("Kids")) return -1;
  4199                  const o = await a.ensureDoc("numPages");
  4200                  for (let e = 0; e < o; e++) {
  4201                    const r = await a.getPage(e),
  4202                      n = await a.ensure(r, "annotations");
  4203                    for (const a of n)
  4204                      if (a instanceof s.Ref && (0, s.isRefsEqual)(a, t))
  4205                        return e;
  4206                  }
  4207                } catch (e) {
  4208                  (0, r.warn)(`_getPageIndex: "${e}".`);
  4209                }
  4210                return -1;
  4211              }
  4212              static generateImages(e, t, a) {
  4213                if (!a) {
  4214                  (0, r.warn)(
  4215                    "generateImages: OffscreenCanvas is not supported, cannot save or print some annotations with images.",
  4216                  );
  4217                  return null;
  4218                }
  4219                let n;
  4220                for (const { bitmapId: a, bitmap: r } of e)
  4221                  if (r) {
  4222                    n ||= new Map();
  4223                    n.set(a, StampAnnotation.createImage(r, t));
  4224                  }
  4225                return n;
  4226              }
  4227              static async saveNewAnnotations(e, t, a, n) {
  4228                const i = e.xref;
  4229                let o;
  4230                const c = [],
  4231                  l = [],
  4232                  { isOffscreenCanvasSupported: h } = e.options;
  4233                for (const u of a)
  4234                  if (!u.deleted)
  4235                    switch (u.annotationType) {
  4236                      case r.AnnotationEditorType.FREETEXT:
  4237                        if (!o) {
  4238                          const e = new s.Dict(i);
  4239                          e.set("BaseFont", s.Name.get("Helvetica"));
  4240                          e.set("Type", s.Name.get("Font"));
  4241                          e.set("Subtype", s.Name.get("Type1"));
  4242                          e.set("Encoding", s.Name.get("WinAnsiEncoding"));
  4243                          const t = [];
  4244                          o = i.getNewTemporaryRef();
  4245                          await (0, m.writeObject)(o, e, t, i);
  4246                          c.push({ ref: o, data: t.join("") });
  4247                        }
  4248                        l.push(
  4249                          FreeTextAnnotation.createNewAnnotation(i, u, c, {
  4250                            evaluator: e,
  4251                            task: t,
  4252                            baseFontRef: o,
  4253                          }),
  4254                        );
  4255                        break;
  4256                      case r.AnnotationEditorType.INK:
  4257                        l.push(InkAnnotation.createNewAnnotation(i, u, c));
  4258                        break;
  4259                      case r.AnnotationEditorType.STAMP:
  4260                        if (!h) break;
  4261                        const a = await n.get(u.bitmapId);
  4262                        if (a.imageStream) {
  4263                          const { imageStream: e, smaskStream: t } = a,
  4264                            r = [];
  4265                          if (t) {
  4266                            const a = i.getNewTemporaryRef();
  4267                            await (0, m.writeObject)(a, t, r, i);
  4268                            c.push({ ref: a, data: r.join("") });
  4269                            e.dict.set("SMask", a);
  4270                            r.length = 0;
  4271                          }
  4272                          const n = (a.imageRef = i.getNewTemporaryRef());
  4273                          await (0, m.writeObject)(n, e, r, i);
  4274                          c.push({ ref: n, data: r.join("") });
  4275                          a.imageStream = a.smaskStream = null;
  4276                        }
  4277                        l.push(
  4278                          StampAnnotation.createNewAnnotation(i, u, c, {
  4279                            image: a,
  4280                          }),
  4281                        );
  4282                    }
  4283                return { annotations: await Promise.all(l), dependencies: c };
  4284              }
  4285              static async printNewAnnotations(e, t, a, n, i) {
  4286                if (!n) return null;
  4287                const { options: s, xref: o } = t,
  4288                  c = [];
  4289                for (const l of n)
  4290                  if (!l.deleted)
  4291                    switch (l.annotationType) {
  4292                      case r.AnnotationEditorType.FREETEXT:
  4293                        c.push(
  4294                          FreeTextAnnotation.createNewPrintAnnotation(e, o, l, {
  4295                            evaluator: t,
  4296                            task: a,
  4297                            evaluatorOptions: s,
  4298                          }),
  4299                        );
  4300                        break;
  4301                      case r.AnnotationEditorType.INK:
  4302                        c.push(
  4303                          InkAnnotation.createNewPrintAnnotation(e, o, l, {
  4304                            evaluatorOptions: s,
  4305                          }),
  4306                        );
  4307                        break;
  4308                      case r.AnnotationEditorType.STAMP:
  4309                        if (!s.isOffscreenCanvasSupported) break;
  4310                        const n = await i.get(l.bitmapId);
  4311                        if (n.imageStream) {
  4312                          const { imageStream: e, smaskStream: t } = n;
  4313                          t && e.dict.set("SMask", t);
  4314                          n.imageRef = new f.JpegStream(e, e.length);
  4315                          n.imageStream = n.smaskStream = null;
  4316                        }
  4317                        c.push(
  4318                          StampAnnotation.createNewPrintAnnotation(e, o, l, {
  4319                            image: n,
  4320                            evaluatorOptions: s,
  4321                          }),
  4322                        );
  4323                    }
  4324                return Promise.all(c);
  4325              }
  4326            };
  4327            function getRgbColor(e, t = new Uint8ClampedArray(3)) {
  4328              if (!Array.isArray(e)) return t;
  4329              const a = t || new Uint8ClampedArray(3);
  4330              switch (e.length) {
  4331                case 0:
  4332                  return null;
  4333                case 1:
  4334                  u.ColorSpace.singletons.gray.getRgbItem(e, 0, a, 0);
  4335                  return a;
  4336                case 3:
  4337                  u.ColorSpace.singletons.rgb.getRgbItem(e, 0, a, 0);
  4338                  return a;
  4339                case 4:
  4340                  u.ColorSpace.singletons.cmyk.getRgbItem(e, 0, a, 0);
  4341                  return a;
  4342                default:
  4343                  return t;
  4344              }
  4345            }
  4346            function getPdfColorArray(e) {
  4347              return Array.from(e, (e) => e / 255);
  4348            }
  4349            function getQuadPoints(e, t) {
  4350              const a = e.getArray("QuadPoints");
  4351              if (!Array.isArray(a) || 0 === a.length || a.length % 8 > 0)
  4352                return null;
  4353              const r = [];
  4354              for (let e = 0, n = a.length / 8; e < n; e++) {
  4355                let n = 1 / 0,
  4356                  i = -1 / 0,
  4357                  s = 1 / 0,
  4358                  o = -1 / 0;
  4359                for (let t = 8 * e, r = 8 * e + 8; t < r; t += 2) {
  4360                  const e = a[t],
  4361                    r = a[t + 1];
  4362                  n = Math.min(e, n);
  4363                  i = Math.max(e, i);
  4364                  s = Math.min(r, s);
  4365                  o = Math.max(r, o);
  4366                }
  4367                if (null !== t && (n < t[0] || i > t[2] || s < t[1] || o > t[3]))
  4368                  return null;
  4369                r.push([
  4370                  { x: n, y: o },
  4371                  { x: i, y: o },
  4372                  { x: n, y: s },
  4373                  { x: i, y: s },
  4374                ]);
  4375              }
  4376              return r;
  4377            }
  4378            function getTransformMatrix(e, t, a) {
  4379              const [n, i, s, o] = r.Util.getAxialAlignedBoundingBox(t, a);
  4380              if (n === s || i === o) return [1, 0, 0, 1, e[0], e[1]];
  4381              const c = (e[2] - e[0]) / (s - n),
  4382                l = (e[3] - e[1]) / (o - i);
  4383              return [c, 0, 0, l, e[0] - n * c, e[1] - i * l];
  4384            }
  4385            class Annotation {
  4386              constructor(e) {
  4387                const { dict: t, xref: a, annotationGlobals: i } = e;
  4388                this.setTitle(t.get("T"));
  4389                this.setContents(t.get("Contents"));
  4390                this.setModificationDate(t.get("M"));
  4391                this.setFlags(t.get("F"));
  4392                this.setRectangle(t.getArray("Rect"));
  4393                this.setColor(t.getArray("C"));
  4394                this.setBorderStyle(t);
  4395                this.setAppearance(t);
  4396                this.setOptionalContent(t);
  4397                const o = t.get("MK");
  4398                this.setBorderAndBackgroundColors(o);
  4399                this.setRotation(o, t);
  4400                this.ref = e.ref instanceof s.Ref ? e.ref : null;
  4401                this._streams = [];
  4402                this.appearance && this._streams.push(this.appearance);
  4403                const c = !!(this.flags & r.AnnotationFlag.LOCKED),
  4404                  l = !!(this.flags & r.AnnotationFlag.LOCKEDCONTENTS);
  4405                if (i.structTreeRoot) {
  4406                  let a = t.get("StructParent");
  4407                  a = Number.isInteger(a) && a >= 0 ? a : -1;
  4408                  i.structTreeRoot.addAnnotationIdToPage(e.pageRef, a);
  4409                }
  4410                this.data = {
  4411                  annotationFlags: this.flags,
  4412                  borderStyle: this.borderStyle,
  4413                  color: this.color,
  4414                  backgroundColor: this.backgroundColor,
  4415                  borderColor: this.borderColor,
  4416                  rotation: this.rotation,
  4417                  contentsObj: this._contents,
  4418                  hasAppearance: !!this.appearance,
  4419                  id: e.id,
  4420                  modificationDate: this.modificationDate,
  4421                  rect: this.rectangle,
  4422                  subtype: e.subtype,
  4423                  hasOwnCanvas: !1,
  4424                  noRotate: !!(this.flags & r.AnnotationFlag.NOROTATE),
  4425                  noHTML: c && l,
  4426                };
  4427                if (e.collectFields) {
  4428                  const i = t.get("Kids");
  4429                  if (Array.isArray(i)) {
  4430                    const e = [];
  4431                    for (const t of i) t instanceof s.Ref && e.push(t.toString());
  4432                    0 !== e.length && (this.data.kidIds = e);
  4433                  }
  4434                  this.data.actions = (0, n.collectActions)(
  4435                    a,
  4436                    t,
  4437                    r.AnnotationActionEventType,
  4438                  );
  4439                  this.data.fieldName = this._constructFieldName(t);
  4440                  this.data.pageIndex = e.pageIndex;
  4441                }
  4442                this._isOffscreenCanvasSupported =
  4443                  e.evaluatorOptions.isOffscreenCanvasSupported;
  4444                this._fallbackFontDict = null;
  4445                this._needAppearances = !1;
  4446              }
  4447              _hasFlag(e, t) {
  4448                return !!(e & t);
  4449              }
  4450              _isViewable(e) {
  4451                return (
  4452                  !this._hasFlag(e, r.AnnotationFlag.INVISIBLE) &&
  4453                  !this._hasFlag(e, r.AnnotationFlag.NOVIEW)
  4454                );
  4455              }
  4456              _isPrintable(e) {
  4457                return (
  4458                  this._hasFlag(e, r.AnnotationFlag.PRINT) &&
  4459                  !this._hasFlag(e, r.AnnotationFlag.HIDDEN) &&
  4460                  !this._hasFlag(e, r.AnnotationFlag.INVISIBLE)
  4461                );
  4462              }
  4463              mustBeViewed(e, t) {
  4464                const a = e?.get(this.data.id)?.noView;
  4465                return void 0 !== a
  4466                  ? !a
  4467                  : this.viewable &&
  4468                      !this._hasFlag(this.flags, r.AnnotationFlag.HIDDEN);
  4469              }
  4470              mustBePrinted(e) {
  4471                const t = e?.get(this.data.id)?.noPrint;
  4472                return void 0 !== t ? !t : this.printable;
  4473              }
  4474              get viewable() {
  4475                return (
  4476                  null !== this.data.quadPoints &&
  4477                  (0 === this.flags || this._isViewable(this.flags))
  4478                );
  4479              }
  4480              get printable() {
  4481                return (
  4482                  null !== this.data.quadPoints &&
  4483                  0 !== this.flags &&
  4484                  this._isPrintable(this.flags)
  4485                );
  4486              }
  4487              _parseStringHelper(e) {
  4488                const t = "string" == typeof e ? (0, r.stringToPDFString)(e) : "";
  4489                return {
  4490                  str: t,
  4491                  dir: t && "rtl" === (0, l.bidi)(t).dir ? "rtl" : "ltr",
  4492                };
  4493              }
  4494              setDefaultAppearance(e) {
  4495                const { dict: t, annotationGlobals: a } = e,
  4496                  r =
  4497                    (0, n.getInheritableProperty)({ dict: t, key: "DA" }) ||
  4498                    a.acroForm.get("DA");
  4499                this._defaultAppearance = "string" == typeof r ? r : "";
  4500                this.data.defaultAppearanceData = (0, i.parseDefaultAppearance)(
  4501                  this._defaultAppearance,
  4502                );
  4503              }
  4504              setTitle(e) {
  4505                this._title = this._parseStringHelper(e);
  4506              }
  4507              setContents(e) {
  4508                this._contents = this._parseStringHelper(e);
  4509              }
  4510              setModificationDate(e) {
  4511                this.modificationDate = "string" == typeof e ? e : null;
  4512              }
  4513              setFlags(e) {
  4514                this.flags = Number.isInteger(e) && e > 0 ? e : 0;
  4515              }
  4516              hasFlag(e) {
  4517                return this._hasFlag(this.flags, e);
  4518              }
  4519              setRectangle(e) {
  4520                this.rectangle =
  4521                  Array.isArray(e) && 4 === e.length
  4522                    ? r.Util.normalizeRect(e)
  4523                    : [0, 0, 0, 0];
  4524              }
  4525              setColor(e) {
  4526                this.color = getRgbColor(e);
  4527              }
  4528              setLineEndings(e) {
  4529                this.lineEndings = ["None", "None"];
  4530                if (Array.isArray(e) && 2 === e.length)
  4531                  for (let t = 0; t < 2; t++) {
  4532                    const a = e[t];
  4533                    if (a instanceof s.Name)
  4534                      switch (a.name) {
  4535                        case "None":
  4536                          continue;
  4537                        case "Square":
  4538                        case "Circle":
  4539                        case "Diamond":
  4540                        case "OpenArrow":
  4541                        case "ClosedArrow":
  4542                        case "Butt":
  4543                        case "ROpenArrow":
  4544                        case "RClosedArrow":
  4545                        case "Slash":
  4546                          this.lineEndings[t] = a.name;
  4547                          continue;
  4548                      }
  4549                    (0, r.warn)(`Ignoring invalid lineEnding: ${a}`);
  4550                  }
  4551              }
  4552              setRotation(e, t) {
  4553                this.rotation = 0;
  4554                let a =
  4555                  e instanceof s.Dict ? e.get("R") || 0 : t.get("Rotate") || 0;
  4556                if (Number.isInteger(a) && 0 !== a) {
  4557                  a %= 360;
  4558                  a < 0 && (a += 360);
  4559                  a % 90 == 0 && (this.rotation = a);
  4560                }
  4561              }
  4562              setBorderAndBackgroundColors(e) {
  4563                if (e instanceof s.Dict) {
  4564                  this.borderColor = getRgbColor(e.getArray("BC"), null);
  4565                  this.backgroundColor = getRgbColor(e.getArray("BG"), null);
  4566                } else this.borderColor = this.backgroundColor = null;
  4567              }
  4568              setBorderStyle(e) {
  4569                this.borderStyle = new AnnotationBorderStyle();
  4570                if (e instanceof s.Dict)
  4571                  if (e.has("BS")) {
  4572                    const t = e.get("BS"),
  4573                      a = t.get("Type");
  4574                    if (!a || (0, s.isName)(a, "Border")) {
  4575                      this.borderStyle.setWidth(t.get("W"), this.rectangle);
  4576                      this.borderStyle.setStyle(t.get("S"));
  4577                      this.borderStyle.setDashArray(t.getArray("D"));
  4578                    }
  4579                  } else if (e.has("Border")) {
  4580                    const t = e.getArray("Border");
  4581                    if (Array.isArray(t) && t.length >= 3) {
  4582                      this.borderStyle.setHorizontalCornerRadius(t[0]);
  4583                      this.borderStyle.setVerticalCornerRadius(t[1]);
  4584                      this.borderStyle.setWidth(t[2], this.rectangle);
  4585                      4 === t.length && this.borderStyle.setDashArray(t[3], !0);
  4586                    }
  4587                  } else this.borderStyle.setWidth(0);
  4588              }
  4589              setAppearance(e) {
  4590                this.appearance = null;
  4591                const t = e.get("AP");
  4592                if (!(t instanceof s.Dict)) return;
  4593                const a = t.get("N");
  4594                if (a instanceof c.BaseStream) {
  4595                  this.appearance = a;
  4596                  return;
  4597                }
  4598                if (!(a instanceof s.Dict)) return;
  4599                const r = e.get("AS");
  4600                if (!(r instanceof s.Name && a.has(r.name))) return;
  4601                const n = a.get(r.name);
  4602                n instanceof c.BaseStream && (this.appearance = n);
  4603              }
  4604              setOptionalContent(e) {
  4605                this.oc = null;
  4606                const t = e.get("OC");
  4607                t instanceof s.Name
  4608                  ? (0, r.warn)(
  4609                      "setOptionalContent: Support for /Name-entry is not implemented.",
  4610                    )
  4611                  : t instanceof s.Dict && (this.oc = t);
  4612              }
  4613              loadResources(e, t) {
  4614                return t.dict.getAsync("Resources").then((t) => {
  4615                  if (!t) return;
  4616                  return new g.ObjectLoader(t, e, t.xref)
  4617                    .load()
  4618                    .then(function () {
  4619                      return t;
  4620                    });
  4621                });
  4622              }
  4623              async getOperatorList(e, t, a, n, i) {
  4624                const c = this.data;
  4625                let l = this.appearance;
  4626                const h = !!(
  4627                  this.data.hasOwnCanvas && a & r.RenderingIntentFlag.DISPLAY
  4628                );
  4629                if (!l) {
  4630                  if (!h)
  4631                    return {
  4632                      opList: new p.OperatorList(),
  4633                      separateForm: !1,
  4634                      separateCanvas: !1,
  4635                    };
  4636                  l = new o.StringStream("");
  4637                  l.dict = new s.Dict();
  4638                }
  4639                const u = l.dict,
  4640                  d = await this.loadResources(
  4641                    [
  4642                      "ExtGState",
  4643                      "ColorSpace",
  4644                      "Pattern",
  4645                      "Shading",
  4646                      "XObject",
  4647                      "Font",
  4648                    ],
  4649                    l,
  4650                  ),
  4651                  f = u.getArray("BBox") || [0, 0, 1, 1],
  4652                  g = u.getArray("Matrix") || [1, 0, 0, 1, 0, 0],
  4653                  m = getTransformMatrix(c.rect, f, g),
  4654                  b = new p.OperatorList();
  4655                let y;
  4656                this.oc && (y = await e.parseMarkedContentProps(this.oc, null));
  4657                void 0 !== y && b.addOp(r.OPS.beginMarkedContentProps, ["OC", y]);
  4658                b.addOp(r.OPS.beginAnnotation, [c.id, c.rect, m, g, h]);
  4659                await e.getOperatorList({
  4660                  stream: l,
  4661                  task: t,
  4662                  resources: d,
  4663                  operatorList: b,
  4664                  fallbackFontDict: this._fallbackFontDict,
  4665                });
  4666                b.addOp(r.OPS.endAnnotation, []);
  4667                void 0 !== y && b.addOp(r.OPS.endMarkedContent, []);
  4668                this.reset();
  4669                return { opList: b, separateForm: !1, separateCanvas: h };
  4670              }
  4671              async save(e, t, a) {
  4672                return null;
  4673              }
  4674              get hasTextContent() {
  4675                return !1;
  4676              }
  4677              async extractTextContent(e, t, a) {
  4678                if (!this.appearance) return;
  4679                const n = await this.loadResources(
  4680                    ["ExtGState", "Font", "Properties", "XObject"],
  4681                    this.appearance,
  4682                  ),
  4683                  i = [],
  4684                  s = [];
  4685                let o = null;
  4686                const c = {
  4687                  desiredSize: Math.Infinity,
  4688                  ready: !0,
  4689                  enqueue(e, t) {
  4690                    for (const t of e.items)
  4691                      if (void 0 !== t.str) {
  4692                        o ||= t.transform.slice(-2);
  4693                        s.push(t.str);
  4694                        if (t.hasEOL) {
  4695                          i.push(s.join(""));
  4696                          s.length = 0;
  4697                        }
  4698                      }
  4699                  },
  4700                };
  4701                await e.getTextContent({
  4702                  stream: this.appearance,
  4703                  task: t,
  4704                  resources: n,
  4705                  includeMarkedContent: !0,
  4706                  sink: c,
  4707                  viewBox: a,
  4708                });
  4709                this.reset();
  4710                s.length && i.push(s.join(""));
  4711                if (i.length > 1 || i[0]) {
  4712                  const e = this.appearance.dict,
  4713                    t = e.getArray("BBox") || [0, 0, 1, 1],
  4714                    a = e.getArray("Matrix") || [1, 0, 0, 1, 0, 0],
  4715                    n = this.data.rect,
  4716                    s = getTransformMatrix(n, t, a);
  4717                  s[4] -= n[0];
  4718                  s[5] -= n[1];
  4719                  o = r.Util.applyTransform(o, s);
  4720                  o = r.Util.applyTransform(o, a);
  4721                  this.data.textPosition = o;
  4722                  this.data.textContent = i;
  4723                }
  4724              }
  4725              getFieldObject() {
  4726                return this.data.kidIds
  4727                  ? {
  4728                      id: this.data.id,
  4729                      actions: this.data.actions,
  4730                      name: this.data.fieldName,
  4731                      strokeColor: this.data.borderColor,
  4732                      fillColor: this.data.backgroundColor,
  4733                      type: "",
  4734                      kidIds: this.data.kidIds,
  4735                      page: this.data.pageIndex,
  4736                      rotation: this.rotation,
  4737                    }
  4738                  : null;
  4739              }
  4740              reset() {
  4741                for (const e of this._streams) e.reset();
  4742              }
  4743              _constructFieldName(e) {
  4744                if (!e.has("T") && !e.has("Parent")) {
  4745                  (0, r.warn)(
  4746                    "Unknown field name, falling back to empty field name.",
  4747                  );
  4748                  return "";
  4749                }
  4750                if (!e.has("Parent")) return (0, r.stringToPDFString)(e.get("T"));
  4751                const t = [];
  4752                e.has("T") && t.unshift((0, r.stringToPDFString)(e.get("T")));
  4753                let a = e;
  4754                const n = new s.RefSet();
  4755                e.objId && n.put(e.objId);
  4756                for (; a.has("Parent"); ) {
  4757                  a = a.get("Parent");
  4758                  if (!(a instanceof s.Dict) || (a.objId && n.has(a.objId)))
  4759                    break;
  4760                  a.objId && n.put(a.objId);
  4761                  a.has("T") && t.unshift((0, r.stringToPDFString)(a.get("T")));
  4762                }
  4763                return t.join(".");
  4764              }
  4765            }
  4766            t.Annotation = Annotation;
  4767            class AnnotationBorderStyle {
  4768              constructor() {
  4769                this.width = 1;
  4770                this.style = r.AnnotationBorderStyleType.SOLID;
  4771                this.dashArray = [3];
  4772                this.horizontalCornerRadius = 0;
  4773                this.verticalCornerRadius = 0;
  4774              }
  4775              setWidth(e, t = [0, 0, 0, 0]) {
  4776                if (e instanceof s.Name) this.width = 0;
  4777                else if ("number" == typeof e) {
  4778                  if (e > 0) {
  4779                    const a = (t[2] - t[0]) / 2,
  4780                      n = (t[3] - t[1]) / 2;
  4781                    if (a > 0 && n > 0 && (e > a || e > n)) {
  4782                      (0, r.warn)(
  4783                        `AnnotationBorderStyle.setWidth - ignoring width: ${e}`,
  4784                      );
  4785                      e = 1;
  4786                    }
  4787                  }
  4788                  this.width = e;
  4789                }
  4790              }
  4791              setStyle(e) {
  4792                if (e instanceof s.Name)
  4793                  switch (e.name) {
  4794                    case "S":
  4795                      this.style = r.AnnotationBorderStyleType.SOLID;
  4796                      break;
  4797                    case "D":
  4798                      this.style = r.AnnotationBorderStyleType.DASHED;
  4799                      break;
  4800                    case "B":
  4801                      this.style = r.AnnotationBorderStyleType.BEVELED;
  4802                      break;
  4803                    case "I":
  4804                      this.style = r.AnnotationBorderStyleType.INSET;
  4805                      break;
  4806                    case "U":
  4807                      this.style = r.AnnotationBorderStyleType.UNDERLINE;
  4808                  }
  4809              }
  4810              setDashArray(e, t = !1) {
  4811                if (Array.isArray(e) && e.length > 0) {
  4812                  let a = !0,
  4813                    r = !0;
  4814                  for (const t of e) {
  4815                    if (!(+t >= 0)) {
  4816                      a = !1;
  4817                      break;
  4818                    }
  4819                    t > 0 && (r = !1);
  4820                  }
  4821                  if (a && !r) {
  4822                    this.dashArray = e;
  4823                    t && this.setStyle(s.Name.get("D"));
  4824                  } else this.width = 0;
  4825                } else e && (this.width = 0);
  4826              }
  4827              setHorizontalCornerRadius(e) {
  4828                Number.isInteger(e) && (this.horizontalCornerRadius = e);
  4829              }
  4830              setVerticalCornerRadius(e) {
  4831                Number.isInteger(e) && (this.verticalCornerRadius = e);
  4832              }
  4833            }
  4834            t.AnnotationBorderStyle = AnnotationBorderStyle;
  4835            class MarkupAnnotation extends Annotation {
  4836              constructor(e) {
  4837                super(e);
  4838                const { dict: t } = e;
  4839                if (t.has("IRT")) {
  4840                  const e = t.getRaw("IRT");
  4841                  this.data.inReplyTo = e instanceof s.Ref ? e.toString() : null;
  4842                  const a = t.get("RT");
  4843                  this.data.replyType =
  4844                    a instanceof s.Name ? a.name : r.AnnotationReplyType.REPLY;
  4845                }
  4846                let a = null;
  4847                if (this.data.replyType === r.AnnotationReplyType.GROUP) {
  4848                  const e = t.get("IRT");
  4849                  this.setTitle(e.get("T"));
  4850                  this.data.titleObj = this._title;
  4851                  this.setContents(e.get("Contents"));
  4852                  this.data.contentsObj = this._contents;
  4853                  if (e.has("CreationDate")) {
  4854                    this.setCreationDate(e.get("CreationDate"));
  4855                    this.data.creationDate = this.creationDate;
  4856                  } else this.data.creationDate = null;
  4857                  if (e.has("M")) {
  4858                    this.setModificationDate(e.get("M"));
  4859                    this.data.modificationDate = this.modificationDate;
  4860                  } else this.data.modificationDate = null;
  4861                  a = e.getRaw("Popup");
  4862                  if (e.has("C")) {
  4863                    this.setColor(e.getArray("C"));
  4864                    this.data.color = this.color;
  4865                  } else this.data.color = null;
  4866                } else {
  4867                  this.data.titleObj = this._title;
  4868                  this.setCreationDate(t.get("CreationDate"));
  4869                  this.data.creationDate = this.creationDate;
  4870                  a = t.getRaw("Popup");
  4871                  t.has("C") || (this.data.color = null);
  4872                }
  4873                this.data.popupRef = a instanceof s.Ref ? a.toString() : null;
  4874                t.has("RC") &&
  4875                  (this.data.richText = b.XFAFactory.getRichTextAsHtml(
  4876                    t.get("RC"),
  4877                  ));
  4878              }
  4879              setCreationDate(e) {
  4880                this.creationDate = "string" == typeof e ? e : null;
  4881              }
  4882              _setDefaultAppearance({
  4883                xref: e,
  4884                extra: t,
  4885                strokeColor: a,
  4886                fillColor: r,
  4887                blendMode: n,
  4888                strokeAlpha: i,
  4889                fillAlpha: c,
  4890                pointsCallback: l,
  4891              }) {
  4892                let h = Number.MAX_VALUE,
  4893                  u = Number.MAX_VALUE,
  4894                  d = Number.MIN_VALUE,
  4895                  f = Number.MIN_VALUE;
  4896                const g = ["q"];
  4897                t && g.push(t);
  4898                a && g.push(`${a[0]} ${a[1]} ${a[2]} RG`);
  4899                r && g.push(`${r[0]} ${r[1]} ${r[2]} rg`);
  4900                let p = this.data.quadPoints;
  4901                p ||
  4902                  (p = [
  4903                    [
  4904                      { x: this.rectangle[0], y: this.rectangle[3] },
  4905                      { x: this.rectangle[2], y: this.rectangle[3] },
  4906                      { x: this.rectangle[0], y: this.rectangle[1] },
  4907                      { x: this.rectangle[2], y: this.rectangle[1] },
  4908                    ],
  4909                  ]);
  4910                for (const e of p) {
  4911                  const [t, a, r, n] = l(g, e);
  4912                  h = Math.min(h, t);
  4913                  d = Math.max(d, a);
  4914                  u = Math.min(u, r);
  4915                  f = Math.max(f, n);
  4916                }
  4917                g.push("Q");
  4918                const m = new s.Dict(e),
  4919                  b = new s.Dict(e);
  4920                b.set("Subtype", s.Name.get("Form"));
  4921                const y = new o.StringStream(g.join(" "));
  4922                y.dict = b;
  4923                m.set("Fm0", y);
  4924                const w = new s.Dict(e);
  4925                n && w.set("BM", s.Name.get(n));
  4926                "number" == typeof i && w.set("CA", i);
  4927                "number" == typeof c && w.set("ca", c);
  4928                const S = new s.Dict(e);
  4929                S.set("GS0", w);
  4930                const x = new s.Dict(e);
  4931                x.set("ExtGState", S);
  4932                x.set("XObject", m);
  4933                const C = new s.Dict(e);
  4934                C.set("Resources", x);
  4935                const k = (this.data.rect = [h, u, d, f]);
  4936                C.set("BBox", k);
  4937                this.appearance = new o.StringStream("/GS0 gs /Fm0 Do");
  4938                this.appearance.dict = C;
  4939                this._streams.push(this.appearance, y);
  4940              }
  4941              static async createNewAnnotation(e, t, a, r) {
  4942                const n = (t.ref ||= e.getNewTemporaryRef()),
  4943                  i = await this.createNewAppearanceStream(t, e, r),
  4944                  s = [];
  4945                let o;
  4946                if (i) {
  4947                  const r = e.getNewTemporaryRef();
  4948                  o = this.createNewDict(t, e, { apRef: r });
  4949                  await (0, m.writeObject)(r, i, s, e);
  4950                  a.push({ ref: r, data: s.join("") });
  4951                } else o = this.createNewDict(t, e, {});
  4952                Number.isInteger(t.parentTreeId) &&
  4953                  o.set("StructParent", t.parentTreeId);
  4954                s.length = 0;
  4955                await (0, m.writeObject)(n, o, s, e);
  4956                return { ref: n, data: s.join("") };
  4957              }
  4958              static async createNewPrintAnnotation(e, t, a, r) {
  4959                const n = await this.createNewAppearanceStream(a, t, r),
  4960                  i = this.createNewDict(a, t, { ap: n }),
  4961                  s = new this.prototype.constructor({
  4962                    dict: i,
  4963                    xref: t,
  4964                    annotationGlobals: e,
  4965                    evaluatorOptions: r.evaluatorOptions,
  4966                  });
  4967                a.ref && (s.ref = s.refToReplace = a.ref);
  4968                return s;
  4969              }
  4970            }
  4971            t.MarkupAnnotation = MarkupAnnotation;
  4972            class WidgetAnnotation extends Annotation {
  4973              constructor(e) {
  4974                super(e);
  4975                const { dict: t, xref: a, annotationGlobals: i } = e,
  4976                  o = this.data;
  4977                this._needAppearances = e.needAppearances;
  4978                o.annotationType = r.AnnotationType.WIDGET;
  4979                void 0 === o.fieldName &&
  4980                  (o.fieldName = this._constructFieldName(t));
  4981                void 0 === o.actions &&
  4982                  (o.actions = (0, n.collectActions)(
  4983                    a,
  4984                    t,
  4985                    r.AnnotationActionEventType,
  4986                  ));
  4987                let c = (0, n.getInheritableProperty)({
  4988                  dict: t,
  4989                  key: "V",
  4990                  getArray: !0,
  4991                });
  4992                o.fieldValue = this._decodeFormValue(c);
  4993                const l = (0, n.getInheritableProperty)({
  4994                  dict: t,
  4995                  key: "DV",
  4996                  getArray: !0,
  4997                });
  4998                o.defaultFieldValue = this._decodeFormValue(l);
  4999                if (void 0 === c && i.xfaDatasets) {
  5000                  const e = this._title.str;
  5001                  if (e) {
  5002                    this._hasValueFromXFA = !0;
  5003                    o.fieldValue = c = i.xfaDatasets.getValue(e);
  5004                  }
  5005                }
  5006                void 0 === c &&
  5007                  null !== o.defaultFieldValue &&
  5008                  (o.fieldValue = o.defaultFieldValue);
  5009                o.alternativeText = (0, r.stringToPDFString)(t.get("TU") || "");
  5010                this.setDefaultAppearance(e);
  5011                o.hasAppearance ||=
  5012                  this._needAppearances &&
  5013                  void 0 !== o.fieldValue &&
  5014                  null !== o.fieldValue;
  5015                const h = (0, n.getInheritableProperty)({ dict: t, key: "FT" });
  5016                o.fieldType = h instanceof s.Name ? h.name : null;
  5017                const u = (0, n.getInheritableProperty)({ dict: t, key: "DR" }),
  5018                  d = i.acroForm.get("DR"),
  5019                  f = this.appearance?.dict.get("Resources");
  5020                this._fieldResources = {
  5021                  localResources: u,
  5022                  acroFormResources: d,
  5023                  appearanceResources: f,
  5024                  mergedResources: s.Dict.merge({
  5025                    xref: a,
  5026                    dictArray: [u, f, d],
  5027                    mergeSubDicts: !0,
  5028                  }),
  5029                };
  5030                o.fieldFlags = (0, n.getInheritableProperty)({
  5031                  dict: t,
  5032                  key: "Ff",
  5033                });
  5034                (!Number.isInteger(o.fieldFlags) || o.fieldFlags < 0) &&
  5035                  (o.fieldFlags = 0);
  5036                o.readOnly = this.hasFieldFlag(r.AnnotationFieldFlag.READONLY);
  5037                o.required = this.hasFieldFlag(r.AnnotationFieldFlag.REQUIRED);
  5038                o.hidden =
  5039                  this._hasFlag(o.annotationFlags, r.AnnotationFlag.HIDDEN) ||
  5040                  this._hasFlag(o.annotationFlags, r.AnnotationFlag.NOVIEW);
  5041              }
  5042              _decodeFormValue(e) {
  5043                return Array.isArray(e)
  5044                  ? e
  5045                      .filter((e) => "string" == typeof e)
  5046                      .map((e) => (0, r.stringToPDFString)(e))
  5047                  : e instanceof s.Name
  5048                    ? (0, r.stringToPDFString)(e.name)
  5049                    : "string" == typeof e
  5050                      ? (0, r.stringToPDFString)(e)
  5051                      : null;
  5052              }
  5053              hasFieldFlag(e) {
  5054                return !!(this.data.fieldFlags & e);
  5055              }
  5056              _isViewable(e) {
  5057                return !this._hasFlag(e, r.AnnotationFlag.INVISIBLE);
  5058              }
  5059              mustBeViewed(e, t) {
  5060                return t
  5061                  ? this.viewable
  5062                  : super.mustBeViewed(e, t) &&
  5063                      !this._hasFlag(this.flags, r.AnnotationFlag.NOVIEW);
  5064              }
  5065              getRotationMatrix(e) {
  5066                let t = e?.get(this.data.id)?.rotation;
  5067                void 0 === t && (t = this.rotation);
  5068                if (0 === t) return r.IDENTITY_MATRIX;
  5069                const a = this.data.rect[2] - this.data.rect[0],
  5070                  i = this.data.rect[3] - this.data.rect[1];
  5071                return (0, n.getRotationMatrix)(t, a, i);
  5072              }
  5073              getBorderAndBackgroundAppearances(e) {
  5074                let t = e?.get(this.data.id)?.rotation;
  5075                void 0 === t && (t = this.rotation);
  5076                if (!this.backgroundColor && !this.borderColor) return "";
  5077                const a = this.data.rect[2] - this.data.rect[0],
  5078                  r = this.data.rect[3] - this.data.rect[1],
  5079                  n =
  5080                    0 === t || 180 === t
  5081                      ? `0 0 ${a} ${r} re`
  5082                      : `0 0 ${r} ${a} re`;
  5083                let s = "";
  5084                this.backgroundColor &&
  5085                  (s = `${(0, i.getPdfColor)(this.backgroundColor, !0)} ${n} f `);
  5086                if (this.borderColor) {
  5087                  s += `${this.borderStyle.width || 1} w ${(0, i.getPdfColor)(this.borderColor, !1)} ${n} S `;
  5088                }
  5089                return s;
  5090              }
  5091              async getOperatorList(e, t, a, n, i) {
  5092                if (
  5093                  n &&
  5094                  !(this instanceof SignatureWidgetAnnotation) &&
  5095                  !this.data.noHTML &&
  5096                  !this.data.hasOwnCanvas
  5097                )
  5098                  return {
  5099                    opList: new p.OperatorList(),
  5100                    separateForm: !0,
  5101                    separateCanvas: !1,
  5102                  };
  5103                if (!this._hasText) return super.getOperatorList(e, t, a, n, i);
  5104                const s = await this._getAppearance(e, t, a, i);
  5105                if (this.appearance && null === s)
  5106                  return super.getOperatorList(e, t, a, n, i);
  5107                const c = new p.OperatorList();
  5108                if (!this._defaultAppearance || null === s)
  5109                  return { opList: c, separateForm: !1, separateCanvas: !1 };
  5110                const l = !!(
  5111                    this.data.hasOwnCanvas && a & r.RenderingIntentFlag.DISPLAY
  5112                  ),
  5113                  h = [
  5114                    0,
  5115                    0,
  5116                    this.data.rect[2] - this.data.rect[0],
  5117                    this.data.rect[3] - this.data.rect[1],
  5118                  ],
  5119                  u = getTransformMatrix(this.data.rect, h, [1, 0, 0, 1, 0, 0]);
  5120                let d;
  5121                this.oc && (d = await e.parseMarkedContentProps(this.oc, null));
  5122                void 0 !== d && c.addOp(r.OPS.beginMarkedContentProps, ["OC", d]);
  5123                c.addOp(r.OPS.beginAnnotation, [
  5124                  this.data.id,
  5125                  this.data.rect,
  5126                  u,
  5127                  this.getRotationMatrix(i),
  5128                  l,
  5129                ]);
  5130                const f = new o.StringStream(s);
  5131                await e.getOperatorList({
  5132                  stream: f,
  5133                  task: t,
  5134                  resources: this._fieldResources.mergedResources,
  5135                  operatorList: c,
  5136                });
  5137                c.addOp(r.OPS.endAnnotation, []);
  5138                void 0 !== d && c.addOp(r.OPS.endMarkedContent, []);
  5139                return { opList: c, separateForm: !1, separateCanvas: l };
  5140              }
  5141              _getMKDict(e) {
  5142                const t = new s.Dict(null);
  5143                e && t.set("R", e);
  5144                this.borderColor &&
  5145                  t.set("BC", getPdfColorArray(this.borderColor));
  5146                this.backgroundColor &&
  5147                  t.set("BG", getPdfColorArray(this.backgroundColor));
  5148                return t.size > 0 ? t : null;
  5149              }
  5150              amendSavedDict(e, t) {}
  5151              async save(e, t, a) {
  5152                const i = a?.get(this.data.id);
  5153                let c = i?.value,
  5154                  l = i?.rotation;
  5155                if (c === this.data.fieldValue || void 0 === c) {
  5156                  if (!this._hasValueFromXFA && void 0 === l) return null;
  5157                  c ||= this.data.fieldValue;
  5158                }
  5159                if (
  5160                  void 0 === l &&
  5161                  !this._hasValueFromXFA &&
  5162                  Array.isArray(c) &&
  5163                  Array.isArray(this.data.fieldValue) &&
  5164                  c.length === this.data.fieldValue.length &&
  5165                  c.every((e, t) => e === this.data.fieldValue[t])
  5166                )
  5167                  return null;
  5168                void 0 === l && (l = this.rotation);
  5169                let h = null;
  5170                if (!this._needAppearances) {
  5171                  h = await this._getAppearance(
  5172                    e,
  5173                    t,
  5174                    r.RenderingIntentFlag.SAVE,
  5175                    a,
  5176                  );
  5177                  if (null === h) return null;
  5178                }
  5179                let u = !1;
  5180                if (h?.needAppearances) {
  5181                  u = !0;
  5182                  h = null;
  5183                }
  5184                const { xref: d } = e,
  5185                  f = d.fetchIfRef(this.ref);
  5186                if (!(f instanceof s.Dict)) return null;
  5187                const g = new s.Dict(d);
  5188                for (const e of f.getKeys()) "AP" !== e && g.set(e, f.getRaw(e));
  5189                const p = { path: this.data.fieldName, value: c },
  5190                  encoder = (e) =>
  5191                    (0, n.isAscii)(e) ? e : (0, n.stringToUTF16String)(e, !0);
  5192                g.set("V", Array.isArray(c) ? c.map(encoder) : encoder(c));
  5193                this.amendSavedDict(a, g);
  5194                const b = this._getMKDict(l);
  5195                b && g.set("MK", b);
  5196                const y = [],
  5197                  w = [{ ref: this.ref, data: "", xfa: p, needAppearances: u }];
  5198                if (null !== h) {
  5199                  const e = d.getNewTemporaryRef(),
  5200                    t = new s.Dict(d);
  5201                  g.set("AP", t);
  5202                  t.set("N", e);
  5203                  const n = this._getSaveFieldResources(d),
  5204                    i = new o.StringStream(h),
  5205                    c = (i.dict = new s.Dict(d));
  5206                  c.set("Subtype", s.Name.get("Form"));
  5207                  c.set("Resources", n);
  5208                  c.set("BBox", [
  5209                    0,
  5210                    0,
  5211                    this.data.rect[2] - this.data.rect[0],
  5212                    this.data.rect[3] - this.data.rect[1],
  5213                  ]);
  5214                  const l = this.getRotationMatrix(a);
  5215                  l !== r.IDENTITY_MATRIX && c.set("Matrix", l);
  5216                  await (0, m.writeObject)(e, i, y, d);
  5217                  w.push({
  5218                    ref: e,
  5219                    data: y.join(""),
  5220                    xfa: null,
  5221                    needAppearances: !1,
  5222                  });
  5223                  y.length = 0;
  5224                }
  5225                g.set("M", `D:${(0, r.getModificationDate)()}`);
  5226                await (0, m.writeObject)(this.ref, g, y, d);
  5227                w[0].data = y.join("");
  5228                return w;
  5229              }
  5230              async _getAppearance(e, t, a, s) {
  5231                if (this.hasFieldFlag(r.AnnotationFieldFlag.PASSWORD))
  5232                  return null;
  5233                const o = s?.get(this.data.id);
  5234                let c, l;
  5235                if (o) {
  5236                  c = o.formattedValue || o.value;
  5237                  l = o.rotation;
  5238                }
  5239                if (
  5240                  void 0 === l &&
  5241                  void 0 === c &&
  5242                  !this._needAppearances &&
  5243                  (!this._hasValueFromXFA || this.appearance)
  5244                )
  5245                  return null;
  5246                const h = this.getBorderAndBackgroundAppearances(s);
  5247                if (void 0 === c) {
  5248                  c = this.data.fieldValue;
  5249                  if (!c) return `/Tx BMC q ${h}Q EMC`;
  5250                }
  5251                Array.isArray(c) && 1 === c.length && (c = c[0]);
  5252                (0, r.assert)(
  5253                  "string" == typeof c,
  5254                  "Expected `value` to be a string.",
  5255                );
  5256                c = c.trim();
  5257                if (this.data.combo) {
  5258                  const e = this.data.options.find(
  5259                    ({ exportValue: e }) => c === e,
  5260                  );
  5261                  c = e?.displayValue || c;
  5262                }
  5263                if ("" === c) return `/Tx BMC q ${h}Q EMC`;
  5264                void 0 === l && (l = this.rotation);
  5265                let u,
  5266                  d = -1;
  5267                if (this.data.multiLine) {
  5268                  u = c.split(/\r\n?|\n/).map((e) => e.normalize("NFC"));
  5269                  d = u.length;
  5270                } else u = [c.replace(/\r\n?|\n/, "").normalize("NFC")];
  5271                let f = this.data.rect[3] - this.data.rect[1],
  5272                  g = this.data.rect[2] - this.data.rect[0];
  5273                (90 !== l && 270 !== l) || ([g, f] = [f, g]);
  5274                this._defaultAppearance ||
  5275                  (this.data.defaultAppearanceData = (0,
  5276                  i.parseDefaultAppearance)(
  5277                    (this._defaultAppearance = "/Helvetica 0 Tf 0 g"),
  5278                  ));
  5279                let p,
  5280                  m,
  5281                  b,
  5282                  y = await WidgetAnnotation._getFontData(
  5283                    e,
  5284                    t,
  5285                    this.data.defaultAppearanceData,
  5286                    this._fieldResources.mergedResources,
  5287                  );
  5288                const w = [];
  5289                let S = !1;
  5290                for (const e of u) {
  5291                  const t = y.encodeString(e);
  5292                  t.length > 1 && (S = !0);
  5293                  w.push(t.join(""));
  5294                }
  5295                if (S && a & r.RenderingIntentFlag.SAVE)
  5296                  return { needAppearances: !0 };
  5297                if (S && this._isOffscreenCanvasSupported) {
  5298                  const a = this.data.comb ? "monospace" : "sans-serif",
  5299                    r = new i.FakeUnicodeFont(e.xref, a),
  5300                    s = r.createFontResources(u.join("")),
  5301                    o = s.getRaw("Font");
  5302                  if (this._fieldResources.mergedResources.has("Font")) {
  5303                    const e = this._fieldResources.mergedResources.get("Font");
  5304                    for (const t of o.getKeys()) e.set(t, o.getRaw(t));
  5305                  } else this._fieldResources.mergedResources.set("Font", o);
  5306                  const l = r.fontName.name;
  5307                  y = await WidgetAnnotation._getFontData(
  5308                    e,
  5309                    t,
  5310                    { fontName: l, fontSize: 0 },
  5311                    s,
  5312                  );
  5313                  for (let e = 0, t = w.length; e < t; e++)
  5314                    w[e] = (0, n.stringToUTF16String)(u[e]);
  5315                  const h = Object.assign(
  5316                    Object.create(null),
  5317                    this.data.defaultAppearanceData,
  5318                  );
  5319                  this.data.defaultAppearanceData.fontSize = 0;
  5320                  this.data.defaultAppearanceData.fontName = l;
  5321                  [p, m, b] = this._computeFontSize(f - 2, g - 4, c, y, d);
  5322                  this.data.defaultAppearanceData = h;
  5323                } else {
  5324                  this._isOffscreenCanvasSupported ||
  5325                    (0, r.warn)(
  5326                      "_getAppearance: OffscreenCanvas is not supported, annotation may not render correctly.",
  5327                    );
  5328                  [p, m, b] = this._computeFontSize(f - 2, g - 4, c, y, d);
  5329                }
  5330                let x = y.descent;
  5331                x = isNaN(x)
  5332                  ? r.BASELINE_FACTOR * b
  5333                  : Math.max(r.BASELINE_FACTOR * b, Math.abs(x) * m);
  5334                const C = Math.min(Math.floor((f - m) / 2), 1),
  5335                  k = this.data.textAlignment;
  5336                if (this.data.multiLine)
  5337                  return this._getMultilineAppearance(
  5338                    p,
  5339                    w,
  5340                    y,
  5341                    m,
  5342                    g,
  5343                    f,
  5344                    k,
  5345                    2,
  5346                    C,
  5347                    x,
  5348                    b,
  5349                    s,
  5350                  );
  5351                if (this.data.comb)
  5352                  return this._getCombAppearance(
  5353                    p,
  5354                    y,
  5355                    w[0],
  5356                    m,
  5357                    g,
  5358                    f,
  5359                    2,
  5360                    C,
  5361                    x,
  5362                    b,
  5363                    s,
  5364                  );
  5365                const v = C + x;
  5366                if (0 === k || k > 2)
  5367                  return (
  5368                    `/Tx BMC q ${h}BT ` +
  5369                    p +
  5370                    ` 1 0 0 1 ${(0, n.numberToString)(2)} ${(0, n.numberToString)(v)} Tm (${(0, n.escapeString)(w[0])}) Tj ET Q EMC`
  5371                  );
  5372                return (
  5373                  `/Tx BMC q ${h}BT ` +
  5374                  p +
  5375                  ` 1 0 0 1 0 0 Tm ${this._renderText(w[0], y, m, g, k, { shift: 0 }, 2, v)} ET Q EMC`
  5376                );
  5377              }
  5378              static async _getFontData(e, t, a, r) {
  5379                const n = new p.OperatorList(),
  5380                  i = {
  5381                    font: null,
  5382                    clone() {
  5383                      return this;
  5384                    },
  5385                  },
  5386                  { fontName: o, fontSize: c } = a;
  5387                await e.handleSetFont(
  5388                  r,
  5389                  [o && s.Name.get(o), c],
  5390                  null,
  5391                  n,
  5392                  t,
  5393                  i,
  5394                  null,
  5395                );
  5396                return i.font;
  5397              }
  5398              _getTextWidth(e, t) {
  5399                return t.charsToGlyphs(e).reduce((e, t) => e + t.width, 0) / 1e3;
  5400              }
  5401              _computeFontSize(e, t, a, n, s) {
  5402                let { fontSize: o } = this.data.defaultAppearanceData,
  5403                  c = (o || 12) * r.LINE_FACTOR,
  5404                  l = Math.round(e / c);
  5405                if (!o) {
  5406                  const roundWithTwoDigits = (e) => Math.floor(100 * e) / 100;
  5407                  if (-1 === s) {
  5408                    const i = this._getTextWidth(a, n);
  5409                    o = roundWithTwoDigits(
  5410                      Math.min(e / r.LINE_FACTOR, i > t ? t / i : 1 / 0),
  5411                    );
  5412                    l = 1;
  5413                  } else {
  5414                    const i = a.split(/\r\n?|\n/),
  5415                      h = [];
  5416                    for (const e of i) {
  5417                      const t = n.encodeString(e).join(""),
  5418                        a = n.charsToGlyphs(t),
  5419                        r = n.getCharPositions(t);
  5420                      h.push({ line: t, glyphs: a, positions: r });
  5421                    }
  5422                    const isTooBig = (a) => {
  5423                      let r = 0;
  5424                      for (const i of h) {
  5425                        r += this._splitLine(null, n, a, t, i).length * a;
  5426                        if (r > e) return !0;
  5427                      }
  5428                      return !1;
  5429                    };
  5430                    l = Math.max(l, s);
  5431                    for (;;) {
  5432                      c = e / l;
  5433                      o = roundWithTwoDigits(c / r.LINE_FACTOR);
  5434                      if (!isTooBig(o)) break;
  5435                      l++;
  5436                    }
  5437                  }
  5438                  const { fontName: h, fontColor: u } =
  5439                    this.data.defaultAppearanceData;
  5440                  this._defaultAppearance = (0, i.createDefaultAppearance)({
  5441                    fontSize: o,
  5442                    fontName: h,
  5443                    fontColor: u,
  5444                  });
  5445                }
  5446                return [this._defaultAppearance, o, e / l];
  5447              }
  5448              _renderText(e, t, a, r, i, s, o, c) {
  5449                let l;
  5450                if (1 === i) {
  5451                  l = (r - this._getTextWidth(e, t) * a) / 2;
  5452                } else if (2 === i) {
  5453                  l = r - this._getTextWidth(e, t) * a - o;
  5454                } else l = o;
  5455                const h = (0, n.numberToString)(l - s.shift);
  5456                s.shift = l;
  5457                return `${h} ${(c = (0, n.numberToString)(c))} Td (${(0, n.escapeString)(e)}) Tj`;
  5458              }
  5459              _getSaveFieldResources(e) {
  5460                const {
  5461                    localResources: t,
  5462                    appearanceResources: a,
  5463                    acroFormResources: r,
  5464                  } = this._fieldResources,
  5465                  n = this.data.defaultAppearanceData?.fontName;
  5466                if (!n) return t || s.Dict.empty;
  5467                for (const e of [t, a])
  5468                  if (e instanceof s.Dict) {
  5469                    const t = e.get("Font");
  5470                    if (t instanceof s.Dict && t.has(n)) return e;
  5471                  }
  5472                if (r instanceof s.Dict) {
  5473                  const a = r.get("Font");
  5474                  if (a instanceof s.Dict && a.has(n)) {
  5475                    const r = new s.Dict(e);
  5476                    r.set(n, a.getRaw(n));
  5477                    const i = new s.Dict(e);
  5478                    i.set("Font", r);
  5479                    return s.Dict.merge({
  5480                      xref: e,
  5481                      dictArray: [i, t],
  5482                      mergeSubDicts: !0,
  5483                    });
  5484                  }
  5485                }
  5486                return t || s.Dict.empty;
  5487              }
  5488              getFieldObject() {
  5489                return null;
  5490              }
  5491            }
  5492            class TextWidgetAnnotation extends WidgetAnnotation {
  5493              constructor(e) {
  5494                super(e);
  5495                this.data.hasOwnCanvas = this.data.readOnly && !this.data.noHTML;
  5496                this._hasText = !0;
  5497                const t = e.dict;
  5498                "string" != typeof this.data.fieldValue &&
  5499                  (this.data.fieldValue = "");
  5500                let a = (0, n.getInheritableProperty)({ dict: t, key: "Q" });
  5501                (!Number.isInteger(a) || a < 0 || a > 2) && (a = null);
  5502                this.data.textAlignment = a;
  5503                let i = (0, n.getInheritableProperty)({ dict: t, key: "MaxLen" });
  5504                (!Number.isInteger(i) || i < 0) && (i = 0);
  5505                this.data.maxLen = i;
  5506                this.data.multiLine = this.hasFieldFlag(
  5507                  r.AnnotationFieldFlag.MULTILINE,
  5508                );
  5509                this.data.comb =
  5510                  this.hasFieldFlag(r.AnnotationFieldFlag.COMB) &&
  5511                  !this.hasFieldFlag(r.AnnotationFieldFlag.MULTILINE) &&
  5512                  !this.hasFieldFlag(r.AnnotationFieldFlag.PASSWORD) &&
  5513                  !this.hasFieldFlag(r.AnnotationFieldFlag.FILESELECT) &&
  5514                  0 !== this.data.maxLen;
  5515                this.data.doNotScroll = this.hasFieldFlag(
  5516                  r.AnnotationFieldFlag.DONOTSCROLL,
  5517                );
  5518              }
  5519              get hasTextContent() {
  5520                return !!this.appearance && !this._needAppearances;
  5521              }
  5522              _getCombAppearance(e, t, a, r, i, s, o, c, l, h, u) {
  5523                const d = i / this.data.maxLen,
  5524                  f = this.getBorderAndBackgroundAppearances(u),
  5525                  g = [],
  5526                  p = t.getCharPositions(a);
  5527                for (const [e, t] of p)
  5528                  g.push(`(${(0, n.escapeString)(a.substring(e, t))}) Tj`);
  5529                const m = g.join(` ${(0, n.numberToString)(d)} 0 Td `);
  5530                return (
  5531                  `/Tx BMC q ${f}BT ` +
  5532                  e +
  5533                  ` 1 0 0 1 ${(0, n.numberToString)(o)} ${(0, n.numberToString)(c + l)} Tm ${m} ET Q EMC`
  5534                );
  5535              }
  5536              _getMultilineAppearance(e, t, a, r, i, s, o, c, l, h, u, d) {
  5537                const f = [],
  5538                  g = i - 2 * c,
  5539                  p = { shift: 0 };
  5540                for (let e = 0, n = t.length; e < n; e++) {
  5541                  const n = t[e],
  5542                    s = this._splitLine(n, a, r, g);
  5543                  for (let t = 0, n = s.length; t < n; t++) {
  5544                    const n = s[t],
  5545                      d = 0 === e && 0 === t ? -l - (u - h) : -u;
  5546                    f.push(this._renderText(n, a, r, i, o, p, c, d));
  5547                  }
  5548                }
  5549                const m = this.getBorderAndBackgroundAppearances(d),
  5550                  b = f.join("\n");
  5551                return (
  5552                  `/Tx BMC q ${m}BT ` +
  5553                  e +
  5554                  ` 1 0 0 1 0 ${(0, n.numberToString)(s)} Tm ${b} ET Q EMC`
  5555                );
  5556              }
  5557              _splitLine(e, t, a, r, n = {}) {
  5558                e = n.line || e;
  5559                const i = n.glyphs || t.charsToGlyphs(e);
  5560                if (i.length <= 1) return [e];
  5561                const s = n.positions || t.getCharPositions(e),
  5562                  o = a / 1e3,
  5563                  c = [];
  5564                let l = -1,
  5565                  h = -1,
  5566                  u = -1,
  5567                  d = 0,
  5568                  f = 0;
  5569                for (let t = 0, a = i.length; t < a; t++) {
  5570                  const [a, n] = s[t],
  5571                    g = i[t],
  5572                    p = g.width * o;
  5573                  if (" " === g.unicode)
  5574                    if (f + p > r) {
  5575                      c.push(e.substring(d, a));
  5576                      d = a;
  5577                      f = p;
  5578                      l = -1;
  5579                      u = -1;
  5580                    } else {
  5581                      f += p;
  5582                      l = a;
  5583                      h = n;
  5584                      u = t;
  5585                    }
  5586                  else if (f + p > r)
  5587                    if (-1 !== l) {
  5588                      c.push(e.substring(d, h));
  5589                      d = h;
  5590                      t = u + 1;
  5591                      l = -1;
  5592                      f = 0;
  5593                    } else {
  5594                      c.push(e.substring(d, a));
  5595                      d = a;
  5596                      f = p;
  5597                    }
  5598                  else f += p;
  5599                }
  5600                d < e.length && c.push(e.substring(d, e.length));
  5601                return c;
  5602              }
  5603              getFieldObject() {
  5604                return {
  5605                  id: this.data.id,
  5606                  value: this.data.fieldValue,
  5607                  defaultValue: this.data.defaultFieldValue || "",
  5608                  multiline: this.data.multiLine,
  5609                  password: this.hasFieldFlag(r.AnnotationFieldFlag.PASSWORD),
  5610                  charLimit: this.data.maxLen,
  5611                  comb: this.data.comb,
  5612                  editable: !this.data.readOnly,
  5613                  hidden: this.data.hidden,
  5614                  name: this.data.fieldName,
  5615                  rect: this.data.rect,
  5616                  actions: this.data.actions,
  5617                  page: this.data.pageIndex,
  5618                  strokeColor: this.data.borderColor,
  5619                  fillColor: this.data.backgroundColor,
  5620                  rotation: this.rotation,
  5621                  type: "text",
  5622                };
  5623              }
  5624            }
  5625            class ButtonWidgetAnnotation extends WidgetAnnotation {
  5626              constructor(e) {
  5627                super(e);
  5628                this.checkedAppearance = null;
  5629                this.uncheckedAppearance = null;
  5630                this.data.checkBox =
  5631                  !this.hasFieldFlag(r.AnnotationFieldFlag.RADIO) &&
  5632                  !this.hasFieldFlag(r.AnnotationFieldFlag.PUSHBUTTON);
  5633                this.data.radioButton =
  5634                  this.hasFieldFlag(r.AnnotationFieldFlag.RADIO) &&
  5635                  !this.hasFieldFlag(r.AnnotationFieldFlag.PUSHBUTTON);
  5636                this.data.pushButton = this.hasFieldFlag(
  5637                  r.AnnotationFieldFlag.PUSHBUTTON,
  5638                );
  5639                this.data.isTooltipOnly = !1;
  5640                if (this.data.checkBox) this._processCheckBox(e);
  5641                else if (this.data.radioButton) this._processRadioButton(e);
  5642                else if (this.data.pushButton) {
  5643                  this.data.hasOwnCanvas = !0;
  5644                  this._processPushButton(e);
  5645                } else
  5646                  (0, r.warn)("Invalid field flags for button widget annotation");
  5647              }
  5648              async getOperatorList(e, t, a, n, i) {
  5649                if (this.data.pushButton)
  5650                  return super.getOperatorList(e, t, a, !1, i);
  5651                let s = null,
  5652                  o = null;
  5653                if (i) {
  5654                  const e = i.get(this.data.id);
  5655                  s = e ? e.value : null;
  5656                  o = e ? e.rotation : null;
  5657                }
  5658                if (null === s && this.appearance)
  5659                  return super.getOperatorList(e, t, a, n, i);
  5660                null == s &&
  5661                  (s = this.data.checkBox
  5662                    ? this.data.fieldValue === this.data.exportValue
  5663                    : this.data.fieldValue === this.data.buttonValue);
  5664                const c = s ? this.checkedAppearance : this.uncheckedAppearance;
  5665                if (c) {
  5666                  const s = this.appearance,
  5667                    l = c.dict.getArray("Matrix") || r.IDENTITY_MATRIX;
  5668                  o && c.dict.set("Matrix", this.getRotationMatrix(i));
  5669                  this.appearance = c;
  5670                  const h = super.getOperatorList(e, t, a, n, i);
  5671                  this.appearance = s;
  5672                  c.dict.set("Matrix", l);
  5673                  return h;
  5674                }
  5675                return {
  5676                  opList: new p.OperatorList(),
  5677                  separateForm: !1,
  5678                  separateCanvas: !1,
  5679                };
  5680              }
  5681              async save(e, t, a) {
  5682                return this.data.checkBox
  5683                  ? this._saveCheckbox(e, t, a)
  5684                  : this.data.radioButton
  5685                    ? this._saveRadioButton(e, t, a)
  5686                    : null;
  5687              }
  5688              async _saveCheckbox(e, t, a) {
  5689                if (!a) return null;
  5690                const n = a.get(this.data.id);
  5691                let i = n?.rotation,
  5692                  o = n?.value;
  5693                if (void 0 === i) {
  5694                  if (void 0 === o) return null;
  5695                  if ((this.data.fieldValue === this.data.exportValue) === o)
  5696                    return null;
  5697                }
  5698                const c = e.xref.fetchIfRef(this.ref);
  5699                if (!(c instanceof s.Dict)) return null;
  5700                void 0 === i && (i = this.rotation);
  5701                void 0 === o &&
  5702                  (o = this.data.fieldValue === this.data.exportValue);
  5703                const l = {
  5704                    path: this.data.fieldName,
  5705                    value: o ? this.data.exportValue : "",
  5706                  },
  5707                  h = s.Name.get(o ? this.data.exportValue : "Off");
  5708                c.set("V", h);
  5709                c.set("AS", h);
  5710                c.set("M", `D:${(0, r.getModificationDate)()}`);
  5711                const u = this._getMKDict(i);
  5712                u && c.set("MK", u);
  5713                const d = [];
  5714                await (0, m.writeObject)(this.ref, c, d, e.xref);
  5715                return [{ ref: this.ref, data: d.join(""), xfa: l }];
  5716              }
  5717              async _saveRadioButton(e, t, a) {
  5718                if (!a) return null;
  5719                const n = a.get(this.data.id);
  5720                let i = n?.rotation,
  5721                  o = n?.value;
  5722                if (void 0 === i) {
  5723                  if (void 0 === o) return null;
  5724                  if ((this.data.fieldValue === this.data.buttonValue) === o)
  5725                    return null;
  5726                }
  5727                const c = e.xref.fetchIfRef(this.ref);
  5728                if (!(c instanceof s.Dict)) return null;
  5729                void 0 === o &&
  5730                  (o = this.data.fieldValue === this.data.buttonValue);
  5731                void 0 === i && (i = this.rotation);
  5732                const l = {
  5733                    path: this.data.fieldName,
  5734                    value: o ? this.data.buttonValue : "",
  5735                  },
  5736                  h = s.Name.get(o ? this.data.buttonValue : "Off"),
  5737                  u = [];
  5738                let d = null;
  5739                if (o)
  5740                  if (this.parent instanceof s.Ref) {
  5741                    const t = e.xref.fetch(this.parent);
  5742                    t.set("V", h);
  5743                    await (0, m.writeObject)(this.parent, t, u, e.xref);
  5744                    d = u.join("");
  5745                    u.length = 0;
  5746                  } else this.parent instanceof s.Dict && this.parent.set("V", h);
  5747                c.set("AS", h);
  5748                c.set("M", `D:${(0, r.getModificationDate)()}`);
  5749                const f = this._getMKDict(i);
  5750                f && c.set("MK", f);
  5751                await (0, m.writeObject)(this.ref, c, u, e.xref);
  5752                const g = [{ ref: this.ref, data: u.join(""), xfa: l }];
  5753                d && g.push({ ref: this.parent, data: d, xfa: null });
  5754                return g;
  5755              }
  5756              _getDefaultCheckedAppearance(e, t) {
  5757                const a = this.data.rect[2] - this.data.rect[0],
  5758                  i = this.data.rect[3] - this.data.rect[1],
  5759                  c = [0, 0, a, i],
  5760                  l = 0.8 * Math.min(a, i);
  5761                let h, u;
  5762                if ("check" === t) {
  5763                  h = { width: 0.755 * l, height: 0.705 * l };
  5764                  u = "3";
  5765                } else if ("disc" === t) {
  5766                  h = { width: 0.791 * l, height: 0.705 * l };
  5767                  u = "l";
  5768                } else
  5769                  (0, r.unreachable)(
  5770                    `_getDefaultCheckedAppearance - unsupported type: ${t}`,
  5771                  );
  5772                const d = `q BT /PdfJsZaDb ${l} Tf 0 g ${(0, n.numberToString)((a - h.width) / 2)} ${(0, n.numberToString)((i - h.height) / 2)} Td (${u}) Tj ET Q`,
  5773                  f = new s.Dict(e.xref);
  5774                f.set("FormType", 1);
  5775                f.set("Subtype", s.Name.get("Form"));
  5776                f.set("Type", s.Name.get("XObject"));
  5777                f.set("BBox", c);
  5778                f.set("Matrix", [1, 0, 0, 1, 0, 0]);
  5779                f.set("Length", d.length);
  5780                const g = new s.Dict(e.xref),
  5781                  p = new s.Dict(e.xref);
  5782                p.set("PdfJsZaDb", this.fallbackFontDict);
  5783                g.set("Font", p);
  5784                f.set("Resources", g);
  5785                this.checkedAppearance = new o.StringStream(d);
  5786                this.checkedAppearance.dict = f;
  5787                this._streams.push(this.checkedAppearance);
  5788              }
  5789              _processCheckBox(e) {
  5790                const t = e.dict.get("AP");
  5791                if (!(t instanceof s.Dict)) return;
  5792                const a = t.get("N");
  5793                if (!(a instanceof s.Dict)) return;
  5794                const r = this._decodeFormValue(e.dict.get("AS"));
  5795                "string" == typeof r && (this.data.fieldValue = r);
  5796                const n =
  5797                    null !== this.data.fieldValue &&
  5798                    "Off" !== this.data.fieldValue
  5799                      ? this.data.fieldValue
  5800                      : "Yes",
  5801                  i = a.getKeys();
  5802                if (0 === i.length) i.push("Off", n);
  5803                else if (1 === i.length)
  5804                  "Off" === i[0] ? i.push(n) : i.unshift("Off");
  5805                else if (i.includes(n)) {
  5806                  i.length = 0;
  5807                  i.push("Off", n);
  5808                } else {
  5809                  const e = i.find((e) => "Off" !== e);
  5810                  i.length = 0;
  5811                  i.push("Off", e);
  5812                }
  5813                i.includes(this.data.fieldValue) ||
  5814                  (this.data.fieldValue = "Off");
  5815                this.data.exportValue = i[1];
  5816                const o = a.get(this.data.exportValue);
  5817                this.checkedAppearance = o instanceof c.BaseStream ? o : null;
  5818                const l = a.get("Off");
  5819                this.uncheckedAppearance = l instanceof c.BaseStream ? l : null;
  5820                this.checkedAppearance
  5821                  ? this._streams.push(this.checkedAppearance)
  5822                  : this._getDefaultCheckedAppearance(e, "check");
  5823                this.uncheckedAppearance &&
  5824                  this._streams.push(this.uncheckedAppearance);
  5825                this._fallbackFontDict = this.fallbackFontDict;
  5826                null === this.data.defaultFieldValue &&
  5827                  (this.data.defaultFieldValue = "Off");
  5828              }
  5829              _processRadioButton(e) {
  5830                this.data.fieldValue = this.data.buttonValue = null;
  5831                const t = e.dict.get("Parent");
  5832                if (t instanceof s.Dict) {
  5833                  this.parent = e.dict.getRaw("Parent");
  5834                  const a = t.get("V");
  5835                  a instanceof s.Name &&
  5836                    (this.data.fieldValue = this._decodeFormValue(a));
  5837                }
  5838                const a = e.dict.get("AP");
  5839                if (!(a instanceof s.Dict)) return;
  5840                const r = a.get("N");
  5841                if (!(r instanceof s.Dict)) return;
  5842                for (const e of r.getKeys())
  5843                  if ("Off" !== e) {
  5844                    this.data.buttonValue = this._decodeFormValue(e);
  5845                    break;
  5846                  }
  5847                const n = r.get(this.data.buttonValue);
  5848                this.checkedAppearance = n instanceof c.BaseStream ? n : null;
  5849                const i = r.get("Off");
  5850                this.uncheckedAppearance = i instanceof c.BaseStream ? i : null;
  5851                this.checkedAppearance
  5852                  ? this._streams.push(this.checkedAppearance)
  5853                  : this._getDefaultCheckedAppearance(e, "disc");
  5854                this.uncheckedAppearance &&
  5855                  this._streams.push(this.uncheckedAppearance);
  5856                this._fallbackFontDict = this.fallbackFontDict;
  5857                null === this.data.defaultFieldValue &&
  5858                  (this.data.defaultFieldValue = "Off");
  5859              }
  5860              _processPushButton(e) {
  5861                const { dict: t, annotationGlobals: a } = e;
  5862                if (t.has("A") || t.has("AA") || this.data.alternativeText) {
  5863                  this.data.isTooltipOnly = !t.has("A") && !t.has("AA");
  5864                  h.Catalog.parseDestDictionary({
  5865                    destDict: t,
  5866                    resultObj: this.data,
  5867                    docBaseUrl: a.baseUrl,
  5868                    docAttachments: a.attachments,
  5869                  });
  5870                } else
  5871                  (0, r.warn)(
  5872                    "Push buttons without action dictionaries are not supported",
  5873                  );
  5874              }
  5875              getFieldObject() {
  5876                let e,
  5877                  t = "button";
  5878                if (this.data.checkBox) {
  5879                  t = "checkbox";
  5880                  e = this.data.exportValue;
  5881                } else if (this.data.radioButton) {
  5882                  t = "radiobutton";
  5883                  e = this.data.buttonValue;
  5884                }
  5885                return {
  5886                  id: this.data.id,
  5887                  value: this.data.fieldValue || "Off",
  5888                  defaultValue: this.data.defaultFieldValue,
  5889                  exportValues: e,
  5890                  editable: !this.data.readOnly,
  5891                  name: this.data.fieldName,
  5892                  rect: this.data.rect,
  5893                  hidden: this.data.hidden,
  5894                  actions: this.data.actions,
  5895                  page: this.data.pageIndex,
  5896                  strokeColor: this.data.borderColor,
  5897                  fillColor: this.data.backgroundColor,
  5898                  rotation: this.rotation,
  5899                  type: t,
  5900                };
  5901              }
  5902              get fallbackFontDict() {
  5903                const e = new s.Dict();
  5904                e.set("BaseFont", s.Name.get("ZapfDingbats"));
  5905                e.set("Type", s.Name.get("FallbackType"));
  5906                e.set("Subtype", s.Name.get("FallbackType"));
  5907                e.set("Encoding", s.Name.get("ZapfDingbatsEncoding"));
  5908                return (0, r.shadow)(this, "fallbackFontDict", e);
  5909              }
  5910            }
  5911            class ChoiceWidgetAnnotation extends WidgetAnnotation {
  5912              constructor(e) {
  5913                super(e);
  5914                const { dict: t, xref: a } = e;
  5915                this.indices = t.getArray("I");
  5916                this.hasIndices =
  5917                  Array.isArray(this.indices) && this.indices.length > 0;
  5918                this.data.options = [];
  5919                const i = (0, n.getInheritableProperty)({ dict: t, key: "Opt" });
  5920                if (Array.isArray(i))
  5921                  for (let e = 0, t = i.length; e < t; e++) {
  5922                    const t = a.fetchIfRef(i[e]),
  5923                      r = Array.isArray(t);
  5924                    this.data.options[e] = {
  5925                      exportValue: this._decodeFormValue(
  5926                        r ? a.fetchIfRef(t[0]) : t,
  5927                      ),
  5928                      displayValue: this._decodeFormValue(
  5929                        r ? a.fetchIfRef(t[1]) : t,
  5930                      ),
  5931                    };
  5932                  }
  5933                if (this.hasIndices) {
  5934                  this.data.fieldValue = [];
  5935                  const e = this.data.options.length;
  5936                  for (const t of this.indices)
  5937                    Number.isInteger(t) &&
  5938                      t >= 0 &&
  5939                      t < e &&
  5940                      this.data.fieldValue.push(this.data.options[t].exportValue);
  5941                } else
  5942                  "string" == typeof this.data.fieldValue
  5943                    ? (this.data.fieldValue = [this.data.fieldValue])
  5944                    : this.data.fieldValue || (this.data.fieldValue = []);
  5945                this.data.combo = this.hasFieldFlag(r.AnnotationFieldFlag.COMBO);
  5946                this.data.multiSelect = this.hasFieldFlag(
  5947                  r.AnnotationFieldFlag.MULTISELECT,
  5948                );
  5949                this._hasText = !0;
  5950              }
  5951              getFieldObject() {
  5952                const e = this.data.combo ? "combobox" : "listbox",
  5953                  t =
  5954                    this.data.fieldValue.length > 0
  5955                      ? this.data.fieldValue[0]
  5956                      : null;
  5957                return {
  5958                  id: this.data.id,
  5959                  value: t,
  5960                  defaultValue: this.data.defaultFieldValue,
  5961                  editable: !this.data.readOnly,
  5962                  name: this.data.fieldName,
  5963                  rect: this.data.rect,
  5964                  numItems: this.data.fieldValue.length,
  5965                  multipleSelection: this.data.multiSelect,
  5966                  hidden: this.data.hidden,
  5967                  actions: this.data.actions,
  5968                  items: this.data.options,
  5969                  page: this.data.pageIndex,
  5970                  strokeColor: this.data.borderColor,
  5971                  fillColor: this.data.backgroundColor,
  5972                  rotation: this.rotation,
  5973                  type: e,
  5974                };
  5975              }
  5976              amendSavedDict(e, t) {
  5977                if (!this.hasIndices) return;
  5978                let a = e?.get(this.data.id)?.value;
  5979                Array.isArray(a) || (a = [a]);
  5980                const r = [],
  5981                  { options: n } = this.data;
  5982                for (let e = 0, t = 0, i = n.length; e < i; e++)
  5983                  if (n[e].exportValue === a[t]) {
  5984                    r.push(e);
  5985                    t += 1;
  5986                  }
  5987                t.set("I", r);
  5988              }
  5989              async _getAppearance(e, t, a, n) {
  5990                if (this.data.combo) return super._getAppearance(e, t, a, n);
  5991                let s, o;
  5992                const c = n?.get(this.data.id);
  5993                if (c) {
  5994                  o = c.rotation;
  5995                  s = c.value;
  5996                }
  5997                if (void 0 === o && void 0 === s && !this._needAppearances)
  5998                  return null;
  5999                void 0 === s
  6000                  ? (s = this.data.fieldValue)
  6001                  : Array.isArray(s) || (s = [s]);
  6002                let l = this.data.rect[3] - this.data.rect[1],
  6003                  h = this.data.rect[2] - this.data.rect[0];
  6004                (90 !== o && 270 !== o) || ([h, l] = [l, h]);
  6005                const u = this.data.options.length,
  6006                  d = [];
  6007                for (let e = 0; e < u; e++) {
  6008                  const { exportValue: t } = this.data.options[e];
  6009                  s.includes(t) && d.push(e);
  6010                }
  6011                this._defaultAppearance ||
  6012                  (this.data.defaultAppearanceData = (0,
  6013                  i.parseDefaultAppearance)(
  6014                    (this._defaultAppearance = "/Helvetica 0 Tf 0 g"),
  6015                  ));
  6016                const f = await WidgetAnnotation._getFontData(
  6017                  e,
  6018                  t,
  6019                  this.data.defaultAppearanceData,
  6020                  this._fieldResources.mergedResources,
  6021                );
  6022                let g,
  6023                  { fontSize: p } = this.data.defaultAppearanceData;
  6024                if (p) g = this._defaultAppearance;
  6025                else {
  6026                  const e = (l - 1) / u;
  6027                  let t,
  6028                    a = -1;
  6029                  for (const { displayValue: e } of this.data.options) {
  6030                    const r = this._getTextWidth(e, f);
  6031                    if (r > a) {
  6032                      a = r;
  6033                      t = e;
  6034                    }
  6035                  }
  6036                  [g, p] = this._computeFontSize(e, h - 4, t, f, -1);
  6037                }
  6038                const m = p * r.LINE_FACTOR,
  6039                  b = (m - p) / 2,
  6040                  y = Math.floor(l / m);
  6041                let w = 0;
  6042                if (d.length > 0) {
  6043                  const e = Math.min(...d),
  6044                    t = Math.max(...d);
  6045                  w = Math.max(0, t - y + 1);
  6046                  w > e && (w = e);
  6047                }
  6048                const S = Math.min(w + y + 1, u),
  6049                  x = ["/Tx BMC q", `1 1 ${h} ${l} re W n`];
  6050                if (d.length) {
  6051                  x.push("0.600006 0.756866 0.854904 rg");
  6052                  for (const e of d)
  6053                    w <= e &&
  6054                      e < S &&
  6055                      x.push(`1 ${l - (e - w + 1) * m} ${h} ${m} re f`);
  6056                }
  6057                x.push("BT", g, `1 0 0 1 0 ${l} Tm`);
  6058                const C = { shift: 0 };
  6059                for (let e = w; e < S; e++) {
  6060                  const { displayValue: t } = this.data.options[e],
  6061                    a = e === w ? b : 0;
  6062                  x.push(this._renderText(t, f, p, h, 0, C, 2, -m + a));
  6063                }
  6064                x.push("ET Q EMC");
  6065                return x.join("\n");
  6066              }
  6067            }
  6068            class SignatureWidgetAnnotation extends WidgetAnnotation {
  6069              constructor(e) {
  6070                super(e);
  6071                this.data.fieldValue = null;
  6072                this.data.hasOwnCanvas = this.data.noRotate;
  6073              }
  6074              getFieldObject() {
  6075                return {
  6076                  id: this.data.id,
  6077                  value: null,
  6078                  page: this.data.pageIndex,
  6079                  type: "signature",
  6080                };
  6081              }
  6082            }
  6083            class TextAnnotation extends MarkupAnnotation {
  6084              constructor(e) {
  6085                super(e);
  6086                this.data.noRotate = !0;
  6087                this.data.hasOwnCanvas = this.data.noRotate;
  6088                const { dict: t } = e;
  6089                this.data.annotationType = r.AnnotationType.TEXT;
  6090                if (this.data.hasAppearance) this.data.name = "NoIcon";
  6091                else {
  6092                  this.data.rect[1] = this.data.rect[3] - 22;
  6093                  this.data.rect[2] = this.data.rect[0] + 22;
  6094                  this.data.name = t.has("Name") ? t.get("Name").name : "Note";
  6095                }
  6096                if (t.has("State")) {
  6097                  this.data.state = t.get("State") || null;
  6098                  this.data.stateModel = t.get("StateModel") || null;
  6099                } else {
  6100                  this.data.state = null;
  6101                  this.data.stateModel = null;
  6102                }
  6103              }
  6104            }
  6105            class LinkAnnotation extends Annotation {
  6106              constructor(e) {
  6107                super(e);
  6108                const { dict: t, annotationGlobals: a } = e;
  6109                this.data.annotationType = r.AnnotationType.LINK;
  6110                const n = getQuadPoints(t, this.rectangle);
  6111                n && (this.data.quadPoints = n);
  6112                this.data.borderColor ||= this.data.color;
  6113                h.Catalog.parseDestDictionary({
  6114                  destDict: t,
  6115                  resultObj: this.data,
  6116                  docBaseUrl: a.baseUrl,
  6117                  docAttachments: a.attachments,
  6118                });
  6119              }
  6120            }
  6121            class PopupAnnotation extends Annotation {
  6122              constructor(e) {
  6123                super(e);
  6124                const { dict: t } = e;
  6125                this.data.annotationType = r.AnnotationType.POPUP;
  6126                (this.data.rect[0] !== this.data.rect[2] &&
  6127                  this.data.rect[1] !== this.data.rect[3]) ||
  6128                  (this.data.rect = null);
  6129                let a = t.get("Parent");
  6130                if (!a) {
  6131                  (0, r.warn)(
  6132                    "Popup annotation has a missing or invalid parent annotation.",
  6133                  );
  6134                  return;
  6135                }
  6136                const n = a.getArray("Rect");
  6137                this.data.parentRect =
  6138                  Array.isArray(n) && 4 === n.length
  6139                    ? r.Util.normalizeRect(n)
  6140                    : null;
  6141                const i = a.get("RT");
  6142                (0, s.isName)(i, r.AnnotationReplyType.GROUP) &&
  6143                  (a = a.get("IRT"));
  6144                if (a.has("M")) {
  6145                  this.setModificationDate(a.get("M"));
  6146                  this.data.modificationDate = this.modificationDate;
  6147                } else this.data.modificationDate = null;
  6148                if (a.has("C")) {
  6149                  this.setColor(a.getArray("C"));
  6150                  this.data.color = this.color;
  6151                } else this.data.color = null;
  6152                if (!this.viewable) {
  6153                  const e = a.get("F");
  6154                  this._isViewable(e) && this.setFlags(e);
  6155                }
  6156                this.setTitle(a.get("T"));
  6157                this.data.titleObj = this._title;
  6158                this.setContents(a.get("Contents"));
  6159                this.data.contentsObj = this._contents;
  6160                a.has("RC") &&
  6161                  (this.data.richText = b.XFAFactory.getRichTextAsHtml(
  6162                    a.get("RC"),
  6163                  ));
  6164                this.data.open = !!t.get("Open");
  6165              }
  6166            }
  6167            t.PopupAnnotation = PopupAnnotation;
  6168            class FreeTextAnnotation extends MarkupAnnotation {
  6169              constructor(e) {
  6170                super(e);
  6171                this.data.hasOwnCanvas = !0;
  6172                const { evaluatorOptions: t, xref: a } = e;
  6173                this.data.annotationType = r.AnnotationType.FREETEXT;
  6174                this.setDefaultAppearance(e);
  6175                if (this.appearance) {
  6176                  const { fontColor: e, fontSize: r } = (0,
  6177                  i.parseAppearanceStream)(this.appearance, t, a);
  6178                  this.data.defaultAppearanceData.fontColor = e;
  6179                  this.data.defaultAppearanceData.fontSize = r || 10;
  6180                } else if (this._isOffscreenCanvasSupported) {
  6181                  const t = e.dict.get("CA"),
  6182                    r = new i.FakeUnicodeFont(a, "sans-serif");
  6183                  this.data.defaultAppearanceData.fontSize ||= 10;
  6184                  const { fontColor: n, fontSize: s } =
  6185                    this.data.defaultAppearanceData;
  6186                  this.appearance = r.createAppearance(
  6187                    this._contents.str,
  6188                    this.rectangle,
  6189                    this.rotation,
  6190                    s,
  6191                    n,
  6192                    t,
  6193                  );
  6194                  this._streams.push(
  6195                    this.appearance,
  6196                    i.FakeUnicodeFont.toUnicodeStream,
  6197                  );
  6198                } else
  6199                  (0, r.warn)(
  6200                    "FreeTextAnnotation: OffscreenCanvas is not supported, annotation may not render correctly.",
  6201                  );
  6202              }
  6203              get hasTextContent() {
  6204                return !!this.appearance;
  6205              }
  6206              static createNewDict(e, t, { apRef: a, ap: o }) {
  6207                const {
  6208                    color: c,
  6209                    fontSize: l,
  6210                    rect: h,
  6211                    rotation: u,
  6212                    user: d,
  6213                    value: f,
  6214                  } = e,
  6215                  g = new s.Dict(t);
  6216                g.set("Type", s.Name.get("Annot"));
  6217                g.set("Subtype", s.Name.get("FreeText"));
  6218                g.set("CreationDate", `D:${(0, r.getModificationDate)()}`);
  6219                g.set("Rect", h);
  6220                const p = `/Helv ${l} Tf ${(0, i.getPdfColor)(c, !0)}`;
  6221                g.set("DA", p);
  6222                g.set(
  6223                  "Contents",
  6224                  (0, n.isAscii)(f) ? f : (0, n.stringToUTF16String)(f, !0),
  6225                );
  6226                g.set("F", 4);
  6227                g.set("Border", [0, 0, 0]);
  6228                g.set("Rotate", u);
  6229                d &&
  6230                  g.set(
  6231                    "T",
  6232                    (0, n.isAscii)(d) ? d : (0, n.stringToUTF16String)(d, !0),
  6233                  );
  6234                if (a || o) {
  6235                  const e = new s.Dict(t);
  6236                  g.set("AP", e);
  6237                  a ? e.set("N", a) : e.set("N", o);
  6238                }
  6239                return g;
  6240              }
  6241              static async createNewAppearanceStream(e, t, a) {
  6242                const { baseFontRef: c, evaluator: l, task: h } = a,
  6243                  { color: u, fontSize: d, rect: f, rotation: g, value: p } = e,
  6244                  m = new s.Dict(t),
  6245                  b = new s.Dict(t);
  6246                if (c) b.set("Helv", c);
  6247                else {
  6248                  const e = new s.Dict(t);
  6249                  e.set("BaseFont", s.Name.get("Helvetica"));
  6250                  e.set("Type", s.Name.get("Font"));
  6251                  e.set("Subtype", s.Name.get("Type1"));
  6252                  e.set("Encoding", s.Name.get("WinAnsiEncoding"));
  6253                  b.set("Helv", e);
  6254                }
  6255                m.set("Font", b);
  6256                const y = await WidgetAnnotation._getFontData(
  6257                    l,
  6258                    h,
  6259                    { fontName: "Helv", fontSize: d },
  6260                    m,
  6261                  ),
  6262                  [w, S, x, C] = f;
  6263                let k = x - w,
  6264                  v = C - S;
  6265                g % 180 != 0 && ([k, v] = [v, k]);
  6266                const F = p.split("\n"),
  6267                  O = d / 1e3;
  6268                let T = -1 / 0;
  6269                const M = [];
  6270                for (let e of F) {
  6271                  const t = y.encodeString(e);
  6272                  if (t.length > 1) return null;
  6273                  e = t.join("");
  6274                  M.push(e);
  6275                  let a = 0;
  6276                  const r = y.charsToGlyphs(e);
  6277                  for (const e of r) a += e.width * O;
  6278                  T = Math.max(T, a);
  6279                }
  6280                let D = 1;
  6281                T > k && (D = k / T);
  6282                let E = 1;
  6283                const N = r.LINE_FACTOR * d,
  6284                  R = (r.LINE_FACTOR - r.LINE_DESCENT_FACTOR) * d,
  6285                  L = N * F.length;
  6286                L > v && (E = v / L);
  6287                const $ = d * Math.min(D, E);
  6288                let _, j, U;
  6289                switch (g) {
  6290                  case 0:
  6291                    U = [1, 0, 0, 1];
  6292                    j = [f[0], f[1], k, v];
  6293                    _ = [f[0], f[3] - R];
  6294                    break;
  6295                  case 90:
  6296                    U = [0, 1, -1, 0];
  6297                    j = [f[1], -f[2], k, v];
  6298                    _ = [f[1], -f[0] - R];
  6299                    break;
  6300                  case 180:
  6301                    U = [-1, 0, 0, -1];
  6302                    j = [-f[2], -f[3], k, v];
  6303                    _ = [-f[2], -f[1] - R];
  6304                    break;
  6305                  case 270:
  6306                    U = [0, -1, 1, 0];
  6307                    j = [-f[3], f[0], k, v];
  6308                    _ = [-f[3], f[2] - R];
  6309                }
  6310                const X = [
  6311                  "q",
  6312                  `${U.join(" ")} 0 0 cm`,
  6313                  `${j.join(" ")} re W n`,
  6314                  "BT",
  6315                  `${(0, i.getPdfColor)(u, !0)}`,
  6316                  `0 Tc /Helv ${(0, n.numberToString)($)} Tf`,
  6317                ];
  6318                X.push(`${_.join(" ")} Td (${(0, n.escapeString)(M[0])}) Tj`);
  6319                const H = (0, n.numberToString)(N);
  6320                for (let e = 1, t = M.length; e < t; e++) {
  6321                  const t = M[e];
  6322                  X.push(`0 -${H} Td (${(0, n.escapeString)(t)}) Tj`);
  6323                }
  6324                X.push("ET", "Q");
  6325                const q = X.join("\n"),
  6326                  z = new s.Dict(t);
  6327                z.set("FormType", 1);
  6328                z.set("Subtype", s.Name.get("Form"));
  6329                z.set("Type", s.Name.get("XObject"));
  6330                z.set("BBox", f);
  6331                z.set("Resources", m);
  6332                z.set("Matrix", [1, 0, 0, 1, -f[0], -f[1]]);
  6333                const W = new o.StringStream(q);
  6334                W.dict = z;
  6335                return W;
  6336              }
  6337            }
  6338            class LineAnnotation extends MarkupAnnotation {
  6339              constructor(e) {
  6340                super(e);
  6341                const { dict: t, xref: a } = e;
  6342                this.data.annotationType = r.AnnotationType.LINE;
  6343                this.data.hasOwnCanvas = this.data.noRotate;
  6344                const n = t.getArray("L");
  6345                this.data.lineCoordinates = r.Util.normalizeRect(n);
  6346                this.setLineEndings(t.getArray("LE"));
  6347                this.data.lineEndings = this.lineEndings;
  6348                if (!this.appearance) {
  6349                  const e = this.color ? getPdfColorArray(this.color) : [0, 0, 0],
  6350                    i = t.get("CA"),
  6351                    s = getRgbColor(t.getArray("IC"), null),
  6352                    o = s ? getPdfColorArray(s) : null,
  6353                    c = o ? i : null,
  6354                    l = this.borderStyle.width || 1,
  6355                    h = 2 * l,
  6356                    u = [
  6357                      this.data.lineCoordinates[0] - h,
  6358                      this.data.lineCoordinates[1] - h,
  6359                      this.data.lineCoordinates[2] + h,
  6360                      this.data.lineCoordinates[3] + h,
  6361                    ];
  6362                  r.Util.intersect(this.rectangle, u) || (this.rectangle = u);
  6363                  this._setDefaultAppearance({
  6364                    xref: a,
  6365                    extra: `${l} w`,
  6366                    strokeColor: e,
  6367                    fillColor: o,
  6368                    strokeAlpha: i,
  6369                    fillAlpha: c,
  6370                    pointsCallback: (e, t) => {
  6371                      e.push(`${n[0]} ${n[1]} m`, `${n[2]} ${n[3]} l`, "S");
  6372                      return [t[0].x - l, t[1].x + l, t[3].y - l, t[1].y + l];
  6373                    },
  6374                  });
  6375                }
  6376              }
  6377            }
  6378            class SquareAnnotation extends MarkupAnnotation {
  6379              constructor(e) {
  6380                super(e);
  6381                const { dict: t, xref: a } = e;
  6382                this.data.annotationType = r.AnnotationType.SQUARE;
  6383                this.data.hasOwnCanvas = this.data.noRotate;
  6384                if (!this.appearance) {
  6385                  const e = this.color ? getPdfColorArray(this.color) : [0, 0, 0],
  6386                    r = t.get("CA"),
  6387                    n = getRgbColor(t.getArray("IC"), null),
  6388                    i = n ? getPdfColorArray(n) : null,
  6389                    s = i ? r : null;
  6390                  if (0 === this.borderStyle.width && !i) return;
  6391                  this._setDefaultAppearance({
  6392                    xref: a,
  6393                    extra: `${this.borderStyle.width} w`,
  6394                    strokeColor: e,
  6395                    fillColor: i,
  6396                    strokeAlpha: r,
  6397                    fillAlpha: s,
  6398                    pointsCallback: (e, t) => {
  6399                      const a = t[2].x + this.borderStyle.width / 2,
  6400                        r = t[2].y + this.borderStyle.width / 2,
  6401                        n = t[3].x - t[2].x - this.borderStyle.width,
  6402                        s = t[1].y - t[3].y - this.borderStyle.width;
  6403                      e.push(`${a} ${r} ${n} ${s} re`);
  6404                      i ? e.push("B") : e.push("S");
  6405                      return [t[0].x, t[1].x, t[3].y, t[1].y];
  6406                    },
  6407                  });
  6408                }
  6409              }
  6410            }
  6411            class CircleAnnotation extends MarkupAnnotation {
  6412              constructor(e) {
  6413                super(e);
  6414                const { dict: t, xref: a } = e;
  6415                this.data.annotationType = r.AnnotationType.CIRCLE;
  6416                if (!this.appearance) {
  6417                  const e = this.color ? getPdfColorArray(this.color) : [0, 0, 0],
  6418                    r = t.get("CA"),
  6419                    n = getRgbColor(t.getArray("IC"), null),
  6420                    i = n ? getPdfColorArray(n) : null,
  6421                    s = i ? r : null;
  6422                  if (0 === this.borderStyle.width && !i) return;
  6423                  const o = (4 / 3) * Math.tan(Math.PI / 8);
  6424                  this._setDefaultAppearance({
  6425                    xref: a,
  6426                    extra: `${this.borderStyle.width} w`,
  6427                    strokeColor: e,
  6428                    fillColor: i,
  6429                    strokeAlpha: r,
  6430                    fillAlpha: s,
  6431                    pointsCallback: (e, t) => {
  6432                      const a = t[0].x + this.borderStyle.width / 2,
  6433                        r = t[0].y - this.borderStyle.width / 2,
  6434                        n = t[3].x - this.borderStyle.width / 2,
  6435                        s = t[3].y + this.borderStyle.width / 2,
  6436                        c = a + (n - a) / 2,
  6437                        l = r + (s - r) / 2,
  6438                        h = ((n - a) / 2) * o,
  6439                        u = ((s - r) / 2) * o;
  6440                      e.push(
  6441                        `${c} ${s} m`,
  6442                        `${c + h} ${s} ${n} ${l + u} ${n} ${l} c`,
  6443                        `${n} ${l - u} ${c + h} ${r} ${c} ${r} c`,
  6444                        `${c - h} ${r} ${a} ${l - u} ${a} ${l} c`,
  6445                        `${a} ${l + u} ${c - h} ${s} ${c} ${s} c`,
  6446                        "h",
  6447                      );
  6448                      i ? e.push("B") : e.push("S");
  6449                      return [t[0].x, t[1].x, t[3].y, t[1].y];
  6450                    },
  6451                  });
  6452                }
  6453              }
  6454            }
  6455            class PolylineAnnotation extends MarkupAnnotation {
  6456              constructor(e) {
  6457                super(e);
  6458                const { dict: t, xref: a } = e;
  6459                this.data.annotationType = r.AnnotationType.POLYLINE;
  6460                this.data.hasOwnCanvas = this.data.noRotate;
  6461                this.data.vertices = [];
  6462                if (!(this instanceof PolygonAnnotation)) {
  6463                  this.setLineEndings(t.getArray("LE"));
  6464                  this.data.lineEndings = this.lineEndings;
  6465                }
  6466                const n = t.getArray("Vertices");
  6467                if (Array.isArray(n)) {
  6468                  for (let e = 0, t = n.length; e < t; e += 2)
  6469                    this.data.vertices.push({ x: n[e], y: n[e + 1] });
  6470                  if (!this.appearance) {
  6471                    const e = this.color
  6472                        ? getPdfColorArray(this.color)
  6473                        : [0, 0, 0],
  6474                      n = t.get("CA"),
  6475                      i = this.borderStyle.width || 1,
  6476                      s = 2 * i,
  6477                      o = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
  6478                    for (const e of this.data.vertices) {
  6479                      o[0] = Math.min(o[0], e.x - s);
  6480                      o[1] = Math.min(o[1], e.y - s);
  6481                      o[2] = Math.max(o[2], e.x + s);
  6482                      o[3] = Math.max(o[3], e.y + s);
  6483                    }
  6484                    r.Util.intersect(this.rectangle, o) || (this.rectangle = o);
  6485                    this._setDefaultAppearance({
  6486                      xref: a,
  6487                      extra: `${i} w`,
  6488                      strokeColor: e,
  6489                      strokeAlpha: n,
  6490                      pointsCallback: (e, t) => {
  6491                        const a = this.data.vertices;
  6492                        for (let t = 0, r = a.length; t < r; t++)
  6493                          e.push(`${a[t].x} ${a[t].y} ${0 === t ? "m" : "l"}`);
  6494                        e.push("S");
  6495                        return [t[0].x, t[1].x, t[3].y, t[1].y];
  6496                      },
  6497                    });
  6498                  }
  6499                }
  6500              }
  6501            }
  6502            class PolygonAnnotation extends PolylineAnnotation {
  6503              constructor(e) {
  6504                super(e);
  6505                this.data.annotationType = r.AnnotationType.POLYGON;
  6506              }
  6507            }
  6508            class CaretAnnotation extends MarkupAnnotation {
  6509              constructor(e) {
  6510                super(e);
  6511                this.data.annotationType = r.AnnotationType.CARET;
  6512              }
  6513            }
  6514            class InkAnnotation extends MarkupAnnotation {
  6515              constructor(e) {
  6516                super(e);
  6517                this.data.hasOwnCanvas = this.data.noRotate;
  6518                const { dict: t, xref: a } = e;
  6519                this.data.annotationType = r.AnnotationType.INK;
  6520                this.data.inkLists = [];
  6521                const n = t.getArray("InkList");
  6522                if (Array.isArray(n)) {
  6523                  for (let e = 0, t = n.length; e < t; ++e) {
  6524                    this.data.inkLists.push([]);
  6525                    for (let t = 0, r = n[e].length; t < r; t += 2)
  6526                      this.data.inkLists[e].push({
  6527                        x: a.fetchIfRef(n[e][t]),
  6528                        y: a.fetchIfRef(n[e][t + 1]),
  6529                      });
  6530                  }
  6531                  if (!this.appearance) {
  6532                    const e = this.color
  6533                        ? getPdfColorArray(this.color)
  6534                        : [0, 0, 0],
  6535                      n = t.get("CA"),
  6536                      i = this.borderStyle.width || 1,
  6537                      s = 2 * i,
  6538                      o = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
  6539                    for (const e of this.data.inkLists)
  6540                      for (const t of e) {
  6541                        o[0] = Math.min(o[0], t.x - s);
  6542                        o[1] = Math.min(o[1], t.y - s);
  6543                        o[2] = Math.max(o[2], t.x + s);
  6544                        o[3] = Math.max(o[3], t.y + s);
  6545                      }
  6546                    r.Util.intersect(this.rectangle, o) || (this.rectangle = o);
  6547                    this._setDefaultAppearance({
  6548                      xref: a,
  6549                      extra: `${i} w`,
  6550                      strokeColor: e,
  6551                      strokeAlpha: n,
  6552                      pointsCallback: (e, t) => {
  6553                        for (const t of this.data.inkLists) {
  6554                          for (let a = 0, r = t.length; a < r; a++)
  6555                            e.push(`${t[a].x} ${t[a].y} ${0 === a ? "m" : "l"}`);
  6556                          e.push("S");
  6557                        }
  6558                        return [t[0].x, t[1].x, t[3].y, t[1].y];
  6559                      },
  6560                    });
  6561                  }
  6562                }
  6563              }
  6564              static createNewDict(e, t, { apRef: a, ap: n }) {
  6565                const {
  6566                    color: i,
  6567                    opacity: o,
  6568                    paths: c,
  6569                    rect: l,
  6570                    rotation: h,
  6571                    thickness: u,
  6572                  } = e,
  6573                  d = new s.Dict(t);
  6574                d.set("Type", s.Name.get("Annot"));
  6575                d.set("Subtype", s.Name.get("Ink"));
  6576                d.set("CreationDate", `D:${(0, r.getModificationDate)()}`);
  6577                d.set("Rect", l);
  6578                d.set(
  6579                  "InkList",
  6580                  c.map((e) => e.points),
  6581                );
  6582                d.set("F", 4);
  6583                d.set("Rotate", h);
  6584                const f = new s.Dict(t);
  6585                d.set("BS", f);
  6586                f.set("W", u);
  6587                d.set(
  6588                  "C",
  6589                  Array.from(i, (e) => e / 255),
  6590                );
  6591                d.set("CA", o);
  6592                const g = new s.Dict(t);
  6593                d.set("AP", g);
  6594                a ? g.set("N", a) : g.set("N", n);
  6595                return d;
  6596              }
  6597              static async createNewAppearanceStream(e, t, a) {
  6598                const {
  6599                    color: r,
  6600                    rect: c,
  6601                    paths: l,
  6602                    thickness: h,
  6603                    opacity: u,
  6604                  } = e,
  6605                  d = [`${h} w 1 J 1 j`, `${(0, i.getPdfColor)(r, !1)}`];
  6606                1 !== u && d.push("/R0 gs");
  6607                const f = [];
  6608                for (const { bezier: e } of l) {
  6609                  f.length = 0;
  6610                  f.push(
  6611                    `${(0, n.numberToString)(e[0])} ${(0, n.numberToString)(e[1])} m`,
  6612                  );
  6613                  for (let t = 2, a = e.length; t < a; t += 6) {
  6614                    const a = e
  6615                      .slice(t, t + 6)
  6616                      .map(n.numberToString)
  6617                      .join(" ");
  6618                    f.push(`${a} c`);
  6619                  }
  6620                  f.push("S");
  6621                  d.push(f.join("\n"));
  6622                }
  6623                const g = d.join("\n"),
  6624                  p = new s.Dict(t);
  6625                p.set("FormType", 1);
  6626                p.set("Subtype", s.Name.get("Form"));
  6627                p.set("Type", s.Name.get("XObject"));
  6628                p.set("BBox", c);
  6629                p.set("Length", g.length);
  6630                if (1 !== u) {
  6631                  const e = new s.Dict(t),
  6632                    a = new s.Dict(t),
  6633                    r = new s.Dict(t);
  6634                  r.set("CA", u);
  6635                  r.set("Type", s.Name.get("ExtGState"));
  6636                  a.set("R0", r);
  6637                  e.set("ExtGState", a);
  6638                  p.set("Resources", e);
  6639                }
  6640                const m = new o.StringStream(g);
  6641                m.dict = p;
  6642                return m;
  6643              }
  6644            }
  6645            class HighlightAnnotation extends MarkupAnnotation {
  6646              constructor(e) {
  6647                super(e);
  6648                const { dict: t, xref: a } = e;
  6649                this.data.annotationType = r.AnnotationType.HIGHLIGHT;
  6650                if ((this.data.quadPoints = getQuadPoints(t, null))) {
  6651                  const e = this.appearance?.dict.get("Resources");
  6652                  if (!this.appearance || !e?.has("ExtGState")) {
  6653                    this.appearance &&
  6654                      (0, r.warn)(
  6655                        "HighlightAnnotation - ignoring built-in appearance stream.",
  6656                      );
  6657                    const e = this.color
  6658                        ? getPdfColorArray(this.color)
  6659                        : [1, 1, 0],
  6660                      n = t.get("CA");
  6661                    this._setDefaultAppearance({
  6662                      xref: a,
  6663                      fillColor: e,
  6664                      blendMode: "Multiply",
  6665                      fillAlpha: n,
  6666                      pointsCallback: (e, t) => {
  6667                        e.push(
  6668                          `${t[0].x} ${t[0].y} m`,
  6669                          `${t[1].x} ${t[1].y} l`,
  6670                          `${t[3].x} ${t[3].y} l`,
  6671                          `${t[2].x} ${t[2].y} l`,
  6672                          "f",
  6673                        );
  6674                        return [t[0].x, t[1].x, t[3].y, t[1].y];
  6675                      },
  6676                    });
  6677                  }
  6678                } else this.data.popupRef = null;
  6679              }
  6680            }
  6681            class UnderlineAnnotation extends MarkupAnnotation {
  6682              constructor(e) {
  6683                super(e);
  6684                const { dict: t, xref: a } = e;
  6685                this.data.annotationType = r.AnnotationType.UNDERLINE;
  6686                if ((this.data.quadPoints = getQuadPoints(t, null))) {
  6687                  if (!this.appearance) {
  6688                    const e = this.color
  6689                        ? getPdfColorArray(this.color)
  6690                        : [0, 0, 0],
  6691                      r = t.get("CA");
  6692                    this._setDefaultAppearance({
  6693                      xref: a,
  6694                      extra: "[] 0 d 0.571 w",
  6695                      strokeColor: e,
  6696                      strokeAlpha: r,
  6697                      pointsCallback: (e, t) => {
  6698                        e.push(
  6699                          `${t[2].x} ${t[2].y + 1.3} m`,
  6700                          `${t[3].x} ${t[3].y + 1.3} l`,
  6701                          "S",
  6702                        );
  6703                        return [t[0].x, t[1].x, t[3].y, t[1].y];
  6704                      },
  6705                    });
  6706                  }
  6707                } else this.data.popupRef = null;
  6708              }
  6709            }
  6710            class SquigglyAnnotation extends MarkupAnnotation {
  6711              constructor(e) {
  6712                super(e);
  6713                const { dict: t, xref: a } = e;
  6714                this.data.annotationType = r.AnnotationType.SQUIGGLY;
  6715                if ((this.data.quadPoints = getQuadPoints(t, null))) {
  6716                  if (!this.appearance) {
  6717                    const e = this.color
  6718                        ? getPdfColorArray(this.color)
  6719                        : [0, 0, 0],
  6720                      r = t.get("CA");
  6721                    this._setDefaultAppearance({
  6722                      xref: a,
  6723                      extra: "[] 0 d 1 w",
  6724                      strokeColor: e,
  6725                      strokeAlpha: r,
  6726                      pointsCallback: (e, t) => {
  6727                        const a = (t[0].y - t[2].y) / 6;
  6728                        let r = a,
  6729                          n = t[2].x;
  6730                        const i = t[2].y,
  6731                          s = t[3].x;
  6732                        e.push(`${n} ${i + r} m`);
  6733                        do {
  6734                          n += 2;
  6735                          r = 0 === r ? a : 0;
  6736                          e.push(`${n} ${i + r} l`);
  6737                        } while (n < s);
  6738                        e.push("S");
  6739                        return [t[2].x, s, i - 2 * a, i + 2 * a];
  6740                      },
  6741                    });
  6742                  }
  6743                } else this.data.popupRef = null;
  6744              }
  6745            }
  6746            class StrikeOutAnnotation extends MarkupAnnotation {
  6747              constructor(e) {
  6748                super(e);
  6749                const { dict: t, xref: a } = e;
  6750                this.data.annotationType = r.AnnotationType.STRIKEOUT;
  6751                if ((this.data.quadPoints = getQuadPoints(t, null))) {
  6752                  if (!this.appearance) {
  6753                    const e = this.color
  6754                        ? getPdfColorArray(this.color)
  6755                        : [0, 0, 0],
  6756                      r = t.get("CA");
  6757                    this._setDefaultAppearance({
  6758                      xref: a,
  6759                      extra: "[] 0 d 1 w",
  6760                      strokeColor: e,
  6761                      strokeAlpha: r,
  6762                      pointsCallback: (e, t) => {
  6763                        e.push(
  6764                          (t[0].x + t[2].x) / 2 +
  6765                            " " +
  6766                            (t[0].y + t[2].y) / 2 +
  6767                            " m",
  6768                          (t[1].x + t[3].x) / 2 +
  6769                            " " +
  6770                            (t[1].y + t[3].y) / 2 +
  6771                            " l",
  6772                          "S",
  6773                        );
  6774                        return [t[0].x, t[1].x, t[3].y, t[1].y];
  6775                      },
  6776                    });
  6777                  }
  6778                } else this.data.popupRef = null;
  6779              }
  6780            }
  6781            class StampAnnotation extends MarkupAnnotation {
  6782              constructor(e) {
  6783                super(e);
  6784                this.data.annotationType = r.AnnotationType.STAMP;
  6785                this.data.hasOwnCanvas = this.data.noRotate;
  6786              }
  6787              static async createImage(e, t) {
  6788                const { width: a, height: n } = e,
  6789                  i = new OffscreenCanvas(a, n),
  6790                  c = i.getContext("2d", { alpha: !0 });
  6791                c.drawImage(e, 0, 0);
  6792                const l = c.getImageData(0, 0, a, n).data,
  6793                  h = new Uint32Array(l.buffer),
  6794                  u = h.some(
  6795                    r.FeatureTest.isLittleEndian
  6796                      ? (e) => e >>> 24 != 255
  6797                      : (e) => 255 != (255 & e),
  6798                  );
  6799                if (u) {
  6800                  c.fillStyle = "white";
  6801                  c.fillRect(0, 0, a, n);
  6802                  c.drawImage(e, 0, 0);
  6803                }
  6804                const d = i
  6805                    .convertToBlob({ type: "image/jpeg", quality: 1 })
  6806                    .then((e) => e.arrayBuffer()),
  6807                  f = s.Name.get("XObject"),
  6808                  g = s.Name.get("Image"),
  6809                  p = new s.Dict(t);
  6810                p.set("Type", f);
  6811                p.set("Subtype", g);
  6812                p.set("BitsPerComponent", 8);
  6813                p.set("ColorSpace", s.Name.get("DeviceRGB"));
  6814                p.set("Filter", s.Name.get("DCTDecode"));
  6815                p.set("BBox", [0, 0, a, n]);
  6816                p.set("Width", a);
  6817                p.set("Height", n);
  6818                let m = null;
  6819                if (u) {
  6820                  const e = new Uint8Array(h.length);
  6821                  if (r.FeatureTest.isLittleEndian)
  6822                    for (let t = 0, a = h.length; t < a; t++) e[t] = h[t] >>> 24;
  6823                  else
  6824                    for (let t = 0, a = h.length; t < a; t++) e[t] = 255 & h[t];
  6825                  const i = new s.Dict(t);
  6826                  i.set("Type", f);
  6827                  i.set("Subtype", g);
  6828                  i.set("BitsPerComponent", 8);
  6829                  i.set("ColorSpace", s.Name.get("DeviceGray"));
  6830                  i.set("Width", a);
  6831                  i.set("Height", n);
  6832                  m = new o.Stream(e, 0, 0, i);
  6833                }
  6834                return {
  6835                  imageStream: new o.Stream(await d, 0, 0, p),
  6836                  smaskStream: m,
  6837                  width: a,
  6838                  height: n,
  6839                };
  6840              }
  6841              static createNewDict(e, t, { apRef: a, ap: i }) {
  6842                const { rect: o, rotation: c, user: l } = e,
  6843                  h = new s.Dict(t);
  6844                h.set("Type", s.Name.get("Annot"));
  6845                h.set("Subtype", s.Name.get("Stamp"));
  6846                h.set("CreationDate", `D:${(0, r.getModificationDate)()}`);
  6847                h.set("Rect", o);
  6848                h.set("F", 4);
  6849                h.set("Border", [0, 0, 0]);
  6850                h.set("Rotate", c);
  6851                l &&
  6852                  h.set(
  6853                    "T",
  6854                    (0, n.isAscii)(l) ? l : (0, n.stringToUTF16String)(l, !0),
  6855                  );
  6856                if (a || i) {
  6857                  const e = new s.Dict(t);
  6858                  h.set("AP", e);
  6859                  a ? e.set("N", a) : e.set("N", i);
  6860                }
  6861                return h;
  6862              }
  6863              static async createNewAppearanceStream(e, t, a) {
  6864                const { rotation: r } = e,
  6865                  { imageRef: i, width: c, height: l } = a.image,
  6866                  h = new s.Dict(t),
  6867                  u = new s.Dict(t);
  6868                h.set("XObject", u);
  6869                u.set("Im0", i);
  6870                const d = `q ${c} 0 0 ${l} 0 0 cm /Im0 Do Q`,
  6871                  f = new s.Dict(t);
  6872                f.set("FormType", 1);
  6873                f.set("Subtype", s.Name.get("Form"));
  6874                f.set("Type", s.Name.get("XObject"));
  6875                f.set("BBox", [0, 0, c, l]);
  6876                f.set("Resources", h);
  6877                if (r) {
  6878                  const e = (0, n.getRotationMatrix)(r, c, l);
  6879                  f.set("Matrix", e);
  6880                }
  6881                const g = new o.StringStream(d);
  6882                g.dict = f;
  6883                return g;
  6884              }
  6885            }
  6886            class FileAttachmentAnnotation extends MarkupAnnotation {
  6887              constructor(e) {
  6888                super(e);
  6889                const { dict: t, xref: a } = e,
  6890                  n = new d.FileSpec(t.get("FS"), a);
  6891                this.data.annotationType = r.AnnotationType.FILEATTACHMENT;
  6892                this.data.hasOwnCanvas = this.data.noRotate;
  6893                this.data.file = n.serializable;
  6894                const i = t.get("Name");
  6895                this.data.name =
  6896                  i instanceof s.Name
  6897                    ? (0, r.stringToPDFString)(i.name)
  6898                    : "PushPin";
  6899                const o = t.get("ca");
  6900                this.data.fillAlpha =
  6901                  "number" == typeof o && o >= 0 && o <= 1 ? o : null;
  6902              }
  6903            }
  6904          },
  6905          (e, t, a) => {
  6906            Object.defineProperty(t, "__esModule", { value: !0 });
  6907            t.FakeUnicodeFont = void 0;
  6908            t.createDefaultAppearance = function createDefaultAppearance({
  6909              fontSize: e,
  6910              fontName: t,
  6911              fontColor: a,
  6912            }) {
  6913              return `/${(0, n.escapePDFName)(t)} ${e} Tf ${getPdfColor(a, !0)}`;
  6914            };
  6915            t.getPdfColor = getPdfColor;
  6916            t.parseAppearanceStream = function parseAppearanceStream(e, t, a) {
  6917              return new AppearanceStreamEvaluator(e, t, a).parse();
  6918            };
  6919            t.parseDefaultAppearance = function parseDefaultAppearance(e) {
  6920              return new DefaultAppearanceEvaluator(e).parse();
  6921            };
  6922            var r = a(4),
  6923              n = a(3),
  6924              i = a(2),
  6925              s = a(12),
  6926              o = a(13),
  6927              c = a(59),
  6928              l = a(57),
  6929              h = a(8);
  6930            class DefaultAppearanceEvaluator extends o.EvaluatorPreprocessor {
  6931              constructor(e) {
  6932                super(new h.StringStream(e));
  6933              }
  6934              parse() {
  6935                const e = { fn: 0, args: [] },
  6936                  t = {
  6937                    fontSize: 0,
  6938                    fontName: "",
  6939                    fontColor: new Uint8ClampedArray(3),
  6940                  };
  6941                try {
  6942                  for (;;) {
  6943                    e.args.length = 0;
  6944                    if (!this.read(e)) break;
  6945                    if (0 !== this.savedStatesDepth) continue;
  6946                    const { fn: a, args: n } = e;
  6947                    switch (0 | a) {
  6948                      case i.OPS.setFont:
  6949                        const [e, a] = n;
  6950                        e instanceof r.Name && (t.fontName = e.name);
  6951                        "number" == typeof a && a > 0 && (t.fontSize = a);
  6952                        break;
  6953                      case i.OPS.setFillRGBColor:
  6954                        s.ColorSpace.singletons.rgb.getRgbItem(
  6955                          n,
  6956                          0,
  6957                          t.fontColor,
  6958                          0,
  6959                        );
  6960                        break;
  6961                      case i.OPS.setFillGray:
  6962                        s.ColorSpace.singletons.gray.getRgbItem(
  6963                          n,
  6964                          0,
  6965                          t.fontColor,
  6966                          0,
  6967                        );
  6968                        break;
  6969                      case i.OPS.setFillCMYKColor:
  6970                        s.ColorSpace.singletons.cmyk.getRgbItem(
  6971                          n,
  6972                          0,
  6973                          t.fontColor,
  6974                          0,
  6975                        );
  6976                    }
  6977                  }
  6978                } catch (e) {
  6979                  (0, i.warn)(
  6980                    `parseDefaultAppearance - ignoring errors: "${e}".`,
  6981                  );
  6982                }
  6983                return t;
  6984              }
  6985            }
  6986            class AppearanceStreamEvaluator extends o.EvaluatorPreprocessor {
  6987              constructor(e, t, a) {
  6988                super(e);
  6989                this.stream = e;
  6990                this.evaluatorOptions = t;
  6991                this.xref = a;
  6992                this.resources = e.dict?.get("Resources");
  6993              }
  6994              parse() {
  6995                const e = { fn: 0, args: [] };
  6996                let t = {
  6997                    scaleFactor: 1,
  6998                    fontSize: 0,
  6999                    fontName: "",
  7000                    fontColor: new Uint8ClampedArray(3),
  7001                    fillColorSpace: s.ColorSpace.singletons.gray,
  7002                  },
  7003                  a = !1;
  7004                const n = [];
  7005                try {
  7006                  for (;;) {
  7007                    e.args.length = 0;
  7008                    if (a || !this.read(e)) break;
  7009                    const { fn: o, args: c } = e;
  7010                    switch (0 | o) {
  7011                      case i.OPS.save:
  7012                        n.push({
  7013                          scaleFactor: t.scaleFactor,
  7014                          fontSize: t.fontSize,
  7015                          fontName: t.fontName,
  7016                          fontColor: t.fontColor.slice(),
  7017                          fillColorSpace: t.fillColorSpace,
  7018                        });
  7019                        break;
  7020                      case i.OPS.restore:
  7021                        t = n.pop() || t;
  7022                        break;
  7023                      case i.OPS.setTextMatrix:
  7024                        t.scaleFactor *= Math.hypot(c[0], c[1]);
  7025                        break;
  7026                      case i.OPS.setFont:
  7027                        const [e, o] = c;
  7028                        e instanceof r.Name && (t.fontName = e.name);
  7029                        "number" == typeof o &&
  7030                          o > 0 &&
  7031                          (t.fontSize = o * t.scaleFactor);
  7032                        break;
  7033                      case i.OPS.setFillColorSpace:
  7034                        t.fillColorSpace = s.ColorSpace.parse({
  7035                          cs: c[0],
  7036                          xref: this.xref,
  7037                          resources: this.resources,
  7038                          pdfFunctionFactory: this._pdfFunctionFactory,
  7039                          localColorSpaceCache: this._localColorSpaceCache,
  7040                        });
  7041                        break;
  7042                      case i.OPS.setFillColor:
  7043                        t.fillColorSpace.getRgbItem(c, 0, t.fontColor, 0);
  7044                        break;
  7045                      case i.OPS.setFillRGBColor:
  7046                        s.ColorSpace.singletons.rgb.getRgbItem(
  7047                          c,
  7048                          0,
  7049                          t.fontColor,
  7050                          0,
  7051                        );
  7052                        break;
  7053                      case i.OPS.setFillGray:
  7054                        s.ColorSpace.singletons.gray.getRgbItem(
  7055                          c,
  7056                          0,
  7057                          t.fontColor,
  7058                          0,
  7059                        );
  7060                        break;
  7061                      case i.OPS.setFillCMYKColor:
  7062                        s.ColorSpace.singletons.cmyk.getRgbItem(
  7063                          c,
  7064                          0,
  7065                          t.fontColor,
  7066                          0,
  7067                        );
  7068                        break;
  7069                      case i.OPS.showText:
  7070                      case i.OPS.showSpacedText:
  7071                      case i.OPS.nextLineShowText:
  7072                      case i.OPS.nextLineSetSpacingShowText:
  7073                        a = !0;
  7074                    }
  7075                  }
  7076                } catch (e) {
  7077                  (0, i.warn)(`parseAppearanceStream - ignoring errors: "${e}".`);
  7078                }
  7079                this.stream.reset();
  7080                delete t.scaleFactor;
  7081                delete t.fillColorSpace;
  7082                return t;
  7083              }
  7084              get _localColorSpaceCache() {
  7085                return (0, i.shadow)(
  7086                  this,
  7087                  "_localColorSpaceCache",
  7088                  new c.LocalColorSpaceCache(),
  7089                );
  7090              }
  7091              get _pdfFunctionFactory() {
  7092                const e = new l.PDFFunctionFactory({
  7093                  xref: this.xref,
  7094                  isEvalSupported: this.evaluatorOptions.isEvalSupported,
  7095                });
  7096                return (0, i.shadow)(this, "_pdfFunctionFactory", e);
  7097              }
  7098            }
  7099            function getPdfColor(e, t) {
  7100              if (e[0] === e[1] && e[1] === e[2]) {
  7101                const a = e[0] / 255;
  7102                return `${(0, n.numberToString)(a)} ${t ? "g" : "G"}`;
  7103              }
  7104              return (
  7105                Array.from(e, (e) => (0, n.numberToString)(e / 255)).join(" ") +
  7106                " " +
  7107                (t ? "rg" : "RG")
  7108              );
  7109            }
  7110            class FakeUnicodeFont {
  7111              constructor(e, t) {
  7112                this.xref = e;
  7113                this.widths = null;
  7114                this.firstChar = 1 / 0;
  7115                this.lastChar = -1 / 0;
  7116                this.fontFamily = t;
  7117                const a = new OffscreenCanvas(1, 1);
  7118                this.ctxMeasure = a.getContext("2d");
  7119                FakeUnicodeFont._fontNameId || (FakeUnicodeFont._fontNameId = 1);
  7120                this.fontName = r.Name.get(
  7121                  `InvalidPDFjsFont_${t}_${FakeUnicodeFont._fontNameId++}`,
  7122                );
  7123              }
  7124              get toUnicodeRef() {
  7125                if (!FakeUnicodeFont._toUnicodeRef) {
  7126                  const e =
  7127                      "/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo\n<< /Registry (Adobe)\n/Ordering (UCS) /Supplement 0 >> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000> <FFFF>\nendcodespacerange\n1 beginbfrange\n<0000> <FFFF> <0000>\nendbfrange\nendcmap CMapName currentdict /CMap defineresource pop end end",
  7128                    t = (FakeUnicodeFont.toUnicodeStream = new h.StringStream(e)),
  7129                    a = new r.Dict(this.xref);
  7130                  t.dict = a;
  7131                  a.set("Length", e.length);
  7132                  FakeUnicodeFont._toUnicodeRef =
  7133                    this.xref.getNewPersistentRef(t);
  7134                }
  7135                return FakeUnicodeFont._toUnicodeRef;
  7136              }
  7137              get fontDescriptorRef() {
  7138                if (!FakeUnicodeFont._fontDescriptorRef) {
  7139                  const e = new r.Dict(this.xref);
  7140                  e.set("Type", r.Name.get("FontDescriptor"));
  7141                  e.set("FontName", this.fontName);
  7142                  e.set("FontFamily", "MyriadPro Regular");
  7143                  e.set("FontBBox", [0, 0, 0, 0]);
  7144                  e.set("FontStretch", r.Name.get("Normal"));
  7145                  e.set("FontWeight", 400);
  7146                  e.set("ItalicAngle", 0);
  7147                  FakeUnicodeFont._fontDescriptorRef =
  7148                    this.xref.getNewPersistentRef(e);
  7149                }
  7150                return FakeUnicodeFont._fontDescriptorRef;
  7151              }
  7152              get descendantFontRef() {
  7153                const e = new r.Dict(this.xref);
  7154                e.set("BaseFont", this.fontName);
  7155                e.set("Type", r.Name.get("Font"));
  7156                e.set("Subtype", r.Name.get("CIDFontType0"));
  7157                e.set("CIDToGIDMap", r.Name.get("Identity"));
  7158                e.set("FirstChar", this.firstChar);
  7159                e.set("LastChar", this.lastChar);
  7160                e.set("FontDescriptor", this.fontDescriptorRef);
  7161                e.set("DW", 1e3);
  7162                const t = [],
  7163                  a = [...this.widths.entries()].sort();
  7164                let n = null,
  7165                  i = null;
  7166                for (const [e, r] of a)
  7167                  if (n)
  7168                    if (e === n + i.length) i.push(r);
  7169                    else {
  7170                      t.push(n, i);
  7171                      n = e;
  7172                      i = [r];
  7173                    }
  7174                  else {
  7175                    n = e;
  7176                    i = [r];
  7177                  }
  7178                n && t.push(n, i);
  7179                e.set("W", t);
  7180                const s = new r.Dict(this.xref);
  7181                s.set("Ordering", "Identity");
  7182                s.set("Registry", "Adobe");
  7183                s.set("Supplement", 0);
  7184                e.set("CIDSystemInfo", s);
  7185                return this.xref.getNewPersistentRef(e);
  7186              }
  7187              get baseFontRef() {
  7188                const e = new r.Dict(this.xref);
  7189                e.set("BaseFont", this.fontName);
  7190                e.set("Type", r.Name.get("Font"));
  7191                e.set("Subtype", r.Name.get("Type0"));
  7192                e.set("Encoding", r.Name.get("Identity-H"));
  7193                e.set("DescendantFonts", [this.descendantFontRef]);
  7194                e.set("ToUnicode", this.toUnicodeRef);
  7195                return this.xref.getNewPersistentRef(e);
  7196              }
  7197              get resources() {
  7198                const e = new r.Dict(this.xref),
  7199                  t = new r.Dict(this.xref);
  7200                t.set(this.fontName.name, this.baseFontRef);
  7201                e.set("Font", t);
  7202                return e;
  7203              }
  7204              _createContext() {
  7205                this.widths = new Map();
  7206                this.ctxMeasure.font = `1000px ${this.fontFamily}`;
  7207                return this.ctxMeasure;
  7208              }
  7209              createFontResources(e) {
  7210                const t = this._createContext();
  7211                for (const a of e.split(/\r\n?|\n/))
  7212                  for (const e of a.split("")) {
  7213                    const a = e.charCodeAt(0);
  7214                    if (this.widths.has(a)) continue;
  7215                    const r = t.measureText(e),
  7216                      n = Math.ceil(r.width);
  7217                    this.widths.set(a, n);
  7218                    this.firstChar = Math.min(a, this.firstChar);
  7219                    this.lastChar = Math.max(a, this.lastChar);
  7220                  }
  7221                return this.resources;
  7222              }
  7223              createAppearance(e, t, a, s, o, c) {
  7224                const l = this._createContext(),
  7225                  u = [];
  7226                let d = -1 / 0;
  7227                for (const t of e.split(/\r\n?|\n/)) {
  7228                  u.push(t);
  7229                  const e = l.measureText(t).width;
  7230                  d = Math.max(d, e);
  7231                  for (const e of t.split("")) {
  7232                    const t = e.charCodeAt(0);
  7233                    let a = this.widths.get(t);
  7234                    if (void 0 === a) {
  7235                      const r = l.measureText(e);
  7236                      a = Math.ceil(r.width);
  7237                      this.widths.set(t, a);
  7238                      this.firstChar = Math.min(t, this.firstChar);
  7239                      this.lastChar = Math.max(t, this.lastChar);
  7240                    }
  7241                  }
  7242                }
  7243                d *= s / 1e3;
  7244                const [f, g, p, m] = t;
  7245                let b = p - f,
  7246                  y = m - g;
  7247                a % 180 != 0 && ([b, y] = [y, b]);
  7248                let w = 1;
  7249                d > b && (w = b / d);
  7250                let S = 1;
  7251                const x = i.LINE_FACTOR * s,
  7252                  C = i.LINE_DESCENT_FACTOR * s,
  7253                  k = x * u.length;
  7254                k > y && (S = y / k);
  7255                const v = s * Math.min(w, S),
  7256                  F = [
  7257                    "q",
  7258                    `0 0 ${(0, n.numberToString)(b)} ${(0, n.numberToString)(y)} re W n`,
  7259                    "BT",
  7260                    `1 0 0 1 0 ${(0, n.numberToString)(y + C)} Tm 0 Tc ${getPdfColor(o, !0)}`,
  7261                    `/${this.fontName.name} ${(0, n.numberToString)(v)} Tf`,
  7262                  ],
  7263                  { resources: O } = this;
  7264                if (
  7265                  1 !== (c = "number" == typeof c && c >= 0 && c <= 1 ? c : 1)
  7266                ) {
  7267                  F.push("/R0 gs");
  7268                  const e = new r.Dict(this.xref),
  7269                    t = new r.Dict(this.xref);
  7270                  t.set("ca", c);
  7271                  t.set("CA", c);
  7272                  t.set("Type", r.Name.get("ExtGState"));
  7273                  e.set("R0", t);
  7274                  O.set("ExtGState", e);
  7275                }
  7276                const T = (0, n.numberToString)(x);
  7277                for (const e of u)
  7278                  F.push(`0 -${T} Td <${(0, n.stringToUTF16HexString)(e)}> Tj`);
  7279                F.push("ET", "Q");
  7280                const M = F.join("\n"),
  7281                  D = new r.Dict(this.xref);
  7282                D.set("Subtype", r.Name.get("Form"));
  7283                D.set("Type", r.Name.get("XObject"));
  7284                D.set("BBox", [0, 0, b, y]);
  7285                D.set("Length", M.length);
  7286                D.set("Resources", O);
  7287                if (a) {
  7288                  const e = (0, n.getRotationMatrix)(a, b, y);
  7289                  D.set("Matrix", e);
  7290                }
  7291                const E = new h.StringStream(M);
  7292                E.dict = D;
  7293                return E;
  7294              }
  7295            }
  7296            t.FakeUnicodeFont = FakeUnicodeFont;
  7297          },
  7298          (e, t, a) => {
  7299            Object.defineProperty(t, "__esModule", { value: !0 });
  7300            t.ColorSpace = void 0;
  7301            var r = a(2),
  7302              n = a(4),
  7303              i = a(5),
  7304              s = a(3);
  7305            class ColorSpace {
  7306              constructor(e, t) {
  7307                this.constructor === ColorSpace &&
  7308                  (0, r.unreachable)("Cannot initialize ColorSpace.");
  7309                this.name = e;
  7310                this.numComps = t;
  7311              }
  7312              getRgb(e, t) {
  7313                const a = new Uint8ClampedArray(3);
  7314                this.getRgbItem(e, t, a, 0);
  7315                return a;
  7316              }
  7317              getRgbItem(e, t, a, n) {
  7318                (0, r.unreachable)("Should not call ColorSpace.getRgbItem");
  7319              }
  7320              getRgbBuffer(e, t, a, n, i, s, o) {
  7321                (0, r.unreachable)("Should not call ColorSpace.getRgbBuffer");
  7322              }
  7323              getOutputLength(e, t) {
  7324                (0, r.unreachable)("Should not call ColorSpace.getOutputLength");
  7325              }
  7326              isPassthrough(e) {
  7327                return !1;
  7328              }
  7329              isDefaultDecode(e, t) {
  7330                return ColorSpace.isDefaultDecode(e, this.numComps);
  7331              }
  7332              fillRgb(e, t, a, r, n, i, s, o, c) {
  7333                const l = t * a;
  7334                let h = null;
  7335                const u = 1 << s,
  7336                  d = a !== n || t !== r;
  7337                if (this.isPassthrough(s)) h = o;
  7338                else if (
  7339                  1 === this.numComps &&
  7340                  l > u &&
  7341                  "DeviceGray" !== this.name &&
  7342                  "DeviceRGB" !== this.name
  7343                ) {
  7344                  const t = s <= 8 ? new Uint8Array(u) : new Uint16Array(u);
  7345                  for (let e = 0; e < u; e++) t[e] = e;
  7346                  const a = new Uint8ClampedArray(3 * u);
  7347                  this.getRgbBuffer(t, 0, u, a, 0, s, 0);
  7348                  if (d) {
  7349                    h = new Uint8Array(3 * l);
  7350                    let e = 0;
  7351                    for (let t = 0; t < l; ++t) {
  7352                      const r = 3 * o[t];
  7353                      h[e++] = a[r];
  7354                      h[e++] = a[r + 1];
  7355                      h[e++] = a[r + 2];
  7356                    }
  7357                  } else {
  7358                    let t = 0;
  7359                    for (let r = 0; r < l; ++r) {
  7360                      const n = 3 * o[r];
  7361                      e[t++] = a[n];
  7362                      e[t++] = a[n + 1];
  7363                      e[t++] = a[n + 2];
  7364                      t += c;
  7365                    }
  7366                  }
  7367                } else if (d) {
  7368                  h = new Uint8ClampedArray(3 * l);
  7369                  this.getRgbBuffer(o, 0, l, h, 0, s, 0);
  7370                } else this.getRgbBuffer(o, 0, r * i, e, 0, s, c);
  7371                if (h)
  7372                  if (d)
  7373                    !(function resizeRgbImage(e, t, a, r, n, i, s) {
  7374                      s = 1 !== s ? 0 : s;
  7375                      const o = a / n,
  7376                        c = r / i;
  7377                      let l,
  7378                        h = 0;
  7379                      const u = new Uint16Array(n),
  7380                        d = 3 * a;
  7381                      for (let e = 0; e < n; e++) u[e] = 3 * Math.floor(e * o);
  7382                      for (let a = 0; a < i; a++) {
  7383                        const r = Math.floor(a * c) * d;
  7384                        for (let a = 0; a < n; a++) {
  7385                          l = r + u[a];
  7386                          t[h++] = e[l++];
  7387                          t[h++] = e[l++];
  7388                          t[h++] = e[l++];
  7389                          h += s;
  7390                        }
  7391                      }
  7392                    })(h, e, t, a, r, n, c);
  7393                  else {
  7394                    let t = 0,
  7395                      a = 0;
  7396                    for (let n = 0, s = r * i; n < s; n++) {
  7397                      e[t++] = h[a++];
  7398                      e[t++] = h[a++];
  7399                      e[t++] = h[a++];
  7400                      t += c;
  7401                    }
  7402                  }
  7403              }
  7404              get usesZeroToOneRange() {
  7405                return (0, r.shadow)(this, "usesZeroToOneRange", !0);
  7406              }
  7407              static _cache(e, t, a, r) {
  7408                if (!a)
  7409                  throw new Error(
  7410                    'ColorSpace._cache - expected "localColorSpaceCache" argument.',
  7411                  );
  7412                if (!r)
  7413                  throw new Error(
  7414                    'ColorSpace._cache - expected "parsedColorSpace" argument.',
  7415                  );
  7416                let i, s;
  7417                if (e instanceof n.Ref) {
  7418                  s = e;
  7419                  e = t.fetch(e);
  7420                }
  7421                e instanceof n.Name && (i = e.name);
  7422                (i || s) && a.set(i, s, r);
  7423              }
  7424              static getCached(e, t, a) {
  7425                if (!a)
  7426                  throw new Error(
  7427                    'ColorSpace.getCached - expected "localColorSpaceCache" argument.',
  7428                  );
  7429                if (e instanceof n.Ref) {
  7430                  const r = a.getByRef(e);
  7431                  if (r) return r;
  7432                  try {
  7433                    e = t.fetch(e);
  7434                  } catch (e) {
  7435                    if (e instanceof s.MissingDataException) throw e;
  7436                  }
  7437                }
  7438                if (e instanceof n.Name) {
  7439                  const t = a.getByName(e.name);
  7440                  if (t) return t;
  7441                }
  7442                return null;
  7443              }
  7444              static async parseAsync({
  7445                cs: e,
  7446                xref: t,
  7447                resources: a = null,
  7448                pdfFunctionFactory: r,
  7449                localColorSpaceCache: n,
  7450              }) {
  7451                const i = this._parse(e, t, a, r);
  7452                this._cache(e, t, n, i);
  7453                return i;
  7454              }
  7455              static parse({
  7456                cs: e,
  7457                xref: t,
  7458                resources: a = null,
  7459                pdfFunctionFactory: r,
  7460                localColorSpaceCache: n,
  7461              }) {
  7462                const i = this.getCached(e, t, n);
  7463                if (i) return i;
  7464                const s = this._parse(e, t, a, r);
  7465                this._cache(e, t, n, s);
  7466                return s;
  7467              }
  7468              static _parse(e, t, a = null, i) {
  7469                if ((e = t.fetchIfRef(e)) instanceof n.Name)
  7470                  switch (e.name) {
  7471                    case "G":
  7472                    case "DeviceGray":
  7473                      return this.singletons.gray;
  7474                    case "RGB":
  7475                    case "DeviceRGB":
  7476                      return this.singletons.rgb;
  7477                    case "CMYK":
  7478                    case "DeviceCMYK":
  7479                      return this.singletons.cmyk;
  7480                    case "Pattern":
  7481                      return new PatternCS(null);
  7482                    default:
  7483                      if (a instanceof n.Dict) {
  7484                        const r = a.get("ColorSpace");
  7485                        if (r instanceof n.Dict) {
  7486                          const s = r.get(e.name);
  7487                          if (s) {
  7488                            if (s instanceof n.Name)
  7489                              return this._parse(s, t, a, i);
  7490                            e = s;
  7491                            break;
  7492                          }
  7493                        }
  7494                      }
  7495                      throw new r.FormatError(
  7496                        `Unrecognized ColorSpace: ${e.name}`,
  7497                      );
  7498                  }
  7499                if (Array.isArray(e)) {
  7500                  const n = t.fetchIfRef(e[0]).name;
  7501                  let s, o, c, l, h, u;
  7502                  switch (n) {
  7503                    case "G":
  7504                    case "DeviceGray":
  7505                      return this.singletons.gray;
  7506                    case "RGB":
  7507                    case "DeviceRGB":
  7508                      return this.singletons.rgb;
  7509                    case "CMYK":
  7510                    case "DeviceCMYK":
  7511                      return this.singletons.cmyk;
  7512                    case "CalGray":
  7513                      s = t.fetchIfRef(e[1]);
  7514                      l = s.getArray("WhitePoint");
  7515                      h = s.getArray("BlackPoint");
  7516                      u = s.get("Gamma");
  7517                      return new CalGrayCS(l, h, u);
  7518                    case "CalRGB":
  7519                      s = t.fetchIfRef(e[1]);
  7520                      l = s.getArray("WhitePoint");
  7521                      h = s.getArray("BlackPoint");
  7522                      u = s.getArray("Gamma");
  7523                      const d = s.getArray("Matrix");
  7524                      return new CalRGBCS(l, h, u, d);
  7525                    case "ICCBased":
  7526                      const f = t.fetchIfRef(e[1]).dict;
  7527                      o = f.get("N");
  7528                      const g = f.get("Alternate");
  7529                      if (g) {
  7530                        const e = this._parse(g, t, a, i);
  7531                        if (e.numComps === o) return e;
  7532                        (0, r.warn)(
  7533                          "ICCBased color space: Ignoring incorrect /Alternate entry.",
  7534                        );
  7535                      }
  7536                      if (1 === o) return this.singletons.gray;
  7537                      if (3 === o) return this.singletons.rgb;
  7538                      if (4 === o) return this.singletons.cmyk;
  7539                      break;
  7540                    case "Pattern":
  7541                      c = e[1] || null;
  7542                      c && (c = this._parse(c, t, a, i));
  7543                      return new PatternCS(c);
  7544                    case "I":
  7545                    case "Indexed":
  7546                      c = this._parse(e[1], t, a, i);
  7547                      const p = t.fetchIfRef(e[2]) + 1,
  7548                        m = t.fetchIfRef(e[3]);
  7549                      return new IndexedCS(c, p, m);
  7550                    case "Separation":
  7551                    case "DeviceN":
  7552                      const b = t.fetchIfRef(e[1]);
  7553                      o = Array.isArray(b) ? b.length : 1;
  7554                      c = this._parse(e[2], t, a, i);
  7555                      const y = i.create(e[3]);
  7556                      return new AlternateCS(o, c, y);
  7557                    case "Lab":
  7558                      s = t.fetchIfRef(e[1]);
  7559                      l = s.getArray("WhitePoint");
  7560                      h = s.getArray("BlackPoint");
  7561                      const w = s.getArray("Range");
  7562                      return new LabCS(l, h, w);
  7563                    default:
  7564                      throw new r.FormatError(
  7565                        `Unimplemented ColorSpace object: ${n}`,
  7566                      );
  7567                  }
  7568                }
  7569                throw new r.FormatError(`Unrecognized ColorSpace object: ${e}`);
  7570              }
  7571              static isDefaultDecode(e, t) {
  7572                if (!Array.isArray(e)) return !0;
  7573                if (2 * t !== e.length) {
  7574                  (0, r.warn)("The decode map is not the correct length");
  7575                  return !0;
  7576                }
  7577                for (let t = 0, a = e.length; t < a; t += 2)
  7578                  if (0 !== e[t] || 1 !== e[t + 1]) return !1;
  7579                return !0;
  7580              }
  7581              static get singletons() {
  7582                return (0, r.shadow)(this, "singletons", {
  7583                  get gray() {
  7584                    return (0, r.shadow)(this, "gray", new DeviceGrayCS());
  7585                  },
  7586                  get rgb() {
  7587                    return (0, r.shadow)(this, "rgb", new DeviceRgbCS());
  7588                  },
  7589                  get cmyk() {
  7590                    return (0, r.shadow)(this, "cmyk", new DeviceCmykCS());
  7591                  },
  7592                });
  7593              }
  7594            }
  7595            t.ColorSpace = ColorSpace;
  7596            class AlternateCS extends ColorSpace {
  7597              constructor(e, t, a) {
  7598                super("Alternate", e);
  7599                this.base = t;
  7600                this.tintFn = a;
  7601                this.tmpBuf = new Float32Array(t.numComps);
  7602              }
  7603              getRgbItem(e, t, a, r) {
  7604                const n = this.tmpBuf;
  7605                this.tintFn(e, t, n, 0);
  7606                this.base.getRgbItem(n, 0, a, r);
  7607              }
  7608              getRgbBuffer(e, t, a, r, n, i, s) {
  7609                const o = this.tintFn,
  7610                  c = this.base,
  7611                  l = 1 / ((1 << i) - 1),
  7612                  h = c.numComps,
  7613                  u = c.usesZeroToOneRange,
  7614                  d = (c.isPassthrough(8) || !u) && 0 === s;
  7615                let f = d ? n : 0;
  7616                const g = d ? r : new Uint8ClampedArray(h * a),
  7617                  p = this.numComps,
  7618                  m = new Float32Array(p),
  7619                  b = new Float32Array(h);
  7620                let y, w;
  7621                for (y = 0; y < a; y++) {
  7622                  for (w = 0; w < p; w++) m[w] = e[t++] * l;
  7623                  o(m, 0, b, 0);
  7624                  if (u) for (w = 0; w < h; w++) g[f++] = 255 * b[w];
  7625                  else {
  7626                    c.getRgbItem(b, 0, g, f);
  7627                    f += h;
  7628                  }
  7629                }
  7630                d || c.getRgbBuffer(g, 0, a, r, n, 8, s);
  7631              }
  7632              getOutputLength(e, t) {
  7633                return this.base.getOutputLength(
  7634                  (e * this.base.numComps) / this.numComps,
  7635                  t,
  7636                );
  7637              }
  7638            }
  7639            class PatternCS extends ColorSpace {
  7640              constructor(e) {
  7641                super("Pattern", null);
  7642                this.base = e;
  7643              }
  7644              isDefaultDecode(e, t) {
  7645                (0, r.unreachable)("Should not call PatternCS.isDefaultDecode");
  7646              }
  7647            }
  7648            class IndexedCS extends ColorSpace {
  7649              constructor(e, t, a) {
  7650                super("Indexed", 1);
  7651                this.base = e;
  7652                this.highVal = t;
  7653                const n = e.numComps * t;
  7654                this.lookup = new Uint8Array(n);
  7655                if (a instanceof i.BaseStream) {
  7656                  const e = a.getBytes(n);
  7657                  this.lookup.set(e);
  7658                } else {
  7659                  if ("string" != typeof a)
  7660                    throw new r.FormatError(
  7661                      `IndexedCS - unrecognized lookup table: ${a}`,
  7662                    );
  7663                  for (let e = 0; e < n; ++e)
  7664                    this.lookup[e] = 255 & a.charCodeAt(e);
  7665                }
  7666              }
  7667              getRgbItem(e, t, a, r) {
  7668                const n = this.base.numComps,
  7669                  i = e[t] * n;
  7670                this.base.getRgbBuffer(this.lookup, i, 1, a, r, 8, 0);
  7671              }
  7672              getRgbBuffer(e, t, a, r, n, i, s) {
  7673                const o = this.base,
  7674                  c = o.numComps,
  7675                  l = o.getOutputLength(c, s),
  7676                  h = this.lookup;
  7677                for (let i = 0; i < a; ++i) {
  7678                  const a = e[t++] * c;
  7679                  o.getRgbBuffer(h, a, 1, r, n, 8, s);
  7680                  n += l;
  7681                }
  7682              }
  7683              getOutputLength(e, t) {
  7684                return this.base.getOutputLength(e * this.base.numComps, t);
  7685              }
  7686              isDefaultDecode(e, t) {
  7687                if (!Array.isArray(e)) return !0;
  7688                if (2 !== e.length) {
  7689                  (0, r.warn)("Decode map length is not correct");
  7690                  return !0;
  7691                }
  7692                if (!Number.isInteger(t) || t < 1) {
  7693                  (0, r.warn)("Bits per component is not correct");
  7694                  return !0;
  7695                }
  7696                return 0 === e[0] && e[1] === (1 << t) - 1;
  7697              }
  7698            }
  7699            class DeviceGrayCS extends ColorSpace {
  7700              constructor() {
  7701                super("DeviceGray", 1);
  7702              }
  7703              getRgbItem(e, t, a, r) {
  7704                const n = 255 * e[t];
  7705                a[r] = a[r + 1] = a[r + 2] = n;
  7706              }
  7707              getRgbBuffer(e, t, a, r, n, i, s) {
  7708                const o = 255 / ((1 << i) - 1);
  7709                let c = t,
  7710                  l = n;
  7711                for (let t = 0; t < a; ++t) {
  7712                  const t = o * e[c++];
  7713                  r[l++] = t;
  7714                  r[l++] = t;
  7715                  r[l++] = t;
  7716                  l += s;
  7717                }
  7718              }
  7719              getOutputLength(e, t) {
  7720                return e * (3 + t);
  7721              }
  7722            }
  7723            class DeviceRgbCS extends ColorSpace {
  7724              constructor() {
  7725                super("DeviceRGB", 3);
  7726              }
  7727              getRgbItem(e, t, a, r) {
  7728                a[r] = 255 * e[t];
  7729                a[r + 1] = 255 * e[t + 1];
  7730                a[r + 2] = 255 * e[t + 2];
  7731              }
  7732              getRgbBuffer(e, t, a, r, n, i, s) {
  7733                if (8 === i && 0 === s) {
  7734                  r.set(e.subarray(t, t + 3 * a), n);
  7735                  return;
  7736                }
  7737                const o = 255 / ((1 << i) - 1);
  7738                let c = t,
  7739                  l = n;
  7740                for (let t = 0; t < a; ++t) {
  7741                  r[l++] = o * e[c++];
  7742                  r[l++] = o * e[c++];
  7743                  r[l++] = o * e[c++];
  7744                  l += s;
  7745                }
  7746              }
  7747              getOutputLength(e, t) {
  7748                return ((e * (3 + t)) / 3) | 0;
  7749              }
  7750              isPassthrough(e) {
  7751                return 8 === e;
  7752              }
  7753            }
  7754            class DeviceCmykCS extends ColorSpace {
  7755              constructor() {
  7756                super("DeviceCMYK", 4);
  7757              }
  7758              #r(e, t, a, r, n) {
  7759                const i = e[t] * a,
  7760                  s = e[t + 1] * a,
  7761                  o = e[t + 2] * a,
  7762                  c = e[t + 3] * a;
  7763                r[n] =
  7764                  255 +
  7765                  i *
  7766                    (-4.387332384609988 * i +
  7767                      54.48615194189176 * s +
  7768                      18.82290502165302 * o +
  7769                      212.25662451639585 * c -
  7770                      285.2331026137004) +
  7771                  s *
  7772                    (1.7149763477362134 * s -
  7773                      5.6096736904047315 * o +
  7774                      -17.873870861415444 * c -
  7775                      5.497006427196366) +
  7776                  o *
  7777                    (-2.5217340131683033 * o -
  7778                      21.248923337353073 * c +
  7779                      17.5119270841813) +
  7780                  c * (-21.86122147463605 * c - 189.48180835922747);
  7781                r[n + 1] =
  7782                  255 +
  7783                  i *
  7784                    (8.841041422036149 * i +
  7785                      60.118027045597366 * s +
  7786                      6.871425592049007 * o +
  7787                      31.159100130055922 * c -
  7788                      79.2970844816548) +
  7789                  s *
  7790                    (-15.310361306967817 * s +
  7791                      17.575251261109482 * o +
  7792                      131.35250912493976 * c -
  7793                      190.9453302588951) +
  7794                  o *
  7795                    (4.444339102852739 * o +
  7796                      9.8632861493405 * c -
  7797                      24.86741582555878) +
  7798                  c * (-20.737325471181034 * c - 187.80453709719578);
  7799                r[n + 2] =
  7800                  255 +
  7801                  i *
  7802                    (0.8842522430003296 * i +
  7803                      8.078677503112928 * s +
  7804                      30.89978309703729 * o -
  7805                      0.23883238689178934 * c -
  7806                      14.183576799673286) +
  7807                  s *
  7808                    (10.49593273432072 * s +
  7809                      63.02378494754052 * o +
  7810                      50.606957656360734 * c -
  7811                      112.23884253719248) +
  7812                  o *
  7813                    (0.03296041114873217 * o +
  7814                      115.60384449646641 * c -
  7815                      193.58209356861505) +
  7816                  c * (-22.33816807309886 * c - 180.12613974708367);
  7817              }
  7818              getRgbItem(e, t, a, r) {
  7819                this.#r(e, t, 1, a, r);
  7820              }
  7821              getRgbBuffer(e, t, a, r, n, i, s) {
  7822                const o = 1 / ((1 << i) - 1);
  7823                for (let i = 0; i < a; i++) {
  7824                  this.#r(e, t, o, r, n);
  7825                  t += 4;
  7826                  n += 3 + s;
  7827                }
  7828              }
  7829              getOutputLength(e, t) {
  7830                return ((e / 4) * (3 + t)) | 0;
  7831              }
  7832            }
  7833            class CalGrayCS extends ColorSpace {
  7834              constructor(e, t, a) {
  7835                super("CalGray", 1);
  7836                if (!e)
  7837                  throw new r.FormatError(
  7838                    "WhitePoint missing - required for color space CalGray",
  7839                  );
  7840                [this.XW, this.YW, this.ZW] = e;
  7841                [this.XB, this.YB, this.ZB] = t || [0, 0, 0];
  7842                this.G = a || 1;
  7843                if (this.XW < 0 || this.ZW < 0 || 1 !== this.YW)
  7844                  throw new r.FormatError(
  7845                    `Invalid WhitePoint components for ${this.name}, no fallback available`,
  7846                  );
  7847                if (this.XB < 0 || this.YB < 0 || this.ZB < 0) {
  7848                  (0, r.info)(
  7849                    `Invalid BlackPoint for ${this.name}, falling back to default.`,
  7850                  );
  7851                  this.XB = this.YB = this.ZB = 0;
  7852                }
  7853                (0 === this.XB && 0 === this.YB && 0 === this.ZB) ||
  7854                  (0, r.warn)(
  7855                    `${this.name}, BlackPoint: XB: ${this.XB}, YB: ${this.YB}, ZB: ${this.ZB}, only default values are supported.`,
  7856                  );
  7857                if (this.G < 1) {
  7858                  (0, r.info)(
  7859                    `Invalid Gamma: ${this.G} for ${this.name}, falling back to default.`,
  7860                  );
  7861                  this.G = 1;
  7862                }
  7863              }
  7864              #r(e, t, a, r, n) {
  7865                const i = (e[t] * n) ** this.G,
  7866                  s = this.YW * i,
  7867                  o = Math.max(295.8 * s ** 0.3333333333333333 - 40.8, 0);
  7868                a[r] = o;
  7869                a[r + 1] = o;
  7870                a[r + 2] = o;
  7871              }
  7872              getRgbItem(e, t, a, r) {
  7873                this.#r(e, t, a, r, 1);
  7874              }
  7875              getRgbBuffer(e, t, a, r, n, i, s) {
  7876                const o = 1 / ((1 << i) - 1);
  7877                for (let i = 0; i < a; ++i) {
  7878                  this.#r(e, t, r, n, o);
  7879                  t += 1;
  7880                  n += 3 + s;
  7881                }
  7882              }
  7883              getOutputLength(e, t) {
  7884                return e * (3 + t);
  7885              }
  7886            }
  7887            class CalRGBCS extends ColorSpace {
  7888              static #n = new Float32Array([
  7889                0.8951, 0.2664, -0.1614, -0.7502, 1.7135, 0.0367, 0.0389, -0.0685,
  7890                1.0296,
  7891              ]);
  7892              static #i = new Float32Array([
  7893                0.9869929, -0.1470543, 0.1599627, 0.4323053, 0.5183603, 0.0492912,
  7894                -0.0085287, 0.0400428, 0.9684867,
  7895              ]);
  7896              static #s = new Float32Array([
  7897                3.2404542, -1.5371385, -0.4985314, -0.969266, 1.8760108, 0.041556,
  7898                0.0556434, -0.2040259, 1.0572252,
  7899              ]);
  7900              static #o = new Float32Array([1, 1, 1]);
  7901              static #c = new Float32Array(3);
  7902              static #l = new Float32Array(3);
  7903              static #h = new Float32Array(3);
  7904              static #u = (24 / 116) ** 3 / 8;
  7905              constructor(e, t, a, n) {
  7906                super("CalRGB", 3);
  7907                if (!e)
  7908                  throw new r.FormatError(
  7909                    "WhitePoint missing - required for color space CalRGB",
  7910                  );
  7911                const [i, s, o] = (this.whitePoint = e),
  7912                  [c, l, h] = (this.blackPoint = t || new Float32Array(3));
  7913                [this.GR, this.GG, this.GB] = a || new Float32Array([1, 1, 1]);
  7914                [
  7915                  this.MXA,
  7916                  this.MYA,
  7917                  this.MZA,
  7918                  this.MXB,
  7919                  this.MYB,
  7920                  this.MZB,
  7921                  this.MXC,
  7922                  this.MYC,
  7923                  this.MZC,
  7924                ] = n || new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]);
  7925                if (i < 0 || o < 0 || 1 !== s)
  7926                  throw new r.FormatError(
  7927                    `Invalid WhitePoint components for ${this.name}, no fallback available`,
  7928                  );
  7929                if (c < 0 || l < 0 || h < 0) {
  7930                  (0, r.info)(
  7931                    `Invalid BlackPoint for ${this.name} [${c}, ${l}, ${h}], falling back to default.`,
  7932                  );
  7933                  this.blackPoint = new Float32Array(3);
  7934                }
  7935                if (this.GR < 0 || this.GG < 0 || this.GB < 0) {
  7936                  (0, r.info)(
  7937                    `Invalid Gamma [${this.GR}, ${this.GG}, ${this.GB}] for ${this.name}, falling back to default.`,
  7938                  );
  7939                  this.GR = this.GG = this.GB = 1;
  7940                }
  7941              }
  7942              #d(e, t, a) {
  7943                a[0] = e[0] * t[0] + e[1] * t[1] + e[2] * t[2];
  7944                a[1] = e[3] * t[0] + e[4] * t[1] + e[5] * t[2];
  7945                a[2] = e[6] * t[0] + e[7] * t[1] + e[8] * t[2];
  7946              }
  7947              #f(e, t, a) {
  7948                a[0] = (1 * t[0]) / e[0];
  7949                a[1] = (1 * t[1]) / e[1];
  7950                a[2] = (1 * t[2]) / e[2];
  7951              }
  7952              #g(e, t, a) {
  7953                a[0] = (0.95047 * t[0]) / e[0];
  7954                a[1] = (1 * t[1]) / e[1];
  7955                a[2] = (1.08883 * t[2]) / e[2];
  7956              }
  7957              #p(e) {
  7958                return e <= 0.0031308
  7959                  ? this.#m(0, 1, 12.92 * e)
  7960                  : e >= 0.99554525
  7961                    ? 1
  7962                    : this.#m(0, 1, 1.055 * e ** (1 / 2.4) - 0.055);
  7963              }
  7964              #m(e, t, a) {
  7965                return Math.max(e, Math.min(t, a));
  7966              }
  7967              #b(e) {
  7968                return e < 0
  7969                  ? -this.#b(-e)
  7970                  : e > 8
  7971                    ? ((e + 16) / 116) ** 3
  7972                    : e * CalRGBCS.#u;
  7973              }
  7974              #y(e, t, a) {
  7975                if (0 === e[0] && 0 === e[1] && 0 === e[2]) {
  7976                  a[0] = t[0];
  7977                  a[1] = t[1];
  7978                  a[2] = t[2];
  7979                  return;
  7980                }
  7981                const r = this.#b(0),
  7982                  n = (1 - r) / (1 - this.#b(e[0])),
  7983                  i = 1 - n,
  7984                  s = (1 - r) / (1 - this.#b(e[1])),
  7985                  o = 1 - s,
  7986                  c = (1 - r) / (1 - this.#b(e[2])),
  7987                  l = 1 - c;
  7988                a[0] = t[0] * n + i;
  7989                a[1] = t[1] * s + o;
  7990                a[2] = t[2] * c + l;
  7991              }
  7992              #w(e, t, a) {
  7993                if (1 === e[0] && 1 === e[2]) {
  7994                  a[0] = t[0];
  7995                  a[1] = t[1];
  7996                  a[2] = t[2];
  7997                  return;
  7998                }
  7999                const r = a;
  8000                this.#d(CalRGBCS.#n, t, r);
  8001                const n = CalRGBCS.#c;
  8002                this.#f(e, r, n);
  8003                this.#d(CalRGBCS.#i, n, a);
  8004              }
  8005              #S(e, t, a) {
  8006                const r = a;
  8007                this.#d(CalRGBCS.#n, t, r);
  8008                const n = CalRGBCS.#c;
  8009                this.#g(e, r, n);
  8010                this.#d(CalRGBCS.#i, n, a);
  8011              }
  8012              #r(e, t, a, r, n) {
  8013                const i = this.#m(0, 1, e[t] * n),
  8014                  s = this.#m(0, 1, e[t + 1] * n),
  8015                  o = this.#m(0, 1, e[t + 2] * n),
  8016                  c = 1 === i ? 1 : i ** this.GR,
  8017                  l = 1 === s ? 1 : s ** this.GG,
  8018                  h = 1 === o ? 1 : o ** this.GB,
  8019                  u = this.MXA * c + this.MXB * l + this.MXC * h,
  8020                  d = this.MYA * c + this.MYB * l + this.MYC * h,
  8021                  f = this.MZA * c + this.MZB * l + this.MZC * h,
  8022                  g = CalRGBCS.#l;
  8023                g[0] = u;
  8024                g[1] = d;
  8025                g[2] = f;
  8026                const p = CalRGBCS.#h;
  8027                this.#w(this.whitePoint, g, p);
  8028                const m = CalRGBCS.#l;
  8029                this.#y(this.blackPoint, p, m);
  8030                const b = CalRGBCS.#h;
  8031                this.#S(CalRGBCS.#o, m, b);
  8032                const y = CalRGBCS.#l;
  8033                this.#d(CalRGBCS.#s, b, y);
  8034                a[r] = 255 * this.#p(y[0]);
  8035                a[r + 1] = 255 * this.#p(y[1]);
  8036                a[r + 2] = 255 * this.#p(y[2]);
  8037              }
  8038              getRgbItem(e, t, a, r) {
  8039                this.#r(e, t, a, r, 1);
  8040              }
  8041              getRgbBuffer(e, t, a, r, n, i, s) {
  8042                const o = 1 / ((1 << i) - 1);
  8043                for (let i = 0; i < a; ++i) {
  8044                  this.#r(e, t, r, n, o);
  8045                  t += 3;
  8046                  n += 3 + s;
  8047                }
  8048              }
  8049              getOutputLength(e, t) {
  8050                return ((e * (3 + t)) / 3) | 0;
  8051              }
  8052            }
  8053            class LabCS extends ColorSpace {
  8054              constructor(e, t, a) {
  8055                super("Lab", 3);
  8056                if (!e)
  8057                  throw new r.FormatError(
  8058                    "WhitePoint missing - required for color space Lab",
  8059                  );
  8060                [this.XW, this.YW, this.ZW] = e;
  8061                [this.amin, this.amax, this.bmin, this.bmax] = a || [
  8062                  -100, 100, -100, 100,
  8063                ];
  8064                [this.XB, this.YB, this.ZB] = t || [0, 0, 0];
  8065                if (this.XW < 0 || this.ZW < 0 || 1 !== this.YW)
  8066                  throw new r.FormatError(
  8067                    "Invalid WhitePoint components, no fallback available",
  8068                  );
  8069                if (this.XB < 0 || this.YB < 0 || this.ZB < 0) {
  8070                  (0, r.info)("Invalid BlackPoint, falling back to default");
  8071                  this.XB = this.YB = this.ZB = 0;
  8072                }
  8073                if (this.amin > this.amax || this.bmin > this.bmax) {
  8074                  (0, r.info)("Invalid Range, falling back to defaults");
  8075                  this.amin = -100;
  8076                  this.amax = 100;
  8077                  this.bmin = -100;
  8078                  this.bmax = 100;
  8079                }
  8080              }
  8081              #x(e) {
  8082                return e >= 6 / 29 ? e ** 3 : (108 / 841) * (e - 4 / 29);
  8083              }
  8084              #A(e, t, a, r) {
  8085                return a + (e * (r - a)) / t;
  8086              }
  8087              #r(e, t, a, r, n) {
  8088                let i = e[t],
  8089                  s = e[t + 1],
  8090                  o = e[t + 2];
  8091                if (!1 !== a) {
  8092                  i = this.#A(i, a, 0, 100);
  8093                  s = this.#A(s, a, this.amin, this.amax);
  8094                  o = this.#A(o, a, this.bmin, this.bmax);
  8095                }
  8096                s > this.amax
  8097                  ? (s = this.amax)
  8098                  : s < this.amin && (s = this.amin);
  8099                o > this.bmax
  8100                  ? (o = this.bmax)
  8101                  : o < this.bmin && (o = this.bmin);
  8102                const c = (i + 16) / 116,
  8103                  l = c + s / 500,
  8104                  h = c - o / 200,
  8105                  u = this.XW * this.#x(l),
  8106                  d = this.YW * this.#x(c),
  8107                  f = this.ZW * this.#x(h);
  8108                let g, p, m;
  8109                if (this.ZW < 1) {
  8110                  g = 3.1339 * u + -1.617 * d + -0.4906 * f;
  8111                  p = -0.9785 * u + 1.916 * d + 0.0333 * f;
  8112                  m = 0.072 * u + -0.229 * d + 1.4057 * f;
  8113                } else {
  8114                  g = 3.2406 * u + -1.5372 * d + -0.4986 * f;
  8115                  p = -0.9689 * u + 1.8758 * d + 0.0415 * f;
  8116                  m = 0.0557 * u + -0.204 * d + 1.057 * f;
  8117                }
  8118                r[n] = 255 * Math.sqrt(g);
  8119                r[n + 1] = 255 * Math.sqrt(p);
  8120                r[n + 2] = 255 * Math.sqrt(m);
  8121              }
  8122              getRgbItem(e, t, a, r) {
  8123                this.#r(e, t, !1, a, r);
  8124              }
  8125              getRgbBuffer(e, t, a, r, n, i, s) {
  8126                const o = (1 << i) - 1;
  8127                for (let i = 0; i < a; i++) {
  8128                  this.#r(e, t, o, r, n);
  8129                  t += 3;
  8130                  n += 3 + s;
  8131                }
  8132              }
  8133              getOutputLength(e, t) {
  8134                return ((e * (3 + t)) / 3) | 0;
  8135              }
  8136              isDefaultDecode(e, t) {
  8137                return !0;
  8138              }
  8139              get usesZeroToOneRange() {
  8140                return (0, r.shadow)(this, "usesZeroToOneRange", !1);
  8141              }
  8142            }
  8143          },
  8144          (e, t, a) => {
  8145            Object.defineProperty(t, "__esModule", { value: !0 });
  8146            t.PartialEvaluator = t.EvaluatorPreprocessor = void 0;
  8147            var r = a(2),
  8148              n = a(14),
  8149              i = a(4),
  8150              s = a(34),
  8151              o = a(37),
  8152              c = a(41),
  8153              l = a(50),
  8154              h = a(51),
  8155              u = a(42),
  8156              d = a(57),
  8157              f = a(16),
  8158              g = a(59),
  8159              p = a(8),
  8160              m = a(5),
  8161              b = a(60),
  8162              y = a(12),
  8163              w = a(18),
  8164              S = a(38),
  8165              x = a(61),
  8166              C = a(39),
  8167              k = a(45),
  8168              v = a(40),
  8169              F = a(62),
  8170              O = a(63),
  8171              T = a(64),
  8172              M = a(65);
  8173            const D = Object.freeze({
  8174                maxImageSize: -1,
  8175                disableFontFace: !1,
  8176                ignoreErrors: !1,
  8177                isEvalSupported: !0,
  8178                isOffscreenCanvasSupported: !1,
  8179                canvasMaxAreaInBytes: -1,
  8180                fontExtraProperties: !1,
  8181                useSystemFonts: !0,
  8182                cMapUrl: null,
  8183                standardFontDataUrl: null,
  8184              }),
  8185              E = 1,
  8186              N = 2,
  8187              R = Promise.resolve();
  8188            function normalizeBlendMode(e, t = !1) {
  8189              if (Array.isArray(e)) {
  8190                for (const t of e) {
  8191                  const e = normalizeBlendMode(t, !0);
  8192                  if (e) return e;
  8193                }
  8194                (0, r.warn)(`Unsupported blend mode Array: ${e}`);
  8195                return "source-over";
  8196              }
  8197              if (!(e instanceof i.Name)) return t ? null : "source-over";
  8198              switch (e.name) {
  8199                case "Normal":
  8200                case "Compatible":
  8201                  return "source-over";
  8202                case "Multiply":
  8203                  return "multiply";
  8204                case "Screen":
  8205                  return "screen";
  8206                case "Overlay":
  8207                  return "overlay";
  8208                case "Darken":
  8209                  return "darken";
  8210                case "Lighten":
  8211                  return "lighten";
  8212                case "ColorDodge":
  8213                  return "color-dodge";
  8214                case "ColorBurn":
  8215                  return "color-burn";
  8216                case "HardLight":
  8217                  return "hard-light";
  8218                case "SoftLight":
  8219                  return "soft-light";
  8220                case "Difference":
  8221                  return "difference";
  8222                case "Exclusion":
  8223                  return "exclusion";
  8224                case "Hue":
  8225                  return "hue";
  8226                case "Saturation":
  8227                  return "saturation";
  8228                case "Color":
  8229                  return "color";
  8230                case "Luminosity":
  8231                  return "luminosity";
  8232              }
  8233              if (t) return null;
  8234              (0, r.warn)(`Unsupported blend mode: ${e.name}`);
  8235              return "source-over";
  8236            }
  8237            function incrementCachedImageMaskCount(e) {
  8238              e.fn === r.OPS.paintImageMaskXObject &&
  8239                e.args[0]?.count > 0 &&
  8240                e.args[0].count++;
  8241            }
  8242            class TimeSlotManager {
  8243              static TIME_SLOT_DURATION_MS = 20;
  8244              static CHECK_TIME_EVERY = 100;
  8245              constructor() {
  8246                this.reset();
  8247              }
  8248              check() {
  8249                if (++this.checked < TimeSlotManager.CHECK_TIME_EVERY) return !1;
  8250                this.checked = 0;
  8251                return this.endTime <= Date.now();
  8252              }
  8253              reset() {
  8254                this.endTime = Date.now() + TimeSlotManager.TIME_SLOT_DURATION_MS;
  8255                this.checked = 0;
  8256              }
  8257            }
  8258            class PartialEvaluator {
  8259              constructor({
  8260                xref: e,
  8261                handler: t,
  8262                pageIndex: a,
  8263                idFactory: r,
  8264                fontCache: n,
  8265                builtInCMapCache: i,
  8266                standardFontDataCache: s,
  8267                globalImageCache: o,
  8268                systemFontCache: c,
  8269                options: l = null,
  8270              }) {
  8271                this.xref = e;
  8272                this.handler = t;
  8273                this.pageIndex = a;
  8274                this.idFactory = r;
  8275                this.fontCache = n;
  8276                this.builtInCMapCache = i;
  8277                this.standardFontDataCache = s;
  8278                this.globalImageCache = o;
  8279                this.systemFontCache = c;
  8280                this.options = l || D;
  8281                this.parsingType3Font = !1;
  8282                this._regionalImageCache = new g.RegionalImageCache();
  8283                this._fetchBuiltInCMapBound = this.fetchBuiltInCMap.bind(this);
  8284                F.ImageResizer.setMaxArea(this.options.canvasMaxAreaInBytes);
  8285              }
  8286              get _pdfFunctionFactory() {
  8287                const e = new d.PDFFunctionFactory({
  8288                  xref: this.xref,
  8289                  isEvalSupported: this.options.isEvalSupported,
  8290                });
  8291                return (0, r.shadow)(this, "_pdfFunctionFactory", e);
  8292              }
  8293              clone(e = null) {
  8294                const t = Object.create(this);
  8295                t.options = Object.assign(Object.create(null), this.options, e);
  8296                return t;
  8297              }
  8298              hasBlendModes(e, t) {
  8299                if (!(e instanceof i.Dict)) return !1;
  8300                if (e.objId && t.has(e.objId)) return !1;
  8301                const a = new i.RefSet(t);
  8302                e.objId && a.put(e.objId);
  8303                const n = [e],
  8304                  s = this.xref;
  8305                for (; n.length; ) {
  8306                  const e = n.shift(),
  8307                    t = e.get("ExtGState");
  8308                  if (t instanceof i.Dict)
  8309                    for (let e of t.getRawValues()) {
  8310                      if (e instanceof i.Ref) {
  8311                        if (a.has(e)) continue;
  8312                        try {
  8313                          e = s.fetch(e);
  8314                        } catch (t) {
  8315                          a.put(e);
  8316                          (0, r.info)(
  8317                            `hasBlendModes - ignoring ExtGState: "${t}".`,
  8318                          );
  8319                          continue;
  8320                        }
  8321                      }
  8322                      if (!(e instanceof i.Dict)) continue;
  8323                      e.objId && a.put(e.objId);
  8324                      const t = e.get("BM");
  8325                      if (t instanceof i.Name) {
  8326                        if ("Normal" !== t.name) return !0;
  8327                      } else if (void 0 !== t && Array.isArray(t))
  8328                        for (const e of t)
  8329                          if (e instanceof i.Name && "Normal" !== e.name)
  8330                            return !0;
  8331                    }
  8332                  const o = e.get("XObject");
  8333                  if (o instanceof i.Dict)
  8334                    for (let e of o.getRawValues()) {
  8335                      if (e instanceof i.Ref) {
  8336                        if (a.has(e)) continue;
  8337                        try {
  8338                          e = s.fetch(e);
  8339                        } catch (t) {
  8340                          a.put(e);
  8341                          (0, r.info)(
  8342                            `hasBlendModes - ignoring XObject: "${t}".`,
  8343                          );
  8344                          continue;
  8345                        }
  8346                      }
  8347                      if (!(e instanceof m.BaseStream)) continue;
  8348                      e.dict.objId && a.put(e.dict.objId);
  8349                      const t = e.dict.get("Resources");
  8350                      if (t instanceof i.Dict && (!t.objId || !a.has(t.objId))) {
  8351                        n.push(t);
  8352                        t.objId && a.put(t.objId);
  8353                      }
  8354                    }
  8355                }
  8356                for (const e of a) t.put(e);
  8357                return !1;
  8358              }
  8359              async fetchBuiltInCMap(e) {
  8360                const t = this.builtInCMapCache.get(e);
  8361                if (t) return t;
  8362                let a;
  8363                if (null !== this.options.cMapUrl) {
  8364                  const t = `${this.options.cMapUrl}${e}.bcmap`,
  8365                    n = await fetch(t);
  8366                  if (!n.ok)
  8367                    throw new Error(
  8368                      `fetchBuiltInCMap: failed to fetch file "${t}" with "${n.statusText}".`,
  8369                    );
  8370                  a = {
  8371                    cMapData: new Uint8Array(await n.arrayBuffer()),
  8372                    compressionType: r.CMapCompressionType.BINARY,
  8373                  };
  8374                } else
  8375                  a = await this.handler.sendWithPromise("FetchBuiltInCMap", {
  8376                    name: e,
  8377                  });
  8378                a.compressionType !== r.CMapCompressionType.NONE &&
  8379                  this.builtInCMapCache.set(e, a);
  8380                return a;
  8381              }
  8382              async fetchStandardFontData(e) {
  8383                const t = this.standardFontDataCache.get(e);
  8384                if (t) return new p.Stream(t);
  8385                if (
  8386                  this.options.useSystemFonts &&
  8387                  "Symbol" !== e &&
  8388                  "ZapfDingbats" !== e
  8389                )
  8390                  return null;
  8391                const a = (0, c.getFontNameToFileMap)()[e];
  8392                let n;
  8393                if (null !== this.options.standardFontDataUrl) {
  8394                  const e = `${this.options.standardFontDataUrl}${a}`,
  8395                    t = await fetch(e);
  8396                  t.ok
  8397                    ? (n = await t.arrayBuffer())
  8398                    : (0, r.warn)(
  8399                        `fetchStandardFontData: failed to fetch file "${e}" with "${t.statusText}".`,
  8400                      );
  8401                } else
  8402                  try {
  8403                    n = await this.handler.sendWithPromise(
  8404                      "FetchStandardFontData",
  8405                      { filename: a },
  8406                    );
  8407                  } catch (e) {
  8408                    (0, r.warn)(
  8409                      `fetchStandardFontData: failed to fetch file "${a}" with "${e}".`,
  8410                    );
  8411                  }
  8412                if (!n) return null;
  8413                this.standardFontDataCache.set(e, n);
  8414                return new p.Stream(n);
  8415              }
  8416              async buildFormXObject(e, t, a, n, s, o, c) {
  8417                const l = t.dict,
  8418                  h = l.getArray("Matrix");
  8419                let u,
  8420                  d,
  8421                  f = l.getArray("BBox");
  8422                f =
  8423                  Array.isArray(f) && 4 === f.length
  8424                    ? r.Util.normalizeRect(f)
  8425                    : null;
  8426                l.has("OC") &&
  8427                  (u = await this.parseMarkedContentProps(l.get("OC"), e));
  8428                void 0 !== u && n.addOp(r.OPS.beginMarkedContentProps, ["OC", u]);
  8429                const g = l.get("Group");
  8430                if (g) {
  8431                  d = {
  8432                    matrix: h,
  8433                    bbox: f,
  8434                    smask: a,
  8435                    isolated: !1,
  8436                    knockout: !1,
  8437                  };
  8438                  const t = g.get("S");
  8439                  let s = null;
  8440                  if ((0, i.isName)(t, "Transparency")) {
  8441                    d.isolated = g.get("I") || !1;
  8442                    d.knockout = g.get("K") || !1;
  8443                    if (g.has("CS")) {
  8444                      const t = g.getRaw("CS"),
  8445                        a = y.ColorSpace.getCached(t, this.xref, c);
  8446                      s =
  8447                        a ||
  8448                        (await this.parseColorSpace({
  8449                          cs: t,
  8450                          resources: e,
  8451                          localColorSpaceCache: c,
  8452                        }));
  8453                    }
  8454                  }
  8455                  if (a?.backdrop) {
  8456                    s ||= y.ColorSpace.singletons.rgb;
  8457                    a.backdrop = s.getRgb(a.backdrop, 0);
  8458                  }
  8459                  n.addOp(r.OPS.beginGroup, [d]);
  8460                }
  8461                const p = g ? [h, null] : [h, f];
  8462                n.addOp(r.OPS.paintFormXObjectBegin, p);
  8463                return this.getOperatorList({
  8464                  stream: t,
  8465                  task: s,
  8466                  resources: l.get("Resources") || e,
  8467                  operatorList: n,
  8468                  initialState: o,
  8469                }).then(function () {
  8470                  n.addOp(r.OPS.paintFormXObjectEnd, []);
  8471                  g && n.addOp(r.OPS.endGroup, [d]);
  8472                  void 0 !== u && n.addOp(r.OPS.endMarkedContent, []);
  8473                });
  8474              }
  8475              _sendImgData(e, t, a = !1) {
  8476                const r = t ? [t.bitmap || t.data.buffer] : null;
  8477                return this.parsingType3Font || a
  8478                  ? this.handler.send("commonobj", [e, "Image", t], r)
  8479                  : this.handler.send("obj", [e, this.pageIndex, "Image", t], r);
  8480              }
  8481              async buildPaintImageXObject({
  8482                resources: e,
  8483                image: t,
  8484                isInline: a = !1,
  8485                operatorList: n,
  8486                cacheKey: i,
  8487                localImageCache: s,
  8488                localColorSpaceCache: o,
  8489              }) {
  8490                const c = t.dict,
  8491                  l = c.objId,
  8492                  h = c.get("W", "Width"),
  8493                  u = c.get("H", "Height");
  8494                if (!h || "number" != typeof h || !u || "number" != typeof u) {
  8495                  (0, r.warn)("Image dimensions are missing, or not numbers.");
  8496                  return;
  8497                }
  8498                const d = this.options.maxImageSize;
  8499                if (-1 !== d && h * u > d) {
  8500                  const e =
  8501                    "Image exceeded maximum allowed size and was removed.";
  8502                  if (this.options.ignoreErrors) {
  8503                    (0, r.warn)(e);
  8504                    return;
  8505                  }
  8506                  throw new Error(e);
  8507                }
  8508                let f;
  8509                c.has("OC") &&
  8510                  (f = await this.parseMarkedContentProps(c.get("OC"), e));
  8511                let g, p;
  8512                if (c.get("IM", "ImageMask") || !1) {
  8513                  const e = c.get("I", "Interpolate"),
  8514                    a = (h + 7) >> 3,
  8515                    o = t.getBytes(a * u),
  8516                    d = c.getArray("D", "Decode");
  8517                  if (this.parsingType3Font) {
  8518                    g = M.PDFImage.createRawMask({
  8519                      imgArray: o,
  8520                      width: h,
  8521                      height: u,
  8522                      imageIsFromDecodeStream: t instanceof w.DecodeStream,
  8523                      inverseDecode: d?.[0] > 0,
  8524                      interpolate: e,
  8525                    });
  8526                    g.cached = !!i;
  8527                    p = [g];
  8528                    n.addImageOps(r.OPS.paintImageMaskXObject, p, f);
  8529                    if (i) {
  8530                      const e = {
  8531                        fn: r.OPS.paintImageMaskXObject,
  8532                        args: p,
  8533                        optionalContent: f,
  8534                      };
  8535                      s.set(i, l, e);
  8536                      l && this._regionalImageCache.set(null, l, e);
  8537                    }
  8538                    return;
  8539                  }
  8540                  g = await M.PDFImage.createMask({
  8541                    imgArray: o,
  8542                    width: h,
  8543                    height: u,
  8544                    imageIsFromDecodeStream: t instanceof w.DecodeStream,
  8545                    inverseDecode: d?.[0] > 0,
  8546                    interpolate: e,
  8547                    isOffscreenCanvasSupported:
  8548                      this.options.isOffscreenCanvasSupported,
  8549                  });
  8550                  if (g.isSingleOpaquePixel) {
  8551                    n.addImageOps(r.OPS.paintSolidColorImageMask, [], f);
  8552                    if (i) {
  8553                      const e = {
  8554                        fn: r.OPS.paintSolidColorImageMask,
  8555                        args: [],
  8556                        optionalContent: f,
  8557                      };
  8558                      s.set(i, l, e);
  8559                      l && this._regionalImageCache.set(null, l, e);
  8560                    }
  8561                    return;
  8562                  }
  8563                  const m = `mask_${this.idFactory.createObjId()}`;
  8564                  n.addDependency(m);
  8565                  this._sendImgData(m, g);
  8566                  p = [
  8567                    {
  8568                      data: m,
  8569                      width: g.width,
  8570                      height: g.height,
  8571                      interpolate: g.interpolate,
  8572                      count: 1,
  8573                    },
  8574                  ];
  8575                  n.addImageOps(r.OPS.paintImageMaskXObject, p, f);
  8576                  if (i) {
  8577                    const e = {
  8578                      fn: r.OPS.paintImageMaskXObject,
  8579                      args: p,
  8580                      optionalContent: f,
  8581                    };
  8582                    s.set(i, l, e);
  8583                    l && this._regionalImageCache.set(null, l, e);
  8584                  }
  8585                  return;
  8586                }
  8587                if (a && !c.has("SMask") && !c.has("Mask") && h + u < 200) {
  8588                  const i = new M.PDFImage({
  8589                    xref: this.xref,
  8590                    res: e,
  8591                    image: t,
  8592                    isInline: a,
  8593                    pdfFunctionFactory: this._pdfFunctionFactory,
  8594                    localColorSpaceCache: o,
  8595                  });
  8596                  g = await i.createImageData(!0, !1);
  8597                  n.isOffscreenCanvasSupported =
  8598                    this.options.isOffscreenCanvasSupported;
  8599                  n.addImageOps(r.OPS.paintInlineImageXObject, [g], f);
  8600                  return;
  8601                }
  8602                let m = `img_${this.idFactory.createObjId()}`,
  8603                  b = !1;
  8604                if (this.parsingType3Font)
  8605                  m = `${this.idFactory.getDocId()}_type3_${m}`;
  8606                else if (l) {
  8607                  b = this.globalImageCache.shouldCache(l, this.pageIndex);
  8608                  b && (m = `${this.idFactory.getDocId()}_${m}`);
  8609                }
  8610                n.addDependency(m);
  8611                p = [m, h, u];
  8612                M.PDFImage.buildImage({
  8613                  xref: this.xref,
  8614                  res: e,
  8615                  image: t,
  8616                  isInline: a,
  8617                  pdfFunctionFactory: this._pdfFunctionFactory,
  8618                  localColorSpaceCache: o,
  8619                })
  8620                  .then(async (e) => {
  8621                    g = await e.createImageData(
  8622                      !1,
  8623                      this.options.isOffscreenCanvasSupported,
  8624                    );
  8625                    if (i && l && b) {
  8626                      const e = g.bitmap ? g.width * g.height * 4 : g.data.length;
  8627                      this.globalImageCache.addByteSize(l, e);
  8628                    }
  8629                    return this._sendImgData(m, g, b);
  8630                  })
  8631                  .catch((e) => {
  8632                    (0, r.warn)(`Unable to decode image "${m}": "${e}".`);
  8633                    return this._sendImgData(m, null, b);
  8634                  });
  8635                n.addImageOps(r.OPS.paintImageXObject, p, f);
  8636                if (i) {
  8637                  const e = {
  8638                    fn: r.OPS.paintImageXObject,
  8639                    args: p,
  8640                    optionalContent: f,
  8641                  };
  8642                  s.set(i, l, e);
  8643                  if (l) {
  8644                    this._regionalImageCache.set(null, l, e);
  8645                    if (b) {
  8646                      (0, r.assert)(!a, "Cannot cache an inline image globally.");
  8647                      this.globalImageCache.setData(l, {
  8648                        objId: m,
  8649                        fn: r.OPS.paintImageXObject,
  8650                        args: p,
  8651                        optionalContent: f,
  8652                        byteSize: 0,
  8653                      });
  8654                    }
  8655                  }
  8656                }
  8657              }
  8658              handleSMask(e, t, a, r, n, i) {
  8659                const s = e.get("G"),
  8660                  o = { subtype: e.get("S").name, backdrop: e.get("BC") },
  8661                  c = e.get("TR");
  8662                if ((0, d.isPDFFunction)(c)) {
  8663                  const e = this._pdfFunctionFactory.create(c),
  8664                    t = new Uint8Array(256),
  8665                    a = new Float32Array(1);
  8666                  for (let r = 0; r < 256; r++) {
  8667                    a[0] = r / 255;
  8668                    e(a, 0, a, 0);
  8669                    t[r] = (255 * a[0]) | 0;
  8670                  }
  8671                  o.transferMap = t;
  8672                }
  8673                return this.buildFormXObject(t, s, o, a, r, n.state.clone(), i);
  8674              }
  8675              handleTransferFunction(e) {
  8676                let t;
  8677                if (Array.isArray(e)) t = e;
  8678                else {
  8679                  if (!(0, d.isPDFFunction)(e)) return null;
  8680                  t = [e];
  8681                }
  8682                const a = [];
  8683                let r = 0,
  8684                  n = 0;
  8685                for (const e of t) {
  8686                  const t = this.xref.fetchIfRef(e);
  8687                  r++;
  8688                  if ((0, i.isName)(t, "Identity")) {
  8689                    a.push(null);
  8690                    continue;
  8691                  }
  8692                  if (!(0, d.isPDFFunction)(t)) return null;
  8693                  const s = this._pdfFunctionFactory.create(t),
  8694                    o = new Uint8Array(256),
  8695                    c = new Float32Array(1);
  8696                  for (let e = 0; e < 256; e++) {
  8697                    c[0] = e / 255;
  8698                    s(c, 0, c, 0);
  8699                    o[e] = (255 * c[0]) | 0;
  8700                  }
  8701                  a.push(o);
  8702                  n++;
  8703                }
  8704                return (1 !== r && 4 !== r) || 0 === n ? null : a;
  8705              }
  8706              handleTilingType(e, t, a, n, s, o, c, h) {
  8707                const u = new T.OperatorList(),
  8708                  d = i.Dict.merge({
  8709                    xref: this.xref,
  8710                    dictArray: [s.get("Resources"), a],
  8711                  });
  8712                return this.getOperatorList({
  8713                  stream: n,
  8714                  task: c,
  8715                  resources: d,
  8716                  operatorList: u,
  8717                })
  8718                  .then(function () {
  8719                    const a = u.getIR(),
  8720                      r = (0, l.getTilingPatternIR)(a, s, t);
  8721                    o.addDependencies(u.dependencies);
  8722                    o.addOp(e, r);
  8723                    s.objId &&
  8724                      h.set(null, s.objId, { operatorListIR: a, dict: s });
  8725                  })
  8726                  .catch((e) => {
  8727                    if (!(e instanceof r.AbortException)) {
  8728                      if (!this.options.ignoreErrors) throw e;
  8729                      (0, r.warn)(`handleTilingType - ignoring pattern: "${e}".`);
  8730                    }
  8731                  });
  8732              }
  8733              handleSetFont(e, t, a, r, n, o, c = null, l = null) {
  8734                const h = t?.[0] instanceof i.Name ? t[0].name : null;
  8735                return this.loadFont(h, a, e, c, l)
  8736                  .then((t) =>
  8737                    t.font.isType3Font
  8738                      ? t
  8739                          .loadType3Data(this, e, n)
  8740                          .then(function () {
  8741                            r.addDependencies(t.type3Dependencies);
  8742                            return t;
  8743                          })
  8744                          .catch(
  8745                            (e) =>
  8746                              new TranslatedFont({
  8747                                loadedName: "g_font_error",
  8748                                font: new s.ErrorFont(
  8749                                  `Type3 font load error: ${e}`,
  8750                                ),
  8751                                dict: t.font,
  8752                                evaluatorOptions: this.options,
  8753                              }),
  8754                          )
  8755                      : t,
  8756                  )
  8757                  .then((e) => {
  8758                    o.font = e.font;
  8759                    e.send(this.handler);
  8760                    return e.loadedName;
  8761                  });
  8762              }
  8763              handleText(e, t) {
  8764                const a = t.font,
  8765                  n = a.charsToGlyphs(e);
  8766                if (a.data) {
  8767                  (!!(
  8768                    t.textRenderingMode & r.TextRenderingMode.ADD_TO_PATH_FLAG
  8769                  ) ||
  8770                    "Pattern" === t.fillColorSpace.name ||
  8771                    a.disableFontFace ||
  8772                    this.options.disableFontFace) &&
  8773                    PartialEvaluator.buildFontPaths(
  8774                      a,
  8775                      n,
  8776                      this.handler,
  8777                      this.options,
  8778                    );
  8779                }
  8780                return n;
  8781              }
  8782              ensureStateFont(e) {
  8783                if (e.font) return;
  8784                const t = new r.FormatError(
  8785                  "Missing setFont (Tf) operator before text rendering operator.",
  8786                );
  8787                if (!this.options.ignoreErrors) throw t;
  8788                (0, r.warn)(`ensureStateFont: "${t}".`);
  8789              }
  8790              async setGState({
  8791                resources: e,
  8792                gState: t,
  8793                operatorList: a,
  8794                cacheKey: n,
  8795                task: s,
  8796                stateManager: o,
  8797                localGStateCache: c,
  8798                localColorSpaceCache: l,
  8799              }) {
  8800                const h = t.objId;
  8801                let u = !0;
  8802                const d = [];
  8803                let f = Promise.resolve();
  8804                for (const n of t.getKeys()) {
  8805                  const c = t.get(n);
  8806                  switch (n) {
  8807                    case "Type":
  8808                      break;
  8809                    case "LW":
  8810                    case "LC":
  8811                    case "LJ":
  8812                    case "ML":
  8813                    case "D":
  8814                    case "RI":
  8815                    case "FL":
  8816                    case "CA":
  8817                    case "ca":
  8818                      d.push([n, c]);
  8819                      break;
  8820                    case "Font":
  8821                      u = !1;
  8822                      f = f.then(() =>
  8823                        this.handleSetFont(e, null, c[0], a, s, o.state).then(
  8824                          function (e) {
  8825                            a.addDependency(e);
  8826                            d.push([n, [e, c[1]]]);
  8827                          },
  8828                        ),
  8829                      );
  8830                      break;
  8831                    case "BM":
  8832                      d.push([n, normalizeBlendMode(c)]);
  8833                      break;
  8834                    case "SMask":
  8835                      if ((0, i.isName)(c, "None")) {
  8836                        d.push([n, !1]);
  8837                        break;
  8838                      }
  8839                      if (c instanceof i.Dict) {
  8840                        u = !1;
  8841                        f = f.then(() => this.handleSMask(c, e, a, s, o, l));
  8842                        d.push([n, !0]);
  8843                      } else (0, r.warn)("Unsupported SMask type");
  8844                      break;
  8845                    case "TR":
  8846                      const t = this.handleTransferFunction(c);
  8847                      d.push([n, t]);
  8848                      break;
  8849                    case "OP":
  8850                    case "op":
  8851                    case "OPM":
  8852                    case "BG":
  8853                    case "BG2":
  8854                    case "UCR":
  8855                    case "UCR2":
  8856                    case "TR2":
  8857                    case "HT":
  8858                    case "SM":
  8859                    case "SA":
  8860                    case "AIS":
  8861                    case "TK":
  8862                      (0, r.info)("graphic state operator " + n);
  8863                      break;
  8864                    default:
  8865                      (0, r.info)("Unknown graphic state operator " + n);
  8866                  }
  8867                }
  8868                return f.then(function () {
  8869                  d.length > 0 && a.addOp(r.OPS.setGState, [d]);
  8870                  u && c.set(n, h, d);
  8871                });
  8872              }
  8873              loadFont(e, t, a, n = null, o = null) {
  8874                const errorFont = async () =>
  8875                  new TranslatedFont({
  8876                    loadedName: "g_font_error",
  8877                    font: new s.ErrorFont(`Font "${e}" is not available.`),
  8878                    dict: t,
  8879                    evaluatorOptions: this.options,
  8880                  });
  8881                let c;
  8882                if (t) t instanceof i.Ref && (c = t);
  8883                else {
  8884                  const t = a.get("Font");
  8885                  t && (c = t.getRaw(e));
  8886                }
  8887                if (c) {
  8888                  if (this.parsingType3Font && this.type3FontRefs.has(c))
  8889                    return errorFont();
  8890                  if (this.fontCache.has(c)) return this.fontCache.get(c);
  8891                  t = this.xref.fetchIfRef(c);
  8892                }
  8893                if (!(t instanceof i.Dict)) {
  8894                  if (!this.options.ignoreErrors && !this.parsingType3Font) {
  8895                    (0, r.warn)(`Font "${e}" is not available.`);
  8896                    return errorFont();
  8897                  }
  8898                  (0, r.warn)(
  8899                    `Font "${e}" is not available -- attempting to fallback to a default font.`,
  8900                  );
  8901                  t = n || PartialEvaluator.fallbackFontDict;
  8902                }
  8903                if (t.cacheKey && this.fontCache.has(t.cacheKey))
  8904                  return this.fontCache.get(t.cacheKey);
  8905                const l = new r.PromiseCapability();
  8906                let h;
  8907                try {
  8908                  h = this.preEvaluateFont(t);
  8909                  h.cssFontInfo = o;
  8910                } catch (e) {
  8911                  (0, r.warn)(`loadFont - preEvaluateFont failed: "${e}".`);
  8912                  return errorFont();
  8913                }
  8914                const { descriptor: u, hash: d } = h,
  8915                  f = c instanceof i.Ref;
  8916                let g;
  8917                if (d && u instanceof i.Dict) {
  8918                  const e = (u.fontAliases ||= Object.create(null));
  8919                  if (e[d]) {
  8920                    const t = e[d].aliasRef;
  8921                    if (f && t && this.fontCache.has(t)) {
  8922                      this.fontCache.putAlias(c, t);
  8923                      return this.fontCache.get(c);
  8924                    }
  8925                  } else e[d] = { fontID: this.idFactory.createFontId() };
  8926                  f && (e[d].aliasRef = c);
  8927                  g = e[d].fontID;
  8928                } else g = this.idFactory.createFontId();
  8929                (0, r.assert)(
  8930                  g?.startsWith("f"),
  8931                  'The "fontID" must be (correctly) defined.',
  8932                );
  8933                if (f) this.fontCache.put(c, l.promise);
  8934                else {
  8935                  t.cacheKey = `cacheKey_${g}`;
  8936                  this.fontCache.put(t.cacheKey, l.promise);
  8937                }
  8938                t.loadedName = `${this.idFactory.getDocId()}_${g}`;
  8939                this.translateFont(h)
  8940                  .then((e) => {
  8941                    l.resolve(
  8942                      new TranslatedFont({
  8943                        loadedName: t.loadedName,
  8944                        font: e,
  8945                        dict: t,
  8946                        evaluatorOptions: this.options,
  8947                      }),
  8948                    );
  8949                  })
  8950                  .catch((e) => {
  8951                    (0, r.warn)(`loadFont - translateFont failed: "${e}".`);
  8952                    l.resolve(
  8953                      new TranslatedFont({
  8954                        loadedName: t.loadedName,
  8955                        font: new s.ErrorFont(e instanceof Error ? e.message : e),
  8956                        dict: t,
  8957                        evaluatorOptions: this.options,
  8958                      }),
  8959                    );
  8960                  });
  8961                return l.promise;
  8962              }
  8963              buildPath(e, t, a, n = !1) {
  8964                const i = e.length - 1;
  8965                a || (a = []);
  8966                if (i < 0 || e.fnArray[i] !== r.OPS.constructPath) {
  8967                  if (n) {
  8968                    (0, r.warn)(
  8969                      `Encountered path operator "${t}" inside of a text object.`,
  8970                    );
  8971                    e.addOp(r.OPS.save, null);
  8972                  }
  8973                  let i;
  8974                  switch (t) {
  8975                    case r.OPS.rectangle:
  8976                      const e = a[0] + a[2],
  8977                        t = a[1] + a[3];
  8978                      i = [
  8979                        Math.min(a[0], e),
  8980                        Math.max(a[0], e),
  8981                        Math.min(a[1], t),
  8982                        Math.max(a[1], t),
  8983                      ];
  8984                      break;
  8985                    case r.OPS.moveTo:
  8986                    case r.OPS.lineTo:
  8987                      i = [a[0], a[0], a[1], a[1]];
  8988                      break;
  8989                    default:
  8990                      i = [1 / 0, -1 / 0, 1 / 0, -1 / 0];
  8991                  }
  8992                  e.addOp(r.OPS.constructPath, [[t], a, i]);
  8993                  n && e.addOp(r.OPS.restore, null);
  8994                } else {
  8995                  const n = e.argsArray[i];
  8996                  n[0].push(t);
  8997                  n[1].push(...a);
  8998                  const s = n[2];
  8999                  switch (t) {
  9000                    case r.OPS.rectangle:
  9001                      const e = a[0] + a[2],
  9002                        t = a[1] + a[3];
  9003                      s[0] = Math.min(s[0], a[0], e);
  9004                      s[1] = Math.max(s[1], a[0], e);
  9005                      s[2] = Math.min(s[2], a[1], t);
  9006                      s[3] = Math.max(s[3], a[1], t);
  9007                      break;
  9008                    case r.OPS.moveTo:
  9009                    case r.OPS.lineTo:
  9010                      s[0] = Math.min(s[0], a[0]);
  9011                      s[1] = Math.max(s[1], a[0]);
  9012                      s[2] = Math.min(s[2], a[1]);
  9013                      s[3] = Math.max(s[3], a[1]);
  9014                  }
  9015                }
  9016              }
  9017              parseColorSpace({ cs: e, resources: t, localColorSpaceCache: a }) {
  9018                return y.ColorSpace.parseAsync({
  9019                  cs: e,
  9020                  xref: this.xref,
  9021                  resources: t,
  9022                  pdfFunctionFactory: this._pdfFunctionFactory,
  9023                  localColorSpaceCache: a,
  9024                }).catch((e) => {
  9025                  if (e instanceof r.AbortException) return null;
  9026                  if (this.options.ignoreErrors) {
  9027                    (0, r.warn)(`parseColorSpace - ignoring ColorSpace: "${e}".`);
  9028                    return null;
  9029                  }
  9030                  throw e;
  9031                });
  9032              }
  9033              parseShading({
  9034                shading: e,
  9035                resources: t,
  9036                localColorSpaceCache: a,
  9037                localShadingPatternCache: r,
  9038              }) {
  9039                let n = r.get(e);
  9040                if (!n) {
  9041                  const i = l.Pattern.parseShading(
  9042                    e,
  9043                    this.xref,
  9044                    t,
  9045                    this._pdfFunctionFactory,
  9046                    a,
  9047                  ).getIR();
  9048                  n = `pattern_${this.idFactory.createObjId()}`;
  9049                  this.parsingType3Font &&
  9050                    (n = `${this.idFactory.getDocId()}_type3_${n}`);
  9051                  r.set(e, n);
  9052                  this.parsingType3Font
  9053                    ? this.handler.send("commonobj", [n, "Pattern", i])
  9054                    : this.handler.send("obj", [n, this.pageIndex, "Pattern", i]);
  9055                }
  9056                return n;
  9057              }
  9058              handleColorN(e, t, a, n, s, o, c, h, u, d) {
  9059                const f = a.pop();
  9060                if (f instanceof i.Name) {
  9061                  const g = s.getRaw(f.name),
  9062                    p = g instanceof i.Ref && u.getByRef(g);
  9063                  if (p)
  9064                    try {
  9065                      const r = n.base ? n.base.getRgb(a, 0) : null,
  9066                        i = (0, l.getTilingPatternIR)(
  9067                          p.operatorListIR,
  9068                          p.dict,
  9069                          r,
  9070                        );
  9071                      e.addOp(t, i);
  9072                      return;
  9073                    } catch {}
  9074                  const b = this.xref.fetchIfRef(g);
  9075                  if (b) {
  9076                    const i = b instanceof m.BaseStream ? b.dict : b,
  9077                      s = i.get("PatternType");
  9078                    if (s === E) {
  9079                      const r = n.base ? n.base.getRgb(a, 0) : null;
  9080                      return this.handleTilingType(t, r, o, b, i, e, c, u);
  9081                    }
  9082                    if (s === N) {
  9083                      const a = i.get("Shading"),
  9084                        r = i.getArray("Matrix"),
  9085                        n = this.parseShading({
  9086                          shading: a,
  9087                          resources: o,
  9088                          localColorSpaceCache: h,
  9089                          localShadingPatternCache: d,
  9090                        });
  9091                      e.addOp(t, ["Shading", n, r]);
  9092                      return;
  9093                    }
  9094                    throw new r.FormatError(`Unknown PatternType: ${s}`);
  9095                  }
  9096                }
  9097                throw new r.FormatError(`Unknown PatternName: ${f}`);
  9098              }
  9099              _parseVisibilityExpression(e, t, a) {
  9100                if (++t > 10) {
  9101                  (0, r.warn)("Visibility expression is too deeply nested");
  9102                  return;
  9103                }
  9104                const n = e.length,
  9105                  s = this.xref.fetchIfRef(e[0]);
  9106                if (!(n < 2) && s instanceof i.Name) {
  9107                  switch (s.name) {
  9108                    case "And":
  9109                    case "Or":
  9110                    case "Not":
  9111                      a.push(s.name);
  9112                      break;
  9113                    default:
  9114                      (0, r.warn)(
  9115                        `Invalid operator ${s.name} in visibility expression`,
  9116                      );
  9117                      return;
  9118                  }
  9119                  for (let r = 1; r < n; r++) {
  9120                    const n = e[r],
  9121                      s = this.xref.fetchIfRef(n);
  9122                    if (Array.isArray(s)) {
  9123                      const e = [];
  9124                      a.push(e);
  9125                      this._parseVisibilityExpression(s, t, e);
  9126                    } else n instanceof i.Ref && a.push(n.toString());
  9127                  }
  9128                } else (0, r.warn)("Invalid visibility expression");
  9129              }
  9130              async parseMarkedContentProps(e, t) {
  9131                let a;
  9132                if (e instanceof i.Name) {
  9133                  a = t.get("Properties").get(e.name);
  9134                } else {
  9135                  if (!(e instanceof i.Dict))
  9136                    throw new r.FormatError(
  9137                      "Optional content properties malformed.",
  9138                    );
  9139                  a = e;
  9140                }
  9141                const n = a.get("Type")?.name;
  9142                if ("OCG" === n) return { type: n, id: a.objId };
  9143                if ("OCMD" === n) {
  9144                  const e = a.get("VE");
  9145                  if (Array.isArray(e)) {
  9146                    const t = [];
  9147                    this._parseVisibilityExpression(e, 0, t);
  9148                    if (t.length > 0) return { type: "OCMD", expression: t };
  9149                  }
  9150                  const t = a.get("OCGs");
  9151                  if (Array.isArray(t) || t instanceof i.Dict) {
  9152                    const e = [];
  9153                    if (Array.isArray(t)) for (const a of t) e.push(a.toString());
  9154                    else e.push(t.objId);
  9155                    return {
  9156                      type: n,
  9157                      ids: e,
  9158                      policy:
  9159                        a.get("P") instanceof i.Name ? a.get("P").name : null,
  9160                      expression: null,
  9161                    };
  9162                  }
  9163                  if (t instanceof i.Ref) return { type: n, id: t.toString() };
  9164                }
  9165                return null;
  9166              }
  9167              getOperatorList({
  9168                stream: e,
  9169                task: t,
  9170                resources: a,
  9171                operatorList: n,
  9172                initialState: s = null,
  9173                fallbackFontDict: o = null,
  9174              }) {
  9175                a ||= i.Dict.empty;
  9176                s ||= new EvalState();
  9177                if (!n)
  9178                  throw new Error(
  9179                    'getOperatorList: missing "operatorList" parameter',
  9180                  );
  9181                const c = this,
  9182                  l = this.xref;
  9183                let h = !1;
  9184                const u = new g.LocalImageCache(),
  9185                  d = new g.LocalColorSpaceCache(),
  9186                  f = new g.LocalGStateCache(),
  9187                  p = new g.LocalTilingPatternCache(),
  9188                  b = new Map(),
  9189                  w = a.get("XObject") || i.Dict.empty,
  9190                  S = a.get("Pattern") || i.Dict.empty,
  9191                  x = new StateManager(s),
  9192                  C = new EvaluatorPreprocessor(e, l, x),
  9193                  k = new TimeSlotManager();
  9194                function closePendingRestoreOPS(e) {
  9195                  for (let e = 0, t = C.savedStatesDepth; e < t; e++)
  9196                    n.addOp(r.OPS.restore, []);
  9197                }
  9198                return new Promise(function promiseBody(e, s) {
  9199                  const next = function (t) {
  9200                    Promise.all([t, n.ready]).then(function () {
  9201                      try {
  9202                        promiseBody(e, s);
  9203                      } catch (e) {
  9204                        s(e);
  9205                      }
  9206                    }, s);
  9207                  };
  9208                  t.ensureNotTerminated();
  9209                  k.reset();
  9210                  const g = {};
  9211                  let v, F, O, T, M, D;
  9212                  for (; !(v = k.check()); ) {
  9213                    g.args = null;
  9214                    if (!C.read(g)) break;
  9215                    let e = g.args,
  9216                      s = g.fn;
  9217                    switch (0 | s) {
  9218                      case r.OPS.paintXObject:
  9219                        D = e[0] instanceof i.Name;
  9220                        M = e[0].name;
  9221                        if (D) {
  9222                          const t = u.getByName(M);
  9223                          if (t) {
  9224                            n.addImageOps(t.fn, t.args, t.optionalContent);
  9225                            incrementCachedImageMaskCount(t);
  9226                            e = null;
  9227                            continue;
  9228                          }
  9229                        }
  9230                        next(
  9231                          new Promise(function (e, s) {
  9232                            if (!D)
  9233                              throw new r.FormatError(
  9234                                "XObject must be referred to by name.",
  9235                              );
  9236                            let o = w.getRaw(M);
  9237                            if (o instanceof i.Ref) {
  9238                              const t =
  9239                                u.getByRef(o) ||
  9240                                c._regionalImageCache.getByRef(o);
  9241                              if (t) {
  9242                                n.addImageOps(t.fn, t.args, t.optionalContent);
  9243                                incrementCachedImageMaskCount(t);
  9244                                e();
  9245                                return;
  9246                              }
  9247                              const a = c.globalImageCache.getData(
  9248                                o,
  9249                                c.pageIndex,
  9250                              );
  9251                              if (a) {
  9252                                n.addDependency(a.objId);
  9253                                n.addImageOps(a.fn, a.args, a.optionalContent);
  9254                                e();
  9255                                return;
  9256                              }
  9257                              o = l.fetch(o);
  9258                            }
  9259                            if (!(o instanceof m.BaseStream))
  9260                              throw new r.FormatError(
  9261                                "XObject should be a stream",
  9262                              );
  9263                            const h = o.dict.get("Subtype");
  9264                            if (!(h instanceof i.Name))
  9265                              throw new r.FormatError(
  9266                                "XObject should have a Name subtype",
  9267                              );
  9268                            if ("Form" !== h.name)
  9269                              if ("Image" !== h.name) {
  9270                                if ("PS" !== h.name)
  9271                                  throw new r.FormatError(
  9272                                    `Unhandled XObject subtype ${h.name}`,
  9273                                  );
  9274                                (0, r.info)("Ignored XObject subtype PS");
  9275                                e();
  9276                              } else
  9277                                c.buildPaintImageXObject({
  9278                                  resources: a,
  9279                                  image: o,
  9280                                  operatorList: n,
  9281                                  cacheKey: M,
  9282                                  localImageCache: u,
  9283                                  localColorSpaceCache: d,
  9284                                }).then(e, s);
  9285                            else {
  9286                              x.save();
  9287                              c.buildFormXObject(
  9288                                a,
  9289                                o,
  9290                                null,
  9291                                n,
  9292                                t,
  9293                                x.state.clone(),
  9294                                d,
  9295                              ).then(function () {
  9296                                x.restore();
  9297                                e();
  9298                              }, s);
  9299                            }
  9300                          }).catch(function (e) {
  9301                            if (!(e instanceof r.AbortException)) {
  9302                              if (!c.options.ignoreErrors) throw e;
  9303                              (0, r.warn)(
  9304                                `getOperatorList - ignoring XObject: "${e}".`,
  9305                              );
  9306                            }
  9307                          }),
  9308                        );
  9309                        return;
  9310                      case r.OPS.setFont:
  9311                        var E = e[1];
  9312                        next(
  9313                          c
  9314                            .handleSetFont(a, e, null, n, t, x.state, o)
  9315                            .then(function (e) {
  9316                              n.addDependency(e);
  9317                              n.addOp(r.OPS.setFont, [e, E]);
  9318                            }),
  9319                        );
  9320                        return;
  9321                      case r.OPS.beginText:
  9322                        h = !0;
  9323                        break;
  9324                      case r.OPS.endText:
  9325                        h = !1;
  9326                        break;
  9327                      case r.OPS.endInlineImage:
  9328                        var N = e[0].cacheKey;
  9329                        if (N) {
  9330                          const t = u.getByName(N);
  9331                          if (t) {
  9332                            n.addImageOps(t.fn, t.args, t.optionalContent);
  9333                            incrementCachedImageMaskCount(t);
  9334                            e = null;
  9335                            continue;
  9336                          }
  9337                        }
  9338                        next(
  9339                          c.buildPaintImageXObject({
  9340                            resources: a,
  9341                            image: e[0],
  9342                            isInline: !0,
  9343                            operatorList: n,
  9344                            cacheKey: N,
  9345                            localImageCache: u,
  9346                            localColorSpaceCache: d,
  9347                          }),
  9348                        );
  9349                        return;
  9350                      case r.OPS.showText:
  9351                        if (!x.state.font) {
  9352                          c.ensureStateFont(x.state);
  9353                          continue;
  9354                        }
  9355                        e[0] = c.handleText(e[0], x.state);
  9356                        break;
  9357                      case r.OPS.showSpacedText:
  9358                        if (!x.state.font) {
  9359                          c.ensureStateFont(x.state);
  9360                          continue;
  9361                        }
  9362                        var L = [],
  9363                          $ = x.state;
  9364                        for (const t of e[0])
  9365                          "string" == typeof t
  9366                            ? L.push(...c.handleText(t, $))
  9367                            : "number" == typeof t && L.push(t);
  9368                        e[0] = L;
  9369                        s = r.OPS.showText;
  9370                        break;
  9371                      case r.OPS.nextLineShowText:
  9372                        if (!x.state.font) {
  9373                          c.ensureStateFont(x.state);
  9374                          continue;
  9375                        }
  9376                        n.addOp(r.OPS.nextLine);
  9377                        e[0] = c.handleText(e[0], x.state);
  9378                        s = r.OPS.showText;
  9379                        break;
  9380                      case r.OPS.nextLineSetSpacingShowText:
  9381                        if (!x.state.font) {
  9382                          c.ensureStateFont(x.state);
  9383                          continue;
  9384                        }
  9385                        n.addOp(r.OPS.nextLine);
  9386                        n.addOp(r.OPS.setWordSpacing, [e.shift()]);
  9387                        n.addOp(r.OPS.setCharSpacing, [e.shift()]);
  9388                        e[0] = c.handleText(e[0], x.state);
  9389                        s = r.OPS.showText;
  9390                        break;
  9391                      case r.OPS.setTextRenderingMode:
  9392                        x.state.textRenderingMode = e[0];
  9393                        break;
  9394                      case r.OPS.setFillColorSpace: {
  9395                        const t = y.ColorSpace.getCached(e[0], l, d);
  9396                        if (t) {
  9397                          x.state.fillColorSpace = t;
  9398                          continue;
  9399                        }
  9400                        next(
  9401                          c
  9402                            .parseColorSpace({
  9403                              cs: e[0],
  9404                              resources: a,
  9405                              localColorSpaceCache: d,
  9406                            })
  9407                            .then(function (e) {
  9408                              e && (x.state.fillColorSpace = e);
  9409                            }),
  9410                        );
  9411                        return;
  9412                      }
  9413                      case r.OPS.setStrokeColorSpace: {
  9414                        const t = y.ColorSpace.getCached(e[0], l, d);
  9415                        if (t) {
  9416                          x.state.strokeColorSpace = t;
  9417                          continue;
  9418                        }
  9419                        next(
  9420                          c
  9421                            .parseColorSpace({
  9422                              cs: e[0],
  9423                              resources: a,
  9424                              localColorSpaceCache: d,
  9425                            })
  9426                            .then(function (e) {
  9427                              e && (x.state.strokeColorSpace = e);
  9428                            }),
  9429                        );
  9430                        return;
  9431                      }
  9432                      case r.OPS.setFillColor:
  9433                        T = x.state.fillColorSpace;
  9434                        e = T.getRgb(e, 0);
  9435                        s = r.OPS.setFillRGBColor;
  9436                        break;
  9437                      case r.OPS.setStrokeColor:
  9438                        T = x.state.strokeColorSpace;
  9439                        e = T.getRgb(e, 0);
  9440                        s = r.OPS.setStrokeRGBColor;
  9441                        break;
  9442                      case r.OPS.setFillGray:
  9443                        x.state.fillColorSpace = y.ColorSpace.singletons.gray;
  9444                        e = y.ColorSpace.singletons.gray.getRgb(e, 0);
  9445                        s = r.OPS.setFillRGBColor;
  9446                        break;
  9447                      case r.OPS.setStrokeGray:
  9448                        x.state.strokeColorSpace = y.ColorSpace.singletons.gray;
  9449                        e = y.ColorSpace.singletons.gray.getRgb(e, 0);
  9450                        s = r.OPS.setStrokeRGBColor;
  9451                        break;
  9452                      case r.OPS.setFillCMYKColor:
  9453                        x.state.fillColorSpace = y.ColorSpace.singletons.cmyk;
  9454                        e = y.ColorSpace.singletons.cmyk.getRgb(e, 0);
  9455                        s = r.OPS.setFillRGBColor;
  9456                        break;
  9457                      case r.OPS.setStrokeCMYKColor:
  9458                        x.state.strokeColorSpace = y.ColorSpace.singletons.cmyk;
  9459                        e = y.ColorSpace.singletons.cmyk.getRgb(e, 0);
  9460                        s = r.OPS.setStrokeRGBColor;
  9461                        break;
  9462                      case r.OPS.setFillRGBColor:
  9463                        x.state.fillColorSpace = y.ColorSpace.singletons.rgb;
  9464                        e = y.ColorSpace.singletons.rgb.getRgb(e, 0);
  9465                        break;
  9466                      case r.OPS.setStrokeRGBColor:
  9467                        x.state.strokeColorSpace = y.ColorSpace.singletons.rgb;
  9468                        e = y.ColorSpace.singletons.rgb.getRgb(e, 0);
  9469                        break;
  9470                      case r.OPS.setFillColorN:
  9471                        T = x.state.fillColorSpace;
  9472                        if ("Pattern" === T.name) {
  9473                          next(
  9474                            c.handleColorN(
  9475                              n,
  9476                              r.OPS.setFillColorN,
  9477                              e,
  9478                              T,
  9479                              S,
  9480                              a,
  9481                              t,
  9482                              d,
  9483                              p,
  9484                              b,
  9485                            ),
  9486                          );
  9487                          return;
  9488                        }
  9489                        e = T.getRgb(e, 0);
  9490                        s = r.OPS.setFillRGBColor;
  9491                        break;
  9492                      case r.OPS.setStrokeColorN:
  9493                        T = x.state.strokeColorSpace;
  9494                        if ("Pattern" === T.name) {
  9495                          next(
  9496                            c.handleColorN(
  9497                              n,
  9498                              r.OPS.setStrokeColorN,
  9499                              e,
  9500                              T,
  9501                              S,
  9502                              a,
  9503                              t,
  9504                              d,
  9505                              p,
  9506                              b,
  9507                            ),
  9508                          );
  9509                          return;
  9510                        }
  9511                        e = T.getRgb(e, 0);
  9512                        s = r.OPS.setStrokeRGBColor;
  9513                        break;
  9514                      case r.OPS.shadingFill:
  9515                        var _ = a.get("Shading");
  9516                        if (!_)
  9517                          throw new r.FormatError("No shading resource found");
  9518                        var j = _.get(e[0].name);
  9519                        if (!j)
  9520                          throw new r.FormatError("No shading object found");
  9521                        e = [
  9522                          c.parseShading({
  9523                            shading: j,
  9524                            resources: a,
  9525                            localColorSpaceCache: d,
  9526                            localShadingPatternCache: b,
  9527                          }),
  9528                        ];
  9529                        s = r.OPS.shadingFill;
  9530                        break;
  9531                      case r.OPS.setGState:
  9532                        D = e[0] instanceof i.Name;
  9533                        M = e[0].name;
  9534                        if (D) {
  9535                          const t = f.getByName(M);
  9536                          if (t) {
  9537                            t.length > 0 && n.addOp(r.OPS.setGState, [t]);
  9538                            e = null;
  9539                            continue;
  9540                          }
  9541                        }
  9542                        next(
  9543                          new Promise(function (e, s) {
  9544                            if (!D)
  9545                              throw new r.FormatError(
  9546                                "GState must be referred to by name.",
  9547                              );
  9548                            const o = a.get("ExtGState");
  9549                            if (!(o instanceof i.Dict))
  9550                              throw new r.FormatError(
  9551                                "ExtGState should be a dictionary.",
  9552                              );
  9553                            const l = o.get(M);
  9554                            if (!(l instanceof i.Dict))
  9555                              throw new r.FormatError(
  9556                                "GState should be a dictionary.",
  9557                              );
  9558                            c.setGState({
  9559                              resources: a,
  9560                              gState: l,
  9561                              operatorList: n,
  9562                              cacheKey: M,
  9563                              task: t,
  9564                              stateManager: x,
  9565                              localGStateCache: f,
  9566                              localColorSpaceCache: d,
  9567                            }).then(e, s);
  9568                          }).catch(function (e) {
  9569                            if (!(e instanceof r.AbortException)) {
  9570                              if (!c.options.ignoreErrors) throw e;
  9571                              (0, r.warn)(
  9572                                `getOperatorList - ignoring ExtGState: "${e}".`,
  9573                              );
  9574                            }
  9575                          }),
  9576                        );
  9577                        return;
  9578                      case r.OPS.moveTo:
  9579                      case r.OPS.lineTo:
  9580                      case r.OPS.curveTo:
  9581                      case r.OPS.curveTo2:
  9582                      case r.OPS.curveTo3:
  9583                      case r.OPS.closePath:
  9584                      case r.OPS.rectangle:
  9585                        c.buildPath(n, s, e, h);
  9586                        continue;
  9587                      case r.OPS.markPoint:
  9588                      case r.OPS.markPointProps:
  9589                      case r.OPS.beginCompat:
  9590                      case r.OPS.endCompat:
  9591                        continue;
  9592                      case r.OPS.beginMarkedContentProps:
  9593                        if (!(e[0] instanceof i.Name)) {
  9594                          (0, r.warn)(
  9595                            `Expected name for beginMarkedContentProps arg0=${e[0]}`,
  9596                          );
  9597                          continue;
  9598                        }
  9599                        if ("OC" === e[0].name) {
  9600                          next(
  9601                            c
  9602                              .parseMarkedContentProps(e[1], a)
  9603                              .then((e) => {
  9604                                n.addOp(r.OPS.beginMarkedContentProps, ["OC", e]);
  9605                              })
  9606                              .catch((e) => {
  9607                                if (!(e instanceof r.AbortException)) {
  9608                                  if (!c.options.ignoreErrors) throw e;
  9609                                  (0, r.warn)(
  9610                                    `getOperatorList - ignoring beginMarkedContentProps: "${e}".`,
  9611                                  );
  9612                                }
  9613                              }),
  9614                          );
  9615                          return;
  9616                        }
  9617                        e = [
  9618                          e[0].name,
  9619                          e[1] instanceof i.Dict ? e[1].get("MCID") : null,
  9620                        ];
  9621                        break;
  9622                      case r.OPS.beginMarkedContent:
  9623                      case r.OPS.endMarkedContent:
  9624                      default:
  9625                        if (null !== e) {
  9626                          for (
  9627                            F = 0, O = e.length;
  9628                            F < O && !(e[F] instanceof i.Dict);
  9629                            F++
  9630                          );
  9631                          if (F < O) {
  9632                            (0, r.warn)(
  9633                              "getOperatorList - ignoring operator: " + s,
  9634                            );
  9635                            continue;
  9636                          }
  9637                        }
  9638                    }
  9639                    n.addOp(s, e);
  9640                  }
  9641                  if (v) next(R);
  9642                  else {
  9643                    closePendingRestoreOPS();
  9644                    e();
  9645                  }
  9646                }).catch((e) => {
  9647                  if (!(e instanceof r.AbortException)) {
  9648                    if (!this.options.ignoreErrors) throw e;
  9649                    (0, r.warn)(
  9650                      `getOperatorList - ignoring errors during "${t.name}" task: "${e}".`,
  9651                    );
  9652                    closePendingRestoreOPS();
  9653                  }
  9654                });
  9655              }
  9656              getTextContent({
  9657                stream: e,
  9658                task: t,
  9659                resources: a,
  9660                stateManager: n = null,
  9661                includeMarkedContent: s = !1,
  9662                sink: o,
  9663                seenStyles: c = new Set(),
  9664                viewBox: l,
  9665                markedContentData: h = null,
  9666                disableNormalization: u = !1,
  9667              }) {
  9668                a ||= i.Dict.empty;
  9669                n ||= new StateManager(new TextState());
  9670                s && (h ||= { level: 0 });
  9671                const d = { items: [], styles: Object.create(null) },
  9672                  f = {
  9673                    initialized: !1,
  9674                    str: [],
  9675                    totalWidth: 0,
  9676                    totalHeight: 0,
  9677                    width: 0,
  9678                    height: 0,
  9679                    vertical: !1,
  9680                    prevTransform: null,
  9681                    textAdvanceScale: 0,
  9682                    spaceInFlowMin: 0,
  9683                    spaceInFlowMax: 0,
  9684                    trackingSpaceMin: 1 / 0,
  9685                    negativeSpaceMax: -1 / 0,
  9686                    notASpace: -1 / 0,
  9687                    transform: null,
  9688                    fontName: null,
  9689                    hasEOL: !1,
  9690                  },
  9691                  p = [" ", " "];
  9692                let y = 0;
  9693                function saveLastChar(e) {
  9694                  const t = (y + 1) % 2,
  9695                    a = " " !== p[y] && " " === p[t];
  9696                  p[y] = e;
  9697                  y = t;
  9698                  return a;
  9699                }
  9700                function shouldAddWhitepsace() {
  9701                  return " " !== p[y] && " " === p[(y + 1) % 2];
  9702                }
  9703                function resetLastChars() {
  9704                  p[0] = p[1] = " ";
  9705                  y = 0;
  9706                }
  9707                const w = this,
  9708                  S = this.xref,
  9709                  x = [];
  9710                let C = null;
  9711                const k = new g.LocalImageCache(),
  9712                  v = new g.LocalGStateCache(),
  9713                  F = new EvaluatorPreprocessor(e, S, n);
  9714                let O;
  9715                function pushWhitespace({
  9716                  width: e = 0,
  9717                  height: t = 0,
  9718                  transform: a = f.prevTransform,
  9719                  fontName: r = f.fontName,
  9720                }) {
  9721                  d.items.push({
  9722                    str: " ",
  9723                    dir: "ltr",
  9724                    width: e,
  9725                    height: t,
  9726                    transform: a,
  9727                    fontName: r,
  9728                    hasEOL: !1,
  9729                  });
  9730                }
  9731                function getCurrentTextTransform() {
  9732                  const e = O.font,
  9733                    t = [
  9734                      O.fontSize * O.textHScale,
  9735                      0,
  9736                      0,
  9737                      O.fontSize,
  9738                      0,
  9739                      O.textRise,
  9740                    ];
  9741                  if (
  9742                    e.isType3Font &&
  9743                    (O.fontSize <= 1 || e.isCharBBox) &&
  9744                    !(0, r.isArrayEqual)(O.fontMatrix, r.FONT_IDENTITY_MATRIX)
  9745                  ) {
  9746                    const a = e.bbox[3] - e.bbox[1];
  9747                    a > 0 && (t[3] *= a * O.fontMatrix[3]);
  9748                  }
  9749                  return r.Util.transform(
  9750                    O.ctm,
  9751                    r.Util.transform(O.textMatrix, t),
  9752                  );
  9753                }
  9754                function ensureTextContentItem() {
  9755                  if (f.initialized) return f;
  9756                  const { font: e, loadedName: t } = O;
  9757                  if (!c.has(t)) {
  9758                    c.add(t);
  9759                    d.styles[t] = {
  9760                      fontFamily: e.fallbackName,
  9761                      ascent: e.ascent,
  9762                      descent: e.descent,
  9763                      vertical: e.vertical,
  9764                    };
  9765                  }
  9766                  f.fontName = t;
  9767                  const a = (f.transform = getCurrentTextTransform());
  9768                  if (e.vertical) {
  9769                    f.width = f.totalWidth = Math.hypot(a[0], a[1]);
  9770                    f.height = f.totalHeight = 0;
  9771                    f.vertical = !0;
  9772                  } else {
  9773                    f.width = f.totalWidth = 0;
  9774                    f.height = f.totalHeight = Math.hypot(a[2], a[3]);
  9775                    f.vertical = !1;
  9776                  }
  9777                  const r = Math.hypot(O.textLineMatrix[0], O.textLineMatrix[1]),
  9778                    n = Math.hypot(O.ctm[0], O.ctm[1]);
  9779                  f.textAdvanceScale = n * r;
  9780                  const { fontSize: i } = O;
  9781                  f.trackingSpaceMin = 0.102 * i;
  9782                  f.notASpace = 0.03 * i;
  9783                  f.negativeSpaceMax = -0.2 * i;
  9784                  f.spaceInFlowMin = 0.102 * i;
  9785                  f.spaceInFlowMax = 0.6 * i;
  9786                  f.hasEOL = !1;
  9787                  f.initialized = !0;
  9788                  return f;
  9789                }
  9790                function updateAdvanceScale() {
  9791                  if (!f.initialized) return;
  9792                  const e = Math.hypot(O.textLineMatrix[0], O.textLineMatrix[1]),
  9793                    t = Math.hypot(O.ctm[0], O.ctm[1]) * e;
  9794                  if (t !== f.textAdvanceScale) {
  9795                    if (f.vertical) {
  9796                      f.totalHeight += f.height * f.textAdvanceScale;
  9797                      f.height = 0;
  9798                    } else {
  9799                      f.totalWidth += f.width * f.textAdvanceScale;
  9800                      f.width = 0;
  9801                    }
  9802                    f.textAdvanceScale = t;
  9803                  }
  9804                }
  9805                function handleSetFont(e, n) {
  9806                  return w
  9807                    .loadFont(e, n, a)
  9808                    .then(function (e) {
  9809                      return e.font.isType3Font
  9810                        ? e
  9811                            .loadType3Data(w, a, t)
  9812                            .catch(function () {})
  9813                            .then(function () {
  9814                              return e;
  9815                            })
  9816                        : e;
  9817                    })
  9818                    .then(function (e) {
  9819                      O.loadedName = e.loadedName;
  9820                      O.font = e.font;
  9821                      O.fontMatrix = e.font.fontMatrix || r.FONT_IDENTITY_MATRIX;
  9822                    });
  9823                }
  9824                function applyInverseRotation(e, t, a) {
  9825                  const r = Math.hypot(a[0], a[1]);
  9826                  return [(a[0] * e + a[1] * t) / r, (a[2] * e + a[3] * t) / r];
  9827                }
  9828                function compareWithLastPosition(e) {
  9829                  const t = getCurrentTextTransform();
  9830                  let a = t[4],
  9831                    r = t[5];
  9832                  if (O.font?.vertical) {
  9833                    if (a < l[0] || a > l[2] || r + e < l[1] || r > l[3])
  9834                      return !1;
  9835                  } else if (a + e < l[0] || a > l[2] || r < l[1] || r > l[3])
  9836                    return !1;
  9837                  if (!O.font || !f.prevTransform) return !0;
  9838                  let n = f.prevTransform[4],
  9839                    i = f.prevTransform[5];
  9840                  if (n === a && i === r) return !0;
  9841                  let s = -1;
  9842                  t[0] && 0 === t[1] && 0 === t[2]
  9843                    ? (s = t[0] > 0 ? 0 : 180)
  9844                    : t[1] &&
  9845                      0 === t[0] &&
  9846                      0 === t[3] &&
  9847                      (s = t[1] > 0 ? 90 : 270);
  9848                  switch (s) {
  9849                    case 0:
  9850                      break;
  9851                    case 90:
  9852                      [a, r] = [r, a];
  9853                      [n, i] = [i, n];
  9854                      break;
  9855                    case 180:
  9856                      [a, r, n, i] = [-a, -r, -n, -i];
  9857                      break;
  9858                    case 270:
  9859                      [a, r] = [-r, -a];
  9860                      [n, i] = [-i, -n];
  9861                      break;
  9862                    default:
  9863                      [a, r] = applyInverseRotation(a, r, t);
  9864                      [n, i] = applyInverseRotation(n, i, f.prevTransform);
  9865                  }
  9866                  if (O.font.vertical) {
  9867                    const e = (i - r) / f.textAdvanceScale,
  9868                      t = a - n,
  9869                      s = Math.sign(f.height);
  9870                    if (e < s * f.negativeSpaceMax) {
  9871                      if (Math.abs(t) > 0.5 * f.width) {
  9872                        appendEOL();
  9873                        return !0;
  9874                      }
  9875                      resetLastChars();
  9876                      flushTextContentItem();
  9877                      return !0;
  9878                    }
  9879                    if (Math.abs(t) > f.width) {
  9880                      appendEOL();
  9881                      return !0;
  9882                    }
  9883                    e <= s * f.notASpace && resetLastChars();
  9884                    if (e <= s * f.trackingSpaceMin)
  9885                      if (shouldAddWhitepsace()) {
  9886                        resetLastChars();
  9887                        flushTextContentItem();
  9888                        pushWhitespace({ height: Math.abs(e) });
  9889                      } else f.height += e;
  9890                    else if (!addFakeSpaces(e, f.prevTransform, s))
  9891                      if (0 === f.str.length) {
  9892                        resetLastChars();
  9893                        pushWhitespace({ height: Math.abs(e) });
  9894                      } else f.height += e;
  9895                    Math.abs(t) > 0.25 * f.width && flushTextContentItem();
  9896                    return !0;
  9897                  }
  9898                  const o = (a - n) / f.textAdvanceScale,
  9899                    c = r - i,
  9900                    h = Math.sign(f.width);
  9901                  if (o < h * f.negativeSpaceMax) {
  9902                    if (Math.abs(c) > 0.5 * f.height) {
  9903                      appendEOL();
  9904                      return !0;
  9905                    }
  9906                    resetLastChars();
  9907                    flushTextContentItem();
  9908                    return !0;
  9909                  }
  9910                  if (Math.abs(c) > f.height) {
  9911                    appendEOL();
  9912                    return !0;
  9913                  }
  9914                  o <= h * f.notASpace && resetLastChars();
  9915                  if (o <= h * f.trackingSpaceMin)
  9916                    if (shouldAddWhitepsace()) {
  9917                      resetLastChars();
  9918                      flushTextContentItem();
  9919                      pushWhitespace({ width: Math.abs(o) });
  9920                    } else f.width += o;
  9921                  else if (!addFakeSpaces(o, f.prevTransform, h))
  9922                    if (0 === f.str.length) {
  9923                      resetLastChars();
  9924                      pushWhitespace({ width: Math.abs(o) });
  9925                    } else f.width += o;
  9926                  Math.abs(c) > 0.25 * f.height && flushTextContentItem();
  9927                  return !0;
  9928                }
  9929                function buildTextContentItem({ chars: e, extraSpacing: t }) {
  9930                  const a = O.font;
  9931                  if (!e) {
  9932                    const e = O.charSpacing + t;
  9933                    e &&
  9934                      (a.vertical
  9935                        ? O.translateTextMatrix(0, -e)
  9936                        : O.translateTextMatrix(e * O.textHScale, 0));
  9937                    return;
  9938                  }
  9939                  const r = a.charsToGlyphs(e),
  9940                    n = O.fontMatrix[0] * O.fontSize;
  9941                  for (let e = 0, i = r.length; e < i; e++) {
  9942                    const s = r[e],
  9943                      { category: o } = s;
  9944                    if (o.isInvisibleFormatMark) continue;
  9945                    let c = O.charSpacing + (e + 1 === i ? t : 0),
  9946                      l = s.width;
  9947                    a.vertical && (l = s.vmetric ? s.vmetric[0] : -l);
  9948                    let h = l * n;
  9949                    if (o.isWhitespace) {
  9950                      if (a.vertical) {
  9951                        c += -h + O.wordSpacing;
  9952                        O.translateTextMatrix(0, -c);
  9953                      } else {
  9954                        c += h + O.wordSpacing;
  9955                        O.translateTextMatrix(c * O.textHScale, 0);
  9956                      }
  9957                      saveLastChar(" ");
  9958                      continue;
  9959                    }
  9960                    if (!o.isZeroWidthDiacritic && !compareWithLastPosition(h)) {
  9961                      a.vertical
  9962                        ? O.translateTextMatrix(0, h)
  9963                        : O.translateTextMatrix(h * O.textHScale, 0);
  9964                      continue;
  9965                    }
  9966                    const u = ensureTextContentItem();
  9967                    o.isZeroWidthDiacritic && (h = 0);
  9968                    if (a.vertical) {
  9969                      O.translateTextMatrix(0, h);
  9970                      h = Math.abs(h);
  9971                      u.height += h;
  9972                    } else {
  9973                      h *= O.textHScale;
  9974                      O.translateTextMatrix(h, 0);
  9975                      u.width += h;
  9976                    }
  9977                    h && (u.prevTransform = getCurrentTextTransform());
  9978                    const d = s.unicode;
  9979                    saveLastChar(d) && u.str.push(" ");
  9980                    u.str.push(d);
  9981                    c &&
  9982                      (a.vertical
  9983                        ? O.translateTextMatrix(0, -c)
  9984                        : O.translateTextMatrix(c * O.textHScale, 0));
  9985                  }
  9986                }
  9987                function appendEOL() {
  9988                  resetLastChars();
  9989                  if (f.initialized) {
  9990                    f.hasEOL = !0;
  9991                    flushTextContentItem();
  9992                  } else
  9993                    d.items.push({
  9994                      str: "",
  9995                      dir: "ltr",
  9996                      width: 0,
  9997                      height: 0,
  9998                      transform: getCurrentTextTransform(),
  9999                      fontName: O.loadedName,
 10000                      hasEOL: !0,
 10001                    });
 10002                }
 10003                function addFakeSpaces(e, t, a) {
 10004                  if (a * f.spaceInFlowMin <= e && e <= a * f.spaceInFlowMax) {
 10005                    if (f.initialized) {
 10006                      resetLastChars();
 10007                      f.str.push(" ");
 10008                    }
 10009                    return !1;
 10010                  }
 10011                  const r = f.fontName;
 10012                  let n = 0;
 10013                  if (f.vertical) {
 10014                    n = e;
 10015                    e = 0;
 10016                  }
 10017                  flushTextContentItem();
 10018                  resetLastChars();
 10019                  pushWhitespace({
 10020                    width: Math.abs(e),
 10021                    height: Math.abs(n),
 10022                    transform: t || getCurrentTextTransform(),
 10023                    fontName: r,
 10024                  });
 10025                  return !0;
 10026                }
 10027                function flushTextContentItem() {
 10028                  if (f.initialized && f.str) {
 10029                    f.vertical
 10030                      ? (f.totalHeight += f.height * f.textAdvanceScale)
 10031                      : (f.totalWidth += f.width * f.textAdvanceScale);
 10032                    d.items.push(
 10033                      (function runBidiTransform(e) {
 10034                        let t = e.str.join("");
 10035                        u || (t = (0, r.normalizeUnicode)(t));
 10036                        const a = (0, b.bidi)(t, -1, e.vertical);
 10037                        return {
 10038                          str: a.str,
 10039                          dir: a.dir,
 10040                          width: Math.abs(e.totalWidth),
 10041                          height: Math.abs(e.totalHeight),
 10042                          transform: e.transform,
 10043                          fontName: e.fontName,
 10044                          hasEOL: e.hasEOL,
 10045                        };
 10046                      })(f),
 10047                    );
 10048                    f.initialized = !1;
 10049                    f.str.length = 0;
 10050                  }
 10051                }
 10052                function enqueueChunk(e = !1) {
 10053                  const t = d.items.length;
 10054                  if (0 !== t && !(e && t < 10)) {
 10055                    o.enqueue(d, t);
 10056                    d.items = [];
 10057                    d.styles = Object.create(null);
 10058                  }
 10059                }
 10060                const T = new TimeSlotManager();
 10061                return new Promise(function promiseBody(e, f) {
 10062                  const next = function (t) {
 10063                    enqueueChunk(!0);
 10064                    Promise.all([t, o.ready]).then(function () {
 10065                      try {
 10066                        promiseBody(e, f);
 10067                      } catch (e) {
 10068                        f(e);
 10069                      }
 10070                    }, f);
 10071                  };
 10072                  t.ensureNotTerminated();
 10073                  T.reset();
 10074                  const g = {};
 10075                  let p,
 10076                    b = [];
 10077                  for (; !(p = T.check()); ) {
 10078                    b.length = 0;
 10079                    g.args = b;
 10080                    if (!F.read(g)) break;
 10081                    const e = O;
 10082                    O = n.state;
 10083                    const f = g.fn;
 10084                    b = g.args;
 10085                    switch (0 | f) {
 10086                      case r.OPS.setFont:
 10087                        var y = b[0].name,
 10088                          M = b[1];
 10089                        if (O.font && y === O.fontName && M === O.fontSize) break;
 10090                        flushTextContentItem();
 10091                        O.fontName = y;
 10092                        O.fontSize = M;
 10093                        next(handleSetFont(y, null));
 10094                        return;
 10095                      case r.OPS.setTextRise:
 10096                        O.textRise = b[0];
 10097                        break;
 10098                      case r.OPS.setHScale:
 10099                        O.textHScale = b[0] / 100;
 10100                        break;
 10101                      case r.OPS.setLeading:
 10102                        O.leading = b[0];
 10103                        break;
 10104                      case r.OPS.moveText:
 10105                        O.translateTextLineMatrix(b[0], b[1]);
 10106                        O.textMatrix = O.textLineMatrix.slice();
 10107                        break;
 10108                      case r.OPS.setLeadingMoveText:
 10109                        O.leading = -b[1];
 10110                        O.translateTextLineMatrix(b[0], b[1]);
 10111                        O.textMatrix = O.textLineMatrix.slice();
 10112                        break;
 10113                      case r.OPS.nextLine:
 10114                        O.carriageReturn();
 10115                        break;
 10116                      case r.OPS.setTextMatrix:
 10117                        O.setTextMatrix(b[0], b[1], b[2], b[3], b[4], b[5]);
 10118                        O.setTextLineMatrix(b[0], b[1], b[2], b[3], b[4], b[5]);
 10119                        updateAdvanceScale();
 10120                        break;
 10121                      case r.OPS.setCharSpacing:
 10122                        O.charSpacing = b[0];
 10123                        break;
 10124                      case r.OPS.setWordSpacing:
 10125                        O.wordSpacing = b[0];
 10126                        break;
 10127                      case r.OPS.beginText:
 10128                        O.textMatrix = r.IDENTITY_MATRIX.slice();
 10129                        O.textLineMatrix = r.IDENTITY_MATRIX.slice();
 10130                        break;
 10131                      case r.OPS.showSpacedText:
 10132                        if (!n.state.font) {
 10133                          w.ensureStateFont(n.state);
 10134                          continue;
 10135                        }
 10136                        const f = ((O.font.vertical ? 1 : -1) * O.fontSize) / 1e3,
 10137                          g = b[0];
 10138                        for (let e = 0, t = g.length; e < t; e++) {
 10139                          const t = g[e];
 10140                          if ("string" == typeof t) x.push(t);
 10141                          else if ("number" == typeof t && 0 !== t) {
 10142                            const e = x.join("");
 10143                            x.length = 0;
 10144                            buildTextContentItem({
 10145                              chars: e,
 10146                              extraSpacing: t * f,
 10147                            });
 10148                          }
 10149                        }
 10150                        if (x.length > 0) {
 10151                          const e = x.join("");
 10152                          x.length = 0;
 10153                          buildTextContentItem({ chars: e, extraSpacing: 0 });
 10154                        }
 10155                        break;
 10156                      case r.OPS.showText:
 10157                        if (!n.state.font) {
 10158                          w.ensureStateFont(n.state);
 10159                          continue;
 10160                        }
 10161                        buildTextContentItem({ chars: b[0], extraSpacing: 0 });
 10162                        break;
 10163                      case r.OPS.nextLineShowText:
 10164                        if (!n.state.font) {
 10165                          w.ensureStateFont(n.state);
 10166                          continue;
 10167                        }
 10168                        O.carriageReturn();
 10169                        buildTextContentItem({ chars: b[0], extraSpacing: 0 });
 10170                        break;
 10171                      case r.OPS.nextLineSetSpacingShowText:
 10172                        if (!n.state.font) {
 10173                          w.ensureStateFont(n.state);
 10174                          continue;
 10175                        }
 10176                        O.wordSpacing = b[0];
 10177                        O.charSpacing = b[1];
 10178                        O.carriageReturn();
 10179                        buildTextContentItem({ chars: b[2], extraSpacing: 0 });
 10180                        break;
 10181                      case r.OPS.paintXObject:
 10182                        flushTextContentItem();
 10183                        C || (C = a.get("XObject") || i.Dict.empty);
 10184                        var D = b[0] instanceof i.Name,
 10185                          E = b[0].name;
 10186                        if (D && k.getByName(E)) break;
 10187                        next(
 10188                          new Promise(function (e, d) {
 10189                            if (!D)
 10190                              throw new r.FormatError(
 10191                                "XObject must be referred to by name.",
 10192                              );
 10193                            let f = C.getRaw(E);
 10194                            if (f instanceof i.Ref) {
 10195                              if (k.getByRef(f)) {
 10196                                e();
 10197                                return;
 10198                              }
 10199                              if (w.globalImageCache.getData(f, w.pageIndex)) {
 10200                                e();
 10201                                return;
 10202                              }
 10203                              f = S.fetch(f);
 10204                            }
 10205                            if (!(f instanceof m.BaseStream))
 10206                              throw new r.FormatError(
 10207                                "XObject should be a stream",
 10208                              );
 10209                            const g = f.dict.get("Subtype");
 10210                            if (!(g instanceof i.Name))
 10211                              throw new r.FormatError(
 10212                                "XObject should have a Name subtype",
 10213                              );
 10214                            if ("Form" !== g.name) {
 10215                              k.set(E, f.dict.objId, !0);
 10216                              e();
 10217                              return;
 10218                            }
 10219                            const p = n.state.clone(),
 10220                              b = new StateManager(p),
 10221                              y = f.dict.getArray("Matrix");
 10222                            Array.isArray(y) && 6 === y.length && b.transform(y);
 10223                            enqueueChunk();
 10224                            const x = {
 10225                              enqueueInvoked: !1,
 10226                              enqueue(e, t) {
 10227                                this.enqueueInvoked = !0;
 10228                                o.enqueue(e, t);
 10229                              },
 10230                              get desiredSize() {
 10231                                return o.desiredSize;
 10232                              },
 10233                              get ready() {
 10234                                return o.ready;
 10235                              },
 10236                            };
 10237                            w.getTextContent({
 10238                              stream: f,
 10239                              task: t,
 10240                              resources: f.dict.get("Resources") || a,
 10241                              stateManager: b,
 10242                              includeMarkedContent: s,
 10243                              sink: x,
 10244                              seenStyles: c,
 10245                              viewBox: l,
 10246                              markedContentData: h,
 10247                              disableNormalization: u,
 10248                            }).then(function () {
 10249                              x.enqueueInvoked || k.set(E, f.dict.objId, !0);
 10250                              e();
 10251                            }, d);
 10252                          }).catch(function (e) {
 10253                            if (!(e instanceof r.AbortException)) {
 10254                              if (!w.options.ignoreErrors) throw e;
 10255                              (0, r.warn)(
 10256                                `getTextContent - ignoring XObject: "${e}".`,
 10257                              );
 10258                            }
 10259                          }),
 10260                        );
 10261                        return;
 10262                      case r.OPS.setGState:
 10263                        D = b[0] instanceof i.Name;
 10264                        E = b[0].name;
 10265                        if (D && v.getByName(E)) break;
 10266                        next(
 10267                          new Promise(function (e, t) {
 10268                            if (!D)
 10269                              throw new r.FormatError(
 10270                                "GState must be referred to by name.",
 10271                              );
 10272                            const n = a.get("ExtGState");
 10273                            if (!(n instanceof i.Dict))
 10274                              throw new r.FormatError(
 10275                                "ExtGState should be a dictionary.",
 10276                              );
 10277                            const s = n.get(E);
 10278                            if (!(s instanceof i.Dict))
 10279                              throw new r.FormatError(
 10280                                "GState should be a dictionary.",
 10281                              );
 10282                            const o = s.get("Font");
 10283                            if (o) {
 10284                              flushTextContentItem();
 10285                              O.fontName = null;
 10286                              O.fontSize = o[1];
 10287                              handleSetFont(null, o[0]).then(e, t);
 10288                            } else {
 10289                              v.set(E, s.objId, !0);
 10290                              e();
 10291                            }
 10292                          }).catch(function (e) {
 10293                            if (!(e instanceof r.AbortException)) {
 10294                              if (!w.options.ignoreErrors) throw e;
 10295                              (0, r.warn)(
 10296                                `getTextContent - ignoring ExtGState: "${e}".`,
 10297                              );
 10298                            }
 10299                          }),
 10300                        );
 10301                        return;
 10302                      case r.OPS.beginMarkedContent:
 10303                        flushTextContentItem();
 10304                        if (s) {
 10305                          h.level++;
 10306                          d.items.push({
 10307                            type: "beginMarkedContent",
 10308                            tag: b[0] instanceof i.Name ? b[0].name : null,
 10309                          });
 10310                        }
 10311                        break;
 10312                      case r.OPS.beginMarkedContentProps:
 10313                        flushTextContentItem();
 10314                        if (s) {
 10315                          h.level++;
 10316                          let e = null;
 10317                          b[1] instanceof i.Dict && (e = b[1].get("MCID"));
 10318                          d.items.push({
 10319                            type: "beginMarkedContentProps",
 10320                            id: Number.isInteger(e)
 10321                              ? `${w.idFactory.getPageObjId()}_mc${e}`
 10322                              : null,
 10323                            tag: b[0] instanceof i.Name ? b[0].name : null,
 10324                          });
 10325                        }
 10326                        break;
 10327                      case r.OPS.endMarkedContent:
 10328                        flushTextContentItem();
 10329                        if (s) {
 10330                          if (0 === h.level) break;
 10331                          h.level--;
 10332                          d.items.push({ type: "endMarkedContent" });
 10333                        }
 10334                        break;
 10335                      case r.OPS.restore:
 10336                        !e ||
 10337                          (e.font === O.font &&
 10338                            e.fontSize === O.fontSize &&
 10339                            e.fontName === O.fontName) ||
 10340                          flushTextContentItem();
 10341                    }
 10342                    if (d.items.length >= o.desiredSize) {
 10343                      p = !0;
 10344                      break;
 10345                    }
 10346                  }
 10347                  if (p) next(R);
 10348                  else {
 10349                    flushTextContentItem();
 10350                    enqueueChunk();
 10351                    e();
 10352                  }
 10353                }).catch((e) => {
 10354                  if (!(e instanceof r.AbortException)) {
 10355                    if (!this.options.ignoreErrors) throw e;
 10356                    (0, r.warn)(
 10357                      `getTextContent - ignoring errors during "${t.name}" task: "${e}".`,
 10358                    );
 10359                    flushTextContentItem();
 10360                    enqueueChunk();
 10361                  }
 10362                });
 10363              }
 10364              extractDataStructures(e, t, a) {
 10365                const n = this.xref;
 10366                let s;
 10367                const l = this.readToUnicode(
 10368                  a.toUnicode || e.get("ToUnicode") || t.get("ToUnicode"),
 10369                );
 10370                if (a.composite) {
 10371                  const t = e.get("CIDSystemInfo");
 10372                  t instanceof i.Dict &&
 10373                    (a.cidSystemInfo = {
 10374                      registry: (0, r.stringToPDFString)(t.get("Registry")),
 10375                      ordering: (0, r.stringToPDFString)(t.get("Ordering")),
 10376                      supplement: t.get("Supplement"),
 10377                    });
 10378                  try {
 10379                    const t = e.get("CIDToGIDMap");
 10380                    t instanceof m.BaseStream && (s = t.getBytes());
 10381                  } catch (e) {
 10382                    if (!this.options.ignoreErrors) throw e;
 10383                    (0, r.warn)(
 10384                      `extractDataStructures - ignoring CIDToGIDMap data: "${e}".`,
 10385                    );
 10386                  }
 10387                }
 10388                const h = [];
 10389                let u,
 10390                  d = null;
 10391                if (e.has("Encoding")) {
 10392                  u = e.get("Encoding");
 10393                  if (u instanceof i.Dict) {
 10394                    d = u.get("BaseEncoding");
 10395                    d = d instanceof i.Name ? d.name : null;
 10396                    if (u.has("Differences")) {
 10397                      const e = u.get("Differences");
 10398                      let t = 0;
 10399                      for (const a of e) {
 10400                        const e = n.fetchIfRef(a);
 10401                        if ("number" == typeof e) t = e;
 10402                        else {
 10403                          if (!(e instanceof i.Name))
 10404                            throw new r.FormatError(
 10405                              `Invalid entry in 'Differences' array: ${e}`,
 10406                            );
 10407                          h[t++] = e.name;
 10408                        }
 10409                      }
 10410                    }
 10411                  } else if (u instanceof i.Name) d = u.name;
 10412                  else {
 10413                    const e = "Encoding is not a Name nor a Dict";
 10414                    if (!this.options.ignoreErrors) throw new r.FormatError(e);
 10415                    (0, r.warn)(e);
 10416                  }
 10417                  "MacRomanEncoding" !== d &&
 10418                    "MacExpertEncoding" !== d &&
 10419                    "WinAnsiEncoding" !== d &&
 10420                    (d = null);
 10421                }
 10422                const f = !a.file || a.isInternalFont,
 10423                  g = (0, c.getSymbolsFonts)()[a.name];
 10424                d && f && g && (d = null);
 10425                if (d) a.defaultEncoding = (0, o.getEncoding)(d);
 10426                else {
 10427                  const e = !!(a.flags & S.FontFlags.Symbolic),
 10428                    t = !!(a.flags & S.FontFlags.Nonsymbolic);
 10429                  u = o.StandardEncoding;
 10430                  "TrueType" !== a.type || t || (u = o.WinAnsiEncoding);
 10431                  if (e || g) {
 10432                    u = o.MacRomanEncoding;
 10433                    f &&
 10434                      (/Symbol/i.test(a.name)
 10435                        ? (u = o.SymbolSetEncoding)
 10436                        : /Dingbats/i.test(a.name)
 10437                          ? (u = o.ZapfDingbatsEncoding)
 10438                          : /Wingdings/i.test(a.name) && (u = o.WinAnsiEncoding));
 10439                  }
 10440                  a.defaultEncoding = u;
 10441                }
 10442                a.differences = h;
 10443                a.baseEncodingName = d;
 10444                a.hasEncoding = !!d || h.length > 0;
 10445                a.dict = e;
 10446                return l
 10447                  .then((e) => {
 10448                    a.toUnicode = e;
 10449                    return this.buildToUnicode(a);
 10450                  })
 10451                  .then((e) => {
 10452                    a.toUnicode = e;
 10453                    s && (a.cidToGidMap = this.readCidToGidMap(s, e));
 10454                    return a;
 10455                  });
 10456              }
 10457              _simpleFontToUnicode(e, t = !1) {
 10458                (0, r.assert)(!e.composite, "Must be a simple font.");
 10459                const a = [],
 10460                  n = e.defaultEncoding.slice(),
 10461                  i = e.baseEncodingName,
 10462                  s = e.differences;
 10463                for (const e in s) {
 10464                  const t = s[e];
 10465                  ".notdef" !== t && (n[e] = t);
 10466                }
 10467                const c = (0, C.getGlyphsUnicode)();
 10468                for (const r in n) {
 10469                  let s = n[r];
 10470                  if ("" === s) continue;
 10471                  let l = c[s];
 10472                  if (void 0 !== l) {
 10473                    a[r] = String.fromCharCode(l);
 10474                    continue;
 10475                  }
 10476                  let h = 0;
 10477                  switch (s[0]) {
 10478                    case "G":
 10479                      3 === s.length && (h = parseInt(s.substring(1), 16));
 10480                      break;
 10481                    case "g":
 10482                      5 === s.length && (h = parseInt(s.substring(1), 16));
 10483                      break;
 10484                    case "C":
 10485                    case "c":
 10486                      if (s.length >= 3 && s.length <= 4) {
 10487                        const a = s.substring(1);
 10488                        if (t) {
 10489                          h = parseInt(a, 16);
 10490                          break;
 10491                        }
 10492                        h = +a;
 10493                        if (Number.isNaN(h) && Number.isInteger(parseInt(a, 16)))
 10494                          return this._simpleFontToUnicode(e, !0);
 10495                      }
 10496                      break;
 10497                    case "u":
 10498                      l = (0, v.getUnicodeForGlyph)(s, c);
 10499                      -1 !== l && (h = l);
 10500                      break;
 10501                    default:
 10502                      switch (s) {
 10503                        case "f_h":
 10504                        case "f_t":
 10505                        case "T_h":
 10506                          a[r] = s.replaceAll("_", "");
 10507                          continue;
 10508                      }
 10509                  }
 10510                  if (h > 0 && h <= 1114111 && Number.isInteger(h)) {
 10511                    if (i && h === +r) {
 10512                      const e = (0, o.getEncoding)(i);
 10513                      if (e && (s = e[r])) {
 10514                        a[r] = String.fromCharCode(c[s]);
 10515                        continue;
 10516                      }
 10517                    }
 10518                    a[r] = String.fromCodePoint(h);
 10519                  }
 10520                }
 10521                return a;
 10522              }
 10523              async buildToUnicode(e) {
 10524                e.hasIncludedToUnicodeMap = e.toUnicode?.length > 0;
 10525                if (e.hasIncludedToUnicodeMap) {
 10526                  !e.composite &&
 10527                    e.hasEncoding &&
 10528                    (e.fallbackToUnicode = this._simpleFontToUnicode(e));
 10529                  return e.toUnicode;
 10530                }
 10531                if (!e.composite)
 10532                  return new u.ToUnicodeMap(this._simpleFontToUnicode(e));
 10533                if (
 10534                  e.composite &&
 10535                  ((e.cMap.builtInCMap && !(e.cMap instanceof n.IdentityCMap)) ||
 10536                    ("Adobe" === e.cidSystemInfo.registry &&
 10537                      ("GB1" === e.cidSystemInfo.ordering ||
 10538                        "CNS1" === e.cidSystemInfo.ordering ||
 10539                        "Japan1" === e.cidSystemInfo.ordering ||
 10540                        "Korea1" === e.cidSystemInfo.ordering)))
 10541                ) {
 10542                  const { registry: t, ordering: a } = e.cidSystemInfo,
 10543                    s = i.Name.get(`${t}-${a}-UCS2`),
 10544                    o = await n.CMapFactory.create({
 10545                      encoding: s,
 10546                      fetchBuiltInCMap: this._fetchBuiltInCMapBound,
 10547                      useCMap: null,
 10548                    }),
 10549                    c = [],
 10550                    l = [];
 10551                  e.cMap.forEach(function (e, t) {
 10552                    if (t > 65535)
 10553                      throw new r.FormatError("Max size of CID is 65,535");
 10554                    const a = o.lookup(t);
 10555                    if (a) {
 10556                      l.length = 0;
 10557                      for (let e = 0, t = a.length; e < t; e += 2)
 10558                        l.push((a.charCodeAt(e) << 8) + a.charCodeAt(e + 1));
 10559                      c[e] = String.fromCharCode(...l);
 10560                    }
 10561                  });
 10562                  return new u.ToUnicodeMap(c);
 10563                }
 10564                return new u.IdentityToUnicodeMap(e.firstChar, e.lastChar);
 10565              }
 10566              readToUnicode(e) {
 10567                return e
 10568                  ? e instanceof i.Name
 10569                    ? n.CMapFactory.create({
 10570                        encoding: e,
 10571                        fetchBuiltInCMap: this._fetchBuiltInCMapBound,
 10572                        useCMap: null,
 10573                      }).then(function (e) {
 10574                        return e instanceof n.IdentityCMap
 10575                          ? new u.IdentityToUnicodeMap(0, 65535)
 10576                          : new u.ToUnicodeMap(e.getMap());
 10577                      })
 10578                    : e instanceof m.BaseStream
 10579                      ? n.CMapFactory.create({
 10580                          encoding: e,
 10581                          fetchBuiltInCMap: this._fetchBuiltInCMapBound,
 10582                          useCMap: null,
 10583                        }).then(
 10584                          function (e) {
 10585                            if (e instanceof n.IdentityCMap)
 10586                              return new u.IdentityToUnicodeMap(0, 65535);
 10587                            const t = new Array(e.length);
 10588                            e.forEach(function (e, a) {
 10589                              if ("number" == typeof a) {
 10590                                t[e] = String.fromCodePoint(a);
 10591                                return;
 10592                              }
 10593                              const r = [];
 10594                              for (let e = 0; e < a.length; e += 2) {
 10595                                const t =
 10596                                  (a.charCodeAt(e) << 8) | a.charCodeAt(e + 1);
 10597                                if (55296 != (63488 & t)) {
 10598                                  r.push(t);
 10599                                  continue;
 10600                                }
 10601                                e += 2;
 10602                                const n =
 10603                                  (a.charCodeAt(e) << 8) | a.charCodeAt(e + 1);
 10604                                r.push(((1023 & t) << 10) + (1023 & n) + 65536);
 10605                              }
 10606                              t[e] = String.fromCodePoint(...r);
 10607                            });
 10608                            return new u.ToUnicodeMap(t);
 10609                          },
 10610                          (e) => {
 10611                            if (e instanceof r.AbortException) return null;
 10612                            if (this.options.ignoreErrors) {
 10613                              (0, r.warn)(
 10614                                `readToUnicode - ignoring ToUnicode data: "${e}".`,
 10615                              );
 10616                              return null;
 10617                            }
 10618                            throw e;
 10619                          },
 10620                        )
 10621                      : Promise.resolve(null)
 10622                  : Promise.resolve(null);
 10623              }
 10624              readCidToGidMap(e, t) {
 10625                const a = [];
 10626                for (let r = 0, n = e.length; r < n; r++) {
 10627                  const n = (e[r++] << 8) | e[r],
 10628                    i = r >> 1;
 10629                  (0 !== n || t.has(i)) && (a[i] = n);
 10630                }
 10631                return a;
 10632              }
 10633              extractWidths(e, t, a) {
 10634                const r = this.xref;
 10635                let n = [],
 10636                  s = 0;
 10637                const o = [];
 10638                let c, l, h, u, d, f, g, p;
 10639                if (a.composite) {
 10640                  s = e.has("DW") ? e.get("DW") : 1e3;
 10641                  p = e.get("W");
 10642                  if (p)
 10643                    for (l = 0, h = p.length; l < h; l++) {
 10644                      f = r.fetchIfRef(p[l++]);
 10645                      g = r.fetchIfRef(p[l]);
 10646                      if (Array.isArray(g))
 10647                        for (u = 0, d = g.length; u < d; u++)
 10648                          n[f++] = r.fetchIfRef(g[u]);
 10649                      else {
 10650                        const e = r.fetchIfRef(p[++l]);
 10651                        for (u = f; u <= g; u++) n[u] = e;
 10652                      }
 10653                    }
 10654                  if (a.vertical) {
 10655                    let t = e.getArray("DW2") || [880, -1e3];
 10656                    c = [t[1], 0.5 * s, t[0]];
 10657                    t = e.get("W2");
 10658                    if (t)
 10659                      for (l = 0, h = t.length; l < h; l++) {
 10660                        f = r.fetchIfRef(t[l++]);
 10661                        g = r.fetchIfRef(t[l]);
 10662                        if (Array.isArray(g))
 10663                          for (u = 0, d = g.length; u < d; u++)
 10664                            o[f++] = [
 10665                              r.fetchIfRef(g[u++]),
 10666                              r.fetchIfRef(g[u++]),
 10667                              r.fetchIfRef(g[u]),
 10668                            ];
 10669                        else {
 10670                          const e = [
 10671                            r.fetchIfRef(t[++l]),
 10672                            r.fetchIfRef(t[++l]),
 10673                            r.fetchIfRef(t[++l]),
 10674                          ];
 10675                          for (u = f; u <= g; u++) o[u] = e;
 10676                        }
 10677                      }
 10678                  }
 10679                } else {
 10680                  const o = a.firstChar;
 10681                  p = e.get("Widths");
 10682                  if (p) {
 10683                    u = o;
 10684                    for (l = 0, h = p.length; l < h; l++)
 10685                      n[u++] = r.fetchIfRef(p[l]);
 10686                    s = parseFloat(t.get("MissingWidth")) || 0;
 10687                  } else {
 10688                    const t = e.get("BaseFont");
 10689                    if (t instanceof i.Name) {
 10690                      const e = this.getBaseFontMetrics(t.name);
 10691                      n = this.buildCharCodeToWidth(e.widths, a);
 10692                      s = e.defaultWidth;
 10693                    }
 10694                  }
 10695                }
 10696                let m = !0,
 10697                  b = s;
 10698                for (const e in n) {
 10699                  const t = n[e];
 10700                  if (t)
 10701                    if (b) {
 10702                      if (b !== t) {
 10703                        m = !1;
 10704                        break;
 10705                      }
 10706                    } else b = t;
 10707                }
 10708                m
 10709                  ? (a.flags |= S.FontFlags.FixedPitch)
 10710                  : (a.flags &= ~S.FontFlags.FixedPitch);
 10711                a.defaultWidth = s;
 10712                a.widths = n;
 10713                a.defaultVMetrics = c;
 10714                a.vmetrics = o;
 10715              }
 10716              isSerifFont(e) {
 10717                const t = e.split("-")[0];
 10718                return t in (0, c.getSerifFonts)() || /serif/gi.test(t);
 10719              }
 10720              getBaseFontMetrics(e) {
 10721                let t = 0,
 10722                  a = Object.create(null),
 10723                  r = !1;
 10724                let n = (0, c.getStdFontMap)()[e] || e;
 10725                const i = (0, k.getMetrics)();
 10726                n in i || (n = this.isSerifFont(e) ? "Times-Roman" : "Helvetica");
 10727                const s = i[n];
 10728                if ("number" == typeof s) {
 10729                  t = s;
 10730                  r = !0;
 10731                } else a = s();
 10732                return { defaultWidth: t, monospace: r, widths: a };
 10733              }
 10734              buildCharCodeToWidth(e, t) {
 10735                const a = Object.create(null),
 10736                  r = t.differences,
 10737                  n = t.defaultEncoding;
 10738                for (let t = 0; t < 256; t++)
 10739                  t in r && e[r[t]]
 10740                    ? (a[t] = e[r[t]])
 10741                    : t in n && e[n[t]] && (a[t] = e[n[t]]);
 10742                return a;
 10743              }
 10744              preEvaluateFont(e) {
 10745                const t = e;
 10746                let a = e.get("Subtype");
 10747                if (!(a instanceof i.Name))
 10748                  throw new r.FormatError("invalid font Subtype");
 10749                let n,
 10750                  s,
 10751                  o = !1;
 10752                if ("Type0" === a.name) {
 10753                  const t = e.get("DescendantFonts");
 10754                  if (!t)
 10755                    throw new r.FormatError("Descendant fonts are not specified");
 10756                  if (
 10757                    !(
 10758                      (e = Array.isArray(t)
 10759                        ? this.xref.fetchIfRef(t[0])
 10760                        : t) instanceof i.Dict
 10761                    )
 10762                  )
 10763                    throw new r.FormatError(
 10764                      "Descendant font is not a dictionary.",
 10765                    );
 10766                  a = e.get("Subtype");
 10767                  if (!(a instanceof i.Name))
 10768                    throw new r.FormatError("invalid font Subtype");
 10769                  o = !0;
 10770                }
 10771                const c = e.get("FirstChar") || 0,
 10772                  l = e.get("LastChar") || (o ? 65535 : 255),
 10773                  h = e.get("FontDescriptor");
 10774                if (h) {
 10775                  n = new O.MurmurHash3_64();
 10776                  const a = t.getRaw("Encoding");
 10777                  if (a instanceof i.Name) n.update(a.name);
 10778                  else if (a instanceof i.Ref) n.update(a.toString());
 10779                  else if (a instanceof i.Dict)
 10780                    for (const e of a.getRawValues())
 10781                      if (e instanceof i.Name) n.update(e.name);
 10782                      else if (e instanceof i.Ref) n.update(e.toString());
 10783                      else if (Array.isArray(e)) {
 10784                        const t = e.length,
 10785                          a = new Array(t);
 10786                        for (let r = 0; r < t; r++) {
 10787                          const t = e[r];
 10788                          t instanceof i.Name
 10789                            ? (a[r] = t.name)
 10790                            : ("number" == typeof t || t instanceof i.Ref) &&
 10791                              (a[r] = t.toString());
 10792                        }
 10793                        n.update(a.join());
 10794                      }
 10795                  n.update(`${c}-${l}`);
 10796                  s = e.get("ToUnicode") || t.get("ToUnicode");
 10797                  if (s instanceof m.BaseStream) {
 10798                    const e = s.str || s,
 10799                      t = e.buffer
 10800                        ? new Uint8Array(e.buffer.buffer, 0, e.bufferLength)
 10801                        : new Uint8Array(
 10802                            e.bytes.buffer,
 10803                            e.start,
 10804                            e.end - e.start,
 10805                          );
 10806                    n.update(t);
 10807                  } else s instanceof i.Name && n.update(s.name);
 10808                  const r = e.get("Widths") || t.get("Widths");
 10809                  if (Array.isArray(r)) {
 10810                    const e = [];
 10811                    for (const t of r)
 10812                      ("number" == typeof t || t instanceof i.Ref) &&
 10813                        e.push(t.toString());
 10814                    n.update(e.join());
 10815                  }
 10816                  if (o) {
 10817                    n.update("compositeFont");
 10818                    const a = e.get("W") || t.get("W");
 10819                    if (Array.isArray(a)) {
 10820                      const e = [];
 10821                      for (const t of a)
 10822                        if ("number" == typeof t || t instanceof i.Ref)
 10823                          e.push(t.toString());
 10824                        else if (Array.isArray(t)) {
 10825                          const a = [];
 10826                          for (const e of t)
 10827                            ("number" == typeof e || e instanceof i.Ref) &&
 10828                              a.push(e.toString());
 10829                          e.push(`[${a.join()}]`);
 10830                        }
 10831                      n.update(e.join());
 10832                    }
 10833                    const r = e.getRaw("CIDToGIDMap") || t.getRaw("CIDToGIDMap");
 10834                    r instanceof i.Name
 10835                      ? n.update(r.name)
 10836                      : r instanceof i.Ref
 10837                        ? n.update(r.toString())
 10838                        : r instanceof m.BaseStream && n.update(r.peekBytes());
 10839                  }
 10840                }
 10841                return {
 10842                  descriptor: h,
 10843                  dict: e,
 10844                  baseDict: t,
 10845                  composite: o,
 10846                  type: a.name,
 10847                  firstChar: c,
 10848                  lastChar: l,
 10849                  toUnicode: s,
 10850                  hash: n ? n.hexdigest() : "",
 10851                };
 10852              }
 10853              async translateFont({
 10854                descriptor: e,
 10855                dict: t,
 10856                baseDict: a,
 10857                composite: o,
 10858                type: l,
 10859                firstChar: u,
 10860                lastChar: d,
 10861                toUnicode: f,
 10862                cssFontInfo: g,
 10863              }) {
 10864                const m = "Type3" === l;
 10865                let b;
 10866                if (!e) {
 10867                  if (!m) {
 10868                    let e = t.get("BaseFont");
 10869                    if (!(e instanceof i.Name))
 10870                      throw new r.FormatError("Base font is not specified");
 10871                    e = e.name.replaceAll(/[,_]/g, "-");
 10872                    const n = this.getBaseFontMetrics(e),
 10873                      o = e.split("-")[0],
 10874                      h =
 10875                        (this.isSerifFont(o) ? S.FontFlags.Serif : 0) |
 10876                        (n.monospace ? S.FontFlags.FixedPitch : 0) |
 10877                        ((0, c.getSymbolsFonts)()[o]
 10878                          ? S.FontFlags.Symbolic
 10879                          : S.FontFlags.Nonsymbolic);
 10880                    b = {
 10881                      type: l,
 10882                      name: e,
 10883                      loadedName: a.loadedName,
 10884                      systemFontInfo: null,
 10885                      widths: n.widths,
 10886                      defaultWidth: n.defaultWidth,
 10887                      isSimulatedFlags: !0,
 10888                      flags: h,
 10889                      firstChar: u,
 10890                      lastChar: d,
 10891                      toUnicode: f,
 10892                      xHeight: 0,
 10893                      capHeight: 0,
 10894                      italicAngle: 0,
 10895                      isType3Font: m,
 10896                    };
 10897                    const g = t.get("Widths"),
 10898                      p = (0, c.getStandardFontName)(e);
 10899                    let y = null;
 10900                    if (p) {
 10901                      y = await this.fetchStandardFontData(p);
 10902                      b.isInternalFont = !!y;
 10903                    }
 10904                    !b.isInternalFont &&
 10905                      this.options.useSystemFonts &&
 10906                      (b.systemFontInfo = (0, x.getFontSubstitution)(
 10907                        this.systemFontCache,
 10908                        this.idFactory,
 10909                        this.options.standardFontDataUrl,
 10910                        e,
 10911                        p,
 10912                      ));
 10913                    return this.extractDataStructures(t, t, b).then((t) => {
 10914                      if (g) {
 10915                        const e = [];
 10916                        let a = u;
 10917                        for (const t of g) e[a++] = this.xref.fetchIfRef(t);
 10918                        t.widths = e;
 10919                      } else t.widths = this.buildCharCodeToWidth(n.widths, t);
 10920                      return new s.Font(e, y, t);
 10921                    });
 10922                  }
 10923                  (e = new i.Dict(null)).set("FontName", i.Name.get(l));
 10924                  e.set("FontBBox", t.getArray("FontBBox") || [0, 0, 0, 0]);
 10925                }
 10926                let y = e.get("FontName"),
 10927                  w = t.get("BaseFont");
 10928                "string" == typeof y && (y = i.Name.get(y));
 10929                "string" == typeof w && (w = i.Name.get(w));
 10930                const C = y?.name,
 10931                  k = w?.name;
 10932                if (!m && C !== k) {
 10933                  (0, r.info)(
 10934                    `The FontDescriptor's FontName is "${C}" but should be the same as the Font's BaseFont "${k}".`,
 10935                  );
 10936                  C &&
 10937                    k &&
 10938                    (k.startsWith(C) ||
 10939                      (!(0, c.isKnownFontName)(C) &&
 10940                        (0, c.isKnownFontName)(k))) &&
 10941                    (y = null);
 10942                }
 10943                y ||= w;
 10944                if (!(y instanceof i.Name))
 10945                  throw new r.FormatError("invalid font name");
 10946                let v, F, O, T, M;
 10947                try {
 10948                  v = e.get("FontFile", "FontFile2", "FontFile3");
 10949                } catch (e) {
 10950                  if (!this.options.ignoreErrors) throw e;
 10951                  (0, r.warn)(
 10952                    `translateFont - fetching "${y.name}" font file: "${e}".`,
 10953                  );
 10954                  v = new p.NullStream();
 10955                }
 10956                let D = !1,
 10957                  E = null,
 10958                  N = null;
 10959                if (v) {
 10960                  if (v.dict) {
 10961                    const e = v.dict.get("Subtype");
 10962                    e instanceof i.Name && (F = e.name);
 10963                    O = v.dict.get("Length1");
 10964                    T = v.dict.get("Length2");
 10965                    M = v.dict.get("Length3");
 10966                  }
 10967                } else if (g) {
 10968                  const e = (0, h.getXfaFontName)(y.name);
 10969                  if (e) {
 10970                    g.fontFamily = `${g.fontFamily}-PdfJS-XFA`;
 10971                    g.metrics = e.metrics || null;
 10972                    E = e.factors || null;
 10973                    v = await this.fetchStandardFontData(e.name);
 10974                    D = !!v;
 10975                    a = t = (0, h.getXfaFontDict)(y.name);
 10976                    o = !0;
 10977                  }
 10978                } else if (!m) {
 10979                  const e = (0, c.getStandardFontName)(y.name);
 10980                  if (e) {
 10981                    v = await this.fetchStandardFontData(e);
 10982                    D = !!v;
 10983                  }
 10984                  !D &&
 10985                    this.options.useSystemFonts &&
 10986                    (N = (0, x.getFontSubstitution)(
 10987                      this.systemFontCache,
 10988                      this.idFactory,
 10989                      this.options.standardFontDataUrl,
 10990                      y.name,
 10991                      e,
 10992                    ));
 10993                }
 10994                b = {
 10995                  type: l,
 10996                  name: y.name,
 10997                  subtype: F,
 10998                  file: v,
 10999                  length1: O,
 11000                  length2: T,
 11001                  length3: M,
 11002                  isInternalFont: D,
 11003                  loadedName: a.loadedName,
 11004                  composite: o,
 11005                  fixedPitch: !1,
 11006                  fontMatrix: t.getArray("FontMatrix") || r.FONT_IDENTITY_MATRIX,
 11007                  firstChar: u,
 11008                  lastChar: d,
 11009                  toUnicode: f,
 11010                  bbox: e.getArray("FontBBox") || t.getArray("FontBBox"),
 11011                  ascent: e.get("Ascent"),
 11012                  descent: e.get("Descent"),
 11013                  xHeight: e.get("XHeight") || 0,
 11014                  capHeight: e.get("CapHeight") || 0,
 11015                  flags: e.get("Flags"),
 11016                  italicAngle: e.get("ItalicAngle") || 0,
 11017                  isType3Font: m,
 11018                  cssFontInfo: g,
 11019                  scaleFactors: E,
 11020                  systemFontInfo: N,
 11021                };
 11022                if (o) {
 11023                  const e = a.get("Encoding");
 11024                  e instanceof i.Name && (b.cidEncoding = e.name);
 11025                  const t = await n.CMapFactory.create({
 11026                    encoding: e,
 11027                    fetchBuiltInCMap: this._fetchBuiltInCMapBound,
 11028                    useCMap: null,
 11029                  });
 11030                  b.cMap = t;
 11031                  b.vertical = b.cMap.vertical;
 11032                }
 11033                return this.extractDataStructures(t, a, b).then((a) => {
 11034                  this.extractWidths(t, e, a);
 11035                  return new s.Font(y.name, v, a);
 11036                });
 11037              }
 11038              static buildFontPaths(e, t, a, n) {
 11039                function buildPath(t) {
 11040                  const i = `${e.loadedName}_path_${t}`;
 11041                  try {
 11042                    if (e.renderer.hasBuiltPath(t)) return;
 11043                    a.send("commonobj", [i, "FontPath", e.renderer.getPathJs(t)]);
 11044                  } catch (e) {
 11045                    if (n.ignoreErrors) {
 11046                      (0, r.warn)(
 11047                        `buildFontPaths - ignoring ${i} glyph: "${e}".`,
 11048                      );
 11049                      return;
 11050                    }
 11051                    throw e;
 11052                  }
 11053                }
 11054                for (const e of t) {
 11055                  buildPath(e.fontChar);
 11056                  const t = e.accent;
 11057                  t?.fontChar && buildPath(t.fontChar);
 11058                }
 11059              }
 11060              static get fallbackFontDict() {
 11061                const e = new i.Dict();
 11062                e.set("BaseFont", i.Name.get("Helvetica"));
 11063                e.set("Type", i.Name.get("FallbackType"));
 11064                e.set("Subtype", i.Name.get("FallbackType"));
 11065                e.set("Encoding", i.Name.get("WinAnsiEncoding"));
 11066                return (0, r.shadow)(this, "fallbackFontDict", e);
 11067              }
 11068            }
 11069            t.PartialEvaluator = PartialEvaluator;
 11070            class TranslatedFont {
 11071              constructor({
 11072                loadedName: e,
 11073                font: t,
 11074                dict: a,
 11075                evaluatorOptions: r,
 11076              }) {
 11077                this.loadedName = e;
 11078                this.font = t;
 11079                this.dict = a;
 11080                this._evaluatorOptions = r || D;
 11081                this.type3Loaded = null;
 11082                this.type3Dependencies = t.isType3Font ? new Set() : null;
 11083                this.sent = !1;
 11084              }
 11085              send(e) {
 11086                if (!this.sent) {
 11087                  this.sent = !0;
 11088                  e.send("commonobj", [
 11089                    this.loadedName,
 11090                    "Font",
 11091                    this.font.exportData(
 11092                      this._evaluatorOptions.fontExtraProperties,
 11093                    ),
 11094                  ]);
 11095                }
 11096              }
 11097              fallback(e) {
 11098                if (this.font.data) {
 11099                  this.font.disableFontFace = !0;
 11100                  PartialEvaluator.buildFontPaths(
 11101                    this.font,
 11102                    this.font.glyphCacheValues,
 11103                    e,
 11104                    this._evaluatorOptions,
 11105                  );
 11106                }
 11107              }
 11108              loadType3Data(e, t, a) {
 11109                if (this.type3Loaded) return this.type3Loaded;
 11110                if (!this.font.isType3Font)
 11111                  throw new Error("Must be a Type3 font.");
 11112                const n = e.clone({ ignoreErrors: !1 });
 11113                n.parsingType3Font = !0;
 11114                const s = new i.RefSet(e.type3FontRefs);
 11115                this.dict.objId &&
 11116                  !s.has(this.dict.objId) &&
 11117                  s.put(this.dict.objId);
 11118                n.type3FontRefs = s;
 11119                const o = this.font,
 11120                  c = this.type3Dependencies;
 11121                let l = Promise.resolve();
 11122                const h = this.dict.get("CharProcs"),
 11123                  u = this.dict.get("Resources") || t,
 11124                  d = Object.create(null),
 11125                  f = r.Util.normalizeRect(o.bbox || [0, 0, 0, 0]),
 11126                  g = f[2] - f[0],
 11127                  p = f[3] - f[1],
 11128                  m = Math.hypot(g, p);
 11129                for (const e of h.getKeys())
 11130                  l = l.then(() => {
 11131                    const t = h.get(e),
 11132                      i = new T.OperatorList();
 11133                    return n
 11134                      .getOperatorList({
 11135                        stream: t,
 11136                        task: a,
 11137                        resources: u,
 11138                        operatorList: i,
 11139                      })
 11140                      .then(() => {
 11141                        i.fnArray[0] === r.OPS.setCharWidthAndBounds &&
 11142                          this._removeType3ColorOperators(i, m);
 11143                        d[e] = i.getIR();
 11144                        for (const e of i.dependencies) c.add(e);
 11145                      })
 11146                      .catch(function (t) {
 11147                        (0, r.warn)(
 11148                          `Type3 font resource "${e}" is not available.`,
 11149                        );
 11150                        const a = new T.OperatorList();
 11151                        d[e] = a.getIR();
 11152                      });
 11153                  });
 11154                this.type3Loaded = l.then(() => {
 11155                  o.charProcOperatorList = d;
 11156                  if (this._bbox) {
 11157                    o.isCharBBox = !0;
 11158                    o.bbox = this._bbox;
 11159                  }
 11160                });
 11161                return this.type3Loaded;
 11162              }
 11163              _removeType3ColorOperators(e, t = NaN) {
 11164                const a = r.Util.normalizeRect(e.argsArray[0].slice(2)),
 11165                  n = a[2] - a[0],
 11166                  i = a[3] - a[1],
 11167                  s = Math.hypot(n, i);
 11168                if (0 === n || 0 === i) {
 11169                  e.fnArray.splice(0, 1);
 11170                  e.argsArray.splice(0, 1);
 11171                } else if (0 === t || Math.round(s / t) >= 10) {
 11172                  this._bbox || (this._bbox = [1 / 0, 1 / 0, -1 / 0, -1 / 0]);
 11173                  this._bbox[0] = Math.min(this._bbox[0], a[0]);
 11174                  this._bbox[1] = Math.min(this._bbox[1], a[1]);
 11175                  this._bbox[2] = Math.max(this._bbox[2], a[2]);
 11176                  this._bbox[3] = Math.max(this._bbox[3], a[3]);
 11177                }
 11178                let o = 0,
 11179                  c = e.length;
 11180                for (; o < c; ) {
 11181                  switch (e.fnArray[o]) {
 11182                    case r.OPS.setCharWidthAndBounds:
 11183                      break;
 11184                    case r.OPS.setStrokeColorSpace:
 11185                    case r.OPS.setFillColorSpace:
 11186                    case r.OPS.setStrokeColor:
 11187                    case r.OPS.setStrokeColorN:
 11188                    case r.OPS.setFillColor:
 11189                    case r.OPS.setFillColorN:
 11190                    case r.OPS.setStrokeGray:
 11191                    case r.OPS.setFillGray:
 11192                    case r.OPS.setStrokeRGBColor:
 11193                    case r.OPS.setFillRGBColor:
 11194                    case r.OPS.setStrokeCMYKColor:
 11195                    case r.OPS.setFillCMYKColor:
 11196                    case r.OPS.shadingFill:
 11197                    case r.OPS.setRenderingIntent:
 11198                      e.fnArray.splice(o, 1);
 11199                      e.argsArray.splice(o, 1);
 11200                      c--;
 11201                      continue;
 11202                    case r.OPS.setGState:
 11203                      const [t] = e.argsArray[o];
 11204                      let a = 0,
 11205                        n = t.length;
 11206                      for (; a < n; ) {
 11207                        const [e] = t[a];
 11208                        switch (e) {
 11209                          case "TR":
 11210                          case "TR2":
 11211                          case "HT":
 11212                          case "BG":
 11213                          case "BG2":
 11214                          case "UCR":
 11215                          case "UCR2":
 11216                            t.splice(a, 1);
 11217                            n--;
 11218                            continue;
 11219                        }
 11220                        a++;
 11221                      }
 11222                  }
 11223                  o++;
 11224                }
 11225              }
 11226            }
 11227            class StateManager {
 11228              constructor(e = new EvalState()) {
 11229                this.state = e;
 11230                this.stateStack = [];
 11231              }
 11232              save() {
 11233                const e = this.state;
 11234                this.stateStack.push(this.state);
 11235                this.state = e.clone();
 11236              }
 11237              restore() {
 11238                const e = this.stateStack.pop();
 11239                e && (this.state = e);
 11240              }
 11241              transform(e) {
 11242                this.state.ctm = r.Util.transform(this.state.ctm, e);
 11243              }
 11244            }
 11245            class TextState {
 11246              constructor() {
 11247                this.ctm = new Float32Array(r.IDENTITY_MATRIX);
 11248                this.fontName = null;
 11249                this.fontSize = 0;
 11250                this.loadedName = null;
 11251                this.font = null;
 11252                this.fontMatrix = r.FONT_IDENTITY_MATRIX;
 11253                this.textMatrix = r.IDENTITY_MATRIX.slice();
 11254                this.textLineMatrix = r.IDENTITY_MATRIX.slice();
 11255                this.charSpacing = 0;
 11256                this.wordSpacing = 0;
 11257                this.leading = 0;
 11258                this.textHScale = 1;
 11259                this.textRise = 0;
 11260              }
 11261              setTextMatrix(e, t, a, r, n, i) {
 11262                const s = this.textMatrix;
 11263                s[0] = e;
 11264                s[1] = t;
 11265                s[2] = a;
 11266                s[3] = r;
 11267                s[4] = n;
 11268                s[5] = i;
 11269              }
 11270              setTextLineMatrix(e, t, a, r, n, i) {
 11271                const s = this.textLineMatrix;
 11272                s[0] = e;
 11273                s[1] = t;
 11274                s[2] = a;
 11275                s[3] = r;
 11276                s[4] = n;
 11277                s[5] = i;
 11278              }
 11279              translateTextMatrix(e, t) {
 11280                const a = this.textMatrix;
 11281                a[4] = a[0] * e + a[2] * t + a[4];
 11282                a[5] = a[1] * e + a[3] * t + a[5];
 11283              }
 11284              translateTextLineMatrix(e, t) {
 11285                const a = this.textLineMatrix;
 11286                a[4] = a[0] * e + a[2] * t + a[4];
 11287                a[5] = a[1] * e + a[3] * t + a[5];
 11288              }
 11289              carriageReturn() {
 11290                this.translateTextLineMatrix(0, -this.leading);
 11291                this.textMatrix = this.textLineMatrix.slice();
 11292              }
 11293              clone() {
 11294                const e = Object.create(this);
 11295                e.textMatrix = this.textMatrix.slice();
 11296                e.textLineMatrix = this.textLineMatrix.slice();
 11297                e.fontMatrix = this.fontMatrix.slice();
 11298                return e;
 11299              }
 11300            }
 11301            class EvalState {
 11302              constructor() {
 11303                this.ctm = new Float32Array(r.IDENTITY_MATRIX);
 11304                this.font = null;
 11305                this.textRenderingMode = r.TextRenderingMode.FILL;
 11306                this.fillColorSpace = y.ColorSpace.singletons.gray;
 11307                this.strokeColorSpace = y.ColorSpace.singletons.gray;
 11308              }
 11309              clone() {
 11310                return Object.create(this);
 11311              }
 11312            }
 11313            class EvaluatorPreprocessor {
 11314              static get opMap() {
 11315                return (0, r.shadow)(this, "opMap", {
 11316                  w: { id: r.OPS.setLineWidth, numArgs: 1, variableArgs: !1 },
 11317                  J: { id: r.OPS.setLineCap, numArgs: 1, variableArgs: !1 },
 11318                  j: { id: r.OPS.setLineJoin, numArgs: 1, variableArgs: !1 },
 11319                  M: { id: r.OPS.setMiterLimit, numArgs: 1, variableArgs: !1 },
 11320                  d: { id: r.OPS.setDash, numArgs: 2, variableArgs: !1 },
 11321                  ri: {
 11322                    id: r.OPS.setRenderingIntent,
 11323                    numArgs: 1,
 11324                    variableArgs: !1,
 11325                  },
 11326                  i: { id: r.OPS.setFlatness, numArgs: 1, variableArgs: !1 },
 11327                  gs: { id: r.OPS.setGState, numArgs: 1, variableArgs: !1 },
 11328                  q: { id: r.OPS.save, numArgs: 0, variableArgs: !1 },
 11329                  Q: { id: r.OPS.restore, numArgs: 0, variableArgs: !1 },
 11330                  cm: { id: r.OPS.transform, numArgs: 6, variableArgs: !1 },
 11331                  m: { id: r.OPS.moveTo, numArgs: 2, variableArgs: !1 },
 11332                  l: { id: r.OPS.lineTo, numArgs: 2, variableArgs: !1 },
 11333                  c: { id: r.OPS.curveTo, numArgs: 6, variableArgs: !1 },
 11334                  v: { id: r.OPS.curveTo2, numArgs: 4, variableArgs: !1 },
 11335                  y: { id: r.OPS.curveTo3, numArgs: 4, variableArgs: !1 },
 11336                  h: { id: r.OPS.closePath, numArgs: 0, variableArgs: !1 },
 11337                  re: { id: r.OPS.rectangle, numArgs: 4, variableArgs: !1 },
 11338                  S: { id: r.OPS.stroke, numArgs: 0, variableArgs: !1 },
 11339                  s: { id: r.OPS.closeStroke, numArgs: 0, variableArgs: !1 },
 11340                  f: { id: r.OPS.fill, numArgs: 0, variableArgs: !1 },
 11341                  F: { id: r.OPS.fill, numArgs: 0, variableArgs: !1 },
 11342                  "f*": { id: r.OPS.eoFill, numArgs: 0, variableArgs: !1 },
 11343                  B: { id: r.OPS.fillStroke, numArgs: 0, variableArgs: !1 },
 11344                  "B*": { id: r.OPS.eoFillStroke, numArgs: 0, variableArgs: !1 },
 11345                  b: { id: r.OPS.closeFillStroke, numArgs: 0, variableArgs: !1 },
 11346                  "b*": {
 11347                    id: r.OPS.closeEOFillStroke,
 11348                    numArgs: 0,
 11349                    variableArgs: !1,
 11350                  },
 11351                  n: { id: r.OPS.endPath, numArgs: 0, variableArgs: !1 },
 11352                  W: { id: r.OPS.clip, numArgs: 0, variableArgs: !1 },
 11353                  "W*": { id: r.OPS.eoClip, numArgs: 0, variableArgs: !1 },
 11354                  BT: { id: r.OPS.beginText, numArgs: 0, variableArgs: !1 },
 11355                  ET: { id: r.OPS.endText, numArgs: 0, variableArgs: !1 },
 11356                  Tc: { id: r.OPS.setCharSpacing, numArgs: 1, variableArgs: !1 },
 11357                  Tw: { id: r.OPS.setWordSpacing, numArgs: 1, variableArgs: !1 },
 11358                  Tz: { id: r.OPS.setHScale, numArgs: 1, variableArgs: !1 },
 11359                  TL: { id: r.OPS.setLeading, numArgs: 1, variableArgs: !1 },
 11360                  Tf: { id: r.OPS.setFont, numArgs: 2, variableArgs: !1 },
 11361                  Tr: {
 11362                    id: r.OPS.setTextRenderingMode,
 11363                    numArgs: 1,
 11364                    variableArgs: !1,
 11365                  },
 11366                  Ts: { id: r.OPS.setTextRise, numArgs: 1, variableArgs: !1 },
 11367                  Td: { id: r.OPS.moveText, numArgs: 2, variableArgs: !1 },
 11368                  TD: {
 11369                    id: r.OPS.setLeadingMoveText,
 11370                    numArgs: 2,
 11371                    variableArgs: !1,
 11372                  },
 11373                  Tm: { id: r.OPS.setTextMatrix, numArgs: 6, variableArgs: !1 },
 11374                  "T*": { id: r.OPS.nextLine, numArgs: 0, variableArgs: !1 },
 11375                  Tj: { id: r.OPS.showText, numArgs: 1, variableArgs: !1 },
 11376                  TJ: { id: r.OPS.showSpacedText, numArgs: 1, variableArgs: !1 },
 11377                  "'": {
 11378                    id: r.OPS.nextLineShowText,
 11379                    numArgs: 1,
 11380                    variableArgs: !1,
 11381                  },
 11382                  '"': {
 11383                    id: r.OPS.nextLineSetSpacingShowText,
 11384                    numArgs: 3,
 11385                    variableArgs: !1,
 11386                  },
 11387                  d0: { id: r.OPS.setCharWidth, numArgs: 2, variableArgs: !1 },
 11388                  d1: {
 11389                    id: r.OPS.setCharWidthAndBounds,
 11390                    numArgs: 6,
 11391                    variableArgs: !1,
 11392                  },
 11393                  CS: {
 11394                    id: r.OPS.setStrokeColorSpace,
 11395                    numArgs: 1,
 11396                    variableArgs: !1,
 11397                  },
 11398                  cs: {
 11399                    id: r.OPS.setFillColorSpace,
 11400                    numArgs: 1,
 11401                    variableArgs: !1,
 11402                  },
 11403                  SC: { id: r.OPS.setStrokeColor, numArgs: 4, variableArgs: !0 },
 11404                  SCN: {
 11405                    id: r.OPS.setStrokeColorN,
 11406                    numArgs: 33,
 11407                    variableArgs: !0,
 11408                  },
 11409                  sc: { id: r.OPS.setFillColor, numArgs: 4, variableArgs: !0 },
 11410                  scn: { id: r.OPS.setFillColorN, numArgs: 33, variableArgs: !0 },
 11411                  G: { id: r.OPS.setStrokeGray, numArgs: 1, variableArgs: !1 },
 11412                  g: { id: r.OPS.setFillGray, numArgs: 1, variableArgs: !1 },
 11413                  RG: {
 11414                    id: r.OPS.setStrokeRGBColor,
 11415                    numArgs: 3,
 11416                    variableArgs: !1,
 11417                  },
 11418                  rg: { id: r.OPS.setFillRGBColor, numArgs: 3, variableArgs: !1 },
 11419                  K: {
 11420                    id: r.OPS.setStrokeCMYKColor,
 11421                    numArgs: 4,
 11422                    variableArgs: !1,
 11423                  },
 11424                  k: { id: r.OPS.setFillCMYKColor, numArgs: 4, variableArgs: !1 },
 11425                  sh: { id: r.OPS.shadingFill, numArgs: 1, variableArgs: !1 },
 11426                  BI: {
 11427                    id: r.OPS.beginInlineImage,
 11428                    numArgs: 0,
 11429                    variableArgs: !1,
 11430                  },
 11431                  ID: { id: r.OPS.beginImageData, numArgs: 0, variableArgs: !1 },
 11432                  EI: { id: r.OPS.endInlineImage, numArgs: 1, variableArgs: !1 },
 11433                  Do: { id: r.OPS.paintXObject, numArgs: 1, variableArgs: !1 },
 11434                  MP: { id: r.OPS.markPoint, numArgs: 1, variableArgs: !1 },
 11435                  DP: { id: r.OPS.markPointProps, numArgs: 2, variableArgs: !1 },
 11436                  BMC: {
 11437                    id: r.OPS.beginMarkedContent,
 11438                    numArgs: 1,
 11439                    variableArgs: !1,
 11440                  },
 11441                  BDC: {
 11442                    id: r.OPS.beginMarkedContentProps,
 11443                    numArgs: 2,
 11444                    variableArgs: !1,
 11445                  },
 11446                  EMC: {
 11447                    id: r.OPS.endMarkedContent,
 11448                    numArgs: 0,
 11449                    variableArgs: !1,
 11450                  },
 11451                  BX: { id: r.OPS.beginCompat, numArgs: 0, variableArgs: !1 },
 11452                  EX: { id: r.OPS.endCompat, numArgs: 0, variableArgs: !1 },
 11453                  BM: null,
 11454                  BD: null,
 11455                  true: null,
 11456                  fa: null,
 11457                  fal: null,
 11458                  fals: null,
 11459                  false: null,
 11460                  nu: null,
 11461                  nul: null,
 11462                  null: null,
 11463                });
 11464              }
 11465              static MAX_INVALID_PATH_OPS = 10;
 11466              constructor(e, t, a = new StateManager()) {
 11467                this.parser = new f.Parser({
 11468                  lexer: new f.Lexer(e, EvaluatorPreprocessor.opMap),
 11469                  xref: t,
 11470                });
 11471                this.stateManager = a;
 11472                this.nonProcessedArgs = [];
 11473                this._isPathOp = !1;
 11474                this._numInvalidPathOPS = 0;
 11475              }
 11476              get savedStatesDepth() {
 11477                return this.stateManager.stateStack.length;
 11478              }
 11479              read(e) {
 11480                let t = e.args;
 11481                for (;;) {
 11482                  const a = this.parser.getObj();
 11483                  if (a instanceof i.Cmd) {
 11484                    const n = a.cmd,
 11485                      i = EvaluatorPreprocessor.opMap[n];
 11486                    if (!i) {
 11487                      (0, r.warn)(`Unknown command "${n}".`);
 11488                      continue;
 11489                    }
 11490                    const s = i.id,
 11491                      o = i.numArgs;
 11492                    let c = null !== t ? t.length : 0;
 11493                    this._isPathOp || (this._numInvalidPathOPS = 0);
 11494                    this._isPathOp = s >= r.OPS.moveTo && s <= r.OPS.endPath;
 11495                    if (i.variableArgs)
 11496                      c > o &&
 11497                        (0, r.info)(
 11498                          `Command ${n}: expected [0, ${o}] args, but received ${c} args.`,
 11499                        );
 11500                    else {
 11501                      if (c !== o) {
 11502                        const e = this.nonProcessedArgs;
 11503                        for (; c > o; ) {
 11504                          e.push(t.shift());
 11505                          c--;
 11506                        }
 11507                        for (; c < o && 0 !== e.length; ) {
 11508                          null === t && (t = []);
 11509                          t.unshift(e.pop());
 11510                          c++;
 11511                        }
 11512                      }
 11513                      if (c < o) {
 11514                        const e = `command ${n}: expected ${o} args, but received ${c} args.`;
 11515                        if (
 11516                          this._isPathOp &&
 11517                          ++this._numInvalidPathOPS >
 11518                            EvaluatorPreprocessor.MAX_INVALID_PATH_OPS
 11519                        )
 11520                          throw new r.FormatError(`Invalid ${e}`);
 11521                        (0, r.warn)(`Skipping ${e}`);
 11522                        null !== t && (t.length = 0);
 11523                        continue;
 11524                      }
 11525                    }
 11526                    this.preprocessCommand(s, t);
 11527                    e.fn = s;
 11528                    e.args = t;
 11529                    return !0;
 11530                  }
 11531                  if (a === i.EOF) return !1;
 11532                  if (null !== a) {
 11533                    null === t && (t = []);
 11534                    t.push(a);
 11535                    if (t.length > 33)
 11536                      throw new r.FormatError("Too many arguments");
 11537                  }
 11538                }
 11539              }
 11540              preprocessCommand(e, t) {
 11541                switch (0 | e) {
 11542                  case r.OPS.save:
 11543                    this.stateManager.save();
 11544                    break;
 11545                  case r.OPS.restore:
 11546                    this.stateManager.restore();
 11547                    break;
 11548                  case r.OPS.transform:
 11549                    this.stateManager.transform(t);
 11550                }
 11551              }
 11552            }
 11553            t.EvaluatorPreprocessor = EvaluatorPreprocessor;
 11554          },
 11555          (e, t, a) => {
 11556            Object.defineProperty(t, "__esModule", { value: !0 });
 11557            t.IdentityCMap = t.CMapFactory = t.CMap = void 0;
 11558            var r = a(2),
 11559              n = a(4),
 11560              i = a(5),
 11561              s = a(15),
 11562              o = a(16),
 11563              c = a(3),
 11564              l = a(8);
 11565            const h = [
 11566                "Adobe-GB1-UCS2",
 11567                "Adobe-CNS1-UCS2",
 11568                "Adobe-Japan1-UCS2",
 11569                "Adobe-Korea1-UCS2",
 11570                "78-EUC-H",
 11571                "78-EUC-V",
 11572                "78-H",
 11573                "78-RKSJ-H",
 11574                "78-RKSJ-V",
 11575                "78-V",
 11576                "78ms-RKSJ-H",
 11577                "78ms-RKSJ-V",
 11578                "83pv-RKSJ-H",
 11579                "90ms-RKSJ-H",
 11580                "90ms-RKSJ-V",
 11581                "90msp-RKSJ-H",
 11582                "90msp-RKSJ-V",
 11583                "90pv-RKSJ-H",
 11584                "90pv-RKSJ-V",
 11585                "Add-H",
 11586                "Add-RKSJ-H",
 11587                "Add-RKSJ-V",
 11588                "Add-V",
 11589                "Adobe-CNS1-0",
 11590                "Adobe-CNS1-1",
 11591                "Adobe-CNS1-2",
 11592                "Adobe-CNS1-3",
 11593                "Adobe-CNS1-4",
 11594                "Adobe-CNS1-5",
 11595                "Adobe-CNS1-6",
 11596                "Adobe-GB1-0",
 11597                "Adobe-GB1-1",
 11598                "Adobe-GB1-2",
 11599                "Adobe-GB1-3",
 11600                "Adobe-GB1-4",
 11601                "Adobe-GB1-5",
 11602                "Adobe-Japan1-0",
 11603                "Adobe-Japan1-1",
 11604                "Adobe-Japan1-2",
 11605                "Adobe-Japan1-3",
 11606                "Adobe-Japan1-4",
 11607                "Adobe-Japan1-5",
 11608                "Adobe-Japan1-6",
 11609                "Adobe-Korea1-0",
 11610                "Adobe-Korea1-1",
 11611                "Adobe-Korea1-2",
 11612                "B5-H",
 11613                "B5-V",
 11614                "B5pc-H",
 11615                "B5pc-V",
 11616                "CNS-EUC-H",
 11617                "CNS-EUC-V",
 11618                "CNS1-H",
 11619                "CNS1-V",
 11620                "CNS2-H",
 11621                "CNS2-V",
 11622                "ETHK-B5-H",
 11623                "ETHK-B5-V",
 11624                "ETen-B5-H",
 11625                "ETen-B5-V",
 11626                "ETenms-B5-H",
 11627                "ETenms-B5-V",
 11628                "EUC-H",
 11629                "EUC-V",
 11630                "Ext-H",
 11631                "Ext-RKSJ-H",
 11632                "Ext-RKSJ-V",
 11633                "Ext-V",
 11634                "GB-EUC-H",
 11635                "GB-EUC-V",
 11636                "GB-H",
 11637                "GB-V",
 11638                "GBK-EUC-H",
 11639                "GBK-EUC-V",
 11640                "GBK2K-H",
 11641                "GBK2K-V",
 11642                "GBKp-EUC-H",
 11643                "GBKp-EUC-V",
 11644                "GBT-EUC-H",
 11645                "GBT-EUC-V",
 11646                "GBT-H",
 11647                "GBT-V",
 11648                "GBTpc-EUC-H",
 11649                "GBTpc-EUC-V",
 11650                "GBpc-EUC-H",
 11651                "GBpc-EUC-V",
 11652                "H",
 11653                "HKdla-B5-H",
 11654                "HKdla-B5-V",
 11655                "HKdlb-B5-H",
 11656                "HKdlb-B5-V",
 11657                "HKgccs-B5-H",
 11658                "HKgccs-B5-V",
 11659                "HKm314-B5-H",
 11660                "HKm314-B5-V",
 11661                "HKm471-B5-H",
 11662                "HKm471-B5-V",
 11663                "HKscs-B5-H",
 11664                "HKscs-B5-V",
 11665                "Hankaku",
 11666                "Hiragana",
 11667                "KSC-EUC-H",
 11668                "KSC-EUC-V",
 11669                "KSC-H",
 11670                "KSC-Johab-H",
 11671                "KSC-Johab-V",
 11672                "KSC-V",
 11673                "KSCms-UHC-H",
 11674                "KSCms-UHC-HW-H",
 11675                "KSCms-UHC-HW-V",
 11676                "KSCms-UHC-V",
 11677                "KSCpc-EUC-H",
 11678                "KSCpc-EUC-V",
 11679                "Katakana",
 11680                "NWP-H",
 11681                "NWP-V",
 11682                "RKSJ-H",
 11683                "RKSJ-V",
 11684                "Roman",
 11685                "UniCNS-UCS2-H",
 11686                "UniCNS-UCS2-V",
 11687                "UniCNS-UTF16-H",
 11688                "UniCNS-UTF16-V",
 11689                "UniCNS-UTF32-H",
 11690                "UniCNS-UTF32-V",
 11691                "UniCNS-UTF8-H",
 11692                "UniCNS-UTF8-V",
 11693                "UniGB-UCS2-H",
 11694                "UniGB-UCS2-V",
 11695                "UniGB-UTF16-H",
 11696                "UniGB-UTF16-V",
 11697                "UniGB-UTF32-H",
 11698                "UniGB-UTF32-V",
 11699                "UniGB-UTF8-H",
 11700                "UniGB-UTF8-V",
 11701                "UniJIS-UCS2-H",
 11702                "UniJIS-UCS2-HW-H",
 11703                "UniJIS-UCS2-HW-V",
 11704                "UniJIS-UCS2-V",
 11705                "UniJIS-UTF16-H",
 11706                "UniJIS-UTF16-V",
 11707                "UniJIS-UTF32-H",
 11708                "UniJIS-UTF32-V",
 11709                "UniJIS-UTF8-H",
 11710                "UniJIS-UTF8-V",
 11711                "UniJIS2004-UTF16-H",
 11712                "UniJIS2004-UTF16-V",
 11713                "UniJIS2004-UTF32-H",
 11714                "UniJIS2004-UTF32-V",
 11715                "UniJIS2004-UTF8-H",
 11716                "UniJIS2004-UTF8-V",
 11717                "UniJISPro-UCS2-HW-V",
 11718                "UniJISPro-UCS2-V",
 11719                "UniJISPro-UTF8-V",
 11720                "UniJISX0213-UTF32-H",
 11721                "UniJISX0213-UTF32-V",
 11722                "UniJISX02132004-UTF32-H",
 11723                "UniJISX02132004-UTF32-V",
 11724                "UniKS-UCS2-H",
 11725                "UniKS-UCS2-V",
 11726                "UniKS-UTF16-H",
 11727                "UniKS-UTF16-V",
 11728                "UniKS-UTF32-H",
 11729                "UniKS-UTF32-V",
 11730                "UniKS-UTF8-H",
 11731                "UniKS-UTF8-V",
 11732                "V",
 11733                "WP-Symbol",
 11734              ],
 11735              u = 2 ** 24 - 1;
 11736            class CMap {
 11737              constructor(e = !1) {
 11738                this.codespaceRanges = [[], [], [], []];
 11739                this.numCodespaceRanges = 0;
 11740                this._map = [];
 11741                this.name = "";
 11742                this.vertical = !1;
 11743                this.useCMap = null;
 11744                this.builtInCMap = e;
 11745              }
 11746              addCodespaceRange(e, t, a) {
 11747                this.codespaceRanges[e - 1].push(t, a);
 11748                this.numCodespaceRanges++;
 11749              }
 11750              mapCidRange(e, t, a) {
 11751                if (t - e > u)
 11752                  throw new Error(
 11753                    "mapCidRange - ignoring data above MAX_MAP_RANGE.",
 11754                  );
 11755                for (; e <= t; ) this._map[e++] = a++;
 11756              }
 11757              mapBfRange(e, t, a) {
 11758                if (t - e > u)
 11759                  throw new Error(
 11760                    "mapBfRange - ignoring data above MAX_MAP_RANGE.",
 11761                  );
 11762                const r = a.length - 1;
 11763                for (; e <= t; ) {
 11764                  this._map[e++] = a;
 11765                  const t = a.charCodeAt(r) + 1;
 11766                  t > 255
 11767                    ? (a =
 11768                        a.substring(0, r - 1) +
 11769                        String.fromCharCode(a.charCodeAt(r - 1) + 1) +
 11770                        "\0")
 11771                    : (a = a.substring(0, r) + String.fromCharCode(t));
 11772                }
 11773              }
 11774              mapBfRangeToArray(e, t, a) {
 11775                if (t - e > u)
 11776                  throw new Error(
 11777                    "mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.",
 11778                  );
 11779                const r = a.length;
 11780                let n = 0;
 11781                for (; e <= t && n < r; ) {
 11782                  this._map[e] = a[n++];
 11783                  ++e;
 11784                }
 11785              }
 11786              mapOne(e, t) {
 11787                this._map[e] = t;
 11788              }
 11789              lookup(e) {
 11790                return this._map[e];
 11791              }
 11792              contains(e) {
 11793                return void 0 !== this._map[e];
 11794              }
 11795              forEach(e) {
 11796                const t = this._map,
 11797                  a = t.length;
 11798                if (a <= 65536)
 11799                  for (let r = 0; r < a; r++) void 0 !== t[r] && e(r, t[r]);
 11800                else for (const a in t) e(a, t[a]);
 11801              }
 11802              charCodeOf(e) {
 11803                const t = this._map;
 11804                if (t.length <= 65536) return t.indexOf(e);
 11805                for (const a in t) if (t[a] === e) return 0 | a;
 11806                return -1;
 11807              }
 11808              getMap() {
 11809                return this._map;
 11810              }
 11811              readCharCode(e, t, a) {
 11812                let r = 0;
 11813                const n = this.codespaceRanges;
 11814                for (let i = 0, s = n.length; i < s; i++) {
 11815                  r = ((r << 8) | e.charCodeAt(t + i)) >>> 0;
 11816                  const s = n[i];
 11817                  for (let e = 0, t = s.length; e < t; ) {
 11818                    const t = s[e++],
 11819                      n = s[e++];
 11820                    if (r >= t && r <= n) {
 11821                      a.charcode = r;
 11822                      a.length = i + 1;
 11823                      return;
 11824                    }
 11825                  }
 11826                }
 11827                a.charcode = 0;
 11828                a.length = 1;
 11829              }
 11830              getCharCodeLength(e) {
 11831                const t = this.codespaceRanges;
 11832                for (let a = 0, r = t.length; a < r; a++) {
 11833                  const r = t[a];
 11834                  for (let t = 0, n = r.length; t < n; ) {
 11835                    const n = r[t++],
 11836                      i = r[t++];
 11837                    if (e >= n && e <= i) return a + 1;
 11838                  }
 11839                }
 11840                return 1;
 11841              }
 11842              get length() {
 11843                return this._map.length;
 11844              }
 11845              get isIdentityCMap() {
 11846                if ("Identity-H" !== this.name && "Identity-V" !== this.name)
 11847                  return !1;
 11848                if (65536 !== this._map.length) return !1;
 11849                for (let e = 0; e < 65536; e++) if (this._map[e] !== e) return !1;
 11850                return !0;
 11851              }
 11852            }
 11853            t.CMap = CMap;
 11854            class IdentityCMap extends CMap {
 11855              constructor(e, t) {
 11856                super();
 11857                this.vertical = e;
 11858                this.addCodespaceRange(t, 0, 65535);
 11859              }
 11860              mapCidRange(e, t, a) {
 11861                (0, r.unreachable)("should not call mapCidRange");
 11862              }
 11863              mapBfRange(e, t, a) {
 11864                (0, r.unreachable)("should not call mapBfRange");
 11865              }
 11866              mapBfRangeToArray(e, t, a) {
 11867                (0, r.unreachable)("should not call mapBfRangeToArray");
 11868              }
 11869              mapOne(e, t) {
 11870                (0, r.unreachable)("should not call mapCidOne");
 11871              }
 11872              lookup(e) {
 11873                return Number.isInteger(e) && e <= 65535 ? e : void 0;
 11874              }
 11875              contains(e) {
 11876                return Number.isInteger(e) && e <= 65535;
 11877              }
 11878              forEach(e) {
 11879                for (let t = 0; t <= 65535; t++) e(t, t);
 11880              }
 11881              charCodeOf(e) {
 11882                return Number.isInteger(e) && e <= 65535 ? e : -1;
 11883              }
 11884              getMap() {
 11885                const e = new Array(65536);
 11886                for (let t = 0; t <= 65535; t++) e[t] = t;
 11887                return e;
 11888              }
 11889              get length() {
 11890                return 65536;
 11891              }
 11892              get isIdentityCMap() {
 11893                (0, r.unreachable)("should not access .isIdentityCMap");
 11894              }
 11895            }
 11896            t.IdentityCMap = IdentityCMap;
 11897            function strToInt(e) {
 11898              let t = 0;
 11899              for (let a = 0; a < e.length; a++) t = (t << 8) | e.charCodeAt(a);
 11900              return t >>> 0;
 11901            }
 11902            function expectString(e) {
 11903              if ("string" != typeof e)
 11904                throw new r.FormatError("Malformed CMap: expected string.");
 11905            }
 11906            function expectInt(e) {
 11907              if (!Number.isInteger(e))
 11908                throw new r.FormatError("Malformed CMap: expected int.");
 11909            }
 11910            function parseBfChar(e, t) {
 11911              for (;;) {
 11912                let a = t.getObj();
 11913                if (a === n.EOF) break;
 11914                if ((0, n.isCmd)(a, "endbfchar")) return;
 11915                expectString(a);
 11916                const r = strToInt(a);
 11917                a = t.getObj();
 11918                expectString(a);
 11919                const i = a;
 11920                e.mapOne(r, i);
 11921              }
 11922            }
 11923            function parseBfRange(e, t) {
 11924              for (;;) {
 11925                let a = t.getObj();
 11926                if (a === n.EOF) break;
 11927                if ((0, n.isCmd)(a, "endbfrange")) return;
 11928                expectString(a);
 11929                const r = strToInt(a);
 11930                a = t.getObj();
 11931                expectString(a);
 11932                const i = strToInt(a);
 11933                a = t.getObj();
 11934                if (Number.isInteger(a) || "string" == typeof a) {
 11935                  const t = Number.isInteger(a) ? String.fromCharCode(a) : a;
 11936                  e.mapBfRange(r, i, t);
 11937                } else {
 11938                  if (!(0, n.isCmd)(a, "[")) break;
 11939                  {
 11940                    a = t.getObj();
 11941                    const s = [];
 11942                    for (; !(0, n.isCmd)(a, "]") && a !== n.EOF; ) {
 11943                      s.push(a);
 11944                      a = t.getObj();
 11945                    }
 11946                    e.mapBfRangeToArray(r, i, s);
 11947                  }
 11948                }
 11949              }
 11950              throw new r.FormatError("Invalid bf range.");
 11951            }
 11952            function parseCidChar(e, t) {
 11953              for (;;) {
 11954                let a = t.getObj();
 11955                if (a === n.EOF) break;
 11956                if ((0, n.isCmd)(a, "endcidchar")) return;
 11957                expectString(a);
 11958                const r = strToInt(a);
 11959                a = t.getObj();
 11960                expectInt(a);
 11961                const i = a;
 11962                e.mapOne(r, i);
 11963              }
 11964            }
 11965            function parseCidRange(e, t) {
 11966              for (;;) {
 11967                let a = t.getObj();
 11968                if (a === n.EOF) break;
 11969                if ((0, n.isCmd)(a, "endcidrange")) return;
 11970                expectString(a);
 11971                const r = strToInt(a);
 11972                a = t.getObj();
 11973                expectString(a);
 11974                const i = strToInt(a);
 11975                a = t.getObj();
 11976                expectInt(a);
 11977                const s = a;
 11978                e.mapCidRange(r, i, s);
 11979              }
 11980            }
 11981            function parseCodespaceRange(e, t) {
 11982              for (;;) {
 11983                let a = t.getObj();
 11984                if (a === n.EOF) break;
 11985                if ((0, n.isCmd)(a, "endcodespacerange")) return;
 11986                if ("string" != typeof a) break;
 11987                const r = strToInt(a);
 11988                a = t.getObj();
 11989                if ("string" != typeof a) break;
 11990                const i = strToInt(a);
 11991                e.addCodespaceRange(a.length, r, i);
 11992              }
 11993              throw new r.FormatError("Invalid codespace range.");
 11994            }
 11995            function parseWMode(e, t) {
 11996              const a = t.getObj();
 11997              Number.isInteger(a) && (e.vertical = !!a);
 11998            }
 11999            function parseCMapName(e, t) {
 12000              const a = t.getObj();
 12001              a instanceof n.Name && (e.name = a.name);
 12002            }
 12003            async function parseCMap(e, t, a, i) {
 12004              let s, o;
 12005              e: for (;;)
 12006                try {
 12007                  const a = t.getObj();
 12008                  if (a === n.EOF) break;
 12009                  if (a instanceof n.Name) {
 12010                    "WMode" === a.name
 12011                      ? parseWMode(e, t)
 12012                      : "CMapName" === a.name && parseCMapName(e, t);
 12013                    s = a;
 12014                  } else if (a instanceof n.Cmd)
 12015                    switch (a.cmd) {
 12016                      case "endcmap":
 12017                        break e;
 12018                      case "usecmap":
 12019                        s instanceof n.Name && (o = s.name);
 12020                        break;
 12021                      case "begincodespacerange":
 12022                        parseCodespaceRange(e, t);
 12023                        break;
 12024                      case "beginbfchar":
 12025                        parseBfChar(e, t);
 12026                        break;
 12027                      case "begincidchar":
 12028                        parseCidChar(e, t);
 12029                        break;
 12030                      case "beginbfrange":
 12031                        parseBfRange(e, t);
 12032                        break;
 12033                      case "begincidrange":
 12034                        parseCidRange(e, t);
 12035                    }
 12036                } catch (e) {
 12037                  if (e instanceof c.MissingDataException) throw e;
 12038                  (0, r.warn)("Invalid cMap data: " + e);
 12039                  continue;
 12040                }
 12041              !i && o && (i = o);
 12042              return i ? extendCMap(e, a, i) : e;
 12043            }
 12044            async function extendCMap(e, t, a) {
 12045              e.useCMap = await createBuiltInCMap(a, t);
 12046              if (0 === e.numCodespaceRanges) {
 12047                const t = e.useCMap.codespaceRanges;
 12048                for (let a = 0; a < t.length; a++)
 12049                  e.codespaceRanges[a] = t[a].slice();
 12050                e.numCodespaceRanges = e.useCMap.numCodespaceRanges;
 12051              }
 12052              e.useCMap.forEach(function (t, a) {
 12053                e.contains(t) || e.mapOne(t, e.useCMap.lookup(t));
 12054              });
 12055              return e;
 12056            }
 12057            async function createBuiltInCMap(e, t) {
 12058              if ("Identity-H" === e) return new IdentityCMap(!1, 2);
 12059              if ("Identity-V" === e) return new IdentityCMap(!0, 2);
 12060              if (!h.includes(e)) throw new Error("Unknown CMap name: " + e);
 12061              if (!t)
 12062                throw new Error("Built-in CMap parameters are not provided.");
 12063              const { cMapData: a, compressionType: n } = await t(e),
 12064                i = new CMap(!0);
 12065              if (n === r.CMapCompressionType.BINARY)
 12066                return new s.BinaryCMapReader().process(a, i, (e) =>
 12067                  extendCMap(i, t, e),
 12068                );
 12069              if (n === r.CMapCompressionType.NONE) {
 12070                const e = new o.Lexer(new l.Stream(a));
 12071                return parseCMap(i, e, t, null);
 12072              }
 12073              throw new Error(`Invalid CMap "compressionType" value: ${n}`);
 12074            }
 12075            t.CMapFactory = class CMapFactory {
 12076              static async create({
 12077                encoding: e,
 12078                fetchBuiltInCMap: t,
 12079                useCMap: a,
 12080              }) {
 12081                if (e instanceof n.Name) return createBuiltInCMap(e.name, t);
 12082                if (e instanceof i.BaseStream) {
 12083                  const r = await parseCMap(new CMap(), new o.Lexer(e), t, a);
 12084                  return r.isIdentityCMap ? createBuiltInCMap(r.name, t) : r;
 12085                }
 12086                throw new Error("Encoding required.");
 12087              }
 12088            };
 12089          },
 12090          (e, t, a) => {
 12091            Object.defineProperty(t, "__esModule", { value: !0 });
 12092            t.BinaryCMapReader = void 0;
 12093            var r = a(2);
 12094            function hexToInt(e, t) {
 12095              let a = 0;
 12096              for (let r = 0; r <= t; r++) a = (a << 8) | e[r];
 12097              return a >>> 0;
 12098            }
 12099            function hexToStr(e, t) {
 12100              return 1 === t
 12101                ? String.fromCharCode(e[0], e[1])
 12102                : 3 === t
 12103                  ? String.fromCharCode(e[0], e[1], e[2], e[3])
 12104                  : String.fromCharCode(...e.subarray(0, t + 1));
 12105            }
 12106            function addHex(e, t, a) {
 12107              let r = 0;
 12108              for (let n = a; n >= 0; n--) {
 12109                r += e[n] + t[n];
 12110                e[n] = 255 & r;
 12111                r >>= 8;
 12112              }
 12113            }
 12114            function incHex(e, t) {
 12115              let a = 1;
 12116              for (let r = t; r >= 0 && a > 0; r--) {
 12117                a += e[r];
 12118                e[r] = 255 & a;
 12119                a >>= 8;
 12120              }
 12121            }
 12122            const n = 16;
 12123            class BinaryCMapStream {
 12124              constructor(e) {
 12125                this.buffer = e;
 12126                this.pos = 0;
 12127                this.end = e.length;
 12128                this.tmpBuf = new Uint8Array(19);
 12129              }
 12130              readByte() {
 12131                return this.pos >= this.end ? -1 : this.buffer[this.pos++];
 12132              }
 12133              readNumber() {
 12134                let e,
 12135                  t = 0;
 12136                do {
 12137                  const a = this.readByte();
 12138                  if (a < 0) throw new r.FormatError("unexpected EOF in bcmap");
 12139                  e = !(128 & a);
 12140                  t = (t << 7) | (127 & a);
 12141                } while (!e);
 12142                return t;
 12143              }
 12144              readSigned() {
 12145                const e = this.readNumber();
 12146                return 1 & e ? ~(e >>> 1) : e >>> 1;
 12147              }
 12148              readHex(e, t) {
 12149                e.set(this.buffer.subarray(this.pos, this.pos + t + 1));
 12150                this.pos += t + 1;
 12151              }
 12152              readHexNumber(e, t) {
 12153                let a;
 12154                const n = this.tmpBuf;
 12155                let i = 0;
 12156                do {
 12157                  const e = this.readByte();
 12158                  if (e < 0) throw new r.FormatError("unexpected EOF in bcmap");
 12159                  a = !(128 & e);
 12160                  n[i++] = 127 & e;
 12161                } while (!a);
 12162                let s = t,
 12163                  o = 0,
 12164                  c = 0;
 12165                for (; s >= 0; ) {
 12166                  for (; c < 8 && n.length > 0; ) {
 12167                    o |= n[--i] << c;
 12168                    c += 7;
 12169                  }
 12170                  e[s] = 255 & o;
 12171                  s--;
 12172                  o >>= 8;
 12173                  c -= 8;
 12174                }
 12175              }
 12176              readHexSigned(e, t) {
 12177                this.readHexNumber(e, t);
 12178                const a = 1 & e[t] ? 255 : 0;
 12179                let r = 0;
 12180                for (let n = 0; n <= t; n++) {
 12181                  r = ((1 & r) << 8) | e[n];
 12182                  e[n] = (r >> 1) ^ a;
 12183                }
 12184              }
 12185              readString() {
 12186                const e = this.readNumber(),
 12187                  t = new Array(e);
 12188                for (let a = 0; a < e; a++) t[a] = this.readNumber();
 12189                return String.fromCharCode(...t);
 12190              }
 12191            }
 12192            t.BinaryCMapReader = class BinaryCMapReader {
 12193              async process(e, t, a) {
 12194                const r = new BinaryCMapStream(e),
 12195                  i = r.readByte();
 12196                t.vertical = !!(1 & i);
 12197                let s = null;
 12198                const o = new Uint8Array(n),
 12199                  c = new Uint8Array(n),
 12200                  l = new Uint8Array(n),
 12201                  h = new Uint8Array(n),
 12202                  u = new Uint8Array(n);
 12203                let d, f;
 12204                for (; (f = r.readByte()) >= 0; ) {
 12205                  const e = f >> 5;
 12206                  if (7 === e) {
 12207                    switch (31 & f) {
 12208                      case 0:
 12209                        r.readString();
 12210                        break;
 12211                      case 1:
 12212                        s = r.readString();
 12213                    }
 12214                    continue;
 12215                  }
 12216                  const a = !!(16 & f),
 12217                    i = 15 & f;
 12218                  if (i + 1 > n)
 12219                    throw new Error(
 12220                      "BinaryCMapReader.process: Invalid dataSize.",
 12221                    );
 12222                  const g = 1,
 12223                    p = r.readNumber();
 12224                  switch (e) {
 12225                    case 0:
 12226                      r.readHex(o, i);
 12227                      r.readHexNumber(c, i);
 12228                      addHex(c, o, i);
 12229                      t.addCodespaceRange(i + 1, hexToInt(o, i), hexToInt(c, i));
 12230                      for (let e = 1; e < p; e++) {
 12231                        incHex(c, i);
 12232                        r.readHexNumber(o, i);
 12233                        addHex(o, c, i);
 12234                        r.readHexNumber(c, i);
 12235                        addHex(c, o, i);
 12236                        t.addCodespaceRange(
 12237                          i + 1,
 12238                          hexToInt(o, i),
 12239                          hexToInt(c, i),
 12240                        );
 12241                      }
 12242                      break;
 12243                    case 1:
 12244                      r.readHex(o, i);
 12245                      r.readHexNumber(c, i);
 12246                      addHex(c, o, i);
 12247                      r.readNumber();
 12248                      for (let e = 1; e < p; e++) {
 12249                        incHex(c, i);
 12250                        r.readHexNumber(o, i);
 12251                        addHex(o, c, i);
 12252                        r.readHexNumber(c, i);
 12253                        addHex(c, o, i);
 12254                        r.readNumber();
 12255                      }
 12256                      break;
 12257                    case 2:
 12258                      r.readHex(l, i);
 12259                      d = r.readNumber();
 12260                      t.mapOne(hexToInt(l, i), d);
 12261                      for (let e = 1; e < p; e++) {
 12262                        incHex(l, i);
 12263                        if (!a) {
 12264                          r.readHexNumber(u, i);
 12265                          addHex(l, u, i);
 12266                        }
 12267                        d = r.readSigned() + (d + 1);
 12268                        t.mapOne(hexToInt(l, i), d);
 12269                      }
 12270                      break;
 12271                    case 3:
 12272                      r.readHex(o, i);
 12273                      r.readHexNumber(c, i);
 12274                      addHex(c, o, i);
 12275                      d = r.readNumber();
 12276                      t.mapCidRange(hexToInt(o, i), hexToInt(c, i), d);
 12277                      for (let e = 1; e < p; e++) {
 12278                        incHex(c, i);
 12279                        if (a) o.set(c);
 12280                        else {
 12281                          r.readHexNumber(o, i);
 12282                          addHex(o, c, i);
 12283                        }
 12284                        r.readHexNumber(c, i);
 12285                        addHex(c, o, i);
 12286                        d = r.readNumber();
 12287                        t.mapCidRange(hexToInt(o, i), hexToInt(c, i), d);
 12288                      }
 12289                      break;
 12290                    case 4:
 12291                      r.readHex(l, g);
 12292                      r.readHex(h, i);
 12293                      t.mapOne(hexToInt(l, g), hexToStr(h, i));
 12294                      for (let e = 1; e < p; e++) {
 12295                        incHex(l, g);
 12296                        if (!a) {
 12297                          r.readHexNumber(u, g);
 12298                          addHex(l, u, g);
 12299                        }
 12300                        incHex(h, i);
 12301                        r.readHexSigned(u, i);
 12302                        addHex(h, u, i);
 12303                        t.mapOne(hexToInt(l, g), hexToStr(h, i));
 12304                      }
 12305                      break;
 12306                    case 5:
 12307                      r.readHex(o, g);
 12308                      r.readHexNumber(c, g);
 12309                      addHex(c, o, g);
 12310                      r.readHex(h, i);
 12311                      t.mapBfRange(
 12312                        hexToInt(o, g),
 12313                        hexToInt(c, g),
 12314                        hexToStr(h, i),
 12315                      );
 12316                      for (let e = 1; e < p; e++) {
 12317                        incHex(c, g);
 12318                        if (a) o.set(c);
 12319                        else {
 12320                          r.readHexNumber(o, g);
 12321                          addHex(o, c, g);
 12322                        }
 12323                        r.readHexNumber(c, g);
 12324                        addHex(c, o, g);
 12325                        r.readHex(h, i);
 12326                        t.mapBfRange(
 12327                          hexToInt(o, g),
 12328                          hexToInt(c, g),
 12329                          hexToStr(h, i),
 12330                        );
 12331                      }
 12332                      break;
 12333                    default:
 12334                      throw new Error(
 12335                        `BinaryCMapReader.process - unknown type: ${e}`,
 12336                      );
 12337                  }
 12338                }
 12339                return s ? a(s) : t;
 12340              }
 12341            };
 12342          },
 12343          (e, t, a) => {
 12344            Object.defineProperty(t, "__esModule", { value: !0 });
 12345            t.Parser = t.Linearization = t.Lexer = void 0;
 12346            var r = a(2),
 12347              n = a(4),
 12348              i = a(3),
 12349              s = a(8),
 12350              o = a(17),
 12351              c = a(19),
 12352              l = a(20),
 12353              h = a(22),
 12354              u = a(23),
 12355              d = a(26),
 12356              f = a(29),
 12357              g = a(31),
 12358              p = a(32),
 12359              m = a(33);
 12360            class Parser {
 12361              constructor({
 12362                lexer: e,
 12363                xref: t,
 12364                allowStreams: a = !1,
 12365                recoveryMode: r = !1,
 12366              }) {
 12367                this.lexer = e;
 12368                this.xref = t;
 12369                this.allowStreams = a;
 12370                this.recoveryMode = r;
 12371                this.imageCache = Object.create(null);
 12372                this._imageId = 0;
 12373                this.refill();
 12374              }
 12375              refill() {
 12376                this.buf1 = this.lexer.getObj();
 12377                this.buf2 = this.lexer.getObj();
 12378              }
 12379              shift() {
 12380                if (this.buf2 instanceof n.Cmd && "ID" === this.buf2.cmd) {
 12381                  this.buf1 = this.buf2;
 12382                  this.buf2 = null;
 12383                } else {
 12384                  this.buf1 = this.buf2;
 12385                  this.buf2 = this.lexer.getObj();
 12386                }
 12387              }
 12388              tryShift() {
 12389                try {
 12390                  this.shift();
 12391                  return !0;
 12392                } catch (e) {
 12393                  if (e instanceof i.MissingDataException) throw e;
 12394                  return !1;
 12395                }
 12396              }
 12397              getObj(e = null) {
 12398                const t = this.buf1;
 12399                this.shift();
 12400                if (t instanceof n.Cmd)
 12401                  switch (t.cmd) {
 12402                    case "BI":
 12403                      return this.makeInlineImage(e);
 12404                    case "[":
 12405                      const a = [];
 12406                      for (
 12407                        ;
 12408                        !(0, n.isCmd)(this.buf1, "]") && this.buf1 !== n.EOF;
 12409  
 12410                      )
 12411                        a.push(this.getObj(e));
 12412                      if (this.buf1 === n.EOF) {
 12413                        if (this.recoveryMode) return a;
 12414                        throw new i.ParserEOFException(
 12415                          "End of file inside array.",
 12416                        );
 12417                      }
 12418                      this.shift();
 12419                      return a;
 12420                    case "<<":
 12421                      const s = new n.Dict(this.xref);
 12422                      for (
 12423                        ;
 12424                        !(0, n.isCmd)(this.buf1, ">>") && this.buf1 !== n.EOF;
 12425  
 12426                      ) {
 12427                        if (!(this.buf1 instanceof n.Name)) {
 12428                          (0, r.info)(
 12429                            "Malformed dictionary: key must be a name object",
 12430                          );
 12431                          this.shift();
 12432                          continue;
 12433                        }
 12434                        const t = this.buf1.name;
 12435                        this.shift();
 12436                        if (this.buf1 === n.EOF) break;
 12437                        s.set(t, this.getObj(e));
 12438                      }
 12439                      if (this.buf1 === n.EOF) {
 12440                        if (this.recoveryMode) return s;
 12441                        throw new i.ParserEOFException(
 12442                          "End of file inside dictionary.",
 12443                        );
 12444                      }
 12445                      if ((0, n.isCmd)(this.buf2, "stream"))
 12446                        return this.allowStreams ? this.makeStream(s, e) : s;
 12447                      this.shift();
 12448                      return s;
 12449                    default:
 12450                      return t;
 12451                  }
 12452                if (Number.isInteger(t)) {
 12453                  if (
 12454                    Number.isInteger(this.buf1) &&
 12455                    (0, n.isCmd)(this.buf2, "R")
 12456                  ) {
 12457                    const e = n.Ref.get(t, this.buf1);
 12458                    this.shift();
 12459                    this.shift();
 12460                    return e;
 12461                  }
 12462                  return t;
 12463                }
 12464                return "string" == typeof t && e ? e.decryptString(t) : t;
 12465              }
 12466              findDefaultInlineStreamEnd(e) {
 12467                const { knownCommands: t } = this.lexer,
 12468                  a = e.pos;
 12469                let o,
 12470                  c,
 12471                  l = 0;
 12472                for (; -1 !== (o = e.getByte()); )
 12473                  if (0 === l) l = 69 === o ? 1 : 0;
 12474                  else if (1 === l) l = 73 === o ? 2 : 0;
 12475                  else if (32 === o || 10 === o || 13 === o) {
 12476                    c = e.pos;
 12477                    const a = e.peekBytes(15),
 12478                      i = a.length;
 12479                    if (0 === i) break;
 12480                    for (let e = 0; e < i; e++) {
 12481                      o = a[e];
 12482                      if (
 12483                        (0 !== o || 0 === a[e + 1]) &&
 12484                        10 !== o &&
 12485                        13 !== o &&
 12486                        (o < 32 || o > 127)
 12487                      ) {
 12488                        l = 0;
 12489                        break;
 12490                      }
 12491                    }
 12492                    if (2 !== l) continue;
 12493                    if (!t) {
 12494                      (0, r.warn)(
 12495                        "findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined.",
 12496                      );
 12497                      continue;
 12498                    }
 12499                    const h = new Lexer(new s.Stream(a.slice()), t);
 12500                    h._hexStringWarn = () => {};
 12501                    let u = 0;
 12502                    for (;;) {
 12503                      const e = h.getObj();
 12504                      if (e === n.EOF) {
 12505                        l = 0;
 12506                        break;
 12507                      }
 12508                      if (e instanceof n.Cmd) {
 12509                        const a = t[e.cmd];
 12510                        if (!a) {
 12511                          l = 0;
 12512                          break;
 12513                        }
 12514                        if (a.variableArgs ? u <= a.numArgs : u === a.numArgs)
 12515                          break;
 12516                        u = 0;
 12517                      } else u++;
 12518                    }
 12519                    if (2 === l) break;
 12520                  } else l = 0;
 12521                if (-1 === o) {
 12522                  (0, r.warn)(
 12523                    "findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker",
 12524                  );
 12525                  if (c) {
 12526                    (0, r.warn)(
 12527                      '... trying to recover by using the last "EI" occurrence.',
 12528                    );
 12529                    e.skip(-(e.pos - c));
 12530                  }
 12531                }
 12532                let h = 4;
 12533                e.skip(-h);
 12534                o = e.peekByte();
 12535                e.skip(h);
 12536                (0, i.isWhiteSpace)(o) || h--;
 12537                return e.pos - h - a;
 12538              }
 12539              findDCTDecodeInlineStreamEnd(e) {
 12540                const t = e.pos;
 12541                let a,
 12542                  n,
 12543                  i = !1;
 12544                for (; -1 !== (a = e.getByte()); )
 12545                  if (255 === a) {
 12546                    switch (e.getByte()) {
 12547                      case 0:
 12548                        break;
 12549                      case 255:
 12550                        e.skip(-1);
 12551                        break;
 12552                      case 217:
 12553                        i = !0;
 12554                        break;
 12555                      case 192:
 12556                      case 193:
 12557                      case 194:
 12558                      case 195:
 12559                      case 197:
 12560                      case 198:
 12561                      case 199:
 12562                      case 201:
 12563                      case 202:
 12564                      case 203:
 12565                      case 205:
 12566                      case 206:
 12567                      case 207:
 12568                      case 196:
 12569                      case 204:
 12570                      case 218:
 12571                      case 219:
 12572                      case 220:
 12573                      case 221:
 12574                      case 222:
 12575                      case 223:
 12576                      case 224:
 12577                      case 225:
 12578                      case 226:
 12579                      case 227:
 12580                      case 228:
 12581                      case 229:
 12582                      case 230:
 12583                      case 231:
 12584                      case 232:
 12585                      case 233:
 12586                      case 234:
 12587                      case 235:
 12588                      case 236:
 12589                      case 237:
 12590                      case 238:
 12591                      case 239:
 12592                      case 254:
 12593                        n = e.getUint16();
 12594                        n > 2 ? e.skip(n - 2) : e.skip(-2);
 12595                    }
 12596                    if (i) break;
 12597                  }
 12598                const s = e.pos - t;
 12599                if (-1 === a) {
 12600                  (0, r.warn)(
 12601                    "Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead.",
 12602                  );
 12603                  e.skip(-s);
 12604                  return this.findDefaultInlineStreamEnd(e);
 12605                }
 12606                this.inlineStreamSkipEI(e);
 12607                return s;
 12608              }
 12609              findASCII85DecodeInlineStreamEnd(e) {
 12610                const t = e.pos;
 12611                let a;
 12612                for (; -1 !== (a = e.getByte()); )
 12613                  if (126 === a) {
 12614                    const t = e.pos;
 12615                    a = e.peekByte();
 12616                    for (; (0, i.isWhiteSpace)(a); ) {
 12617                      e.skip();
 12618                      a = e.peekByte();
 12619                    }
 12620                    if (62 === a) {
 12621                      e.skip();
 12622                      break;
 12623                    }
 12624                    if (e.pos > t) {
 12625                      const t = e.peekBytes(2);
 12626                      if (69 === t[0] && 73 === t[1]) break;
 12627                    }
 12628                  }
 12629                const n = e.pos - t;
 12630                if (-1 === a) {
 12631                  (0, r.warn)(
 12632                    "Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead.",
 12633                  );
 12634                  e.skip(-n);
 12635                  return this.findDefaultInlineStreamEnd(e);
 12636                }
 12637                this.inlineStreamSkipEI(e);
 12638                return n;
 12639              }
 12640              findASCIIHexDecodeInlineStreamEnd(e) {
 12641                const t = e.pos;
 12642                let a;
 12643                for (; -1 !== (a = e.getByte()) && 62 !== a; );
 12644                const n = e.pos - t;
 12645                if (-1 === a) {
 12646                  (0, r.warn)(
 12647                    "Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead.",
 12648                  );
 12649                  e.skip(-n);
 12650                  return this.findDefaultInlineStreamEnd(e);
 12651                }
 12652                this.inlineStreamSkipEI(e);
 12653                return n;
 12654              }
 12655              inlineStreamSkipEI(e) {
 12656                let t,
 12657                  a = 0;
 12658                for (; -1 !== (t = e.getByte()); )
 12659                  if (0 === a) a = 69 === t ? 1 : 0;
 12660                  else if (1 === a) a = 73 === t ? 2 : 0;
 12661                  else if (2 === a) break;
 12662              }
 12663              makeInlineImage(e) {
 12664                const t = this.lexer,
 12665                  a = t.stream,
 12666                  i = Object.create(null);
 12667                let s;
 12668                for (; !(0, n.isCmd)(this.buf1, "ID") && this.buf1 !== n.EOF; ) {
 12669                  if (!(this.buf1 instanceof n.Name))
 12670                    throw new r.FormatError(
 12671                      "Dictionary key must be a name object",
 12672                    );
 12673                  const t = this.buf1.name;
 12674                  this.shift();
 12675                  if (this.buf1 === n.EOF) break;
 12676                  i[t] = this.getObj(e);
 12677                }
 12678                -1 !== t.beginInlineImagePos &&
 12679                  (s = a.pos - t.beginInlineImagePos);
 12680                const o = this.xref.fetchIfRef(i.F || i.Filter);
 12681                let c;
 12682                if (o instanceof n.Name) c = o.name;
 12683                else if (Array.isArray(o)) {
 12684                  const e = this.xref.fetchIfRef(o[0]);
 12685                  e instanceof n.Name && (c = e.name);
 12686                }
 12687                const l = a.pos;
 12688                let h, u;
 12689                switch (c) {
 12690                  case "DCT":
 12691                  case "DCTDecode":
 12692                    h = this.findDCTDecodeInlineStreamEnd(a);
 12693                    break;
 12694                  case "A85":
 12695                  case "ASCII85Decode":
 12696                    h = this.findASCII85DecodeInlineStreamEnd(a);
 12697                    break;
 12698                  case "AHx":
 12699                  case "ASCIIHexDecode":
 12700                    h = this.findASCIIHexDecodeInlineStreamEnd(a);
 12701                    break;
 12702                  default:
 12703                    h = this.findDefaultInlineStreamEnd(a);
 12704                }
 12705                if (h < 1e3 && s > 0) {
 12706                  const e = a.pos;
 12707                  a.pos = t.beginInlineImagePos;
 12708                  u = (function getInlineImageCacheKey(e) {
 12709                    const t = [],
 12710                      a = e.length;
 12711                    let r = 0;
 12712                    for (; r < a - 1; ) t.push((e[r++] << 8) | e[r++]);
 12713                    r < a && t.push(e[r]);
 12714                    return a + "_" + String.fromCharCode.apply(null, t);
 12715                  })(a.getBytes(s + h));
 12716                  a.pos = e;
 12717                  const r = this.imageCache[u];
 12718                  if (void 0 !== r) {
 12719                    this.buf2 = n.Cmd.get("EI");
 12720                    this.shift();
 12721                    r.reset();
 12722                    return r;
 12723                  }
 12724                }
 12725                const d = new n.Dict(this.xref);
 12726                for (const e in i) d.set(e, i[e]);
 12727                let f = a.makeSubStream(l, h, d);
 12728                e && (f = e.createStream(f, h));
 12729                f = this.filter(f, d, h);
 12730                f.dict = d;
 12731                if (void 0 !== u) {
 12732                  f.cacheKey = "inline_img_" + ++this._imageId;
 12733                  this.imageCache[u] = f;
 12734                }
 12735                this.buf2 = n.Cmd.get("EI");
 12736                this.shift();
 12737                return f;
 12738              }
 12739              _findStreamLength(e, t) {
 12740                const { stream: a } = this.lexer;
 12741                a.pos = e;
 12742                const r = t.length;
 12743                for (; a.pos < a.end; ) {
 12744                  const n = a.peekBytes(2048),
 12745                    i = n.length - r;
 12746                  if (i <= 0) break;
 12747                  let s = 0;
 12748                  for (; s < i; ) {
 12749                    let i = 0;
 12750                    for (; i < r && n[s + i] === t[i]; ) i++;
 12751                    if (i >= r) {
 12752                      a.pos += s;
 12753                      return a.pos - e;
 12754                    }
 12755                    s++;
 12756                  }
 12757                  a.pos += i;
 12758                }
 12759                return -1;
 12760              }
 12761              makeStream(e, t) {
 12762                const a = this.lexer;
 12763                let s = a.stream;
 12764                a.skipToNextLine();
 12765                const o = s.pos - 1;
 12766                let c = e.get("Length");
 12767                if (!Number.isInteger(c)) {
 12768                  (0, r.info)(`Bad length "${c && c.toString()}" in stream.`);
 12769                  c = 0;
 12770                }
 12771                s.pos = o + c;
 12772                a.nextChar();
 12773                if (this.tryShift() && (0, n.isCmd)(this.buf2, "endstream"))
 12774                  this.shift();
 12775                else {
 12776                  const e = new Uint8Array([
 12777                    101, 110, 100, 115, 116, 114, 101, 97, 109,
 12778                  ]);
 12779                  let t = this._findStreamLength(o, e);
 12780                  if (t < 0) {
 12781                    const a = 1;
 12782                    for (let n = 1; n <= a; n++) {
 12783                      const a = e.length - n,
 12784                        c = e.slice(0, a),
 12785                        l = this._findStreamLength(o, c);
 12786                      if (l >= 0) {
 12787                        const e = s.peekBytes(a + 1)[a];
 12788                        if (!(0, i.isWhiteSpace)(e)) break;
 12789                        (0, r.info)(
 12790                          `Found "${(0, r.bytesToString)(c)}" when searching for endstream command.`,
 12791                        );
 12792                        t = l;
 12793                        break;
 12794                      }
 12795                    }
 12796                    if (t < 0)
 12797                      throw new r.FormatError("Missing endstream command.");
 12798                  }
 12799                  c = t;
 12800                  a.nextChar();
 12801                  this.shift();
 12802                  this.shift();
 12803                }
 12804                this.shift();
 12805                s = s.makeSubStream(o, c, e);
 12806                t && (s = t.createStream(s, c));
 12807                s = this.filter(s, e, c);
 12808                s.dict = e;
 12809                return s;
 12810              }
 12811              filter(e, t, a) {
 12812                let i = t.get("F", "Filter"),
 12813                  s = t.get("DP", "DecodeParms");
 12814                if (i instanceof n.Name) {
 12815                  Array.isArray(s) &&
 12816                    (0, r.warn)(
 12817                      "/DecodeParms should not be an Array, when /Filter is a Name.",
 12818                    );
 12819                  return this.makeFilter(e, i.name, a, s);
 12820                }
 12821                let o = a;
 12822                if (Array.isArray(i)) {
 12823                  const t = i,
 12824                    a = s;
 12825                  for (let c = 0, l = t.length; c < l; ++c) {
 12826                    i = this.xref.fetchIfRef(t[c]);
 12827                    if (!(i instanceof n.Name))
 12828                      throw new r.FormatError(`Bad filter name "${i}"`);
 12829                    s = null;
 12830                    Array.isArray(a) &&
 12831                      c in a &&
 12832                      (s = this.xref.fetchIfRef(a[c]));
 12833                    e = this.makeFilter(e, i.name, o, s);
 12834                    o = null;
 12835                  }
 12836                }
 12837                return e;
 12838              }
 12839              makeFilter(e, t, a, n) {
 12840                if (0 === a) {
 12841                  (0, r.warn)(`Empty "${t}" stream.`);
 12842                  return new s.NullStream();
 12843                }
 12844                try {
 12845                  switch (t) {
 12846                    case "Fl":
 12847                    case "FlateDecode":
 12848                      return n
 12849                        ? new p.PredictorStream(new h.FlateStream(e, a), a, n)
 12850                        : new h.FlateStream(e, a);
 12851                    case "LZW":
 12852                    case "LZWDecode":
 12853                      let t = 1;
 12854                      if (n) {
 12855                        n.has("EarlyChange") && (t = n.get("EarlyChange"));
 12856                        return new p.PredictorStream(
 12857                          new g.LZWStream(e, a, t),
 12858                          a,
 12859                          n,
 12860                        );
 12861                      }
 12862                      return new g.LZWStream(e, a, t);
 12863                    case "DCT":
 12864                    case "DCTDecode":
 12865                      return new d.JpegStream(e, a, n);
 12866                    case "JPX":
 12867                    case "JPXDecode":
 12868                      return new f.JpxStream(e, a, n);
 12869                    case "A85":
 12870                    case "ASCII85Decode":
 12871                      return new o.Ascii85Stream(e, a);
 12872                    case "AHx":
 12873                    case "ASCIIHexDecode":
 12874                      return new c.AsciiHexStream(e, a);
 12875                    case "CCF":
 12876                    case "CCITTFaxDecode":
 12877                      return new l.CCITTFaxStream(e, a, n);
 12878                    case "RL":
 12879                    case "RunLengthDecode":
 12880                      return new m.RunLengthStream(e, a);
 12881                    case "JBIG2Decode":
 12882                      return new u.Jbig2Stream(e, a, n);
 12883                  }
 12884                  (0, r.warn)(`Filter "${t}" is not supported.`);
 12885                  return e;
 12886                } catch (e) {
 12887                  if (e instanceof i.MissingDataException) throw e;
 12888                  (0, r.warn)(`Invalid stream: "${e}"`);
 12889                  return new s.NullStream();
 12890                }
 12891              }
 12892            }
 12893            t.Parser = Parser;
 12894            const b = [
 12895              1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 12896              0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0,
 12897              0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0,
 12898              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
 12899              0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 12900              0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 12901              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 12902              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 12903              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 12904              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 12905              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 12906              0, 0, 0,
 12907            ];
 12908            function toHexDigit(e) {
 12909              return e >= 48 && e <= 57
 12910                ? 15 & e
 12911                : (e >= 65 && e <= 70) || (e >= 97 && e <= 102)
 12912                  ? 9 + (15 & e)
 12913                  : -1;
 12914            }
 12915            class Lexer {
 12916              constructor(e, t = null) {
 12917                this.stream = e;
 12918                this.nextChar();
 12919                this.strBuf = [];
 12920                this.knownCommands = t;
 12921                this._hexStringNumWarn = 0;
 12922                this.beginInlineImagePos = -1;
 12923              }
 12924              nextChar() {
 12925                return (this.currentChar = this.stream.getByte());
 12926              }
 12927              peekChar() {
 12928                return this.stream.peekByte();
 12929              }
 12930              getNumber() {
 12931                let e = this.currentChar,
 12932                  t = !1,
 12933                  a = 0,
 12934                  n = 1;
 12935                if (45 === e) {
 12936                  n = -1;
 12937                  e = this.nextChar();
 12938                  45 === e && (e = this.nextChar());
 12939                } else 43 === e && (e = this.nextChar());
 12940                if (10 === e || 13 === e)
 12941                  do {
 12942                    e = this.nextChar();
 12943                  } while (10 === e || 13 === e);
 12944                if (46 === e) {
 12945                  a = 10;
 12946                  e = this.nextChar();
 12947                }
 12948                if (e < 48 || e > 57) {
 12949                  const t = `Invalid number: ${String.fromCharCode(e)} (charCode ${e})`;
 12950                  if ((0, i.isWhiteSpace)(e) || -1 === e) {
 12951                    (0, r.info)(`Lexer.getNumber - "${t}".`);
 12952                    return 0;
 12953                  }
 12954                  throw new r.FormatError(t);
 12955                }
 12956                let s = e - 48,
 12957                  o = 0,
 12958                  c = 1;
 12959                for (; (e = this.nextChar()) >= 0; )
 12960                  if (e >= 48 && e <= 57) {
 12961                    const r = e - 48;
 12962                    if (t) o = 10 * o + r;
 12963                    else {
 12964                      0 !== a && (a *= 10);
 12965                      s = 10 * s + r;
 12966                    }
 12967                  } else if (46 === e) {
 12968                    if (0 !== a) break;
 12969                    a = 1;
 12970                  } else if (45 === e)
 12971                    (0, r.warn)(
 12972                      "Badly formatted number: minus sign in the middle",
 12973                    );
 12974                  else {
 12975                    if (69 !== e && 101 !== e) break;
 12976                    e = this.peekChar();
 12977                    if (43 === e || 45 === e) {
 12978                      c = 45 === e ? -1 : 1;
 12979                      this.nextChar();
 12980                    } else if (e < 48 || e > 57) break;
 12981                    t = !0;
 12982                  }
 12983                0 !== a && (s /= a);
 12984                t && (s *= 10 ** (c * o));
 12985                return n * s;
 12986              }
 12987              getString() {
 12988                let e = 1,
 12989                  t = !1;
 12990                const a = this.strBuf;
 12991                a.length = 0;
 12992                let n = this.nextChar();
 12993                for (;;) {
 12994                  let i = !1;
 12995                  switch (0 | n) {
 12996                    case -1:
 12997                      (0, r.warn)("Unterminated string");
 12998                      t = !0;
 12999                      break;
 13000                    case 40:
 13001                      ++e;
 13002                      a.push("(");
 13003                      break;
 13004                    case 41:
 13005                      if (0 == --e) {
 13006                        this.nextChar();
 13007                        t = !0;
 13008                      } else a.push(")");
 13009                      break;
 13010                    case 92:
 13011                      n = this.nextChar();
 13012                      switch (n) {
 13013                        case -1:
 13014                          (0, r.warn)("Unterminated string");
 13015                          t = !0;
 13016                          break;
 13017                        case 110:
 13018                          a.push("\n");
 13019                          break;
 13020                        case 114:
 13021                          a.push("\r");
 13022                          break;
 13023                        case 116:
 13024                          a.push("\t");
 13025                          break;
 13026                        case 98:
 13027                          a.push("\b");
 13028                          break;
 13029                        case 102:
 13030                          a.push("\f");
 13031                          break;
 13032                        case 92:
 13033                        case 40:
 13034                        case 41:
 13035                          a.push(String.fromCharCode(n));
 13036                          break;
 13037                        case 48:
 13038                        case 49:
 13039                        case 50:
 13040                        case 51:
 13041                        case 52:
 13042                        case 53:
 13043                        case 54:
 13044                        case 55:
 13045                          let e = 15 & n;
 13046                          n = this.nextChar();
 13047                          i = !0;
 13048                          if (n >= 48 && n <= 55) {
 13049                            e = (e << 3) + (15 & n);
 13050                            n = this.nextChar();
 13051                            if (n >= 48 && n <= 55) {
 13052                              i = !1;
 13053                              e = (e << 3) + (15 & n);
 13054                            }
 13055                          }
 13056                          a.push(String.fromCharCode(e));
 13057                          break;
 13058                        case 13:
 13059                          10 === this.peekChar() && this.nextChar();
 13060                          break;
 13061                        case 10:
 13062                          break;
 13063                        default:
 13064                          a.push(String.fromCharCode(n));
 13065                      }
 13066                      break;
 13067                    default:
 13068                      a.push(String.fromCharCode(n));
 13069                  }
 13070                  if (t) break;
 13071                  i || (n = this.nextChar());
 13072                }
 13073                return a.join("");
 13074              }
 13075              getName() {
 13076                let e, t;
 13077                const a = this.strBuf;
 13078                a.length = 0;
 13079                for (; (e = this.nextChar()) >= 0 && !b[e]; )
 13080                  if (35 === e) {
 13081                    e = this.nextChar();
 13082                    if (b[e]) {
 13083                      (0, r.warn)(
 13084                        "Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number.",
 13085                      );
 13086                      a.push("#");
 13087                      break;
 13088                    }
 13089                    const n = toHexDigit(e);
 13090                    if (-1 !== n) {
 13091                      t = e;
 13092                      e = this.nextChar();
 13093                      const i = toHexDigit(e);
 13094                      if (-1 === i) {
 13095                        (0, r.warn)(
 13096                          `Lexer_getName: Illegal digit (${String.fromCharCode(e)}) in hexadecimal number.`,
 13097                        );
 13098                        a.push("#", String.fromCharCode(t));
 13099                        if (b[e]) break;
 13100                        a.push(String.fromCharCode(e));
 13101                        continue;
 13102                      }
 13103                      a.push(String.fromCharCode((n << 4) | i));
 13104                    } else a.push("#", String.fromCharCode(e));
 13105                  } else a.push(String.fromCharCode(e));
 13106                a.length > 127 &&
 13107                  (0, r.warn)(
 13108                    `Name token is longer than allowed by the spec: ${a.length}`,
 13109                  );
 13110                return n.Name.get(a.join(""));
 13111              }
 13112              _hexStringWarn(e) {
 13113                5 != this._hexStringNumWarn++
 13114                  ? this._hexStringNumWarn > 5 ||
 13115                    (0, r.warn)(`getHexString - ignoring invalid character: ${e}`)
 13116                  : (0, r.warn)(
 13117                      "getHexString - ignoring additional invalid characters.",
 13118                    );
 13119              }
 13120              getHexString() {
 13121                const e = this.strBuf;
 13122                e.length = 0;
 13123                let t,
 13124                  a,
 13125                  n = this.currentChar,
 13126                  i = !0;
 13127                this._hexStringNumWarn = 0;
 13128                for (;;) {
 13129                  if (n < 0) {
 13130                    (0, r.warn)("Unterminated hex string");
 13131                    break;
 13132                  }
 13133                  if (62 === n) {
 13134                    this.nextChar();
 13135                    break;
 13136                  }
 13137                  if (1 !== b[n]) {
 13138                    if (i) {
 13139                      t = toHexDigit(n);
 13140                      if (-1 === t) {
 13141                        this._hexStringWarn(n);
 13142                        n = this.nextChar();
 13143                        continue;
 13144                      }
 13145                    } else {
 13146                      a = toHexDigit(n);
 13147                      if (-1 === a) {
 13148                        this._hexStringWarn(n);
 13149                        n = this.nextChar();
 13150                        continue;
 13151                      }
 13152                      e.push(String.fromCharCode((t << 4) | a));
 13153                    }
 13154                    i = !i;
 13155                    n = this.nextChar();
 13156                  } else n = this.nextChar();
 13157                }
 13158                return e.join("");
 13159              }
 13160              getObj() {
 13161                let e = !1,
 13162                  t = this.currentChar;
 13163                for (;;) {
 13164                  if (t < 0) return n.EOF;
 13165                  if (e) (10 !== t && 13 !== t) || (e = !1);
 13166                  else if (37 === t) e = !0;
 13167                  else if (1 !== b[t]) break;
 13168                  t = this.nextChar();
 13169                }
 13170                switch (0 | t) {
 13171                  case 48:
 13172                  case 49:
 13173                  case 50:
 13174                  case 51:
 13175                  case 52:
 13176                  case 53:
 13177                  case 54:
 13178                  case 55:
 13179                  case 56:
 13180                  case 57:
 13181                  case 43:
 13182                  case 45:
 13183                  case 46:
 13184                    return this.getNumber();
 13185                  case 40:
 13186                    return this.getString();
 13187                  case 47:
 13188                    return this.getName();
 13189                  case 91:
 13190                    this.nextChar();
 13191                    return n.Cmd.get("[");
 13192                  case 93:
 13193                    this.nextChar();
 13194                    return n.Cmd.get("]");
 13195                  case 60:
 13196                    t = this.nextChar();
 13197                    if (60 === t) {
 13198                      this.nextChar();
 13199                      return n.Cmd.get("<<");
 13200                    }
 13201                    return this.getHexString();
 13202                  case 62:
 13203                    t = this.nextChar();
 13204                    if (62 === t) {
 13205                      this.nextChar();
 13206                      return n.Cmd.get(">>");
 13207                    }
 13208                    return n.Cmd.get(">");
 13209                  case 123:
 13210                    this.nextChar();
 13211                    return n.Cmd.get("{");
 13212                  case 125:
 13213                    this.nextChar();
 13214                    return n.Cmd.get("}");
 13215                  case 41:
 13216                    this.nextChar();
 13217                    throw new r.FormatError(`Illegal character: ${t}`);
 13218                }
 13219                let a = String.fromCharCode(t);
 13220                if (t < 32 || t > 127) {
 13221                  const e = this.peekChar();
 13222                  if (e >= 32 && e <= 127) {
 13223                    this.nextChar();
 13224                    return n.Cmd.get(a);
 13225                  }
 13226                }
 13227                const i = this.knownCommands;
 13228                let s = void 0 !== i?.[a];
 13229                for (; (t = this.nextChar()) >= 0 && !b[t]; ) {
 13230                  const e = a + String.fromCharCode(t);
 13231                  if (s && void 0 === i[e]) break;
 13232                  if (128 === a.length)
 13233                    throw new r.FormatError(
 13234                      `Command token too long: ${a.length}`,
 13235                    );
 13236                  a = e;
 13237                  s = void 0 !== i?.[a];
 13238                }
 13239                if ("true" === a) return !0;
 13240                if ("false" === a) return !1;
 13241                if ("null" === a) return null;
 13242                "BI" === a && (this.beginInlineImagePos = this.stream.pos);
 13243                return n.Cmd.get(a);
 13244              }
 13245              skipToNextLine() {
 13246                let e = this.currentChar;
 13247                for (; e >= 0; ) {
 13248                  if (13 === e) {
 13249                    e = this.nextChar();
 13250                    10 === e && this.nextChar();
 13251                    break;
 13252                  }
 13253                  if (10 === e) {
 13254                    this.nextChar();
 13255                    break;
 13256                  }
 13257                  e = this.nextChar();
 13258                }
 13259              }
 13260            }
 13261            t.Lexer = Lexer;
 13262            t.Linearization = class Linearization {
 13263              static create(e) {
 13264                function getInt(e, t, a = !1) {
 13265                  const r = e.get(t);
 13266                  if (Number.isInteger(r) && (a ? r >= 0 : r > 0)) return r;
 13267                  throw new Error(
 13268                    `The "${t}" parameter in the linearization dictionary is invalid.`,
 13269                  );
 13270                }
 13271                const t = new Parser({ lexer: new Lexer(e), xref: null }),
 13272                  a = t.getObj(),
 13273                  r = t.getObj(),
 13274                  i = t.getObj(),
 13275                  s = t.getObj();
 13276                let o, c;
 13277                if (
 13278                  !(
 13279                    Number.isInteger(a) &&
 13280                    Number.isInteger(r) &&
 13281                    (0, n.isCmd)(i, "obj") &&
 13282                    s instanceof n.Dict &&
 13283                    "number" == typeof (o = s.get("Linearized")) &&
 13284                    o > 0
 13285                  )
 13286                )
 13287                  return null;
 13288                if ((c = getInt(s, "L")) !== e.length)
 13289                  throw new Error(
 13290                    'The "L" parameter in the linearization dictionary does not equal the stream length.',
 13291                  );
 13292                return {
 13293                  length: c,
 13294                  hints: (function getHints(e) {
 13295                    const t = e.get("H");
 13296                    let a;
 13297                    if (Array.isArray(t) && (2 === (a = t.length) || 4 === a)) {
 13298                      for (let e = 0; e < a; e++) {
 13299                        const a = t[e];
 13300                        if (!(Number.isInteger(a) && a > 0))
 13301                          throw new Error(
 13302                            `Hint (${e}) in the linearization dictionary is invalid.`,
 13303                          );
 13304                      }
 13305                      return t;
 13306                    }
 13307                    throw new Error(
 13308                      "Hint array in the linearization dictionary is invalid.",
 13309                    );
 13310                  })(s),
 13311                  objectNumberFirst: getInt(s, "O"),
 13312                  endFirst: getInt(s, "E"),
 13313                  numPages: getInt(s, "N"),
 13314                  mainXRefEntriesOffset: getInt(s, "T"),
 13315                  pageFirst: s.has("P") ? getInt(s, "P", !0) : 0,
 13316                };
 13317              }
 13318            };
 13319          },
 13320          (e, t, a) => {
 13321            Object.defineProperty(t, "__esModule", { value: !0 });
 13322            t.Ascii85Stream = void 0;
 13323            var r = a(18),
 13324              n = a(3);
 13325            class Ascii85Stream extends r.DecodeStream {
 13326              constructor(e, t) {
 13327                t && (t *= 0.8);
 13328                super(t);
 13329                this.str = e;
 13330                this.dict = e.dict;
 13331                this.input = new Uint8Array(5);
 13332              }
 13333              readBlock() {
 13334                const e = this.str;
 13335                let t = e.getByte();
 13336                for (; (0, n.isWhiteSpace)(t); ) t = e.getByte();
 13337                if (-1 === t || 126 === t) {
 13338                  this.eof = !0;
 13339                  return;
 13340                }
 13341                const a = this.bufferLength;
 13342                let r, i;
 13343                if (122 === t) {
 13344                  r = this.ensureBuffer(a + 4);
 13345                  for (i = 0; i < 4; ++i) r[a + i] = 0;
 13346                  this.bufferLength += 4;
 13347                } else {
 13348                  const s = this.input;
 13349                  s[0] = t;
 13350                  for (i = 1; i < 5; ++i) {
 13351                    t = e.getByte();
 13352                    for (; (0, n.isWhiteSpace)(t); ) t = e.getByte();
 13353                    s[i] = t;
 13354                    if (-1 === t || 126 === t) break;
 13355                  }
 13356                  r = this.ensureBuffer(a + i - 1);
 13357                  this.bufferLength += i - 1;
 13358                  if (i < 5) {
 13359                    for (; i < 5; ++i) s[i] = 117;
 13360                    this.eof = !0;
 13361                  }
 13362                  let o = 0;
 13363                  for (i = 0; i < 5; ++i) o = 85 * o + (s[i] - 33);
 13364                  for (i = 3; i >= 0; --i) {
 13365                    r[a + i] = 255 & o;
 13366                    o >>= 8;
 13367                  }
 13368                }
 13369              }
 13370            }
 13371            t.Ascii85Stream = Ascii85Stream;
 13372          },
 13373          (e, t, a) => {
 13374            Object.defineProperty(t, "__esModule", { value: !0 });
 13375            t.StreamsSequenceStream = t.DecodeStream = void 0;
 13376            var r = a(5),
 13377              n = a(8);
 13378            const i = new Uint8Array(0);
 13379            class DecodeStream extends r.BaseStream {
 13380              constructor(e) {
 13381                super();
 13382                this._rawMinBufferLength = e || 0;
 13383                this.pos = 0;
 13384                this.bufferLength = 0;
 13385                this.eof = !1;
 13386                this.buffer = i;
 13387                this.minBufferLength = 512;
 13388                if (e)
 13389                  for (; this.minBufferLength < e; ) this.minBufferLength *= 2;
 13390              }
 13391              get isEmpty() {
 13392                for (; !this.eof && 0 === this.bufferLength; ) this.readBlock();
 13393                return 0 === this.bufferLength;
 13394              }
 13395              ensureBuffer(e) {
 13396                const t = this.buffer;
 13397                if (e <= t.byteLength) return t;
 13398                let a = this.minBufferLength;
 13399                for (; a < e; ) a *= 2;
 13400                const r = new Uint8Array(a);
 13401                r.set(t);
 13402                return (this.buffer = r);
 13403              }
 13404              getByte() {
 13405                const e = this.pos;
 13406                for (; this.bufferLength <= e; ) {
 13407                  if (this.eof) return -1;
 13408                  this.readBlock();
 13409                }
 13410                return this.buffer[this.pos++];
 13411              }
 13412              getBytes(e) {
 13413                const t = this.pos;
 13414                let a;
 13415                if (e) {
 13416                  this.ensureBuffer(t + e);
 13417                  a = t + e;
 13418                  for (; !this.eof && this.bufferLength < a; ) this.readBlock();
 13419                  const r = this.bufferLength;
 13420                  a > r && (a = r);
 13421                } else {
 13422                  for (; !this.eof; ) this.readBlock();
 13423                  a = this.bufferLength;
 13424                }
 13425                this.pos = a;
 13426                return this.buffer.subarray(t, a);
 13427              }
 13428              reset() {
 13429                this.pos = 0;
 13430              }
 13431              makeSubStream(e, t, a = null) {
 13432                if (void 0 === t) for (; !this.eof; ) this.readBlock();
 13433                else {
 13434                  const a = e + t;
 13435                  for (; this.bufferLength <= a && !this.eof; ) this.readBlock();
 13436                }
 13437                return new n.Stream(this.buffer, e, t, a);
 13438              }
 13439              getBaseStreams() {
 13440                return this.str ? this.str.getBaseStreams() : null;
 13441              }
 13442            }
 13443            t.DecodeStream = DecodeStream;
 13444            t.StreamsSequenceStream = class StreamsSequenceStream extends (
 13445              DecodeStream
 13446            ) {
 13447              constructor(e, t = null) {
 13448                let a = 0;
 13449                for (const t of e)
 13450                  a +=
 13451                    t instanceof DecodeStream ? t._rawMinBufferLength : t.length;
 13452                super(a);
 13453                this.streams = e;
 13454                this._onError = t;
 13455              }
 13456              readBlock() {
 13457                const e = this.streams;
 13458                if (0 === e.length) {
 13459                  this.eof = !0;
 13460                  return;
 13461                }
 13462                const t = e.shift();
 13463                let a;
 13464                try {
 13465                  a = t.getBytes();
 13466                } catch (e) {
 13467                  if (this._onError) {
 13468                    this._onError(e, t.dict?.objId);
 13469                    return;
 13470                  }
 13471                  throw e;
 13472                }
 13473                const r = this.bufferLength,
 13474                  n = r + a.length;
 13475                this.ensureBuffer(n).set(a, r);
 13476                this.bufferLength = n;
 13477              }
 13478              getBaseStreams() {
 13479                const e = [];
 13480                for (const t of this.streams) {
 13481                  const a = t.getBaseStreams();
 13482                  a && e.push(...a);
 13483                }
 13484                return e.length > 0 ? e : null;
 13485              }
 13486            };
 13487          },
 13488          (e, t, a) => {
 13489            Object.defineProperty(t, "__esModule", { value: !0 });
 13490            t.AsciiHexStream = void 0;
 13491            var r = a(18);
 13492            class AsciiHexStream extends r.DecodeStream {
 13493              constructor(e, t) {
 13494                t && (t *= 0.5);
 13495                super(t);
 13496                this.str = e;
 13497                this.dict = e.dict;
 13498                this.firstDigit = -1;
 13499              }
 13500              readBlock() {
 13501                const e = this.str.getBytes(8e3);
 13502                if (!e.length) {
 13503                  this.eof = !0;
 13504                  return;
 13505                }
 13506                const t = (e.length + 1) >> 1,
 13507                  a = this.ensureBuffer(this.bufferLength + t);
 13508                let r = this.bufferLength,
 13509                  n = this.firstDigit;
 13510                for (const t of e) {
 13511                  let e;
 13512                  if (t >= 48 && t <= 57) e = 15 & t;
 13513                  else {
 13514                    if (!((t >= 65 && t <= 70) || (t >= 97 && t <= 102))) {
 13515                      if (62 === t) {
 13516                        this.eof = !0;
 13517                        break;
 13518                      }
 13519                      continue;
 13520                    }
 13521                    e = 9 + (15 & t);
 13522                  }
 13523                  if (n < 0) n = e;
 13524                  else {
 13525                    a[r++] = (n << 4) | e;
 13526                    n = -1;
 13527                  }
 13528                }
 13529                if (n >= 0 && this.eof) {
 13530                  a[r++] = n << 4;
 13531                  n = -1;
 13532                }
 13533                this.firstDigit = n;
 13534                this.bufferLength = r;
 13535              }
 13536            }
 13537            t.AsciiHexStream = AsciiHexStream;
 13538          },
 13539          (e, t, a) => {
 13540            Object.defineProperty(t, "__esModule", { value: !0 });
 13541            t.CCITTFaxStream = void 0;
 13542            var r = a(21),
 13543              n = a(18),
 13544              i = a(4);
 13545            class CCITTFaxStream extends n.DecodeStream {
 13546              constructor(e, t, a) {
 13547                super(t);
 13548                this.str = e;
 13549                this.dict = e.dict;
 13550                a instanceof i.Dict || (a = i.Dict.empty);
 13551                const n = { next: () => e.getByte() };
 13552                this.ccittFaxDecoder = new r.CCITTFaxDecoder(n, {
 13553                  K: a.get("K"),
 13554                  EndOfLine: a.get("EndOfLine"),
 13555                  EncodedByteAlign: a.get("EncodedByteAlign"),
 13556                  Columns: a.get("Columns"),
 13557                  Rows: a.get("Rows"),
 13558                  EndOfBlock: a.get("EndOfBlock"),
 13559                  BlackIs1: a.get("BlackIs1"),
 13560                });
 13561              }
 13562              readBlock() {
 13563                for (; !this.eof; ) {
 13564                  const e = this.ccittFaxDecoder.readNextChar();
 13565                  if (-1 === e) {
 13566                    this.eof = !0;
 13567                    return;
 13568                  }
 13569                  this.ensureBuffer(this.bufferLength + 1);
 13570                  this.buffer[this.bufferLength++] = e;
 13571                }
 13572              }
 13573            }
 13574            t.CCITTFaxStream = CCITTFaxStream;
 13575          },
 13576          (e, t, a) => {
 13577            Object.defineProperty(t, "__esModule", { value: !0 });
 13578            t.CCITTFaxDecoder = void 0;
 13579            var r = a(2);
 13580            const n = -1,
 13581              i = [
 13582                [-1, -1],
 13583                [-1, -1],
 13584                [7, 8],
 13585                [7, 7],
 13586                [6, 6],
 13587                [6, 6],
 13588                [6, 5],
 13589                [6, 5],
 13590                [4, 0],
 13591                [4, 0],
 13592                [4, 0],
 13593                [4, 0],
 13594                [4, 0],
 13595                [4, 0],
 13596                [4, 0],
 13597                [4, 0],
 13598                [3, 1],
 13599                [3, 1],
 13600                [3, 1],
 13601                [3, 1],
 13602                [3, 1],
 13603                [3, 1],
 13604                [3, 1],
 13605                [3, 1],
 13606                [3, 1],
 13607                [3, 1],
 13608                [3, 1],
 13609                [3, 1],
 13610                [3, 1],
 13611                [3, 1],
 13612                [3, 1],
 13613                [3, 1],
 13614                [3, 4],
 13615                [3, 4],
 13616                [3, 4],
 13617                [3, 4],
 13618                [3, 4],
 13619                [3, 4],
 13620                [3, 4],
 13621                [3, 4],
 13622                [3, 4],
 13623                [3, 4],
 13624                [3, 4],
 13625                [3, 4],
 13626                [3, 4],
 13627                [3, 4],
 13628                [3, 4],
 13629                [3, 4],
 13630                [3, 3],
 13631                [3, 3],
 13632                [3, 3],
 13633                [3, 3],
 13634                [3, 3],
 13635                [3, 3],
 13636                [3, 3],
 13637                [3, 3],
 13638                [3, 3],
 13639                [3, 3],
 13640                [3, 3],
 13641                [3, 3],
 13642                [3, 3],
 13643                [3, 3],
 13644                [3, 3],
 13645                [3, 3],
 13646                [1, 2],
 13647                [1, 2],
 13648                [1, 2],
 13649                [1, 2],
 13650                [1, 2],
 13651                [1, 2],
 13652                [1, 2],
 13653                [1, 2],
 13654                [1, 2],
 13655                [1, 2],
 13656                [1, 2],
 13657                [1, 2],
 13658                [1, 2],
 13659                [1, 2],
 13660                [1, 2],
 13661                [1, 2],
 13662                [1, 2],
 13663                [1, 2],
 13664                [1, 2],
 13665                [1, 2],
 13666                [1, 2],
 13667                [1, 2],
 13668                [1, 2],
 13669                [1, 2],
 13670                [1, 2],
 13671                [1, 2],
 13672                [1, 2],
 13673                [1, 2],
 13674                [1, 2],
 13675                [1, 2],
 13676                [1, 2],
 13677                [1, 2],
 13678                [1, 2],
 13679                [1, 2],
 13680                [1, 2],
 13681                [1, 2],
 13682                [1, 2],
 13683                [1, 2],
 13684                [1, 2],
 13685                [1, 2],
 13686                [1, 2],
 13687                [1, 2],
 13688                [1, 2],
 13689                [1, 2],
 13690                [1, 2],
 13691                [1, 2],
 13692                [1, 2],
 13693                [1, 2],
 13694                [1, 2],
 13695                [1, 2],
 13696                [1, 2],
 13697                [1, 2],
 13698                [1, 2],
 13699                [1, 2],
 13700                [1, 2],
 13701                [1, 2],
 13702                [1, 2],
 13703                [1, 2],
 13704                [1, 2],
 13705                [1, 2],
 13706                [1, 2],
 13707                [1, 2],
 13708                [1, 2],
 13709                [1, 2],
 13710              ],
 13711              s = [
 13712                [-1, -1],
 13713                [12, -2],
 13714                [-1, -1],
 13715                [-1, -1],
 13716                [-1, -1],
 13717                [-1, -1],
 13718                [-1, -1],
 13719                [-1, -1],
 13720                [-1, -1],
 13721                [-1, -1],
 13722                [-1, -1],
 13723                [-1, -1],
 13724                [-1, -1],
 13725                [-1, -1],
 13726                [-1, -1],
 13727                [-1, -1],
 13728                [11, 1792],
 13729                [11, 1792],
 13730                [12, 1984],
 13731                [12, 2048],
 13732                [12, 2112],
 13733                [12, 2176],
 13734                [12, 2240],
 13735                [12, 2304],
 13736                [11, 1856],
 13737                [11, 1856],
 13738                [11, 1920],
 13739                [11, 1920],
 13740                [12, 2368],
 13741                [12, 2432],
 13742                [12, 2496],
 13743                [12, 2560],
 13744              ],
 13745              o = [
 13746                [-1, -1],
 13747                [-1, -1],
 13748                [-1, -1],
 13749                [-1, -1],
 13750                [8, 29],
 13751                [8, 29],
 13752                [8, 30],
 13753                [8, 30],
 13754                [8, 45],
 13755                [8, 45],
 13756                [8, 46],
 13757                [8, 46],
 13758                [7, 22],
 13759                [7, 22],
 13760                [7, 22],
 13761                [7, 22],
 13762                [7, 23],
 13763                [7, 23],
 13764                [7, 23],
 13765                [7, 23],
 13766                [8, 47],
 13767                [8, 47],
 13768                [8, 48],
 13769                [8, 48],
 13770                [6, 13],
 13771                [6, 13],
 13772                [6, 13],
 13773                [6, 13],
 13774                [6, 13],
 13775                [6, 13],
 13776                [6, 13],
 13777                [6, 13],
 13778                [7, 20],
 13779                [7, 20],
 13780                [7, 20],
 13781                [7, 20],
 13782                [8, 33],
 13783                [8, 33],
 13784                [8, 34],
 13785                [8, 34],
 13786                [8, 35],
 13787                [8, 35],
 13788                [8, 36],
 13789                [8, 36],
 13790                [8, 37],
 13791                [8, 37],
 13792                [8, 38],
 13793                [8, 38],
 13794                [7, 19],
 13795                [7, 19],
 13796                [7, 19],
 13797                [7, 19],
 13798                [8, 31],
 13799                [8, 31],
 13800                [8, 32],
 13801                [8, 32],
 13802                [6, 1],
 13803                [6, 1],
 13804                [6, 1],
 13805                [6, 1],
 13806                [6, 1],
 13807                [6, 1],
 13808                [6, 1],
 13809                [6, 1],
 13810                [6, 12],
 13811                [6, 12],
 13812                [6, 12],
 13813                [6, 12],
 13814                [6, 12],
 13815                [6, 12],
 13816                [6, 12],
 13817                [6, 12],
 13818                [8, 53],
 13819                [8, 53],
 13820                [8, 54],
 13821                [8, 54],
 13822                [7, 26],
 13823                [7, 26],
 13824                [7, 26],
 13825                [7, 26],
 13826                [8, 39],
 13827                [8, 39],
 13828                [8, 40],
 13829                [8, 40],
 13830                [8, 41],
 13831                [8, 41],
 13832                [8, 42],
 13833                [8, 42],
 13834                [8, 43],
 13835                [8, 43],
 13836                [8, 44],
 13837                [8, 44],
 13838                [7, 21],
 13839                [7, 21],
 13840                [7, 21],
 13841                [7, 21],
 13842                [7, 28],
 13843                [7, 28],
 13844                [7, 28],
 13845                [7, 28],
 13846                [8, 61],
 13847                [8, 61],
 13848                [8, 62],
 13849                [8, 62],
 13850                [8, 63],
 13851                [8, 63],
 13852                [8, 0],
 13853                [8, 0],
 13854                [8, 320],
 13855                [8, 320],
 13856                [8, 384],
 13857                [8, 384],
 13858                [5, 10],
 13859                [5, 10],
 13860                [5, 10],
 13861                [5, 10],
 13862                [5, 10],
 13863                [5, 10],
 13864                [5, 10],
 13865                [5, 10],
 13866                [5, 10],
 13867                [5, 10],
 13868                [5, 10],
 13869                [5, 10],
 13870                [5, 10],
 13871                [5, 10],
 13872                [5, 10],
 13873                [5, 10],
 13874                [5, 11],
 13875                [5, 11],
 13876                [5, 11],
 13877                [5, 11],
 13878                [5, 11],
 13879                [5, 11],
 13880                [5, 11],
 13881                [5, 11],
 13882                [5, 11],
 13883                [5, 11],
 13884                [5, 11],
 13885                [5, 11],
 13886                [5, 11],
 13887                [5, 11],
 13888                [5, 11],
 13889                [5, 11],
 13890                [7, 27],
 13891                [7, 27],
 13892                [7, 27],
 13893                [7, 27],
 13894                [8, 59],
 13895                [8, 59],
 13896                [8, 60],
 13897                [8, 60],
 13898                [9, 1472],
 13899                [9, 1536],
 13900                [9, 1600],
 13901                [9, 1728],
 13902                [7, 18],
 13903                [7, 18],
 13904                [7, 18],
 13905                [7, 18],
 13906                [7, 24],
 13907                [7, 24],
 13908                [7, 24],
 13909                [7, 24],
 13910                [8, 49],
 13911                [8, 49],
 13912                [8, 50],
 13913                [8, 50],
 13914                [8, 51],
 13915                [8, 51],
 13916                [8, 52],
 13917                [8, 52],
 13918                [7, 25],
 13919                [7, 25],
 13920                [7, 25],
 13921                [7, 25],
 13922                [8, 55],
 13923                [8, 55],
 13924                [8, 56],
 13925                [8, 56],
 13926                [8, 57],
 13927                [8, 57],
 13928                [8, 58],
 13929                [8, 58],
 13930                [6, 192],
 13931                [6, 192],
 13932                [6, 192],
 13933                [6, 192],
 13934                [6, 192],
 13935                [6, 192],
 13936                [6, 192],
 13937                [6, 192],
 13938                [6, 1664],
 13939                [6, 1664],
 13940                [6, 1664],
 13941                [6, 1664],
 13942                [6, 1664],
 13943                [6, 1664],
 13944                [6, 1664],
 13945                [6, 1664],
 13946                [8, 448],
 13947                [8, 448],
 13948                [8, 512],
 13949                [8, 512],
 13950                [9, 704],
 13951                [9, 768],
 13952                [8, 640],
 13953                [8, 640],
 13954                [8, 576],
 13955                [8, 576],
 13956                [9, 832],
 13957                [9, 896],
 13958                [9, 960],
 13959                [9, 1024],
 13960                [9, 1088],
 13961                [9, 1152],
 13962                [9, 1216],
 13963                [9, 1280],
 13964                [9, 1344],
 13965                [9, 1408],
 13966                [7, 256],
 13967                [7, 256],
 13968                [7, 256],
 13969                [7, 256],
 13970                [4, 2],
 13971                [4, 2],
 13972                [4, 2],
 13973                [4, 2],
 13974                [4, 2],
 13975                [4, 2],
 13976                [4, 2],
 13977                [4, 2],
 13978                [4, 2],
 13979                [4, 2],
 13980                [4, 2],
 13981                [4, 2],
 13982                [4, 2],
 13983                [4, 2],
 13984                [4, 2],
 13985                [4, 2],
 13986                [4, 2],
 13987                [4, 2],
 13988                [4, 2],
 13989                [4, 2],
 13990                [4, 2],
 13991                [4, 2],
 13992                [4, 2],
 13993                [4, 2],
 13994                [4, 2],
 13995                [4, 2],
 13996                [4, 2],
 13997                [4, 2],
 13998                [4, 2],
 13999                [4, 2],
 14000                [4, 2],
 14001                [4, 2],
 14002                [4, 3],
 14003                [4, 3],
 14004                [4, 3],
 14005                [4, 3],
 14006                [4, 3],
 14007                [4, 3],
 14008                [4, 3],
 14009                [4, 3],
 14010                [4, 3],
 14011                [4, 3],
 14012                [4, 3],
 14013                [4, 3],
 14014                [4, 3],
 14015                [4, 3],
 14016                [4, 3],
 14017                [4, 3],
 14018                [4, 3],
 14019                [4, 3],
 14020                [4, 3],
 14021                [4, 3],
 14022                [4, 3],
 14023                [4, 3],
 14024                [4, 3],
 14025                [4, 3],
 14026                [4, 3],
 14027                [4, 3],
 14028                [4, 3],
 14029                [4, 3],
 14030                [4, 3],
 14031                [4, 3],
 14032                [4, 3],
 14033                [4, 3],
 14034                [5, 128],
 14035                [5, 128],
 14036                [5, 128],
 14037                [5, 128],
 14038                [5, 128],
 14039                [5, 128],
 14040                [5, 128],
 14041                [5, 128],
 14042                [5, 128],
 14043                [5, 128],
 14044                [5, 128],
 14045                [5, 128],
 14046                [5, 128],
 14047                [5, 128],
 14048                [5, 128],
 14049                [5, 128],
 14050                [5, 8],
 14051                [5, 8],
 14052                [5, 8],
 14053                [5, 8],
 14054                [5, 8],
 14055                [5, 8],
 14056                [5, 8],
 14057                [5, 8],
 14058                [5, 8],
 14059                [5, 8],
 14060                [5, 8],
 14061                [5, 8],
 14062                [5, 8],
 14063                [5, 8],
 14064                [5, 8],
 14065                [5, 8],
 14066                [5, 9],
 14067                [5, 9],
 14068                [5, 9],
 14069                [5, 9],
 14070                [5, 9],
 14071                [5, 9],
 14072                [5, 9],
 14073                [5, 9],
 14074                [5, 9],
 14075                [5, 9],
 14076                [5, 9],
 14077                [5, 9],
 14078                [5, 9],
 14079                [5, 9],
 14080                [5, 9],
 14081                [5, 9],
 14082                [6, 16],
 14083                [6, 16],
 14084                [6, 16],
 14085                [6, 16],
 14086                [6, 16],
 14087                [6, 16],
 14088                [6, 16],
 14089                [6, 16],
 14090                [6, 17],
 14091                [6, 17],
 14092                [6, 17],
 14093                [6, 17],
 14094                [6, 17],
 14095                [6, 17],
 14096                [6, 17],
 14097                [6, 17],
 14098                [4, 4],
 14099                [4, 4],
 14100                [4, 4],
 14101                [4, 4],
 14102                [4, 4],
 14103                [4, 4],
 14104                [4, 4],
 14105                [4, 4],
 14106                [4, 4],
 14107                [4, 4],
 14108                [4, 4],
 14109                [4, 4],
 14110                [4, 4],
 14111                [4, 4],
 14112                [4, 4],
 14113                [4, 4],
 14114                [4, 4],
 14115                [4, 4],
 14116                [4, 4],
 14117                [4, 4],
 14118                [4, 4],
 14119                [4, 4],
 14120                [4, 4],
 14121                [4, 4],
 14122                [4, 4],
 14123                [4, 4],
 14124                [4, 4],
 14125                [4, 4],
 14126                [4, 4],
 14127                [4, 4],
 14128                [4, 4],
 14129                [4, 4],
 14130                [4, 5],
 14131                [4, 5],
 14132                [4, 5],
 14133                [4, 5],
 14134                [4, 5],
 14135                [4, 5],
 14136                [4, 5],
 14137                [4, 5],
 14138                [4, 5],
 14139                [4, 5],
 14140                [4, 5],
 14141                [4, 5],
 14142                [4, 5],
 14143                [4, 5],
 14144                [4, 5],
 14145                [4, 5],
 14146                [4, 5],
 14147                [4, 5],
 14148                [4, 5],
 14149                [4, 5],
 14150                [4, 5],
 14151                [4, 5],
 14152                [4, 5],
 14153                [4, 5],
 14154                [4, 5],
 14155                [4, 5],
 14156                [4, 5],
 14157                [4, 5],
 14158                [4, 5],
 14159                [4, 5],
 14160                [4, 5],
 14161                [4, 5],
 14162                [6, 14],
 14163                [6, 14],
 14164                [6, 14],
 14165                [6, 14],
 14166                [6, 14],
 14167                [6, 14],
 14168                [6, 14],
 14169                [6, 14],
 14170                [6, 15],
 14171                [6, 15],
 14172                [6, 15],
 14173                [6, 15],
 14174                [6, 15],
 14175                [6, 15],
 14176                [6, 15],
 14177                [6, 15],
 14178                [5, 64],
 14179                [5, 64],
 14180                [5, 64],
 14181                [5, 64],
 14182                [5, 64],
 14183                [5, 64],
 14184                [5, 64],
 14185                [5, 64],
 14186                [5, 64],
 14187                [5, 64],
 14188                [5, 64],
 14189                [5, 64],
 14190                [5, 64],
 14191                [5, 64],
 14192                [5, 64],
 14193                [5, 64],
 14194                [4, 6],
 14195                [4, 6],
 14196                [4, 6],
 14197                [4, 6],
 14198                [4, 6],
 14199                [4, 6],
 14200                [4, 6],
 14201                [4, 6],
 14202                [4, 6],
 14203                [4, 6],
 14204                [4, 6],
 14205                [4, 6],
 14206                [4, 6],
 14207                [4, 6],
 14208                [4, 6],
 14209                [4, 6],
 14210                [4, 6],
 14211                [4, 6],
 14212                [4, 6],
 14213                [4, 6],
 14214                [4, 6],
 14215                [4, 6],
 14216                [4, 6],
 14217                [4, 6],
 14218                [4, 6],
 14219                [4, 6],
 14220                [4, 6],
 14221                [4, 6],
 14222                [4, 6],
 14223                [4, 6],
 14224                [4, 6],
 14225                [4, 6],
 14226                [4, 7],
 14227                [4, 7],
 14228                [4, 7],
 14229                [4, 7],
 14230                [4, 7],
 14231                [4, 7],
 14232                [4, 7],
 14233                [4, 7],
 14234                [4, 7],
 14235                [4, 7],
 14236                [4, 7],
 14237                [4, 7],
 14238                [4, 7],
 14239                [4, 7],
 14240                [4, 7],
 14241                [4, 7],
 14242                [4, 7],
 14243                [4, 7],
 14244                [4, 7],
 14245                [4, 7],
 14246                [4, 7],
 14247                [4, 7],
 14248                [4, 7],
 14249                [4, 7],
 14250                [4, 7],
 14251                [4, 7],
 14252                [4, 7],
 14253                [4, 7],
 14254                [4, 7],
 14255                [4, 7],
 14256                [4, 7],
 14257                [4, 7],
 14258              ],
 14259              c = [
 14260                [-1, -1],
 14261                [-1, -1],
 14262                [12, -2],
 14263                [12, -2],
 14264                [-1, -1],
 14265                [-1, -1],
 14266                [-1, -1],
 14267                [-1, -1],
 14268                [-1, -1],
 14269                [-1, -1],
 14270                [-1, -1],
 14271                [-1, -1],
 14272                [-1, -1],
 14273                [-1, -1],
 14274                [-1, -1],
 14275                [-1, -1],
 14276                [-1, -1],
 14277                [-1, -1],
 14278                [-1, -1],
 14279                [-1, -1],
 14280                [-1, -1],
 14281                [-1, -1],
 14282                [-1, -1],
 14283                [-1, -1],
 14284                [-1, -1],
 14285                [-1, -1],
 14286                [-1, -1],
 14287                [-1, -1],
 14288                [-1, -1],
 14289                [-1, -1],
 14290                [-1, -1],
 14291                [-1, -1],
 14292                [11, 1792],
 14293                [11, 1792],
 14294                [11, 1792],
 14295                [11, 1792],
 14296                [12, 1984],
 14297                [12, 1984],
 14298                [12, 2048],
 14299                [12, 2048],
 14300                [12, 2112],
 14301                [12, 2112],
 14302                [12, 2176],
 14303                [12, 2176],
 14304                [12, 2240],
 14305                [12, 2240],
 14306                [12, 2304],
 14307                [12, 2304],
 14308                [11, 1856],
 14309                [11, 1856],
 14310                [11, 1856],
 14311                [11, 1856],
 14312                [11, 1920],
 14313                [11, 1920],
 14314                [11, 1920],
 14315                [11, 1920],
 14316                [12, 2368],
 14317                [12, 2368],
 14318                [12, 2432],
 14319                [12, 2432],
 14320                [12, 2496],
 14321                [12, 2496],
 14322                [12, 2560],
 14323                [12, 2560],
 14324                [10, 18],
 14325                [10, 18],
 14326                [10, 18],
 14327                [10, 18],
 14328                [10, 18],
 14329                [10, 18],
 14330                [10, 18],
 14331                [10, 18],
 14332                [12, 52],
 14333                [12, 52],
 14334                [13, 640],
 14335                [13, 704],
 14336                [13, 768],
 14337                [13, 832],
 14338                [12, 55],
 14339                [12, 55],
 14340                [12, 56],
 14341                [12, 56],
 14342                [13, 1280],
 14343                [13, 1344],
 14344                [13, 1408],
 14345                [13, 1472],
 14346                [12, 59],
 14347                [12, 59],
 14348                [12, 60],
 14349                [12, 60],
 14350                [13, 1536],
 14351                [13, 1600],
 14352                [11, 24],
 14353                [11, 24],
 14354                [11, 24],
 14355                [11, 24],
 14356                [11, 25],
 14357                [11, 25],
 14358                [11, 25],
 14359                [11, 25],
 14360                [13, 1664],
 14361                [13, 1728],
 14362                [12, 320],
 14363                [12, 320],
 14364                [12, 384],
 14365                [12, 384],
 14366                [12, 448],
 14367                [12, 448],
 14368                [13, 512],
 14369                [13, 576],
 14370                [12, 53],
 14371                [12, 53],
 14372                [12, 54],
 14373                [12, 54],
 14374                [13, 896],
 14375                [13, 960],
 14376                [13, 1024],
 14377                [13, 1088],
 14378                [13, 1152],
 14379                [13, 1216],
 14380                [10, 64],
 14381                [10, 64],
 14382                [10, 64],
 14383                [10, 64],
 14384                [10, 64],
 14385                [10, 64],
 14386                [10, 64],
 14387                [10, 64],
 14388              ],
 14389              l = [
 14390                [8, 13],
 14391                [8, 13],
 14392                [8, 13],
 14393                [8, 13],
 14394                [8, 13],
 14395                [8, 13],
 14396                [8, 13],
 14397                [8, 13],
 14398                [8, 13],
 14399                [8, 13],
 14400                [8, 13],
 14401                [8, 13],
 14402                [8, 13],
 14403                [8, 13],
 14404                [8, 13],
 14405                [8, 13],
 14406                [11, 23],
 14407                [11, 23],
 14408                [12, 50],
 14409                [12, 51],
 14410                [12, 44],
 14411                [12, 45],
 14412                [12, 46],
 14413                [12, 47],
 14414                [12, 57],
 14415                [12, 58],
 14416                [12, 61],
 14417                [12, 256],
 14418                [10, 16],
 14419                [10, 16],
 14420                [10, 16],
 14421                [10, 16],
 14422                [10, 17],
 14423                [10, 17],
 14424                [10, 17],
 14425                [10, 17],
 14426                [12, 48],
 14427                [12, 49],
 14428                [12, 62],
 14429                [12, 63],
 14430                [12, 30],
 14431                [12, 31],
 14432                [12, 32],
 14433                [12, 33],
 14434                [12, 40],
 14435                [12, 41],
 14436                [11, 22],
 14437                [11, 22],
 14438                [8, 14],
 14439                [8, 14],
 14440                [8, 14],
 14441                [8, 14],
 14442                [8, 14],
 14443                [8, 14],
 14444                [8, 14],
 14445                [8, 14],
 14446                [8, 14],
 14447                [8, 14],
 14448                [8, 14],
 14449                [8, 14],
 14450                [8, 14],
 14451                [8, 14],
 14452                [8, 14],
 14453                [8, 14],
 14454                [7, 10],
 14455                [7, 10],
 14456                [7, 10],
 14457                [7, 10],
 14458                [7, 10],
 14459                [7, 10],
 14460                [7, 10],
 14461                [7, 10],
 14462                [7, 10],
 14463                [7, 10],
 14464                [7, 10],
 14465                [7, 10],
 14466                [7, 10],
 14467                [7, 10],
 14468                [7, 10],
 14469                [7, 10],
 14470                [7, 10],
 14471                [7, 10],
 14472                [7, 10],
 14473                [7, 10],
 14474                [7, 10],
 14475                [7, 10],
 14476                [7, 10],
 14477                [7, 10],
 14478                [7, 10],
 14479                [7, 10],
 14480                [7, 10],
 14481                [7, 10],
 14482                [7, 10],
 14483                [7, 10],
 14484                [7, 10],
 14485                [7, 10],
 14486                [7, 11],
 14487                [7, 11],
 14488                [7, 11],
 14489                [7, 11],
 14490                [7, 11],
 14491                [7, 11],
 14492                [7, 11],
 14493                [7, 11],
 14494                [7, 11],
 14495                [7, 11],
 14496                [7, 11],
 14497                [7, 11],
 14498                [7, 11],
 14499                [7, 11],
 14500                [7, 11],
 14501                [7, 11],
 14502                [7, 11],
 14503                [7, 11],
 14504                [7, 11],
 14505                [7, 11],
 14506                [7, 11],
 14507                [7, 11],
 14508                [7, 11],
 14509                [7, 11],
 14510                [7, 11],
 14511                [7, 11],
 14512                [7, 11],
 14513                [7, 11],
 14514                [7, 11],
 14515                [7, 11],
 14516                [7, 11],
 14517                [7, 11],
 14518                [9, 15],
 14519                [9, 15],
 14520                [9, 15],
 14521                [9, 15],
 14522                [9, 15],
 14523                [9, 15],
 14524                [9, 15],
 14525                [9, 15],
 14526                [12, 128],
 14527                [12, 192],
 14528                [12, 26],
 14529                [12, 27],
 14530                [12, 28],
 14531                [12, 29],
 14532                [11, 19],
 14533                [11, 19],
 14534                [11, 20],
 14535                [11, 20],
 14536                [12, 34],
 14537                [12, 35],
 14538                [12, 36],
 14539                [12, 37],
 14540                [12, 38],
 14541                [12, 39],
 14542                [11, 21],
 14543                [11, 21],
 14544                [12, 42],
 14545                [12, 43],
 14546                [10, 0],
 14547                [10, 0],
 14548                [10, 0],
 14549                [10, 0],
 14550                [7, 12],
 14551                [7, 12],
 14552                [7, 12],
 14553                [7, 12],
 14554                [7, 12],
 14555                [7, 12],
 14556                [7, 12],
 14557                [7, 12],
 14558                [7, 12],
 14559                [7, 12],
 14560                [7, 12],
 14561                [7, 12],
 14562                [7, 12],
 14563                [7, 12],
 14564                [7, 12],
 14565                [7, 12],
 14566                [7, 12],
 14567                [7, 12],
 14568                [7, 12],
 14569                [7, 12],
 14570                [7, 12],
 14571                [7, 12],
 14572                [7, 12],
 14573                [7, 12],
 14574                [7, 12],
 14575                [7, 12],
 14576                [7, 12],
 14577                [7, 12],
 14578                [7, 12],
 14579                [7, 12],
 14580                [7, 12],
 14581                [7, 12],
 14582              ],
 14583              h = [
 14584                [-1, -1],
 14585                [-1, -1],
 14586                [-1, -1],
 14587                [-1, -1],
 14588                [6, 9],
 14589                [6, 8],
 14590                [5, 7],
 14591                [5, 7],
 14592                [4, 6],
 14593                [4, 6],
 14594                [4, 6],
 14595                [4, 6],
 14596                [4, 5],
 14597                [4, 5],
 14598                [4, 5],
 14599                [4, 5],
 14600                [3, 1],
 14601                [3, 1],
 14602                [3, 1],
 14603                [3, 1],
 14604                [3, 1],
 14605                [3, 1],
 14606                [3, 1],
 14607                [3, 1],
 14608                [3, 4],
 14609                [3, 4],
 14610                [3, 4],
 14611                [3, 4],
 14612                [3, 4],
 14613                [3, 4],
 14614                [3, 4],
 14615                [3, 4],
 14616                [2, 3],
 14617                [2, 3],
 14618                [2, 3],
 14619                [2, 3],
 14620                [2, 3],
 14621                [2, 3],
 14622                [2, 3],
 14623                [2, 3],
 14624                [2, 3],
 14625                [2, 3],
 14626                [2, 3],
 14627                [2, 3],
 14628                [2, 3],
 14629                [2, 3],
 14630                [2, 3],
 14631                [2, 3],
 14632                [2, 2],
 14633                [2, 2],
 14634                [2, 2],
 14635                [2, 2],
 14636                [2, 2],
 14637                [2, 2],
 14638                [2, 2],
 14639                [2, 2],
 14640                [2, 2],
 14641                [2, 2],
 14642                [2, 2],
 14643                [2, 2],
 14644                [2, 2],
 14645                [2, 2],
 14646                [2, 2],
 14647                [2, 2],
 14648              ];
 14649            t.CCITTFaxDecoder = class CCITTFaxDecoder {
 14650              constructor(e, t = {}) {
 14651                if (!e || "function" != typeof e.next)
 14652                  throw new Error(
 14653                    'CCITTFaxDecoder - invalid "source" parameter.',
 14654                  );
 14655                this.source = e;
 14656                this.eof = !1;
 14657                this.encoding = t.K || 0;
 14658                this.eoline = t.EndOfLine || !1;
 14659                this.byteAlign = t.EncodedByteAlign || !1;
 14660                this.columns = t.Columns || 1728;
 14661                this.rows = t.Rows || 0;
 14662                this.eoblock = t.EndOfBlock ?? !0;
 14663                this.black = t.BlackIs1 || !1;
 14664                this.codingLine = new Uint32Array(this.columns + 1);
 14665                this.refLine = new Uint32Array(this.columns + 2);
 14666                this.codingLine[0] = this.columns;
 14667                this.codingPos = 0;
 14668                this.row = 0;
 14669                this.nextLine2D = this.encoding < 0;
 14670                this.inputBits = 0;
 14671                this.inputBuf = 0;
 14672                this.outputBits = 0;
 14673                this.rowsDone = !1;
 14674                let a;
 14675                for (; 0 === (a = this._lookBits(12)); ) this._eatBits(1);
 14676                1 === a && this._eatBits(12);
 14677                if (this.encoding > 0) {
 14678                  this.nextLine2D = !this._lookBits(1);
 14679                  this._eatBits(1);
 14680                }
 14681              }
 14682              readNextChar() {
 14683                if (this.eof) return -1;
 14684                const e = this.refLine,
 14685                  t = this.codingLine,
 14686                  a = this.columns;
 14687                let i, s, o, c, l;
 14688                if (0 === this.outputBits) {
 14689                  this.rowsDone && (this.eof = !0);
 14690                  if (this.eof) return -1;
 14691                  this.err = !1;
 14692                  let o, l, h;
 14693                  if (this.nextLine2D) {
 14694                    for (c = 0; t[c] < a; ++c) e[c] = t[c];
 14695                    e[c++] = a;
 14696                    e[c] = a;
 14697                    t[0] = 0;
 14698                    this.codingPos = 0;
 14699                    i = 0;
 14700                    s = 0;
 14701                    for (; t[this.codingPos] < a; ) {
 14702                      o = this._getTwoDimCode();
 14703                      switch (o) {
 14704                        case 0:
 14705                          this._addPixels(e[i + 1], s);
 14706                          e[i + 1] < a && (i += 2);
 14707                          break;
 14708                        case 1:
 14709                          o = l = 0;
 14710                          if (s) {
 14711                            do {
 14712                              o += h = this._getBlackCode();
 14713                            } while (h >= 64);
 14714                            do {
 14715                              l += h = this._getWhiteCode();
 14716                            } while (h >= 64);
 14717                          } else {
 14718                            do {
 14719                              o += h = this._getWhiteCode();
 14720                            } while (h >= 64);
 14721                            do {
 14722                              l += h = this._getBlackCode();
 14723                            } while (h >= 64);
 14724                          }
 14725                          this._addPixels(t[this.codingPos] + o, s);
 14726                          t[this.codingPos] < a &&
 14727                            this._addPixels(t[this.codingPos] + l, 1 ^ s);
 14728                          for (; e[i] <= t[this.codingPos] && e[i] < a; ) i += 2;
 14729                          break;
 14730                        case 7:
 14731                          this._addPixels(e[i] + 3, s);
 14732                          s ^= 1;
 14733                          if (t[this.codingPos] < a) {
 14734                            ++i;
 14735                            for (; e[i] <= t[this.codingPos] && e[i] < a; )
 14736                              i += 2;
 14737                          }
 14738                          break;
 14739                        case 5:
 14740                          this._addPixels(e[i] + 2, s);
 14741                          s ^= 1;
 14742                          if (t[this.codingPos] < a) {
 14743                            ++i;
 14744                            for (; e[i] <= t[this.codingPos] && e[i] < a; )
 14745                              i += 2;
 14746                          }
 14747                          break;
 14748                        case 3:
 14749                          this._addPixels(e[i] + 1, s);
 14750                          s ^= 1;
 14751                          if (t[this.codingPos] < a) {
 14752                            ++i;
 14753                            for (; e[i] <= t[this.codingPos] && e[i] < a; )
 14754                              i += 2;
 14755                          }
 14756                          break;
 14757                        case 2:
 14758                          this._addPixels(e[i], s);
 14759                          s ^= 1;
 14760                          if (t[this.codingPos] < a) {
 14761                            ++i;
 14762                            for (; e[i] <= t[this.codingPos] && e[i] < a; )
 14763                              i += 2;
 14764                          }
 14765                          break;
 14766                        case 8:
 14767                          this._addPixelsNeg(e[i] - 3, s);
 14768                          s ^= 1;
 14769                          if (t[this.codingPos] < a) {
 14770                            i > 0 ? --i : ++i;
 14771                            for (; e[i] <= t[this.codingPos] && e[i] < a; )
 14772                              i += 2;
 14773                          }
 14774                          break;
 14775                        case 6:
 14776                          this._addPixelsNeg(e[i] - 2, s);
 14777                          s ^= 1;
 14778                          if (t[this.codingPos] < a) {
 14779                            i > 0 ? --i : ++i;
 14780                            for (; e[i] <= t[this.codingPos] && e[i] < a; )
 14781                              i += 2;
 14782                          }
 14783                          break;
 14784                        case 4:
 14785                          this._addPixelsNeg(e[i] - 1, s);
 14786                          s ^= 1;
 14787                          if (t[this.codingPos] < a) {
 14788                            i > 0 ? --i : ++i;
 14789                            for (; e[i] <= t[this.codingPos] && e[i] < a; )
 14790                              i += 2;
 14791                          }
 14792                          break;
 14793                        case n:
 14794                          this._addPixels(a, 0);
 14795                          this.eof = !0;
 14796                          break;
 14797                        default:
 14798                          (0, r.info)("bad 2d code");
 14799                          this._addPixels(a, 0);
 14800                          this.err = !0;
 14801                      }
 14802                    }
 14803                  } else {
 14804                    t[0] = 0;
 14805                    this.codingPos = 0;
 14806                    s = 0;
 14807                    for (; t[this.codingPos] < a; ) {
 14808                      o = 0;
 14809                      if (s)
 14810                        do {
 14811                          o += h = this._getBlackCode();
 14812                        } while (h >= 64);
 14813                      else
 14814                        do {
 14815                          o += h = this._getWhiteCode();
 14816                        } while (h >= 64);
 14817                      this._addPixels(t[this.codingPos] + o, s);
 14818                      s ^= 1;
 14819                    }
 14820                  }
 14821                  let u = !1;
 14822                  this.byteAlign && (this.inputBits &= -8);
 14823                  if (this.eoblock || this.row !== this.rows - 1) {
 14824                    o = this._lookBits(12);
 14825                    if (this.eoline)
 14826                      for (; o !== n && 1 !== o; ) {
 14827                        this._eatBits(1);
 14828                        o = this._lookBits(12);
 14829                      }
 14830                    else
 14831                      for (; 0 === o; ) {
 14832                        this._eatBits(1);
 14833                        o = this._lookBits(12);
 14834                      }
 14835                    if (1 === o) {
 14836                      this._eatBits(12);
 14837                      u = !0;
 14838                    } else o === n && (this.eof = !0);
 14839                  } else this.rowsDone = !0;
 14840                  if (!this.eof && this.encoding > 0 && !this.rowsDone) {
 14841                    this.nextLine2D = !this._lookBits(1);
 14842                    this._eatBits(1);
 14843                  }
 14844                  if (this.eoblock && u && this.byteAlign) {
 14845                    o = this._lookBits(12);
 14846                    if (1 === o) {
 14847                      this._eatBits(12);
 14848                      if (this.encoding > 0) {
 14849                        this._lookBits(1);
 14850                        this._eatBits(1);
 14851                      }
 14852                      if (this.encoding >= 0)
 14853                        for (c = 0; c < 4; ++c) {
 14854                          o = this._lookBits(12);
 14855                          1 !== o && (0, r.info)("bad rtc code: " + o);
 14856                          this._eatBits(12);
 14857                          if (this.encoding > 0) {
 14858                            this._lookBits(1);
 14859                            this._eatBits(1);
 14860                          }
 14861                        }
 14862                      this.eof = !0;
 14863                    }
 14864                  } else if (this.err && this.eoline) {
 14865                    for (;;) {
 14866                      o = this._lookBits(13);
 14867                      if (o === n) {
 14868                        this.eof = !0;
 14869                        return -1;
 14870                      }
 14871                      if (o >> 1 == 1) break;
 14872                      this._eatBits(1);
 14873                    }
 14874                    this._eatBits(12);
 14875                    if (this.encoding > 0) {
 14876                      this._eatBits(1);
 14877                      this.nextLine2D = !(1 & o);
 14878                    }
 14879                  }
 14880                  this.outputBits =
 14881                    t[0] > 0 ? t[(this.codingPos = 0)] : t[(this.codingPos = 1)];
 14882                  this.row++;
 14883                }
 14884                if (this.outputBits >= 8) {
 14885                  l = 1 & this.codingPos ? 0 : 255;
 14886                  this.outputBits -= 8;
 14887                  if (0 === this.outputBits && t[this.codingPos] < a) {
 14888                    this.codingPos++;
 14889                    this.outputBits = t[this.codingPos] - t[this.codingPos - 1];
 14890                  }
 14891                } else {
 14892                  o = 8;
 14893                  l = 0;
 14894                  do {
 14895                    if ("number" != typeof this.outputBits)
 14896                      throw new r.FormatError(
 14897                        'Invalid /CCITTFaxDecode data, "outputBits" must be a number.',
 14898                      );
 14899                    if (this.outputBits > o) {
 14900                      l <<= o;
 14901                      1 & this.codingPos || (l |= 255 >> (8 - o));
 14902                      this.outputBits -= o;
 14903                      o = 0;
 14904                    } else {
 14905                      l <<= this.outputBits;
 14906                      1 & this.codingPos || (l |= 255 >> (8 - this.outputBits));
 14907                      o -= this.outputBits;
 14908                      this.outputBits = 0;
 14909                      if (t[this.codingPos] < a) {
 14910                        this.codingPos++;
 14911                        this.outputBits =
 14912                          t[this.codingPos] - t[this.codingPos - 1];
 14913                      } else if (o > 0) {
 14914                        l <<= o;
 14915                        o = 0;
 14916                      }
 14917                    }
 14918                  } while (o);
 14919                }
 14920                this.black && (l ^= 255);
 14921                return l;
 14922              }
 14923              _addPixels(e, t) {
 14924                const a = this.codingLine;
 14925                let n = this.codingPos;
 14926                if (e > a[n]) {
 14927                  if (e > this.columns) {
 14928                    (0, r.info)("row is wrong length");
 14929                    this.err = !0;
 14930                    e = this.columns;
 14931                  }
 14932                  (1 & n) ^ t && ++n;
 14933                  a[n] = e;
 14934                }
 14935                this.codingPos = n;
 14936              }
 14937              _addPixelsNeg(e, t) {
 14938                const a = this.codingLine;
 14939                let n = this.codingPos;
 14940                if (e > a[n]) {
 14941                  if (e > this.columns) {
 14942                    (0, r.info)("row is wrong length");
 14943                    this.err = !0;
 14944                    e = this.columns;
 14945                  }
 14946                  (1 & n) ^ t && ++n;
 14947                  a[n] = e;
 14948                } else if (e < a[n]) {
 14949                  if (e < 0) {
 14950                    (0, r.info)("invalid code");
 14951                    this.err = !0;
 14952                    e = 0;
 14953                  }
 14954                  for (; n > 0 && e < a[n - 1]; ) --n;
 14955                  a[n] = e;
 14956                }
 14957                this.codingPos = n;
 14958              }
 14959              _findTableCode(e, t, a, r) {
 14960                const i = r || 0;
 14961                for (let r = e; r <= t; ++r) {
 14962                  let e = this._lookBits(r);
 14963                  if (e === n) return [!0, 1, !1];
 14964                  r < t && (e <<= t - r);
 14965                  if (!i || e >= i) {
 14966                    const t = a[e - i];
 14967                    if (t[0] === r) {
 14968                      this._eatBits(r);
 14969                      return [!0, t[1], !0];
 14970                    }
 14971                  }
 14972                }
 14973                return [!1, 0, !1];
 14974              }
 14975              _getTwoDimCode() {
 14976                let e,
 14977                  t = 0;
 14978                if (this.eoblock) {
 14979                  t = this._lookBits(7);
 14980                  e = i[t];
 14981                  if (e?.[0] > 0) {
 14982                    this._eatBits(e[0]);
 14983                    return e[1];
 14984                  }
 14985                } else {
 14986                  const e = this._findTableCode(1, 7, i);
 14987                  if (e[0] && e[2]) return e[1];
 14988                }
 14989                (0, r.info)("Bad two dim code");
 14990                return n;
 14991              }
 14992              _getWhiteCode() {
 14993                let e,
 14994                  t = 0;
 14995                if (this.eoblock) {
 14996                  t = this._lookBits(12);
 14997                  if (t === n) return 1;
 14998                  e = t >> 5 == 0 ? s[t] : o[t >> 3];
 14999                  if (e[0] > 0) {
 15000                    this._eatBits(e[0]);
 15001                    return e[1];
 15002                  }
 15003                } else {
 15004                  let e = this._findTableCode(1, 9, o);
 15005                  if (e[0]) return e[1];
 15006                  e = this._findTableCode(11, 12, s);
 15007                  if (e[0]) return e[1];
 15008                }
 15009                (0, r.info)("bad white code");
 15010                this._eatBits(1);
 15011                return 1;
 15012              }
 15013              _getBlackCode() {
 15014                let e, t;
 15015                if (this.eoblock) {
 15016                  e = this._lookBits(13);
 15017                  if (e === n) return 1;
 15018                  t =
 15019                    e >> 7 == 0
 15020                      ? c[e]
 15021                      : e >> 9 == 0 && e >> 7 != 0
 15022                        ? l[(e >> 1) - 64]
 15023                        : h[e >> 7];
 15024                  if (t[0] > 0) {
 15025                    this._eatBits(t[0]);
 15026                    return t[1];
 15027                  }
 15028                } else {
 15029                  let e = this._findTableCode(2, 6, h);
 15030                  if (e[0]) return e[1];
 15031                  e = this._findTableCode(7, 12, l, 64);
 15032                  if (e[0]) return e[1];
 15033                  e = this._findTableCode(10, 13, c);
 15034                  if (e[0]) return e[1];
 15035                }
 15036                (0, r.info)("bad black code");
 15037                this._eatBits(1);
 15038                return 1;
 15039              }
 15040              _lookBits(e) {
 15041                let t;
 15042                for (; this.inputBits < e; ) {
 15043                  if (-1 === (t = this.source.next()))
 15044                    return 0 === this.inputBits
 15045                      ? n
 15046                      : (this.inputBuf << (e - this.inputBits)) &
 15047                          (65535 >> (16 - e));
 15048                  this.inputBuf = (this.inputBuf << 8) | t;
 15049                  this.inputBits += 8;
 15050                }
 15051                return (
 15052                  (this.inputBuf >> (this.inputBits - e)) & (65535 >> (16 - e))
 15053                );
 15054              }
 15055              _eatBits(e) {
 15056                (this.inputBits -= e) < 0 && (this.inputBits = 0);
 15057              }
 15058            };
 15059          },
 15060          (e, t, a) => {
 15061            Object.defineProperty(t, "__esModule", { value: !0 });
 15062            t.FlateStream = void 0;
 15063            var r = a(18),
 15064              n = a(2);
 15065            const i = new Int32Array([
 15066                16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15,
 15067              ]),
 15068              s = new Int32Array([
 15069                3, 4, 5, 6, 7, 8, 9, 10, 65547, 65549, 65551, 65553, 131091,
 15070                131095, 131099, 131103, 196643, 196651, 196659, 196667, 262211,
 15071                262227, 262243, 262259, 327811, 327843, 327875, 327907, 258, 258,
 15072                258,
 15073              ]),
 15074              o = new Int32Array([
 15075                1, 2, 3, 4, 65541, 65543, 131081, 131085, 196625, 196633, 262177,
 15076                262193, 327745, 327777, 393345, 393409, 459009, 459137, 524801,
 15077                525057, 590849, 591361, 657409, 658433, 724993, 727041, 794625,
 15078                798721, 868353, 876545,
 15079              ]),
 15080              c = [
 15081                new Int32Array([
 15082                  459008, 524368, 524304, 524568, 459024, 524400, 524336, 590016,
 15083                  459016, 524384, 524320, 589984, 524288, 524416, 524352, 590048,
 15084                  459012, 524376, 524312, 589968, 459028, 524408, 524344, 590032,
 15085                  459020, 524392, 524328, 59e4, 524296, 524424, 524360, 590064,
 15086                  459010, 524372, 524308, 524572, 459026, 524404, 524340, 590024,
 15087                  459018, 524388, 524324, 589992, 524292, 524420, 524356, 590056,
 15088                  459014, 524380, 524316, 589976, 459030, 524412, 524348, 590040,
 15089                  459022, 524396, 524332, 590008, 524300, 524428, 524364, 590072,
 15090                  459009, 524370, 524306, 524570, 459025, 524402, 524338, 590020,
 15091                  459017, 524386, 524322, 589988, 524290, 524418, 524354, 590052,
 15092                  459013, 524378, 524314, 589972, 459029, 524410, 524346, 590036,
 15093                  459021, 524394, 524330, 590004, 524298, 524426, 524362, 590068,
 15094                  459011, 524374, 524310, 524574, 459027, 524406, 524342, 590028,
 15095                  459019, 524390, 524326, 589996, 524294, 524422, 524358, 590060,
 15096                  459015, 524382, 524318, 589980, 459031, 524414, 524350, 590044,
 15097                  459023, 524398, 524334, 590012, 524302, 524430, 524366, 590076,
 15098                  459008, 524369, 524305, 524569, 459024, 524401, 524337, 590018,
 15099                  459016, 524385, 524321, 589986, 524289, 524417, 524353, 590050,
 15100                  459012, 524377, 524313, 589970, 459028, 524409, 524345, 590034,
 15101                  459020, 524393, 524329, 590002, 524297, 524425, 524361, 590066,
 15102                  459010, 524373, 524309, 524573, 459026, 524405, 524341, 590026,
 15103                  459018, 524389, 524325, 589994, 524293, 524421, 524357, 590058,
 15104                  459014, 524381, 524317, 589978, 459030, 524413, 524349, 590042,
 15105                  459022, 524397, 524333, 590010, 524301, 524429, 524365, 590074,
 15106                  459009, 524371, 524307, 524571, 459025, 524403, 524339, 590022,
 15107                  459017, 524387, 524323, 589990, 524291, 524419, 524355, 590054,
 15108                  459013, 524379, 524315, 589974, 459029, 524411, 524347, 590038,
 15109                  459021, 524395, 524331, 590006, 524299, 524427, 524363, 590070,
 15110                  459011, 524375, 524311, 524575, 459027, 524407, 524343, 590030,
 15111                  459019, 524391, 524327, 589998, 524295, 524423, 524359, 590062,
 15112                  459015, 524383, 524319, 589982, 459031, 524415, 524351, 590046,
 15113                  459023, 524399, 524335, 590014, 524303, 524431, 524367, 590078,
 15114                  459008, 524368, 524304, 524568, 459024, 524400, 524336, 590017,
 15115                  459016, 524384, 524320, 589985, 524288, 524416, 524352, 590049,
 15116                  459012, 524376, 524312, 589969, 459028, 524408, 524344, 590033,
 15117                  459020, 524392, 524328, 590001, 524296, 524424, 524360, 590065,
 15118                  459010, 524372, 524308, 524572, 459026, 524404, 524340, 590025,
 15119                  459018, 524388, 524324, 589993, 524292, 524420, 524356, 590057,
 15120                  459014, 524380, 524316, 589977, 459030, 524412, 524348, 590041,
 15121                  459022, 524396, 524332, 590009, 524300, 524428, 524364, 590073,
 15122                  459009, 524370, 524306, 524570, 459025, 524402, 524338, 590021,
 15123                  459017, 524386, 524322, 589989, 524290, 524418, 524354, 590053,
 15124                  459013, 524378, 524314, 589973, 459029, 524410, 524346, 590037,
 15125                  459021, 524394, 524330, 590005, 524298, 524426, 524362, 590069,
 15126                  459011, 524374, 524310, 524574, 459027, 524406, 524342, 590029,
 15127                  459019, 524390, 524326, 589997, 524294, 524422, 524358, 590061,
 15128                  459015, 524382, 524318, 589981, 459031, 524414, 524350, 590045,
 15129                  459023, 524398, 524334, 590013, 524302, 524430, 524366, 590077,
 15130                  459008, 524369, 524305, 524569, 459024, 524401, 524337, 590019,
 15131                  459016, 524385, 524321, 589987, 524289, 524417, 524353, 590051,
 15132                  459012, 524377, 524313, 589971, 459028, 524409, 524345, 590035,
 15133                  459020, 524393, 524329, 590003, 524297, 524425, 524361, 590067,
 15134                  459010, 524373, 524309, 524573, 459026, 524405, 524341, 590027,
 15135                  459018, 524389, 524325, 589995, 524293, 524421, 524357, 590059,
 15136                  459014, 524381, 524317, 589979, 459030, 524413, 524349, 590043,
 15137                  459022, 524397, 524333, 590011, 524301, 524429, 524365, 590075,
 15138                  459009, 524371, 524307, 524571, 459025, 524403, 524339, 590023,
 15139                  459017, 524387, 524323, 589991, 524291, 524419, 524355, 590055,
 15140                  459013, 524379, 524315, 589975, 459029, 524411, 524347, 590039,
 15141                  459021, 524395, 524331, 590007, 524299, 524427, 524363, 590071,
 15142                  459011, 524375, 524311, 524575, 459027, 524407, 524343, 590031,
 15143                  459019, 524391, 524327, 589999, 524295, 524423, 524359, 590063,
 15144                  459015, 524383, 524319, 589983, 459031, 524415, 524351, 590047,
 15145                  459023, 524399, 524335, 590015, 524303, 524431, 524367, 590079,
 15146                ]),
 15147                9,
 15148              ],
 15149              l = [
 15150                new Int32Array([
 15151                  327680, 327696, 327688, 327704, 327684, 327700, 327692, 327708,
 15152                  327682, 327698, 327690, 327706, 327686, 327702, 327694, 0,
 15153                  327681, 327697, 327689, 327705, 327685, 327701, 327693, 327709,
 15154                  327683, 327699, 327691, 327707, 327687, 327703, 327695, 0,
 15155                ]),
 15156                5,
 15157              ];
 15158            class FlateStream extends r.DecodeStream {
 15159              constructor(e, t) {
 15160                super(t);
 15161                this.str = e;
 15162                this.dict = e.dict;
 15163                const a = e.getByte(),
 15164                  r = e.getByte();
 15165                if (-1 === a || -1 === r)
 15166                  throw new n.FormatError(
 15167                    `Invalid header in flate stream: ${a}, ${r}`,
 15168                  );
 15169                if (8 != (15 & a))
 15170                  throw new n.FormatError(
 15171                    `Unknown compression method in flate stream: ${a}, ${r}`,
 15172                  );
 15173                if (((a << 8) + r) % 31 != 0)
 15174                  throw new n.FormatError(
 15175                    `Bad FCHECK in flate stream: ${a}, ${r}`,
 15176                  );
 15177                if (32 & r)
 15178                  throw new n.FormatError(
 15179                    `FDICT bit set in flate stream: ${a}, ${r}`,
 15180                  );
 15181                this.codeSize = 0;
 15182                this.codeBuf = 0;
 15183              }
 15184              getBits(e) {
 15185                const t = this.str;
 15186                let a,
 15187                  r = this.codeSize,
 15188                  i = this.codeBuf;
 15189                for (; r < e; ) {
 15190                  if (-1 === (a = t.getByte()))
 15191                    throw new n.FormatError("Bad encoding in flate stream");
 15192                  i |= a << r;
 15193                  r += 8;
 15194                }
 15195                a = i & ((1 << e) - 1);
 15196                this.codeBuf = i >> e;
 15197                this.codeSize = r -= e;
 15198                return a;
 15199              }
 15200              getCode(e) {
 15201                const t = this.str,
 15202                  a = e[0],
 15203                  r = e[1];
 15204                let i,
 15205                  s = this.codeSize,
 15206                  o = this.codeBuf;
 15207                for (; s < r && -1 !== (i = t.getByte()); ) {
 15208                  o |= i << s;
 15209                  s += 8;
 15210                }
 15211                const c = a[o & ((1 << r) - 1)],
 15212                  l = c >> 16,
 15213                  h = 65535 & c;
 15214                if (l < 1 || s < l)
 15215                  throw new n.FormatError("Bad encoding in flate stream");
 15216                this.codeBuf = o >> l;
 15217                this.codeSize = s - l;
 15218                return h;
 15219              }
 15220              generateHuffmanTable(e) {
 15221                const t = e.length;
 15222                let a,
 15223                  r = 0;
 15224                for (a = 0; a < t; ++a) e[a] > r && (r = e[a]);
 15225                const n = 1 << r,
 15226                  i = new Int32Array(n);
 15227                for (let s = 1, o = 0, c = 2; s <= r; ++s, o <<= 1, c <<= 1)
 15228                  for (let r = 0; r < t; ++r)
 15229                    if (e[r] === s) {
 15230                      let e = 0,
 15231                        t = o;
 15232                      for (a = 0; a < s; ++a) {
 15233                        e = (e << 1) | (1 & t);
 15234                        t >>= 1;
 15235                      }
 15236                      for (a = e; a < n; a += c) i[a] = (s << 16) | r;
 15237                      ++o;
 15238                    }
 15239                return [i, r];
 15240              }
 15241              readBlock() {
 15242                let e, t;
 15243                const a = this.str;
 15244                let r,
 15245                  h,
 15246                  u = this.getBits(3);
 15247                1 & u && (this.eof = !0);
 15248                u >>= 1;
 15249                if (0 === u) {
 15250                  let t;
 15251                  if (-1 === (t = a.getByte()))
 15252                    throw new n.FormatError("Bad block header in flate stream");
 15253                  let r = t;
 15254                  if (-1 === (t = a.getByte()))
 15255                    throw new n.FormatError("Bad block header in flate stream");
 15256                  r |= t << 8;
 15257                  if (-1 === (t = a.getByte()))
 15258                    throw new n.FormatError("Bad block header in flate stream");
 15259                  let i = t;
 15260                  if (-1 === (t = a.getByte()))
 15261                    throw new n.FormatError("Bad block header in flate stream");
 15262                  i |= t << 8;
 15263                  if (i !== (65535 & ~r) && (0 !== r || 0 !== i))
 15264                    throw new n.FormatError(
 15265                      "Bad uncompressed block length in flate stream",
 15266                    );
 15267                  this.codeBuf = 0;
 15268                  this.codeSize = 0;
 15269                  const s = this.bufferLength,
 15270                    o = s + r;
 15271                  e = this.ensureBuffer(o);
 15272                  this.bufferLength = o;
 15273                  if (0 === r) -1 === a.peekByte() && (this.eof = !0);
 15274                  else {
 15275                    const t = a.getBytes(r);
 15276                    e.set(t, s);
 15277                    t.length < r && (this.eof = !0);
 15278                  }
 15279                  return;
 15280                }
 15281                if (1 === u) {
 15282                  r = c;
 15283                  h = l;
 15284                } else {
 15285                  if (2 !== u)
 15286                    throw new n.FormatError("Unknown block type in flate stream");
 15287                  {
 15288                    const e = this.getBits(5) + 257,
 15289                      a = this.getBits(5) + 1,
 15290                      n = this.getBits(4) + 4,
 15291                      s = new Uint8Array(i.length);
 15292                    let o;
 15293                    for (o = 0; o < n; ++o) s[i[o]] = this.getBits(3);
 15294                    const c = this.generateHuffmanTable(s);
 15295                    t = 0;
 15296                    o = 0;
 15297                    const l = e + a,
 15298                      u = new Uint8Array(l);
 15299                    let d, f, g;
 15300                    for (; o < l; ) {
 15301                      const e = this.getCode(c);
 15302                      if (16 === e) {
 15303                        d = 2;
 15304                        f = 3;
 15305                        g = t;
 15306                      } else if (17 === e) {
 15307                        d = 3;
 15308                        f = 3;
 15309                        g = t = 0;
 15310                      } else {
 15311                        if (18 !== e) {
 15312                          u[o++] = t = e;
 15313                          continue;
 15314                        }
 15315                        d = 7;
 15316                        f = 11;
 15317                        g = t = 0;
 15318                      }
 15319                      let a = this.getBits(d) + f;
 15320                      for (; a-- > 0; ) u[o++] = g;
 15321                    }
 15322                    r = this.generateHuffmanTable(u.subarray(0, e));
 15323                    h = this.generateHuffmanTable(u.subarray(e, l));
 15324                  }
 15325                }
 15326                e = this.buffer;
 15327                let d = e ? e.length : 0,
 15328                  f = this.bufferLength;
 15329                for (;;) {
 15330                  let a = this.getCode(r);
 15331                  if (a < 256) {
 15332                    if (f + 1 >= d) {
 15333                      e = this.ensureBuffer(f + 1);
 15334                      d = e.length;
 15335                    }
 15336                    e[f++] = a;
 15337                    continue;
 15338                  }
 15339                  if (256 === a) {
 15340                    this.bufferLength = f;
 15341                    return;
 15342                  }
 15343                  a -= 257;
 15344                  a = s[a];
 15345                  let n = a >> 16;
 15346                  n > 0 && (n = this.getBits(n));
 15347                  t = (65535 & a) + n;
 15348                  a = this.getCode(h);
 15349                  a = o[a];
 15350                  n = a >> 16;
 15351                  n > 0 && (n = this.getBits(n));
 15352                  const i = (65535 & a) + n;
 15353                  if (f + t >= d) {
 15354                    e = this.ensureBuffer(f + t);
 15355                    d = e.length;
 15356                  }
 15357                  for (let a = 0; a < t; ++a, ++f) e[f] = e[f - i];
 15358                }
 15359              }
 15360            }
 15361            t.FlateStream = FlateStream;
 15362          },
 15363          (e, t, a) => {
 15364            Object.defineProperty(t, "__esModule", { value: !0 });
 15365            t.Jbig2Stream = void 0;
 15366            var r = a(5),
 15367              n = a(18),
 15368              i = a(4),
 15369              s = a(24),
 15370              o = a(2);
 15371            class Jbig2Stream extends n.DecodeStream {
 15372              constructor(e, t, a) {
 15373                super(t);
 15374                this.stream = e;
 15375                this.dict = e.dict;
 15376                this.maybeLength = t;
 15377                this.params = a;
 15378              }
 15379              get bytes() {
 15380                return (0, o.shadow)(
 15381                  this,
 15382                  "bytes",
 15383                  this.stream.getBytes(this.maybeLength),
 15384                );
 15385              }
 15386              ensureBuffer(e) {}
 15387              readBlock() {
 15388                if (this.eof) return;
 15389                const e = new s.Jbig2Image(),
 15390                  t = [];
 15391                if (this.params instanceof i.Dict) {
 15392                  const e = this.params.get("JBIG2Globals");
 15393                  if (e instanceof r.BaseStream) {
 15394                    const a = e.getBytes();
 15395                    t.push({ data: a, start: 0, end: a.length });
 15396                  }
 15397                }
 15398                t.push({ data: this.bytes, start: 0, end: this.bytes.length });
 15399                const a = e.parseChunks(t),
 15400                  n = a.length;
 15401                for (let e = 0; e < n; e++) a[e] ^= 255;
 15402                this.buffer = a;
 15403                this.bufferLength = n;
 15404                this.eof = !0;
 15405              }
 15406            }
 15407            t.Jbig2Stream = Jbig2Stream;
 15408          },
 15409          (e, t, a) => {
 15410            Object.defineProperty(t, "__esModule", { value: !0 });
 15411            t.Jbig2Image = void 0;
 15412            var r = a(2),
 15413              n = a(3),
 15414              i = a(25),
 15415              s = a(21);
 15416            class Jbig2Error extends r.BaseException {
 15417              constructor(e) {
 15418                super(`JBIG2 error: ${e}`, "Jbig2Error");
 15419              }
 15420            }
 15421            class ContextCache {
 15422              getContexts(e) {
 15423                return e in this ? this[e] : (this[e] = new Int8Array(65536));
 15424              }
 15425            }
 15426            class DecodingContext {
 15427              constructor(e, t, a) {
 15428                this.data = e;
 15429                this.start = t;
 15430                this.end = a;
 15431              }
 15432              get decoder() {
 15433                const e = new i.ArithmeticDecoder(
 15434                  this.data,
 15435                  this.start,
 15436                  this.end,
 15437                );
 15438                return (0, r.shadow)(this, "decoder", e);
 15439              }
 15440              get contextCache() {
 15441                const e = new ContextCache();
 15442                return (0, r.shadow)(this, "contextCache", e);
 15443              }
 15444            }
 15445            const o = 2 ** 31 - 1,
 15446              c = -(2 ** 31);
 15447            function decodeInteger(e, t, a) {
 15448              const r = e.getContexts(t);
 15449              let n = 1;
 15450              function readBits(e) {
 15451                let t = 0;
 15452                for (let i = 0; i < e; i++) {
 15453                  const e = a.readBit(r, n);
 15454                  n = n < 256 ? (n << 1) | e : (511 & ((n << 1) | e)) | 256;
 15455                  t = (t << 1) | e;
 15456                }
 15457                return t >>> 0;
 15458              }
 15459              const i = readBits(1),
 15460                s = readBits(1)
 15461                  ? readBits(1)
 15462                    ? readBits(1)
 15463                      ? readBits(1)
 15464                        ? readBits(1)
 15465                          ? readBits(32) + 4436
 15466                          : readBits(12) + 340
 15467                        : readBits(8) + 84
 15468                      : readBits(6) + 20
 15469                    : readBits(4) + 4
 15470                  : readBits(2);
 15471              let l;
 15472              0 === i ? (l = s) : s > 0 && (l = -s);
 15473              return l >= c && l <= o ? l : null;
 15474            }
 15475            function decodeIAID(e, t, a) {
 15476              const r = e.getContexts("IAID");
 15477              let n = 1;
 15478              for (let e = 0; e < a; e++) {
 15479                n = (n << 1) | t.readBit(r, n);
 15480              }
 15481              return a < 31 ? n & ((1 << a) - 1) : 2147483647 & n;
 15482            }
 15483            const l = [
 15484                "SymbolDictionary",
 15485                null,
 15486                null,
 15487                null,
 15488                "IntermediateTextRegion",
 15489                null,
 15490                "ImmediateTextRegion",
 15491                "ImmediateLosslessTextRegion",
 15492                null,
 15493                null,
 15494                null,
 15495                null,
 15496                null,
 15497                null,
 15498                null,
 15499                null,
 15500                "PatternDictionary",
 15501                null,
 15502                null,
 15503                null,
 15504                "IntermediateHalftoneRegion",
 15505                null,
 15506                "ImmediateHalftoneRegion",
 15507                "ImmediateLosslessHalftoneRegion",
 15508                null,
 15509                null,
 15510                null,
 15511                null,
 15512                null,
 15513                null,
 15514                null,
 15515                null,
 15516                null,
 15517                null,
 15518                null,
 15519                null,
 15520                "IntermediateGenericRegion",
 15521                null,
 15522                "ImmediateGenericRegion",
 15523                "ImmediateLosslessGenericRegion",
 15524                "IntermediateGenericRefinementRegion",
 15525                null,
 15526                "ImmediateGenericRefinementRegion",
 15527                "ImmediateLosslessGenericRefinementRegion",
 15528                null,
 15529                null,
 15530                null,
 15531                null,
 15532                "PageInformation",
 15533                "EndOfPage",
 15534                "EndOfStripe",
 15535                "EndOfFile",
 15536                "Profiles",
 15537                "Tables",
 15538                null,
 15539                null,
 15540                null,
 15541                null,
 15542                null,
 15543                null,
 15544                null,
 15545                null,
 15546                "Extension",
 15547              ],
 15548              h = [
 15549                [
 15550                  { x: -1, y: -2 },
 15551                  { x: 0, y: -2 },
 15552                  { x: 1, y: -2 },
 15553                  { x: -2, y: -1 },
 15554                  { x: -1, y: -1 },
 15555                  { x: 0, y: -1 },
 15556                  { x: 1, y: -1 },
 15557                  { x: 2, y: -1 },
 15558                  { x: -4, y: 0 },
 15559                  { x: -3, y: 0 },
 15560                  { x: -2, y: 0 },
 15561                  { x: -1, y: 0 },
 15562                ],
 15563                [
 15564                  { x: -1, y: -2 },
 15565                  { x: 0, y: -2 },
 15566                  { x: 1, y: -2 },
 15567                  { x: 2, y: -2 },
 15568                  { x: -2, y: -1 },
 15569                  { x: -1, y: -1 },
 15570                  { x: 0, y: -1 },
 15571                  { x: 1, y: -1 },
 15572                  { x: 2, y: -1 },
 15573                  { x: -3, y: 0 },
 15574                  { x: -2, y: 0 },
 15575                  { x: -1, y: 0 },
 15576                ],
 15577                [
 15578                  { x: -1, y: -2 },
 15579                  { x: 0, y: -2 },
 15580                  { x: 1, y: -2 },
 15581                  { x: -2, y: -1 },
 15582                  { x: -1, y: -1 },
 15583                  { x: 0, y: -1 },
 15584                  { x: 1, y: -1 },
 15585                  { x: -2, y: 0 },
 15586                  { x: -1, y: 0 },
 15587                ],
 15588                [
 15589                  { x: -3, y: -1 },
 15590                  { x: -2, y: -1 },
 15591                  { x: -1, y: -1 },
 15592                  { x: 0, y: -1 },
 15593                  { x: 1, y: -1 },
 15594                  { x: -4, y: 0 },
 15595                  { x: -3, y: 0 },
 15596                  { x: -2, y: 0 },
 15597                  { x: -1, y: 0 },
 15598                ],
 15599              ],
 15600              u = [
 15601                {
 15602                  coding: [
 15603                    { x: 0, y: -1 },
 15604                    { x: 1, y: -1 },
 15605                    { x: -1, y: 0 },
 15606                  ],
 15607                  reference: [
 15608                    { x: 0, y: -1 },
 15609                    { x: 1, y: -1 },
 15610                    { x: -1, y: 0 },
 15611                    { x: 0, y: 0 },
 15612                    { x: 1, y: 0 },
 15613                    { x: -1, y: 1 },
 15614                    { x: 0, y: 1 },
 15615                    { x: 1, y: 1 },
 15616                  ],
 15617                },
 15618                {
 15619                  coding: [
 15620                    { x: -1, y: -1 },
 15621                    { x: 0, y: -1 },
 15622                    { x: 1, y: -1 },
 15623                    { x: -1, y: 0 },
 15624                  ],
 15625                  reference: [
 15626                    { x: 0, y: -1 },
 15627                    { x: -1, y: 0 },
 15628                    { x: 0, y: 0 },
 15629                    { x: 1, y: 0 },
 15630                    { x: 0, y: 1 },
 15631                    { x: 1, y: 1 },
 15632                  ],
 15633                },
 15634              ],
 15635              d = [39717, 1941, 229, 405],
 15636              f = [32, 8];
 15637            function decodeBitmap(e, t, a, r, n, i, s, o) {
 15638              if (e) {
 15639                return decodeMMRBitmap(
 15640                  new Reader(o.data, o.start, o.end),
 15641                  t,
 15642                  a,
 15643                  !1,
 15644                );
 15645              }
 15646              if (
 15647                0 === r &&
 15648                !i &&
 15649                !n &&
 15650                4 === s.length &&
 15651                3 === s[0].x &&
 15652                -1 === s[0].y &&
 15653                -3 === s[1].x &&
 15654                -1 === s[1].y &&
 15655                2 === s[2].x &&
 15656                -2 === s[2].y &&
 15657                -2 === s[3].x &&
 15658                -2 === s[3].y
 15659              )
 15660                return (function decodeBitmapTemplate0(e, t, a) {
 15661                  const r = a.decoder,
 15662                    n = a.contextCache.getContexts("GB"),
 15663                    i = [];
 15664                  let s, o, c, l, h, u, d;
 15665                  for (o = 0; o < t; o++) {
 15666                    h = i[o] = new Uint8Array(e);
 15667                    u = o < 1 ? h : i[o - 1];
 15668                    d = o < 2 ? h : i[o - 2];
 15669                    s =
 15670                      (d[0] << 13) |
 15671                      (d[1] << 12) |
 15672                      (d[2] << 11) |
 15673                      (u[0] << 7) |
 15674                      (u[1] << 6) |
 15675                      (u[2] << 5) |
 15676                      (u[3] << 4);
 15677                    for (c = 0; c < e; c++) {
 15678                      h[c] = l = r.readBit(n, s);
 15679                      s =
 15680                        ((31735 & s) << 1) |
 15681                        (c + 3 < e ? d[c + 3] << 11 : 0) |
 15682                        (c + 4 < e ? u[c + 4] << 4 : 0) |
 15683                        l;
 15684                    }
 15685                  }
 15686                  return i;
 15687                })(t, a, o);
 15688              const c = !!i,
 15689                l = h[r].concat(s);
 15690              l.sort(function (e, t) {
 15691                return e.y - t.y || e.x - t.x;
 15692              });
 15693              const u = l.length,
 15694                f = new Int8Array(u),
 15695                g = new Int8Array(u),
 15696                p = [];
 15697              let m,
 15698                b,
 15699                y = 0,
 15700                w = 0,
 15701                S = 0,
 15702                x = 0;
 15703              for (b = 0; b < u; b++) {
 15704                f[b] = l[b].x;
 15705                g[b] = l[b].y;
 15706                w = Math.min(w, l[b].x);
 15707                S = Math.max(S, l[b].x);
 15708                x = Math.min(x, l[b].y);
 15709                b < u - 1 && l[b].y === l[b + 1].y && l[b].x === l[b + 1].x - 1
 15710                  ? (y |= 1 << (u - 1 - b))
 15711                  : p.push(b);
 15712              }
 15713              const C = p.length,
 15714                k = new Int8Array(C),
 15715                v = new Int8Array(C),
 15716                F = new Uint16Array(C);
 15717              for (m = 0; m < C; m++) {
 15718                b = p[m];
 15719                k[m] = l[b].x;
 15720                v[m] = l[b].y;
 15721                F[m] = 1 << (u - 1 - b);
 15722              }
 15723              const O = -w,
 15724                T = -x,
 15725                M = t - S,
 15726                D = d[r];
 15727              let E = new Uint8Array(t);
 15728              const N = [],
 15729                R = o.decoder,
 15730                L = o.contextCache.getContexts("GB");
 15731              let $,
 15732                _,
 15733                j,
 15734                U,
 15735                X,
 15736                H = 0,
 15737                q = 0;
 15738              for (let e = 0; e < a; e++) {
 15739                if (n) {
 15740                  H ^= R.readBit(L, D);
 15741                  if (H) {
 15742                    N.push(E);
 15743                    continue;
 15744                  }
 15745                }
 15746                E = new Uint8Array(E);
 15747                N.push(E);
 15748                for ($ = 0; $ < t; $++) {
 15749                  if (c && i[e][$]) {
 15750                    E[$] = 0;
 15751                    continue;
 15752                  }
 15753                  if ($ >= O && $ < M && e >= T) {
 15754                    q = (q << 1) & y;
 15755                    for (b = 0; b < C; b++) {
 15756                      _ = e + v[b];
 15757                      j = $ + k[b];
 15758                      U = N[_][j];
 15759                      if (U) {
 15760                        U = F[b];
 15761                        q |= U;
 15762                      }
 15763                    }
 15764                  } else {
 15765                    q = 0;
 15766                    X = u - 1;
 15767                    for (b = 0; b < u; b++, X--) {
 15768                      j = $ + f[b];
 15769                      if (j >= 0 && j < t) {
 15770                        _ = e + g[b];
 15771                        if (_ >= 0) {
 15772                          U = N[_][j];
 15773                          U && (q |= U << X);
 15774                        }
 15775                      }
 15776                    }
 15777                  }
 15778                  const a = R.readBit(L, q);
 15779                  E[$] = a;
 15780                }
 15781              }
 15782              return N;
 15783            }
 15784            function decodeRefinement(e, t, a, r, n, i, s, o, c) {
 15785              let l = u[a].coding;
 15786              0 === a && (l = l.concat([o[0]]));
 15787              const h = l.length,
 15788                d = new Int32Array(h),
 15789                g = new Int32Array(h);
 15790              let p;
 15791              for (p = 0; p < h; p++) {
 15792                d[p] = l[p].x;
 15793                g[p] = l[p].y;
 15794              }
 15795              let m = u[a].reference;
 15796              0 === a && (m = m.concat([o[1]]));
 15797              const b = m.length,
 15798                y = new Int32Array(b),
 15799                w = new Int32Array(b);
 15800              for (p = 0; p < b; p++) {
 15801                y[p] = m[p].x;
 15802                w[p] = m[p].y;
 15803              }
 15804              const S = r[0].length,
 15805                x = r.length,
 15806                C = f[a],
 15807                k = [],
 15808                v = c.decoder,
 15809                F = c.contextCache.getContexts("GR");
 15810              let O = 0;
 15811              for (let a = 0; a < t; a++) {
 15812                if (s) {
 15813                  O ^= v.readBit(F, C);
 15814                  if (O) throw new Jbig2Error("prediction is not supported");
 15815                }
 15816                const t = new Uint8Array(e);
 15817                k.push(t);
 15818                for (let s = 0; s < e; s++) {
 15819                  let o,
 15820                    c,
 15821                    l = 0;
 15822                  for (p = 0; p < h; p++) {
 15823                    o = a + g[p];
 15824                    c = s + d[p];
 15825                    o < 0 || c < 0 || c >= e
 15826                      ? (l <<= 1)
 15827                      : (l = (l << 1) | k[o][c]);
 15828                  }
 15829                  for (p = 0; p < b; p++) {
 15830                    o = a + w[p] - i;
 15831                    c = s + y[p] - n;
 15832                    o < 0 || o >= x || c < 0 || c >= S
 15833                      ? (l <<= 1)
 15834                      : (l = (l << 1) | r[o][c]);
 15835                  }
 15836                  const u = v.readBit(F, l);
 15837                  t[s] = u;
 15838                }
 15839              }
 15840              return k;
 15841            }
 15842            function decodeTextRegion(
 15843              e,
 15844              t,
 15845              a,
 15846              r,
 15847              n,
 15848              i,
 15849              s,
 15850              o,
 15851              c,
 15852              l,
 15853              h,
 15854              u,
 15855              d,
 15856              f,
 15857              g,
 15858              p,
 15859              m,
 15860              b,
 15861              y,
 15862            ) {
 15863              if (e && t)
 15864                throw new Jbig2Error("refinement with Huffman is not supported");
 15865              const w = [];
 15866              let S, x;
 15867              for (S = 0; S < r; S++) {
 15868                x = new Uint8Array(a);
 15869                if (n) for (let e = 0; e < a; e++) x[e] = n;
 15870                w.push(x);
 15871              }
 15872              const C = m.decoder,
 15873                k = m.contextCache;
 15874              let v = e ? -f.tableDeltaT.decode(y) : -decodeInteger(k, "IADT", C),
 15875                F = 0;
 15876              S = 0;
 15877              for (; S < i; ) {
 15878                v += e ? f.tableDeltaT.decode(y) : decodeInteger(k, "IADT", C);
 15879                F += e ? f.tableFirstS.decode(y) : decodeInteger(k, "IAFS", C);
 15880                let r = F;
 15881                for (;;) {
 15882                  let n = 0;
 15883                  s > 1 && (n = e ? y.readBits(b) : decodeInteger(k, "IAIT", C));
 15884                  const i = s * v + n,
 15885                    F = e ? f.symbolIDTable.decode(y) : decodeIAID(k, C, c),
 15886                    O = t && (e ? y.readBit() : decodeInteger(k, "IARI", C));
 15887                  let T = o[F],
 15888                    M = T[0].length,
 15889                    D = T.length;
 15890                  if (O) {
 15891                    const e = decodeInteger(k, "IARDW", C),
 15892                      t = decodeInteger(k, "IARDH", C);
 15893                    M += e;
 15894                    D += t;
 15895                    T = decodeRefinement(
 15896                      M,
 15897                      D,
 15898                      g,
 15899                      T,
 15900                      (e >> 1) + decodeInteger(k, "IARDX", C),
 15901                      (t >> 1) + decodeInteger(k, "IARDY", C),
 15902                      !1,
 15903                      p,
 15904                      m,
 15905                    );
 15906                  }
 15907                  const E = i - (1 & u ? 0 : D - 1),
 15908                    N = r - (2 & u ? M - 1 : 0);
 15909                  let R, L, $;
 15910                  if (l) {
 15911                    for (R = 0; R < D; R++) {
 15912                      x = w[N + R];
 15913                      if (!x) continue;
 15914                      $ = T[R];
 15915                      const e = Math.min(a - E, M);
 15916                      switch (d) {
 15917                        case 0:
 15918                          for (L = 0; L < e; L++) x[E + L] |= $[L];
 15919                          break;
 15920                        case 2:
 15921                          for (L = 0; L < e; L++) x[E + L] ^= $[L];
 15922                          break;
 15923                        default:
 15924                          throw new Jbig2Error(`operator ${d} is not supported`);
 15925                      }
 15926                    }
 15927                    r += D - 1;
 15928                  } else {
 15929                    for (L = 0; L < D; L++) {
 15930                      x = w[E + L];
 15931                      if (x) {
 15932                        $ = T[L];
 15933                        switch (d) {
 15934                          case 0:
 15935                            for (R = 0; R < M; R++) x[N + R] |= $[R];
 15936                            break;
 15937                          case 2:
 15938                            for (R = 0; R < M; R++) x[N + R] ^= $[R];
 15939                            break;
 15940                          default:
 15941                            throw new Jbig2Error(
 15942                              `operator ${d} is not supported`,
 15943                            );
 15944                        }
 15945                      }
 15946                    }
 15947                    r += M - 1;
 15948                  }
 15949                  S++;
 15950                  const _ = e
 15951                    ? f.tableDeltaS.decode(y)
 15952                    : decodeInteger(k, "IADS", C);
 15953                  if (null === _) break;
 15954                  r += _ + h;
 15955                }
 15956              }
 15957              return w;
 15958            }
 15959            function readSegmentHeader(e, t) {
 15960              const a = {};
 15961              a.number = (0, n.readUint32)(e, t);
 15962              const r = e[t + 4],
 15963                i = 63 & r;
 15964              if (!l[i]) throw new Jbig2Error("invalid segment type: " + i);
 15965              a.type = i;
 15966              a.typeName = l[i];
 15967              a.deferredNonRetain = !!(128 & r);
 15968              const s = !!(64 & r),
 15969                o = e[t + 5];
 15970              let c = (o >> 5) & 7;
 15971              const h = [31 & o];
 15972              let u = t + 6;
 15973              if (7 === o) {
 15974                c = 536870911 & (0, n.readUint32)(e, u - 1);
 15975                u += 3;
 15976                let t = (c + 7) >> 3;
 15977                h[0] = e[u++];
 15978                for (; --t > 0; ) h.push(e[u++]);
 15979              } else if (5 === o || 6 === o)
 15980                throw new Jbig2Error("invalid referred-to flags");
 15981              a.retainBits = h;
 15982              let d = 4;
 15983              a.number <= 256 ? (d = 1) : a.number <= 65536 && (d = 2);
 15984              const f = [];
 15985              let p, m;
 15986              for (p = 0; p < c; p++) {
 15987                let t;
 15988                t =
 15989                  1 === d
 15990                    ? e[u]
 15991                    : 2 === d
 15992                      ? (0, n.readUint16)(e, u)
 15993                      : (0, n.readUint32)(e, u);
 15994                f.push(t);
 15995                u += d;
 15996              }
 15997              a.referredTo = f;
 15998              if (s) {
 15999                a.pageAssociation = (0, n.readUint32)(e, u);
 16000                u += 4;
 16001              } else a.pageAssociation = e[u++];
 16002              a.length = (0, n.readUint32)(e, u);
 16003              u += 4;
 16004              if (4294967295 === a.length) {
 16005                if (38 !== i)
 16006                  throw new Jbig2Error("invalid unknown segment length");
 16007                {
 16008                  const t = readRegionSegmentInformation(e, u),
 16009                    r = !!(1 & e[u + g]),
 16010                    n = 6,
 16011                    i = new Uint8Array(n);
 16012                  if (!r) {
 16013                    i[0] = 255;
 16014                    i[1] = 172;
 16015                  }
 16016                  i[2] = (t.height >>> 24) & 255;
 16017                  i[3] = (t.height >> 16) & 255;
 16018                  i[4] = (t.height >> 8) & 255;
 16019                  i[5] = 255 & t.height;
 16020                  for (p = u, m = e.length; p < m; p++) {
 16021                    let t = 0;
 16022                    for (; t < n && i[t] === e[p + t]; ) t++;
 16023                    if (t === n) {
 16024                      a.length = p + n;
 16025                      break;
 16026                    }
 16027                  }
 16028                  if (4294967295 === a.length)
 16029                    throw new Jbig2Error("segment end was not found");
 16030                }
 16031              }
 16032              a.headerEnd = u;
 16033              return a;
 16034            }
 16035            function readSegments(e, t, a, r) {
 16036              const n = [];
 16037              let i = a;
 16038              for (; i < r; ) {
 16039                const a = readSegmentHeader(t, i);
 16040                i = a.headerEnd;
 16041                const r = { header: a, data: t };
 16042                if (!e.randomAccess) {
 16043                  r.start = i;
 16044                  i += a.length;
 16045                  r.end = i;
 16046                }
 16047                n.push(r);
 16048                if (51 === a.type) break;
 16049              }
 16050              if (e.randomAccess)
 16051                for (let e = 0, t = n.length; e < t; e++) {
 16052                  n[e].start = i;
 16053                  i += n[e].header.length;
 16054                  n[e].end = i;
 16055                }
 16056              return n;
 16057            }
 16058            function readRegionSegmentInformation(e, t) {
 16059              return {
 16060                width: (0, n.readUint32)(e, t),
 16061                height: (0, n.readUint32)(e, t + 4),
 16062                x: (0, n.readUint32)(e, t + 8),
 16063                y: (0, n.readUint32)(e, t + 12),
 16064                combinationOperator: 7 & e[t + 16],
 16065              };
 16066            }
 16067            const g = 17;
 16068            function processSegment(e, t) {
 16069              const a = e.header,
 16070                r = e.data,
 16071                i = e.end;
 16072              let s,
 16073                o,
 16074                c,
 16075                l,
 16076                h = e.start;
 16077              switch (a.type) {
 16078                case 0:
 16079                  const e = {},
 16080                    t = (0, n.readUint16)(r, h);
 16081                  e.huffman = !!(1 & t);
 16082                  e.refinement = !!(2 & t);
 16083                  e.huffmanDHSelector = (t >> 2) & 3;
 16084                  e.huffmanDWSelector = (t >> 4) & 3;
 16085                  e.bitmapSizeSelector = (t >> 6) & 1;
 16086                  e.aggregationInstancesSelector = (t >> 7) & 1;
 16087                  e.bitmapCodingContextUsed = !!(256 & t);
 16088                  e.bitmapCodingContextRetained = !!(512 & t);
 16089                  e.template = (t >> 10) & 3;
 16090                  e.refinementTemplate = (t >> 12) & 1;
 16091                  h += 2;
 16092                  if (!e.huffman) {
 16093                    l = 0 === e.template ? 4 : 1;
 16094                    o = [];
 16095                    for (c = 0; c < l; c++) {
 16096                      o.push({
 16097                        x: (0, n.readInt8)(r, h),
 16098                        y: (0, n.readInt8)(r, h + 1),
 16099                      });
 16100                      h += 2;
 16101                    }
 16102                    e.at = o;
 16103                  }
 16104                  if (e.refinement && !e.refinementTemplate) {
 16105                    o = [];
 16106                    for (c = 0; c < 2; c++) {
 16107                      o.push({
 16108                        x: (0, n.readInt8)(r, h),
 16109                        y: (0, n.readInt8)(r, h + 1),
 16110                      });
 16111                      h += 2;
 16112                    }
 16113                    e.refinementAt = o;
 16114                  }
 16115                  e.numberOfExportedSymbols = (0, n.readUint32)(r, h);
 16116                  h += 4;
 16117                  e.numberOfNewSymbols = (0, n.readUint32)(r, h);
 16118                  h += 4;
 16119                  s = [e, a.number, a.referredTo, r, h, i];
 16120                  break;
 16121                case 6:
 16122                case 7:
 16123                  const u = {};
 16124                  u.info = readRegionSegmentInformation(r, h);
 16125                  h += g;
 16126                  const d = (0, n.readUint16)(r, h);
 16127                  h += 2;
 16128                  u.huffman = !!(1 & d);
 16129                  u.refinement = !!(2 & d);
 16130                  u.logStripSize = (d >> 2) & 3;
 16131                  u.stripSize = 1 << u.logStripSize;
 16132                  u.referenceCorner = (d >> 4) & 3;
 16133                  u.transposed = !!(64 & d);
 16134                  u.combinationOperator = (d >> 7) & 3;
 16135                  u.defaultPixelValue = (d >> 9) & 1;
 16136                  u.dsOffset = (d << 17) >> 27;
 16137                  u.refinementTemplate = (d >> 15) & 1;
 16138                  if (u.huffman) {
 16139                    const e = (0, n.readUint16)(r, h);
 16140                    h += 2;
 16141                    u.huffmanFS = 3 & e;
 16142                    u.huffmanDS = (e >> 2) & 3;
 16143                    u.huffmanDT = (e >> 4) & 3;
 16144                    u.huffmanRefinementDW = (e >> 6) & 3;
 16145                    u.huffmanRefinementDH = (e >> 8) & 3;
 16146                    u.huffmanRefinementDX = (e >> 10) & 3;
 16147                    u.huffmanRefinementDY = (e >> 12) & 3;
 16148                    u.huffmanRefinementSizeSelector = !!(16384 & e);
 16149                  }
 16150                  if (u.refinement && !u.refinementTemplate) {
 16151                    o = [];
 16152                    for (c = 0; c < 2; c++) {
 16153                      o.push({
 16154                        x: (0, n.readInt8)(r, h),
 16155                        y: (0, n.readInt8)(r, h + 1),
 16156                      });
 16157                      h += 2;
 16158                    }
 16159                    u.refinementAt = o;
 16160                  }
 16161                  u.numberOfSymbolInstances = (0, n.readUint32)(r, h);
 16162                  h += 4;
 16163                  s = [u, a.referredTo, r, h, i];
 16164                  break;
 16165                case 16:
 16166                  const f = {},
 16167                    p = r[h++];
 16168                  f.mmr = !!(1 & p);
 16169                  f.template = (p >> 1) & 3;
 16170                  f.patternWidth = r[h++];
 16171                  f.patternHeight = r[h++];
 16172                  f.maxPatternIndex = (0, n.readUint32)(r, h);
 16173                  h += 4;
 16174                  s = [f, a.number, r, h, i];
 16175                  break;
 16176                case 22:
 16177                case 23:
 16178                  const m = {};
 16179                  m.info = readRegionSegmentInformation(r, h);
 16180                  h += g;
 16181                  const b = r[h++];
 16182                  m.mmr = !!(1 & b);
 16183                  m.template = (b >> 1) & 3;
 16184                  m.enableSkip = !!(8 & b);
 16185                  m.combinationOperator = (b >> 4) & 7;
 16186                  m.defaultPixelValue = (b >> 7) & 1;
 16187                  m.gridWidth = (0, n.readUint32)(r, h);
 16188                  h += 4;
 16189                  m.gridHeight = (0, n.readUint32)(r, h);
 16190                  h += 4;
 16191                  m.gridOffsetX = 4294967295 & (0, n.readUint32)(r, h);
 16192                  h += 4;
 16193                  m.gridOffsetY = 4294967295 & (0, n.readUint32)(r, h);
 16194                  h += 4;
 16195                  m.gridVectorX = (0, n.readUint16)(r, h);
 16196                  h += 2;
 16197                  m.gridVectorY = (0, n.readUint16)(r, h);
 16198                  h += 2;
 16199                  s = [m, a.referredTo, r, h, i];
 16200                  break;
 16201                case 38:
 16202                case 39:
 16203                  const y = {};
 16204                  y.info = readRegionSegmentInformation(r, h);
 16205                  h += g;
 16206                  const w = r[h++];
 16207                  y.mmr = !!(1 & w);
 16208                  y.template = (w >> 1) & 3;
 16209                  y.prediction = !!(8 & w);
 16210                  if (!y.mmr) {
 16211                    l = 0 === y.template ? 4 : 1;
 16212                    o = [];
 16213                    for (c = 0; c < l; c++) {
 16214                      o.push({
 16215                        x: (0, n.readInt8)(r, h),
 16216                        y: (0, n.readInt8)(r, h + 1),
 16217                      });
 16218                      h += 2;
 16219                    }
 16220                    y.at = o;
 16221                  }
 16222                  s = [y, r, h, i];
 16223                  break;
 16224                case 48:
 16225                  const S = {
 16226                    width: (0, n.readUint32)(r, h),
 16227                    height: (0, n.readUint32)(r, h + 4),
 16228                    resolutionX: (0, n.readUint32)(r, h + 8),
 16229                    resolutionY: (0, n.readUint32)(r, h + 12),
 16230                  };
 16231                  4294967295 === S.height && delete S.height;
 16232                  const x = r[h + 16];
 16233                  (0, n.readUint16)(r, h + 17);
 16234                  S.lossless = !!(1 & x);
 16235                  S.refinement = !!(2 & x);
 16236                  S.defaultPixelValue = (x >> 2) & 1;
 16237                  S.combinationOperator = (x >> 3) & 3;
 16238                  S.requiresBuffer = !!(32 & x);
 16239                  S.combinationOperatorOverride = !!(64 & x);
 16240                  s = [S];
 16241                  break;
 16242                case 49:
 16243                case 50:
 16244                case 51:
 16245                case 62:
 16246                  break;
 16247                case 53:
 16248                  s = [a.number, r, h, i];
 16249                  break;
 16250                default:
 16251                  throw new Jbig2Error(
 16252                    `segment type ${a.typeName}(${a.type}) is not implemented`,
 16253                  );
 16254              }
 16255              const u = "on" + a.typeName;
 16256              u in t && t[u].apply(t, s);
 16257            }
 16258            function processSegments(e, t) {
 16259              for (let a = 0, r = e.length; a < r; a++) processSegment(e[a], t);
 16260            }
 16261            class SimpleSegmentVisitor {
 16262              onPageInformation(e) {
 16263                this.currentPageInfo = e;
 16264                const t = (e.width + 7) >> 3,
 16265                  a = new Uint8ClampedArray(t * e.height);
 16266                e.defaultPixelValue && a.fill(255);
 16267                this.buffer = a;
 16268              }
 16269              drawBitmap(e, t) {
 16270                const a = this.currentPageInfo,
 16271                  r = e.width,
 16272                  n = e.height,
 16273                  i = (a.width + 7) >> 3,
 16274                  s = a.combinationOperatorOverride
 16275                    ? e.combinationOperator
 16276                    : a.combinationOperator,
 16277                  o = this.buffer,
 16278                  c = 128 >> (7 & e.x);
 16279                let l,
 16280                  h,
 16281                  u,
 16282                  d,
 16283                  f = e.y * i + (e.x >> 3);
 16284                switch (s) {
 16285                  case 0:
 16286                    for (l = 0; l < n; l++) {
 16287                      u = c;
 16288                      d = f;
 16289                      for (h = 0; h < r; h++) {
 16290                        t[l][h] && (o[d] |= u);
 16291                        u >>= 1;
 16292                        if (!u) {
 16293                          u = 128;
 16294                          d++;
 16295                        }
 16296                      }
 16297                      f += i;
 16298                    }
 16299                    break;
 16300                  case 2:
 16301                    for (l = 0; l < n; l++) {
 16302                      u = c;
 16303                      d = f;
 16304                      for (h = 0; h < r; h++) {
 16305                        t[l][h] && (o[d] ^= u);
 16306                        u >>= 1;
 16307                        if (!u) {
 16308                          u = 128;
 16309                          d++;
 16310                        }
 16311                      }
 16312                      f += i;
 16313                    }
 16314                    break;
 16315                  default:
 16316                    throw new Jbig2Error(`operator ${s} is not supported`);
 16317                }
 16318              }
 16319              onImmediateGenericRegion(e, t, a, r) {
 16320                const n = e.info,
 16321                  i = new DecodingContext(t, a, r),
 16322                  s = decodeBitmap(
 16323                    e.mmr,
 16324                    n.width,
 16325                    n.height,
 16326                    e.template,
 16327                    e.prediction,
 16328                    null,
 16329                    e.at,
 16330                    i,
 16331                  );
 16332                this.drawBitmap(n, s);
 16333              }
 16334              onImmediateLosslessGenericRegion() {
 16335                this.onImmediateGenericRegion(...arguments);
 16336              }
 16337              onSymbolDictionary(e, t, a, r, i, s) {
 16338                let o, c;
 16339                if (e.huffman) {
 16340                  o = (function getSymbolDictionaryHuffmanTables(e, t, a) {
 16341                    let r,
 16342                      n,
 16343                      i,
 16344                      s,
 16345                      o = 0;
 16346                    switch (e.huffmanDHSelector) {
 16347                      case 0:
 16348                      case 1:
 16349                        r = getStandardTable(e.huffmanDHSelector + 4);
 16350                        break;
 16351                      case 3:
 16352                        r = getCustomHuffmanTable(o, t, a);
 16353                        o++;
 16354                        break;
 16355                      default:
 16356                        throw new Jbig2Error("invalid Huffman DH selector");
 16357                    }
 16358                    switch (e.huffmanDWSelector) {
 16359                      case 0:
 16360                      case 1:
 16361                        n = getStandardTable(e.huffmanDWSelector + 2);
 16362                        break;
 16363                      case 3:
 16364                        n = getCustomHuffmanTable(o, t, a);
 16365                        o++;
 16366                        break;
 16367                      default:
 16368                        throw new Jbig2Error("invalid Huffman DW selector");
 16369                    }
 16370                    if (e.bitmapSizeSelector) {
 16371                      i = getCustomHuffmanTable(o, t, a);
 16372                      o++;
 16373                    } else i = getStandardTable(1);
 16374                    s = e.aggregationInstancesSelector
 16375                      ? getCustomHuffmanTable(o, t, a)
 16376                      : getStandardTable(1);
 16377                    return {
 16378                      tableDeltaHeight: r,
 16379                      tableDeltaWidth: n,
 16380                      tableBitmapSize: i,
 16381                      tableAggregateInstances: s,
 16382                    };
 16383                  })(e, a, this.customTables);
 16384                  c = new Reader(r, i, s);
 16385                }
 16386                let l = this.symbols;
 16387                l || (this.symbols = l = {});
 16388                const h = [];
 16389                for (const e of a) {
 16390                  const t = l[e];
 16391                  t && h.push(...t);
 16392                }
 16393                const u = new DecodingContext(r, i, s);
 16394                l[t] = (function decodeSymbolDictionary(
 16395                  e,
 16396                  t,
 16397                  a,
 16398                  r,
 16399                  i,
 16400                  s,
 16401                  o,
 16402                  c,
 16403                  l,
 16404                  h,
 16405                  u,
 16406                  d,
 16407                ) {
 16408                  if (e && t)
 16409                    throw new Jbig2Error(
 16410                      "symbol refinement with Huffman is not supported",
 16411                    );
 16412                  const f = [];
 16413                  let g = 0,
 16414                    p = (0, n.log2)(a.length + r);
 16415                  const m = u.decoder,
 16416                    b = u.contextCache;
 16417                  let y, w;
 16418                  if (e) {
 16419                    y = getStandardTable(1);
 16420                    w = [];
 16421                    p = Math.max(p, 1);
 16422                  }
 16423                  for (; f.length < r; ) {
 16424                    g += e
 16425                      ? s.tableDeltaHeight.decode(d)
 16426                      : decodeInteger(b, "IADH", m);
 16427                    let r = 0,
 16428                      n = 0;
 16429                    const i = e ? w.length : 0;
 16430                    for (;;) {
 16431                      const i = e
 16432                        ? s.tableDeltaWidth.decode(d)
 16433                        : decodeInteger(b, "IADW", m);
 16434                      if (null === i) break;
 16435                      r += i;
 16436                      n += r;
 16437                      let y;
 16438                      if (t) {
 16439                        const n = decodeInteger(b, "IAAI", m);
 16440                        if (n > 1)
 16441                          y = decodeTextRegion(
 16442                            e,
 16443                            t,
 16444                            r,
 16445                            g,
 16446                            0,
 16447                            n,
 16448                            1,
 16449                            a.concat(f),
 16450                            p,
 16451                            0,
 16452                            0,
 16453                            1,
 16454                            0,
 16455                            s,
 16456                            l,
 16457                            h,
 16458                            u,
 16459                            0,
 16460                            d,
 16461                          );
 16462                        else {
 16463                          const e = decodeIAID(b, m, p),
 16464                            t = decodeInteger(b, "IARDX", m),
 16465                            n = decodeInteger(b, "IARDY", m);
 16466                          y = decodeRefinement(
 16467                            r,
 16468                            g,
 16469                            l,
 16470                            e < a.length ? a[e] : f[e - a.length],
 16471                            t,
 16472                            n,
 16473                            !1,
 16474                            h,
 16475                            u,
 16476                          );
 16477                        }
 16478                        f.push(y);
 16479                      } else if (e) w.push(r);
 16480                      else {
 16481                        y = decodeBitmap(!1, r, g, o, !1, null, c, u);
 16482                        f.push(y);
 16483                      }
 16484                    }
 16485                    if (e && !t) {
 16486                      const e = s.tableBitmapSize.decode(d);
 16487                      d.byteAlign();
 16488                      let t;
 16489                      if (0 === e) t = readUncompressedBitmap(d, n, g);
 16490                      else {
 16491                        const a = d.end,
 16492                          r = d.position + e;
 16493                        d.end = r;
 16494                        t = decodeMMRBitmap(d, n, g, !1);
 16495                        d.end = a;
 16496                        d.position = r;
 16497                      }
 16498                      const a = w.length;
 16499                      if (i === a - 1) f.push(t);
 16500                      else {
 16501                        let e,
 16502                          r,
 16503                          n,
 16504                          s,
 16505                          o,
 16506                          c = 0;
 16507                        for (e = i; e < a; e++) {
 16508                          s = w[e];
 16509                          n = c + s;
 16510                          o = [];
 16511                          for (r = 0; r < g; r++) o.push(t[r].subarray(c, n));
 16512                          f.push(o);
 16513                          c = n;
 16514                        }
 16515                      }
 16516                    }
 16517                  }
 16518                  const S = [],
 16519                    x = [];
 16520                  let C,
 16521                    k,
 16522                    v = !1;
 16523                  const F = a.length + r;
 16524                  for (; x.length < F; ) {
 16525                    let t = e ? y.decode(d) : decodeInteger(b, "IAEX", m);
 16526                    for (; t--; ) x.push(v);
 16527                    v = !v;
 16528                  }
 16529                  for (C = 0, k = a.length; C < k; C++) x[C] && S.push(a[C]);
 16530                  for (let e = 0; e < r; C++, e++) x[C] && S.push(f[e]);
 16531                  return S;
 16532                })(
 16533                  e.huffman,
 16534                  e.refinement,
 16535                  h,
 16536                  e.numberOfNewSymbols,
 16537                  e.numberOfExportedSymbols,
 16538                  o,
 16539                  e.template,
 16540                  e.at,
 16541                  e.refinementTemplate,
 16542                  e.refinementAt,
 16543                  u,
 16544                  c,
 16545                );
 16546              }
 16547              onImmediateTextRegion(e, t, a, r, i) {
 16548                const s = e.info;
 16549                let o, c;
 16550                const l = this.symbols,
 16551                  h = [];
 16552                for (const e of t) {
 16553                  const t = l[e];
 16554                  t && h.push(...t);
 16555                }
 16556                const u = (0, n.log2)(h.length);
 16557                if (e.huffman) {
 16558                  c = new Reader(a, r, i);
 16559                  o = (function getTextRegionHuffmanTables(e, t, a, r, n) {
 16560                    const i = [];
 16561                    for (let e = 0; e <= 34; e++) {
 16562                      const t = n.readBits(4);
 16563                      i.push(new HuffmanLine([e, t, 0, 0]));
 16564                    }
 16565                    const s = new HuffmanTable(i, !1);
 16566                    i.length = 0;
 16567                    for (let e = 0; e < r; ) {
 16568                      const t = s.decode(n);
 16569                      if (t >= 32) {
 16570                        let a, r, s;
 16571                        switch (t) {
 16572                          case 32:
 16573                            if (0 === e)
 16574                              throw new Jbig2Error(
 16575                                "no previous value in symbol ID table",
 16576                              );
 16577                            r = n.readBits(2) + 3;
 16578                            a = i[e - 1].prefixLength;
 16579                            break;
 16580                          case 33:
 16581                            r = n.readBits(3) + 3;
 16582                            a = 0;
 16583                            break;
 16584                          case 34:
 16585                            r = n.readBits(7) + 11;
 16586                            a = 0;
 16587                            break;
 16588                          default:
 16589                            throw new Jbig2Error(
 16590                              "invalid code length in symbol ID table",
 16591                            );
 16592                        }
 16593                        for (s = 0; s < r; s++) {
 16594                          i.push(new HuffmanLine([e, a, 0, 0]));
 16595                          e++;
 16596                        }
 16597                      } else {
 16598                        i.push(new HuffmanLine([e, t, 0, 0]));
 16599                        e++;
 16600                      }
 16601                    }
 16602                    n.byteAlign();
 16603                    const o = new HuffmanTable(i, !1);
 16604                    let c,
 16605                      l,
 16606                      h,
 16607                      u = 0;
 16608                    switch (e.huffmanFS) {
 16609                      case 0:
 16610                      case 1:
 16611                        c = getStandardTable(e.huffmanFS + 6);
 16612                        break;
 16613                      case 3:
 16614                        c = getCustomHuffmanTable(u, t, a);
 16615                        u++;
 16616                        break;
 16617                      default:
 16618                        throw new Jbig2Error("invalid Huffman FS selector");
 16619                    }
 16620                    switch (e.huffmanDS) {
 16621                      case 0:
 16622                      case 1:
 16623                      case 2:
 16624                        l = getStandardTable(e.huffmanDS + 8);
 16625                        break;
 16626                      case 3:
 16627                        l = getCustomHuffmanTable(u, t, a);
 16628                        u++;
 16629                        break;
 16630                      default:
 16631                        throw new Jbig2Error("invalid Huffman DS selector");
 16632                    }
 16633                    switch (e.huffmanDT) {
 16634                      case 0:
 16635                      case 1:
 16636                      case 2:
 16637                        h = getStandardTable(e.huffmanDT + 11);
 16638                        break;
 16639                      case 3:
 16640                        h = getCustomHuffmanTable(u, t, a);
 16641                        u++;
 16642                        break;
 16643                      default:
 16644                        throw new Jbig2Error("invalid Huffman DT selector");
 16645                    }
 16646                    if (e.refinement)
 16647                      throw new Jbig2Error(
 16648                        "refinement with Huffman is not supported",
 16649                      );
 16650                    return {
 16651                      symbolIDTable: o,
 16652                      tableFirstS: c,
 16653                      tableDeltaS: l,
 16654                      tableDeltaT: h,
 16655                    };
 16656                  })(e, t, this.customTables, h.length, c);
 16657                }
 16658                const d = new DecodingContext(a, r, i),
 16659                  f = decodeTextRegion(
 16660                    e.huffman,
 16661                    e.refinement,
 16662                    s.width,
 16663                    s.height,
 16664                    e.defaultPixelValue,
 16665                    e.numberOfSymbolInstances,
 16666                    e.stripSize,
 16667                    h,
 16668                    u,
 16669                    e.transposed,
 16670                    e.dsOffset,
 16671                    e.referenceCorner,
 16672                    e.combinationOperator,
 16673                    o,
 16674                    e.refinementTemplate,
 16675                    e.refinementAt,
 16676                    d,
 16677                    e.logStripSize,
 16678                    c,
 16679                  );
 16680                this.drawBitmap(s, f);
 16681              }
 16682              onImmediateLosslessTextRegion() {
 16683                this.onImmediateTextRegion(...arguments);
 16684              }
 16685              onPatternDictionary(e, t, a, r, n) {
 16686                let i = this.patterns;
 16687                i || (this.patterns = i = {});
 16688                const s = new DecodingContext(a, r, n);
 16689                i[t] = (function decodePatternDictionary(e, t, a, r, n, i) {
 16690                  const s = [];
 16691                  if (!e) {
 16692                    s.push({ x: -t, y: 0 });
 16693                    0 === n &&
 16694                      s.push({ x: -3, y: -1 }, { x: 2, y: -2 }, { x: -2, y: -2 });
 16695                  }
 16696                  const o = decodeBitmap(e, (r + 1) * t, a, n, !1, null, s, i),
 16697                    c = [];
 16698                  for (let e = 0; e <= r; e++) {
 16699                    const r = [],
 16700                      n = t * e,
 16701                      i = n + t;
 16702                    for (let e = 0; e < a; e++) r.push(o[e].subarray(n, i));
 16703                    c.push(r);
 16704                  }
 16705                  return c;
 16706                })(
 16707                  e.mmr,
 16708                  e.patternWidth,
 16709                  e.patternHeight,
 16710                  e.maxPatternIndex,
 16711                  e.template,
 16712                  s,
 16713                );
 16714              }
 16715              onImmediateHalftoneRegion(e, t, a, r, i) {
 16716                const s = this.patterns[t[0]],
 16717                  o = e.info,
 16718                  c = new DecodingContext(a, r, i),
 16719                  l = (function decodeHalftoneRegion(
 16720                    e,
 16721                    t,
 16722                    a,
 16723                    r,
 16724                    i,
 16725                    s,
 16726                    o,
 16727                    c,
 16728                    l,
 16729                    h,
 16730                    u,
 16731                    d,
 16732                    f,
 16733                    g,
 16734                    p,
 16735                  ) {
 16736                    if (o) throw new Jbig2Error("skip is not supported");
 16737                    if (0 !== c)
 16738                      throw new Jbig2Error(
 16739                        `operator "${c}" is not supported in halftone region`,
 16740                      );
 16741                    const m = [];
 16742                    let b, y, w;
 16743                    for (b = 0; b < i; b++) {
 16744                      w = new Uint8Array(r);
 16745                      if (s) for (y = 0; y < r; y++) w[y] = s;
 16746                      m.push(w);
 16747                    }
 16748                    const S = t.length,
 16749                      x = t[0],
 16750                      C = x[0].length,
 16751                      k = x.length,
 16752                      v = (0, n.log2)(S),
 16753                      F = [];
 16754                    if (!e) {
 16755                      F.push({ x: a <= 1 ? 3 : 2, y: -1 });
 16756                      0 === a &&
 16757                        F.push(
 16758                          { x: -3, y: -1 },
 16759                          { x: 2, y: -2 },
 16760                          { x: -2, y: -2 },
 16761                        );
 16762                    }
 16763                    const O = [];
 16764                    let T, M, D, E, N, R, L, $, _, j, U;
 16765                    e && (T = new Reader(p.data, p.start, p.end));
 16766                    for (b = v - 1; b >= 0; b--) {
 16767                      M = e
 16768                        ? decodeMMRBitmap(T, l, h, !0)
 16769                        : decodeBitmap(!1, l, h, a, !1, null, F, p);
 16770                      O[b] = M;
 16771                    }
 16772                    for (D = 0; D < h; D++)
 16773                      for (E = 0; E < l; E++) {
 16774                        N = 0;
 16775                        R = 0;
 16776                        for (y = v - 1; y >= 0; y--) {
 16777                          N ^= O[y][D][E];
 16778                          R |= N << y;
 16779                        }
 16780                        L = t[R];
 16781                        $ = (u + D * g + E * f) >> 8;
 16782                        _ = (d + D * f - E * g) >> 8;
 16783                        if ($ >= 0 && $ + C <= r && _ >= 0 && _ + k <= i)
 16784                          for (b = 0; b < k; b++) {
 16785                            U = m[_ + b];
 16786                            j = L[b];
 16787                            for (y = 0; y < C; y++) U[$ + y] |= j[y];
 16788                          }
 16789                        else {
 16790                          let e, t;
 16791                          for (b = 0; b < k; b++) {
 16792                            t = _ + b;
 16793                            if (!(t < 0 || t >= i)) {
 16794                              U = m[t];
 16795                              j = L[b];
 16796                              for (y = 0; y < C; y++) {
 16797                                e = $ + y;
 16798                                e >= 0 && e < r && (U[e] |= j[y]);
 16799                              }
 16800                            }
 16801                          }
 16802                        }
 16803                      }
 16804                    return m;
 16805                  })(
 16806                    e.mmr,
 16807                    s,
 16808                    e.template,
 16809                    o.width,
 16810                    o.height,
 16811                    e.defaultPixelValue,
 16812                    e.enableSkip,
 16813                    e.combinationOperator,
 16814                    e.gridWidth,
 16815                    e.gridHeight,
 16816                    e.gridOffsetX,
 16817                    e.gridOffsetY,
 16818                    e.gridVectorX,
 16819                    e.gridVectorY,
 16820                    c,
 16821                  );
 16822                this.drawBitmap(o, l);
 16823              }
 16824              onImmediateLosslessHalftoneRegion() {
 16825                this.onImmediateHalftoneRegion(...arguments);
 16826              }
 16827              onTables(e, t, a, r) {
 16828                let i = this.customTables;
 16829                i || (this.customTables = i = {});
 16830                i[e] = (function decodeTablesSegment(e, t, a) {
 16831                  const r = e[t],
 16832                    i = 4294967295 & (0, n.readUint32)(e, t + 1),
 16833                    s = 4294967295 & (0, n.readUint32)(e, t + 5),
 16834                    o = new Reader(e, t + 9, a),
 16835                    c = 1 + ((r >> 1) & 7),
 16836                    l = 1 + ((r >> 4) & 7),
 16837                    h = [];
 16838                  let u,
 16839                    d,
 16840                    f = i;
 16841                  do {
 16842                    u = o.readBits(c);
 16843                    d = o.readBits(l);
 16844                    h.push(new HuffmanLine([f, u, d, 0]));
 16845                    f += 1 << d;
 16846                  } while (f < s);
 16847                  u = o.readBits(c);
 16848                  h.push(new HuffmanLine([i - 1, u, 32, 0, "lower"]));
 16849                  u = o.readBits(c);
 16850                  h.push(new HuffmanLine([s, u, 32, 0]));
 16851                  if (1 & r) {
 16852                    u = o.readBits(c);
 16853                    h.push(new HuffmanLine([u, 0]));
 16854                  }
 16855                  return new HuffmanTable(h, !1);
 16856                })(t, a, r);
 16857              }
 16858            }
 16859            class HuffmanLine {
 16860              constructor(e) {
 16861                if (2 === e.length) {
 16862                  this.isOOB = !0;
 16863                  this.rangeLow = 0;
 16864                  this.prefixLength = e[0];
 16865                  this.rangeLength = 0;
 16866                  this.prefixCode = e[1];
 16867                  this.isLowerRange = !1;
 16868                } else {
 16869                  this.isOOB = !1;
 16870                  this.rangeLow = e[0];
 16871                  this.prefixLength = e[1];
 16872                  this.rangeLength = e[2];
 16873                  this.prefixCode = e[3];
 16874                  this.isLowerRange = "lower" === e[4];
 16875                }
 16876              }
 16877            }
 16878            class HuffmanTreeNode {
 16879              constructor(e) {
 16880                this.children = [];
 16881                if (e) {
 16882                  this.isLeaf = !0;
 16883                  this.rangeLength = e.rangeLength;
 16884                  this.rangeLow = e.rangeLow;
 16885                  this.isLowerRange = e.isLowerRange;
 16886                  this.isOOB = e.isOOB;
 16887                } else this.isLeaf = !1;
 16888              }
 16889              buildTree(e, t) {
 16890                const a = (e.prefixCode >> t) & 1;
 16891                if (t <= 0) this.children[a] = new HuffmanTreeNode(e);
 16892                else {
 16893                  let r = this.children[a];
 16894                  r || (this.children[a] = r = new HuffmanTreeNode(null));
 16895                  r.buildTree(e, t - 1);
 16896                }
 16897              }
 16898              decodeNode(e) {
 16899                if (this.isLeaf) {
 16900                  if (this.isOOB) return null;
 16901                  const t = e.readBits(this.rangeLength);
 16902                  return this.rangeLow + (this.isLowerRange ? -t : t);
 16903                }
 16904                const t = this.children[e.readBit()];
 16905                if (!t) throw new Jbig2Error("invalid Huffman data");
 16906                return t.decodeNode(e);
 16907              }
 16908            }
 16909            class HuffmanTable {
 16910              constructor(e, t) {
 16911                t || this.assignPrefixCodes(e);
 16912                this.rootNode = new HuffmanTreeNode(null);
 16913                for (let t = 0, a = e.length; t < a; t++) {
 16914                  const a = e[t];
 16915                  a.prefixLength > 0 &&
 16916                    this.rootNode.buildTree(a, a.prefixLength - 1);
 16917                }
 16918              }
 16919              decode(e) {
 16920                return this.rootNode.decodeNode(e);
 16921              }
 16922              assignPrefixCodes(e) {
 16923                const t = e.length;
 16924                let a = 0;
 16925                for (let r = 0; r < t; r++) a = Math.max(a, e[r].prefixLength);
 16926                const r = new Uint32Array(a + 1);
 16927                for (let a = 0; a < t; a++) r[e[a].prefixLength]++;
 16928                let n,
 16929                  i,
 16930                  s,
 16931                  o = 1,
 16932                  c = 0;
 16933                r[0] = 0;
 16934                for (; o <= a; ) {
 16935                  c = (c + r[o - 1]) << 1;
 16936                  n = c;
 16937                  i = 0;
 16938                  for (; i < t; ) {
 16939                    s = e[i];
 16940                    if (s.prefixLength === o) {
 16941                      s.prefixCode = n;
 16942                      n++;
 16943                    }
 16944                    i++;
 16945                  }
 16946                  o++;
 16947                }
 16948              }
 16949            }
 16950            const p = {};
 16951            function getStandardTable(e) {
 16952              let t,
 16953                a = p[e];
 16954              if (a) return a;
 16955              switch (e) {
 16956                case 1:
 16957                  t = [
 16958                    [0, 1, 4, 0],
 16959                    [16, 2, 8, 2],
 16960                    [272, 3, 16, 6],
 16961                    [65808, 3, 32, 7],
 16962                  ];
 16963                  break;
 16964                case 2:
 16965                  t = [
 16966                    [0, 1, 0, 0],
 16967                    [1, 2, 0, 2],
 16968                    [2, 3, 0, 6],
 16969                    [3, 4, 3, 14],
 16970                    [11, 5, 6, 30],
 16971                    [75, 6, 32, 62],
 16972                    [6, 63],
 16973                  ];
 16974                  break;
 16975                case 3:
 16976                  t = [
 16977                    [-256, 8, 8, 254],
 16978                    [0, 1, 0, 0],
 16979                    [1, 2, 0, 2],
 16980                    [2, 3, 0, 6],
 16981                    [3, 4, 3, 14],
 16982                    [11, 5, 6, 30],
 16983                    [-257, 8, 32, 255, "lower"],
 16984                    [75, 7, 32, 126],
 16985                    [6, 62],
 16986                  ];
 16987                  break;
 16988                case 4:
 16989                  t = [
 16990                    [1, 1, 0, 0],
 16991                    [2, 2, 0, 2],
 16992                    [3, 3, 0, 6],
 16993                    [4, 4, 3, 14],
 16994                    [12, 5, 6, 30],
 16995                    [76, 5, 32, 31],
 16996                  ];
 16997                  break;
 16998                case 5:
 16999                  t = [
 17000                    [-255, 7, 8, 126],
 17001                    [1, 1, 0, 0],
 17002                    [2, 2, 0, 2],
 17003                    [3, 3, 0, 6],
 17004                    [4, 4, 3, 14],
 17005                    [12, 5, 6, 30],
 17006                    [-256, 7, 32, 127, "lower"],
 17007                    [76, 6, 32, 62],
 17008                  ];
 17009                  break;
 17010                case 6:
 17011                  t = [
 17012                    [-2048, 5, 10, 28],
 17013                    [-1024, 4, 9, 8],
 17014                    [-512, 4, 8, 9],
 17015                    [-256, 4, 7, 10],
 17016                    [-128, 5, 6, 29],
 17017                    [-64, 5, 5, 30],
 17018                    [-32, 4, 5, 11],
 17019                    [0, 2, 7, 0],
 17020                    [128, 3, 7, 2],
 17021                    [256, 3, 8, 3],
 17022                    [512, 4, 9, 12],
 17023                    [1024, 4, 10, 13],
 17024                    [-2049, 6, 32, 62, "lower"],
 17025                    [2048, 6, 32, 63],
 17026                  ];
 17027                  break;
 17028                case 7:
 17029                  t = [
 17030                    [-1024, 4, 9, 8],
 17031                    [-512, 3, 8, 0],
 17032                    [-256, 4, 7, 9],
 17033                    [-128, 5, 6, 26],
 17034                    [-64, 5, 5, 27],
 17035                    [-32, 4, 5, 10],
 17036                    [0, 4, 5, 11],
 17037                    [32, 5, 5, 28],
 17038                    [64, 5, 6, 29],
 17039                    [128, 4, 7, 12],
 17040                    [256, 3, 8, 1],
 17041                    [512, 3, 9, 2],
 17042                    [1024, 3, 10, 3],
 17043                    [-1025, 5, 32, 30, "lower"],
 17044                    [2048, 5, 32, 31],
 17045                  ];
 17046                  break;
 17047                case 8:
 17048                  t = [
 17049                    [-15, 8, 3, 252],
 17050                    [-7, 9, 1, 508],
 17051                    [-5, 8, 1, 253],
 17052                    [-3, 9, 0, 509],
 17053                    [-2, 7, 0, 124],
 17054                    [-1, 4, 0, 10],
 17055                    [0, 2, 1, 0],
 17056                    [2, 5, 0, 26],
 17057                    [3, 6, 0, 58],
 17058                    [4, 3, 4, 4],
 17059                    [20, 6, 1, 59],
 17060                    [22, 4, 4, 11],
 17061                    [38, 4, 5, 12],
 17062                    [70, 5, 6, 27],
 17063                    [134, 5, 7, 28],
 17064                    [262, 6, 7, 60],
 17065                    [390, 7, 8, 125],
 17066                    [646, 6, 10, 61],
 17067                    [-16, 9, 32, 510, "lower"],
 17068                    [1670, 9, 32, 511],
 17069                    [2, 1],
 17070                  ];
 17071                  break;
 17072                case 9:
 17073                  t = [
 17074                    [-31, 8, 4, 252],
 17075                    [-15, 9, 2, 508],
 17076                    [-11, 8, 2, 253],
 17077                    [-7, 9, 1, 509],
 17078                    [-5, 7, 1, 124],
 17079                    [-3, 4, 1, 10],
 17080                    [-1, 3, 1, 2],
 17081                    [1, 3, 1, 3],
 17082                    [3, 5, 1, 26],
 17083                    [5, 6, 1, 58],
 17084                    [7, 3, 5, 4],
 17085                    [39, 6, 2, 59],
 17086                    [43, 4, 5, 11],
 17087                    [75, 4, 6, 12],
 17088                    [139, 5, 7, 27],
 17089                    [267, 5, 8, 28],
 17090                    [523, 6, 8, 60],
 17091                    [779, 7, 9, 125],
 17092                    [1291, 6, 11, 61],
 17093                    [-32, 9, 32, 510, "lower"],
 17094                    [3339, 9, 32, 511],
 17095                    [2, 0],
 17096                  ];
 17097                  break;
 17098                case 10:
 17099                  t = [
 17100                    [-21, 7, 4, 122],
 17101                    [-5, 8, 0, 252],
 17102                    [-4, 7, 0, 123],
 17103                    [-3, 5, 0, 24],
 17104                    [-2, 2, 2, 0],
 17105                    [2, 5, 0, 25],
 17106                    [3, 6, 0, 54],
 17107                    [4, 7, 0, 124],
 17108                    [5, 8, 0, 253],
 17109                    [6, 2, 6, 1],
 17110                    [70, 5, 5, 26],
 17111                    [102, 6, 5, 55],
 17112                    [134, 6, 6, 56],
 17113                    [198, 6, 7, 57],
 17114                    [326, 6, 8, 58],
 17115                    [582, 6, 9, 59],
 17116                    [1094, 6, 10, 60],
 17117                    [2118, 7, 11, 125],
 17118                    [-22, 8, 32, 254, "lower"],
 17119                    [4166, 8, 32, 255],
 17120                    [2, 2],
 17121                  ];
 17122                  break;
 17123                case 11:
 17124                  t = [
 17125                    [1, 1, 0, 0],
 17126                    [2, 2, 1, 2],
 17127                    [4, 4, 0, 12],
 17128                    [5, 4, 1, 13],
 17129                    [7, 5, 1, 28],
 17130                    [9, 5, 2, 29],
 17131                    [13, 6, 2, 60],
 17132                    [17, 7, 2, 122],
 17133                    [21, 7, 3, 123],
 17134                    [29, 7, 4, 124],
 17135                    [45, 7, 5, 125],
 17136                    [77, 7, 6, 126],
 17137                    [141, 7, 32, 127],
 17138                  ];
 17139                  break;
 17140                case 12:
 17141                  t = [
 17142                    [1, 1, 0, 0],
 17143                    [2, 2, 0, 2],
 17144                    [3, 3, 1, 6],
 17145                    [5, 5, 0, 28],
 17146                    [6, 5, 1, 29],
 17147                    [8, 6, 1, 60],
 17148                    [10, 7, 0, 122],
 17149                    [11, 7, 1, 123],
 17150                    [13, 7, 2, 124],
 17151                    [17, 7, 3, 125],
 17152                    [25, 7, 4, 126],
 17153                    [41, 8, 5, 254],
 17154                    [73, 8, 32, 255],
 17155                  ];
 17156                  break;
 17157                case 13:
 17158                  t = [
 17159                    [1, 1, 0, 0],
 17160                    [2, 3, 0, 4],
 17161                    [3, 4, 0, 12],
 17162                    [4, 5, 0, 28],
 17163                    [5, 4, 1, 13],
 17164                    [7, 3, 3, 5],
 17165                    [15, 6, 1, 58],
 17166                    [17, 6, 2, 59],
 17167                    [21, 6, 3, 60],
 17168                    [29, 6, 4, 61],
 17169                    [45, 6, 5, 62],
 17170                    [77, 7, 6, 126],
 17171                    [141, 7, 32, 127],
 17172                  ];
 17173                  break;
 17174                case 14:
 17175                  t = [
 17176                    [-2, 3, 0, 4],
 17177                    [-1, 3, 0, 5],
 17178                    [0, 1, 0, 0],
 17179                    [1, 3, 0, 6],
 17180                    [2, 3, 0, 7],
 17181                  ];
 17182                  break;
 17183                case 15:
 17184                  t = [
 17185                    [-24, 7, 4, 124],
 17186                    [-8, 6, 2, 60],
 17187                    [-4, 5, 1, 28],
 17188                    [-2, 4, 0, 12],
 17189                    [-1, 3, 0, 4],
 17190                    [0, 1, 0, 0],
 17191                    [1, 3, 0, 5],
 17192                    [2, 4, 0, 13],
 17193                    [3, 5, 1, 29],
 17194                    [5, 6, 2, 61],
 17195                    [9, 7, 4, 125],
 17196                    [-25, 7, 32, 126, "lower"],
 17197                    [25, 7, 32, 127],
 17198                  ];
 17199                  break;
 17200                default:
 17201                  throw new Jbig2Error(`standard table B.${e} does not exist`);
 17202              }
 17203              for (let e = 0, a = t.length; e < a; e++)
 17204                t[e] = new HuffmanLine(t[e]);
 17205              a = new HuffmanTable(t, !0);
 17206              p[e] = a;
 17207              return a;
 17208            }
 17209            class Reader {
 17210              constructor(e, t, a) {
 17211                this.data = e;
 17212                this.start = t;
 17213                this.end = a;
 17214                this.position = t;
 17215                this.shift = -1;
 17216                this.currentByte = 0;
 17217              }
 17218              readBit() {
 17219                if (this.shift < 0) {
 17220                  if (this.position >= this.end)
 17221                    throw new Jbig2Error("end of data while reading bit");
 17222                  this.currentByte = this.data[this.position++];
 17223                  this.shift = 7;
 17224                }
 17225                const e = (this.currentByte >> this.shift) & 1;
 17226                this.shift--;
 17227                return e;
 17228              }
 17229              readBits(e) {
 17230                let t,
 17231                  a = 0;
 17232                for (t = e - 1; t >= 0; t--) a |= this.readBit() << t;
 17233                return a;
 17234              }
 17235              byteAlign() {
 17236                this.shift = -1;
 17237              }
 17238              next() {
 17239                return this.position >= this.end
 17240                  ? -1
 17241                  : this.data[this.position++];
 17242              }
 17243            }
 17244            function getCustomHuffmanTable(e, t, a) {
 17245              let r = 0;
 17246              for (let n = 0, i = t.length; n < i; n++) {
 17247                const i = a[t[n]];
 17248                if (i) {
 17249                  if (e === r) return i;
 17250                  r++;
 17251                }
 17252              }
 17253              throw new Jbig2Error("can't find custom Huffman table");
 17254            }
 17255            function readUncompressedBitmap(e, t, a) {
 17256              const r = [];
 17257              for (let n = 0; n < a; n++) {
 17258                const a = new Uint8Array(t);
 17259                r.push(a);
 17260                for (let r = 0; r < t; r++) a[r] = e.readBit();
 17261                e.byteAlign();
 17262              }
 17263              return r;
 17264            }
 17265            function decodeMMRBitmap(e, t, a, r) {
 17266              const n = {
 17267                  K: -1,
 17268                  Columns: t,
 17269                  Rows: a,
 17270                  BlackIs1: !0,
 17271                  EndOfBlock: r,
 17272                },
 17273                i = new s.CCITTFaxDecoder(e, n),
 17274                o = [];
 17275              let c,
 17276                l = !1;
 17277              for (let e = 0; e < a; e++) {
 17278                const e = new Uint8Array(t);
 17279                o.push(e);
 17280                let a = -1;
 17281                for (let r = 0; r < t; r++) {
 17282                  if (a < 0) {
 17283                    c = i.readNextChar();
 17284                    if (-1 === c) {
 17285                      c = 0;
 17286                      l = !0;
 17287                    }
 17288                    a = 7;
 17289                  }
 17290                  e[r] = (c >> a) & 1;
 17291                  a--;
 17292                }
 17293              }
 17294              if (r && !l) {
 17295                const e = 5;
 17296                for (let t = 0; t < e && -1 !== i.readNextChar(); t++);
 17297              }
 17298              return o;
 17299            }
 17300            t.Jbig2Image = class Jbig2Image {
 17301              parseChunks(e) {
 17302                return (function parseJbig2Chunks(e) {
 17303                  const t = new SimpleSegmentVisitor();
 17304                  for (let a = 0, r = e.length; a < r; a++) {
 17305                    const r = e[a];
 17306                    processSegments(readSegments({}, r.data, r.start, r.end), t);
 17307                  }
 17308                  return t.buffer;
 17309                })(e);
 17310              }
 17311              parse(e) {
 17312                throw new Error("Not implemented: Jbig2Image.parse");
 17313              }
 17314            };
 17315          },
 17316          (e, t) => {
 17317            Object.defineProperty(t, "__esModule", { value: !0 });
 17318            t.ArithmeticDecoder = void 0;
 17319            const a = [
 17320              { qe: 22017, nmps: 1, nlps: 1, switchFlag: 1 },
 17321              { qe: 13313, nmps: 2, nlps: 6, switchFlag: 0 },
 17322              { qe: 6145, nmps: 3, nlps: 9, switchFlag: 0 },
 17323              { qe: 2753, nmps: 4, nlps: 12, switchFlag: 0 },
 17324              { qe: 1313, nmps: 5, nlps: 29, switchFlag: 0 },
 17325              { qe: 545, nmps: 38, nlps: 33, switchFlag: 0 },
 17326              { qe: 22017, nmps: 7, nlps: 6, switchFlag: 1 },
 17327              { qe: 21505, nmps: 8, nlps: 14, switchFlag: 0 },
 17328              { qe: 18433, nmps: 9, nlps: 14, switchFlag: 0 },
 17329              { qe: 14337, nmps: 10, nlps: 14, switchFlag: 0 },
 17330              { qe: 12289, nmps: 11, nlps: 17, switchFlag: 0 },
 17331              { qe: 9217, nmps: 12, nlps: 18, switchFlag: 0 },
 17332              { qe: 7169, nmps: 13, nlps: 20, switchFlag: 0 },
 17333              { qe: 5633, nmps: 29, nlps: 21, switchFlag: 0 },
 17334              { qe: 22017, nmps: 15, nlps: 14, switchFlag: 1 },
 17335              { qe: 21505, nmps: 16, nlps: 14, switchFlag: 0 },
 17336              { qe: 20737, nmps: 17, nlps: 15, switchFlag: 0 },
 17337              { qe: 18433, nmps: 18, nlps: 16, switchFlag: 0 },
 17338              { qe: 14337, nmps: 19, nlps: 17, switchFlag: 0 },
 17339              { qe: 13313, nmps: 20, nlps: 18, switchFlag: 0 },
 17340              { qe: 12289, nmps: 21, nlps: 19, switchFlag: 0 },
 17341              { qe: 10241, nmps: 22, nlps: 19, switchFlag: 0 },
 17342              { qe: 9217, nmps: 23, nlps: 20, switchFlag: 0 },
 17343              { qe: 8705, nmps: 24, nlps: 21, switchFlag: 0 },
 17344              { qe: 7169, nmps: 25, nlps: 22, switchFlag: 0 },
 17345              { qe: 6145, nmps: 26, nlps: 23, switchFlag: 0 },
 17346              { qe: 5633, nmps: 27, nlps: 24, switchFlag: 0 },
 17347              { qe: 5121, nmps: 28, nlps: 25, switchFlag: 0 },
 17348              { qe: 4609, nmps: 29, nlps: 26, switchFlag: 0 },
 17349              { qe: 4353, nmps: 30, nlps: 27, switchFlag: 0 },
 17350              { qe: 2753, nmps: 31, nlps: 28, switchFlag: 0 },
 17351              { qe: 2497, nmps: 32, nlps: 29, switchFlag: 0 },
 17352              { qe: 2209, nmps: 33, nlps: 30, switchFlag: 0 },
 17353              { qe: 1313, nmps: 34, nlps: 31, switchFlag: 0 },
 17354              { qe: 1089, nmps: 35, nlps: 32, switchFlag: 0 },
 17355              { qe: 673, nmps: 36, nlps: 33, switchFlag: 0 },
 17356              { qe: 545, nmps: 37, nlps: 34, switchFlag: 0 },
 17357              { qe: 321, nmps: 38, nlps: 35, switchFlag: 0 },
 17358              { qe: 273, nmps: 39, nlps: 36, switchFlag: 0 },
 17359              { qe: 133, nmps: 40, nlps: 37, switchFlag: 0 },
 17360              { qe: 73, nmps: 41, nlps: 38, switchFlag: 0 },
 17361              { qe: 37, nmps: 42, nlps: 39, switchFlag: 0 },
 17362              { qe: 21, nmps: 43, nlps: 40, switchFlag: 0 },
 17363              { qe: 9, nmps: 44, nlps: 41, switchFlag: 0 },
 17364              { qe: 5, nmps: 45, nlps: 42, switchFlag: 0 },
 17365              { qe: 1, nmps: 45, nlps: 43, switchFlag: 0 },
 17366              { qe: 22017, nmps: 46, nlps: 46, switchFlag: 0 },
 17367            ];
 17368            t.ArithmeticDecoder = class ArithmeticDecoder {
 17369              constructor(e, t, a) {
 17370                this.data = e;
 17371                this.bp = t;
 17372                this.dataEnd = a;
 17373                this.chigh = e[t];
 17374                this.clow = 0;
 17375                this.byteIn();
 17376                this.chigh =
 17377                  ((this.chigh << 7) & 65535) | ((this.clow >> 9) & 127);
 17378                this.clow = (this.clow << 7) & 65535;
 17379                this.ct -= 7;
 17380                this.a = 32768;
 17381              }
 17382              byteIn() {
 17383                const e = this.data;
 17384                let t = this.bp;
 17385                if (255 === e[t])
 17386                  if (e[t + 1] > 143) {
 17387                    this.clow += 65280;
 17388                    this.ct = 8;
 17389                  } else {
 17390                    t++;
 17391                    this.clow += e[t] << 9;
 17392                    this.ct = 7;
 17393                    this.bp = t;
 17394                  }
 17395                else {
 17396                  t++;
 17397                  this.clow += t < this.dataEnd ? e[t] << 8 : 65280;
 17398                  this.ct = 8;
 17399                  this.bp = t;
 17400                }
 17401                if (this.clow > 65535) {
 17402                  this.chigh += this.clow >> 16;
 17403                  this.clow &= 65535;
 17404                }
 17405              }
 17406              readBit(e, t) {
 17407                let r = e[t] >> 1,
 17408                  n = 1 & e[t];
 17409                const i = a[r],
 17410                  s = i.qe;
 17411                let o,
 17412                  c = this.a - s;
 17413                if (this.chigh < s)
 17414                  if (c < s) {
 17415                    c = s;
 17416                    o = n;
 17417                    r = i.nmps;
 17418                  } else {
 17419                    c = s;
 17420                    o = 1 ^ n;
 17421                    1 === i.switchFlag && (n = o);
 17422                    r = i.nlps;
 17423                  }
 17424                else {
 17425                  this.chigh -= s;
 17426                  if (0 != (32768 & c)) {
 17427                    this.a = c;
 17428                    return n;
 17429                  }
 17430                  if (c < s) {
 17431                    o = 1 ^ n;
 17432                    1 === i.switchFlag && (n = o);
 17433                    r = i.nlps;
 17434                  } else {
 17435                    o = n;
 17436                    r = i.nmps;
 17437                  }
 17438                }
 17439                do {
 17440                  0 === this.ct && this.byteIn();
 17441                  c <<= 1;
 17442                  this.chigh =
 17443                    ((this.chigh << 1) & 65535) | ((this.clow >> 15) & 1);
 17444                  this.clow = (this.clow << 1) & 65535;
 17445                  this.ct--;
 17446                } while (0 == (32768 & c));
 17447                this.a = c;
 17448                e[t] = (r << 1) | n;
 17449                return o;
 17450              }
 17451            };
 17452          },
 17453          (e, t, a) => {
 17454            Object.defineProperty(t, "__esModule", { value: !0 });
 17455            t.JpegStream = void 0;
 17456            var r = a(18),
 17457              n = a(4),
 17458              i = a(27),
 17459              s = a(2);
 17460            class JpegStream extends r.DecodeStream {
 17461              constructor(e, t, a) {
 17462                let r;
 17463                for (; -1 !== (r = e.getByte()); )
 17464                  if (255 === r) {
 17465                    e.skip(-1);
 17466                    break;
 17467                  }
 17468                super(t);
 17469                this.stream = e;
 17470                this.dict = e.dict;
 17471                this.maybeLength = t;
 17472                this.params = a;
 17473              }
 17474              get bytes() {
 17475                return (0, s.shadow)(
 17476                  this,
 17477                  "bytes",
 17478                  this.stream.getBytes(this.maybeLength),
 17479                );
 17480              }
 17481              ensureBuffer(e) {}
 17482              readBlock() {
 17483                if (this.eof) return;
 17484                const e = { decodeTransform: void 0, colorTransform: void 0 },
 17485                  t = this.dict.getArray("D", "Decode");
 17486                if ((this.forceRGBA || this.forceRGB) && Array.isArray(t)) {
 17487                  const a = this.dict.get("BPC", "BitsPerComponent") || 8,
 17488                    r = t.length,
 17489                    n = new Int32Array(r);
 17490                  let i = !1;
 17491                  const s = (1 << a) - 1;
 17492                  for (let e = 0; e < r; e += 2) {
 17493                    n[e] = (256 * (t[e + 1] - t[e])) | 0;
 17494                    n[e + 1] = (t[e] * s) | 0;
 17495                    (256 === n[e] && 0 === n[e + 1]) || (i = !0);
 17496                  }
 17497                  i && (e.decodeTransform = n);
 17498                }
 17499                if (this.params instanceof n.Dict) {
 17500                  const t = this.params.get("ColorTransform");
 17501                  Number.isInteger(t) && (e.colorTransform = t);
 17502                }
 17503                const a = new i.JpegImage(e);
 17504                a.parse(this.bytes);
 17505                const r = a.getData({
 17506                  width: this.drawWidth,
 17507                  height: this.drawHeight,
 17508                  forceRGBA: this.forceRGBA,
 17509                  forceRGB: this.forceRGB,
 17510                  isSourcePDF: !0,
 17511                });
 17512                this.buffer = r;
 17513                this.bufferLength = r.length;
 17514                this.eof = !0;
 17515              }
 17516            }
 17517            t.JpegStream = JpegStream;
 17518          },
 17519          (e, t, a) => {
 17520            Object.defineProperty(t, "__esModule", { value: !0 });
 17521            t.JpegImage = void 0;
 17522            var r = a(2),
 17523              n = a(28),
 17524              i = a(3);
 17525            class JpegError extends r.BaseException {
 17526              constructor(e) {
 17527                super(`JPEG error: ${e}`, "JpegError");
 17528              }
 17529            }
 17530            class DNLMarkerError extends r.BaseException {
 17531              constructor(e, t) {
 17532                super(e, "DNLMarkerError");
 17533                this.scanLines = t;
 17534              }
 17535            }
 17536            class EOIMarkerError extends r.BaseException {
 17537              constructor(e) {
 17538                super(e, "EOIMarkerError");
 17539              }
 17540            }
 17541            const s = new Uint8Array([
 17542                0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19,
 17543                26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49,
 17544                56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, 58, 59, 52,
 17545                45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63,
 17546              ]),
 17547              o = 4017,
 17548              c = 799,
 17549              l = 3406,
 17550              h = 2276,
 17551              u = 1567,
 17552              d = 3784,
 17553              f = 5793,
 17554              g = 2896;
 17555            function buildHuffmanTable(e, t) {
 17556              let a,
 17557                r,
 17558                n = 0,
 17559                i = 16;
 17560              for (; i > 0 && !e[i - 1]; ) i--;
 17561              const s = [{ children: [], index: 0 }];
 17562              let o,
 17563                c = s[0];
 17564              for (a = 0; a < i; a++) {
 17565                for (r = 0; r < e[a]; r++) {
 17566                  c = s.pop();
 17567                  c.children[c.index] = t[n];
 17568                  for (; c.index > 0; ) c = s.pop();
 17569                  c.index++;
 17570                  s.push(c);
 17571                  for (; s.length <= a; ) {
 17572                    s.push((o = { children: [], index: 0 }));
 17573                    c.children[c.index] = o.children;
 17574                    c = o;
 17575                  }
 17576                  n++;
 17577                }
 17578                if (a + 1 < i) {
 17579                  s.push((o = { children: [], index: 0 }));
 17580                  c.children[c.index] = o.children;
 17581                  c = o;
 17582                }
 17583              }
 17584              return s[0].children;
 17585            }
 17586            function getBlockBufferOffset(e, t, a) {
 17587              return 64 * ((e.blocksPerLine + 1) * t + a);
 17588            }
 17589            function decodeScan(e, t, a, n, o, c, l, h, u, d = !1) {
 17590              const f = a.mcusPerLine,
 17591                g = a.progressive,
 17592                p = t;
 17593              let m = 0,
 17594                b = 0;
 17595              function readBit() {
 17596                if (b > 0) {
 17597                  b--;
 17598                  return (m >> b) & 1;
 17599                }
 17600                m = e[t++];
 17601                if (255 === m) {
 17602                  const r = e[t++];
 17603                  if (r) {
 17604                    if (220 === r && d) {
 17605                      t += 2;
 17606                      const r = (0, i.readUint16)(e, t);
 17607                      t += 2;
 17608                      if (r > 0 && r !== a.scanLines)
 17609                        throw new DNLMarkerError(
 17610                          "Found DNL marker (0xFFDC) while parsing scan data",
 17611                          r,
 17612                        );
 17613                    } else if (217 === r) {
 17614                      if (d) {
 17615                        const e = x * (8 === a.precision ? 8 : 0);
 17616                        if (e > 0 && Math.round(a.scanLines / e) >= 5)
 17617                          throw new DNLMarkerError(
 17618                            "Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",
 17619                            e,
 17620                          );
 17621                      }
 17622                      throw new EOIMarkerError(
 17623                        "Found EOI marker (0xFFD9) while parsing scan data",
 17624                      );
 17625                    }
 17626                    throw new JpegError(
 17627                      `unexpected marker ${((m << 8) | r).toString(16)}`,
 17628                    );
 17629                  }
 17630                }
 17631                b = 7;
 17632                return m >>> 7;
 17633              }
 17634              function decodeHuffman(e) {
 17635                let t = e;
 17636                for (;;) {
 17637                  t = t[readBit()];
 17638                  switch (typeof t) {
 17639                    case "number":
 17640                      return t;
 17641                    case "object":
 17642                      continue;
 17643                  }
 17644                  throw new JpegError("invalid huffman sequence");
 17645                }
 17646              }
 17647              function receive(e) {
 17648                let t = 0;
 17649                for (; e > 0; ) {
 17650                  t = (t << 1) | readBit();
 17651                  e--;
 17652                }
 17653                return t;
 17654              }
 17655              function receiveAndExtend(e) {
 17656                if (1 === e) return 1 === readBit() ? 1 : -1;
 17657                const t = receive(e);
 17658                return t >= 1 << (e - 1) ? t : t + (-1 << e) + 1;
 17659              }
 17660              let y = 0;
 17661              let w,
 17662                S = 0;
 17663              let x = 0;
 17664              function decodeMcu(e, t, a, r, n) {
 17665                const i = a % f;
 17666                x = ((a / f) | 0) * e.v + r;
 17667                const s = i * e.h + n;
 17668                t(e, getBlockBufferOffset(e, x, s));
 17669              }
 17670              function decodeBlock(e, t, a) {
 17671                x = (a / e.blocksPerLine) | 0;
 17672                const r = a % e.blocksPerLine;
 17673                t(e, getBlockBufferOffset(e, x, r));
 17674              }
 17675              const C = n.length;
 17676              let k, v, F, O, T, M;
 17677              M = g
 17678                ? 0 === c
 17679                  ? 0 === h
 17680                    ? function decodeDCFirst(e, t) {
 17681                        const a = decodeHuffman(e.huffmanTableDC),
 17682                          r = 0 === a ? 0 : receiveAndExtend(a) << u;
 17683                        e.blockData[t] = e.pred += r;
 17684                      }
 17685                    : function decodeDCSuccessive(e, t) {
 17686                        e.blockData[t] |= readBit() << u;
 17687                      }
 17688                  : 0 === h
 17689                    ? function decodeACFirst(e, t) {
 17690                        if (y > 0) {
 17691                          y--;
 17692                          return;
 17693                        }
 17694                        let a = c;
 17695                        const r = l;
 17696                        for (; a <= r; ) {
 17697                          const r = decodeHuffman(e.huffmanTableAC),
 17698                            n = 15 & r,
 17699                            i = r >> 4;
 17700                          if (0 === n) {
 17701                            if (i < 15) {
 17702                              y = receive(i) + (1 << i) - 1;
 17703                              break;
 17704                            }
 17705                            a += 16;
 17706                            continue;
 17707                          }
 17708                          a += i;
 17709                          const o = s[a];
 17710                          e.blockData[t + o] = receiveAndExtend(n) * (1 << u);
 17711                          a++;
 17712                        }
 17713                      }
 17714                    : function decodeACSuccessive(e, t) {
 17715                        let a = c;
 17716                        const r = l;
 17717                        let n,
 17718                          i,
 17719                          o = 0;
 17720                        for (; a <= r; ) {
 17721                          const r = t + s[a],
 17722                            c = e.blockData[r] < 0 ? -1 : 1;
 17723                          switch (S) {
 17724                            case 0:
 17725                              i = decodeHuffman(e.huffmanTableAC);
 17726                              n = 15 & i;
 17727                              o = i >> 4;
 17728                              if (0 === n)
 17729                                if (o < 15) {
 17730                                  y = receive(o) + (1 << o);
 17731                                  S = 4;
 17732                                } else {
 17733                                  o = 16;
 17734                                  S = 1;
 17735                                }
 17736                              else {
 17737                                if (1 !== n)
 17738                                  throw new JpegError("invalid ACn encoding");
 17739                                w = receiveAndExtend(n);
 17740                                S = o ? 2 : 3;
 17741                              }
 17742                              continue;
 17743                            case 1:
 17744                            case 2:
 17745                              if (e.blockData[r])
 17746                                e.blockData[r] += c * (readBit() << u);
 17747                              else {
 17748                                o--;
 17749                                0 === o && (S = 2 === S ? 3 : 0);
 17750                              }
 17751                              break;
 17752                            case 3:
 17753                              if (e.blockData[r])
 17754                                e.blockData[r] += c * (readBit() << u);
 17755                              else {
 17756                                e.blockData[r] = w << u;
 17757                                S = 0;
 17758                              }
 17759                              break;
 17760                            case 4:
 17761                              e.blockData[r] &&
 17762                                (e.blockData[r] += c * (readBit() << u));
 17763                          }
 17764                          a++;
 17765                        }
 17766                        if (4 === S) {
 17767                          y--;
 17768                          0 === y && (S = 0);
 17769                        }
 17770                      }
 17771                : function decodeBaseline(e, t) {
 17772                    const a = decodeHuffman(e.huffmanTableDC),
 17773                      r = 0 === a ? 0 : receiveAndExtend(a);
 17774                    e.blockData[t] = e.pred += r;
 17775                    let n = 1;
 17776                    for (; n < 64; ) {
 17777                      const a = decodeHuffman(e.huffmanTableAC),
 17778                        r = 15 & a,
 17779                        i = a >> 4;
 17780                      if (0 === r) {
 17781                        if (i < 15) break;
 17782                        n += 16;
 17783                        continue;
 17784                      }
 17785                      n += i;
 17786                      const o = s[n];
 17787                      e.blockData[t + o] = receiveAndExtend(r);
 17788                      n++;
 17789                    }
 17790                  };
 17791              let D,
 17792                E = 0;
 17793              const N =
 17794                1 === C
 17795                  ? n[0].blocksPerLine * n[0].blocksPerColumn
 17796                  : f * a.mcusPerColumn;
 17797              let R, L;
 17798              for (; E <= N; ) {
 17799                const a = o ? Math.min(N - E, o) : N;
 17800                if (a > 0) {
 17801                  for (v = 0; v < C; v++) n[v].pred = 0;
 17802                  y = 0;
 17803                  if (1 === C) {
 17804                    k = n[0];
 17805                    for (T = 0; T < a; T++) {
 17806                      decodeBlock(k, M, E);
 17807                      E++;
 17808                    }
 17809                  } else
 17810                    for (T = 0; T < a; T++) {
 17811                      for (v = 0; v < C; v++) {
 17812                        k = n[v];
 17813                        R = k.h;
 17814                        L = k.v;
 17815                        for (F = 0; F < L; F++)
 17816                          for (O = 0; O < R; O++) decodeMcu(k, M, E, F, O);
 17817                      }
 17818                      E++;
 17819                    }
 17820                }
 17821                b = 0;
 17822                D = findNextFileMarker(e, t);
 17823                if (!D) break;
 17824                if (D.invalid) {
 17825                  const e = a > 0 ? "unexpected" : "excessive";
 17826                  (0, r.warn)(
 17827                    `decodeScan - ${e} MCU data, current marker is: ${D.invalid}`,
 17828                  );
 17829                  t = D.offset;
 17830                }
 17831                if (!(D.marker >= 65488 && D.marker <= 65495)) break;
 17832                t += 2;
 17833              }
 17834              return t - p;
 17835            }
 17836            function quantizeAndInverse(e, t, a) {
 17837              const r = e.quantizationTable,
 17838                n = e.blockData;
 17839              let i, s, p, m, b, y, w, S, x, C, k, v, F, O, T, M, D;
 17840              if (!r) throw new JpegError("missing required Quantization Table.");
 17841              for (let e = 0; e < 64; e += 8) {
 17842                x = n[t + e];
 17843                C = n[t + e + 1];
 17844                k = n[t + e + 2];
 17845                v = n[t + e + 3];
 17846                F = n[t + e + 4];
 17847                O = n[t + e + 5];
 17848                T = n[t + e + 6];
 17849                M = n[t + e + 7];
 17850                x *= r[e];
 17851                if (0 != (C | k | v | F | O | T | M)) {
 17852                  C *= r[e + 1];
 17853                  k *= r[e + 2];
 17854                  v *= r[e + 3];
 17855                  F *= r[e + 4];
 17856                  O *= r[e + 5];
 17857                  T *= r[e + 6];
 17858                  M *= r[e + 7];
 17859                  i = (f * x + 128) >> 8;
 17860                  s = (f * F + 128) >> 8;
 17861                  p = k;
 17862                  m = T;
 17863                  b = (g * (C - M) + 128) >> 8;
 17864                  S = (g * (C + M) + 128) >> 8;
 17865                  y = v << 4;
 17866                  w = O << 4;
 17867                  i = (i + s + 1) >> 1;
 17868                  s = i - s;
 17869                  D = (p * d + m * u + 128) >> 8;
 17870                  p = (p * u - m * d + 128) >> 8;
 17871                  m = D;
 17872                  b = (b + w + 1) >> 1;
 17873                  w = b - w;
 17874                  S = (S + y + 1) >> 1;
 17875                  y = S - y;
 17876                  i = (i + m + 1) >> 1;
 17877                  m = i - m;
 17878                  s = (s + p + 1) >> 1;
 17879                  p = s - p;
 17880                  D = (b * h + S * l + 2048) >> 12;
 17881                  b = (b * l - S * h + 2048) >> 12;
 17882                  S = D;
 17883                  D = (y * c + w * o + 2048) >> 12;
 17884                  y = (y * o - w * c + 2048) >> 12;
 17885                  w = D;
 17886                  a[e] = i + S;
 17887                  a[e + 7] = i - S;
 17888                  a[e + 1] = s + w;
 17889                  a[e + 6] = s - w;
 17890                  a[e + 2] = p + y;
 17891                  a[e + 5] = p - y;
 17892                  a[e + 3] = m + b;
 17893                  a[e + 4] = m - b;
 17894                } else {
 17895                  D = (f * x + 512) >> 10;
 17896                  a[e] = D;
 17897                  a[e + 1] = D;
 17898                  a[e + 2] = D;
 17899                  a[e + 3] = D;
 17900                  a[e + 4] = D;
 17901                  a[e + 5] = D;
 17902                  a[e + 6] = D;
 17903                  a[e + 7] = D;
 17904                }
 17905              }
 17906              for (let e = 0; e < 8; ++e) {
 17907                x = a[e];
 17908                C = a[e + 8];
 17909                k = a[e + 16];
 17910                v = a[e + 24];
 17911                F = a[e + 32];
 17912                O = a[e + 40];
 17913                T = a[e + 48];
 17914                M = a[e + 56];
 17915                if (0 != (C | k | v | F | O | T | M)) {
 17916                  i = (f * x + 2048) >> 12;
 17917                  s = (f * F + 2048) >> 12;
 17918                  p = k;
 17919                  m = T;
 17920                  b = (g * (C - M) + 2048) >> 12;
 17921                  S = (g * (C + M) + 2048) >> 12;
 17922                  y = v;
 17923                  w = O;
 17924                  i = 4112 + ((i + s + 1) >> 1);
 17925                  s = i - s;
 17926                  D = (p * d + m * u + 2048) >> 12;
 17927                  p = (p * u - m * d + 2048) >> 12;
 17928                  m = D;
 17929                  b = (b + w + 1) >> 1;
 17930                  w = b - w;
 17931                  S = (S + y + 1) >> 1;
 17932                  y = S - y;
 17933                  i = (i + m + 1) >> 1;
 17934                  m = i - m;
 17935                  s = (s + p + 1) >> 1;
 17936                  p = s - p;
 17937                  D = (b * h + S * l + 2048) >> 12;
 17938                  b = (b * l - S * h + 2048) >> 12;
 17939                  S = D;
 17940                  D = (y * c + w * o + 2048) >> 12;
 17941                  y = (y * o - w * c + 2048) >> 12;
 17942                  w = D;
 17943                  x = i + S;
 17944                  M = i - S;
 17945                  C = s + w;
 17946                  T = s - w;
 17947                  k = p + y;
 17948                  O = p - y;
 17949                  v = m + b;
 17950                  F = m - b;
 17951                  x < 16 ? (x = 0) : x >= 4080 ? (x = 255) : (x >>= 4);
 17952                  C < 16 ? (C = 0) : C >= 4080 ? (C = 255) : (C >>= 4);
 17953                  k < 16 ? (k = 0) : k >= 4080 ? (k = 255) : (k >>= 4);
 17954                  v < 16 ? (v = 0) : v >= 4080 ? (v = 255) : (v >>= 4);
 17955                  F < 16 ? (F = 0) : F >= 4080 ? (F = 255) : (F >>= 4);
 17956                  O < 16 ? (O = 0) : O >= 4080 ? (O = 255) : (O >>= 4);
 17957                  T < 16 ? (T = 0) : T >= 4080 ? (T = 255) : (T >>= 4);
 17958                  M < 16 ? (M = 0) : M >= 4080 ? (M = 255) : (M >>= 4);
 17959                  n[t + e] = x;
 17960                  n[t + e + 8] = C;
 17961                  n[t + e + 16] = k;
 17962                  n[t + e + 24] = v;
 17963                  n[t + e + 32] = F;
 17964                  n[t + e + 40] = O;
 17965                  n[t + e + 48] = T;
 17966                  n[t + e + 56] = M;
 17967                } else {
 17968                  D = (f * x + 8192) >> 14;
 17969                  D = D < -2040 ? 0 : D >= 2024 ? 255 : (D + 2056) >> 4;
 17970                  n[t + e] = D;
 17971                  n[t + e + 8] = D;
 17972                  n[t + e + 16] = D;
 17973                  n[t + e + 24] = D;
 17974                  n[t + e + 32] = D;
 17975                  n[t + e + 40] = D;
 17976                  n[t + e + 48] = D;
 17977                  n[t + e + 56] = D;
 17978                }
 17979              }
 17980            }
 17981            function buildComponentData(e, t) {
 17982              const a = t.blocksPerLine,
 17983                r = t.blocksPerColumn,
 17984                n = new Int16Array(64);
 17985              for (let e = 0; e < r; e++)
 17986                for (let r = 0; r < a; r++) {
 17987                  quantizeAndInverse(t, getBlockBufferOffset(t, e, r), n);
 17988                }
 17989              return t.blockData;
 17990            }
 17991            function findNextFileMarker(e, t, a = t) {
 17992              const r = e.length - 1;
 17993              let n = a < t ? a : t;
 17994              if (t >= r) return null;
 17995              const s = (0, i.readUint16)(e, t);
 17996              if (s >= 65472 && s <= 65534)
 17997                return { invalid: null, marker: s, offset: t };
 17998              let o = (0, i.readUint16)(e, n);
 17999              for (; !(o >= 65472 && o <= 65534); ) {
 18000                if (++n >= r) return null;
 18001                o = (0, i.readUint16)(e, n);
 18002              }
 18003              return { invalid: s.toString(16), marker: o, offset: n };
 18004            }
 18005            t.JpegImage = class JpegImage {
 18006              constructor({
 18007                decodeTransform: e = null,
 18008                colorTransform: t = -1,
 18009              } = {}) {
 18010                this._decodeTransform = e;
 18011                this._colorTransform = t;
 18012              }
 18013              parse(e, { dnlScanLines: t = null } = {}) {
 18014                function readDataBlock() {
 18015                  const t = (0, i.readUint16)(e, o);
 18016                  o += 2;
 18017                  let a = o + t - 2;
 18018                  const n = findNextFileMarker(e, a, o);
 18019                  if (n?.invalid) {
 18020                    (0, r.warn)(
 18021                      "readDataBlock - incorrect length, current marker is: " +
 18022                        n.invalid,
 18023                    );
 18024                    a = n.offset;
 18025                  }
 18026                  const s = e.subarray(o, a);
 18027                  o += s.length;
 18028                  return s;
 18029                }
 18030                function prepareComponents(e) {
 18031                  const t = Math.ceil(e.samplesPerLine / 8 / e.maxH),
 18032                    a = Math.ceil(e.scanLines / 8 / e.maxV);
 18033                  for (const r of e.components) {
 18034                    const n = Math.ceil(
 18035                        (Math.ceil(e.samplesPerLine / 8) * r.h) / e.maxH,
 18036                      ),
 18037                      i = Math.ceil((Math.ceil(e.scanLines / 8) * r.v) / e.maxV),
 18038                      s = t * r.h,
 18039                      o = 64 * (a * r.v) * (s + 1);
 18040                    r.blockData = new Int16Array(o);
 18041                    r.blocksPerLine = n;
 18042                    r.blocksPerColumn = i;
 18043                  }
 18044                  e.mcusPerLine = t;
 18045                  e.mcusPerColumn = a;
 18046                }
 18047                let a,
 18048                  n,
 18049                  o = 0,
 18050                  c = null,
 18051                  l = null,
 18052                  h = 0;
 18053                const u = [],
 18054                  d = [],
 18055                  f = [];
 18056                let g = (0, i.readUint16)(e, o);
 18057                o += 2;
 18058                if (65496 !== g) throw new JpegError("SOI not found");
 18059                g = (0, i.readUint16)(e, o);
 18060                o += 2;
 18061                e: for (; 65497 !== g; ) {
 18062                  let p, m, b;
 18063                  switch (g) {
 18064                    case 65504:
 18065                    case 65505:
 18066                    case 65506:
 18067                    case 65507:
 18068                    case 65508:
 18069                    case 65509:
 18070                    case 65510:
 18071                    case 65511:
 18072                    case 65512:
 18073                    case 65513:
 18074                    case 65514:
 18075                    case 65515:
 18076                    case 65516:
 18077                    case 65517:
 18078                    case 65518:
 18079                    case 65519:
 18080                    case 65534:
 18081                      const y = readDataBlock();
 18082                      65504 === g &&
 18083                        74 === y[0] &&
 18084                        70 === y[1] &&
 18085                        73 === y[2] &&
 18086                        70 === y[3] &&
 18087                        0 === y[4] &&
 18088                        (c = {
 18089                          version: { major: y[5], minor: y[6] },
 18090                          densityUnits: y[7],
 18091                          xDensity: (y[8] << 8) | y[9],
 18092                          yDensity: (y[10] << 8) | y[11],
 18093                          thumbWidth: y[12],
 18094                          thumbHeight: y[13],
 18095                          thumbData: y.subarray(14, 14 + 3 * y[12] * y[13]),
 18096                        });
 18097                      65518 === g &&
 18098                        65 === y[0] &&
 18099                        100 === y[1] &&
 18100                        111 === y[2] &&
 18101                        98 === y[3] &&
 18102                        101 === y[4] &&
 18103                        (l = {
 18104                          version: (y[5] << 8) | y[6],
 18105                          flags0: (y[7] << 8) | y[8],
 18106                          flags1: (y[9] << 8) | y[10],
 18107                          transformCode: y[11],
 18108                        });
 18109                      break;
 18110                    case 65499:
 18111                      const w = (0, i.readUint16)(e, o);
 18112                      o += 2;
 18113                      const S = w + o - 2;
 18114                      let x;
 18115                      for (; o < S; ) {
 18116                        const t = e[o++],
 18117                          a = new Uint16Array(64);
 18118                        if (t >> 4 == 0)
 18119                          for (m = 0; m < 64; m++) {
 18120                            x = s[m];
 18121                            a[x] = e[o++];
 18122                          }
 18123                        else {
 18124                          if (t >> 4 != 1)
 18125                            throw new JpegError("DQT - invalid table spec");
 18126                          for (m = 0; m < 64; m++) {
 18127                            x = s[m];
 18128                            a[x] = (0, i.readUint16)(e, o);
 18129                            o += 2;
 18130                          }
 18131                        }
 18132                        u[15 & t] = a;
 18133                      }
 18134                      break;
 18135                    case 65472:
 18136                    case 65473:
 18137                    case 65474:
 18138                      if (a)
 18139                        throw new JpegError("Only single frame JPEGs supported");
 18140                      o += 2;
 18141                      a = {};
 18142                      a.extended = 65473 === g;
 18143                      a.progressive = 65474 === g;
 18144                      a.precision = e[o++];
 18145                      const C = (0, i.readUint16)(e, o);
 18146                      o += 2;
 18147                      a.scanLines = t || C;
 18148                      a.samplesPerLine = (0, i.readUint16)(e, o);
 18149                      o += 2;
 18150                      a.components = [];
 18151                      a.componentIds = {};
 18152                      const k = e[o++];
 18153                      let v = 0,
 18154                        F = 0;
 18155                      for (p = 0; p < k; p++) {
 18156                        const t = e[o],
 18157                          r = e[o + 1] >> 4,
 18158                          n = 15 & e[o + 1];
 18159                        v < r && (v = r);
 18160                        F < n && (F = n);
 18161                        const i = e[o + 2];
 18162                        b = a.components.push({
 18163                          h: r,
 18164                          v: n,
 18165                          quantizationId: i,
 18166                          quantizationTable: null,
 18167                        });
 18168                        a.componentIds[t] = b - 1;
 18169                        o += 3;
 18170                      }
 18171                      a.maxH = v;
 18172                      a.maxV = F;
 18173                      prepareComponents(a);
 18174                      break;
 18175                    case 65476:
 18176                      const O = (0, i.readUint16)(e, o);
 18177                      o += 2;
 18178                      for (p = 2; p < O; ) {
 18179                        const t = e[o++],
 18180                          a = new Uint8Array(16);
 18181                        let r = 0;
 18182                        for (m = 0; m < 16; m++, o++) r += a[m] = e[o];
 18183                        const n = new Uint8Array(r);
 18184                        for (m = 0; m < r; m++, o++) n[m] = e[o];
 18185                        p += 17 + r;
 18186                        (t >> 4 == 0 ? f : d)[15 & t] = buildHuffmanTable(a, n);
 18187                      }
 18188                      break;
 18189                    case 65501:
 18190                      o += 2;
 18191                      n = (0, i.readUint16)(e, o);
 18192                      o += 2;
 18193                      break;
 18194                    case 65498:
 18195                      const T = 1 == ++h && !t;
 18196                      o += 2;
 18197                      const M = e[o++],
 18198                        D = [];
 18199                      for (p = 0; p < M; p++) {
 18200                        const t = e[o++],
 18201                          r = a.componentIds[t],
 18202                          n = a.components[r];
 18203                        n.index = t;
 18204                        const i = e[o++];
 18205                        n.huffmanTableDC = f[i >> 4];
 18206                        n.huffmanTableAC = d[15 & i];
 18207                        D.push(n);
 18208                      }
 18209                      const E = e[o++],
 18210                        N = e[o++],
 18211                        R = e[o++];
 18212                      try {
 18213                        const t = decodeScan(
 18214                          e,
 18215                          o,
 18216                          a,
 18217                          D,
 18218                          n,
 18219                          E,
 18220                          N,
 18221                          R >> 4,
 18222                          15 & R,
 18223                          T,
 18224                        );
 18225                        o += t;
 18226                      } catch (t) {
 18227                        if (t instanceof DNLMarkerError) {
 18228                          (0, r.warn)(
 18229                            `${t.message} -- attempting to re-parse the JPEG image.`,
 18230                          );
 18231                          return this.parse(e, { dnlScanLines: t.scanLines });
 18232                        }
 18233                        if (t instanceof EOIMarkerError) {
 18234                          (0, r.warn)(
 18235                            `${t.message} -- ignoring the rest of the image data.`,
 18236                          );
 18237                          break e;
 18238                        }
 18239                        throw t;
 18240                      }
 18241                      break;
 18242                    case 65500:
 18243                      o += 4;
 18244                      break;
 18245                    case 65535:
 18246                      255 !== e[o] && o--;
 18247                      break;
 18248                    default:
 18249                      const L = findNextFileMarker(e, o - 2, o - 3);
 18250                      if (L?.invalid) {
 18251                        (0, r.warn)(
 18252                          "JpegImage.parse - unexpected data, current marker is: " +
 18253                            L.invalid,
 18254                        );
 18255                        o = L.offset;
 18256                        break;
 18257                      }
 18258                      if (!L || o >= e.length - 1) {
 18259                        (0, r.warn)(
 18260                          "JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).",
 18261                        );
 18262                        break e;
 18263                      }
 18264                      throw new JpegError(
 18265                        "JpegImage.parse - unknown marker: " + g.toString(16),
 18266                      );
 18267                  }
 18268                  g = (0, i.readUint16)(e, o);
 18269                  o += 2;
 18270                }
 18271                this.width = a.samplesPerLine;
 18272                this.height = a.scanLines;
 18273                this.jfif = c;
 18274                this.adobe = l;
 18275                this.components = [];
 18276                for (const e of a.components) {
 18277                  const t = u[e.quantizationId];
 18278                  t && (e.quantizationTable = t);
 18279                  this.components.push({
 18280                    index: e.index,
 18281                    output: buildComponentData(0, e),
 18282                    scaleX: e.h / a.maxH,
 18283                    scaleY: e.v / a.maxV,
 18284                    blocksPerLine: e.blocksPerLine,
 18285                    blocksPerColumn: e.blocksPerColumn,
 18286                  });
 18287                }
 18288                this.numComponents = this.components.length;
 18289              }
 18290              _getLinearizedBlockData(e, t, a = !1) {
 18291                const r = this.width / e,
 18292                  n = this.height / t;
 18293                let i,
 18294                  s,
 18295                  o,
 18296                  c,
 18297                  l,
 18298                  h,
 18299                  u,
 18300                  d,
 18301                  f,
 18302                  g,
 18303                  p,
 18304                  m = 0;
 18305                const b = this.components.length,
 18306                  y = e * t * b,
 18307                  w = new Uint8ClampedArray(y),
 18308                  S = new Uint32Array(e),
 18309                  x = 4294967288;
 18310                let C;
 18311                for (u = 0; u < b; u++) {
 18312                  i = this.components[u];
 18313                  s = i.scaleX * r;
 18314                  o = i.scaleY * n;
 18315                  m = u;
 18316                  p = i.output;
 18317                  c = (i.blocksPerLine + 1) << 3;
 18318                  if (s !== C) {
 18319                    for (l = 0; l < e; l++) {
 18320                      d = 0 | (l * s);
 18321                      S[l] = ((d & x) << 3) | (7 & d);
 18322                    }
 18323                    C = s;
 18324                  }
 18325                  for (h = 0; h < t; h++) {
 18326                    d = 0 | (h * o);
 18327                    g = (c * (d & x)) | ((7 & d) << 3);
 18328                    for (l = 0; l < e; l++) {
 18329                      w[m] = p[g + S[l]];
 18330                      m += b;
 18331                    }
 18332                  }
 18333                }
 18334                let k = this._decodeTransform;
 18335                a ||
 18336                  4 !== b ||
 18337                  k ||
 18338                  (k = new Int32Array([
 18339                    -256, 255, -256, 255, -256, 255, -256, 255,
 18340                  ]));
 18341                if (k)
 18342                  for (u = 0; u < y; )
 18343                    for (d = 0, f = 0; d < b; d++, u++, f += 2)
 18344                      w[u] = ((w[u] * k[f]) >> 8) + k[f + 1];
 18345                return w;
 18346              }
 18347              get _isColorConversionNeeded() {
 18348                return this.adobe
 18349                  ? !!this.adobe.transformCode
 18350                  : 3 === this.numComponents
 18351                    ? 0 !== this._colorTransform &&
 18352                      (82 !== this.components[0].index ||
 18353                        71 !== this.components[1].index ||
 18354                        66 !== this.components[2].index)
 18355                    : 1 === this._colorTransform;
 18356              }
 18357              _convertYccToRgb(e) {
 18358                let t, a, r;
 18359                for (let n = 0, i = e.length; n < i; n += 3) {
 18360                  t = e[n];
 18361                  a = e[n + 1];
 18362                  r = e[n + 2];
 18363                  e[n] = t - 179.456 + 1.402 * r;
 18364                  e[n + 1] = t + 135.459 - 0.344 * a - 0.714 * r;
 18365                  e[n + 2] = t - 226.816 + 1.772 * a;
 18366                }
 18367                return e;
 18368              }
 18369              _convertYccToRgba(e, t) {
 18370                for (let a = 0, r = 0, n = e.length; a < n; a += 3, r += 4) {
 18371                  const n = e[a],
 18372                    i = e[a + 1],
 18373                    s = e[a + 2];
 18374                  t[r] = n - 179.456 + 1.402 * s;
 18375                  t[r + 1] = n + 135.459 - 0.344 * i - 0.714 * s;
 18376                  t[r + 2] = n - 226.816 + 1.772 * i;
 18377                  t[r + 3] = 255;
 18378                }
 18379                return t;
 18380              }
 18381              _convertYcckToRgb(e) {
 18382                let t,
 18383                  a,
 18384                  r,
 18385                  n,
 18386                  i = 0;
 18387                for (let s = 0, o = e.length; s < o; s += 4) {
 18388                  t = e[s];
 18389                  a = e[s + 1];
 18390                  r = e[s + 2];
 18391                  n = e[s + 3];
 18392                  e[i++] =
 18393                    a *
 18394                      (-660635669420364e-19 * a +
 18395                        0.000437130475926232 * r -
 18396                        54080610064599e-18 * t +
 18397                        0.00048449797120281 * n -
 18398                        0.154362151871126) -
 18399                    122.67195406894 +
 18400                    r *
 18401                      (-0.000957964378445773 * r +
 18402                        0.000817076911346625 * t -
 18403                        0.00477271405408747 * n +
 18404                        1.53380253221734) +
 18405                    t *
 18406                      (0.000961250184130688 * t -
 18407                        0.00266257332283933 * n +
 18408                        0.48357088451265) +
 18409                    n * (-0.000336197177618394 * n + 0.484791561490776);
 18410                  e[i++] =
 18411                    107.268039397724 +
 18412                    a *
 18413                      (219927104525741e-19 * a -
 18414                        0.000640992018297945 * r +
 18415                        0.000659397001245577 * t +
 18416                        0.000426105652938837 * n -
 18417                        0.176491792462875) +
 18418                    r *
 18419                      (-0.000778269941513683 * r +
 18420                        0.00130872261408275 * t +
 18421                        0.000770482631801132 * n -
 18422                        0.151051492775562) +
 18423                    t *
 18424                      (0.00126935368114843 * t -
 18425                        0.00265090189010898 * n +
 18426                        0.25802910206845) +
 18427                    n * (-0.000318913117588328 * n - 0.213742400323665);
 18428                  e[i++] =
 18429                    a *
 18430                      (-0.000570115196973677 * a -
 18431                        263409051004589e-19 * r +
 18432                        0.0020741088115012 * t -
 18433                        0.00288260236853442 * n +
 18434                        0.814272968359295) -
 18435                    20.810012546947 +
 18436                    r *
 18437                      (-153496057440975e-19 * r -
 18438                        0.000132689043961446 * t +
 18439                        0.000560833691242812 * n -
 18440                        0.195152027534049) +
 18441                    t *
 18442                      (0.00174418132927582 * t -
 18443                        0.00255243321439347 * n +
 18444                        0.116935020465145) +
 18445                    n * (-0.000343531996510555 * n + 0.24165260232407);
 18446                }
 18447                return e.subarray(0, i);
 18448              }
 18449              _convertYcckToRgba(e) {
 18450                for (let t = 0, a = e.length; t < a; t += 4) {
 18451                  const a = e[t],
 18452                    r = e[t + 1],
 18453                    n = e[t + 2],
 18454                    i = e[t + 3];
 18455                  e[t] =
 18456                    r *
 18457                      (-660635669420364e-19 * r +
 18458                        0.000437130475926232 * n -
 18459                        54080610064599e-18 * a +
 18460                        0.00048449797120281 * i -
 18461                        0.154362151871126) -
 18462                    122.67195406894 +
 18463                    n *
 18464                      (-0.000957964378445773 * n +
 18465                        0.000817076911346625 * a -
 18466                        0.00477271405408747 * i +
 18467                        1.53380253221734) +
 18468                    a *
 18469                      (0.000961250184130688 * a -
 18470                        0.00266257332283933 * i +
 18471                        0.48357088451265) +
 18472                    i * (-0.000336197177618394 * i + 0.484791561490776);
 18473                  e[t + 1] =
 18474                    107.268039397724 +
 18475                    r *
 18476                      (219927104525741e-19 * r -
 18477                        0.000640992018297945 * n +
 18478                        0.000659397001245577 * a +
 18479                        0.000426105652938837 * i -
 18480                        0.176491792462875) +
 18481                    n *
 18482                      (-0.000778269941513683 * n +
 18483                        0.00130872261408275 * a +
 18484                        0.000770482631801132 * i -
 18485                        0.151051492775562) +
 18486                    a *
 18487                      (0.00126935368114843 * a -
 18488                        0.00265090189010898 * i +
 18489                        0.25802910206845) +
 18490                    i * (-0.000318913117588328 * i - 0.213742400323665);
 18491                  e[t + 2] =
 18492                    r *
 18493                      (-0.000570115196973677 * r -
 18494                        263409051004589e-19 * n +
 18495                        0.0020741088115012 * a -
 18496                        0.00288260236853442 * i +
 18497                        0.814272968359295) -
 18498                    20.810012546947 +
 18499                    n *
 18500                      (-153496057440975e-19 * n -
 18501                        0.000132689043961446 * a +
 18502                        0.000560833691242812 * i -
 18503                        0.195152027534049) +
 18504                    a *
 18505                      (0.00174418132927582 * a -
 18506                        0.00255243321439347 * i +
 18507                        0.116935020465145) +
 18508                    i * (-0.000343531996510555 * i + 0.24165260232407);
 18509                  e[t + 3] = 255;
 18510                }
 18511                return e;
 18512              }
 18513              _convertYcckToCmyk(e) {
 18514                let t, a, r;
 18515                for (let n = 0, i = e.length; n < i; n += 4) {
 18516                  t = e[n];
 18517                  a = e[n + 1];
 18518                  r = e[n + 2];
 18519                  e[n] = 434.456 - t - 1.402 * r;
 18520                  e[n + 1] = 119.541 - t + 0.344 * a + 0.714 * r;
 18521                  e[n + 2] = 481.816 - t - 1.772 * a;
 18522                }
 18523                return e;
 18524              }
 18525              _convertCmykToRgb(e) {
 18526                let t,
 18527                  a,
 18528                  r,
 18529                  n,
 18530                  i = 0;
 18531                for (let s = 0, o = e.length; s < o; s += 4) {
 18532                  t = e[s];
 18533                  a = e[s + 1];
 18534                  r = e[s + 2];
 18535                  n = e[s + 3];
 18536                  e[i++] =
 18537                    255 +
 18538                    t *
 18539                      (-6747147073602441e-20 * t +
 18540                        0.0008379262121013727 * a +
 18541                        0.0002894718188643294 * r +
 18542                        0.003264231057537806 * n -
 18543                        1.1185611867203937) +
 18544                    a *
 18545                      (26374107616089405e-21 * a -
 18546                        8626949158638572e-20 * r -
 18547                        0.0002748769067499491 * n -
 18548                        0.02155688794978967) +
 18549                    r *
 18550                      (-3878099212869363e-20 * r -
 18551                        0.0003267808279485286 * n +
 18552                        0.0686742238595345) -
 18553                    n * (0.0003361971776183937 * n + 0.7430659151342254);
 18554                  e[i++] =
 18555                    255 +
 18556                    t *
 18557                      (0.00013596372813588848 * t +
 18558                        0.000924537132573585 * a +
 18559                        0.00010567359618683593 * r +
 18560                        0.0004791864687436512 * n -
 18561                        0.3109689587515875) +
 18562                    a *
 18563                      (-0.00023545346108370344 * a +
 18564                        0.0002702845253534714 * r +
 18565                        0.0020200308977307156 * n -
 18566                        0.7488052167015494) +
 18567                    r *
 18568                      (6834815998235662e-20 * r +
 18569                        0.00015168452363460973 * n -
 18570                        0.09751927774728933) -
 18571                    n * (0.0003189131175883281 * n + 0.7364883807733168);
 18572                  e[i++] =
 18573                    255 +
 18574                    t *
 18575                      (13598650411385307e-21 * t +
 18576                        0.00012423956175490851 * a +
 18577                        0.0004751985097583589 * r -
 18578                        36729317476630422e-22 * n -
 18579                        0.05562186980264034) +
 18580                    a *
 18581                      (0.00016141380598724676 * a +
 18582                        0.0009692239130725186 * r +
 18583                        0.0007782692450036253 * n -
 18584                        0.44015232367526463) +
 18585                    r *
 18586                      (5.068882914068769e-7 * r +
 18587                        0.0017778369011375071 * n -
 18588                        0.7591454649749609) -
 18589                    n * (0.0003435319965105553 * n + 0.7063770186160144);
 18590                }
 18591                return e.subarray(0, i);
 18592              }
 18593              _convertCmykToRgba(e) {
 18594                for (let t = 0, a = e.length; t < a; t += 4) {
 18595                  const a = e[t],
 18596                    r = e[t + 1],
 18597                    n = e[t + 2],
 18598                    i = e[t + 3];
 18599                  e[t] =
 18600                    255 +
 18601                    a *
 18602                      (-6747147073602441e-20 * a +
 18603                        0.0008379262121013727 * r +
 18604                        0.0002894718188643294 * n +
 18605                        0.003264231057537806 * i -
 18606                        1.1185611867203937) +
 18607                    r *
 18608                      (26374107616089405e-21 * r -
 18609                        8626949158638572e-20 * n -
 18610                        0.0002748769067499491 * i -
 18611                        0.02155688794978967) +
 18612                    n *
 18613                      (-3878099212869363e-20 * n -
 18614                        0.0003267808279485286 * i +
 18615                        0.0686742238595345) -
 18616                    i * (0.0003361971776183937 * i + 0.7430659151342254);
 18617                  e[t + 1] =
 18618                    255 +
 18619                    a *
 18620                      (0.00013596372813588848 * a +
 18621                        0.000924537132573585 * r +
 18622                        0.00010567359618683593 * n +
 18623                        0.0004791864687436512 * i -
 18624                        0.3109689587515875) +
 18625                    r *
 18626                      (-0.00023545346108370344 * r +
 18627                        0.0002702845253534714 * n +
 18628                        0.0020200308977307156 * i -
 18629                        0.7488052167015494) +
 18630                    n *
 18631                      (6834815998235662e-20 * n +
 18632                        0.00015168452363460973 * i -
 18633                        0.09751927774728933) -
 18634                    i * (0.0003189131175883281 * i + 0.7364883807733168);
 18635                  e[t + 2] =
 18636                    255 +
 18637                    a *
 18638                      (13598650411385307e-21 * a +
 18639                        0.00012423956175490851 * r +
 18640                        0.0004751985097583589 * n -
 18641                        36729317476630422e-22 * i -
 18642                        0.05562186980264034) +
 18643                    r *
 18644                      (0.00016141380598724676 * r +
 18645                        0.0009692239130725186 * n +
 18646                        0.0007782692450036253 * i -
 18647                        0.44015232367526463) +
 18648                    n *
 18649                      (5.068882914068769e-7 * n +
 18650                        0.0017778369011375071 * i -
 18651                        0.7591454649749609) -
 18652                    i * (0.0003435319965105553 * i + 0.7063770186160144);
 18653                  e[t + 3] = 255;
 18654                }
 18655                return e;
 18656              }
 18657              getData({
 18658                width: e,
 18659                height: t,
 18660                forceRGBA: a = !1,
 18661                forceRGB: r = !1,
 18662                isSourcePDF: i = !1,
 18663              }) {
 18664                if (this.numComponents > 4)
 18665                  throw new JpegError("Unsupported color mode");
 18666                const s = this._getLinearizedBlockData(e, t, i);
 18667                if (1 === this.numComponents && (a || r)) {
 18668                  const e = s.length * (a ? 4 : 3),
 18669                    t = new Uint8ClampedArray(e);
 18670                  let r = 0;
 18671                  if (a) (0, n.grayToRGBA)(s, new Uint32Array(t.buffer));
 18672                  else
 18673                    for (const e of s) {
 18674                      t[r++] = e;
 18675                      t[r++] = e;
 18676                      t[r++] = e;
 18677                    }
 18678                  return t;
 18679                }
 18680                if (3 === this.numComponents && this._isColorConversionNeeded) {
 18681                  if (a) {
 18682                    const e = new Uint8ClampedArray((s.length / 3) * 4);
 18683                    return this._convertYccToRgba(s, e);
 18684                  }
 18685                  return this._convertYccToRgb(s);
 18686                }
 18687                if (4 === this.numComponents) {
 18688                  if (this._isColorConversionNeeded)
 18689                    return a
 18690                      ? this._convertYcckToRgba(s)
 18691                      : r
 18692                        ? this._convertYcckToRgb(s)
 18693                        : this._convertYcckToCmyk(s);
 18694                  if (a) return this._convertCmykToRgba(s);
 18695                  if (r) return this._convertCmykToRgb(s);
 18696                }
 18697                return s;
 18698              }
 18699            };
 18700          },
 18701          (e, t, a) => {
 18702            Object.defineProperty(t, "__esModule", { value: !0 });
 18703            t.convertBlackAndWhiteToRGBA = convertBlackAndWhiteToRGBA;
 18704            t.convertToRGBA = function convertToRGBA(e) {
 18705              switch (e.kind) {
 18706                case r.ImageKind.GRAYSCALE_1BPP:
 18707                  return convertBlackAndWhiteToRGBA(e);
 18708                case r.ImageKind.RGB_24BPP:
 18709                  return (function convertRGBToRGBA({
 18710                    src: e,
 18711                    srcPos: t = 0,
 18712                    dest: a,
 18713                    destPos: n = 0,
 18714                    width: i,
 18715                    height: s,
 18716                  }) {
 18717                    let o = 0;
 18718                    const c = e.length >> 2,
 18719                      l = new Uint32Array(e.buffer, t, c);
 18720                    if (r.FeatureTest.isLittleEndian) {
 18721                      for (; o < c - 2; o += 3, n += 4) {
 18722                        const e = l[o],
 18723                          t = l[o + 1],
 18724                          r = l[o + 2];
 18725                        a[n] = 4278190080 | e;
 18726                        a[n + 1] = (e >>> 24) | (t << 8) | 4278190080;
 18727                        a[n + 2] = (t >>> 16) | (r << 16) | 4278190080;
 18728                        a[n + 3] = (r >>> 8) | 4278190080;
 18729                      }
 18730                      for (let t = 4 * o, r = e.length; t < r; t += 3)
 18731                        a[n++] =
 18732                          e[t] | (e[t + 1] << 8) | (e[t + 2] << 16) | 4278190080;
 18733                    } else {
 18734                      for (; o < c - 2; o += 3, n += 4) {
 18735                        const e = l[o],
 18736                          t = l[o + 1],
 18737                          r = l[o + 2];
 18738                        a[n] = 255 | e;
 18739                        a[n + 1] = (e << 24) | (t >>> 8) | 255;
 18740                        a[n + 2] = (t << 16) | (r >>> 16) | 255;
 18741                        a[n + 3] = (r << 8) | 255;
 18742                      }
 18743                      for (let t = 4 * o, r = e.length; t < r; t += 3)
 18744                        a[n++] =
 18745                          (e[t] << 24) | (e[t + 1] << 16) | (e[t + 2] << 8) | 255;
 18746                    }
 18747                    return { srcPos: t, destPos: n };
 18748                  })(e);
 18749              }
 18750              return null;
 18751            };
 18752            t.grayToRGBA = function grayToRGBA(e, t) {
 18753              if (r.FeatureTest.isLittleEndian)
 18754                for (let a = 0, r = e.length; a < r; a++)
 18755                  t[a] = (65793 * e[a]) | 4278190080;
 18756              else
 18757                for (let a = 0, r = e.length; a < r; a++)
 18758                  t[a] = (16843008 * e[a]) | 255;
 18759            };
 18760            var r = a(2);
 18761            function convertBlackAndWhiteToRGBA({
 18762              src: e,
 18763              srcPos: t = 0,
 18764              dest: a,
 18765              width: n,
 18766              height: i,
 18767              nonBlackColor: s = 4294967295,
 18768              inverseDecode: o = !1,
 18769            }) {
 18770              const c = r.FeatureTest.isLittleEndian ? 4278190080 : 255,
 18771                [l, h] = o ? [s, c] : [c, s],
 18772                u = n >> 3,
 18773                d = 7 & n,
 18774                f = e.length;
 18775              a = new Uint32Array(a.buffer);
 18776              let g = 0;
 18777              for (let r = 0; r < i; r++) {
 18778                for (const r = t + u; t < r; t++) {
 18779                  const r = t < f ? e[t] : 255;
 18780                  a[g++] = 128 & r ? h : l;
 18781                  a[g++] = 64 & r ? h : l;
 18782                  a[g++] = 32 & r ? h : l;
 18783                  a[g++] = 16 & r ? h : l;
 18784                  a[g++] = 8 & r ? h : l;
 18785                  a[g++] = 4 & r ? h : l;
 18786                  a[g++] = 2 & r ? h : l;
 18787                  a[g++] = 1 & r ? h : l;
 18788                }
 18789                if (0 === d) continue;
 18790                const r = t < f ? e[t++] : 255;
 18791                for (let e = 0; e < d; e++) a[g++] = r & (1 << (7 - e)) ? h : l;
 18792              }
 18793              return { srcPos: t, destPos: g };
 18794            }
 18795          },
 18796          (e, t, a) => {
 18797            Object.defineProperty(t, "__esModule", { value: !0 });
 18798            t.JpxStream = void 0;
 18799            var r = a(18),
 18800              n = a(30),
 18801              i = a(2);
 18802            class JpxStream extends r.DecodeStream {
 18803              constructor(e, t, a) {
 18804                super(t);
 18805                this.stream = e;
 18806                this.dict = e.dict;
 18807                this.maybeLength = t;
 18808                this.params = a;
 18809              }
 18810              get bytes() {
 18811                return (0, i.shadow)(
 18812                  this,
 18813                  "bytes",
 18814                  this.stream.getBytes(this.maybeLength),
 18815                );
 18816              }
 18817              ensureBuffer(e) {}
 18818              readBlock() {
 18819                if (this.eof) return;
 18820                const e = new n.JpxImage();
 18821                e.parse(this.bytes);
 18822                const t = e.width,
 18823                  a = e.height,
 18824                  r = e.componentsCount,
 18825                  i = e.tiles.length;
 18826                if (1 === i) this.buffer = e.tiles[0].items;
 18827                else {
 18828                  const n = new Uint8ClampedArray(t * a * r);
 18829                  for (let a = 0; a < i; a++) {
 18830                    const i = e.tiles[a],
 18831                      s = i.width,
 18832                      o = i.height,
 18833                      c = i.left,
 18834                      l = i.top,
 18835                      h = i.items;
 18836                    let u = 0,
 18837                      d = (t * l + c) * r;
 18838                    const f = t * r,
 18839                      g = s * r;
 18840                    for (let e = 0; e < o; e++) {
 18841                      const e = h.subarray(u, u + g);
 18842                      n.set(e, d);
 18843                      u += g;
 18844                      d += f;
 18845                    }
 18846                  }
 18847                  this.buffer = n;
 18848                }
 18849                this.bufferLength = this.buffer.length;
 18850                this.eof = !0;
 18851              }
 18852            }
 18853            t.JpxStream = JpxStream;
 18854          },
 18855          (e, t, a) => {
 18856            Object.defineProperty(t, "__esModule", { value: !0 });
 18857            t.JpxImage = void 0;
 18858            var r = a(2),
 18859              n = a(3),
 18860              i = a(25);
 18861            class JpxError extends r.BaseException {
 18862              constructor(e) {
 18863                super(`JPX error: ${e}`, "JpxError");
 18864              }
 18865            }
 18866            const s = { LL: 0, LH: 1, HL: 1, HH: 2 };
 18867            t.JpxImage = class JpxImage {
 18868              constructor() {
 18869                this.failOnCorruptedImage = !1;
 18870              }
 18871              parse(e) {
 18872                if (65359 === (0, n.readUint16)(e, 0)) {
 18873                  this.parseCodestream(e, 0, e.length);
 18874                  return;
 18875                }
 18876                const t = e.length;
 18877                let a = 0;
 18878                for (; a < t; ) {
 18879                  let i = 8,
 18880                    s = (0, n.readUint32)(e, a);
 18881                  const o = (0, n.readUint32)(e, a + 4);
 18882                  a += i;
 18883                  if (1 === s) {
 18884                    s =
 18885                      4294967296 * (0, n.readUint32)(e, a) +
 18886                      (0, n.readUint32)(e, a + 4);
 18887                    a += 8;
 18888                    i += 8;
 18889                  }
 18890                  0 === s && (s = t - a + i);
 18891                  if (s < i) throw new JpxError("Invalid box field size");
 18892                  const c = s - i;
 18893                  let l = !0;
 18894                  switch (o) {
 18895                    case 1785737832:
 18896                      l = !1;
 18897                      break;
 18898                    case 1668246642:
 18899                      const t = e[a];
 18900                      if (1 === t) {
 18901                        const t = (0, n.readUint32)(e, a + 3);
 18902                        switch (t) {
 18903                          case 16:
 18904                          case 17:
 18905                          case 18:
 18906                            break;
 18907                          default:
 18908                            (0, r.warn)("Unknown colorspace " + t);
 18909                        }
 18910                      } else 2 === t && (0, r.info)("ICC profile not supported");
 18911                      break;
 18912                    case 1785737827:
 18913                      this.parseCodestream(e, a, a + c);
 18914                      break;
 18915                    case 1783636e3:
 18916                      218793738 !== (0, n.readUint32)(e, a) &&
 18917                        (0, r.warn)("Invalid JP2 signature");
 18918                      break;
 18919                    case 1783634458:
 18920                    case 1718909296:
 18921                    case 1920099697:
 18922                    case 1919251232:
 18923                    case 1768449138:
 18924                      break;
 18925                    default:
 18926                      const i = String.fromCharCode(
 18927                        (o >> 24) & 255,
 18928                        (o >> 16) & 255,
 18929                        (o >> 8) & 255,
 18930                        255 & o,
 18931                      );
 18932                      (0, r.warn)(`Unsupported header type ${o} (${i}).`);
 18933                  }
 18934                  l && (a += c);
 18935                }
 18936              }
 18937              parseImageProperties(e) {
 18938                let t = e.getByte();
 18939                for (; t >= 0; ) {
 18940                  const a = t;
 18941                  t = e.getByte();
 18942                  if (65361 === ((a << 8) | t)) {
 18943                    e.skip(4);
 18944                    const t = e.getInt32() >>> 0,
 18945                      a = e.getInt32() >>> 0,
 18946                      r = e.getInt32() >>> 0,
 18947                      n = e.getInt32() >>> 0;
 18948                    e.skip(16);
 18949                    const i = e.getUint16();
 18950                    this.width = t - r;
 18951                    this.height = a - n;
 18952                    this.componentsCount = i;
 18953                    this.bitsPerComponent = 8;
 18954                    return;
 18955                  }
 18956                }
 18957                throw new JpxError("No size marker found in JPX stream");
 18958              }
 18959              parseCodestream(e, t, a) {
 18960                const i = {};
 18961                let s = !1;
 18962                try {
 18963                  let o = t;
 18964                  for (; o + 1 < a; ) {
 18965                    const t = (0, n.readUint16)(e, o);
 18966                    o += 2;
 18967                    let a,
 18968                      c,
 18969                      l,
 18970                      h,
 18971                      u,
 18972                      d,
 18973                      f = 0;
 18974                    switch (t) {
 18975                      case 65359:
 18976                        i.mainHeader = !0;
 18977                        break;
 18978                      case 65497:
 18979                        break;
 18980                      case 65361:
 18981                        f = (0, n.readUint16)(e, o);
 18982                        const g = {};
 18983                        g.Xsiz = (0, n.readUint32)(e, o + 4);
 18984                        g.Ysiz = (0, n.readUint32)(e, o + 8);
 18985                        g.XOsiz = (0, n.readUint32)(e, o + 12);
 18986                        g.YOsiz = (0, n.readUint32)(e, o + 16);
 18987                        g.XTsiz = (0, n.readUint32)(e, o + 20);
 18988                        g.YTsiz = (0, n.readUint32)(e, o + 24);
 18989                        g.XTOsiz = (0, n.readUint32)(e, o + 28);
 18990                        g.YTOsiz = (0, n.readUint32)(e, o + 32);
 18991                        const p = (0, n.readUint16)(e, o + 36);
 18992                        g.Csiz = p;
 18993                        const m = [];
 18994                        a = o + 38;
 18995                        for (let t = 0; t < p; t++) {
 18996                          const t = {
 18997                            precision: 1 + (127 & e[a]),
 18998                            isSigned: !!(128 & e[a]),
 18999                            XRsiz: e[a + 1],
 19000                            YRsiz: e[a + 2],
 19001                          };
 19002                          a += 3;
 19003                          calculateComponentDimensions(t, g);
 19004                          m.push(t);
 19005                        }
 19006                        i.SIZ = g;
 19007                        i.components = m;
 19008                        calculateTileGrids(i, m);
 19009                        i.QCC = [];
 19010                        i.COC = [];
 19011                        break;
 19012                      case 65372:
 19013                        f = (0, n.readUint16)(e, o);
 19014                        const b = {};
 19015                        a = o + 2;
 19016                        c = e[a++];
 19017                        switch (31 & c) {
 19018                          case 0:
 19019                            h = 8;
 19020                            u = !0;
 19021                            break;
 19022                          case 1:
 19023                            h = 16;
 19024                            u = !1;
 19025                            break;
 19026                          case 2:
 19027                            h = 16;
 19028                            u = !0;
 19029                            break;
 19030                          default:
 19031                            throw new Error("Invalid SQcd value " + c);
 19032                        }
 19033                        b.noQuantization = 8 === h;
 19034                        b.scalarExpounded = u;
 19035                        b.guardBits = c >> 5;
 19036                        l = [];
 19037                        for (; a < f + o; ) {
 19038                          const t = {};
 19039                          if (8 === h) {
 19040                            t.epsilon = e[a++] >> 3;
 19041                            t.mu = 0;
 19042                          } else {
 19043                            t.epsilon = e[a] >> 3;
 19044                            t.mu = ((7 & e[a]) << 8) | e[a + 1];
 19045                            a += 2;
 19046                          }
 19047                          l.push(t);
 19048                        }
 19049                        b.SPqcds = l;
 19050                        if (i.mainHeader) i.QCD = b;
 19051                        else {
 19052                          i.currentTile.QCD = b;
 19053                          i.currentTile.QCC = [];
 19054                        }
 19055                        break;
 19056                      case 65373:
 19057                        f = (0, n.readUint16)(e, o);
 19058                        const y = {};
 19059                        a = o + 2;
 19060                        let w;
 19061                        if (i.SIZ.Csiz < 257) w = e[a++];
 19062                        else {
 19063                          w = (0, n.readUint16)(e, a);
 19064                          a += 2;
 19065                        }
 19066                        c = e[a++];
 19067                        switch (31 & c) {
 19068                          case 0:
 19069                            h = 8;
 19070                            u = !0;
 19071                            break;
 19072                          case 1:
 19073                            h = 16;
 19074                            u = !1;
 19075                            break;
 19076                          case 2:
 19077                            h = 16;
 19078                            u = !0;
 19079                            break;
 19080                          default:
 19081                            throw new Error("Invalid SQcd value " + c);
 19082                        }
 19083                        y.noQuantization = 8 === h;
 19084                        y.scalarExpounded = u;
 19085                        y.guardBits = c >> 5;
 19086                        l = [];
 19087                        for (; a < f + o; ) {
 19088                          const t = {};
 19089                          if (8 === h) {
 19090                            t.epsilon = e[a++] >> 3;
 19091                            t.mu = 0;
 19092                          } else {
 19093                            t.epsilon = e[a] >> 3;
 19094                            t.mu = ((7 & e[a]) << 8) | e[a + 1];
 19095                            a += 2;
 19096                          }
 19097                          l.push(t);
 19098                        }
 19099                        y.SPqcds = l;
 19100                        i.mainHeader
 19101                          ? (i.QCC[w] = y)
 19102                          : (i.currentTile.QCC[w] = y);
 19103                        break;
 19104                      case 65362:
 19105                        f = (0, n.readUint16)(e, o);
 19106                        const S = {};
 19107                        a = o + 2;
 19108                        const x = e[a++];
 19109                        S.entropyCoderWithCustomPrecincts = !!(1 & x);
 19110                        S.sopMarkerUsed = !!(2 & x);
 19111                        S.ephMarkerUsed = !!(4 & x);
 19112                        S.progressionOrder = e[a++];
 19113                        S.layersCount = (0, n.readUint16)(e, a);
 19114                        a += 2;
 19115                        S.multipleComponentTransform = e[a++];
 19116                        S.decompositionLevelsCount = e[a++];
 19117                        S.xcb = 2 + (15 & e[a++]);
 19118                        S.ycb = 2 + (15 & e[a++]);
 19119                        const C = e[a++];
 19120                        S.selectiveArithmeticCodingBypass = !!(1 & C);
 19121                        S.resetContextProbabilities = !!(2 & C);
 19122                        S.terminationOnEachCodingPass = !!(4 & C);
 19123                        S.verticallyStripe = !!(8 & C);
 19124                        S.predictableTermination = !!(16 & C);
 19125                        S.segmentationSymbolUsed = !!(32 & C);
 19126                        S.reversibleTransformation = e[a++];
 19127                        if (S.entropyCoderWithCustomPrecincts) {
 19128                          const t = [];
 19129                          for (; a < f + o; ) {
 19130                            const r = e[a++];
 19131                            t.push({ PPx: 15 & r, PPy: r >> 4 });
 19132                          }
 19133                          S.precinctsSizes = t;
 19134                        }
 19135                        const k = [];
 19136                        S.selectiveArithmeticCodingBypass &&
 19137                          k.push("selectiveArithmeticCodingBypass");
 19138                        S.terminationOnEachCodingPass &&
 19139                          k.push("terminationOnEachCodingPass");
 19140                        S.verticallyStripe && k.push("verticallyStripe");
 19141                        S.predictableTermination &&
 19142                          k.push("predictableTermination");
 19143                        if (k.length > 0) {
 19144                          s = !0;
 19145                          (0, r.warn)(
 19146                            `JPX: Unsupported COD options (${k.join(", ")}).`,
 19147                          );
 19148                        }
 19149                        if (i.mainHeader) i.COD = S;
 19150                        else {
 19151                          i.currentTile.COD = S;
 19152                          i.currentTile.COC = [];
 19153                        }
 19154                        break;
 19155                      case 65424:
 19156                        f = (0, n.readUint16)(e, o);
 19157                        d = {};
 19158                        d.index = (0, n.readUint16)(e, o + 2);
 19159                        d.length = (0, n.readUint32)(e, o + 4);
 19160                        d.dataEnd = d.length + o - 2;
 19161                        d.partIndex = e[o + 8];
 19162                        d.partsCount = e[o + 9];
 19163                        i.mainHeader = !1;
 19164                        if (0 === d.partIndex) {
 19165                          d.COD = i.COD;
 19166                          d.COC = i.COC.slice(0);
 19167                          d.QCD = i.QCD;
 19168                          d.QCC = i.QCC.slice(0);
 19169                        }
 19170                        i.currentTile = d;
 19171                        break;
 19172                      case 65427:
 19173                        d = i.currentTile;
 19174                        if (0 === d.partIndex) {
 19175                          initializeTile(i, d.index);
 19176                          buildPackets(i);
 19177                        }
 19178                        f = d.dataEnd - o;
 19179                        parseTilePackets(i, e, o, f);
 19180                        break;
 19181                      case 65363:
 19182                        (0, r.warn)(
 19183                          "JPX: Codestream code 0xFF53 (COC) is not implemented.",
 19184                        );
 19185                      case 65365:
 19186                      case 65367:
 19187                      case 65368:
 19188                      case 65380:
 19189                        f = (0, n.readUint16)(e, o);
 19190                        break;
 19191                      default:
 19192                        throw new Error(
 19193                          "Unknown codestream code: " + t.toString(16),
 19194                        );
 19195                    }
 19196                    o += f;
 19197                  }
 19198                } catch (e) {
 19199                  if (s || this.failOnCorruptedImage)
 19200                    throw new JpxError(e.message);
 19201                  (0, r.warn)(`JPX: Trying to recover from: "${e.message}".`);
 19202                }
 19203                this.tiles = (function transformComponents(e) {
 19204                  const t = e.SIZ,
 19205                    a = e.components,
 19206                    r = t.Csiz,
 19207                    n = [];
 19208                  for (let t = 0, i = e.tiles.length; t < i; t++) {
 19209                    const i = e.tiles[t],
 19210                      s = [];
 19211                    for (let t = 0; t < r; t++) s[t] = transformTile(e, i, t);
 19212                    const o = s[0],
 19213                      c = new Uint8ClampedArray(o.items.length * r),
 19214                      l = {
 19215                        left: o.left,
 19216                        top: o.top,
 19217                        width: o.width,
 19218                        height: o.height,
 19219                        items: c,
 19220                      };
 19221                    let h,
 19222                      u,
 19223                      d,
 19224                      f,
 19225                      g,
 19226                      p,
 19227                      m,
 19228                      b = 0;
 19229                    if (
 19230                      i.codingStyleDefaultParameters.multipleComponentTransform
 19231                    ) {
 19232                      const e = 4 === r,
 19233                        t = s[0].items,
 19234                        n = s[1].items,
 19235                        o = s[2].items,
 19236                        l = e ? s[3].items : null;
 19237                      h = a[0].precision - 8;
 19238                      u = 0.5 + (128 << h);
 19239                      const y = i.components[0],
 19240                        w = r - 3;
 19241                      f = t.length;
 19242                      if (y.codingStyleParameters.reversibleTransformation)
 19243                        for (d = 0; d < f; d++, b += w) {
 19244                          g = t[d] + u;
 19245                          p = n[d];
 19246                          m = o[d];
 19247                          const e = g - ((m + p) >> 2);
 19248                          c[b++] = (e + m) >> h;
 19249                          c[b++] = e >> h;
 19250                          c[b++] = (e + p) >> h;
 19251                        }
 19252                      else
 19253                        for (d = 0; d < f; d++, b += w) {
 19254                          g = t[d] + u;
 19255                          p = n[d];
 19256                          m = o[d];
 19257                          c[b++] = (g + 1.402 * m) >> h;
 19258                          c[b++] = (g - 0.34413 * p - 0.71414 * m) >> h;
 19259                          c[b++] = (g + 1.772 * p) >> h;
 19260                        }
 19261                      if (e)
 19262                        for (d = 0, b = 3; d < f; d++, b += 4)
 19263                          c[b] = (l[d] + u) >> h;
 19264                    } else
 19265                      for (let e = 0; e < r; e++) {
 19266                        const t = s[e].items;
 19267                        h = a[e].precision - 8;
 19268                        u = 0.5 + (128 << h);
 19269                        for (b = e, d = 0, f = t.length; d < f; d++) {
 19270                          c[b] = (t[d] + u) >> h;
 19271                          b += r;
 19272                        }
 19273                      }
 19274                    n.push(l);
 19275                  }
 19276                  return n;
 19277                })(i);
 19278                this.width = i.SIZ.Xsiz - i.SIZ.XOsiz;
 19279                this.height = i.SIZ.Ysiz - i.SIZ.YOsiz;
 19280                this.componentsCount = i.SIZ.Csiz;
 19281              }
 19282            };
 19283            function calculateComponentDimensions(e, t) {
 19284              e.x0 = Math.ceil(t.XOsiz / e.XRsiz);
 19285              e.x1 = Math.ceil(t.Xsiz / e.XRsiz);
 19286              e.y0 = Math.ceil(t.YOsiz / e.YRsiz);
 19287              e.y1 = Math.ceil(t.Ysiz / e.YRsiz);
 19288              e.width = e.x1 - e.x0;
 19289              e.height = e.y1 - e.y0;
 19290            }
 19291            function calculateTileGrids(e, t) {
 19292              const a = e.SIZ,
 19293                r = [];
 19294              let n;
 19295              const i = Math.ceil((a.Xsiz - a.XTOsiz) / a.XTsiz),
 19296                s = Math.ceil((a.Ysiz - a.YTOsiz) / a.YTsiz);
 19297              for (let e = 0; e < s; e++)
 19298                for (let t = 0; t < i; t++) {
 19299                  n = {};
 19300                  n.tx0 = Math.max(a.XTOsiz + t * a.XTsiz, a.XOsiz);
 19301                  n.ty0 = Math.max(a.YTOsiz + e * a.YTsiz, a.YOsiz);
 19302                  n.tx1 = Math.min(a.XTOsiz + (t + 1) * a.XTsiz, a.Xsiz);
 19303                  n.ty1 = Math.min(a.YTOsiz + (e + 1) * a.YTsiz, a.Ysiz);
 19304                  n.width = n.tx1 - n.tx0;
 19305                  n.height = n.ty1 - n.ty0;
 19306                  n.components = [];
 19307                  r.push(n);
 19308                }
 19309              e.tiles = r;
 19310              for (let e = 0, i = a.Csiz; e < i; e++) {
 19311                const a = t[e];
 19312                for (let t = 0, i = r.length; t < i; t++) {
 19313                  const i = {};
 19314                  n = r[t];
 19315                  i.tcx0 = Math.ceil(n.tx0 / a.XRsiz);
 19316                  i.tcy0 = Math.ceil(n.ty0 / a.YRsiz);
 19317                  i.tcx1 = Math.ceil(n.tx1 / a.XRsiz);
 19318                  i.tcy1 = Math.ceil(n.ty1 / a.YRsiz);
 19319                  i.width = i.tcx1 - i.tcx0;
 19320                  i.height = i.tcy1 - i.tcy0;
 19321                  n.components[e] = i;
 19322                }
 19323              }
 19324            }
 19325            function getBlocksDimensions(e, t, a) {
 19326              const r = t.codingStyleParameters,
 19327                n = {};
 19328              if (r.entropyCoderWithCustomPrecincts) {
 19329                n.PPx = r.precinctsSizes[a].PPx;
 19330                n.PPy = r.precinctsSizes[a].PPy;
 19331              } else {
 19332                n.PPx = 15;
 19333                n.PPy = 15;
 19334              }
 19335              n.xcb_ =
 19336                a > 0 ? Math.min(r.xcb, n.PPx - 1) : Math.min(r.xcb, n.PPx);
 19337              n.ycb_ =
 19338                a > 0 ? Math.min(r.ycb, n.PPy - 1) : Math.min(r.ycb, n.PPy);
 19339              return n;
 19340            }
 19341            function buildPrecincts(e, t, a) {
 19342              const r = 1 << a.PPx,
 19343                n = 1 << a.PPy,
 19344                i = 0 === t.resLevel,
 19345                s = 1 << (a.PPx + (i ? 0 : -1)),
 19346                o = 1 << (a.PPy + (i ? 0 : -1)),
 19347                c =
 19348                  t.trx1 > t.trx0
 19349                    ? Math.ceil(t.trx1 / r) - Math.floor(t.trx0 / r)
 19350                    : 0,
 19351                l =
 19352                  t.try1 > t.try0
 19353                    ? Math.ceil(t.try1 / n) - Math.floor(t.try0 / n)
 19354                    : 0,
 19355                h = c * l;
 19356              t.precinctParameters = {
 19357                precinctWidth: r,
 19358                precinctHeight: n,
 19359                numprecinctswide: c,
 19360                numprecinctshigh: l,
 19361                numprecincts: h,
 19362                precinctWidthInSubband: s,
 19363                precinctHeightInSubband: o,
 19364              };
 19365            }
 19366            function buildCodeblocks(e, t, a) {
 19367              const r = a.xcb_,
 19368                n = a.ycb_,
 19369                i = 1 << r,
 19370                s = 1 << n,
 19371                o = t.tbx0 >> r,
 19372                c = t.tby0 >> n,
 19373                l = (t.tbx1 + i - 1) >> r,
 19374                h = (t.tby1 + s - 1) >> n,
 19375                u = t.resolution.precinctParameters,
 19376                d = [],
 19377                f = [];
 19378              let g, p, m, b;
 19379              for (p = c; p < h; p++)
 19380                for (g = o; g < l; g++) {
 19381                  m = {
 19382                    cbx: g,
 19383                    cby: p,
 19384                    tbx0: i * g,
 19385                    tby0: s * p,
 19386                    tbx1: i * (g + 1),
 19387                    tby1: s * (p + 1),
 19388                  };
 19389                  m.tbx0_ = Math.max(t.tbx0, m.tbx0);
 19390                  m.tby0_ = Math.max(t.tby0, m.tby0);
 19391                  m.tbx1_ = Math.min(t.tbx1, m.tbx1);
 19392                  m.tby1_ = Math.min(t.tby1, m.tby1);
 19393                  b =
 19394                    Math.floor((m.tbx0_ - t.tbx0) / u.precinctWidthInSubband) +
 19395                    Math.floor((m.tby0_ - t.tby0) / u.precinctHeightInSubband) *
 19396                      u.numprecinctswide;
 19397                  m.precinctNumber = b;
 19398                  m.subbandType = t.type;
 19399                  m.Lblock = 3;
 19400                  if (m.tbx1_ <= m.tbx0_ || m.tby1_ <= m.tby0_) continue;
 19401                  d.push(m);
 19402                  let e = f[b];
 19403                  if (void 0 !== e) {
 19404                    g < e.cbxMin
 19405                      ? (e.cbxMin = g)
 19406                      : g > e.cbxMax && (e.cbxMax = g);
 19407                    p < e.cbyMin
 19408                      ? (e.cbxMin = p)
 19409                      : p > e.cbyMax && (e.cbyMax = p);
 19410                  } else
 19411                    f[b] = e = { cbxMin: g, cbyMin: p, cbxMax: g, cbyMax: p };
 19412                  m.precinct = e;
 19413                }
 19414              t.codeblockParameters = {
 19415                codeblockWidth: r,
 19416                codeblockHeight: n,
 19417                numcodeblockwide: l - o + 1,
 19418                numcodeblockhigh: h - c + 1,
 19419              };
 19420              t.codeblocks = d;
 19421              t.precincts = f;
 19422            }
 19423            function createPacket(e, t, a) {
 19424              const r = [],
 19425                n = e.subbands;
 19426              for (let e = 0, a = n.length; e < a; e++) {
 19427                const a = n[e].codeblocks;
 19428                for (let e = 0, n = a.length; e < n; e++) {
 19429                  const n = a[e];
 19430                  n.precinctNumber === t && r.push(n);
 19431                }
 19432              }
 19433              return { layerNumber: a, codeblocks: r };
 19434            }
 19435            function LayerResolutionComponentPositionIterator(e) {
 19436              const t = e.SIZ,
 19437                a = e.currentTile.index,
 19438                r = e.tiles[a],
 19439                n = r.codingStyleDefaultParameters.layersCount,
 19440                i = t.Csiz;
 19441              let s = 0;
 19442              for (let e = 0; e < i; e++)
 19443                s = Math.max(
 19444                  s,
 19445                  r.components[e].codingStyleParameters.decompositionLevelsCount,
 19446                );
 19447              let o = 0,
 19448                c = 0,
 19449                l = 0,
 19450                h = 0;
 19451              this.nextPacket = function JpxImage_nextPacket() {
 19452                for (; o < n; o++) {
 19453                  for (; c <= s; c++) {
 19454                    for (; l < i; l++) {
 19455                      const e = r.components[l];
 19456                      if (c > e.codingStyleParameters.decompositionLevelsCount)
 19457                        continue;
 19458                      const t = e.resolutions[c],
 19459                        a = t.precinctParameters.numprecincts;
 19460                      for (; h < a; ) {
 19461                        const e = createPacket(t, h, o);
 19462                        h++;
 19463                        return e;
 19464                      }
 19465                      h = 0;
 19466                    }
 19467                    l = 0;
 19468                  }
 19469                  c = 0;
 19470                }
 19471                throw new JpxError("Out of packets");
 19472              };
 19473            }
 19474            function ResolutionLayerComponentPositionIterator(e) {
 19475              const t = e.SIZ,
 19476                a = e.currentTile.index,
 19477                r = e.tiles[a],
 19478                n = r.codingStyleDefaultParameters.layersCount,
 19479                i = t.Csiz;
 19480              let s = 0;
 19481              for (let e = 0; e < i; e++)
 19482                s = Math.max(
 19483                  s,
 19484                  r.components[e].codingStyleParameters.decompositionLevelsCount,
 19485                );
 19486              let o = 0,
 19487                c = 0,
 19488                l = 0,
 19489                h = 0;
 19490              this.nextPacket = function JpxImage_nextPacket() {
 19491                for (; o <= s; o++) {
 19492                  for (; c < n; c++) {
 19493                    for (; l < i; l++) {
 19494                      const e = r.components[l];
 19495                      if (o > e.codingStyleParameters.decompositionLevelsCount)
 19496                        continue;
 19497                      const t = e.resolutions[o],
 19498                        a = t.precinctParameters.numprecincts;
 19499                      for (; h < a; ) {
 19500                        const e = createPacket(t, h, c);
 19501                        h++;
 19502                        return e;
 19503                      }
 19504                      h = 0;
 19505                    }
 19506                    l = 0;
 19507                  }
 19508                  c = 0;
 19509                }
 19510                throw new JpxError("Out of packets");
 19511              };
 19512            }
 19513            function ResolutionPositionComponentLayerIterator(e) {
 19514              const t = e.SIZ,
 19515                a = e.currentTile.index,
 19516                r = e.tiles[a],
 19517                n = r.codingStyleDefaultParameters.layersCount,
 19518                i = t.Csiz;
 19519              let s,
 19520                o,
 19521                c,
 19522                l,
 19523                h = 0;
 19524              for (c = 0; c < i; c++) {
 19525                const e = r.components[c];
 19526                h = Math.max(h, e.codingStyleParameters.decompositionLevelsCount);
 19527              }
 19528              const u = new Int32Array(h + 1);
 19529              for (o = 0; o <= h; ++o) {
 19530                let e = 0;
 19531                for (c = 0; c < i; ++c) {
 19532                  const t = r.components[c].resolutions;
 19533                  o < t.length &&
 19534                    (e = Math.max(e, t[o].precinctParameters.numprecincts));
 19535                }
 19536                u[o] = e;
 19537              }
 19538              s = 0;
 19539              o = 0;
 19540              c = 0;
 19541              l = 0;
 19542              this.nextPacket = function JpxImage_nextPacket() {
 19543                for (; o <= h; o++) {
 19544                  for (; l < u[o]; l++) {
 19545                    for (; c < i; c++) {
 19546                      const e = r.components[c];
 19547                      if (o > e.codingStyleParameters.decompositionLevelsCount)
 19548                        continue;
 19549                      const t = e.resolutions[o],
 19550                        a = t.precinctParameters.numprecincts;
 19551                      if (!(l >= a)) {
 19552                        for (; s < n; ) {
 19553                          const e = createPacket(t, l, s);
 19554                          s++;
 19555                          return e;
 19556                        }
 19557                        s = 0;
 19558                      }
 19559                    }
 19560                    c = 0;
 19561                  }
 19562                  l = 0;
 19563                }
 19564                throw new JpxError("Out of packets");
 19565              };
 19566            }
 19567            function PositionComponentResolutionLayerIterator(e) {
 19568              const t = e.SIZ,
 19569                a = e.currentTile.index,
 19570                r = e.tiles[a],
 19571                n = r.codingStyleDefaultParameters.layersCount,
 19572                i = t.Csiz,
 19573                s = getPrecinctSizesInImageScale(r),
 19574                o = s;
 19575              let c = 0,
 19576                l = 0,
 19577                h = 0,
 19578                u = 0,
 19579                d = 0;
 19580              this.nextPacket = function JpxImage_nextPacket() {
 19581                for (; d < o.maxNumHigh; d++) {
 19582                  for (; u < o.maxNumWide; u++) {
 19583                    for (; h < i; h++) {
 19584                      const e = r.components[h],
 19585                        t = e.codingStyleParameters.decompositionLevelsCount;
 19586                      for (; l <= t; l++) {
 19587                        const t = e.resolutions[l],
 19588                          a = s.components[h].resolutions[l],
 19589                          r = getPrecinctIndexIfExist(u, d, a, o, t);
 19590                        if (null !== r) {
 19591                          for (; c < n; ) {
 19592                            const e = createPacket(t, r, c);
 19593                            c++;
 19594                            return e;
 19595                          }
 19596                          c = 0;
 19597                        }
 19598                      }
 19599                      l = 0;
 19600                    }
 19601                    h = 0;
 19602                  }
 19603                  u = 0;
 19604                }
 19605                throw new JpxError("Out of packets");
 19606              };
 19607            }
 19608            function ComponentPositionResolutionLayerIterator(e) {
 19609              const t = e.SIZ,
 19610                a = e.currentTile.index,
 19611                r = e.tiles[a],
 19612                n = r.codingStyleDefaultParameters.layersCount,
 19613                i = t.Csiz,
 19614                s = getPrecinctSizesInImageScale(r);
 19615              let o = 0,
 19616                c = 0,
 19617                l = 0,
 19618                h = 0,
 19619                u = 0;
 19620              this.nextPacket = function JpxImage_nextPacket() {
 19621                for (; l < i; ++l) {
 19622                  const e = r.components[l],
 19623                    t = s.components[l],
 19624                    a = e.codingStyleParameters.decompositionLevelsCount;
 19625                  for (; u < t.maxNumHigh; u++) {
 19626                    for (; h < t.maxNumWide; h++) {
 19627                      for (; c <= a; c++) {
 19628                        const a = e.resolutions[c],
 19629                          r = t.resolutions[c],
 19630                          i = getPrecinctIndexIfExist(h, u, r, t, a);
 19631                        if (null !== i) {
 19632                          for (; o < n; ) {
 19633                            const e = createPacket(a, i, o);
 19634                            o++;
 19635                            return e;
 19636                          }
 19637                          o = 0;
 19638                        }
 19639                      }
 19640                      c = 0;
 19641                    }
 19642                    h = 0;
 19643                  }
 19644                  u = 0;
 19645                }
 19646                throw new JpxError("Out of packets");
 19647              };
 19648            }
 19649            function getPrecinctIndexIfExist(e, t, a, r, n) {
 19650              const i = e * r.minWidth,
 19651                s = t * r.minHeight;
 19652              if (i % a.width != 0 || s % a.height != 0) return null;
 19653              const o = (s / a.width) * n.precinctParameters.numprecinctswide;
 19654              return i / a.height + o;
 19655            }
 19656            function getPrecinctSizesInImageScale(e) {
 19657              const t = e.components.length;
 19658              let a = Number.MAX_VALUE,
 19659                r = Number.MAX_VALUE,
 19660                n = 0,
 19661                i = 0;
 19662              const s = new Array(t);
 19663              for (let o = 0; o < t; o++) {
 19664                const t = e.components[o],
 19665                  c = t.codingStyleParameters.decompositionLevelsCount,
 19666                  l = new Array(c + 1);
 19667                let h = Number.MAX_VALUE,
 19668                  u = Number.MAX_VALUE,
 19669                  d = 0,
 19670                  f = 0,
 19671                  g = 1;
 19672                for (let e = c; e >= 0; --e) {
 19673                  const a = t.resolutions[e],
 19674                    r = g * a.precinctParameters.precinctWidth,
 19675                    n = g * a.precinctParameters.precinctHeight;
 19676                  h = Math.min(h, r);
 19677                  u = Math.min(u, n);
 19678                  d = Math.max(d, a.precinctParameters.numprecinctswide);
 19679                  f = Math.max(f, a.precinctParameters.numprecinctshigh);
 19680                  l[e] = { width: r, height: n };
 19681                  g <<= 1;
 19682                }
 19683                a = Math.min(a, h);
 19684                r = Math.min(r, u);
 19685                n = Math.max(n, d);
 19686                i = Math.max(i, f);
 19687                s[o] = {
 19688                  resolutions: l,
 19689                  minWidth: h,
 19690                  minHeight: u,
 19691                  maxNumWide: d,
 19692                  maxNumHigh: f,
 19693                };
 19694              }
 19695              return {
 19696                components: s,
 19697                minWidth: a,
 19698                minHeight: r,
 19699                maxNumWide: n,
 19700                maxNumHigh: i,
 19701              };
 19702            }
 19703            function buildPackets(e) {
 19704              const t = e.SIZ,
 19705                a = e.currentTile.index,
 19706                r = e.tiles[a],
 19707                n = t.Csiz;
 19708              for (let e = 0; e < n; e++) {
 19709                const t = r.components[e],
 19710                  a = t.codingStyleParameters.decompositionLevelsCount,
 19711                  n = [],
 19712                  i = [];
 19713                for (let e = 0; e <= a; e++) {
 19714                  const r = getBlocksDimensions(0, t, e),
 19715                    s = {},
 19716                    o = 1 << (a - e);
 19717                  s.trx0 = Math.ceil(t.tcx0 / o);
 19718                  s.try0 = Math.ceil(t.tcy0 / o);
 19719                  s.trx1 = Math.ceil(t.tcx1 / o);
 19720                  s.try1 = Math.ceil(t.tcy1 / o);
 19721                  s.resLevel = e;
 19722                  buildPrecincts(0, s, r);
 19723                  n.push(s);
 19724                  let c;
 19725                  if (0 === e) {
 19726                    c = {};
 19727                    c.type = "LL";
 19728                    c.tbx0 = Math.ceil(t.tcx0 / o);
 19729                    c.tby0 = Math.ceil(t.tcy0 / o);
 19730                    c.tbx1 = Math.ceil(t.tcx1 / o);
 19731                    c.tby1 = Math.ceil(t.tcy1 / o);
 19732                    c.resolution = s;
 19733                    buildCodeblocks(0, c, r);
 19734                    i.push(c);
 19735                    s.subbands = [c];
 19736                  } else {
 19737                    const n = 1 << (a - e + 1),
 19738                      o = [];
 19739                    c = {};
 19740                    c.type = "HL";
 19741                    c.tbx0 = Math.ceil(t.tcx0 / n - 0.5);
 19742                    c.tby0 = Math.ceil(t.tcy0 / n);
 19743                    c.tbx1 = Math.ceil(t.tcx1 / n - 0.5);
 19744                    c.tby1 = Math.ceil(t.tcy1 / n);
 19745                    c.resolution = s;
 19746                    buildCodeblocks(0, c, r);
 19747                    i.push(c);
 19748                    o.push(c);
 19749                    c = {};
 19750                    c.type = "LH";
 19751                    c.tbx0 = Math.ceil(t.tcx0 / n);
 19752                    c.tby0 = Math.ceil(t.tcy0 / n - 0.5);
 19753                    c.tbx1 = Math.ceil(t.tcx1 / n);
 19754                    c.tby1 = Math.ceil(t.tcy1 / n - 0.5);
 19755                    c.resolution = s;
 19756                    buildCodeblocks(0, c, r);
 19757                    i.push(c);
 19758                    o.push(c);
 19759                    c = {};
 19760                    c.type = "HH";
 19761                    c.tbx0 = Math.ceil(t.tcx0 / n - 0.5);
 19762                    c.tby0 = Math.ceil(t.tcy0 / n - 0.5);
 19763                    c.tbx1 = Math.ceil(t.tcx1 / n - 0.5);
 19764                    c.tby1 = Math.ceil(t.tcy1 / n - 0.5);
 19765                    c.resolution = s;
 19766                    buildCodeblocks(0, c, r);
 19767                    i.push(c);
 19768                    o.push(c);
 19769                    s.subbands = o;
 19770                  }
 19771                }
 19772                t.resolutions = n;
 19773                t.subbands = i;
 19774              }
 19775              const i = r.codingStyleDefaultParameters.progressionOrder;
 19776              switch (i) {
 19777                case 0:
 19778                  r.packetsIterator =
 19779                    new LayerResolutionComponentPositionIterator(e);
 19780                  break;
 19781                case 1:
 19782                  r.packetsIterator =
 19783                    new ResolutionLayerComponentPositionIterator(e);
 19784                  break;
 19785                case 2:
 19786                  r.packetsIterator =
 19787                    new ResolutionPositionComponentLayerIterator(e);
 19788                  break;
 19789                case 3:
 19790                  r.packetsIterator =
 19791                    new PositionComponentResolutionLayerIterator(e);
 19792                  break;
 19793                case 4:
 19794                  r.packetsIterator =
 19795                    new ComponentPositionResolutionLayerIterator(e);
 19796                  break;
 19797                default:
 19798                  throw new JpxError(`Unsupported progression order ${i}`);
 19799              }
 19800            }
 19801            function parseTilePackets(e, t, a, r) {
 19802              let i,
 19803                s = 0,
 19804                o = 0,
 19805                c = !1;
 19806              function readBits(e) {
 19807                for (; o < e; ) {
 19808                  const e = t[a + s];
 19809                  s++;
 19810                  if (c) {
 19811                    i = (i << 7) | e;
 19812                    o += 7;
 19813                    c = !1;
 19814                  } else {
 19815                    i = (i << 8) | e;
 19816                    o += 8;
 19817                  }
 19818                  255 === e && (c = !0);
 19819                }
 19820                o -= e;
 19821                return (i >>> o) & ((1 << e) - 1);
 19822              }
 19823              function skipMarkerIfEqual(e) {
 19824                if (255 === t[a + s - 1] && t[a + s] === e) {
 19825                  skipBytes(1);
 19826                  return !0;
 19827                }
 19828                if (255 === t[a + s] && t[a + s + 1] === e) {
 19829                  skipBytes(2);
 19830                  return !0;
 19831                }
 19832                return !1;
 19833              }
 19834              function skipBytes(e) {
 19835                s += e;
 19836              }
 19837              function alignToByte() {
 19838                o = 0;
 19839                if (c) {
 19840                  s++;
 19841                  c = !1;
 19842                }
 19843              }
 19844              function readCodingpasses() {
 19845                if (0 === readBits(1)) return 1;
 19846                if (0 === readBits(1)) return 2;
 19847                let e = readBits(2);
 19848                if (e < 3) return e + 3;
 19849                e = readBits(5);
 19850                if (e < 31) return e + 6;
 19851                e = readBits(7);
 19852                return e + 37;
 19853              }
 19854              const l = e.currentTile.index,
 19855                h = e.tiles[l],
 19856                u = e.COD.sopMarkerUsed,
 19857                d = e.COD.ephMarkerUsed,
 19858                f = h.packetsIterator;
 19859              for (; s < r; ) {
 19860                alignToByte();
 19861                u && skipMarkerIfEqual(145) && skipBytes(4);
 19862                const e = f.nextPacket();
 19863                if (!readBits(1)) continue;
 19864                const r = e.layerNumber,
 19865                  i = [];
 19866                let o;
 19867                for (let t = 0, a = e.codeblocks.length; t < a; t++) {
 19868                  o = e.codeblocks[t];
 19869                  let a = o.precinct;
 19870                  const s = o.cbx - a.cbxMin,
 19871                    c = o.cby - a.cbyMin;
 19872                  let l,
 19873                    h,
 19874                    u = !1,
 19875                    d = !1;
 19876                  if (void 0 !== o.included) u = !!readBits(1);
 19877                  else {
 19878                    a = o.precinct;
 19879                    let e;
 19880                    if (void 0 !== a.inclusionTree) e = a.inclusionTree;
 19881                    else {
 19882                      const t = a.cbxMax - a.cbxMin + 1,
 19883                        n = a.cbyMax - a.cbyMin + 1;
 19884                      e = new InclusionTree(t, n, r);
 19885                      h = new TagTree(t, n);
 19886                      a.inclusionTree = e;
 19887                      a.zeroBitPlanesTree = h;
 19888                      for (let e = 0; e < r; e++)
 19889                        if (0 !== readBits(1))
 19890                          throw new JpxError("Invalid tag tree");
 19891                    }
 19892                    if (e.reset(s, c, r))
 19893                      for (;;) {
 19894                        if (!readBits(1)) {
 19895                          e.incrementValue(r);
 19896                          break;
 19897                        }
 19898                        l = !e.nextLevel();
 19899                        if (l) {
 19900                          o.included = !0;
 19901                          u = d = !0;
 19902                          break;
 19903                        }
 19904                      }
 19905                  }
 19906                  if (!u) continue;
 19907                  if (d) {
 19908                    h = a.zeroBitPlanesTree;
 19909                    h.reset(s, c);
 19910                    for (;;)
 19911                      if (readBits(1)) {
 19912                        l = !h.nextLevel();
 19913                        if (l) break;
 19914                      } else h.incrementValue();
 19915                    o.zeroBitPlanes = h.value;
 19916                  }
 19917                  const f = readCodingpasses();
 19918                  for (; readBits(1); ) o.Lblock++;
 19919                  const g = (0, n.log2)(f),
 19920                    p = readBits((f < 1 << g ? g - 1 : g) + o.Lblock);
 19921                  i.push({ codeblock: o, codingpasses: f, dataLength: p });
 19922                }
 19923                alignToByte();
 19924                d && skipMarkerIfEqual(146);
 19925                for (; i.length > 0; ) {
 19926                  const e = i.shift();
 19927                  o = e.codeblock;
 19928                  void 0 === o.data && (o.data = []);
 19929                  o.data.push({
 19930                    data: t,
 19931                    start: a + s,
 19932                    end: a + s + e.dataLength,
 19933                    codingpasses: e.codingpasses,
 19934                  });
 19935                  s += e.dataLength;
 19936                }
 19937              }
 19938              return s;
 19939            }
 19940            function copyCoefficients(e, t, a, r, n, s, o, c, l) {
 19941              const h = r.tbx0,
 19942                u = r.tby0,
 19943                d = r.tbx1 - r.tbx0,
 19944                f = r.codeblocks,
 19945                g = "H" === r.type.charAt(0) ? 1 : 0,
 19946                p = "H" === r.type.charAt(1) ? t : 0;
 19947              for (let a = 0, m = f.length; a < m; ++a) {
 19948                const m = f[a],
 19949                  b = m.tbx1_ - m.tbx0_,
 19950                  y = m.tby1_ - m.tby0_;
 19951                if (0 === b || 0 === y) continue;
 19952                if (void 0 === m.data) continue;
 19953                const w = new BitModel(b, y, m.subbandType, m.zeroBitPlanes, s);
 19954                let S = 2;
 19955                const x = m.data;
 19956                let C,
 19957                  k,
 19958                  v,
 19959                  F = 0,
 19960                  O = 0;
 19961                for (C = 0, k = x.length; C < k; C++) {
 19962                  v = x[C];
 19963                  F += v.end - v.start;
 19964                  O += v.codingpasses;
 19965                }
 19966                const T = new Uint8Array(F);
 19967                let M = 0;
 19968                for (C = 0, k = x.length; C < k; C++) {
 19969                  v = x[C];
 19970                  const e = v.data.subarray(v.start, v.end);
 19971                  T.set(e, M);
 19972                  M += e.length;
 19973                }
 19974                const D = new i.ArithmeticDecoder(T, 0, F);
 19975                w.setDecoder(D);
 19976                for (C = 0; C < O; C++) {
 19977                  switch (S) {
 19978                    case 0:
 19979                      w.runSignificancePropagationPass();
 19980                      break;
 19981                    case 1:
 19982                      w.runMagnitudeRefinementPass();
 19983                      break;
 19984                    case 2:
 19985                      w.runCleanupPass();
 19986                      c && w.checkSegmentationSymbol();
 19987                  }
 19988                  l && w.reset();
 19989                  S = (S + 1) % 3;
 19990                }
 19991                let E = m.tbx0_ - h + (m.tby0_ - u) * d;
 19992                const N = w.coefficentsSign,
 19993                  R = w.coefficentsMagnitude,
 19994                  L = w.bitsDecoded,
 19995                  $ = o ? 0 : 0.5;
 19996                let _, j, U;
 19997                M = 0;
 19998                const X = "LL" !== r.type;
 19999                for (C = 0; C < y; C++) {
 20000                  const a = 2 * ((E / d) | 0) * (t - d) + g + p;
 20001                  for (_ = 0; _ < b; _++) {
 20002                    j = R[M];
 20003                    if (0 !== j) {
 20004                      j = (j + $) * n;
 20005                      0 !== N[M] && (j = -j);
 20006                      U = L[M];
 20007                      e[X ? a + (E << 1) : E] =
 20008                        o && U >= s ? j : j * (1 << (s - U));
 20009                    }
 20010                    E++;
 20011                    M++;
 20012                  }
 20013                  E += d - b;
 20014                }
 20015              }
 20016            }
 20017            function transformTile(e, t, a) {
 20018              const r = t.components[a],
 20019                n = r.codingStyleParameters,
 20020                i = r.quantizationParameters,
 20021                o = n.decompositionLevelsCount,
 20022                c = i.SPqcds,
 20023                l = i.scalarExpounded,
 20024                h = i.guardBits,
 20025                u = n.segmentationSymbolUsed,
 20026                d = n.resetContextProbabilities,
 20027                f = e.components[a].precision,
 20028                g = n.reversibleTransformation,
 20029                p = g ? new ReversibleTransform() : new IrreversibleTransform(),
 20030                m = [];
 20031              let b = 0;
 20032              for (let e = 0; e <= o; e++) {
 20033                const t = r.resolutions[e],
 20034                  a = t.trx1 - t.trx0,
 20035                  n = t.try1 - t.try0,
 20036                  i = new Float32Array(a * n);
 20037                for (let r = 0, n = t.subbands.length; r < n; r++) {
 20038                  let n, o;
 20039                  if (l) {
 20040                    n = c[b].mu;
 20041                    o = c[b].epsilon;
 20042                    b++;
 20043                  } else {
 20044                    n = c[0].mu;
 20045                    o = c[0].epsilon + (e > 0 ? 1 - e : 0);
 20046                  }
 20047                  const p = t.subbands[r],
 20048                    m = s[p.type];
 20049                  copyCoefficients(
 20050                    i,
 20051                    a,
 20052                    0,
 20053                    p,
 20054                    g ? 1 : 2 ** (f + m - o) * (1 + n / 2048),
 20055                    h + o - 1,
 20056                    g,
 20057                    u,
 20058                    d,
 20059                  );
 20060                }
 20061                m.push({ width: a, height: n, items: i });
 20062              }
 20063              const y = p.calculate(m, r.tcx0, r.tcy0);
 20064              return {
 20065                left: r.tcx0,
 20066                top: r.tcy0,
 20067                width: y.width,
 20068                height: y.height,
 20069                items: y.items,
 20070              };
 20071            }
 20072            function initializeTile(e, t) {
 20073              const a = e.SIZ.Csiz,
 20074                r = e.tiles[t];
 20075              for (let t = 0; t < a; t++) {
 20076                const a = r.components[t],
 20077                  n =
 20078                    void 0 !== e.currentTile.QCC[t]
 20079                      ? e.currentTile.QCC[t]
 20080                      : e.currentTile.QCD;
 20081                a.quantizationParameters = n;
 20082                const i =
 20083                  void 0 !== e.currentTile.COC[t]
 20084                    ? e.currentTile.COC[t]
 20085                    : e.currentTile.COD;
 20086                a.codingStyleParameters = i;
 20087              }
 20088              r.codingStyleDefaultParameters = e.currentTile.COD;
 20089            }
 20090            class TagTree {
 20091              constructor(e, t) {
 20092                const a = (0, n.log2)(Math.max(e, t)) + 1;
 20093                this.levels = [];
 20094                for (let r = 0; r < a; r++) {
 20095                  const a = { width: e, height: t, items: [] };
 20096                  this.levels.push(a);
 20097                  e = Math.ceil(e / 2);
 20098                  t = Math.ceil(t / 2);
 20099                }
 20100              }
 20101              reset(e, t) {
 20102                let a,
 20103                  r = 0,
 20104                  n = 0;
 20105                for (; r < this.levels.length; ) {
 20106                  a = this.levels[r];
 20107                  const i = e + t * a.width;
 20108                  if (void 0 !== a.items[i]) {
 20109                    n = a.items[i];
 20110                    break;
 20111                  }
 20112                  a.index = i;
 20113                  e >>= 1;
 20114                  t >>= 1;
 20115                  r++;
 20116                }
 20117                r--;
 20118                a = this.levels[r];
 20119                a.items[a.index] = n;
 20120                this.currentLevel = r;
 20121                delete this.value;
 20122              }
 20123              incrementValue() {
 20124                const e = this.levels[this.currentLevel];
 20125                e.items[e.index]++;
 20126              }
 20127              nextLevel() {
 20128                let e = this.currentLevel,
 20129                  t = this.levels[e];
 20130                const a = t.items[t.index];
 20131                e--;
 20132                if (e < 0) {
 20133                  this.value = a;
 20134                  return !1;
 20135                }
 20136                this.currentLevel = e;
 20137                t = this.levels[e];
 20138                t.items[t.index] = a;
 20139                return !0;
 20140              }
 20141            }
 20142            class InclusionTree {
 20143              constructor(e, t, a) {
 20144                const r = (0, n.log2)(Math.max(e, t)) + 1;
 20145                this.levels = [];
 20146                for (let n = 0; n < r; n++) {
 20147                  const r = new Uint8Array(e * t);
 20148                  for (let e = 0, t = r.length; e < t; e++) r[e] = a;
 20149                  const n = { width: e, height: t, items: r };
 20150                  this.levels.push(n);
 20151                  e = Math.ceil(e / 2);
 20152                  t = Math.ceil(t / 2);
 20153                }
 20154              }
 20155              reset(e, t, a) {
 20156                let r = 0;
 20157                for (; r < this.levels.length; ) {
 20158                  const n = this.levels[r],
 20159                    i = e + t * n.width;
 20160                  n.index = i;
 20161                  const s = n.items[i];
 20162                  if (255 === s) break;
 20163                  if (s > a) {
 20164                    this.currentLevel = r;
 20165                    this.propagateValues();
 20166                    return !1;
 20167                  }
 20168                  e >>= 1;
 20169                  t >>= 1;
 20170                  r++;
 20171                }
 20172                this.currentLevel = r - 1;
 20173                return !0;
 20174              }
 20175              incrementValue(e) {
 20176                const t = this.levels[this.currentLevel];
 20177                t.items[t.index] = e + 1;
 20178                this.propagateValues();
 20179              }
 20180              propagateValues() {
 20181                let e = this.currentLevel,
 20182                  t = this.levels[e];
 20183                const a = t.items[t.index];
 20184                for (; --e >= 0; ) {
 20185                  t = this.levels[e];
 20186                  t.items[t.index] = a;
 20187                }
 20188              }
 20189              nextLevel() {
 20190                let e = this.currentLevel,
 20191                  t = this.levels[e];
 20192                const a = t.items[t.index];
 20193                t.items[t.index] = 255;
 20194                e--;
 20195                if (e < 0) return !1;
 20196                this.currentLevel = e;
 20197                t = this.levels[e];
 20198                t.items[t.index] = a;
 20199                return !0;
 20200              }
 20201            }
 20202            class BitModel {
 20203              static UNIFORM_CONTEXT = 17;
 20204              static RUNLENGTH_CONTEXT = 18;
 20205              static LLAndLHContextsLabel = new Uint8Array([
 20206                0, 5, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 1, 6, 8, 0, 3, 7,
 20207                8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0,
 20208                0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6,
 20209                8, 0, 3, 7, 8, 0, 4, 7, 8,
 20210              ]);
 20211              static HLContextLabel = new Uint8Array([
 20212                0, 3, 4, 0, 5, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 1, 3, 4, 0, 6, 7,
 20213                7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8, 0,
 20214                0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3,
 20215                4, 0, 6, 7, 7, 0, 8, 8, 8,
 20216              ]);
 20217              static HHContextLabel = new Uint8Array([
 20218                0, 1, 2, 0, 1, 2, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0, 3, 4, 5, 0, 4, 5,
 20219                5, 0, 5, 5, 5, 0, 0, 0, 0, 0, 6, 7, 7, 0, 7, 7, 7, 0, 7, 7, 7, 0,
 20220                0, 0, 0, 0, 8, 8, 8, 0, 8, 8, 8, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 8,
 20221                8, 0, 8, 8, 8, 0, 8, 8, 8,
 20222              ]);
 20223              constructor(e, t, a, r, n) {
 20224                this.width = e;
 20225                this.height = t;
 20226                let i;
 20227                i =
 20228                  "HH" === a
 20229                    ? BitModel.HHContextLabel
 20230                    : "HL" === a
 20231                      ? BitModel.HLContextLabel
 20232                      : BitModel.LLAndLHContextsLabel;
 20233                this.contextLabelTable = i;
 20234                const s = e * t;
 20235                this.neighborsSignificance = new Uint8Array(s);
 20236                this.coefficentsSign = new Uint8Array(s);
 20237                let o;
 20238                o =
 20239                  n > 14
 20240                    ? new Uint32Array(s)
 20241                    : n > 6
 20242                      ? new Uint16Array(s)
 20243                      : new Uint8Array(s);
 20244                this.coefficentsMagnitude = o;
 20245                this.processingFlags = new Uint8Array(s);
 20246                const c = new Uint8Array(s);
 20247                if (0 !== r) for (let e = 0; e < s; e++) c[e] = r;
 20248                this.bitsDecoded = c;
 20249                this.reset();
 20250              }
 20251              setDecoder(e) {
 20252                this.decoder = e;
 20253              }
 20254              reset() {
 20255                this.contexts = new Int8Array(19);
 20256                this.contexts[0] = 8;
 20257                this.contexts[BitModel.UNIFORM_CONTEXT] = 92;
 20258                this.contexts[BitModel.RUNLENGTH_CONTEXT] = 6;
 20259              }
 20260              setNeighborsSignificance(e, t, a) {
 20261                const r = this.neighborsSignificance,
 20262                  n = this.width,
 20263                  i = this.height,
 20264                  s = t > 0,
 20265                  o = t + 1 < n;
 20266                let c;
 20267                if (e > 0) {
 20268                  c = a - n;
 20269                  s && (r[c - 1] += 16);
 20270                  o && (r[c + 1] += 16);
 20271                  r[c] += 4;
 20272                }
 20273                if (e + 1 < i) {
 20274                  c = a + n;
 20275                  s && (r[c - 1] += 16);
 20276                  o && (r[c + 1] += 16);
 20277                  r[c] += 4;
 20278                }
 20279                s && (r[a - 1] += 1);
 20280                o && (r[a + 1] += 1);
 20281                r[a] |= 128;
 20282              }
 20283              runSignificancePropagationPass() {
 20284                const e = this.decoder,
 20285                  t = this.width,
 20286                  a = this.height,
 20287                  r = this.coefficentsMagnitude,
 20288                  n = this.coefficentsSign,
 20289                  i = this.neighborsSignificance,
 20290                  s = this.processingFlags,
 20291                  o = this.contexts,
 20292                  c = this.contextLabelTable,
 20293                  l = this.bitsDecoded;
 20294                for (let h = 0; h < a; h += 4)
 20295                  for (let u = 0; u < t; u++) {
 20296                    let d = h * t + u;
 20297                    for (let f = 0; f < 4; f++, d += t) {
 20298                      const t = h + f;
 20299                      if (t >= a) break;
 20300                      s[d] &= -2;
 20301                      if (r[d] || !i[d]) continue;
 20302                      const g = c[i[d]];
 20303                      if (e.readBit(o, g)) {
 20304                        const e = this.decodeSignBit(t, u, d);
 20305                        n[d] = e;
 20306                        r[d] = 1;
 20307                        this.setNeighborsSignificance(t, u, d);
 20308                        s[d] |= 2;
 20309                      }
 20310                      l[d]++;
 20311                      s[d] |= 1;
 20312                    }
 20313                  }
 20314              }
 20315              decodeSignBit(e, t, a) {
 20316                const r = this.width,
 20317                  n = this.height,
 20318                  i = this.coefficentsMagnitude,
 20319                  s = this.coefficentsSign;
 20320                let o, c, l, h, u, d;
 20321                h = t > 0 && 0 !== i[a - 1];
 20322                if (t + 1 < r && 0 !== i[a + 1]) {
 20323                  l = s[a + 1];
 20324                  if (h) {
 20325                    c = s[a - 1];
 20326                    o = 1 - l - c;
 20327                  } else o = 1 - l - l;
 20328                } else if (h) {
 20329                  c = s[a - 1];
 20330                  o = 1 - c - c;
 20331                } else o = 0;
 20332                const f = 3 * o;
 20333                h = e > 0 && 0 !== i[a - r];
 20334                if (e + 1 < n && 0 !== i[a + r]) {
 20335                  l = s[a + r];
 20336                  if (h) {
 20337                    c = s[a - r];
 20338                    o = 1 - l - c + f;
 20339                  } else o = 1 - l - l + f;
 20340                } else if (h) {
 20341                  c = s[a - r];
 20342                  o = 1 - c - c + f;
 20343                } else o = f;
 20344                if (o >= 0) {
 20345                  u = 9 + o;
 20346                  d = this.decoder.readBit(this.contexts, u);
 20347                } else {
 20348                  u = 9 - o;
 20349                  d = 1 ^ this.decoder.readBit(this.contexts, u);
 20350                }
 20351                return d;
 20352              }
 20353              runMagnitudeRefinementPass() {
 20354                const e = this.decoder,
 20355                  t = this.width,
 20356                  a = this.height,
 20357                  r = this.coefficentsMagnitude,
 20358                  n = this.neighborsSignificance,
 20359                  i = this.contexts,
 20360                  s = this.bitsDecoded,
 20361                  o = this.processingFlags,
 20362                  c = t * a,
 20363                  l = 4 * t;
 20364                for (let a, h = 0; h < c; h = a) {
 20365                  a = Math.min(c, h + l);
 20366                  for (let c = 0; c < t; c++)
 20367                    for (let l = h + c; l < a; l += t) {
 20368                      if (!r[l] || 0 != (1 & o[l])) continue;
 20369                      let t = 16;
 20370                      if (0 != (2 & o[l])) {
 20371                        o[l] ^= 2;
 20372                        t = 0 === (127 & n[l]) ? 15 : 14;
 20373                      }
 20374                      const a = e.readBit(i, t);
 20375                      r[l] = (r[l] << 1) | a;
 20376                      s[l]++;
 20377                      o[l] |= 1;
 20378                    }
 20379                }
 20380              }
 20381              runCleanupPass() {
 20382                const e = this.decoder,
 20383                  t = this.width,
 20384                  a = this.height,
 20385                  r = this.neighborsSignificance,
 20386                  n = this.coefficentsMagnitude,
 20387                  i = this.coefficentsSign,
 20388                  s = this.contexts,
 20389                  o = this.contextLabelTable,
 20390                  c = this.bitsDecoded,
 20391                  l = this.processingFlags,
 20392                  h = t,
 20393                  u = 2 * t,
 20394                  d = 3 * t;
 20395                let f;
 20396                for (let g = 0; g < a; g = f) {
 20397                  f = Math.min(g + 4, a);
 20398                  const p = g * t,
 20399                    m = g + 3 < a;
 20400                  for (let a = 0; a < t; a++) {
 20401                    const b = p + a;
 20402                    let y,
 20403                      w = 0,
 20404                      S = b,
 20405                      x = g;
 20406                    if (
 20407                      m &&
 20408                      0 === l[b] &&
 20409                      0 === l[b + h] &&
 20410                      0 === l[b + u] &&
 20411                      0 === l[b + d] &&
 20412                      0 === r[b] &&
 20413                      0 === r[b + h] &&
 20414                      0 === r[b + u] &&
 20415                      0 === r[b + d]
 20416                    ) {
 20417                      if (!e.readBit(s, BitModel.RUNLENGTH_CONTEXT)) {
 20418                        c[b]++;
 20419                        c[b + h]++;
 20420                        c[b + u]++;
 20421                        c[b + d]++;
 20422                        continue;
 20423                      }
 20424                      w =
 20425                        (e.readBit(s, BitModel.UNIFORM_CONTEXT) << 1) |
 20426                        e.readBit(s, BitModel.UNIFORM_CONTEXT);
 20427                      if (0 !== w) {
 20428                        x = g + w;
 20429                        S += w * t;
 20430                      }
 20431                      y = this.decodeSignBit(x, a, S);
 20432                      i[S] = y;
 20433                      n[S] = 1;
 20434                      this.setNeighborsSignificance(x, a, S);
 20435                      l[S] |= 2;
 20436                      S = b;
 20437                      for (let e = g; e <= x; e++, S += t) c[S]++;
 20438                      w++;
 20439                    }
 20440                    for (x = g + w; x < f; x++, S += t) {
 20441                      if (n[S] || 0 != (1 & l[S])) continue;
 20442                      const t = o[r[S]];
 20443                      if (1 === e.readBit(s, t)) {
 20444                        y = this.decodeSignBit(x, a, S);
 20445                        i[S] = y;
 20446                        n[S] = 1;
 20447                        this.setNeighborsSignificance(x, a, S);
 20448                        l[S] |= 2;
 20449                      }
 20450                      c[S]++;
 20451                    }
 20452                  }
 20453                }
 20454              }
 20455              checkSegmentationSymbol() {
 20456                const e = this.decoder,
 20457                  t = this.contexts;
 20458                if (
 20459                  10 !==
 20460                  ((e.readBit(t, BitModel.UNIFORM_CONTEXT) << 3) |
 20461                    (e.readBit(t, BitModel.UNIFORM_CONTEXT) << 2) |
 20462                    (e.readBit(t, BitModel.UNIFORM_CONTEXT) << 1) |
 20463                    e.readBit(t, BitModel.UNIFORM_CONTEXT))
 20464                )
 20465                  throw new JpxError("Invalid segmentation symbol");
 20466              }
 20467            }
 20468            class Transform {
 20469              constructor() {
 20470                this.constructor === Transform &&
 20471                  (0, r.unreachable)("Cannot initialize Transform.");
 20472              }
 20473              calculate(e, t, a) {
 20474                let r = e[0];
 20475                for (let n = 1, i = e.length; n < i; n++)
 20476                  r = this.iterate(r, e[n], t, a);
 20477                return r;
 20478              }
 20479              extend(e, t, a) {
 20480                let r = t - 1,
 20481                  n = t + 1,
 20482                  i = t + a - 2,
 20483                  s = t + a;
 20484                e[r--] = e[n++];
 20485                e[s++] = e[i--];
 20486                e[r--] = e[n++];
 20487                e[s++] = e[i--];
 20488                e[r--] = e[n++];
 20489                e[s++] = e[i--];
 20490                e[r] = e[n];
 20491                e[s] = e[i];
 20492              }
 20493              filter(e, t, a) {
 20494                (0, r.unreachable)("Abstract method `filter` called");
 20495              }
 20496              iterate(e, t, a, r) {
 20497                const n = e.width,
 20498                  i = e.height;
 20499                let s = e.items;
 20500                const o = t.width,
 20501                  c = t.height,
 20502                  l = t.items;
 20503                let h, u, d, f, g, p;
 20504                for (d = 0, h = 0; h < i; h++) {
 20505                  f = 2 * h * o;
 20506                  for (u = 0; u < n; u++, d++, f += 2) l[f] = s[d];
 20507                }
 20508                s = e.items = null;
 20509                const m = new Float32Array(o + 8);
 20510                if (1 === o) {
 20511                  if (0 != (1 & a))
 20512                    for (p = 0, d = 0; p < c; p++, d += o) l[d] *= 0.5;
 20513                } else
 20514                  for (p = 0, d = 0; p < c; p++, d += o) {
 20515                    m.set(l.subarray(d, d + o), 4);
 20516                    this.extend(m, 4, o);
 20517                    this.filter(m, 4, o);
 20518                    l.set(m.subarray(4, 4 + o), d);
 20519                  }
 20520                let b = 16;
 20521                const y = [];
 20522                for (h = 0; h < b; h++) y.push(new Float32Array(c + 8));
 20523                let w,
 20524                  S = 0;
 20525                e = 4 + c;
 20526                if (1 === c) {
 20527                  if (0 != (1 & r)) for (g = 0; g < o; g++) l[g] *= 0.5;
 20528                } else
 20529                  for (g = 0; g < o; g++) {
 20530                    if (0 === S) {
 20531                      b = Math.min(o - g, b);
 20532                      for (d = g, f = 4; f < e; d += o, f++)
 20533                        for (w = 0; w < b; w++) y[w][f] = l[d + w];
 20534                      S = b;
 20535                    }
 20536                    S--;
 20537                    const t = y[S];
 20538                    this.extend(t, 4, c);
 20539                    this.filter(t, 4, c);
 20540                    if (0 === S) {
 20541                      d = g - b + 1;
 20542                      for (f = 4; f < e; d += o, f++)
 20543                        for (w = 0; w < b; w++) l[d + w] = y[w][f];
 20544                    }
 20545                  }
 20546                return { width: o, height: c, items: l };
 20547              }
 20548            }
 20549            class IrreversibleTransform extends Transform {
 20550              filter(e, t, a) {
 20551                const r = a >> 1;
 20552                let n, i, s, o;
 20553                const c = -1.586134342059924,
 20554                  l = -0.052980118572961,
 20555                  h = 0.882911075530934,
 20556                  u = 0.443506852043971,
 20557                  d = 1.230174104914001;
 20558                n = (t |= 0) - 3;
 20559                for (i = r + 4; i--; n += 2) e[n] *= 0.8128930661159609;
 20560                n = t - 2;
 20561                s = u * e[n - 1];
 20562                for (i = r + 3; i--; n += 2) {
 20563                  o = u * e[n + 1];
 20564                  e[n] = d * e[n] - s - o;
 20565                  if (!i--) break;
 20566                  n += 2;
 20567                  s = u * e[n + 1];
 20568                  e[n] = d * e[n] - s - o;
 20569                }
 20570                n = t - 1;
 20571                s = h * e[n - 1];
 20572                for (i = r + 2; i--; n += 2) {
 20573                  o = h * e[n + 1];
 20574                  e[n] -= s + o;
 20575                  if (!i--) break;
 20576                  n += 2;
 20577                  s = h * e[n + 1];
 20578                  e[n] -= s + o;
 20579                }
 20580                n = t;
 20581                s = l * e[n - 1];
 20582                for (i = r + 1; i--; n += 2) {
 20583                  o = l * e[n + 1];
 20584                  e[n] -= s + o;
 20585                  if (!i--) break;
 20586                  n += 2;
 20587                  s = l * e[n + 1];
 20588                  e[n] -= s + o;
 20589                }
 20590                if (0 !== r) {
 20591                  n = t + 1;
 20592                  s = c * e[n - 1];
 20593                  for (i = r; i--; n += 2) {
 20594                    o = c * e[n + 1];
 20595                    e[n] -= s + o;
 20596                    if (!i--) break;
 20597                    n += 2;
 20598                    s = c * e[n + 1];
 20599                    e[n] -= s + o;
 20600                  }
 20601                }
 20602              }
 20603            }
 20604            class ReversibleTransform extends Transform {
 20605              filter(e, t, a) {
 20606                const r = a >> 1;
 20607                let n, i;
 20608                for (n = t |= 0, i = r + 1; i--; n += 2)
 20609                  e[n] -= (e[n - 1] + e[n + 1] + 2) >> 2;
 20610                for (n = t + 1, i = r; i--; n += 2)
 20611                  e[n] += (e[n - 1] + e[n + 1]) >> 1;
 20612              }
 20613            }
 20614          },
 20615          (e, t, a) => {
 20616            Object.defineProperty(t, "__esModule", { value: !0 });
 20617            t.LZWStream = void 0;
 20618            var r = a(18);
 20619            class LZWStream extends r.DecodeStream {
 20620              constructor(e, t, a) {
 20621                super(t);
 20622                this.str = e;
 20623                this.dict = e.dict;
 20624                this.cachedData = 0;
 20625                this.bitsCached = 0;
 20626                const r = 4096,
 20627                  n = {
 20628                    earlyChange: a,
 20629                    codeLength: 9,
 20630                    nextCode: 258,
 20631                    dictionaryValues: new Uint8Array(r),
 20632                    dictionaryLengths: new Uint16Array(r),
 20633                    dictionaryPrevCodes: new Uint16Array(r),
 20634                    currentSequence: new Uint8Array(r),
 20635                    currentSequenceLength: 0,
 20636                  };
 20637                for (let e = 0; e < 256; ++e) {
 20638                  n.dictionaryValues[e] = e;
 20639                  n.dictionaryLengths[e] = 1;
 20640                }
 20641                this.lzwState = n;
 20642              }
 20643              readBits(e) {
 20644                let t = this.bitsCached,
 20645                  a = this.cachedData;
 20646                for (; t < e; ) {
 20647                  const e = this.str.getByte();
 20648                  if (-1 === e) {
 20649                    this.eof = !0;
 20650                    return null;
 20651                  }
 20652                  a = (a << 8) | e;
 20653                  t += 8;
 20654                }
 20655                this.bitsCached = t -= e;
 20656                this.cachedData = a;
 20657                this.lastCode = null;
 20658                return (a >>> t) & ((1 << e) - 1);
 20659              }
 20660              readBlock() {
 20661                let e,
 20662                  t,
 20663                  a,
 20664                  r = 1024;
 20665                const n = this.lzwState;
 20666                if (!n) return;
 20667                const i = n.earlyChange;
 20668                let s = n.nextCode;
 20669                const o = n.dictionaryValues,
 20670                  c = n.dictionaryLengths,
 20671                  l = n.dictionaryPrevCodes;
 20672                let h = n.codeLength,
 20673                  u = n.prevCode;
 20674                const d = n.currentSequence;
 20675                let f = n.currentSequenceLength,
 20676                  g = 0,
 20677                  p = this.bufferLength,
 20678                  m = this.ensureBuffer(this.bufferLength + r);
 20679                for (e = 0; e < 512; e++) {
 20680                  const e = this.readBits(h),
 20681                    n = f > 0;
 20682                  if (e < 256) {
 20683                    d[0] = e;
 20684                    f = 1;
 20685                  } else {
 20686                    if (!(e >= 258)) {
 20687                      if (256 === e) {
 20688                        h = 9;
 20689                        s = 258;
 20690                        f = 0;
 20691                        continue;
 20692                      }
 20693                      this.eof = !0;
 20694                      delete this.lzwState;
 20695                      break;
 20696                    }
 20697                    if (e < s) {
 20698                      f = c[e];
 20699                      for (t = f - 1, a = e; t >= 0; t--) {
 20700                        d[t] = o[a];
 20701                        a = l[a];
 20702                      }
 20703                    } else d[f++] = d[0];
 20704                  }
 20705                  if (n) {
 20706                    l[s] = u;
 20707                    c[s] = c[u] + 1;
 20708                    o[s] = d[0];
 20709                    s++;
 20710                    h =
 20711                      (s + i) & (s + i - 1)
 20712                        ? h
 20713                        : 0 |
 20714                          Math.min(Math.log(s + i) / 0.6931471805599453 + 1, 12);
 20715                  }
 20716                  u = e;
 20717                  g += f;
 20718                  if (r < g) {
 20719                    do {
 20720                      r += 512;
 20721                    } while (r < g);
 20722                    m = this.ensureBuffer(this.bufferLength + r);
 20723                  }
 20724                  for (t = 0; t < f; t++) m[p++] = d[t];
 20725                }
 20726                n.nextCode = s;
 20727                n.codeLength = h;
 20728                n.prevCode = u;
 20729                n.currentSequenceLength = f;
 20730                this.bufferLength = p;
 20731              }
 20732            }
 20733            t.LZWStream = LZWStream;
 20734          },
 20735          (e, t, a) => {
 20736            Object.defineProperty(t, "__esModule", { value: !0 });
 20737            t.PredictorStream = void 0;
 20738            var r = a(18),
 20739              n = a(4),
 20740              i = a(2);
 20741            class PredictorStream extends r.DecodeStream {
 20742              constructor(e, t, a) {
 20743                super(t);
 20744                if (!(a instanceof n.Dict)) return e;
 20745                const r = (this.predictor = a.get("Predictor") || 1);
 20746                if (r <= 1) return e;
 20747                if (2 !== r && (r < 10 || r > 15))
 20748                  throw new i.FormatError(`Unsupported predictor: ${r}`);
 20749                this.readBlock = 2 === r ? this.readBlockTiff : this.readBlockPng;
 20750                this.str = e;
 20751                this.dict = e.dict;
 20752                const s = (this.colors = a.get("Colors") || 1),
 20753                  o = (this.bits = a.get("BPC", "BitsPerComponent") || 8),
 20754                  c = (this.columns = a.get("Columns") || 1);
 20755                this.pixBytes = (s * o + 7) >> 3;
 20756                this.rowBytes = (c * s * o + 7) >> 3;
 20757                return this;
 20758              }
 20759              readBlockTiff() {
 20760                const e = this.rowBytes,
 20761                  t = this.bufferLength,
 20762                  a = this.ensureBuffer(t + e),
 20763                  r = this.bits,
 20764                  n = this.colors,
 20765                  i = this.str.getBytes(e);
 20766                this.eof = !i.length;
 20767                if (this.eof) return;
 20768                let s,
 20769                  o = 0,
 20770                  c = 0,
 20771                  l = 0,
 20772                  h = 0,
 20773                  u = t;
 20774                if (1 === r && 1 === n)
 20775                  for (s = 0; s < e; ++s) {
 20776                    let e = i[s] ^ o;
 20777                    e ^= e >> 1;
 20778                    e ^= e >> 2;
 20779                    e ^= e >> 4;
 20780                    o = (1 & e) << 7;
 20781                    a[u++] = e;
 20782                  }
 20783                else if (8 === r) {
 20784                  for (s = 0; s < n; ++s) a[u++] = i[s];
 20785                  for (; s < e; ++s) {
 20786                    a[u] = a[u - n] + i[s];
 20787                    u++;
 20788                  }
 20789                } else if (16 === r) {
 20790                  const t = 2 * n;
 20791                  for (s = 0; s < t; ++s) a[u++] = i[s];
 20792                  for (; s < e; s += 2) {
 20793                    const e =
 20794                      ((255 & i[s]) << 8) +
 20795                      (255 & i[s + 1]) +
 20796                      ((255 & a[u - t]) << 8) +
 20797                      (255 & a[u - t + 1]);
 20798                    a[u++] = (e >> 8) & 255;
 20799                    a[u++] = 255 & e;
 20800                  }
 20801                } else {
 20802                  const e = new Uint8Array(n + 1),
 20803                    u = (1 << r) - 1;
 20804                  let d = 0,
 20805                    f = t;
 20806                  const g = this.columns;
 20807                  for (s = 0; s < g; ++s)
 20808                    for (let t = 0; t < n; ++t) {
 20809                      if (l < r) {
 20810                        o = (o << 8) | (255 & i[d++]);
 20811                        l += 8;
 20812                      }
 20813                      e[t] = (e[t] + (o >> (l - r))) & u;
 20814                      l -= r;
 20815                      c = (c << r) | e[t];
 20816                      h += r;
 20817                      if (h >= 8) {
 20818                        a[f++] = (c >> (h - 8)) & 255;
 20819                        h -= 8;
 20820                      }
 20821                    }
 20822                  h > 0 && (a[f++] = (c << (8 - h)) + (o & ((1 << (8 - h)) - 1)));
 20823                }
 20824                this.bufferLength += e;
 20825              }
 20826              readBlockPng() {
 20827                const e = this.rowBytes,
 20828                  t = this.pixBytes,
 20829                  a = this.str.getByte(),
 20830                  r = this.str.getBytes(e);
 20831                this.eof = !r.length;
 20832                if (this.eof) return;
 20833                const n = this.bufferLength,
 20834                  s = this.ensureBuffer(n + e);
 20835                let o = s.subarray(n - e, n);
 20836                0 === o.length && (o = new Uint8Array(e));
 20837                let c,
 20838                  l,
 20839                  h,
 20840                  u = n;
 20841                switch (a) {
 20842                  case 0:
 20843                    for (c = 0; c < e; ++c) s[u++] = r[c];
 20844                    break;
 20845                  case 1:
 20846                    for (c = 0; c < t; ++c) s[u++] = r[c];
 20847                    for (; c < e; ++c) {
 20848                      s[u] = (s[u - t] + r[c]) & 255;
 20849                      u++;
 20850                    }
 20851                    break;
 20852                  case 2:
 20853                    for (c = 0; c < e; ++c) s[u++] = (o[c] + r[c]) & 255;
 20854                    break;
 20855                  case 3:
 20856                    for (c = 0; c < t; ++c) s[u++] = (o[c] >> 1) + r[c];
 20857                    for (; c < e; ++c) {
 20858                      s[u] = (((o[c] + s[u - t]) >> 1) + r[c]) & 255;
 20859                      u++;
 20860                    }
 20861                    break;
 20862                  case 4:
 20863                    for (c = 0; c < t; ++c) {
 20864                      l = o[c];
 20865                      h = r[c];
 20866                      s[u++] = l + h;
 20867                    }
 20868                    for (; c < e; ++c) {
 20869                      l = o[c];
 20870                      const e = o[c - t],
 20871                        a = s[u - t],
 20872                        n = a + l - e;
 20873                      let i = n - a;
 20874                      i < 0 && (i = -i);
 20875                      let d = n - l;
 20876                      d < 0 && (d = -d);
 20877                      let f = n - e;
 20878                      f < 0 && (f = -f);
 20879                      h = r[c];
 20880                      s[u++] = i <= d && i <= f ? a + h : d <= f ? l + h : e + h;
 20881                    }
 20882                    break;
 20883                  default:
 20884                    throw new i.FormatError(`Unsupported predictor: ${a}`);
 20885                }
 20886                this.bufferLength += e;
 20887              }
 20888            }
 20889            t.PredictorStream = PredictorStream;
 20890          },
 20891          (e, t, a) => {
 20892            Object.defineProperty(t, "__esModule", { value: !0 });
 20893            t.RunLengthStream = void 0;
 20894            var r = a(18);
 20895            class RunLengthStream extends r.DecodeStream {
 20896              constructor(e, t) {
 20897                super(t);
 20898                this.str = e;
 20899                this.dict = e.dict;
 20900              }
 20901              readBlock() {
 20902                const e = this.str.getBytes(2);
 20903                if (!e || e.length < 2 || 128 === e[0]) {
 20904                  this.eof = !0;
 20905                  return;
 20906                }
 20907                let t,
 20908                  a = this.bufferLength,
 20909                  r = e[0];
 20910                if (r < 128) {
 20911                  t = this.ensureBuffer(a + r + 1);
 20912                  t[a++] = e[1];
 20913                  if (r > 0) {
 20914                    const e = this.str.getBytes(r);
 20915                    t.set(e, a);
 20916                    a += r;
 20917                  }
 20918                } else {
 20919                  r = 257 - r;
 20920                  const n = e[1];
 20921                  t = this.ensureBuffer(a + r + 1);
 20922                  for (let e = 0; e < r; e++) t[a++] = n;
 20923                }
 20924                this.bufferLength = a;
 20925              }
 20926            }
 20927            t.RunLengthStream = RunLengthStream;
 20928          },
 20929          (e, t, a) => {
 20930            Object.defineProperty(t, "__esModule", { value: !0 });
 20931            t.Font = t.ErrorFont = void 0;
 20932            var r = a(2),
 20933              n = a(35),
 20934              i = a(38),
 20935              s = a(40),
 20936              o = a(39),
 20937              c = a(37),
 20938              l = a(41),
 20939              h = a(42),
 20940              u = a(43),
 20941              d = a(44),
 20942              f = a(45),
 20943              g = a(46),
 20944              p = a(14),
 20945              m = a(47),
 20946              b = a(3),
 20947              y = a(8),
 20948              w = a(48);
 20949            const S = [
 20950                [57344, 63743],
 20951                [1048576, 1114109],
 20952              ],
 20953              x = 1e3,
 20954              C = [
 20955                "ascent",
 20956                "bbox",
 20957                "black",
 20958                "bold",
 20959                "charProcOperatorList",
 20960                "composite",
 20961                "cssFontInfo",
 20962                "data",
 20963                "defaultVMetrics",
 20964                "defaultWidth",
 20965                "descent",
 20966                "fallbackName",
 20967                "fontMatrix",
 20968                "isInvalidPDFjsFont",
 20969                "isType3Font",
 20970                "italic",
 20971                "loadedName",
 20972                "mimetype",
 20973                "missingFile",
 20974                "name",
 20975                "remeasure",
 20976                "subtype",
 20977                "systemFontInfo",
 20978                "type",
 20979                "vertical",
 20980              ],
 20981              k = [
 20982                "cMap",
 20983                "defaultEncoding",
 20984                "differences",
 20985                "isMonospace",
 20986                "isSerifFont",
 20987                "isSymbolicFont",
 20988                "seacMap",
 20989                "toFontChar",
 20990                "toUnicode",
 20991                "vmetrics",
 20992                "widths",
 20993              ];
 20994            function adjustWidths(e) {
 20995              if (!e.fontMatrix) return;
 20996              if (e.fontMatrix[0] === r.FONT_IDENTITY_MATRIX[0]) return;
 20997              const t = 0.001 / e.fontMatrix[0],
 20998                a = e.widths;
 20999              for (const e in a) a[e] *= t;
 21000              e.defaultWidth *= t;
 21001            }
 21002            function amendFallbackToUnicode(e) {
 21003              if (!e.fallbackToUnicode) return;
 21004              if (e.toUnicode instanceof h.IdentityToUnicodeMap) return;
 21005              const t = [];
 21006              for (const a in e.fallbackToUnicode)
 21007                e.toUnicode.has(a) || (t[a] = e.fallbackToUnicode[a]);
 21008              t.length > 0 && e.toUnicode.amend(t);
 21009            }
 21010            class Glyph {
 21011              constructor(e, t, a, r, n, i, s, o, c) {
 21012                this.originalCharCode = e;
 21013                this.fontChar = t;
 21014                this.unicode = a;
 21015                this.accent = r;
 21016                this.width = n;
 21017                this.vmetric = i;
 21018                this.operatorListId = s;
 21019                this.isSpace = o;
 21020                this.isInFont = c;
 21021              }
 21022              get category() {
 21023                return (0, r.shadow)(
 21024                  this,
 21025                  "category",
 21026                  (0, s.getCharUnicodeCategory)(this.unicode),
 21027                  !0,
 21028                );
 21029              }
 21030            }
 21031            function int16(e, t) {
 21032              return (e << 8) + t;
 21033            }
 21034            function writeSignedInt16(e, t, a) {
 21035              e[t + 1] = a;
 21036              e[t] = a >>> 8;
 21037            }
 21038            function signedInt16(e, t) {
 21039              const a = (e << 8) + t;
 21040              return 32768 & a ? a - 65536 : a;
 21041            }
 21042            function string16(e) {
 21043              return String.fromCharCode((e >> 8) & 255, 255 & e);
 21044            }
 21045            function safeString16(e) {
 21046              e > 32767 ? (e = 32767) : e < -32768 && (e = -32768);
 21047              return String.fromCharCode((e >> 8) & 255, 255 & e);
 21048            }
 21049            function isTrueTypeCollectionFile(e) {
 21050              const t = e.peekBytes(4);
 21051              return "ttcf" === (0, r.bytesToString)(t);
 21052            }
 21053            function getFontFileType(e, { type: t, subtype: a, composite: n }) {
 21054              let i, s;
 21055              if (
 21056                (function isTrueTypeFile(e) {
 21057                  const t = e.peekBytes(4);
 21058                  return (
 21059                    65536 === (0, b.readUint32)(t, 0) ||
 21060                    "true" === (0, r.bytesToString)(t)
 21061                  );
 21062                })(e) ||
 21063                isTrueTypeCollectionFile(e)
 21064              )
 21065                i = n ? "CIDFontType2" : "TrueType";
 21066              else if (
 21067                (function isOpenTypeFile(e) {
 21068                  const t = e.peekBytes(4);
 21069                  return "OTTO" === (0, r.bytesToString)(t);
 21070                })(e)
 21071              )
 21072                i = n ? "CIDFontType2" : "OpenType";
 21073              else if (
 21074                (function isType1File(e) {
 21075                  const t = e.peekBytes(2);
 21076                  return (
 21077                    (37 === t[0] && 33 === t[1]) || (128 === t[0] && 1 === t[1])
 21078                  );
 21079                })(e)
 21080              )
 21081                i = n ? "CIDFontType0" : "MMType1" === t ? "MMType1" : "Type1";
 21082              else if (
 21083                (function isCFFFile(e) {
 21084                  const t = e.peekBytes(4);
 21085                  return t[0] >= 1 && t[3] >= 1 && t[3] <= 4;
 21086                })(e)
 21087              )
 21088                if (n) {
 21089                  i = "CIDFontType0";
 21090                  s = "CIDFontType0C";
 21091                } else {
 21092                  i = "MMType1" === t ? "MMType1" : "Type1";
 21093                  s = "Type1C";
 21094                }
 21095              else {
 21096                (0, r.warn)(
 21097                  "getFontFileType: Unable to detect correct font file Type/Subtype.",
 21098                );
 21099                i = t;
 21100                s = a;
 21101              }
 21102              return [i, s];
 21103            }
 21104            function applyStandardFontGlyphMap(e, t) {
 21105              for (const a in t) e[+a] = t[a];
 21106            }
 21107            function buildToFontChar(e, t, a) {
 21108              const r = [];
 21109              let n;
 21110              for (let a = 0, i = e.length; a < i; a++) {
 21111                n = (0, s.getUnicodeForGlyph)(e[a], t);
 21112                -1 !== n && (r[a] = n);
 21113              }
 21114              for (const e in a) {
 21115                n = (0, s.getUnicodeForGlyph)(a[e], t);
 21116                -1 !== n && (r[+e] = n);
 21117              }
 21118              return r;
 21119            }
 21120            function isMacNameRecord(e) {
 21121              return 1 === e.platform && 0 === e.encoding && 0 === e.language;
 21122            }
 21123            function isWinNameRecord(e) {
 21124              return 3 === e.platform && 1 === e.encoding && 1033 === e.language;
 21125            }
 21126            function convertCidString(e, t, a = !1) {
 21127              switch (t.length) {
 21128                case 1:
 21129                  return t.charCodeAt(0);
 21130                case 2:
 21131                  return (t.charCodeAt(0) << 8) | t.charCodeAt(1);
 21132              }
 21133              const n = `Unsupported CID string (charCode ${e}): "${t}".`;
 21134              if (a) throw new r.FormatError(n);
 21135              (0, r.warn)(n);
 21136              return t;
 21137            }
 21138            function adjustMapping(e, t, a, n) {
 21139              const i = Object.create(null),
 21140                s = new Map(),
 21141                o = [],
 21142                c = new Set();
 21143              let l = 0;
 21144              let h = S[l][0],
 21145                u = S[l][1];
 21146              for (let f in e) {
 21147                f |= 0;
 21148                let g = e[f];
 21149                if (!t(g)) continue;
 21150                if (h > u) {
 21151                  l++;
 21152                  if (l >= S.length) {
 21153                    (0, r.warn)("Ran out of space in font private use area.");
 21154                    break;
 21155                  }
 21156                  h = S[l][0];
 21157                  u = S[l][1];
 21158                }
 21159                const p = h++;
 21160                0 === g && (g = a);
 21161                let m = n.get(f);
 21162                "string" == typeof m && (m = m.codePointAt(0));
 21163                if (
 21164                  m &&
 21165                  !((d = m),
 21166                  (S[0][0] <= d && d <= S[0][1]) ||
 21167                    (S[1][0] <= d && d <= S[1][1])) &&
 21168                  !c.has(g)
 21169                ) {
 21170                  s.set(m, g);
 21171                  c.add(g);
 21172                }
 21173                i[p] = g;
 21174                o[f] = p;
 21175              }
 21176              var d;
 21177              return {
 21178                toFontChar: o,
 21179                charCodeToGlyphId: i,
 21180                toUnicodeExtraMap: s,
 21181                nextAvailableFontCharCode: h,
 21182              };
 21183            }
 21184            function createCmapTable(e, t, a) {
 21185              const n = (function getRanges(e, t, a) {
 21186                  const r = [];
 21187                  for (const t in e)
 21188                    e[t] >= a || r.push({ fontCharCode: 0 | t, glyphId: e[t] });
 21189                  if (t)
 21190                    for (const [e, n] of t)
 21191                      n >= a || r.push({ fontCharCode: e, glyphId: n });
 21192                  0 === r.length && r.push({ fontCharCode: 0, glyphId: 0 });
 21193                  r.sort(function fontGetRangesSort(e, t) {
 21194                    return e.fontCharCode - t.fontCharCode;
 21195                  });
 21196                  const n = [],
 21197                    i = r.length;
 21198                  for (let e = 0; e < i; ) {
 21199                    const t = r[e].fontCharCode,
 21200                      a = [r[e].glyphId];
 21201                    ++e;
 21202                    let s = t;
 21203                    for (; e < i && s + 1 === r[e].fontCharCode; ) {
 21204                      a.push(r[e].glyphId);
 21205                      ++s;
 21206                      ++e;
 21207                      if (65535 === s) break;
 21208                    }
 21209                    n.push([t, s, a]);
 21210                  }
 21211                  return n;
 21212                })(e, t, a),
 21213                i = n.at(-1)[1] > 65535 ? 2 : 1;
 21214              let s,
 21215                o,
 21216                c,
 21217                l,
 21218                h = "\0\0" + string16(i) + "\0\0" + (0, r.string32)(4 + 8 * i);
 21219              for (s = n.length - 1; s >= 0 && !(n[s][0] <= 65535); --s);
 21220              const u = s + 1;
 21221              n[s][0] < 65535 && 65535 === n[s][1] && (n[s][1] = 65534);
 21222              const d = n[s][1] < 65535 ? 1 : 0,
 21223                f = u + d,
 21224                g = m.OpenTypeFileBuilder.getSearchParams(f, 2);
 21225              let p,
 21226                b,
 21227                y,
 21228                w,
 21229                S = "",
 21230                x = "",
 21231                C = "",
 21232                k = "",
 21233                v = "",
 21234                F = 0;
 21235              for (s = 0, o = u; s < o; s++) {
 21236                p = n[s];
 21237                b = p[0];
 21238                y = p[1];
 21239                S += string16(b);
 21240                x += string16(y);
 21241                w = p[2];
 21242                let e = !0;
 21243                for (c = 1, l = w.length; c < l; ++c)
 21244                  if (w[c] !== w[c - 1] + 1) {
 21245                    e = !1;
 21246                    break;
 21247                  }
 21248                if (e) {
 21249                  C += string16((w[0] - b) & 65535);
 21250                  k += string16(0);
 21251                } else {
 21252                  const e = 2 * (f - s) + 2 * F;
 21253                  F += y - b + 1;
 21254                  C += string16(0);
 21255                  k += string16(e);
 21256                  for (c = 0, l = w.length; c < l; ++c) v += string16(w[c]);
 21257                }
 21258              }
 21259              if (d > 0) {
 21260                x += "ÿÿ";
 21261                S += "ÿÿ";
 21262                C += "\0";
 21263                k += "\0\0";
 21264              }
 21265              const O =
 21266                "\0\0" +
 21267                string16(2 * f) +
 21268                string16(g.range) +
 21269                string16(g.entry) +
 21270                string16(g.rangeShift) +
 21271                x +
 21272                "\0\0" +
 21273                S +
 21274                C +
 21275                k +
 21276                v;
 21277              let T = "",
 21278                M = "";
 21279              if (i > 1) {
 21280                h += "\0\0\n" + (0, r.string32)(4 + 8 * i + 4 + O.length);
 21281                T = "";
 21282                for (s = 0, o = n.length; s < o; s++) {
 21283                  p = n[s];
 21284                  b = p[0];
 21285                  w = p[2];
 21286                  let e = w[0];
 21287                  for (c = 1, l = w.length; c < l; ++c)
 21288                    if (w[c] !== w[c - 1] + 1) {
 21289                      y = p[0] + c - 1;
 21290                      T +=
 21291                        (0, r.string32)(b) +
 21292                        (0, r.string32)(y) +
 21293                        (0, r.string32)(e);
 21294                      b = y + 1;
 21295                      e = w[c];
 21296                    }
 21297                  T +=
 21298                    (0, r.string32)(b) +
 21299                    (0, r.string32)(p[1]) +
 21300                    (0, r.string32)(e);
 21301                }
 21302                M =
 21303                  "\0\f\0\0" +
 21304                  (0, r.string32)(T.length + 16) +
 21305                  "\0\0\0\0" +
 21306                  (0, r.string32)(T.length / 12);
 21307              }
 21308              return h + "\0" + string16(O.length + 4) + O + M + T;
 21309            }
 21310            function createOS2Table(e, t, a) {
 21311              a ||= { unitsPerEm: 0, yMax: 0, yMin: 0, ascent: 0, descent: 0 };
 21312              let n = 0,
 21313                i = 0,
 21314                o = 0,
 21315                c = 0,
 21316                l = null,
 21317                h = 0,
 21318                u = -1;
 21319              if (t) {
 21320                for (let e in t) {
 21321                  e |= 0;
 21322                  (l > e || !l) && (l = e);
 21323                  h < e && (h = e);
 21324                  u = (0, s.getUnicodeRangeFor)(e, u);
 21325                  if (u < 32) n |= 1 << u;
 21326                  else if (u < 64) i |= 1 << (u - 32);
 21327                  else if (u < 96) o |= 1 << (u - 64);
 21328                  else {
 21329                    if (!(u < 123))
 21330                      throw new r.FormatError(
 21331                        "Unicode ranges Bits > 123 are reserved for internal usage",
 21332                      );
 21333                    c |= 1 << (u - 96);
 21334                  }
 21335                }
 21336                h > 65535 && (h = 65535);
 21337              } else {
 21338                l = 0;
 21339                h = 255;
 21340              }
 21341              const d = e.bbox || [0, 0, 0, 0],
 21342                f =
 21343                  a.unitsPerEm || 1 / (e.fontMatrix || r.FONT_IDENTITY_MATRIX)[0],
 21344                g = e.ascentScaled ? 1 : f / x,
 21345                p = a.ascent || Math.round(g * (e.ascent || d[3]));
 21346              let m = a.descent || Math.round(g * (e.descent || d[1]));
 21347              m > 0 && e.descent > 0 && d[1] < 0 && (m = -m);
 21348              const b = a.yMax || p,
 21349                y = -a.yMin || -m;
 21350              return (
 21351                "\0$ô\0\0\0Š»\0\0\0ŒŠ»\0\0ß\x001\0\0\0\0" +
 21352                String.fromCharCode(e.fixedPitch ? 9 : 0) +
 21353                "\0\0\0\0\0\0" +
 21354                (0, r.string32)(n) +
 21355                (0, r.string32)(i) +
 21356                (0, r.string32)(o) +
 21357                (0, r.string32)(c) +
 21358                "*21*" +
 21359                string16(e.italicAngle ? 1 : 0) +
 21360                string16(l || e.firstChar) +
 21361                string16(h || e.lastChar) +
 21362                string16(p) +
 21363                string16(m) +
 21364                "\0d" +
 21365                string16(b) +
 21366                string16(y) +
 21367                "\0\0\0\0\0\0\0\0" +
 21368                string16(e.xHeight) +
 21369                string16(e.capHeight) +
 21370                string16(0) +
 21371                string16(l || e.firstChar) +
 21372                "\0"
 21373              );
 21374            }
 21375            function createPostTable(e) {
 21376              const t = Math.floor(65536 * e.italicAngle);
 21377              return (
 21378                "\0\0\0" +
 21379                (0, r.string32)(t) +
 21380                "\0\0\0\0" +
 21381                (0, r.string32)(e.fixedPitch ? 1 : 0) +
 21382                "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
 21383              );
 21384            }
 21385            function createPostscriptName(e) {
 21386              return e.replaceAll(/[^\x21-\x7E]|[[\](){}<>/%]/g, "").slice(0, 63);
 21387            }
 21388            function createNameTable(e, t) {
 21389              t || (t = [[], []]);
 21390              const a = [
 21391                  t[0][0] || "Original licence",
 21392                  t[0][1] || e,
 21393                  t[0][2] || "Unknown",
 21394                  t[0][3] || "uniqueID",
 21395                  t[0][4] || e,
 21396                  t[0][5] || "Version 0.11",
 21397                  t[0][6] || createPostscriptName(e),
 21398                  t[0][7] || "Unknown",
 21399                  t[0][8] || "Unknown",
 21400                  t[0][9] || "Unknown",
 21401                ],
 21402                r = [];
 21403              let n, i, s, o, c;
 21404              for (n = 0, i = a.length; n < i; n++) {
 21405                c = t[1][n] || a[n];
 21406                const e = [];
 21407                for (s = 0, o = c.length; s < o; s++)
 21408                  e.push(string16(c.charCodeAt(s)));
 21409                r.push(e.join(""));
 21410              }
 21411              const l = [a, r],
 21412                h = ["\0", "\0"],
 21413                u = ["\0\0", "\0"],
 21414                d = ["\0\0", "\t"],
 21415                f = a.length * h.length;
 21416              let g = "\0\0" + string16(f) + string16(12 * f + 6),
 21417                p = 0;
 21418              for (n = 0, i = h.length; n < i; n++) {
 21419                const e = l[n];
 21420                for (s = 0, o = e.length; s < o; s++) {
 21421                  c = e[s];
 21422                  g +=
 21423                    h[n] +
 21424                    u[n] +
 21425                    d[n] +
 21426                    string16(s) +
 21427                    string16(c.length) +
 21428                    string16(p);
 21429                  p += c.length;
 21430                }
 21431              }
 21432              g += a.join("") + r.join("");
 21433              return g;
 21434            }
 21435            t.Font = class Font {
 21436              constructor(e, t, a) {
 21437                this.name = e;
 21438                this.psName = null;
 21439                this.mimetype = null;
 21440                this.disableFontFace = !1;
 21441                this.loadedName = a.loadedName;
 21442                this.isType3Font = a.isType3Font;
 21443                this.missingFile = !1;
 21444                this.cssFontInfo = a.cssFontInfo;
 21445                this._charsCache = Object.create(null);
 21446                this._glyphCache = Object.create(null);
 21447                let n = !!(a.flags & i.FontFlags.Serif);
 21448                if (!n && !a.isSimulatedFlags) {
 21449                  const t = e.replaceAll(/[,_]/g, "-").split("-")[0],
 21450                    a = (0, l.getSerifFonts)();
 21451                  for (const e of t.split("+"))
 21452                    if (a[e]) {
 21453                      n = !0;
 21454                      break;
 21455                    }
 21456                }
 21457                this.isSerifFont = n;
 21458                this.isSymbolicFont = !!(a.flags & i.FontFlags.Symbolic);
 21459                this.isMonospace = !!(a.flags & i.FontFlags.FixedPitch);
 21460                let { type: s, subtype: o } = a;
 21461                this.type = s;
 21462                this.subtype = o;
 21463                this.systemFontInfo = a.systemFontInfo;
 21464                const c = e.match(/^InvalidPDFjsFont_(.*)_\d+$/);
 21465                this.isInvalidPDFjsFont = !!c;
 21466                this.isInvalidPDFjsFont
 21467                  ? (this.fallbackName = c[1])
 21468                  : this.isMonospace
 21469                    ? (this.fallbackName = "monospace")
 21470                    : this.isSerifFont
 21471                      ? (this.fallbackName = "serif")
 21472                      : (this.fallbackName = "sans-serif");
 21473                if (this.systemFontInfo?.guessFallback) {
 21474                  this.systemFontInfo.guessFallback = !1;
 21475                  this.systemFontInfo.css += `,${this.fallbackName}`;
 21476                }
 21477                this.differences = a.differences;
 21478                this.widths = a.widths;
 21479                this.defaultWidth = a.defaultWidth;
 21480                this.composite = a.composite;
 21481                this.cMap = a.cMap;
 21482                this.capHeight = a.capHeight / x;
 21483                this.ascent = a.ascent / x;
 21484                this.descent = a.descent / x;
 21485                this.lineHeight = this.ascent - this.descent;
 21486                this.fontMatrix = a.fontMatrix;
 21487                this.bbox = a.bbox;
 21488                this.defaultEncoding = a.defaultEncoding;
 21489                this.toUnicode = a.toUnicode;
 21490                this.toFontChar = [];
 21491                if ("Type3" === a.type) {
 21492                  for (let e = 0; e < 256; e++)
 21493                    this.toFontChar[e] =
 21494                      this.differences[e] || a.defaultEncoding[e];
 21495                  return;
 21496                }
 21497                this.cidEncoding = a.cidEncoding || "";
 21498                this.vertical = !!a.vertical;
 21499                if (this.vertical) {
 21500                  this.vmetrics = a.vmetrics;
 21501                  this.defaultVMetrics = a.defaultVMetrics;
 21502                }
 21503                if (!t || t.isEmpty) {
 21504                  t &&
 21505                    (0, r.warn)(
 21506                      'Font file is empty in "' +
 21507                        e +
 21508                        '" (' +
 21509                        this.loadedName +
 21510                        ")",
 21511                    );
 21512                  this.fallbackToSystemFont(a);
 21513                  return;
 21514                }
 21515                [s, o] = getFontFileType(t, a);
 21516                (s === this.type && o === this.subtype) ||
 21517                  (0, r.info)(
 21518                    `Inconsistent font file Type/SubType, expected: ${this.type}/${this.subtype} but found: ${s}/${o}.`,
 21519                  );
 21520                let h;
 21521                try {
 21522                  switch (s) {
 21523                    case "MMType1":
 21524                      (0, r.info)(
 21525                        "MMType1 font (" + e + "), falling back to Type1.",
 21526                      );
 21527                    case "Type1":
 21528                    case "CIDFontType0":
 21529                      this.mimetype = "font/opentype";
 21530                      const n =
 21531                        "Type1C" === o || "CIDFontType0C" === o
 21532                          ? new u.CFFFont(t, a)
 21533                          : new w.Type1Font(e, t, a);
 21534                      adjustWidths(a);
 21535                      h = this.convert(e, n, a);
 21536                      break;
 21537                    case "OpenType":
 21538                    case "TrueType":
 21539                    case "CIDFontType2":
 21540                      this.mimetype = "font/opentype";
 21541                      h = this.checkAndRepair(e, t, a);
 21542                      if (this.isOpenType) {
 21543                        adjustWidths(a);
 21544                        s = "OpenType";
 21545                      }
 21546                      break;
 21547                    default:
 21548                      throw new r.FormatError(`Font ${s} is not supported`);
 21549                  }
 21550                } catch (e) {
 21551                  (0, r.warn)(e);
 21552                  this.fallbackToSystemFont(a);
 21553                  return;
 21554                }
 21555                amendFallbackToUnicode(a);
 21556                this.data = h;
 21557                this.type = s;
 21558                this.subtype = o;
 21559                this.fontMatrix = a.fontMatrix;
 21560                this.widths = a.widths;
 21561                this.defaultWidth = a.defaultWidth;
 21562                this.toUnicode = a.toUnicode;
 21563                this.seacMap = a.seacMap;
 21564              }
 21565              get renderer() {
 21566                const e = d.FontRendererFactory.create(
 21567                  this,
 21568                  i.SEAC_ANALYSIS_ENABLED,
 21569                );
 21570                return (0, r.shadow)(this, "renderer", e);
 21571              }
 21572              exportData(e = !1) {
 21573                const t = e ? [...C, ...k] : C,
 21574                  a = Object.create(null);
 21575                let r, n;
 21576                for (r of t) {
 21577                  n = this[r];
 21578                  void 0 !== n && (a[r] = n);
 21579                }
 21580                return a;
 21581              }
 21582              fallbackToSystemFont(e) {
 21583                this.missingFile = !0;
 21584                const { name: t, type: a } = this;
 21585                let r = (0, i.normalizeFontName)(t);
 21586                const n = (0, l.getStdFontMap)(),
 21587                  u = (0, l.getNonStdFontMap)(),
 21588                  d = !!n[r],
 21589                  g = !(!u[r] || !n[u[r]]);
 21590                r = n[r] || u[r] || r;
 21591                const p = (0, f.getFontBasicMetrics)()[r];
 21592                if (p) {
 21593                  isNaN(this.ascent) && (this.ascent = p.ascent / x);
 21594                  isNaN(this.descent) && (this.descent = p.descent / x);
 21595                  isNaN(this.capHeight) && (this.capHeight = p.capHeight / x);
 21596                }
 21597                this.bold = /bold/gi.test(r);
 21598                this.italic = /oblique|italic/gi.test(r);
 21599                this.black = /Black/g.test(t);
 21600                const m = /Narrow/g.test(t);
 21601                this.remeasure = (!d || m) && Object.keys(this.widths).length > 0;
 21602                if (
 21603                  (d || g) &&
 21604                  "CIDFontType2" === a &&
 21605                  this.cidEncoding.startsWith("Identity-")
 21606                ) {
 21607                  const a = e.cidToGidMap,
 21608                    r = [];
 21609                  applyStandardFontGlyphMap(
 21610                    r,
 21611                    (0, l.getGlyphMapForStandardFonts)(),
 21612                  );
 21613                  /Arial-?Black/i.test(t)
 21614                    ? applyStandardFontGlyphMap(
 21615                        r,
 21616                        (0, l.getSupplementalGlyphMapForArialBlack)(),
 21617                      )
 21618                    : /Calibri/i.test(t) &&
 21619                      applyStandardFontGlyphMap(
 21620                        r,
 21621                        (0, l.getSupplementalGlyphMapForCalibri)(),
 21622                      );
 21623                  if (a) {
 21624                    for (const e in r) {
 21625                      const t = r[e];
 21626                      void 0 !== a[t] && (r[+e] = a[t]);
 21627                    }
 21628                    a.length !== this.toUnicode.length &&
 21629                      e.hasIncludedToUnicodeMap &&
 21630                      this.toUnicode instanceof h.IdentityToUnicodeMap &&
 21631                      this.toUnicode.forEach(function (e, t) {
 21632                        const n = r[e];
 21633                        void 0 === a[n] && (r[+e] = t);
 21634                      });
 21635                  }
 21636                  this.toUnicode instanceof h.IdentityToUnicodeMap ||
 21637                    this.toUnicode.forEach(function (e, t) {
 21638                      r[+e] = t;
 21639                    });
 21640                  this.toFontChar = r;
 21641                  this.toUnicode = new h.ToUnicodeMap(r);
 21642                } else if (/Symbol/i.test(r))
 21643                  this.toFontChar = buildToFontChar(
 21644                    c.SymbolSetEncoding,
 21645                    (0, o.getGlyphsUnicode)(),
 21646                    this.differences,
 21647                  );
 21648                else if (/Dingbats/i.test(r))
 21649                  this.toFontChar = buildToFontChar(
 21650                    c.ZapfDingbatsEncoding,
 21651                    (0, o.getDingbatsGlyphsUnicode)(),
 21652                    this.differences,
 21653                  );
 21654                else if (d) {
 21655                  const e = buildToFontChar(
 21656                    this.defaultEncoding,
 21657                    (0, o.getGlyphsUnicode)(),
 21658                    this.differences,
 21659                  );
 21660                  "CIDFontType2" !== a ||
 21661                    this.cidEncoding.startsWith("Identity-") ||
 21662                    this.toUnicode instanceof h.IdentityToUnicodeMap ||
 21663                    this.toUnicode.forEach(function (t, a) {
 21664                      e[+t] = a;
 21665                    });
 21666                  this.toFontChar = e;
 21667                } else {
 21668                  const e = (0, o.getGlyphsUnicode)(),
 21669                    a = [];
 21670                  this.toUnicode.forEach((t, r) => {
 21671                    if (!this.composite) {
 21672                      const a = this.differences[t] || this.defaultEncoding[t],
 21673                        n = (0, s.getUnicodeForGlyph)(a, e);
 21674                      -1 !== n && (r = n);
 21675                    }
 21676                    a[+t] = r;
 21677                  });
 21678                  this.composite &&
 21679                    this.toUnicode instanceof h.IdentityToUnicodeMap &&
 21680                    /Tahoma|Verdana/i.test(t) &&
 21681                    applyStandardFontGlyphMap(
 21682                      a,
 21683                      (0, l.getGlyphMapForStandardFonts)(),
 21684                    );
 21685                  this.toFontChar = a;
 21686                }
 21687                amendFallbackToUnicode(e);
 21688                this.loadedName = r.split("-")[0];
 21689              }
 21690              checkAndRepair(e, t, a) {
 21691                const s = [
 21692                  "OS/2",
 21693                  "cmap",
 21694                  "head",
 21695                  "hhea",
 21696                  "hmtx",
 21697                  "maxp",
 21698                  "name",
 21699                  "post",
 21700                  "loca",
 21701                  "glyf",
 21702                  "fpgm",
 21703                  "prep",
 21704                  "cvt ",
 21705                  "CFF ",
 21706                ];
 21707                function readTables(e, t) {
 21708                  const a = Object.create(null);
 21709                  a["OS/2"] = null;
 21710                  a.cmap = null;
 21711                  a.head = null;
 21712                  a.hhea = null;
 21713                  a.hmtx = null;
 21714                  a.maxp = null;
 21715                  a.name = null;
 21716                  a.post = null;
 21717                  for (let r = 0; r < t; r++) {
 21718                    const t = readTableEntry(e);
 21719                    s.includes(t.tag) && 0 !== t.length && (a[t.tag] = t);
 21720                  }
 21721                  return a;
 21722                }
 21723                function readTableEntry(e) {
 21724                  const t = e.getString(4),
 21725                    a = e.getInt32() >>> 0,
 21726                    r = e.getInt32() >>> 0,
 21727                    n = e.getInt32() >>> 0,
 21728                    i = e.pos;
 21729                  e.pos = e.start || 0;
 21730                  e.skip(r);
 21731                  const s = e.getBytes(n);
 21732                  e.pos = i;
 21733                  if ("head" === t) {
 21734                    s[8] = s[9] = s[10] = s[11] = 0;
 21735                    s[17] |= 32;
 21736                  }
 21737                  return { tag: t, checksum: a, length: n, offset: r, data: s };
 21738                }
 21739                function readOpenTypeHeader(e) {
 21740                  return {
 21741                    version: e.getString(4),
 21742                    numTables: e.getUint16(),
 21743                    searchRange: e.getUint16(),
 21744                    entrySelector: e.getUint16(),
 21745                    rangeShift: e.getUint16(),
 21746                  };
 21747                }
 21748                function sanitizeGlyph(e, t, a, r, n, i) {
 21749                  const s = { length: 0, sizeOfInstructions: 0 };
 21750                  if (t < 0 || t >= e.length || a > e.length || a - t <= 12)
 21751                    return s;
 21752                  const o = e.subarray(t, a),
 21753                    c = signedInt16(o[2], o[3]),
 21754                    l = signedInt16(o[4], o[5]),
 21755                    h = signedInt16(o[6], o[7]),
 21756                    u = signedInt16(o[8], o[9]);
 21757                  if (c > h) {
 21758                    writeSignedInt16(o, 2, h);
 21759                    writeSignedInt16(o, 6, c);
 21760                  }
 21761                  if (l > u) {
 21762                    writeSignedInt16(o, 4, u);
 21763                    writeSignedInt16(o, 8, l);
 21764                  }
 21765                  const d = signedInt16(o[0], o[1]);
 21766                  if (d < 0) {
 21767                    if (d < -1) return s;
 21768                    r.set(o, n);
 21769                    s.length = o.length;
 21770                    return s;
 21771                  }
 21772                  let f,
 21773                    g = 10,
 21774                    p = 0;
 21775                  for (f = 0; f < d; f++) {
 21776                    p = ((o[g] << 8) | o[g + 1]) + 1;
 21777                    g += 2;
 21778                  }
 21779                  const m = g,
 21780                    b = (o[g] << 8) | o[g + 1];
 21781                  s.sizeOfInstructions = b;
 21782                  g += 2 + b;
 21783                  const y = g;
 21784                  let w = 0;
 21785                  for (f = 0; f < p; f++) {
 21786                    const e = o[g++];
 21787                    192 & e && (o[g - 1] = 63 & e);
 21788                    let t = 2;
 21789                    2 & e ? (t = 1) : 16 & e && (t = 0);
 21790                    let a = 2;
 21791                    4 & e ? (a = 1) : 32 & e && (a = 0);
 21792                    const r = t + a;
 21793                    w += r;
 21794                    if (8 & e) {
 21795                      const e = o[g++];
 21796                      0 === e && (o[g - 1] ^= 8);
 21797                      f += e;
 21798                      w += e * r;
 21799                    }
 21800                  }
 21801                  if (0 === w) return s;
 21802                  let S = g + w;
 21803                  if (S > o.length) return s;
 21804                  if (!i && b > 0) {
 21805                    r.set(o.subarray(0, m), n);
 21806                    r.set([0, 0], n + m);
 21807                    r.set(o.subarray(y, S), n + m + 2);
 21808                    S -= b;
 21809                    o.length - S > 3 && (S = (S + 3) & -4);
 21810                    s.length = S;
 21811                    return s;
 21812                  }
 21813                  if (o.length - S > 3) {
 21814                    S = (S + 3) & -4;
 21815                    r.set(o.subarray(0, S), n);
 21816                    s.length = S;
 21817                    return s;
 21818                  }
 21819                  r.set(o, n);
 21820                  s.length = o.length;
 21821                  return s;
 21822                }
 21823                function readNameTable(e) {
 21824                  const a = (t.start || 0) + e.offset;
 21825                  t.pos = a;
 21826                  const r = [[], []],
 21827                    n = [],
 21828                    i = e.length,
 21829                    s = a + i;
 21830                  if (0 !== t.getUint16() || i < 6) return [r, n];
 21831                  const o = t.getUint16(),
 21832                    c = t.getUint16();
 21833                  let l, h;
 21834                  for (l = 0; l < o && t.pos + 12 <= s; l++) {
 21835                    const e = {
 21836                      platform: t.getUint16(),
 21837                      encoding: t.getUint16(),
 21838                      language: t.getUint16(),
 21839                      name: t.getUint16(),
 21840                      length: t.getUint16(),
 21841                      offset: t.getUint16(),
 21842                    };
 21843                    (isMacNameRecord(e) || isWinNameRecord(e)) && n.push(e);
 21844                  }
 21845                  for (l = 0, h = n.length; l < h; l++) {
 21846                    const e = n[l];
 21847                    if (e.length <= 0) continue;
 21848                    const i = a + c + e.offset;
 21849                    if (i + e.length > s) continue;
 21850                    t.pos = i;
 21851                    const o = e.name;
 21852                    if (e.encoding) {
 21853                      let a = "";
 21854                      for (let r = 0, n = e.length; r < n; r += 2)
 21855                        a += String.fromCharCode(t.getUint16());
 21856                      r[1][o] = a;
 21857                    } else r[0][o] = t.getString(e.length);
 21858                  }
 21859                  return [r, n];
 21860                }
 21861                const l = [
 21862                  0, 0, 0, 0, 0, 0, 0, 0, -2, -2, -2, -2, 0, 0, -2, -5, -1, -1,
 21863                  -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, -1, -1, 1, -1,
 21864                  -999, 0, 1, 0, -1, -2, 0, -1, -2, -1, -1, 0, -1, -1, 0, 0, -999,
 21865                  -999, -1, -1, -1, -1, -2, -999, -2, -2, -999, 0, -2, -2, 0, 0,
 21866                  -2, 0, -2, 0, 0, 0, -2, -1, -1, 1, 1, 0, 0, -1, -1, -1, -1, -1,
 21867                  -1, -1, 0, 0, -1, 0, -1, -1, 0, -999, -1, -1, -1, -1, -1, -1, 0,
 21868                  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -999, -999, -999, -999,
 21869                  -999, -1, -1, -2, -2, 0, 0, 0, 0, -1, -1, -999, -2, -2, 0, 0,
 21870                  -1, -2, -2, 0, 0, 0, -1, -1, -1, -2,
 21871                ];
 21872                function sanitizeTTProgram(e, t) {
 21873                  let a,
 21874                    n,
 21875                    i,
 21876                    s,
 21877                    o,
 21878                    c = e.data,
 21879                    h = 0,
 21880                    u = 0,
 21881                    d = 0;
 21882                  const f = [],
 21883                    g = [],
 21884                    p = [];
 21885                  let m = t.tooComplexToFollowFunctions,
 21886                    b = !1,
 21887                    y = 0,
 21888                    w = 0;
 21889                  for (let e = c.length; h < e; ) {
 21890                    const e = c[h++];
 21891                    if (64 === e) {
 21892                      n = c[h++];
 21893                      if (b || w) h += n;
 21894                      else for (a = 0; a < n; a++) f.push(c[h++]);
 21895                    } else if (65 === e) {
 21896                      n = c[h++];
 21897                      if (b || w) h += 2 * n;
 21898                      else
 21899                        for (a = 0; a < n; a++) {
 21900                          i = c[h++];
 21901                          f.push((i << 8) | c[h++]);
 21902                        }
 21903                    } else if (176 == (248 & e)) {
 21904                      n = e - 176 + 1;
 21905                      if (b || w) h += n;
 21906                      else for (a = 0; a < n; a++) f.push(c[h++]);
 21907                    } else if (184 == (248 & e)) {
 21908                      n = e - 184 + 1;
 21909                      if (b || w) h += 2 * n;
 21910                      else
 21911                        for (a = 0; a < n; a++) {
 21912                          i = c[h++];
 21913                          f.push((i << 8) | c[h++]);
 21914                        }
 21915                    } else if (43 !== e || m)
 21916                      if (44 !== e || m) {
 21917                        if (45 === e)
 21918                          if (b) {
 21919                            b = !1;
 21920                            u = h;
 21921                          } else {
 21922                            o = g.pop();
 21923                            if (!o) {
 21924                              (0, r.warn)("TT: ENDF bad stack");
 21925                              t.hintsValid = !1;
 21926                              return;
 21927                            }
 21928                            s = p.pop();
 21929                            c = o.data;
 21930                            h = o.i;
 21931                            t.functionsStackDeltas[s] = f.length - o.stackTop;
 21932                          }
 21933                        else if (137 === e) {
 21934                          if (b || w) {
 21935                            (0, r.warn)("TT: nested IDEFs not allowed");
 21936                            m = !0;
 21937                          }
 21938                          b = !0;
 21939                          d = h;
 21940                        } else if (88 === e) ++y;
 21941                        else if (27 === e) w = y;
 21942                        else if (89 === e) {
 21943                          w === y && (w = 0);
 21944                          --y;
 21945                        } else if (28 === e && !b && !w) {
 21946                          const e = f.at(-1);
 21947                          e > 0 && (h += e - 1);
 21948                        }
 21949                      } else {
 21950                        if (b || w) {
 21951                          (0, r.warn)("TT: nested FDEFs not allowed");
 21952                          m = !0;
 21953                        }
 21954                        b = !0;
 21955                        d = h;
 21956                        s = f.pop();
 21957                        t.functionsDefined[s] = { data: c, i: h };
 21958                      }
 21959                    else if (!b && !w) {
 21960                      s = f.at(-1);
 21961                      if (isNaN(s))
 21962                        (0, r.info)("TT: CALL empty stack (or invalid entry).");
 21963                      else {
 21964                        t.functionsUsed[s] = !0;
 21965                        if (s in t.functionsStackDeltas) {
 21966                          const e = f.length + t.functionsStackDeltas[s];
 21967                          if (e < 0) {
 21968                            (0, r.warn)(
 21969                              "TT: CALL invalid functions stack delta.",
 21970                            );
 21971                            t.hintsValid = !1;
 21972                            return;
 21973                          }
 21974                          f.length = e;
 21975                        } else if (s in t.functionsDefined && !p.includes(s)) {
 21976                          g.push({ data: c, i: h, stackTop: f.length - 1 });
 21977                          p.push(s);
 21978                          o = t.functionsDefined[s];
 21979                          if (!o) {
 21980                            (0, r.warn)("TT: CALL non-existent function");
 21981                            t.hintsValid = !1;
 21982                            return;
 21983                          }
 21984                          c = o.data;
 21985                          h = o.i;
 21986                        }
 21987                      }
 21988                    }
 21989                    if (!b && !w) {
 21990                      let t = 0;
 21991                      e <= 142
 21992                        ? (t = l[e])
 21993                        : e >= 192 && e <= 223
 21994                          ? (t = -1)
 21995                          : e >= 224 && (t = -2);
 21996                      if (e >= 113 && e <= 117) {
 21997                        n = f.pop();
 21998                        isNaN(n) || (t = 2 * -n);
 21999                      }
 22000                      for (; t < 0 && f.length > 0; ) {
 22001                        f.pop();
 22002                        t++;
 22003                      }
 22004                      for (; t > 0; ) {
 22005                        f.push(NaN);
 22006                        t--;
 22007                      }
 22008                    }
 22009                  }
 22010                  t.tooComplexToFollowFunctions = m;
 22011                  const S = [c];
 22012                  h > c.length && S.push(new Uint8Array(h - c.length));
 22013                  if (d > u) {
 22014                    (0, r.warn)("TT: complementing a missing function tail");
 22015                    S.push(new Uint8Array([34, 45]));
 22016                  }
 22017                  !(function foldTTTable(e, t) {
 22018                    if (t.length > 1) {
 22019                      let a,
 22020                        r,
 22021                        n = 0;
 22022                      for (a = 0, r = t.length; a < r; a++) n += t[a].length;
 22023                      n = (n + 3) & -4;
 22024                      const i = new Uint8Array(n);
 22025                      let s = 0;
 22026                      for (a = 0, r = t.length; a < r; a++) {
 22027                        i.set(t[a], s);
 22028                        s += t[a].length;
 22029                      }
 22030                      e.data = i;
 22031                      e.length = n;
 22032                    }
 22033                  })(e, S);
 22034                }
 22035                let d, f, b, w;
 22036                if (
 22037                  isTrueTypeCollectionFile(
 22038                    (t = new y.Stream(new Uint8Array(t.getBytes()))),
 22039                  )
 22040                ) {
 22041                  const e = (function readTrueTypeCollectionData(e, t) {
 22042                    const { numFonts: a, offsetTable: n } =
 22043                        (function readTrueTypeCollectionHeader(e) {
 22044                          const t = e.getString(4);
 22045                          (0, r.assert)(
 22046                            "ttcf" === t,
 22047                            "Must be a TrueType Collection font.",
 22048                          );
 22049                          const a = e.getUint16(),
 22050                            n = e.getUint16(),
 22051                            i = e.getInt32() >>> 0,
 22052                            s = [];
 22053                          for (let t = 0; t < i; t++) s.push(e.getInt32() >>> 0);
 22054                          const o = {
 22055                            ttcTag: t,
 22056                            majorVersion: a,
 22057                            minorVersion: n,
 22058                            numFonts: i,
 22059                            offsetTable: s,
 22060                          };
 22061                          switch (a) {
 22062                            case 1:
 22063                              return o;
 22064                            case 2:
 22065                              o.dsigTag = e.getInt32() >>> 0;
 22066                              o.dsigLength = e.getInt32() >>> 0;
 22067                              o.dsigOffset = e.getInt32() >>> 0;
 22068                              return o;
 22069                          }
 22070                          throw new r.FormatError(
 22071                            `Invalid TrueType Collection majorVersion: ${a}.`,
 22072                          );
 22073                        })(e),
 22074                      i = t.split("+");
 22075                    let s;
 22076                    for (let o = 0; o < a; o++) {
 22077                      e.pos = (e.start || 0) + n[o];
 22078                      const a = readOpenTypeHeader(e),
 22079                        c = readTables(e, a.numTables);
 22080                      if (!c.name)
 22081                        throw new r.FormatError(
 22082                          'TrueType Collection font must contain a "name" table.',
 22083                        );
 22084                      const [l] = readNameTable(c.name);
 22085                      for (let e = 0, r = l.length; e < r; e++)
 22086                        for (let r = 0, n = l[e].length; r < n; r++) {
 22087                          const n = l[e][r]?.replaceAll(/\s/g, "");
 22088                          if (n) {
 22089                            if (n === t) return { header: a, tables: c };
 22090                            if (!(i.length < 2))
 22091                              for (const e of i)
 22092                                n === e &&
 22093                                  (s = { name: e, header: a, tables: c });
 22094                          }
 22095                        }
 22096                    }
 22097                    if (s) {
 22098                      (0, r.warn)(
 22099                        `TrueType Collection does not contain "${t}" font, falling back to "${s.name}" font instead.`,
 22100                      );
 22101                      return { header: s.header, tables: s.tables };
 22102                    }
 22103                    throw new r.FormatError(
 22104                      `TrueType Collection does not contain "${t}" font.`,
 22105                    );
 22106                  })(t, this.name);
 22107                  d = e.header;
 22108                  f = e.tables;
 22109                } else {
 22110                  d = readOpenTypeHeader(t);
 22111                  f = readTables(t, d.numTables);
 22112                }
 22113                const S = !f["CFF "];
 22114                if (S) {
 22115                  if (!f.loca)
 22116                    throw new r.FormatError('Required "loca" table is not found');
 22117                  if (!f.glyf) {
 22118                    (0, r.warn)(
 22119                      'Required "glyf" table is not found -- trying to recover.',
 22120                    );
 22121                    f.glyf = { tag: "glyf", data: new Uint8Array(0) };
 22122                  }
 22123                  this.isOpenType = !1;
 22124                } else {
 22125                  const t =
 22126                    a.composite &&
 22127                    (a.cidToGidMap?.length > 0 ||
 22128                      !(a.cMap instanceof p.IdentityCMap));
 22129                  if (
 22130                    ("OTTO" === d.version && !t) ||
 22131                    !f.head ||
 22132                    !f.hhea ||
 22133                    !f.maxp ||
 22134                    !f.post
 22135                  ) {
 22136                    w = new y.Stream(f["CFF "].data);
 22137                    b = new u.CFFFont(w, a);
 22138                    adjustWidths(a);
 22139                    return this.convert(e, b, a);
 22140                  }
 22141                  delete f.glyf;
 22142                  delete f.loca;
 22143                  delete f.fpgm;
 22144                  delete f.prep;
 22145                  delete f["cvt "];
 22146                  this.isOpenType = !0;
 22147                }
 22148                if (!f.maxp)
 22149                  throw new r.FormatError('Required "maxp" table is not found');
 22150                t.pos = (t.start || 0) + f.maxp.offset;
 22151                const x = t.getInt32(),
 22152                  C = t.getUint16();
 22153                if (a.scaleFactors?.length === C && S) {
 22154                  const { scaleFactors: e } = a,
 22155                    t = int16(f.head.data[50], f.head.data[51]),
 22156                    r = new g.GlyfTable({
 22157                      glyfTable: f.glyf.data,
 22158                      isGlyphLocationsLong: t,
 22159                      locaTable: f.loca.data,
 22160                      numGlyphs: C,
 22161                    });
 22162                  r.scale(e);
 22163                  const { glyf: n, loca: i, isLocationLong: s } = r.write();
 22164                  f.glyf.data = n;
 22165                  f.loca.data = i;
 22166                  if (s !== !!t) {
 22167                    f.head.data[50] = 0;
 22168                    f.head.data[51] = s ? 1 : 0;
 22169                  }
 22170                  const o = f.hmtx.data;
 22171                  for (let t = 0; t < C; t++) {
 22172                    const a = 4 * t,
 22173                      r = Math.round(e[t] * int16(o[a], o[a + 1]));
 22174                    o[a] = (r >> 8) & 255;
 22175                    o[a + 1] = 255 & r;
 22176                    writeSignedInt16(
 22177                      o,
 22178                      a + 2,
 22179                      Math.round(e[t] * signedInt16(o[a + 2], o[a + 3])),
 22180                    );
 22181                  }
 22182                }
 22183                let k = C + 1,
 22184                  v = !0;
 22185                if (k > 65535) {
 22186                  v = !1;
 22187                  k = C;
 22188                  (0, r.warn)(
 22189                    "Not enough space in glyfs to duplicate first glyph.",
 22190                  );
 22191                }
 22192                let F = 0,
 22193                  O = 0;
 22194                if (x >= 65536 && f.maxp.length >= 22) {
 22195                  t.pos += 8;
 22196                  if (t.getUint16() > 2) {
 22197                    f.maxp.data[14] = 0;
 22198                    f.maxp.data[15] = 2;
 22199                  }
 22200                  t.pos += 4;
 22201                  F = t.getUint16();
 22202                  t.pos += 4;
 22203                  O = t.getUint16();
 22204                }
 22205                f.maxp.data[4] = k >> 8;
 22206                f.maxp.data[5] = 255 & k;
 22207                const T = (function sanitizeTTPrograms(e, t, a, n) {
 22208                  const i = {
 22209                    functionsDefined: [],
 22210                    functionsUsed: [],
 22211                    functionsStackDeltas: [],
 22212                    tooComplexToFollowFunctions: !1,
 22213                    hintsValid: !0,
 22214                  };
 22215                  e && sanitizeTTProgram(e, i);
 22216                  t && sanitizeTTProgram(t, i);
 22217                  e &&
 22218                    (function checkInvalidFunctions(e, t) {
 22219                      if (!e.tooComplexToFollowFunctions)
 22220                        if (e.functionsDefined.length > t) {
 22221                          (0, r.warn)("TT: more functions defined than expected");
 22222                          e.hintsValid = !1;
 22223                        } else
 22224                          for (
 22225                            let a = 0, n = e.functionsUsed.length;
 22226                            a < n;
 22227                            a++
 22228                          ) {
 22229                            if (a > t) {
 22230                              (0, r.warn)("TT: invalid function id: " + a);
 22231                              e.hintsValid = !1;
 22232                              return;
 22233                            }
 22234                            if (e.functionsUsed[a] && !e.functionsDefined[a]) {
 22235                              (0, r.warn)("TT: undefined function: " + a);
 22236                              e.hintsValid = !1;
 22237                              return;
 22238                            }
 22239                          }
 22240                    })(i, n);
 22241                  if (a && 1 & a.length) {
 22242                    const e = new Uint8Array(a.length + 1);
 22243                    e.set(a.data);
 22244                    a.data = e;
 22245                  }
 22246                  return i.hintsValid;
 22247                })(f.fpgm, f.prep, f["cvt "], F);
 22248                if (!T) {
 22249                  delete f.fpgm;
 22250                  delete f.prep;
 22251                  delete f["cvt "];
 22252                }
 22253                !(function sanitizeMetrics(e, t, a, n, i, s) {
 22254                  if (!t) {
 22255                    a && (a.data = null);
 22256                    return;
 22257                  }
 22258                  e.pos = (e.start || 0) + t.offset;
 22259                  e.pos += 4;
 22260                  e.pos += 2;
 22261                  e.pos += 2;
 22262                  e.pos += 2;
 22263                  e.pos += 2;
 22264                  e.pos += 2;
 22265                  e.pos += 2;
 22266                  e.pos += 2;
 22267                  e.pos += 2;
 22268                  e.pos += 2;
 22269                  const o = e.getUint16();
 22270                  e.pos += 8;
 22271                  e.pos += 2;
 22272                  let c = e.getUint16();
 22273                  if (0 !== o) {
 22274                    if (!(2 & int16(n.data[44], n.data[45]))) {
 22275                      t.data[22] = 0;
 22276                      t.data[23] = 0;
 22277                    }
 22278                  }
 22279                  if (c > i) {
 22280                    (0, r.info)(
 22281                      `The numOfMetrics (${c}) should not be greater than the numGlyphs (${i}).`,
 22282                    );
 22283                    c = i;
 22284                    t.data[34] = (65280 & c) >> 8;
 22285                    t.data[35] = 255 & c;
 22286                  }
 22287                  const l = i - c - ((a.length - 4 * c) >> 1);
 22288                  if (l > 0) {
 22289                    const e = new Uint8Array(a.length + 2 * l);
 22290                    e.set(a.data);
 22291                    if (s) {
 22292                      e[a.length] = a.data[2];
 22293                      e[a.length + 1] = a.data[3];
 22294                    }
 22295                    a.data = e;
 22296                  }
 22297                })(t, f.hhea, f.hmtx, f.head, k, v);
 22298                if (!f.head)
 22299                  throw new r.FormatError('Required "head" table is not found');
 22300                !(function sanitizeHead(e, t, a) {
 22301                  const n = e.data,
 22302                    i = (function int32(e, t, a, r) {
 22303                      return (e << 24) + (t << 16) + (a << 8) + r;
 22304                    })(n[0], n[1], n[2], n[3]);
 22305                  if (i >> 16 != 1) {
 22306                    (0, r.info)(
 22307                      "Attempting to fix invalid version in head table: " + i,
 22308                    );
 22309                    n[0] = 0;
 22310                    n[1] = 1;
 22311                    n[2] = 0;
 22312                    n[3] = 0;
 22313                  }
 22314                  const s = int16(n[50], n[51]);
 22315                  if (s < 0 || s > 1) {
 22316                    (0, r.info)(
 22317                      "Attempting to fix invalid indexToLocFormat in head table: " +
 22318                        s,
 22319                    );
 22320                    const e = t + 1;
 22321                    if (a === e << 1) {
 22322                      n[50] = 0;
 22323                      n[51] = 0;
 22324                    } else {
 22325                      if (a !== e << 2)
 22326                        throw new r.FormatError(
 22327                          "Could not fix indexToLocFormat: " + s,
 22328                        );
 22329                      n[50] = 0;
 22330                      n[51] = 1;
 22331                    }
 22332                  }
 22333                })(f.head, C, S ? f.loca.length : 0);
 22334                let M = Object.create(null);
 22335                if (S) {
 22336                  const e = int16(f.head.data[50], f.head.data[51]),
 22337                    t = (function sanitizeGlyphLocations(e, t, a, r, n, i, s) {
 22338                      let o, c, l;
 22339                      if (r) {
 22340                        o = 4;
 22341                        c = function fontItemDecodeLong(e, t) {
 22342                          return (
 22343                            (e[t] << 24) |
 22344                            (e[t + 1] << 16) |
 22345                            (e[t + 2] << 8) |
 22346                            e[t + 3]
 22347                          );
 22348                        };
 22349                        l = function fontItemEncodeLong(e, t, a) {
 22350                          e[t] = (a >>> 24) & 255;
 22351                          e[t + 1] = (a >> 16) & 255;
 22352                          e[t + 2] = (a >> 8) & 255;
 22353                          e[t + 3] = 255 & a;
 22354                        };
 22355                      } else {
 22356                        o = 2;
 22357                        c = function fontItemDecode(e, t) {
 22358                          return (e[t] << 9) | (e[t + 1] << 1);
 22359                        };
 22360                        l = function fontItemEncode(e, t, a) {
 22361                          e[t] = (a >> 9) & 255;
 22362                          e[t + 1] = (a >> 1) & 255;
 22363                        };
 22364                      }
 22365                      const h = i ? a + 1 : a,
 22366                        u = o * (1 + h),
 22367                        d = new Uint8Array(u);
 22368                      d.set(e.data.subarray(0, u));
 22369                      e.data = d;
 22370                      const f = t.data,
 22371                        g = f.length,
 22372                        p = new Uint8Array(g);
 22373                      let m, b;
 22374                      const y = [];
 22375                      for (m = 0, b = 0; m < a + 1; m++, b += o) {
 22376                        let e = c(d, b);
 22377                        e > g && (e = g);
 22378                        y.push({ index: m, offset: e, endOffset: 0 });
 22379                      }
 22380                      y.sort((e, t) => e.offset - t.offset);
 22381                      for (m = 0; m < a; m++) y[m].endOffset = y[m + 1].offset;
 22382                      y.sort((e, t) => e.index - t.index);
 22383                      for (m = 0; m < a; m++) {
 22384                        const { offset: e, endOffset: t } = y[m];
 22385                        if (0 !== e || 0 !== t) break;
 22386                        const a = y[m + 1].offset;
 22387                        if (0 !== a) {
 22388                          y[m].endOffset = a;
 22389                          break;
 22390                        }
 22391                      }
 22392                      const w = Object.create(null);
 22393                      let S = 0;
 22394                      l(d, 0, S);
 22395                      for (m = 0, b = o; m < a; m++, b += o) {
 22396                        const e = sanitizeGlyph(
 22397                            f,
 22398                            y[m].offset,
 22399                            y[m].endOffset,
 22400                            p,
 22401                            S,
 22402                            n,
 22403                          ),
 22404                          t = e.length;
 22405                        0 === t && (w[m] = !0);
 22406                        e.sizeOfInstructions > s && (s = e.sizeOfInstructions);
 22407                        S += t;
 22408                        l(d, b, S);
 22409                      }
 22410                      if (0 === S) {
 22411                        const e = new Uint8Array([
 22412                          0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0,
 22413                        ]);
 22414                        for (m = 0, b = o; m < h; m++, b += o) l(d, b, e.length);
 22415                        t.data = e;
 22416                      } else if (i) {
 22417                        const a = c(d, o);
 22418                        if (p.length > a + S) t.data = p.subarray(0, a + S);
 22419                        else {
 22420                          t.data = new Uint8Array(a + S);
 22421                          t.data.set(p.subarray(0, S));
 22422                        }
 22423                        t.data.set(p.subarray(0, a), S);
 22424                        l(e.data, d.length - o, S + a);
 22425                      } else t.data = p.subarray(0, S);
 22426                      return { missingGlyphs: w, maxSizeOfInstructions: s };
 22427                    })(f.loca, f.glyf, C, e, T, v, O);
 22428                  M = t.missingGlyphs;
 22429                  if (x >= 65536 && f.maxp.length >= 22) {
 22430                    f.maxp.data[26] = t.maxSizeOfInstructions >> 8;
 22431                    f.maxp.data[27] = 255 & t.maxSizeOfInstructions;
 22432                  }
 22433                }
 22434                if (!f.hhea)
 22435                  throw new r.FormatError('Required "hhea" table is not found');
 22436                if (0 === f.hhea.data[10] && 0 === f.hhea.data[11]) {
 22437                  f.hhea.data[10] = 255;
 22438                  f.hhea.data[11] = 255;
 22439                }
 22440                const D = {
 22441                  unitsPerEm: int16(f.head.data[18], f.head.data[19]),
 22442                  yMax: signedInt16(f.head.data[42], f.head.data[43]),
 22443                  yMin: signedInt16(f.head.data[38], f.head.data[39]),
 22444                  ascent: signedInt16(f.hhea.data[4], f.hhea.data[5]),
 22445                  descent: signedInt16(f.hhea.data[6], f.hhea.data[7]),
 22446                  lineGap: signedInt16(f.hhea.data[8], f.hhea.data[9]),
 22447                };
 22448                this.ascent = D.ascent / D.unitsPerEm;
 22449                this.descent = D.descent / D.unitsPerEm;
 22450                this.lineGap = D.lineGap / D.unitsPerEm;
 22451                if (this.cssFontInfo?.lineHeight) {
 22452                  this.lineHeight = this.cssFontInfo.metrics.lineHeight;
 22453                  this.lineGap = this.cssFontInfo.metrics.lineGap;
 22454                } else
 22455                  this.lineHeight = this.ascent - this.descent + this.lineGap;
 22456                f.post &&
 22457                  (function readPostScriptTable(e, a, n) {
 22458                    const s = (t.start || 0) + e.offset;
 22459                    t.pos = s;
 22460                    const o = s + e.length,
 22461                      c = t.getInt32();
 22462                    t.skip(28);
 22463                    let l,
 22464                      h,
 22465                      u = !0;
 22466                    switch (c) {
 22467                      case 65536:
 22468                        l = i.MacStandardGlyphOrdering;
 22469                        break;
 22470                      case 131072:
 22471                        const e = t.getUint16();
 22472                        if (e !== n) {
 22473                          u = !1;
 22474                          break;
 22475                        }
 22476                        const s = [];
 22477                        for (h = 0; h < e; ++h) {
 22478                          const e = t.getUint16();
 22479                          if (e >= 32768) {
 22480                            u = !1;
 22481                            break;
 22482                          }
 22483                          s.push(e);
 22484                        }
 22485                        if (!u) break;
 22486                        const d = [],
 22487                          f = [];
 22488                        for (; t.pos < o; ) {
 22489                          const e = t.getByte();
 22490                          f.length = e;
 22491                          for (h = 0; h < e; ++h)
 22492                            f[h] = String.fromCharCode(t.getByte());
 22493                          d.push(f.join(""));
 22494                        }
 22495                        l = [];
 22496                        for (h = 0; h < e; ++h) {
 22497                          const e = s[h];
 22498                          e < 258
 22499                            ? l.push(i.MacStandardGlyphOrdering[e])
 22500                            : l.push(d[e - 258]);
 22501                        }
 22502                        break;
 22503                      case 196608:
 22504                        break;
 22505                      default:
 22506                        (0, r.warn)(
 22507                          "Unknown/unsupported post table version " + c,
 22508                        );
 22509                        u = !1;
 22510                        a.defaultEncoding && (l = a.defaultEncoding);
 22511                    }
 22512                    a.glyphNames = l;
 22513                    return u;
 22514                  })(f.post, a, C);
 22515                f.post = { tag: "post", data: createPostTable(a) };
 22516                const E = [];
 22517                function hasGlyph(e) {
 22518                  return !M[e];
 22519                }
 22520                if (a.composite) {
 22521                  const e = a.cidToGidMap || [],
 22522                    t = 0 === e.length;
 22523                  a.cMap.forEach(function (a, n) {
 22524                    "string" == typeof n && (n = convertCidString(a, n, !0));
 22525                    if (n > 65535)
 22526                      throw new r.FormatError("Max size of CID is 65,535");
 22527                    let i = -1;
 22528                    t ? (i = n) : void 0 !== e[n] && (i = e[n]);
 22529                    i >= 0 && i < C && hasGlyph(i) && (E[a] = i);
 22530                  });
 22531                } else {
 22532                  const e = (function readCmapTable(e, t, a, n) {
 22533                      if (!e) {
 22534                        (0, r.warn)("No cmap table available.");
 22535                        return {
 22536                          platformId: -1,
 22537                          encodingId: -1,
 22538                          mappings: [],
 22539                          hasShortCmap: !1,
 22540                        };
 22541                      }
 22542                      let i,
 22543                        s = (t.start || 0) + e.offset;
 22544                      t.pos = s;
 22545                      t.skip(2);
 22546                      const o = t.getUint16();
 22547                      let c,
 22548                        l = !1;
 22549                      for (let e = 0; e < o; e++) {
 22550                        const r = t.getUint16(),
 22551                          i = t.getUint16(),
 22552                          s = t.getInt32() >>> 0;
 22553                        let h = !1;
 22554                        if (c?.platformId !== r || c?.encodingId !== i) {
 22555                          if (0 !== r || (0 !== i && 1 !== i && 3 !== i))
 22556                            if (1 === r && 0 === i) h = !0;
 22557                            else if (3 !== r || 1 !== i || (!n && c)) {
 22558                              if (a && 3 === r && 0 === i) {
 22559                                h = !0;
 22560                                let a = !0;
 22561                                if (e < o - 1) {
 22562                                  const e = t.peekBytes(2);
 22563                                  int16(e[0], e[1]) < r && (a = !1);
 22564                                }
 22565                                a && (l = !0);
 22566                              }
 22567                            } else {
 22568                              h = !0;
 22569                              a || (l = !0);
 22570                            }
 22571                          else h = !0;
 22572                          h && (c = { platformId: r, encodingId: i, offset: s });
 22573                          if (l) break;
 22574                        }
 22575                      }
 22576                      c && (t.pos = s + c.offset);
 22577                      if (!c || -1 === t.peekByte()) {
 22578                        (0, r.warn)("Could not find a preferred cmap table.");
 22579                        return {
 22580                          platformId: -1,
 22581                          encodingId: -1,
 22582                          mappings: [],
 22583                          hasShortCmap: !1,
 22584                        };
 22585                      }
 22586                      const h = t.getUint16();
 22587                      let u = !1;
 22588                      const d = [];
 22589                      let f, g;
 22590                      if (0 === h) {
 22591                        t.skip(4);
 22592                        for (f = 0; f < 256; f++) {
 22593                          const e = t.getByte();
 22594                          e && d.push({ charCode: f, glyphId: e });
 22595                        }
 22596                        u = !0;
 22597                      } else if (2 === h) {
 22598                        t.skip(4);
 22599                        const e = [];
 22600                        let a = 0;
 22601                        for (let r = 0; r < 256; r++) {
 22602                          const r = t.getUint16() >> 3;
 22603                          e.push(r);
 22604                          a = Math.max(r, a);
 22605                        }
 22606                        const r = [];
 22607                        for (let e = 0; e <= a; e++)
 22608                          r.push({
 22609                            firstCode: t.getUint16(),
 22610                            entryCount: t.getUint16(),
 22611                            idDelta: signedInt16(t.getByte(), t.getByte()),
 22612                            idRangePos: t.pos + t.getUint16(),
 22613                          });
 22614                        for (let a = 0; a < 256; a++)
 22615                          if (0 === e[a]) {
 22616                            t.pos = r[0].idRangePos + 2 * a;
 22617                            g = t.getUint16();
 22618                            d.push({ charCode: a, glyphId: g });
 22619                          } else {
 22620                            const n = r[e[a]];
 22621                            for (f = 0; f < n.entryCount; f++) {
 22622                              const e = (a << 8) + f + n.firstCode;
 22623                              t.pos = n.idRangePos + 2 * f;
 22624                              g = t.getUint16();
 22625                              0 !== g && (g = (g + n.idDelta) % 65536);
 22626                              d.push({ charCode: e, glyphId: g });
 22627                            }
 22628                          }
 22629                      } else if (4 === h) {
 22630                        t.skip(4);
 22631                        const e = t.getUint16() >> 1;
 22632                        t.skip(6);
 22633                        const a = [];
 22634                        let r;
 22635                        for (r = 0; r < e; r++) a.push({ end: t.getUint16() });
 22636                        t.skip(2);
 22637                        for (r = 0; r < e; r++) a[r].start = t.getUint16();
 22638                        for (r = 0; r < e; r++) a[r].delta = t.getUint16();
 22639                        let n,
 22640                          o = 0;
 22641                        for (r = 0; r < e; r++) {
 22642                          i = a[r];
 22643                          const s = t.getUint16();
 22644                          if (s) {
 22645                            n = (s >> 1) - (e - r);
 22646                            i.offsetIndex = n;
 22647                            o = Math.max(o, n + i.end - i.start + 1);
 22648                          } else i.offsetIndex = -1;
 22649                        }
 22650                        const c = [];
 22651                        for (f = 0; f < o; f++) c.push(t.getUint16());
 22652                        for (r = 0; r < e; r++) {
 22653                          i = a[r];
 22654                          s = i.start;
 22655                          const e = i.end,
 22656                            t = i.delta;
 22657                          n = i.offsetIndex;
 22658                          for (f = s; f <= e; f++)
 22659                            if (65535 !== f) {
 22660                              g = n < 0 ? f : c[n + f - s];
 22661                              g = (g + t) & 65535;
 22662                              d.push({ charCode: f, glyphId: g });
 22663                            }
 22664                        }
 22665                      } else if (6 === h) {
 22666                        t.skip(4);
 22667                        const e = t.getUint16(),
 22668                          a = t.getUint16();
 22669                        for (f = 0; f < a; f++) {
 22670                          g = t.getUint16();
 22671                          const a = e + f;
 22672                          d.push({ charCode: a, glyphId: g });
 22673                        }
 22674                      } else {
 22675                        if (12 !== h) {
 22676                          (0, r.warn)("cmap table has unsupported format: " + h);
 22677                          return {
 22678                            platformId: -1,
 22679                            encodingId: -1,
 22680                            mappings: [],
 22681                            hasShortCmap: !1,
 22682                          };
 22683                        }
 22684                        {
 22685                          t.skip(10);
 22686                          const e = t.getInt32() >>> 0;
 22687                          for (f = 0; f < e; f++) {
 22688                            const e = t.getInt32() >>> 0,
 22689                              a = t.getInt32() >>> 0;
 22690                            let r = t.getInt32() >>> 0;
 22691                            for (let t = e; t <= a; t++)
 22692                              d.push({ charCode: t, glyphId: r++ });
 22693                          }
 22694                        }
 22695                      }
 22696                      d.sort(function (e, t) {
 22697                        return e.charCode - t.charCode;
 22698                      });
 22699                      for (let e = 1; e < d.length; e++)
 22700                        if (d[e - 1].charCode === d[e].charCode) {
 22701                          d.splice(e, 1);
 22702                          e--;
 22703                        }
 22704                      return {
 22705                        platformId: c.platformId,
 22706                        encodingId: c.encodingId,
 22707                        mappings: d,
 22708                        hasShortCmap: u,
 22709                      };
 22710                    })(f.cmap, t, this.isSymbolicFont, a.hasEncoding),
 22711                    n = e.platformId,
 22712                    s = e.encodingId,
 22713                    l = e.mappings;
 22714                  let u = [],
 22715                    d = !1;
 22716                  !a.hasEncoding ||
 22717                    ("MacRomanEncoding" !== a.baseEncodingName &&
 22718                      "WinAnsiEncoding" !== a.baseEncodingName) ||
 22719                    (u = (0, c.getEncoding)(a.baseEncodingName));
 22720                  if (
 22721                    a.hasEncoding &&
 22722                    !this.isSymbolicFont &&
 22723                    ((3 === n && 1 === s) || (1 === n && 0 === s))
 22724                  ) {
 22725                    const e = (0, o.getGlyphsUnicode)();
 22726                    for (let t = 0; t < 256; t++) {
 22727                      let r;
 22728                      r =
 22729                        void 0 !== this.differences[t]
 22730                          ? this.differences[t]
 22731                          : u.length && "" !== u[t]
 22732                            ? u[t]
 22733                            : c.StandardEncoding[t];
 22734                      if (!r) continue;
 22735                      const o = (0, i.recoverGlyphName)(r, e);
 22736                      let d;
 22737                      3 === n && 1 === s
 22738                        ? (d = e[o])
 22739                        : 1 === n &&
 22740                          0 === s &&
 22741                          (d = c.MacRomanEncoding.indexOf(o));
 22742                      if (void 0 === d) {
 22743                        if (
 22744                          !a.glyphNames &&
 22745                          a.hasIncludedToUnicodeMap &&
 22746                          !(this.toUnicode instanceof h.IdentityToUnicodeMap)
 22747                        ) {
 22748                          const e = this.toUnicode.get(t);
 22749                          e && (d = e.codePointAt(0));
 22750                        }
 22751                        if (void 0 === d) continue;
 22752                      }
 22753                      for (const e of l)
 22754                        if (e.charCode === d) {
 22755                          E[t] = e.glyphId;
 22756                          break;
 22757                        }
 22758                    }
 22759                  } else if (0 === n) {
 22760                    for (const e of l) E[e.charCode] = e.glyphId;
 22761                    d = !0;
 22762                  } else
 22763                    for (const e of l) {
 22764                      let t = e.charCode;
 22765                      3 === n && t >= 61440 && t <= 61695 && (t &= 255);
 22766                      E[t] = e.glyphId;
 22767                    }
 22768                  if (a.glyphNames && (u.length || this.differences.length))
 22769                    for (let e = 0; e < 256; ++e) {
 22770                      if (!d && void 0 !== E[e]) continue;
 22771                      const t = this.differences[e] || u[e];
 22772                      if (!t) continue;
 22773                      const r = a.glyphNames.indexOf(t);
 22774                      r > 0 && hasGlyph(r) && (E[e] = r);
 22775                    }
 22776                }
 22777                0 === E.length && (E[0] = 0);
 22778                let N = k - 1;
 22779                v || (N = 0);
 22780                if (!a.cssFontInfo) {
 22781                  const e = adjustMapping(E, hasGlyph, N, this.toUnicode);
 22782                  this.toFontChar = e.toFontChar;
 22783                  f.cmap = {
 22784                    tag: "cmap",
 22785                    data: createCmapTable(
 22786                      e.charCodeToGlyphId,
 22787                      e.toUnicodeExtraMap,
 22788                      k,
 22789                    ),
 22790                  };
 22791                  (f["OS/2"] &&
 22792                    (function validateOS2Table(e, t) {
 22793                      t.pos = (t.start || 0) + e.offset;
 22794                      const a = t.getUint16();
 22795                      t.skip(60);
 22796                      const r = t.getUint16();
 22797                      if (a < 4 && 768 & r) return !1;
 22798                      if (t.getUint16() > t.getUint16()) return !1;
 22799                      t.skip(6);
 22800                      if (0 === t.getUint16()) return !1;
 22801                      e.data[8] = e.data[9] = 0;
 22802                      return !0;
 22803                    })(f["OS/2"], t)) ||
 22804                    (f["OS/2"] = {
 22805                      tag: "OS/2",
 22806                      data: createOS2Table(a, e.charCodeToGlyphId, D),
 22807                    });
 22808                }
 22809                if (!S)
 22810                  try {
 22811                    w = new y.Stream(f["CFF "].data);
 22812                    b = new n.CFFParser(w, a, i.SEAC_ANALYSIS_ENABLED).parse();
 22813                    b.duplicateFirstGlyph();
 22814                    const e = new n.CFFCompiler(b);
 22815                    f["CFF "].data = e.compile();
 22816                  } catch {
 22817                    (0, r.warn)("Failed to compile font " + a.loadedName);
 22818                  }
 22819                if (f.name) {
 22820                  const [t, r] = readNameTable(f.name);
 22821                  f.name.data = createNameTable(e, t);
 22822                  this.psName = t[0][6] || null;
 22823                  a.composite ||
 22824                    (function adjustTrueTypeToUnicode(e, t, a) {
 22825                      if (e.isInternalFont) return;
 22826                      if (e.hasIncludedToUnicodeMap) return;
 22827                      if (e.hasEncoding) return;
 22828                      if (e.toUnicode instanceof h.IdentityToUnicodeMap) return;
 22829                      if (!t) return;
 22830                      if (0 === a.length) return;
 22831                      if (e.defaultEncoding === c.WinAnsiEncoding) return;
 22832                      for (const e of a) if (!isWinNameRecord(e)) return;
 22833                      const r = c.WinAnsiEncoding,
 22834                        n = [],
 22835                        i = (0, o.getGlyphsUnicode)();
 22836                      for (const e in r) {
 22837                        const t = r[e];
 22838                        if ("" === t) continue;
 22839                        const a = i[t];
 22840                        void 0 !== a && (n[e] = String.fromCharCode(a));
 22841                      }
 22842                      n.length > 0 && e.toUnicode.amend(n);
 22843                    })(a, this.isSymbolicFont, r);
 22844                } else f.name = { tag: "name", data: createNameTable(this.name) };
 22845                const R = new m.OpenTypeFileBuilder(d.version);
 22846                for (const e in f) R.addTable(e, f[e].data);
 22847                return R.toArray();
 22848              }
 22849              convert(e, t, a) {
 22850                a.fixedPitch = !1;
 22851                a.builtInEncoding &&
 22852                  (function adjustType1ToUnicode(e, t) {
 22853                    if (e.isInternalFont) return;
 22854                    if (e.hasIncludedToUnicodeMap) return;
 22855                    if (t === e.defaultEncoding) return;
 22856                    if (e.toUnicode instanceof h.IdentityToUnicodeMap) return;
 22857                    const a = [],
 22858                      r = (0, o.getGlyphsUnicode)();
 22859                    for (const n in t) {
 22860                      if (
 22861                        e.hasEncoding &&
 22862                        (e.baseEncodingName || void 0 !== e.differences[n])
 22863                      )
 22864                        continue;
 22865                      const i = t[n],
 22866                        o = (0, s.getUnicodeForGlyph)(i, r);
 22867                      -1 !== o && (a[n] = String.fromCharCode(o));
 22868                    }
 22869                    a.length > 0 && e.toUnicode.amend(a);
 22870                  })(a, a.builtInEncoding);
 22871                let n = 1;
 22872                t instanceof u.CFFFont && (n = t.numGlyphs - 1);
 22873                const l = t.getGlyphMapping(a);
 22874                let d = null,
 22875                  f = l,
 22876                  g = null;
 22877                if (!a.cssFontInfo) {
 22878                  d = adjustMapping(l, t.hasGlyphId.bind(t), n, this.toUnicode);
 22879                  this.toFontChar = d.toFontChar;
 22880                  f = d.charCodeToGlyphId;
 22881                  g = d.toUnicodeExtraMap;
 22882                }
 22883                const p = t.numGlyphs;
 22884                function getCharCodes(e, t) {
 22885                  let a = null;
 22886                  for (const r in e) t === e[r] && (a ||= []).push(0 | r);
 22887                  return a;
 22888                }
 22889                function createCharCode(e, t) {
 22890                  for (const a in e) if (t === e[a]) return 0 | a;
 22891                  d.charCodeToGlyphId[d.nextAvailableFontCharCode] = t;
 22892                  return d.nextAvailableFontCharCode++;
 22893                }
 22894                const b = t.seacs;
 22895                if (d && i.SEAC_ANALYSIS_ENABLED && b?.length) {
 22896                  const e = a.fontMatrix || r.FONT_IDENTITY_MATRIX,
 22897                    n = t.getCharset(),
 22898                    i = Object.create(null);
 22899                  for (let t in b) {
 22900                    t |= 0;
 22901                    const a = b[t],
 22902                      r = c.StandardEncoding[a[2]],
 22903                      s = c.StandardEncoding[a[3]],
 22904                      o = n.indexOf(r),
 22905                      h = n.indexOf(s);
 22906                    if (o < 0 || h < 0) continue;
 22907                    const u = {
 22908                        x: a[0] * e[0] + a[1] * e[2] + e[4],
 22909                        y: a[0] * e[1] + a[1] * e[3] + e[5],
 22910                      },
 22911                      f = getCharCodes(l, t);
 22912                    if (f)
 22913                      for (const e of f) {
 22914                        const t = d.charCodeToGlyphId,
 22915                          a = createCharCode(t, o),
 22916                          r = createCharCode(t, h);
 22917                        i[e] = {
 22918                          baseFontCharCode: a,
 22919                          accentFontCharCode: r,
 22920                          accentOffset: u,
 22921                        };
 22922                      }
 22923                  }
 22924                  a.seacMap = i;
 22925                }
 22926                const y = 1 / (a.fontMatrix || r.FONT_IDENTITY_MATRIX)[0],
 22927                  w = new m.OpenTypeFileBuilder("OTTO");
 22928                w.addTable("CFF ", t.data);
 22929                w.addTable("OS/2", createOS2Table(a, f));
 22930                w.addTable("cmap", createCmapTable(f, g, p));
 22931                w.addTable(
 22932                  "head",
 22933                  "\0\0\0\0\0\0\0\0\0\0_<õ\0\0" +
 22934                    safeString16(y) +
 22935                    "\0\0\0\0ž\v~'\0\0\0\0ž\v~'\0\0" +
 22936                    safeString16(a.descent) +
 22937                    "ÿ" +
 22938                    safeString16(a.ascent) +
 22939                    string16(a.italicAngle ? 2 : 0) +
 22940                    "\0\0\0\0\0\0\0",
 22941                );
 22942                w.addTable(
 22943                  "hhea",
 22944                  "\0\0\0" +
 22945                    safeString16(a.ascent) +
 22946                    safeString16(a.descent) +
 22947                    "\0\0ÿÿ\0\0\0\0\0\0" +
 22948                    safeString16(a.capHeight) +
 22949                    safeString16(Math.tan(a.italicAngle) * a.xHeight) +
 22950                    "\0\0\0\0\0\0\0\0\0\0\0\0" +
 22951                    string16(p),
 22952                );
 22953                w.addTable(
 22954                  "hmtx",
 22955                  (function fontFieldsHmtx() {
 22956                    const e = t.charstrings,
 22957                      a = t.cff ? t.cff.widths : null;
 22958                    let r = "\0\0\0\0";
 22959                    for (let t = 1, n = p; t < n; t++) {
 22960                      let n = 0;
 22961                      if (e) {
 22962                        const a = e[t - 1];
 22963                        n = "width" in a ? a.width : 0;
 22964                      } else a && (n = Math.ceil(a[t] || 0));
 22965                      r += string16(n) + string16(0);
 22966                    }
 22967                    return r;
 22968                  })(),
 22969                );
 22970                w.addTable("maxp", "\0\0P\0" + string16(p));
 22971                w.addTable("name", createNameTable(e));
 22972                w.addTable("post", createPostTable(a));
 22973                return w.toArray();
 22974              }
 22975              get spaceWidth() {
 22976                const e = ["space", "minus", "one", "i", "I"];
 22977                let t;
 22978                for (const a of e) {
 22979                  if (a in this.widths) {
 22980                    t = this.widths[a];
 22981                    break;
 22982                  }
 22983                  const e = (0, o.getGlyphsUnicode)()[a];
 22984                  let r = 0;
 22985                  if (this.composite && this.cMap.contains(e)) {
 22986                    r = this.cMap.lookup(e);
 22987                    "string" == typeof r && (r = convertCidString(e, r));
 22988                  }
 22989                  !r && this.toUnicode && (r = this.toUnicode.charCodeOf(e));
 22990                  r <= 0 && (r = e);
 22991                  t = this.widths[r];
 22992                  if (t) break;
 22993                }
 22994                return (0, r.shadow)(this, "spaceWidth", t || this.defaultWidth);
 22995              }
 22996              _charToGlyph(e, t = !1) {
 22997                let a,
 22998                  n,
 22999                  i,
 23000                  o = this._glyphCache[e];
 23001                if (o?.isSpace === t) return o;
 23002                let c = e;
 23003                if (this.cMap?.contains(e)) {
 23004                  c = this.cMap.lookup(e);
 23005                  "string" == typeof c && (c = convertCidString(e, c));
 23006                }
 23007                n = this.widths[c];
 23008                "number" != typeof n && (n = this.defaultWidth);
 23009                const l = this.vmetrics?.[c];
 23010                let h = this.toUnicode.get(e) || e;
 23011                "number" == typeof h && (h = String.fromCharCode(h));
 23012                let u = void 0 !== this.toFontChar[e];
 23013                a = this.toFontChar[e] || e;
 23014                if (this.missingFile) {
 23015                  const t = this.differences[e] || this.defaultEncoding[e];
 23016                  (".notdef" !== t && "" !== t) ||
 23017                    "Type1" !== this.type ||
 23018                    (a = 32);
 23019                  a = (0, s.mapSpecialUnicodeValues)(a);
 23020                }
 23021                this.isType3Font && (i = a);
 23022                let d = null;
 23023                if (this.seacMap?.[e]) {
 23024                  u = !0;
 23025                  const t = this.seacMap[e];
 23026                  a = t.baseFontCharCode;
 23027                  d = {
 23028                    fontChar: String.fromCodePoint(t.accentFontCharCode),
 23029                    offset: t.accentOffset,
 23030                  };
 23031                }
 23032                let f = "";
 23033                "number" == typeof a &&
 23034                  (a <= 1114111
 23035                    ? (f = String.fromCodePoint(a))
 23036                    : (0, r.warn)(`charToGlyph - invalid fontCharCode: ${a}`));
 23037                o = new Glyph(e, f, h, d, n, l, i, t, u);
 23038                return (this._glyphCache[e] = o);
 23039              }
 23040              charsToGlyphs(e) {
 23041                let t = this._charsCache[e];
 23042                if (t) return t;
 23043                t = [];
 23044                if (this.cMap) {
 23045                  const a = Object.create(null),
 23046                    r = e.length;
 23047                  let n = 0;
 23048                  for (; n < r; ) {
 23049                    this.cMap.readCharCode(e, n, a);
 23050                    const { charcode: r, length: i } = a;
 23051                    n += i;
 23052                    const s = this._charToGlyph(
 23053                      r,
 23054                      1 === i && 32 === e.charCodeAt(n - 1),
 23055                    );
 23056                    t.push(s);
 23057                  }
 23058                } else
 23059                  for (let a = 0, r = e.length; a < r; ++a) {
 23060                    const r = e.charCodeAt(a),
 23061                      n = this._charToGlyph(r, 32 === r);
 23062                    t.push(n);
 23063                  }
 23064                return (this._charsCache[e] = t);
 23065              }
 23066              getCharPositions(e) {
 23067                const t = [];
 23068                if (this.cMap) {
 23069                  const a = Object.create(null);
 23070                  let r = 0;
 23071                  for (; r < e.length; ) {
 23072                    this.cMap.readCharCode(e, r, a);
 23073                    const n = a.length;
 23074                    t.push([r, r + n]);
 23075                    r += n;
 23076                  }
 23077                } else
 23078                  for (let a = 0, r = e.length; a < r; ++a) t.push([a, a + 1]);
 23079                return t;
 23080              }
 23081              get glyphCacheValues() {
 23082                return Object.values(this._glyphCache);
 23083              }
 23084              encodeString(e) {
 23085                const t = [],
 23086                  a = [],
 23087                  hasCurrentBufErrors = () => t.length % 2 == 1,
 23088                  r =
 23089                    this.toUnicode instanceof h.IdentityToUnicodeMap
 23090                      ? (e) => this.toUnicode.charCodeOf(e)
 23091                      : (e) => this.toUnicode.charCodeOf(String.fromCodePoint(e));
 23092                for (let n = 0, i = e.length; n < i; n++) {
 23093                  const i = e.codePointAt(n);
 23094                  i > 55295 && (i < 57344 || i > 65533) && n++;
 23095                  if (this.toUnicode) {
 23096                    const e = r(i);
 23097                    if (-1 !== e) {
 23098                      if (hasCurrentBufErrors()) {
 23099                        t.push(a.join(""));
 23100                        a.length = 0;
 23101                      }
 23102                      for (
 23103                        let t =
 23104                          (this.cMap ? this.cMap.getCharCodeLength(e) : 1) - 1;
 23105                        t >= 0;
 23106                        t--
 23107                      )
 23108                        a.push(String.fromCharCode((e >> (8 * t)) & 255));
 23109                      continue;
 23110                    }
 23111                  }
 23112                  if (!hasCurrentBufErrors()) {
 23113                    t.push(a.join(""));
 23114                    a.length = 0;
 23115                  }
 23116                  a.push(String.fromCodePoint(i));
 23117                }
 23118                t.push(a.join(""));
 23119                return t;
 23120              }
 23121            };
 23122            t.ErrorFont = class ErrorFont {
 23123              constructor(e) {
 23124                this.error = e;
 23125                this.loadedName = "g_font_error";
 23126                this.missingFile = !0;
 23127              }
 23128              charsToGlyphs() {
 23129                return [];
 23130              }
 23131              encodeString(e) {
 23132                return [e];
 23133              }
 23134              exportData(e = !1) {
 23135                return { error: this.error };
 23136              }
 23137            };
 23138          },
 23139          (e, t, a) => {
 23140            Object.defineProperty(t, "__esModule", { value: !0 });
 23141            t.CFFTopDict =
 23142              t.CFFStrings =
 23143              t.CFFStandardStrings =
 23144              t.CFFPrivateDict =
 23145              t.CFFParser =
 23146              t.CFFIndex =
 23147              t.CFFHeader =
 23148              t.CFFFDSelect =
 23149              t.CFFCompiler =
 23150              t.CFFCharset =
 23151              t.CFF =
 23152                void 0;
 23153            var r = a(2),
 23154              n = a(36),
 23155              i = a(37);
 23156            const s = [
 23157              ".notdef",
 23158              "space",
 23159              "exclam",
 23160              "quotedbl",
 23161              "numbersign",
 23162              "dollar",
 23163              "percent",
 23164              "ampersand",
 23165              "quoteright",
 23166              "parenleft",
 23167              "parenright",
 23168              "asterisk",
 23169              "plus",
 23170              "comma",
 23171              "hyphen",
 23172              "period",
 23173              "slash",
 23174              "zero",
 23175              "one",
 23176              "two",
 23177              "three",
 23178              "four",
 23179              "five",
 23180              "six",
 23181              "seven",
 23182              "eight",
 23183              "nine",
 23184              "colon",
 23185              "semicolon",
 23186              "less",
 23187              "equal",
 23188              "greater",
 23189              "question",
 23190              "at",
 23191              "A",
 23192              "B",
 23193              "C",
 23194              "D",
 23195              "E",
 23196              "F",
 23197              "G",
 23198              "H",
 23199              "I",
 23200              "J",
 23201              "K",
 23202              "L",
 23203              "M",
 23204              "N",
 23205              "O",
 23206              "P",
 23207              "Q",
 23208              "R",
 23209              "S",
 23210              "T",
 23211              "U",
 23212              "V",
 23213              "W",
 23214              "X",
 23215              "Y",
 23216              "Z",
 23217              "bracketleft",
 23218              "backslash",
 23219              "bracketright",
 23220              "asciicircum",
 23221              "underscore",
 23222              "quoteleft",
 23223              "a",
 23224              "b",
 23225              "c",
 23226              "d",
 23227              "e",
 23228              "f",
 23229              "g",
 23230              "h",
 23231              "i",
 23232              "j",
 23233              "k",
 23234              "l",
 23235              "m",
 23236              "n",
 23237              "o",
 23238              "p",
 23239              "q",
 23240              "r",
 23241              "s",
 23242              "t",
 23243              "u",
 23244              "v",
 23245              "w",
 23246              "x",
 23247              "y",
 23248              "z",
 23249              "braceleft",
 23250              "bar",
 23251              "braceright",
 23252              "asciitilde",
 23253              "exclamdown",
 23254              "cent",
 23255              "sterling",
 23256              "fraction",
 23257              "yen",
 23258              "florin",
 23259              "section",
 23260              "currency",
 23261              "quotesingle",
 23262              "quotedblleft",
 23263              "guillemotleft",
 23264              "guilsinglleft",
 23265              "guilsinglright",
 23266              "fi",
 23267              "fl",
 23268              "endash",
 23269              "dagger",
 23270              "daggerdbl",
 23271              "periodcentered",
 23272              "paragraph",
 23273              "bullet",
 23274              "quotesinglbase",
 23275              "quotedblbase",
 23276              "quotedblright",
 23277              "guillemotright",
 23278              "ellipsis",
 23279              "perthousand",
 23280              "questiondown",
 23281              "grave",
 23282              "acute",
 23283              "circumflex",
 23284              "tilde",
 23285              "macron",
 23286              "breve",
 23287              "dotaccent",
 23288              "dieresis",
 23289              "ring",
 23290              "cedilla",
 23291              "hungarumlaut",
 23292              "ogonek",
 23293              "caron",
 23294              "emdash",
 23295              "AE",
 23296              "ordfeminine",
 23297              "Lslash",
 23298              "Oslash",
 23299              "OE",
 23300              "ordmasculine",
 23301              "ae",
 23302              "dotlessi",
 23303              "lslash",
 23304              "oslash",
 23305              "oe",
 23306              "germandbls",
 23307              "onesuperior",
 23308              "logicalnot",
 23309              "mu",
 23310              "trademark",
 23311              "Eth",
 23312              "onehalf",
 23313              "plusminus",
 23314              "Thorn",
 23315              "onequarter",
 23316              "divide",
 23317              "brokenbar",
 23318              "degree",
 23319              "thorn",
 23320              "threequarters",
 23321              "twosuperior",
 23322              "registered",
 23323              "minus",
 23324              "eth",
 23325              "multiply",
 23326              "threesuperior",
 23327              "copyright",
 23328              "Aacute",
 23329              "Acircumflex",
 23330              "Adieresis",
 23331              "Agrave",
 23332              "Aring",
 23333              "Atilde",
 23334              "Ccedilla",
 23335              "Eacute",
 23336              "Ecircumflex",
 23337              "Edieresis",
 23338              "Egrave",
 23339              "Iacute",
 23340              "Icircumflex",
 23341              "Idieresis",
 23342              "Igrave",
 23343              "Ntilde",
 23344              "Oacute",
 23345              "Ocircumflex",
 23346              "Odieresis",
 23347              "Ograve",
 23348              "Otilde",
 23349              "Scaron",
 23350              "Uacute",
 23351              "Ucircumflex",
 23352              "Udieresis",
 23353              "Ugrave",
 23354              "Yacute",
 23355              "Ydieresis",
 23356              "Zcaron",
 23357              "aacute",
 23358              "acircumflex",
 23359              "adieresis",
 23360              "agrave",
 23361              "aring",
 23362              "atilde",
 23363              "ccedilla",
 23364              "eacute",
 23365              "ecircumflex",
 23366              "edieresis",
 23367              "egrave",
 23368              "iacute",
 23369              "icircumflex",
 23370              "idieresis",
 23371              "igrave",
 23372              "ntilde",
 23373              "oacute",
 23374              "ocircumflex",
 23375              "odieresis",
 23376              "ograve",
 23377              "otilde",
 23378              "scaron",
 23379              "uacute",
 23380              "ucircumflex",
 23381              "udieresis",
 23382              "ugrave",
 23383              "yacute",
 23384              "ydieresis",
 23385              "zcaron",
 23386              "exclamsmall",
 23387              "Hungarumlautsmall",
 23388              "dollaroldstyle",
 23389              "dollarsuperior",
 23390              "ampersandsmall",
 23391              "Acutesmall",
 23392              "parenleftsuperior",
 23393              "parenrightsuperior",
 23394              "twodotenleader",
 23395              "onedotenleader",
 23396              "zerooldstyle",
 23397              "oneoldstyle",
 23398              "twooldstyle",
 23399              "threeoldstyle",
 23400              "fouroldstyle",
 23401              "fiveoldstyle",
 23402              "sixoldstyle",
 23403              "sevenoldstyle",
 23404              "eightoldstyle",
 23405              "nineoldstyle",
 23406              "commasuperior",
 23407              "threequartersemdash",
 23408              "periodsuperior",
 23409              "questionsmall",
 23410              "asuperior",
 23411              "bsuperior",
 23412              "centsuperior",
 23413              "dsuperior",
 23414              "esuperior",
 23415              "isuperior",
 23416              "lsuperior",
 23417              "msuperior",
 23418              "nsuperior",
 23419              "osuperior",
 23420              "rsuperior",
 23421              "ssuperior",
 23422              "tsuperior",
 23423              "ff",
 23424              "ffi",
 23425              "ffl",
 23426              "parenleftinferior",
 23427              "parenrightinferior",
 23428              "Circumflexsmall",
 23429              "hyphensuperior",
 23430              "Gravesmall",
 23431              "Asmall",
 23432              "Bsmall",
 23433              "Csmall",
 23434              "Dsmall",
 23435              "Esmall",
 23436              "Fsmall",
 23437              "Gsmall",
 23438              "Hsmall",
 23439              "Ismall",
 23440              "Jsmall",
 23441              "Ksmall",
 23442              "Lsmall",
 23443              "Msmall",
 23444              "Nsmall",
 23445              "Osmall",
 23446              "Psmall",
 23447              "Qsmall",
 23448              "Rsmall",
 23449              "Ssmall",
 23450              "Tsmall",
 23451              "Usmall",
 23452              "Vsmall",
 23453              "Wsmall",
 23454              "Xsmall",
 23455              "Ysmall",
 23456              "Zsmall",
 23457              "colonmonetary",
 23458              "onefitted",
 23459              "rupiah",
 23460              "Tildesmall",
 23461              "exclamdownsmall",
 23462              "centoldstyle",
 23463              "Lslashsmall",
 23464              "Scaronsmall",
 23465              "Zcaronsmall",
 23466              "Dieresissmall",
 23467              "Brevesmall",
 23468              "Caronsmall",
 23469              "Dotaccentsmall",
 23470              "Macronsmall",
 23471              "figuredash",
 23472              "hypheninferior",
 23473              "Ogoneksmall",
 23474              "Ringsmall",
 23475              "Cedillasmall",
 23476              "questiondownsmall",
 23477              "oneeighth",
 23478              "threeeighths",
 23479              "fiveeighths",
 23480              "seveneighths",
 23481              "onethird",
 23482              "twothirds",
 23483              "zerosuperior",
 23484              "foursuperior",
 23485              "fivesuperior",
 23486              "sixsuperior",
 23487              "sevensuperior",
 23488              "eightsuperior",
 23489              "ninesuperior",
 23490              "zeroinferior",
 23491              "oneinferior",
 23492              "twoinferior",
 23493              "threeinferior",
 23494              "fourinferior",
 23495              "fiveinferior",
 23496              "sixinferior",
 23497              "seveninferior",
 23498              "eightinferior",
 23499              "nineinferior",
 23500              "centinferior",
 23501              "dollarinferior",
 23502              "periodinferior",
 23503              "commainferior",
 23504              "Agravesmall",
 23505              "Aacutesmall",
 23506              "Acircumflexsmall",
 23507              "Atildesmall",
 23508              "Adieresissmall",
 23509              "Aringsmall",
 23510              "AEsmall",
 23511              "Ccedillasmall",
 23512              "Egravesmall",
 23513              "Eacutesmall",
 23514              "Ecircumflexsmall",
 23515              "Edieresissmall",
 23516              "Igravesmall",
 23517              "Iacutesmall",
 23518              "Icircumflexsmall",
 23519              "Idieresissmall",
 23520              "Ethsmall",
 23521              "Ntildesmall",
 23522              "Ogravesmall",
 23523              "Oacutesmall",
 23524              "Ocircumflexsmall",
 23525              "Otildesmall",
 23526              "Odieresissmall",
 23527              "OEsmall",
 23528              "Oslashsmall",
 23529              "Ugravesmall",
 23530              "Uacutesmall",
 23531              "Ucircumflexsmall",
 23532              "Udieresissmall",
 23533              "Yacutesmall",
 23534              "Thornsmall",
 23535              "Ydieresissmall",
 23536              "001.000",
 23537              "001.001",
 23538              "001.002",
 23539              "001.003",
 23540              "Black",
 23541              "Bold",
 23542              "Book",
 23543              "Light",
 23544              "Medium",
 23545              "Regular",
 23546              "Roman",
 23547              "Semibold",
 23548            ];
 23549            t.CFFStandardStrings = s;
 23550            const o = 391,
 23551              c = [
 23552                null,
 23553                { id: "hstem", min: 2, stackClearing: !0, stem: !0 },
 23554                null,
 23555                { id: "vstem", min: 2, stackClearing: !0, stem: !0 },
 23556                { id: "vmoveto", min: 1, stackClearing: !0 },
 23557                { id: "rlineto", min: 2, resetStack: !0 },
 23558                { id: "hlineto", min: 1, resetStack: !0 },
 23559                { id: "vlineto", min: 1, resetStack: !0 },
 23560                { id: "rrcurveto", min: 6, resetStack: !0 },
 23561                null,
 23562                { id: "callsubr", min: 1, undefStack: !0 },
 23563                { id: "return", min: 0, undefStack: !0 },
 23564                null,
 23565                null,
 23566                { id: "endchar", min: 0, stackClearing: !0 },
 23567                null,
 23568                null,
 23569                null,
 23570                { id: "hstemhm", min: 2, stackClearing: !0, stem: !0 },
 23571                { id: "hintmask", min: 0, stackClearing: !0 },
 23572                { id: "cntrmask", min: 0, stackClearing: !0 },
 23573                { id: "rmoveto", min: 2, stackClearing: !0 },
 23574                { id: "hmoveto", min: 1, stackClearing: !0 },
 23575                { id: "vstemhm", min: 2, stackClearing: !0, stem: !0 },
 23576                { id: "rcurveline", min: 8, resetStack: !0 },
 23577                { id: "rlinecurve", min: 8, resetStack: !0 },
 23578                { id: "vvcurveto", min: 4, resetStack: !0 },
 23579                { id: "hhcurveto", min: 4, resetStack: !0 },
 23580                null,
 23581                { id: "callgsubr", min: 1, undefStack: !0 },
 23582                { id: "vhcurveto", min: 4, resetStack: !0 },
 23583                { id: "hvcurveto", min: 4, resetStack: !0 },
 23584              ],
 23585              l = [
 23586                null,
 23587                null,
 23588                null,
 23589                { id: "and", min: 2, stackDelta: -1 },
 23590                { id: "or", min: 2, stackDelta: -1 },
 23591                { id: "not", min: 1, stackDelta: 0 },
 23592                null,
 23593                null,
 23594                null,
 23595                { id: "abs", min: 1, stackDelta: 0 },
 23596                {
 23597                  id: "add",
 23598                  min: 2,
 23599                  stackDelta: -1,
 23600                  stackFn(e, t) {
 23601                    e[t - 2] = e[t - 2] + e[t - 1];
 23602                  },
 23603                },
 23604                {
 23605                  id: "sub",
 23606                  min: 2,
 23607                  stackDelta: -1,
 23608                  stackFn(e, t) {
 23609                    e[t - 2] = e[t - 2] - e[t - 1];
 23610                  },
 23611                },
 23612                {
 23613                  id: "div",
 23614                  min: 2,
 23615                  stackDelta: -1,
 23616                  stackFn(e, t) {
 23617                    e[t - 2] = e[t - 2] / e[t - 1];
 23618                  },
 23619                },
 23620                null,
 23621                {
 23622                  id: "neg",
 23623                  min: 1,
 23624                  stackDelta: 0,
 23625                  stackFn(e, t) {
 23626                    e[t - 1] = -e[t - 1];
 23627                  },
 23628                },
 23629                { id: "eq", min: 2, stackDelta: -1 },
 23630                null,
 23631                null,
 23632                { id: "drop", min: 1, stackDelta: -1 },
 23633                null,
 23634                { id: "put", min: 2, stackDelta: -2 },
 23635                { id: "get", min: 1, stackDelta: 0 },
 23636                { id: "ifelse", min: 4, stackDelta: -3 },
 23637                { id: "random", min: 0, stackDelta: 1 },
 23638                {
 23639                  id: "mul",
 23640                  min: 2,
 23641                  stackDelta: -1,
 23642                  stackFn(e, t) {
 23643                    e[t - 2] = e[t - 2] * e[t - 1];
 23644                  },
 23645                },
 23646                null,
 23647                { id: "sqrt", min: 1, stackDelta: 0 },
 23648                { id: "dup", min: 1, stackDelta: 1 },
 23649                { id: "exch", min: 2, stackDelta: 0 },
 23650                { id: "index", min: 2, stackDelta: 0 },
 23651                { id: "roll", min: 3, stackDelta: -2 },
 23652                null,
 23653                null,
 23654                null,
 23655                { id: "hflex", min: 7, resetStack: !0 },
 23656                { id: "flex", min: 13, resetStack: !0 },
 23657                { id: "hflex1", min: 9, resetStack: !0 },
 23658                { id: "flex1", min: 11, resetStack: !0 },
 23659              ];
 23660            t.CFFParser = class CFFParser {
 23661              constructor(e, t, a) {
 23662                this.bytes = e.getBytes();
 23663                this.properties = t;
 23664                this.seacAnalysisEnabled = !!a;
 23665              }
 23666              parse() {
 23667                const e = this.properties,
 23668                  t = new CFF();
 23669                this.cff = t;
 23670                const a = this.parseHeader(),
 23671                  r = this.parseIndex(a.endPos),
 23672                  n = this.parseIndex(r.endPos),
 23673                  i = this.parseIndex(n.endPos),
 23674                  s = this.parseIndex(i.endPos),
 23675                  o = this.parseDict(n.obj.get(0)),
 23676                  c = this.createDict(CFFTopDict, o, t.strings);
 23677                t.header = a.obj;
 23678                t.names = this.parseNameIndex(r.obj);
 23679                t.strings = this.parseStringIndex(i.obj);
 23680                t.topDict = c;
 23681                t.globalSubrIndex = s.obj;
 23682                this.parsePrivateDict(t.topDict);
 23683                t.isCIDFont = c.hasName("ROS");
 23684                const l = c.getByName("CharStrings"),
 23685                  h = this.parseIndex(l).obj,
 23686                  u = c.getByName("FontMatrix");
 23687                u && (e.fontMatrix = u);
 23688                const d = c.getByName("FontBBox");
 23689                if (d) {
 23690                  e.ascent = Math.max(d[3], d[1]);
 23691                  e.descent = Math.min(d[1], d[3]);
 23692                  e.ascentScaled = !0;
 23693                }
 23694                let f, g;
 23695                if (t.isCIDFont) {
 23696                  const e = this.parseIndex(c.getByName("FDArray")).obj;
 23697                  for (let a = 0, r = e.count; a < r; ++a) {
 23698                    const r = e.get(a),
 23699                      n = this.createDict(
 23700                        CFFTopDict,
 23701                        this.parseDict(r),
 23702                        t.strings,
 23703                      );
 23704                    this.parsePrivateDict(n);
 23705                    t.fdArray.push(n);
 23706                  }
 23707                  g = null;
 23708                  f = this.parseCharsets(
 23709                    c.getByName("charset"),
 23710                    h.count,
 23711                    t.strings,
 23712                    !0,
 23713                  );
 23714                  t.fdSelect = this.parseFDSelect(
 23715                    c.getByName("FDSelect"),
 23716                    h.count,
 23717                  );
 23718                } else {
 23719                  f = this.parseCharsets(
 23720                    c.getByName("charset"),
 23721                    h.count,
 23722                    t.strings,
 23723                    !1,
 23724                  );
 23725                  g = this.parseEncoding(
 23726                    c.getByName("Encoding"),
 23727                    e,
 23728                    t.strings,
 23729                    f.charset,
 23730                  );
 23731                }
 23732                t.charset = f;
 23733                t.encoding = g;
 23734                const p = this.parseCharStrings({
 23735                  charStrings: h,
 23736                  localSubrIndex: c.privateDict.subrsIndex,
 23737                  globalSubrIndex: s.obj,
 23738                  fdSelect: t.fdSelect,
 23739                  fdArray: t.fdArray,
 23740                  privateDict: c.privateDict,
 23741                });
 23742                t.charStrings = p.charStrings;
 23743                t.seacs = p.seacs;
 23744                t.widths = p.widths;
 23745                return t;
 23746              }
 23747              parseHeader() {
 23748                let e = this.bytes;
 23749                const t = e.length;
 23750                let a = 0;
 23751                for (; a < t && 1 !== e[a]; ) ++a;
 23752                if (a >= t) throw new r.FormatError("Invalid CFF header");
 23753                if (0 !== a) {
 23754                  (0, r.info)("cff data is shifted");
 23755                  e = e.subarray(a);
 23756                  this.bytes = e;
 23757                }
 23758                const n = e[0],
 23759                  i = e[1],
 23760                  s = e[2],
 23761                  o = e[3];
 23762                return { obj: new CFFHeader(n, i, s, o), endPos: s };
 23763              }
 23764              parseDict(e) {
 23765                let t = 0;
 23766                function parseOperand() {
 23767                  let a = e[t++];
 23768                  if (30 === a)
 23769                    return (function parseFloatOperand() {
 23770                      let a = "";
 23771                      const r = 15,
 23772                        n = [
 23773                          "0",
 23774                          "1",
 23775                          "2",
 23776                          "3",
 23777                          "4",
 23778                          "5",
 23779                          "6",
 23780                          "7",
 23781                          "8",
 23782                          "9",
 23783                          ".",
 23784                          "E",
 23785                          "E-",
 23786                          null,
 23787                          "-",
 23788                        ],
 23789                        i = e.length;
 23790                      for (; t < i; ) {
 23791                        const i = e[t++],
 23792                          s = i >> 4,
 23793                          o = 15 & i;
 23794                        if (s === r) break;
 23795                        a += n[s];
 23796                        if (o === r) break;
 23797                        a += n[o];
 23798                      }
 23799                      return parseFloat(a);
 23800                    })();
 23801                  if (28 === a) {
 23802                    a = e[t++];
 23803                    a = ((a << 24) | (e[t++] << 16)) >> 16;
 23804                    return a;
 23805                  }
 23806                  if (29 === a) {
 23807                    a = e[t++];
 23808                    a = (a << 8) | e[t++];
 23809                    a = (a << 8) | e[t++];
 23810                    a = (a << 8) | e[t++];
 23811                    return a;
 23812                  }
 23813                  if (a >= 32 && a <= 246) return a - 139;
 23814                  if (a >= 247 && a <= 250) return 256 * (a - 247) + e[t++] + 108;
 23815                  if (a >= 251 && a <= 254)
 23816                    return -256 * (a - 251) - e[t++] - 108;
 23817                  (0, r.warn)(
 23818                    'CFFParser_parseDict: "' + a + '" is a reserved command.',
 23819                  );
 23820                  return NaN;
 23821                }
 23822                let a = [];
 23823                const n = [];
 23824                t = 0;
 23825                const i = e.length;
 23826                for (; t < i; ) {
 23827                  let r = e[t];
 23828                  if (r <= 21) {
 23829                    12 === r && (r = (r << 8) | e[++t]);
 23830                    n.push([r, a]);
 23831                    a = [];
 23832                    ++t;
 23833                  } else a.push(parseOperand());
 23834                }
 23835                return n;
 23836              }
 23837              parseIndex(e) {
 23838                const t = new CFFIndex(),
 23839                  a = this.bytes,
 23840                  r = (a[e++] << 8) | a[e++],
 23841                  n = [];
 23842                let i,
 23843                  s,
 23844                  o = e;
 23845                if (0 !== r) {
 23846                  const t = a[e++],
 23847                    c = e + (r + 1) * t - 1;
 23848                  for (i = 0, s = r + 1; i < s; ++i) {
 23849                    let r = 0;
 23850                    for (let n = 0; n < t; ++n) {
 23851                      r <<= 8;
 23852                      r += a[e++];
 23853                    }
 23854                    n.push(c + r);
 23855                  }
 23856                  o = n[r];
 23857                }
 23858                for (i = 0, s = n.length - 1; i < s; ++i) {
 23859                  const e = n[i],
 23860                    r = n[i + 1];
 23861                  t.add(a.subarray(e, r));
 23862                }
 23863                return { obj: t, endPos: o };
 23864              }
 23865              parseNameIndex(e) {
 23866                const t = [];
 23867                for (let a = 0, n = e.count; a < n; ++a) {
 23868                  const n = e.get(a);
 23869                  t.push((0, r.bytesToString)(n));
 23870                }
 23871                return t;
 23872              }
 23873              parseStringIndex(e) {
 23874                const t = new CFFStrings();
 23875                for (let a = 0, n = e.count; a < n; ++a) {
 23876                  const n = e.get(a);
 23877                  t.add((0, r.bytesToString)(n));
 23878                }
 23879                return t;
 23880              }
 23881              createDict(e, t, a) {
 23882                const r = new e(a);
 23883                for (const [e, a] of t) r.setByKey(e, a);
 23884                return r;
 23885              }
 23886              parseCharString(e, t, a, n) {
 23887                if (!t || e.callDepth > 10) return !1;
 23888                let i = e.stackSize;
 23889                const s = e.stack;
 23890                let o = t.length;
 23891                for (let h = 0; h < o; ) {
 23892                  const u = t[h++];
 23893                  let d = null;
 23894                  if (12 === u) {
 23895                    const e = t[h++];
 23896                    if (0 === e) {
 23897                      t[h - 2] = 139;
 23898                      t[h - 1] = 22;
 23899                      i = 0;
 23900                    } else d = l[e];
 23901                  } else if (28 === u) {
 23902                    s[i] = ((t[h] << 24) | (t[h + 1] << 16)) >> 16;
 23903                    h += 2;
 23904                    i++;
 23905                  } else if (14 === u) {
 23906                    if (i >= 4) {
 23907                      i -= 4;
 23908                      if (this.seacAnalysisEnabled) {
 23909                        e.seac = s.slice(i, i + 4);
 23910                        return !1;
 23911                      }
 23912                    }
 23913                    d = c[u];
 23914                  } else if (u >= 32 && u <= 246) {
 23915                    s[i] = u - 139;
 23916                    i++;
 23917                  } else if (u >= 247 && u <= 254) {
 23918                    s[i] =
 23919                      u < 251
 23920                        ? ((u - 247) << 8) + t[h] + 108
 23921                        : -((u - 251) << 8) - t[h] - 108;
 23922                    h++;
 23923                    i++;
 23924                  } else if (255 === u) {
 23925                    s[i] =
 23926                      ((t[h] << 24) |
 23927                        (t[h + 1] << 16) |
 23928                        (t[h + 2] << 8) |
 23929                        t[h + 3]) /
 23930                      65536;
 23931                    h += 4;
 23932                    i++;
 23933                  } else if (19 === u || 20 === u) {
 23934                    e.hints += i >> 1;
 23935                    if (0 === e.hints) {
 23936                      t.copyWithin(h - 1, h, -1);
 23937                      h -= 1;
 23938                      o -= 1;
 23939                      continue;
 23940                    }
 23941                    h += (e.hints + 7) >> 3;
 23942                    i %= 2;
 23943                    d = c[u];
 23944                  } else {
 23945                    if (10 === u || 29 === u) {
 23946                      const t = 10 === u ? a : n;
 23947                      if (!t) {
 23948                        d = c[u];
 23949                        (0, r.warn)("Missing subrsIndex for " + d.id);
 23950                        return !1;
 23951                      }
 23952                      let o = 32768;
 23953                      t.count < 1240 ? (o = 107) : t.count < 33900 && (o = 1131);
 23954                      const l = s[--i] + o;
 23955                      if (l < 0 || l >= t.count || isNaN(l)) {
 23956                        d = c[u];
 23957                        (0, r.warn)("Out of bounds subrIndex for " + d.id);
 23958                        return !1;
 23959                      }
 23960                      e.stackSize = i;
 23961                      e.callDepth++;
 23962                      if (!this.parseCharString(e, t.get(l), a, n)) return !1;
 23963                      e.callDepth--;
 23964                      i = e.stackSize;
 23965                      continue;
 23966                    }
 23967                    if (11 === u) {
 23968                      e.stackSize = i;
 23969                      return !0;
 23970                    }
 23971                    if (0 === u && h === t.length) {
 23972                      t[h - 1] = 14;
 23973                      d = c[14];
 23974                    } else {
 23975                      if (9 === u) {
 23976                        t.copyWithin(h - 1, h, -1);
 23977                        h -= 1;
 23978                        o -= 1;
 23979                        continue;
 23980                      }
 23981                      d = c[u];
 23982                    }
 23983                  }
 23984                  if (d) {
 23985                    if (d.stem) {
 23986                      e.hints += i >> 1;
 23987                      if (3 === u || 23 === u) e.hasVStems = !0;
 23988                      else if (e.hasVStems && (1 === u || 18 === u)) {
 23989                        (0, r.warn)("CFF stem hints are in wrong order");
 23990                        t[h - 1] = 1 === u ? 3 : 23;
 23991                      }
 23992                    }
 23993                    if ("min" in d && !e.undefStack && i < d.min) {
 23994                      (0, r.warn)(
 23995                        "Not enough parameters for " +
 23996                          d.id +
 23997                          "; actual: " +
 23998                          i +
 23999                          ", expected: " +
 24000                          d.min,
 24001                      );
 24002                      if (0 === i) {
 24003                        t[h - 1] = 14;
 24004                        return !0;
 24005                      }
 24006                      return !1;
 24007                    }
 24008                    if (e.firstStackClearing && d.stackClearing) {
 24009                      e.firstStackClearing = !1;
 24010                      i -= d.min;
 24011                      i >= 2 && d.stem
 24012                        ? (i %= 2)
 24013                        : i > 1 &&
 24014                          (0, r.warn)(
 24015                            "Found too many parameters for stack-clearing command",
 24016                          );
 24017                      i > 0 && (e.width = s[i - 1]);
 24018                    }
 24019                    if ("stackDelta" in d) {
 24020                      "stackFn" in d && d.stackFn(s, i);
 24021                      i += d.stackDelta;
 24022                    } else if (d.stackClearing) i = 0;
 24023                    else if (d.resetStack) {
 24024                      i = 0;
 24025                      e.undefStack = !1;
 24026                    } else if (d.undefStack) {
 24027                      i = 0;
 24028                      e.undefStack = !0;
 24029                      e.firstStackClearing = !1;
 24030                    }
 24031                  }
 24032                }
 24033                o < t.length && t.fill(14, o);
 24034                e.stackSize = i;
 24035                return !0;
 24036              }
 24037              parseCharStrings({
 24038                charStrings: e,
 24039                localSubrIndex: t,
 24040                globalSubrIndex: a,
 24041                fdSelect: n,
 24042                fdArray: i,
 24043                privateDict: s,
 24044              }) {
 24045                const o = [],
 24046                  c = [],
 24047                  l = e.count;
 24048                for (let h = 0; h < l; h++) {
 24049                  const l = e.get(h),
 24050                    u = {
 24051                      callDepth: 0,
 24052                      stackSize: 0,
 24053                      stack: [],
 24054                      undefStack: !0,
 24055                      hints: 0,
 24056                      firstStackClearing: !0,
 24057                      seac: null,
 24058                      width: null,
 24059                      hasVStems: !1,
 24060                    };
 24061                  let d = !0,
 24062                    f = null,
 24063                    g = s;
 24064                  if (n && i.length) {
 24065                    const e = n.getFDIndex(h);
 24066                    if (-1 === e) {
 24067                      (0, r.warn)("Glyph index is not in fd select.");
 24068                      d = !1;
 24069                    }
 24070                    if (e >= i.length) {
 24071                      (0, r.warn)("Invalid fd index for glyph index.");
 24072                      d = !1;
 24073                    }
 24074                    if (d) {
 24075                      g = i[e].privateDict;
 24076                      f = g.subrsIndex;
 24077                    }
 24078                  } else t && (f = t);
 24079                  d && (d = this.parseCharString(u, l, f, a));
 24080                  if (null !== u.width) {
 24081                    const e = g.getByName("nominalWidthX");
 24082                    c[h] = e + u.width;
 24083                  } else {
 24084                    const e = g.getByName("defaultWidthX");
 24085                    c[h] = e;
 24086                  }
 24087                  null !== u.seac && (o[h] = u.seac);
 24088                  d || e.set(h, new Uint8Array([14]));
 24089                }
 24090                return { charStrings: e, seacs: o, widths: c };
 24091              }
 24092              emptyPrivateDictionary(e) {
 24093                const t = this.createDict(CFFPrivateDict, [], e.strings);
 24094                e.setByKey(18, [0, 0]);
 24095                e.privateDict = t;
 24096              }
 24097              parsePrivateDict(e) {
 24098                if (!e.hasName("Private")) {
 24099                  this.emptyPrivateDictionary(e);
 24100                  return;
 24101                }
 24102                const t = e.getByName("Private");
 24103                if (!Array.isArray(t) || 2 !== t.length) {
 24104                  e.removeByName("Private");
 24105                  return;
 24106                }
 24107                const a = t[0],
 24108                  r = t[1];
 24109                if (0 === a || r >= this.bytes.length) {
 24110                  this.emptyPrivateDictionary(e);
 24111                  return;
 24112                }
 24113                const n = r + a,
 24114                  i = this.bytes.subarray(r, n),
 24115                  s = this.parseDict(i),
 24116                  o = this.createDict(CFFPrivateDict, s, e.strings);
 24117                e.privateDict = o;
 24118                0 === o.getByName("ExpansionFactor") &&
 24119                  o.setByName("ExpansionFactor", 0.06);
 24120                if (!o.getByName("Subrs")) return;
 24121                const c = o.getByName("Subrs"),
 24122                  l = r + c;
 24123                if (0 === c || l >= this.bytes.length) {
 24124                  this.emptyPrivateDictionary(e);
 24125                  return;
 24126                }
 24127                const h = this.parseIndex(l);
 24128                o.subrsIndex = h.obj;
 24129              }
 24130              parseCharsets(e, t, a, i) {
 24131                if (0 === e)
 24132                  return new CFFCharset(!0, d.ISO_ADOBE, n.ISOAdobeCharset);
 24133                if (1 === e) return new CFFCharset(!0, d.EXPERT, n.ExpertCharset);
 24134                if (2 === e)
 24135                  return new CFFCharset(
 24136                    !0,
 24137                    d.EXPERT_SUBSET,
 24138                    n.ExpertSubsetCharset,
 24139                  );
 24140                const s = this.bytes,
 24141                  o = e,
 24142                  c = s[e++],
 24143                  l = [i ? 0 : ".notdef"];
 24144                let h, u, f;
 24145                t -= 1;
 24146                switch (c) {
 24147                  case 0:
 24148                    for (f = 0; f < t; f++) {
 24149                      h = (s[e++] << 8) | s[e++];
 24150                      l.push(i ? h : a.get(h));
 24151                    }
 24152                    break;
 24153                  case 1:
 24154                    for (; l.length <= t; ) {
 24155                      h = (s[e++] << 8) | s[e++];
 24156                      u = s[e++];
 24157                      for (f = 0; f <= u; f++) l.push(i ? h++ : a.get(h++));
 24158                    }
 24159                    break;
 24160                  case 2:
 24161                    for (; l.length <= t; ) {
 24162                      h = (s[e++] << 8) | s[e++];
 24163                      u = (s[e++] << 8) | s[e++];
 24164                      for (f = 0; f <= u; f++) l.push(i ? h++ : a.get(h++));
 24165                    }
 24166                    break;
 24167                  default:
 24168                    throw new r.FormatError("Unknown charset format");
 24169                }
 24170                const g = e,
 24171                  p = s.subarray(o, g);
 24172                return new CFFCharset(!1, c, l, p);
 24173              }
 24174              parseEncoding(e, t, a, n) {
 24175                const s = Object.create(null),
 24176                  o = this.bytes;
 24177                let c,
 24178                  l,
 24179                  h,
 24180                  u = !1,
 24181                  d = null;
 24182                if (0 === e || 1 === e) {
 24183                  u = !0;
 24184                  c = e;
 24185                  const t = e ? i.ExpertEncoding : i.StandardEncoding;
 24186                  for (l = 0, h = n.length; l < h; l++) {
 24187                    const e = t.indexOf(n[l]);
 24188                    -1 !== e && (s[e] = l);
 24189                  }
 24190                } else {
 24191                  const t = e;
 24192                  c = o[e++];
 24193                  switch (127 & c) {
 24194                    case 0:
 24195                      const t = o[e++];
 24196                      for (l = 1; l <= t; l++) s[o[e++]] = l;
 24197                      break;
 24198                    case 1:
 24199                      const a = o[e++];
 24200                      let n = 1;
 24201                      for (l = 0; l < a; l++) {
 24202                        const t = o[e++],
 24203                          a = o[e++];
 24204                        for (let e = t; e <= t + a; e++) s[e] = n++;
 24205                      }
 24206                      break;
 24207                    default:
 24208                      throw new r.FormatError(
 24209                        `Unknown encoding format: ${c} in CFF`,
 24210                      );
 24211                  }
 24212                  const i = e;
 24213                  if (128 & c) {
 24214                    o[t] &= 127;
 24215                    !(function readSupplement() {
 24216                      const t = o[e++];
 24217                      for (l = 0; l < t; l++) {
 24218                        const t = o[e++],
 24219                          r = (o[e++] << 8) + (255 & o[e++]);
 24220                        s[t] = n.indexOf(a.get(r));
 24221                      }
 24222                    })();
 24223                  }
 24224                  d = o.subarray(t, i);
 24225                }
 24226                c &= 127;
 24227                return new CFFEncoding(u, c, s, d);
 24228              }
 24229              parseFDSelect(e, t) {
 24230                const a = this.bytes,
 24231                  n = a[e++],
 24232                  i = [];
 24233                let s;
 24234                switch (n) {
 24235                  case 0:
 24236                    for (s = 0; s < t; ++s) {
 24237                      const t = a[e++];
 24238                      i.push(t);
 24239                    }
 24240                    break;
 24241                  case 3:
 24242                    const o = (a[e++] << 8) | a[e++];
 24243                    for (s = 0; s < o; ++s) {
 24244                      let t = (a[e++] << 8) | a[e++];
 24245                      if (0 === s && 0 !== t) {
 24246                        (0, r.warn)(
 24247                          "parseFDSelect: The first range must have a first GID of 0 -- trying to recover.",
 24248                        );
 24249                        t = 0;
 24250                      }
 24251                      const n = a[e++],
 24252                        o = (a[e] << 8) | a[e + 1];
 24253                      for (let e = t; e < o; ++e) i.push(n);
 24254                    }
 24255                    e += 2;
 24256                    break;
 24257                  default:
 24258                    throw new r.FormatError(
 24259                      `parseFDSelect: Unknown format "${n}".`,
 24260                    );
 24261                }
 24262                if (i.length !== t)
 24263                  throw new r.FormatError("parseFDSelect: Invalid font data.");
 24264                return new CFFFDSelect(n, i);
 24265              }
 24266            };
 24267            class CFF {
 24268              constructor() {
 24269                this.header = null;
 24270                this.names = [];
 24271                this.topDict = null;
 24272                this.strings = new CFFStrings();
 24273                this.globalSubrIndex = null;
 24274                this.encoding = null;
 24275                this.charset = null;
 24276                this.charStrings = null;
 24277                this.fdArray = [];
 24278                this.fdSelect = null;
 24279                this.isCIDFont = !1;
 24280              }
 24281              duplicateFirstGlyph() {
 24282                if (this.charStrings.count >= 65535) {
 24283                  (0, r.warn)(
 24284                    "Not enough space in charstrings to duplicate first glyph.",
 24285                  );
 24286                  return;
 24287                }
 24288                const e = this.charStrings.get(0);
 24289                this.charStrings.add(e);
 24290                this.isCIDFont &&
 24291                  this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0]);
 24292              }
 24293              hasGlyphId(e) {
 24294                if (e < 0 || e >= this.charStrings.count) return !1;
 24295                return this.charStrings.get(e).length > 0;
 24296              }
 24297            }
 24298            t.CFF = CFF;
 24299            class CFFHeader {
 24300              constructor(e, t, a, r) {
 24301                this.major = e;
 24302                this.minor = t;
 24303                this.hdrSize = a;
 24304                this.offSize = r;
 24305              }
 24306            }
 24307            t.CFFHeader = CFFHeader;
 24308            class CFFStrings {
 24309              constructor() {
 24310                this.strings = [];
 24311              }
 24312              get(e) {
 24313                return e >= 0 && e <= 390
 24314                  ? s[e]
 24315                  : e - o <= this.strings.length
 24316                    ? this.strings[e - o]
 24317                    : s[0];
 24318              }
 24319              getSID(e) {
 24320                let t = s.indexOf(e);
 24321                if (-1 !== t) return t;
 24322                t = this.strings.indexOf(e);
 24323                return -1 !== t ? t + o : -1;
 24324              }
 24325              add(e) {
 24326                this.strings.push(e);
 24327              }
 24328              get count() {
 24329                return this.strings.length;
 24330              }
 24331            }
 24332            t.CFFStrings = CFFStrings;
 24333            class CFFIndex {
 24334              constructor() {
 24335                this.objects = [];
 24336                this.length = 0;
 24337              }
 24338              add(e) {
 24339                this.length += e.length;
 24340                this.objects.push(e);
 24341              }
 24342              set(e, t) {
 24343                this.length += t.length - this.objects[e].length;
 24344                this.objects[e] = t;
 24345              }
 24346              get(e) {
 24347                return this.objects[e];
 24348              }
 24349              get count() {
 24350                return this.objects.length;
 24351              }
 24352            }
 24353            t.CFFIndex = CFFIndex;
 24354            class CFFDict {
 24355              constructor(e, t) {
 24356                this.keyToNameMap = e.keyToNameMap;
 24357                this.nameToKeyMap = e.nameToKeyMap;
 24358                this.defaults = e.defaults;
 24359                this.types = e.types;
 24360                this.opcodes = e.opcodes;
 24361                this.order = e.order;
 24362                this.strings = t;
 24363                this.values = Object.create(null);
 24364              }
 24365              setByKey(e, t) {
 24366                if (!(e in this.keyToNameMap)) return !1;
 24367                if (0 === t.length) return !0;
 24368                for (const a of t)
 24369                  if (isNaN(a)) {
 24370                    (0, r.warn)(`Invalid CFFDict value: "${t}" for key "${e}".`);
 24371                    return !0;
 24372                  }
 24373                const a = this.types[e];
 24374                ("num" !== a && "sid" !== a && "offset" !== a) || (t = t[0]);
 24375                this.values[e] = t;
 24376                return !0;
 24377              }
 24378              setByName(e, t) {
 24379                if (!(e in this.nameToKeyMap))
 24380                  throw new r.FormatError(`Invalid dictionary name "${e}"`);
 24381                this.values[this.nameToKeyMap[e]] = t;
 24382              }
 24383              hasName(e) {
 24384                return this.nameToKeyMap[e] in this.values;
 24385              }
 24386              getByName(e) {
 24387                if (!(e in this.nameToKeyMap))
 24388                  throw new r.FormatError(`Invalid dictionary name ${e}"`);
 24389                const t = this.nameToKeyMap[e];
 24390                return t in this.values ? this.values[t] : this.defaults[t];
 24391              }
 24392              removeByName(e) {
 24393                delete this.values[this.nameToKeyMap[e]];
 24394              }
 24395              static createTables(e) {
 24396                const t = {
 24397                  keyToNameMap: {},
 24398                  nameToKeyMap: {},
 24399                  defaults: {},
 24400                  types: {},
 24401                  opcodes: {},
 24402                  order: [],
 24403                };
 24404                for (const a of e) {
 24405                  const e = Array.isArray(a[0]) ? (a[0][0] << 8) + a[0][1] : a[0];
 24406                  t.keyToNameMap[e] = a[1];
 24407                  t.nameToKeyMap[a[1]] = e;
 24408                  t.types[e] = a[2];
 24409                  t.defaults[e] = a[3];
 24410                  t.opcodes[e] = Array.isArray(a[0]) ? a[0] : [a[0]];
 24411                  t.order.push(e);
 24412                }
 24413                return t;
 24414              }
 24415            }
 24416            const h = [
 24417              [[12, 30], "ROS", ["sid", "sid", "num"], null],
 24418              [[12, 20], "SyntheticBase", "num", null],
 24419              [0, "version", "sid", null],
 24420              [1, "Notice", "sid", null],
 24421              [[12, 0], "Copyright", "sid", null],
 24422              [2, "FullName", "sid", null],
 24423              [3, "FamilyName", "sid", null],
 24424              [4, "Weight", "sid", null],
 24425              [[12, 1], "isFixedPitch", "num", 0],
 24426              [[12, 2], "ItalicAngle", "num", 0],
 24427              [[12, 3], "UnderlinePosition", "num", -100],
 24428              [[12, 4], "UnderlineThickness", "num", 50],
 24429              [[12, 5], "PaintType", "num", 0],
 24430              [[12, 6], "CharstringType", "num", 2],
 24431              [
 24432                [12, 7],
 24433                "FontMatrix",
 24434                ["num", "num", "num", "num", "num", "num"],
 24435                [0.001, 0, 0, 0.001, 0, 0],
 24436              ],
 24437              [13, "UniqueID", "num", null],
 24438              [5, "FontBBox", ["num", "num", "num", "num"], [0, 0, 0, 0]],
 24439              [[12, 8], "StrokeWidth", "num", 0],
 24440              [14, "XUID", "array", null],
 24441              [15, "charset", "offset", 0],
 24442              [16, "Encoding", "offset", 0],
 24443              [17, "CharStrings", "offset", 0],
 24444              [18, "Private", ["offset", "offset"], null],
 24445              [[12, 21], "PostScript", "sid", null],
 24446              [[12, 22], "BaseFontName", "sid", null],
 24447              [[12, 23], "BaseFontBlend", "delta", null],
 24448              [[12, 31], "CIDFontVersion", "num", 0],
 24449              [[12, 32], "CIDFontRevision", "num", 0],
 24450              [[12, 33], "CIDFontType", "num", 0],
 24451              [[12, 34], "CIDCount", "num", 8720],
 24452              [[12, 35], "UIDBase", "num", null],
 24453              [[12, 37], "FDSelect", "offset", null],
 24454              [[12, 36], "FDArray", "offset", null],
 24455              [[12, 38], "FontName", "sid", null],
 24456            ];
 24457            class CFFTopDict extends CFFDict {
 24458              static get tables() {
 24459                return (0, r.shadow)(this, "tables", this.createTables(h));
 24460              }
 24461              constructor(e) {
 24462                super(CFFTopDict.tables, e);
 24463                this.privateDict = null;
 24464              }
 24465            }
 24466            t.CFFTopDict = CFFTopDict;
 24467            const u = [
 24468              [6, "BlueValues", "delta", null],
 24469              [7, "OtherBlues", "delta", null],
 24470              [8, "FamilyBlues", "delta", null],
 24471              [9, "FamilyOtherBlues", "delta", null],
 24472              [[12, 9], "BlueScale", "num", 0.039625],
 24473              [[12, 10], "BlueShift", "num", 7],
 24474              [[12, 11], "BlueFuzz", "num", 1],
 24475              [10, "StdHW", "num", null],
 24476              [11, "StdVW", "num", null],
 24477              [[12, 12], "StemSnapH", "delta", null],
 24478              [[12, 13], "StemSnapV", "delta", null],
 24479              [[12, 14], "ForceBold", "num", 0],
 24480              [[12, 17], "LanguageGroup", "num", 0],
 24481              [[12, 18], "ExpansionFactor", "num", 0.06],
 24482              [[12, 19], "initialRandomSeed", "num", 0],
 24483              [20, "defaultWidthX", "num", 0],
 24484              [21, "nominalWidthX", "num", 0],
 24485              [19, "Subrs", "offset", null],
 24486            ];
 24487            class CFFPrivateDict extends CFFDict {
 24488              static get tables() {
 24489                return (0, r.shadow)(this, "tables", this.createTables(u));
 24490              }
 24491              constructor(e) {
 24492                super(CFFPrivateDict.tables, e);
 24493                this.subrsIndex = null;
 24494              }
 24495            }
 24496            t.CFFPrivateDict = CFFPrivateDict;
 24497            const d = { ISO_ADOBE: 0, EXPERT: 1, EXPERT_SUBSET: 2 };
 24498            class CFFCharset {
 24499              constructor(e, t, a, r) {
 24500                this.predefined = e;
 24501                this.format = t;
 24502                this.charset = a;
 24503                this.raw = r;
 24504              }
 24505            }
 24506            t.CFFCharset = CFFCharset;
 24507            class CFFEncoding {
 24508              constructor(e, t, a, r) {
 24509                this.predefined = e;
 24510                this.format = t;
 24511                this.encoding = a;
 24512                this.raw = r;
 24513              }
 24514            }
 24515            class CFFFDSelect {
 24516              constructor(e, t) {
 24517                this.format = e;
 24518                this.fdSelect = t;
 24519              }
 24520              getFDIndex(e) {
 24521                return e < 0 || e >= this.fdSelect.length ? -1 : this.fdSelect[e];
 24522              }
 24523            }
 24524            t.CFFFDSelect = CFFFDSelect;
 24525            class CFFOffsetTracker {
 24526              constructor() {
 24527                this.offsets = Object.create(null);
 24528              }
 24529              isTracking(e) {
 24530                return e in this.offsets;
 24531              }
 24532              track(e, t) {
 24533                if (e in this.offsets)
 24534                  throw new r.FormatError(`Already tracking location of ${e}`);
 24535                this.offsets[e] = t;
 24536              }
 24537              offset(e) {
 24538                for (const t in this.offsets) this.offsets[t] += e;
 24539              }
 24540              setEntryLocation(e, t, a) {
 24541                if (!(e in this.offsets))
 24542                  throw new r.FormatError(`Not tracking location of ${e}`);
 24543                const n = a.data,
 24544                  i = this.offsets[e];
 24545                for (let e = 0, a = t.length; e < a; ++e) {
 24546                  const a = 5 * e + i,
 24547                    s = a + 1,
 24548                    o = a + 2,
 24549                    c = a + 3,
 24550                    l = a + 4;
 24551                  if (
 24552                    29 !== n[a] ||
 24553                    0 !== n[s] ||
 24554                    0 !== n[o] ||
 24555                    0 !== n[c] ||
 24556                    0 !== n[l]
 24557                  )
 24558                    throw new r.FormatError(
 24559                      "writing to an offset that is not empty",
 24560                    );
 24561                  const h = t[e];
 24562                  n[a] = 29;
 24563                  n[s] = (h >> 24) & 255;
 24564                  n[o] = (h >> 16) & 255;
 24565                  n[c] = (h >> 8) & 255;
 24566                  n[l] = 255 & h;
 24567                }
 24568              }
 24569            }
 24570            class CFFCompiler {
 24571              constructor(e) {
 24572                this.cff = e;
 24573              }
 24574              compile() {
 24575                const e = this.cff,
 24576                  t = {
 24577                    data: [],
 24578                    length: 0,
 24579                    add(e) {
 24580                      try {
 24581                        this.data.push(...e);
 24582                      } catch {
 24583                        this.data = this.data.concat(e);
 24584                      }
 24585                      this.length = this.data.length;
 24586                    },
 24587                  },
 24588                  a = this.compileHeader(e.header);
 24589                t.add(a);
 24590                const n = this.compileNameIndex(e.names);
 24591                t.add(n);
 24592                if (e.isCIDFont && e.topDict.hasName("FontMatrix")) {
 24593                  const t = e.topDict.getByName("FontMatrix");
 24594                  e.topDict.removeByName("FontMatrix");
 24595                  for (const a of e.fdArray) {
 24596                    let e = t.slice(0);
 24597                    a.hasName("FontMatrix") &&
 24598                      (e = r.Util.transform(e, a.getByName("FontMatrix")));
 24599                    a.setByName("FontMatrix", e);
 24600                  }
 24601                }
 24602                const i = e.topDict.getByName("XUID");
 24603                i?.length > 16 && e.topDict.removeByName("XUID");
 24604                e.topDict.setByName("charset", 0);
 24605                let s = this.compileTopDicts([e.topDict], t.length, e.isCIDFont);
 24606                t.add(s.output);
 24607                const o = s.trackers[0],
 24608                  c = this.compileStringIndex(e.strings.strings);
 24609                t.add(c);
 24610                const l = this.compileIndex(e.globalSubrIndex);
 24611                t.add(l);
 24612                if (e.encoding && e.topDict.hasName("Encoding"))
 24613                  if (e.encoding.predefined)
 24614                    o.setEntryLocation("Encoding", [e.encoding.format], t);
 24615                  else {
 24616                    const a = this.compileEncoding(e.encoding);
 24617                    o.setEntryLocation("Encoding", [t.length], t);
 24618                    t.add(a);
 24619                  }
 24620                const h = this.compileCharset(
 24621                  e.charset,
 24622                  e.charStrings.count,
 24623                  e.strings,
 24624                  e.isCIDFont,
 24625                );
 24626                o.setEntryLocation("charset", [t.length], t);
 24627                t.add(h);
 24628                const u = this.compileCharStrings(e.charStrings);
 24629                o.setEntryLocation("CharStrings", [t.length], t);
 24630                t.add(u);
 24631                if (e.isCIDFont) {
 24632                  o.setEntryLocation("FDSelect", [t.length], t);
 24633                  const a = this.compileFDSelect(e.fdSelect);
 24634                  t.add(a);
 24635                  s = this.compileTopDicts(e.fdArray, t.length, !0);
 24636                  o.setEntryLocation("FDArray", [t.length], t);
 24637                  t.add(s.output);
 24638                  const r = s.trackers;
 24639                  this.compilePrivateDicts(e.fdArray, r, t);
 24640                }
 24641                this.compilePrivateDicts([e.topDict], [o], t);
 24642                t.add([0]);
 24643                return t.data;
 24644              }
 24645              encodeNumber(e) {
 24646                return Number.isInteger(e)
 24647                  ? this.encodeInteger(e)
 24648                  : this.encodeFloat(e);
 24649              }
 24650              static get EncodeFloatRegExp() {
 24651                return (0, r.shadow)(
 24652                  this,
 24653                  "EncodeFloatRegExp",
 24654                  /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/,
 24655                );
 24656              }
 24657              encodeFloat(e) {
 24658                let t = e.toString();
 24659                const a = CFFCompiler.EncodeFloatRegExp.exec(t);
 24660                if (a) {
 24661                  const r = parseFloat("1e" + ((a[2] ? +a[2] : 0) + a[1].length));
 24662                  t = (Math.round(e * r) / r).toString();
 24663                }
 24664                let r,
 24665                  n,
 24666                  i = "";
 24667                for (r = 0, n = t.length; r < n; ++r) {
 24668                  const e = t[r];
 24669                  i +=
 24670                    "e" === e
 24671                      ? "-" === t[++r]
 24672                        ? "c"
 24673                        : "b"
 24674                      : "." === e
 24675                        ? "a"
 24676                        : "-" === e
 24677                          ? "e"
 24678                          : e;
 24679                }
 24680                i += 1 & i.length ? "f" : "ff";
 24681                const s = [30];
 24682                for (r = 0, n = i.length; r < n; r += 2)
 24683                  s.push(parseInt(i.substring(r, r + 2), 16));
 24684                return s;
 24685              }
 24686              encodeInteger(e) {
 24687                let t;
 24688                t =
 24689                  e >= -107 && e <= 107
 24690                    ? [e + 139]
 24691                    : e >= 108 && e <= 1131
 24692                      ? [247 + ((e -= 108) >> 8), 255 & e]
 24693                      : e >= -1131 && e <= -108
 24694                        ? [251 + ((e = -e - 108) >> 8), 255 & e]
 24695                        : e >= -32768 && e <= 32767
 24696                          ? [28, (e >> 8) & 255, 255 & e]
 24697                          : [
 24698                              29,
 24699                              (e >> 24) & 255,
 24700                              (e >> 16) & 255,
 24701                              (e >> 8) & 255,
 24702                              255 & e,
 24703                            ];
 24704                return t;
 24705              }
 24706              compileHeader(e) {
 24707                return [e.major, e.minor, 4, e.offSize];
 24708              }
 24709              compileNameIndex(e) {
 24710                const t = new CFFIndex();
 24711                for (const a of e) {
 24712                  const e = Math.min(a.length, 127);
 24713                  let n = new Array(e);
 24714                  for (let t = 0; t < e; t++) {
 24715                    let e = a[t];
 24716                    (e < "!" ||
 24717                      e > "~" ||
 24718                      "[" === e ||
 24719                      "]" === e ||
 24720                      "(" === e ||
 24721                      ")" === e ||
 24722                      "{" === e ||
 24723                      "}" === e ||
 24724                      "<" === e ||
 24725                      ">" === e ||
 24726                      "/" === e ||
 24727                      "%" === e) &&
 24728                      (e = "_");
 24729                    n[t] = e;
 24730                  }
 24731                  n = n.join("");
 24732                  "" === n && (n = "Bad_Font_Name");
 24733                  t.add((0, r.stringToBytes)(n));
 24734                }
 24735                return this.compileIndex(t);
 24736              }
 24737              compileTopDicts(e, t, a) {
 24738                const r = [];
 24739                let n = new CFFIndex();
 24740                for (const i of e) {
 24741                  if (a) {
 24742                    i.removeByName("CIDFontVersion");
 24743                    i.removeByName("CIDFontRevision");
 24744                    i.removeByName("CIDFontType");
 24745                    i.removeByName("CIDCount");
 24746                    i.removeByName("UIDBase");
 24747                  }
 24748                  const e = new CFFOffsetTracker(),
 24749                    s = this.compileDict(i, e);
 24750                  r.push(e);
 24751                  n.add(s);
 24752                  e.offset(t);
 24753                }
 24754                n = this.compileIndex(n, r);
 24755                return { trackers: r, output: n };
 24756              }
 24757              compilePrivateDicts(e, t, a) {
 24758                for (let n = 0, i = e.length; n < i; ++n) {
 24759                  const i = e[n],
 24760                    s = i.privateDict;
 24761                  if (!s || !i.hasName("Private"))
 24762                    throw new r.FormatError(
 24763                      "There must be a private dictionary.",
 24764                    );
 24765                  const o = new CFFOffsetTracker(),
 24766                    c = this.compileDict(s, o);
 24767                  let l = a.length;
 24768                  o.offset(l);
 24769                  c.length || (l = 0);
 24770                  t[n].setEntryLocation("Private", [c.length, l], a);
 24771                  a.add(c);
 24772                  if (s.subrsIndex && s.hasName("Subrs")) {
 24773                    const e = this.compileIndex(s.subrsIndex);
 24774                    o.setEntryLocation("Subrs", [c.length], a);
 24775                    a.add(e);
 24776                  }
 24777                }
 24778              }
 24779              compileDict(e, t) {
 24780                const a = [];
 24781                for (const n of e.order) {
 24782                  if (!(n in e.values)) continue;
 24783                  let i = e.values[n],
 24784                    s = e.types[n];
 24785                  Array.isArray(s) || (s = [s]);
 24786                  Array.isArray(i) || (i = [i]);
 24787                  if (0 !== i.length) {
 24788                    for (let o = 0, c = s.length; o < c; ++o) {
 24789                      const c = s[o],
 24790                        l = i[o];
 24791                      switch (c) {
 24792                        case "num":
 24793                        case "sid":
 24794                          a.push(...this.encodeNumber(l));
 24795                          break;
 24796                        case "offset":
 24797                          const s = e.keyToNameMap[n];
 24798                          t.isTracking(s) || t.track(s, a.length);
 24799                          a.push(29, 0, 0, 0, 0);
 24800                          break;
 24801                        case "array":
 24802                        case "delta":
 24803                          a.push(...this.encodeNumber(l));
 24804                          for (let e = 1, t = i.length; e < t; ++e)
 24805                            a.push(...this.encodeNumber(i[e]));
 24806                          break;
 24807                        default:
 24808                          throw new r.FormatError(`Unknown data type of ${c}`);
 24809                      }
 24810                    }
 24811                    a.push(...e.opcodes[n]);
 24812                  }
 24813                }
 24814                return a;
 24815              }
 24816              compileStringIndex(e) {
 24817                const t = new CFFIndex();
 24818                for (const a of e) t.add((0, r.stringToBytes)(a));
 24819                return this.compileIndex(t);
 24820              }
 24821              compileCharStrings(e) {
 24822                const t = new CFFIndex();
 24823                for (let a = 0; a < e.count; a++) {
 24824                  const r = e.get(a);
 24825                  0 !== r.length ? t.add(r) : t.add(new Uint8Array([139, 14]));
 24826                }
 24827                return this.compileIndex(t);
 24828              }
 24829              compileCharset(e, t, a, n) {
 24830                let i;
 24831                const s = t - 1;
 24832                if (n) i = new Uint8Array([2, 0, 0, (s >> 8) & 255, 255 & s]);
 24833                else {
 24834                  i = new Uint8Array(1 + 2 * s);
 24835                  i[0] = 0;
 24836                  let t = 0;
 24837                  const n = e.charset.length;
 24838                  let o = !1;
 24839                  for (let s = 1; s < i.length; s += 2) {
 24840                    let c = 0;
 24841                    if (t < n) {
 24842                      const n = e.charset[t++];
 24843                      c = a.getSID(n);
 24844                      if (-1 === c) {
 24845                        c = 0;
 24846                        if (!o) {
 24847                          o = !0;
 24848                          (0, r.warn)(`Couldn't find ${n} in CFF strings`);
 24849                        }
 24850                      }
 24851                    }
 24852                    i[s] = (c >> 8) & 255;
 24853                    i[s + 1] = 255 & c;
 24854                  }
 24855                }
 24856                return this.compileTypedArray(i);
 24857              }
 24858              compileEncoding(e) {
 24859                return this.compileTypedArray(e.raw);
 24860              }
 24861              compileFDSelect(e) {
 24862                const t = e.format;
 24863                let a, r;
 24864                switch (t) {
 24865                  case 0:
 24866                    a = new Uint8Array(1 + e.fdSelect.length);
 24867                    a[0] = t;
 24868                    for (r = 0; r < e.fdSelect.length; r++)
 24869                      a[r + 1] = e.fdSelect[r];
 24870                    break;
 24871                  case 3:
 24872                    const n = 0;
 24873                    let i = e.fdSelect[0];
 24874                    const s = [t, 0, 0, (n >> 8) & 255, 255 & n, i];
 24875                    for (r = 1; r < e.fdSelect.length; r++) {
 24876                      const t = e.fdSelect[r];
 24877                      if (t !== i) {
 24878                        s.push((r >> 8) & 255, 255 & r, t);
 24879                        i = t;
 24880                      }
 24881                    }
 24882                    const o = (s.length - 3) / 3;
 24883                    s[1] = (o >> 8) & 255;
 24884                    s[2] = 255 & o;
 24885                    s.push((r >> 8) & 255, 255 & r);
 24886                    a = new Uint8Array(s);
 24887                }
 24888                return this.compileTypedArray(a);
 24889              }
 24890              compileTypedArray(e) {
 24891                return Array.from(e);
 24892              }
 24893              compileIndex(e, t = []) {
 24894                const a = e.objects,
 24895                  r = a.length;
 24896                if (0 === r) return [0, 0];
 24897                const n = [(r >> 8) & 255, 255 & r];
 24898                let i,
 24899                  s,
 24900                  o = 1;
 24901                for (i = 0; i < r; ++i) o += a[i].length;
 24902                s = o < 256 ? 1 : o < 65536 ? 2 : o < 16777216 ? 3 : 4;
 24903                n.push(s);
 24904                let c = 1;
 24905                for (i = 0; i < r + 1; i++) {
 24906                  1 === s
 24907                    ? n.push(255 & c)
 24908                    : 2 === s
 24909                      ? n.push((c >> 8) & 255, 255 & c)
 24910                      : 3 === s
 24911                        ? n.push((c >> 16) & 255, (c >> 8) & 255, 255 & c)
 24912                        : n.push(
 24913                            (c >>> 24) & 255,
 24914                            (c >> 16) & 255,
 24915                            (c >> 8) & 255,
 24916                            255 & c,
 24917                          );
 24918                  a[i] && (c += a[i].length);
 24919                }
 24920                for (i = 0; i < r; i++) {
 24921                  t[i] && t[i].offset(n.length);
 24922                  n.push(...a[i]);
 24923                }
 24924                return n;
 24925              }
 24926            }
 24927            t.CFFCompiler = CFFCompiler;
 24928          },
 24929          (e, t) => {
 24930            Object.defineProperty(t, "__esModule", { value: !0 });
 24931            t.ISOAdobeCharset = t.ExpertSubsetCharset = t.ExpertCharset = void 0;
 24932            t.ISOAdobeCharset = [
 24933              ".notdef",
 24934              "space",
 24935              "exclam",
 24936              "quotedbl",
 24937              "numbersign",
 24938              "dollar",
 24939              "percent",
 24940              "ampersand",
 24941              "quoteright",
 24942              "parenleft",
 24943              "parenright",
 24944              "asterisk",
 24945              "plus",
 24946              "comma",
 24947              "hyphen",
 24948              "period",
 24949              "slash",
 24950              "zero",
 24951              "one",
 24952              "two",
 24953              "three",
 24954              "four",
 24955              "five",
 24956              "six",
 24957              "seven",
 24958              "eight",
 24959              "nine",
 24960              "colon",
 24961              "semicolon",
 24962              "less",
 24963              "equal",
 24964              "greater",
 24965              "question",
 24966              "at",
 24967              "A",
 24968              "B",
 24969              "C",
 24970              "D",
 24971              "E",
 24972              "F",
 24973              "G",
 24974              "H",
 24975              "I",
 24976              "J",
 24977              "K",
 24978              "L",
 24979              "M",
 24980              "N",
 24981              "O",
 24982              "P",
 24983              "Q",
 24984              "R",
 24985              "S",
 24986              "T",
 24987              "U",
 24988              "V",
 24989              "W",
 24990              "X",
 24991              "Y",
 24992              "Z",
 24993              "bracketleft",
 24994              "backslash",
 24995              "bracketright",
 24996              "asciicircum",
 24997              "underscore",
 24998              "quoteleft",
 24999              "a",
 25000              "b",
 25001              "c",
 25002              "d",
 25003              "e",
 25004              "f",
 25005              "g",
 25006              "h",
 25007              "i",
 25008              "j",
 25009              "k",
 25010              "l",
 25011              "m",
 25012              "n",
 25013              "o",
 25014              "p",
 25015              "q",
 25016              "r",
 25017              "s",
 25018              "t",
 25019              "u",
 25020              "v",
 25021              "w",
 25022              "x",
 25023              "y",
 25024              "z",
 25025              "braceleft",
 25026              "bar",
 25027              "braceright",
 25028              "asciitilde",
 25029              "exclamdown",
 25030              "cent",
 25031              "sterling",
 25032              "fraction",
 25033              "yen",
 25034              "florin",
 25035              "section",
 25036              "currency",
 25037              "quotesingle",
 25038              "quotedblleft",
 25039              "guillemotleft",
 25040              "guilsinglleft",
 25041              "guilsinglright",
 25042              "fi",
 25043              "fl",
 25044              "endash",
 25045              "dagger",
 25046              "daggerdbl",
 25047              "periodcentered",
 25048              "paragraph",
 25049              "bullet",
 25050              "quotesinglbase",
 25051              "quotedblbase",
 25052              "quotedblright",
 25053              "guillemotright",
 25054              "ellipsis",
 25055              "perthousand",
 25056              "questiondown",
 25057              "grave",
 25058              "acute",
 25059              "circumflex",
 25060              "tilde",
 25061              "macron",
 25062              "breve",
 25063              "dotaccent",
 25064              "dieresis",
 25065              "ring",
 25066              "cedilla",
 25067              "hungarumlaut",
 25068              "ogonek",
 25069              "caron",
 25070              "emdash",
 25071              "AE",
 25072              "ordfeminine",
 25073              "Lslash",
 25074              "Oslash",
 25075              "OE",
 25076              "ordmasculine",
 25077              "ae",
 25078              "dotlessi",
 25079              "lslash",
 25080              "oslash",
 25081              "oe",
 25082              "germandbls",
 25083              "onesuperior",
 25084              "logicalnot",
 25085              "mu",
 25086              "trademark",
 25087              "Eth",
 25088              "onehalf",
 25089              "plusminus",
 25090              "Thorn",
 25091              "onequarter",
 25092              "divide",
 25093              "brokenbar",
 25094              "degree",
 25095              "thorn",
 25096              "threequarters",
 25097              "twosuperior",
 25098              "registered",
 25099              "minus",
 25100              "eth",
 25101              "multiply",
 25102              "threesuperior",
 25103              "copyright",
 25104              "Aacute",
 25105              "Acircumflex",
 25106              "Adieresis",
 25107              "Agrave",
 25108              "Aring",
 25109              "Atilde",
 25110              "Ccedilla",
 25111              "Eacute",
 25112              "Ecircumflex",
 25113              "Edieresis",
 25114              "Egrave",
 25115              "Iacute",
 25116              "Icircumflex",
 25117              "Idieresis",
 25118              "Igrave",
 25119              "Ntilde",
 25120              "Oacute",
 25121              "Ocircumflex",
 25122              "Odieresis",
 25123              "Ograve",
 25124              "Otilde",
 25125              "Scaron",
 25126              "Uacute",
 25127              "Ucircumflex",
 25128              "Udieresis",
 25129              "Ugrave",
 25130              "Yacute",
 25131              "Ydieresis",
 25132              "Zcaron",
 25133              "aacute",
 25134              "acircumflex",
 25135              "adieresis",
 25136              "agrave",
 25137              "aring",
 25138              "atilde",
 25139              "ccedilla",
 25140              "eacute",
 25141              "ecircumflex",
 25142              "edieresis",
 25143              "egrave",
 25144              "iacute",
 25145              "icircumflex",
 25146              "idieresis",
 25147              "igrave",
 25148              "ntilde",
 25149              "oacute",
 25150              "ocircumflex",
 25151              "odieresis",
 25152              "ograve",
 25153              "otilde",
 25154              "scaron",
 25155              "uacute",
 25156              "ucircumflex",
 25157              "udieresis",
 25158              "ugrave",
 25159              "yacute",
 25160              "ydieresis",
 25161              "zcaron",
 25162            ];
 25163            t.ExpertCharset = [
 25164              ".notdef",
 25165              "space",
 25166              "exclamsmall",
 25167              "Hungarumlautsmall",
 25168              "dollaroldstyle",
 25169              "dollarsuperior",
 25170              "ampersandsmall",
 25171              "Acutesmall",
 25172              "parenleftsuperior",
 25173              "parenrightsuperior",
 25174              "twodotenleader",
 25175              "onedotenleader",
 25176              "comma",
 25177              "hyphen",
 25178              "period",
 25179              "fraction",
 25180              "zerooldstyle",
 25181              "oneoldstyle",
 25182              "twooldstyle",
 25183              "threeoldstyle",
 25184              "fouroldstyle",
 25185              "fiveoldstyle",
 25186              "sixoldstyle",
 25187              "sevenoldstyle",
 25188              "eightoldstyle",
 25189              "nineoldstyle",
 25190              "colon",
 25191              "semicolon",
 25192              "commasuperior",
 25193              "threequartersemdash",
 25194              "periodsuperior",
 25195              "questionsmall",
 25196              "asuperior",
 25197              "bsuperior",
 25198              "centsuperior",
 25199              "dsuperior",
 25200              "esuperior",
 25201              "isuperior",
 25202              "lsuperior",
 25203              "msuperior",
 25204              "nsuperior",
 25205              "osuperior",
 25206              "rsuperior",
 25207              "ssuperior",
 25208              "tsuperior",
 25209              "ff",
 25210              "fi",
 25211              "fl",
 25212              "ffi",
 25213              "ffl",
 25214              "parenleftinferior",
 25215              "parenrightinferior",
 25216              "Circumflexsmall",
 25217              "hyphensuperior",
 25218              "Gravesmall",
 25219              "Asmall",
 25220              "Bsmall",
 25221              "Csmall",
 25222              "Dsmall",
 25223              "Esmall",
 25224              "Fsmall",
 25225              "Gsmall",
 25226              "Hsmall",
 25227              "Ismall",
 25228              "Jsmall",
 25229              "Ksmall",
 25230              "Lsmall",
 25231              "Msmall",
 25232              "Nsmall",
 25233              "Osmall",
 25234              "Psmall",
 25235              "Qsmall",
 25236              "Rsmall",
 25237              "Ssmall",
 25238              "Tsmall",
 25239              "Usmall",
 25240              "Vsmall",
 25241              "Wsmall",
 25242              "Xsmall",
 25243              "Ysmall",
 25244              "Zsmall",
 25245              "colonmonetary",
 25246              "onefitted",
 25247              "rupiah",
 25248              "Tildesmall",
 25249              "exclamdownsmall",
 25250              "centoldstyle",
 25251              "Lslashsmall",
 25252              "Scaronsmall",
 25253              "Zcaronsmall",
 25254              "Dieresissmall",
 25255              "Brevesmall",
 25256              "Caronsmall",
 25257              "Dotaccentsmall",
 25258              "Macronsmall",
 25259              "figuredash",
 25260              "hypheninferior",
 25261              "Ogoneksmall",
 25262              "Ringsmall",
 25263              "Cedillasmall",
 25264              "onequarter",
 25265              "onehalf",
 25266              "threequarters",
 25267              "questiondownsmall",
 25268              "oneeighth",
 25269              "threeeighths",
 25270              "fiveeighths",
 25271              "seveneighths",
 25272              "onethird",
 25273              "twothirds",
 25274              "zerosuperior",
 25275              "onesuperior",
 25276              "twosuperior",
 25277              "threesuperior",
 25278              "foursuperior",
 25279              "fivesuperior",
 25280              "sixsuperior",
 25281              "sevensuperior",
 25282              "eightsuperior",
 25283              "ninesuperior",
 25284              "zeroinferior",
 25285              "oneinferior",
 25286              "twoinferior",
 25287              "threeinferior",
 25288              "fourinferior",
 25289              "fiveinferior",
 25290              "sixinferior",
 25291              "seveninferior",
 25292              "eightinferior",
 25293              "nineinferior",
 25294              "centinferior",
 25295              "dollarinferior",
 25296              "periodinferior",
 25297              "commainferior",
 25298              "Agravesmall",
 25299              "Aacutesmall",
 25300              "Acircumflexsmall",
 25301              "Atildesmall",
 25302              "Adieresissmall",
 25303              "Aringsmall",
 25304              "AEsmall",
 25305              "Ccedillasmall",
 25306              "Egravesmall",
 25307              "Eacutesmall",
 25308              "Ecircumflexsmall",
 25309              "Edieresissmall",
 25310              "Igravesmall",
 25311              "Iacutesmall",
 25312              "Icircumflexsmall",
 25313              "Idieresissmall",
 25314              "Ethsmall",
 25315              "Ntildesmall",
 25316              "Ogravesmall",
 25317              "Oacutesmall",
 25318              "Ocircumflexsmall",
 25319              "Otildesmall",
 25320              "Odieresissmall",
 25321              "OEsmall",
 25322              "Oslashsmall",
 25323              "Ugravesmall",
 25324              "Uacutesmall",
 25325              "Ucircumflexsmall",
 25326              "Udieresissmall",
 25327              "Yacutesmall",
 25328              "Thornsmall",
 25329              "Ydieresissmall",
 25330            ];
 25331            t.ExpertSubsetCharset = [
 25332              ".notdef",
 25333              "space",
 25334              "dollaroldstyle",
 25335              "dollarsuperior",
 25336              "parenleftsuperior",
 25337              "parenrightsuperior",
 25338              "twodotenleader",
 25339              "onedotenleader",
 25340              "comma",
 25341              "hyphen",
 25342              "period",
 25343              "fraction",
 25344              "zerooldstyle",
 25345              "oneoldstyle",
 25346              "twooldstyle",
 25347              "threeoldstyle",
 25348              "fouroldstyle",
 25349              "fiveoldstyle",
 25350              "sixoldstyle",
 25351              "sevenoldstyle",
 25352              "eightoldstyle",
 25353              "nineoldstyle",
 25354              "colon",
 25355              "semicolon",
 25356              "commasuperior",
 25357              "threequartersemdash",
 25358              "periodsuperior",
 25359              "asuperior",
 25360              "bsuperior",
 25361              "centsuperior",
 25362              "dsuperior",
 25363              "esuperior",
 25364              "isuperior",
 25365              "lsuperior",
 25366              "msuperior",
 25367              "nsuperior",
 25368              "osuperior",
 25369              "rsuperior",
 25370              "ssuperior",
 25371              "tsuperior",
 25372              "ff",
 25373              "fi",
 25374              "fl",
 25375              "ffi",
 25376              "ffl",
 25377              "parenleftinferior",
 25378              "parenrightinferior",
 25379              "hyphensuperior",
 25380              "colonmonetary",
 25381              "onefitted",
 25382              "rupiah",
 25383              "centoldstyle",
 25384              "figuredash",
 25385              "hypheninferior",
 25386              "onequarter",
 25387              "onehalf",
 25388              "threequarters",
 25389              "oneeighth",
 25390              "threeeighths",
 25391              "fiveeighths",
 25392              "seveneighths",
 25393              "onethird",
 25394              "twothirds",
 25395              "zerosuperior",
 25396              "onesuperior",
 25397              "twosuperior",
 25398              "threesuperior",
 25399              "foursuperior",
 25400              "fivesuperior",
 25401              "sixsuperior",
 25402              "sevensuperior",
 25403              "eightsuperior",
 25404              "ninesuperior",
 25405              "zeroinferior",
 25406              "oneinferior",
 25407              "twoinferior",
 25408              "threeinferior",
 25409              "fourinferior",
 25410              "fiveinferior",
 25411              "sixinferior",
 25412              "seveninferior",
 25413              "eightinferior",
 25414              "nineinferior",
 25415              "centinferior",
 25416              "dollarinferior",
 25417              "periodinferior",
 25418              "commainferior",
 25419            ];
 25420          },
 25421          (e, t) => {
 25422            Object.defineProperty(t, "__esModule", { value: !0 });
 25423            t.ZapfDingbatsEncoding =
 25424              t.WinAnsiEncoding =
 25425              t.SymbolSetEncoding =
 25426              t.StandardEncoding =
 25427              t.MacRomanEncoding =
 25428              t.ExpertEncoding =
 25429                void 0;
 25430            t.getEncoding = function getEncoding(e) {
 25431              switch (e) {
 25432                case "WinAnsiEncoding":
 25433                  return s;
 25434                case "StandardEncoding":
 25435                  return i;
 25436                case "MacRomanEncoding":
 25437                  return n;
 25438                case "SymbolSetEncoding":
 25439                  return o;
 25440                case "ZapfDingbatsEncoding":
 25441                  return c;
 25442                case "ExpertEncoding":
 25443                  return a;
 25444                case "MacExpertEncoding":
 25445                  return r;
 25446                default:
 25447                  return null;
 25448              }
 25449            };
 25450            const a = [
 25451              "",
 25452              "",
 25453              "",
 25454              "",
 25455              "",
 25456              "",
 25457              "",
 25458              "",
 25459              "",
 25460              "",
 25461              "",
 25462              "",
 25463              "",
 25464              "",
 25465              "",
 25466              "",
 25467              "",
 25468              "",
 25469              "",
 25470              "",
 25471              "",
 25472              "",
 25473              "",
 25474              "",
 25475              "",
 25476              "",
 25477              "",
 25478              "",
 25479              "",
 25480              "",
 25481              "",
 25482              "",
 25483              "space",
 25484              "exclamsmall",
 25485              "Hungarumlautsmall",
 25486              "",
 25487              "dollaroldstyle",
 25488              "dollarsuperior",
 25489              "ampersandsmall",
 25490              "Acutesmall",
 25491              "parenleftsuperior",
 25492              "parenrightsuperior",
 25493              "twodotenleader",
 25494              "onedotenleader",
 25495              "comma",
 25496              "hyphen",
 25497              "period",
 25498              "fraction",
 25499              "zerooldstyle",
 25500              "oneoldstyle",
 25501              "twooldstyle",
 25502              "threeoldstyle",
 25503              "fouroldstyle",
 25504              "fiveoldstyle",
 25505              "sixoldstyle",
 25506              "sevenoldstyle",
 25507              "eightoldstyle",
 25508              "nineoldstyle",
 25509              "colon",
 25510              "semicolon",
 25511              "commasuperior",
 25512              "threequartersemdash",
 25513              "periodsuperior",
 25514              "questionsmall",
 25515              "",
 25516              "asuperior",
 25517              "bsuperior",
 25518              "centsuperior",
 25519              "dsuperior",
 25520              "esuperior",
 25521              "",
 25522              "",
 25523              "",
 25524              "isuperior",
 25525              "",
 25526              "",
 25527              "lsuperior",
 25528              "msuperior",
 25529              "nsuperior",
 25530              "osuperior",
 25531              "",
 25532              "",
 25533              "rsuperior",
 25534              "ssuperior",
 25535              "tsuperior",
 25536              "",
 25537              "ff",
 25538              "fi",
 25539              "fl",
 25540              "ffi",
 25541              "ffl",
 25542              "parenleftinferior",
 25543              "",
 25544              "parenrightinferior",
 25545              "Circumflexsmall",
 25546              "hyphensuperior",
 25547              "Gravesmall",
 25548              "Asmall",
 25549              "Bsmall",
 25550              "Csmall",
 25551              "Dsmall",
 25552              "Esmall",
 25553              "Fsmall",
 25554              "Gsmall",
 25555              "Hsmall",
 25556              "Ismall",
 25557              "Jsmall",
 25558              "Ksmall",
 25559              "Lsmall",
 25560              "Msmall",
 25561              "Nsmall",
 25562              "Osmall",
 25563              "Psmall",
 25564              "Qsmall",
 25565              "Rsmall",
 25566              "Ssmall",
 25567              "Tsmall",
 25568              "Usmall",
 25569              "Vsmall",
 25570              "Wsmall",
 25571              "Xsmall",
 25572              "Ysmall",
 25573              "Zsmall",
 25574              "colonmonetary",
 25575              "onefitted",
 25576              "rupiah",
 25577              "Tildesmall",
 25578              "",
 25579              "",
 25580              "",
 25581              "",
 25582              "",
 25583              "",
 25584              "",
 25585              "",
 25586              "",
 25587              "",
 25588              "",
 25589              "",
 25590              "",
 25591              "",
 25592              "",
 25593              "",
 25594              "",
 25595              "",
 25596              "",
 25597              "",
 25598              "",
 25599              "",
 25600              "",
 25601              "",
 25602              "",
 25603              "",
 25604              "",
 25605              "",
 25606              "",
 25607              "",
 25608              "",
 25609              "",
 25610              "",
 25611              "",
 25612              "exclamdownsmall",
 25613              "centoldstyle",
 25614              "Lslashsmall",
 25615              "",
 25616              "",
 25617              "Scaronsmall",
 25618              "Zcaronsmall",
 25619              "Dieresissmall",
 25620              "Brevesmall",
 25621              "Caronsmall",
 25622              "",
 25623              "Dotaccentsmall",
 25624              "",
 25625              "",
 25626              "Macronsmall",
 25627              "",
 25628              "",
 25629              "figuredash",
 25630              "hypheninferior",
 25631              "",
 25632              "",
 25633              "Ogoneksmall",
 25634              "Ringsmall",
 25635              "Cedillasmall",
 25636              "",
 25637              "",
 25638              "",
 25639              "onequarter",
 25640              "onehalf",
 25641              "threequarters",
 25642              "questiondownsmall",
 25643              "oneeighth",
 25644              "threeeighths",
 25645              "fiveeighths",
 25646              "seveneighths",
 25647              "onethird",
 25648              "twothirds",
 25649              "",
 25650              "",
 25651              "zerosuperior",
 25652              "onesuperior",
 25653              "twosuperior",
 25654              "threesuperior",
 25655              "foursuperior",
 25656              "fivesuperior",
 25657              "sixsuperior",
 25658              "sevensuperior",
 25659              "eightsuperior",
 25660              "ninesuperior",
 25661              "zeroinferior",
 25662              "oneinferior",
 25663              "twoinferior",
 25664              "threeinferior",
 25665              "fourinferior",
 25666              "fiveinferior",
 25667              "sixinferior",
 25668              "seveninferior",
 25669              "eightinferior",
 25670              "nineinferior",
 25671              "centinferior",
 25672              "dollarinferior",
 25673              "periodinferior",
 25674              "commainferior",
 25675              "Agravesmall",
 25676              "Aacutesmall",
 25677              "Acircumflexsmall",
 25678              "Atildesmall",
 25679              "Adieresissmall",
 25680              "Aringsmall",
 25681              "AEsmall",
 25682              "Ccedillasmall",
 25683              "Egravesmall",
 25684              "Eacutesmall",
 25685              "Ecircumflexsmall",
 25686              "Edieresissmall",
 25687              "Igravesmall",
 25688              "Iacutesmall",
 25689              "Icircumflexsmall",
 25690              "Idieresissmall",
 25691              "Ethsmall",
 25692              "Ntildesmall",
 25693              "Ogravesmall",
 25694              "Oacutesmall",
 25695              "Ocircumflexsmall",
 25696              "Otildesmall",
 25697              "Odieresissmall",
 25698              "OEsmall",
 25699              "Oslashsmall",
 25700              "Ugravesmall",
 25701              "Uacutesmall",
 25702              "Ucircumflexsmall",
 25703              "Udieresissmall",
 25704              "Yacutesmall",
 25705              "Thornsmall",
 25706              "Ydieresissmall",
 25707            ];
 25708            t.ExpertEncoding = a;
 25709            const r = [
 25710                "",
 25711                "",
 25712                "",
 25713                "",
 25714                "",
 25715                "",
 25716                "",
 25717                "",
 25718                "",
 25719                "",
 25720                "",
 25721                "",
 25722                "",
 25723                "",
 25724                "",
 25725                "",
 25726                "",
 25727                "",
 25728                "",
 25729                "",
 25730                "",
 25731                "",
 25732                "",
 25733                "",
 25734                "",
 25735                "",
 25736                "",
 25737                "",
 25738                "",
 25739                "",
 25740                "",
 25741                "",
 25742                "space",
 25743                "exclamsmall",
 25744                "Hungarumlautsmall",
 25745                "centoldstyle",
 25746                "dollaroldstyle",
 25747                "dollarsuperior",
 25748                "ampersandsmall",
 25749                "Acutesmall",
 25750                "parenleftsuperior",
 25751                "parenrightsuperior",
 25752                "twodotenleader",
 25753                "onedotenleader",
 25754                "comma",
 25755                "hyphen",
 25756                "period",
 25757                "fraction",
 25758                "zerooldstyle",
 25759                "oneoldstyle",
 25760                "twooldstyle",
 25761                "threeoldstyle",
 25762                "fouroldstyle",
 25763                "fiveoldstyle",
 25764                "sixoldstyle",
 25765                "sevenoldstyle",
 25766                "eightoldstyle",
 25767                "nineoldstyle",
 25768                "colon",
 25769                "semicolon",
 25770                "",
 25771                "threequartersemdash",
 25772                "",
 25773                "questionsmall",
 25774                "",
 25775                "",
 25776                "",
 25777                "",
 25778                "Ethsmall",
 25779                "",
 25780                "",
 25781                "onequarter",
 25782                "onehalf",
 25783                "threequarters",
 25784                "oneeighth",
 25785                "threeeighths",
 25786                "fiveeighths",
 25787                "seveneighths",
 25788                "onethird",
 25789                "twothirds",
 25790                "",
 25791                "",
 25792                "",
 25793                "",
 25794                "",
 25795                "",
 25796                "ff",
 25797                "fi",
 25798                "fl",
 25799                "ffi",
 25800                "ffl",
 25801                "parenleftinferior",
 25802                "",
 25803                "parenrightinferior",
 25804                "Circumflexsmall",
 25805                "hypheninferior",
 25806                "Gravesmall",
 25807                "Asmall",
 25808                "Bsmall",
 25809                "Csmall",
 25810                "Dsmall",
 25811                "Esmall",
 25812                "Fsmall",
 25813                "Gsmall",
 25814                "Hsmall",
 25815                "Ismall",
 25816                "Jsmall",
 25817                "Ksmall",
 25818                "Lsmall",
 25819                "Msmall",
 25820                "Nsmall",
 25821                "Osmall",
 25822                "Psmall",
 25823                "Qsmall",
 25824                "Rsmall",
 25825                "Ssmall",
 25826                "Tsmall",
 25827                "Usmall",
 25828                "Vsmall",
 25829                "Wsmall",
 25830                "Xsmall",
 25831                "Ysmall",
 25832                "Zsmall",
 25833                "colonmonetary",
 25834                "onefitted",
 25835                "rupiah",
 25836                "Tildesmall",
 25837                "",
 25838                "",
 25839                "asuperior",
 25840                "centsuperior",
 25841                "",
 25842                "",
 25843                "",
 25844                "",
 25845                "Aacutesmall",
 25846                "Agravesmall",
 25847                "Acircumflexsmall",
 25848                "Adieresissmall",
 25849                "Atildesmall",
 25850                "Aringsmall",
 25851                "Ccedillasmall",
 25852                "Eacutesmall",
 25853                "Egravesmall",
 25854                "Ecircumflexsmall",
 25855                "Edieresissmall",
 25856                "Iacutesmall",
 25857                "Igravesmall",
 25858                "Icircumflexsmall",
 25859                "Idieresissmall",
 25860                "Ntildesmall",
 25861                "Oacutesmall",
 25862                "Ogravesmall",
 25863                "Ocircumflexsmall",
 25864                "Odieresissmall",
 25865                "Otildesmall",
 25866                "Uacutesmall",
 25867                "Ugravesmall",
 25868                "Ucircumflexsmall",
 25869                "Udieresissmall",
 25870                "",
 25871                "eightsuperior",
 25872                "fourinferior",
 25873                "threeinferior",
 25874                "sixinferior",
 25875                "eightinferior",
 25876                "seveninferior",
 25877                "Scaronsmall",
 25878                "",
 25879                "centinferior",
 25880                "twoinferior",
 25881                "",
 25882                "Dieresissmall",
 25883                "",
 25884                "Caronsmall",
 25885                "osuperior",
 25886                "fiveinferior",
 25887                "",
 25888                "commainferior",
 25889                "periodinferior",
 25890                "Yacutesmall",
 25891                "",
 25892                "dollarinferior",
 25893                "",
 25894                "",
 25895                "Thornsmall",
 25896                "",
 25897                "nineinferior",
 25898                "zeroinferior",
 25899                "Zcaronsmall",
 25900                "AEsmall",
 25901                "Oslashsmall",
 25902                "questiondownsmall",
 25903                "oneinferior",
 25904                "Lslashsmall",
 25905                "",
 25906                "",
 25907                "",
 25908                "",
 25909                "",
 25910                "",
 25911                "Cedillasmall",
 25912                "",
 25913                "",
 25914                "",
 25915                "",
 25916                "",
 25917                "OEsmall",
 25918                "figuredash",
 25919                "hyphensuperior",
 25920                "",
 25921                "",
 25922                "",
 25923                "",
 25924                "exclamdownsmall",
 25925                "",
 25926                "Ydieresissmall",
 25927                "",
 25928                "onesuperior",
 25929                "twosuperior",
 25930                "threesuperior",
 25931                "foursuperior",
 25932                "fivesuperior",
 25933                "sixsuperior",
 25934                "sevensuperior",
 25935                "ninesuperior",
 25936                "zerosuperior",
 25937                "",
 25938                "esuperior",
 25939                "rsuperior",
 25940                "tsuperior",
 25941                "",
 25942                "",
 25943                "isuperior",
 25944                "ssuperior",
 25945                "dsuperior",
 25946                "",
 25947                "",
 25948                "",
 25949                "",
 25950                "",
 25951                "lsuperior",
 25952                "Ogoneksmall",
 25953                "Brevesmall",
 25954                "Macronsmall",
 25955                "bsuperior",
 25956                "nsuperior",
 25957                "msuperior",
 25958                "commasuperior",
 25959                "periodsuperior",
 25960                "Dotaccentsmall",
 25961                "Ringsmall",
 25962                "",
 25963                "",
 25964                "",
 25965                "",
 25966              ],
 25967              n = [
 25968                "",
 25969                "",
 25970                "",
 25971                "",
 25972                "",
 25973                "",
 25974                "",
 25975                "",
 25976                "",
 25977                "",
 25978                "",
 25979                "",
 25980                "",
 25981                "",
 25982                "",
 25983                "",
 25984                "",
 25985                "",
 25986                "",
 25987                "",
 25988                "",
 25989                "",
 25990                "",
 25991                "",
 25992                "",
 25993                "",
 25994                "",
 25995                "",
 25996                "",
 25997                "",
 25998                "",
 25999                "",
 26000                "space",
 26001                "exclam",
 26002                "quotedbl",
 26003                "numbersign",
 26004                "dollar",
 26005                "percent",
 26006                "ampersand",
 26007                "quotesingle",
 26008                "parenleft",
 26009                "parenright",
 26010                "asterisk",
 26011                "plus",
 26012                "comma",
 26013                "hyphen",
 26014                "period",
 26015                "slash",
 26016                "zero",
 26017                "one",
 26018                "two",
 26019                "three",
 26020                "four",
 26021                "five",
 26022                "six",
 26023                "seven",
 26024                "eight",
 26025                "nine",
 26026                "colon",
 26027                "semicolon",
 26028                "less",
 26029                "equal",
 26030                "greater",
 26031                "question",
 26032                "at",
 26033                "A",
 26034                "B",
 26035                "C",
 26036                "D",
 26037                "E",
 26038                "F",
 26039                "G",
 26040                "H",
 26041                "I",
 26042                "J",
 26043                "K",
 26044                "L",
 26045                "M",
 26046                "N",
 26047                "O",
 26048                "P",
 26049                "Q",
 26050                "R",
 26051                "S",
 26052                "T",
 26053                "U",
 26054                "V",
 26055                "W",
 26056                "X",
 26057                "Y",
 26058                "Z",
 26059                "bracketleft",
 26060                "backslash",
 26061                "bracketright",
 26062                "asciicircum",
 26063                "underscore",
 26064                "grave",
 26065                "a",
 26066                "b",
 26067                "c",
 26068                "d",
 26069                "e",
 26070                "f",
 26071                "g",
 26072                "h",
 26073                "i",
 26074                "j",
 26075                "k",
 26076                "l",
 26077                "m",
 26078                "n",
 26079                "o",
 26080                "p",
 26081                "q",
 26082                "r",
 26083                "s",
 26084                "t",
 26085                "u",
 26086                "v",
 26087                "w",
 26088                "x",
 26089                "y",
 26090                "z",
 26091                "braceleft",
 26092                "bar",
 26093                "braceright",
 26094                "asciitilde",
 26095                "",
 26096                "Adieresis",
 26097                "Aring",
 26098                "Ccedilla",
 26099                "Eacute",
 26100                "Ntilde",
 26101                "Odieresis",
 26102                "Udieresis",
 26103                "aacute",
 26104                "agrave",
 26105                "acircumflex",
 26106                "adieresis",
 26107                "atilde",
 26108                "aring",
 26109                "ccedilla",
 26110                "eacute",
 26111                "egrave",
 26112                "ecircumflex",
 26113                "edieresis",
 26114                "iacute",
 26115                "igrave",
 26116                "icircumflex",
 26117                "idieresis",
 26118                "ntilde",
 26119                "oacute",
 26120                "ograve",
 26121                "ocircumflex",
 26122                "odieresis",
 26123                "otilde",
 26124                "uacute",
 26125                "ugrave",
 26126                "ucircumflex",
 26127                "udieresis",
 26128                "dagger",
 26129                "degree",
 26130                "cent",
 26131                "sterling",
 26132                "section",
 26133                "bullet",
 26134                "paragraph",
 26135                "germandbls",
 26136                "registered",
 26137                "copyright",
 26138                "trademark",
 26139                "acute",
 26140                "dieresis",
 26141                "notequal",
 26142                "AE",
 26143                "Oslash",
 26144                "infinity",
 26145                "plusminus",
 26146                "lessequal",
 26147                "greaterequal",
 26148                "yen",
 26149                "mu",
 26150                "partialdiff",
 26151                "summation",
 26152                "product",
 26153                "pi",
 26154                "integral",
 26155                "ordfeminine",
 26156                "ordmasculine",
 26157                "Omega",
 26158                "ae",
 26159                "oslash",
 26160                "questiondown",
 26161                "exclamdown",
 26162                "logicalnot",
 26163                "radical",
 26164                "florin",
 26165                "approxequal",
 26166                "Delta",
 26167                "guillemotleft",
 26168                "guillemotright",
 26169                "ellipsis",
 26170                "space",
 26171                "Agrave",
 26172                "Atilde",
 26173                "Otilde",
 26174                "OE",
 26175                "oe",
 26176                "endash",
 26177                "emdash",
 26178                "quotedblleft",
 26179                "quotedblright",
 26180                "quoteleft",
 26181                "quoteright",
 26182                "divide",
 26183                "lozenge",
 26184                "ydieresis",
 26185                "Ydieresis",
 26186                "fraction",
 26187                "currency",
 26188                "guilsinglleft",
 26189                "guilsinglright",
 26190                "fi",
 26191                "fl",
 26192                "daggerdbl",
 26193                "periodcentered",
 26194                "quotesinglbase",
 26195                "quotedblbase",
 26196                "perthousand",
 26197                "Acircumflex",
 26198                "Ecircumflex",
 26199                "Aacute",
 26200                "Edieresis",
 26201                "Egrave",
 26202                "Iacute",
 26203                "Icircumflex",
 26204                "Idieresis",
 26205                "Igrave",
 26206                "Oacute",
 26207                "Ocircumflex",
 26208                "apple",
 26209                "Ograve",
 26210                "Uacute",
 26211                "Ucircumflex",
 26212                "Ugrave",
 26213                "dotlessi",
 26214                "circumflex",
 26215                "tilde",
 26216                "macron",
 26217                "breve",
 26218                "dotaccent",
 26219                "ring",
 26220                "cedilla",
 26221                "hungarumlaut",
 26222                "ogonek",
 26223                "caron",
 26224              ];
 26225            t.MacRomanEncoding = n;
 26226            const i = [
 26227              "",
 26228              "",
 26229              "",
 26230              "",
 26231              "",
 26232              "",
 26233              "",
 26234              "",
 26235              "",
 26236              "",
 26237              "",
 26238              "",
 26239              "",
 26240              "",
 26241              "",
 26242              "",
 26243              "",
 26244              "",
 26245              "",
 26246              "",
 26247              "",
 26248              "",
 26249              "",
 26250              "",
 26251              "",
 26252              "",
 26253              "",
 26254              "",
 26255              "",
 26256              "",
 26257              "",
 26258              "",
 26259              "space",
 26260              "exclam",
 26261              "quotedbl",
 26262              "numbersign",
 26263              "dollar",
 26264              "percent",
 26265              "ampersand",
 26266              "quoteright",
 26267              "parenleft",
 26268              "parenright",
 26269              "asterisk",
 26270              "plus",
 26271              "comma",
 26272              "hyphen",
 26273              "period",
 26274              "slash",
 26275              "zero",
 26276              "one",
 26277              "two",
 26278              "three",
 26279              "four",
 26280              "five",
 26281              "six",
 26282              "seven",
 26283              "eight",
 26284              "nine",
 26285              "colon",
 26286              "semicolon",
 26287              "less",
 26288              "equal",
 26289              "greater",
 26290              "question",
 26291              "at",
 26292              "A",
 26293              "B",
 26294              "C",
 26295              "D",
 26296              "E",
 26297              "F",
 26298              "G",
 26299              "H",
 26300              "I",
 26301              "J",
 26302              "K",
 26303              "L",
 26304              "M",
 26305              "N",
 26306              "O",
 26307              "P",
 26308              "Q",
 26309              "R",
 26310              "S",
 26311              "T",
 26312              "U",
 26313              "V",
 26314              "W",
 26315              "X",
 26316              "Y",
 26317              "Z",
 26318              "bracketleft",
 26319              "backslash",
 26320              "bracketright",
 26321              "asciicircum",
 26322              "underscore",
 26323              "quoteleft",
 26324              "a",
 26325              "b",
 26326              "c",
 26327              "d",
 26328              "e",
 26329              "f",
 26330              "g",
 26331              "h",
 26332              "i",
 26333              "j",
 26334              "k",
 26335              "l",
 26336              "m",
 26337              "n",
 26338              "o",
 26339              "p",
 26340              "q",
 26341              "r",
 26342              "s",
 26343              "t",
 26344              "u",
 26345              "v",
 26346              "w",
 26347              "x",
 26348              "y",
 26349              "z",
 26350              "braceleft",
 26351              "bar",
 26352              "braceright",
 26353              "asciitilde",
 26354              "",
 26355              "",
 26356              "",
 26357              "",
 26358              "",
 26359              "",
 26360              "",
 26361              "",
 26362              "",
 26363              "",
 26364              "",
 26365              "",
 26366              "",
 26367              "",
 26368              "",
 26369              "",
 26370              "",
 26371              "",
 26372              "",
 26373              "",
 26374              "",
 26375              "",
 26376              "",
 26377              "",
 26378              "",
 26379              "",
 26380              "",
 26381              "",
 26382              "",
 26383              "",
 26384              "",
 26385              "",
 26386              "",
 26387              "",
 26388              "exclamdown",
 26389              "cent",
 26390              "sterling",
 26391              "fraction",
 26392              "yen",
 26393              "florin",
 26394              "section",
 26395              "currency",
 26396              "quotesingle",
 26397              "quotedblleft",
 26398              "guillemotleft",
 26399              "guilsinglleft",
 26400              "guilsinglright",
 26401              "fi",
 26402              "fl",
 26403              "",
 26404              "endash",
 26405              "dagger",
 26406              "daggerdbl",
 26407              "periodcentered",
 26408              "",
 26409              "paragraph",
 26410              "bullet",
 26411              "quotesinglbase",
 26412              "quotedblbase",
 26413              "quotedblright",
 26414              "guillemotright",
 26415              "ellipsis",
 26416              "perthousand",
 26417              "",
 26418              "questiondown",
 26419              "",
 26420              "grave",
 26421              "acute",
 26422              "circumflex",
 26423              "tilde",
 26424              "macron",
 26425              "breve",
 26426              "dotaccent",
 26427              "dieresis",
 26428              "",
 26429              "ring",
 26430              "cedilla",
 26431              "",
 26432              "hungarumlaut",
 26433              "ogonek",
 26434              "caron",
 26435              "emdash",
 26436              "",
 26437              "",
 26438              "",
 26439              "",
 26440              "",
 26441              "",
 26442              "",
 26443              "",
 26444              "",
 26445              "",
 26446              "",
 26447              "",
 26448              "",
 26449              "",
 26450              "",
 26451              "",
 26452              "AE",
 26453              "",
 26454              "ordfeminine",
 26455              "",
 26456              "",
 26457              "",
 26458              "",
 26459              "Lslash",
 26460              "Oslash",
 26461              "OE",
 26462              "ordmasculine",
 26463              "",
 26464              "",
 26465              "",
 26466              "",
 26467              "",
 26468              "ae",
 26469              "",
 26470              "",
 26471              "",
 26472              "dotlessi",
 26473              "",
 26474              "",
 26475              "lslash",
 26476              "oslash",
 26477              "oe",
 26478              "germandbls",
 26479              "",
 26480              "",
 26481              "",
 26482              "",
 26483            ];
 26484            t.StandardEncoding = i;
 26485            const s = [
 26486              "",
 26487              "",
 26488              "",
 26489              "",
 26490              "",
 26491              "",
 26492              "",
 26493              "",
 26494              "",
 26495              "",
 26496              "",
 26497              "",
 26498              "",
 26499              "",
 26500              "",
 26501              "",
 26502              "",
 26503              "",
 26504              "",
 26505              "",
 26506              "",
 26507              "",
 26508              "",
 26509              "",
 26510              "",
 26511              "",
 26512              "",
 26513              "",
 26514              "",
 26515              "",
 26516              "",
 26517              "",
 26518              "space",
 26519              "exclam",
 26520              "quotedbl",
 26521              "numbersign",
 26522              "dollar",
 26523              "percent",
 26524              "ampersand",
 26525              "quotesingle",
 26526              "parenleft",
 26527              "parenright",
 26528              "asterisk",
 26529              "plus",
 26530              "comma",
 26531              "hyphen",
 26532              "period",
 26533              "slash",
 26534              "zero",
 26535              "one",
 26536              "two",
 26537              "three",
 26538              "four",
 26539              "five",
 26540              "six",
 26541              "seven",
 26542              "eight",
 26543              "nine",
 26544              "colon",
 26545              "semicolon",
 26546              "less",
 26547              "equal",
 26548              "greater",
 26549              "question",
 26550              "at",
 26551              "A",
 26552              "B",
 26553              "C",
 26554              "D",
 26555              "E",
 26556              "F",
 26557              "G",
 26558              "H",
 26559              "I",
 26560              "J",
 26561              "K",
 26562              "L",
 26563              "M",
 26564              "N",
 26565              "O",
 26566              "P",
 26567              "Q",
 26568              "R",
 26569              "S",
 26570              "T",
 26571              "U",
 26572              "V",
 26573              "W",
 26574              "X",
 26575              "Y",
 26576              "Z",
 26577              "bracketleft",
 26578              "backslash",
 26579              "bracketright",
 26580              "asciicircum",
 26581              "underscore",
 26582              "grave",
 26583              "a",
 26584              "b",
 26585              "c",
 26586              "d",
 26587              "e",
 26588              "f",
 26589              "g",
 26590              "h",
 26591              "i",
 26592              "j",
 26593              "k",
 26594              "l",
 26595              "m",
 26596              "n",
 26597              "o",
 26598              "p",
 26599              "q",
 26600              "r",
 26601              "s",
 26602              "t",
 26603              "u",
 26604              "v",
 26605              "w",
 26606              "x",
 26607              "y",
 26608              "z",
 26609              "braceleft",
 26610              "bar",
 26611              "braceright",
 26612              "asciitilde",
 26613              "bullet",
 26614              "Euro",
 26615              "bullet",
 26616              "quotesinglbase",
 26617              "florin",
 26618              "quotedblbase",
 26619              "ellipsis",
 26620              "dagger",
 26621              "daggerdbl",
 26622              "circumflex",
 26623              "perthousand",
 26624              "Scaron",
 26625              "guilsinglleft",
 26626              "OE",
 26627              "bullet",
 26628              "Zcaron",
 26629              "bullet",
 26630              "bullet",
 26631              "quoteleft",
 26632              "quoteright",
 26633              "quotedblleft",
 26634              "quotedblright",
 26635              "bullet",
 26636              "endash",
 26637              "emdash",
 26638              "tilde",
 26639              "trademark",
 26640              "scaron",
 26641              "guilsinglright",
 26642              "oe",
 26643              "bullet",
 26644              "zcaron",
 26645              "Ydieresis",
 26646              "space",
 26647              "exclamdown",
 26648              "cent",
 26649              "sterling",
 26650              "currency",
 26651              "yen",
 26652              "brokenbar",
 26653              "section",
 26654              "dieresis",
 26655              "copyright",
 26656              "ordfeminine",
 26657              "guillemotleft",
 26658              "logicalnot",
 26659              "hyphen",
 26660              "registered",
 26661              "macron",
 26662              "degree",
 26663              "plusminus",
 26664              "twosuperior",
 26665              "threesuperior",
 26666              "acute",
 26667              "mu",
 26668              "paragraph",
 26669              "periodcentered",
 26670              "cedilla",
 26671              "onesuperior",
 26672              "ordmasculine",
 26673              "guillemotright",
 26674              "onequarter",
 26675              "onehalf",
 26676              "threequarters",
 26677              "questiondown",
 26678              "Agrave",
 26679              "Aacute",
 26680              "Acircumflex",
 26681              "Atilde",
 26682              "Adieresis",
 26683              "Aring",
 26684              "AE",
 26685              "Ccedilla",
 26686              "Egrave",
 26687              "Eacute",
 26688              "Ecircumflex",
 26689              "Edieresis",
 26690              "Igrave",
 26691              "Iacute",
 26692              "Icircumflex",
 26693              "Idieresis",
 26694              "Eth",
 26695              "Ntilde",
 26696              "Ograve",
 26697              "Oacute",
 26698              "Ocircumflex",
 26699              "Otilde",
 26700              "Odieresis",
 26701              "multiply",
 26702              "Oslash",
 26703              "Ugrave",
 26704              "Uacute",
 26705              "Ucircumflex",
 26706              "Udieresis",
 26707              "Yacute",
 26708              "Thorn",
 26709              "germandbls",
 26710              "agrave",
 26711              "aacute",
 26712              "acircumflex",
 26713              "atilde",
 26714              "adieresis",
 26715              "aring",
 26716              "ae",
 26717              "ccedilla",
 26718              "egrave",
 26719              "eacute",
 26720              "ecircumflex",
 26721              "edieresis",
 26722              "igrave",
 26723              "iacute",
 26724              "icircumflex",
 26725              "idieresis",
 26726              "eth",
 26727              "ntilde",
 26728              "ograve",
 26729              "oacute",
 26730              "ocircumflex",
 26731              "otilde",
 26732              "odieresis",
 26733              "divide",
 26734              "oslash",
 26735              "ugrave",
 26736              "uacute",
 26737              "ucircumflex",
 26738              "udieresis",
 26739              "yacute",
 26740              "thorn",
 26741              "ydieresis",
 26742            ];
 26743            t.WinAnsiEncoding = s;
 26744            const o = [
 26745              "",
 26746              "",
 26747              "",
 26748              "",
 26749              "",
 26750              "",
 26751              "",
 26752              "",
 26753              "",
 26754              "",
 26755              "",
 26756              "",
 26757              "",
 26758              "",
 26759              "",
 26760              "",
 26761              "",
 26762              "",
 26763              "",
 26764              "",
 26765              "",
 26766              "",
 26767              "",
 26768              "",
 26769              "",
 26770              "",
 26771              "",
 26772              "",
 26773              "",
 26774              "",
 26775              "",
 26776              "",
 26777              "space",
 26778              "exclam",
 26779              "universal",
 26780              "numbersign",
 26781              "existential",
 26782              "percent",
 26783              "ampersand",
 26784              "suchthat",
 26785              "parenleft",
 26786              "parenright",
 26787              "asteriskmath",
 26788              "plus",
 26789              "comma",
 26790              "minus",
 26791              "period",
 26792              "slash",
 26793              "zero",
 26794              "one",
 26795              "two",
 26796              "three",
 26797              "four",
 26798              "five",
 26799              "six",
 26800              "seven",
 26801              "eight",
 26802              "nine",
 26803              "colon",
 26804              "semicolon",
 26805              "less",
 26806              "equal",
 26807              "greater",
 26808              "question",
 26809              "congruent",
 26810              "Alpha",
 26811              "Beta",
 26812              "Chi",
 26813              "Delta",
 26814              "Epsilon",
 26815              "Phi",
 26816              "Gamma",
 26817              "Eta",
 26818              "Iota",
 26819              "theta1",
 26820              "Kappa",
 26821              "Lambda",
 26822              "Mu",
 26823              "Nu",
 26824              "Omicron",
 26825              "Pi",
 26826              "Theta",
 26827              "Rho",
 26828              "Sigma",
 26829              "Tau",
 26830              "Upsilon",
 26831              "sigma1",
 26832              "Omega",
 26833              "Xi",
 26834              "Psi",
 26835              "Zeta",
 26836              "bracketleft",
 26837              "therefore",
 26838              "bracketright",
 26839              "perpendicular",
 26840              "underscore",
 26841              "radicalex",
 26842              "alpha",
 26843              "beta",
 26844              "chi",
 26845              "delta",
 26846              "epsilon",
 26847              "phi",
 26848              "gamma",
 26849              "eta",
 26850              "iota",
 26851              "phi1",
 26852              "kappa",
 26853              "lambda",
 26854              "mu",
 26855              "nu",
 26856              "omicron",
 26857              "pi",
 26858              "theta",
 26859              "rho",
 26860              "sigma",
 26861              "tau",
 26862              "upsilon",
 26863              "omega1",
 26864              "omega",
 26865              "xi",
 26866              "psi",
 26867              "zeta",
 26868              "braceleft",
 26869              "bar",
 26870              "braceright",
 26871              "similar",
 26872              "",
 26873              "",
 26874              "",
 26875              "",
 26876              "",
 26877              "",
 26878              "",
 26879              "",
 26880              "",
 26881              "",
 26882              "",
 26883              "",
 26884              "",
 26885              "",
 26886              "",
 26887              "",
 26888              "",
 26889              "",
 26890              "",
 26891              "",
 26892              "",
 26893              "",
 26894              "",
 26895              "",
 26896              "",
 26897              "",
 26898              "",
 26899              "",
 26900              "",
 26901              "",
 26902              "",
 26903              "",
 26904              "",
 26905              "Euro",
 26906              "Upsilon1",
 26907              "minute",
 26908              "lessequal",
 26909              "fraction",
 26910              "infinity",
 26911              "florin",
 26912              "club",
 26913              "diamond",
 26914              "heart",
 26915              "spade",
 26916              "arrowboth",
 26917              "arrowleft",
 26918              "arrowup",
 26919              "arrowright",
 26920              "arrowdown",
 26921              "degree",
 26922              "plusminus",
 26923              "second",
 26924              "greaterequal",
 26925              "multiply",
 26926              "proportional",
 26927              "partialdiff",
 26928              "bullet",
 26929              "divide",
 26930              "notequal",
 26931              "equivalence",
 26932              "approxequal",
 26933              "ellipsis",
 26934              "arrowvertex",
 26935              "arrowhorizex",
 26936              "carriagereturn",
 26937              "aleph",
 26938              "Ifraktur",
 26939              "Rfraktur",
 26940              "weierstrass",
 26941              "circlemultiply",
 26942              "circleplus",
 26943              "emptyset",
 26944              "intersection",
 26945              "union",
 26946              "propersuperset",
 26947              "reflexsuperset",
 26948              "notsubset",
 26949              "propersubset",
 26950              "reflexsubset",
 26951              "element",
 26952              "notelement",
 26953              "angle",
 26954              "gradient",
 26955              "registerserif",
 26956              "copyrightserif",
 26957              "trademarkserif",
 26958              "product",
 26959              "radical",
 26960              "dotmath",
 26961              "logicalnot",
 26962              "logicaland",
 26963              "logicalor",
 26964              "arrowdblboth",
 26965              "arrowdblleft",
 26966              "arrowdblup",
 26967              "arrowdblright",
 26968              "arrowdbldown",
 26969              "lozenge",
 26970              "angleleft",
 26971              "registersans",
 26972              "copyrightsans",
 26973              "trademarksans",
 26974              "summation",
 26975              "parenlefttp",
 26976              "parenleftex",
 26977              "parenleftbt",
 26978              "bracketlefttp",
 26979              "bracketleftex",
 26980              "bracketleftbt",
 26981              "bracelefttp",
 26982              "braceleftmid",
 26983              "braceleftbt",
 26984              "braceex",
 26985              "",
 26986              "angleright",
 26987              "integral",
 26988              "integraltp",
 26989              "integralex",
 26990              "integralbt",
 26991              "parenrighttp",
 26992              "parenrightex",
 26993              "parenrightbt",
 26994              "bracketrighttp",
 26995              "bracketrightex",
 26996              "bracketrightbt",
 26997              "bracerighttp",
 26998              "bracerightmid",
 26999              "bracerightbt",
 27000              "",
 27001            ];
 27002            t.SymbolSetEncoding = o;
 27003            const c = [
 27004              "",
 27005              "",
 27006              "",
 27007              "",
 27008              "",
 27009              "",
 27010              "",
 27011              "",
 27012              "",
 27013              "",
 27014              "",
 27015              "",
 27016              "",
 27017              "",
 27018              "",
 27019              "",
 27020              "",
 27021              "",
 27022              "",
 27023              "",
 27024              "",
 27025              "",
 27026              "",
 27027              "",
 27028              "",
 27029              "",
 27030              "",
 27031              "",
 27032              "",
 27033              "",
 27034              "",
 27035              "",
 27036              "space",
 27037              "a1",
 27038              "a2",
 27039              "a202",
 27040              "a3",
 27041              "a4",
 27042              "a5",
 27043              "a119",
 27044              "a118",
 27045              "a117",
 27046              "a11",
 27047              "a12",
 27048              "a13",
 27049              "a14",
 27050              "a15",
 27051              "a16",
 27052              "a105",
 27053              "a17",
 27054              "a18",
 27055              "a19",
 27056              "a20",
 27057              "a21",
 27058              "a22",
 27059              "a23",
 27060              "a24",
 27061              "a25",
 27062              "a26",
 27063              "a27",
 27064              "a28",
 27065              "a6",
 27066              "a7",
 27067              "a8",
 27068              "a9",
 27069              "a10",
 27070              "a29",
 27071              "a30",
 27072              "a31",
 27073              "a32",
 27074              "a33",
 27075              "a34",
 27076              "a35",
 27077              "a36",
 27078              "a37",
 27079              "a38",
 27080              "a39",
 27081              "a40",
 27082              "a41",
 27083              "a42",
 27084              "a43",
 27085              "a44",
 27086              "a45",
 27087              "a46",
 27088              "a47",
 27089              "a48",
 27090              "a49",
 27091              "a50",
 27092              "a51",
 27093              "a52",
 27094              "a53",
 27095              "a54",
 27096              "a55",
 27097              "a56",
 27098              "a57",
 27099              "a58",
 27100              "a59",
 27101              "a60",
 27102              "a61",
 27103              "a62",
 27104              "a63",
 27105              "a64",
 27106              "a65",
 27107              "a66",
 27108              "a67",
 27109              "a68",
 27110              "a69",
 27111              "a70",
 27112              "a71",
 27113              "a72",
 27114              "a73",
 27115              "a74",
 27116              "a203",
 27117              "a75",
 27118              "a204",
 27119              "a76",
 27120              "a77",
 27121              "a78",
 27122              "a79",
 27123              "a81",
 27124              "a82",
 27125              "a83",
 27126              "a84",
 27127              "a97",
 27128              "a98",
 27129              "a99",
 27130              "a100",
 27131              "",
 27132              "a89",
 27133              "a90",
 27134              "a93",
 27135              "a94",
 27136              "a91",
 27137              "a92",
 27138              "a205",
 27139              "a85",
 27140              "a206",
 27141              "a86",
 27142              "a87",
 27143              "a88",
 27144              "a95",
 27145              "a96",
 27146              "",
 27147              "",
 27148              "",
 27149              "",
 27150              "",
 27151              "",
 27152              "",
 27153              "",
 27154              "",
 27155              "",
 27156              "",
 27157              "",
 27158              "",
 27159              "",
 27160              "",
 27161              "",
 27162              "",
 27163              "",
 27164              "",
 27165              "a101",
 27166              "a102",
 27167              "a103",
 27168              "a104",
 27169              "a106",
 27170              "a107",
 27171              "a108",
 27172              "a112",
 27173              "a111",
 27174              "a110",
 27175              "a109",
 27176              "a120",
 27177              "a121",
 27178              "a122",
 27179              "a123",
 27180              "a124",
 27181              "a125",
 27182              "a126",
 27183              "a127",
 27184              "a128",
 27185              "a129",
 27186              "a130",
 27187              "a131",
 27188              "a132",
 27189              "a133",
 27190              "a134",
 27191              "a135",
 27192              "a136",
 27193              "a137",
 27194              "a138",
 27195              "a139",
 27196              "a140",
 27197              "a141",
 27198              "a142",
 27199              "a143",
 27200              "a144",
 27201              "a145",
 27202              "a146",
 27203              "a147",
 27204              "a148",
 27205              "a149",
 27206              "a150",
 27207              "a151",
 27208              "a152",
 27209              "a153",
 27210              "a154",
 27211              "a155",
 27212              "a156",
 27213              "a157",
 27214              "a158",
 27215              "a159",
 27216              "a160",
 27217              "a161",
 27218              "a163",
 27219              "a164",
 27220              "a196",
 27221              "a165",
 27222              "a192",
 27223              "a166",
 27224              "a167",
 27225              "a168",
 27226              "a169",
 27227              "a170",
 27228              "a171",
 27229              "a172",
 27230              "a173",
 27231              "a162",
 27232              "a174",
 27233              "a175",
 27234              "a176",
 27235              "a177",
 27236              "a178",
 27237              "a179",
 27238              "a193",
 27239              "a180",
 27240              "a199",
 27241              "a181",
 27242              "a200",
 27243              "a182",
 27244              "",
 27245              "a201",
 27246              "a183",
 27247              "a184",
 27248              "a197",
 27249              "a185",
 27250              "a194",
 27251              "a198",
 27252              "a186",
 27253              "a195",
 27254              "a187",
 27255              "a188",
 27256              "a189",
 27257              "a190",
 27258              "a191",
 27259              "",
 27260            ];
 27261            t.ZapfDingbatsEncoding = c;
 27262          },
 27263          (e, t, a) => {
 27264            Object.defineProperty(t, "__esModule", { value: !0 });
 27265            t.SEAC_ANALYSIS_ENABLED =
 27266              t.MacStandardGlyphOrdering =
 27267              t.FontFlags =
 27268                void 0;
 27269            t.normalizeFontName = function normalizeFontName(e) {
 27270              return e.replaceAll(/[,_]/g, "-").replaceAll(/\s/g, "");
 27271            };
 27272            t.recoverGlyphName = recoverGlyphName;
 27273            t.type1FontGlyphMapping = function type1FontGlyphMapping(e, t, a) {
 27274              const i = Object.create(null);
 27275              let s, c, l;
 27276              const h = !!(e.flags & o.Symbolic);
 27277              if (e.isInternalFont) {
 27278                l = t;
 27279                for (c = 0; c < l.length; c++) {
 27280                  s = a.indexOf(l[c]);
 27281                  i[c] = s >= 0 ? s : 0;
 27282                }
 27283              } else if (e.baseEncodingName) {
 27284                l = (0, r.getEncoding)(e.baseEncodingName);
 27285                for (c = 0; c < l.length; c++) {
 27286                  s = a.indexOf(l[c]);
 27287                  i[c] = s >= 0 ? s : 0;
 27288                }
 27289              } else if (h) for (c in t) i[c] = t[c];
 27290              else {
 27291                l = r.StandardEncoding;
 27292                for (c = 0; c < l.length; c++) {
 27293                  s = a.indexOf(l[c]);
 27294                  i[c] = s >= 0 ? s : 0;
 27295                }
 27296              }
 27297              const u = e.differences;
 27298              let d;
 27299              if (u)
 27300                for (c in u) {
 27301                  const e = u[c];
 27302                  s = a.indexOf(e);
 27303                  if (-1 === s) {
 27304                    d || (d = (0, n.getGlyphsUnicode)());
 27305                    const t = recoverGlyphName(e, d);
 27306                    t !== e && (s = a.indexOf(t));
 27307                  }
 27308                  i[c] = s >= 0 ? s : 0;
 27309                }
 27310              return i;
 27311            };
 27312            var r = a(37),
 27313              n = a(39),
 27314              i = a(40),
 27315              s = a(2);
 27316            t.SEAC_ANALYSIS_ENABLED = !0;
 27317            const o = {
 27318              FixedPitch: 1,
 27319              Serif: 2,
 27320              Symbolic: 4,
 27321              Script: 8,
 27322              Nonsymbolic: 32,
 27323              Italic: 64,
 27324              AllCap: 65536,
 27325              SmallCap: 131072,
 27326              ForceBold: 262144,
 27327            };
 27328            t.FontFlags = o;
 27329            t.MacStandardGlyphOrdering = [
 27330              ".notdef",
 27331              ".null",
 27332              "nonmarkingreturn",
 27333              "space",
 27334              "exclam",
 27335              "quotedbl",
 27336              "numbersign",
 27337              "dollar",
 27338              "percent",
 27339              "ampersand",
 27340              "quotesingle",
 27341              "parenleft",
 27342              "parenright",
 27343              "asterisk",
 27344              "plus",
 27345              "comma",
 27346              "hyphen",
 27347              "period",
 27348              "slash",
 27349              "zero",
 27350              "one",
 27351              "two",
 27352              "three",
 27353              "four",
 27354              "five",
 27355              "six",
 27356              "seven",
 27357              "eight",
 27358              "nine",
 27359              "colon",
 27360              "semicolon",
 27361              "less",
 27362              "equal",
 27363              "greater",
 27364              "question",
 27365              "at",
 27366              "A",
 27367              "B",
 27368              "C",
 27369              "D",
 27370              "E",
 27371              "F",
 27372              "G",
 27373              "H",
 27374              "I",
 27375              "J",
 27376              "K",
 27377              "L",
 27378              "M",
 27379              "N",
 27380              "O",
 27381              "P",
 27382              "Q",
 27383              "R",
 27384              "S",
 27385              "T",
 27386              "U",
 27387              "V",
 27388              "W",
 27389              "X",
 27390              "Y",
 27391              "Z",
 27392              "bracketleft",
 27393              "backslash",
 27394              "bracketright",
 27395              "asciicircum",
 27396              "underscore",
 27397              "grave",
 27398              "a",
 27399              "b",
 27400              "c",
 27401              "d",
 27402              "e",
 27403              "f",
 27404              "g",
 27405              "h",
 27406              "i",
 27407              "j",
 27408              "k",
 27409              "l",
 27410              "m",
 27411              "n",
 27412              "o",
 27413              "p",
 27414              "q",
 27415              "r",
 27416              "s",
 27417              "t",
 27418              "u",
 27419              "v",
 27420              "w",
 27421              "x",
 27422              "y",
 27423              "z",
 27424              "braceleft",
 27425              "bar",
 27426              "braceright",
 27427              "asciitilde",
 27428              "Adieresis",
 27429              "Aring",
 27430              "Ccedilla",
 27431              "Eacute",
 27432              "Ntilde",
 27433              "Odieresis",
 27434              "Udieresis",
 27435              "aacute",
 27436              "agrave",
 27437              "acircumflex",
 27438              "adieresis",
 27439              "atilde",
 27440              "aring",
 27441              "ccedilla",
 27442              "eacute",
 27443              "egrave",
 27444              "ecircumflex",
 27445              "edieresis",
 27446              "iacute",
 27447              "igrave",
 27448              "icircumflex",
 27449              "idieresis",
 27450              "ntilde",
 27451              "oacute",
 27452              "ograve",
 27453              "ocircumflex",
 27454              "odieresis",
 27455              "otilde",
 27456              "uacute",
 27457              "ugrave",
 27458              "ucircumflex",
 27459              "udieresis",
 27460              "dagger",
 27461              "degree",
 27462              "cent",
 27463              "sterling",
 27464              "section",
 27465              "bullet",
 27466              "paragraph",
 27467              "germandbls",
 27468              "registered",
 27469              "copyright",
 27470              "trademark",
 27471              "acute",
 27472              "dieresis",
 27473              "notequal",
 27474              "AE",
 27475              "Oslash",
 27476              "infinity",
 27477              "plusminus",
 27478              "lessequal",
 27479              "greaterequal",
 27480              "yen",
 27481              "mu",
 27482              "partialdiff",
 27483              "summation",
 27484              "product",
 27485              "pi",
 27486              "integral",
 27487              "ordfeminine",
 27488              "ordmasculine",
 27489              "Omega",
 27490              "ae",
 27491              "oslash",
 27492              "questiondown",
 27493              "exclamdown",
 27494              "logicalnot",
 27495              "radical",
 27496              "florin",
 27497              "approxequal",
 27498              "Delta",
 27499              "guillemotleft",
 27500              "guillemotright",
 27501              "ellipsis",
 27502              "nonbreakingspace",
 27503              "Agrave",
 27504              "Atilde",
 27505              "Otilde",
 27506              "OE",
 27507              "oe",
 27508              "endash",
 27509              "emdash",
 27510              "quotedblleft",
 27511              "quotedblright",
 27512              "quoteleft",
 27513              "quoteright",
 27514              "divide",
 27515              "lozenge",
 27516              "ydieresis",
 27517              "Ydieresis",
 27518              "fraction",
 27519              "currency",
 27520              "guilsinglleft",
 27521              "guilsinglright",
 27522              "fi",
 27523              "fl",
 27524              "daggerdbl",
 27525              "periodcentered",
 27526              "quotesinglbase",
 27527              "quotedblbase",
 27528              "perthousand",
 27529              "Acircumflex",
 27530              "Ecircumflex",
 27531              "Aacute",
 27532              "Edieresis",
 27533              "Egrave",
 27534              "Iacute",
 27535              "Icircumflex",
 27536              "Idieresis",
 27537              "Igrave",
 27538              "Oacute",
 27539              "Ocircumflex",
 27540              "apple",
 27541              "Ograve",
 27542              "Uacute",
 27543              "Ucircumflex",
 27544              "Ugrave",
 27545              "dotlessi",
 27546              "circumflex",
 27547              "tilde",
 27548              "macron",
 27549              "breve",
 27550              "dotaccent",
 27551              "ring",
 27552              "cedilla",
 27553              "hungarumlaut",
 27554              "ogonek",
 27555              "caron",
 27556              "Lslash",
 27557              "lslash",
 27558              "Scaron",
 27559              "scaron",
 27560              "Zcaron",
 27561              "zcaron",
 27562              "brokenbar",
 27563              "Eth",
 27564              "eth",
 27565              "Yacute",
 27566              "yacute",
 27567              "Thorn",
 27568              "thorn",
 27569              "minus",
 27570              "multiply",
 27571              "onesuperior",
 27572              "twosuperior",
 27573              "threesuperior",
 27574              "onehalf",
 27575              "onequarter",
 27576              "threequarters",
 27577              "franc",
 27578              "Gbreve",
 27579              "gbreve",
 27580              "Idotaccent",
 27581              "Scedilla",
 27582              "scedilla",
 27583              "Cacute",
 27584              "cacute",
 27585              "Ccaron",
 27586              "ccaron",
 27587              "dcroat",
 27588            ];
 27589            function recoverGlyphName(e, t) {
 27590              if (void 0 !== t[e]) return e;
 27591              const a = (0, i.getUnicodeForGlyph)(e, t);
 27592              if (-1 !== a) for (const e in t) if (t[e] === a) return e;
 27593              (0, s.info)("Unable to recover a standard glyph name for: " + e);
 27594              return e;
 27595            }
 27596          },
 27597          (e, t, a) => {
 27598            Object.defineProperty(t, "__esModule", { value: !0 });
 27599            t.getGlyphsUnicode = t.getDingbatsGlyphsUnicode = void 0;
 27600            var r = a(3);
 27601            const n = (0, r.getLookupTableFactory)(function (e) {
 27602              e.A = 65;
 27603              e.AE = 198;
 27604              e.AEacute = 508;
 27605              e.AEmacron = 482;
 27606              e.AEsmall = 63462;
 27607              e.Aacute = 193;
 27608              e.Aacutesmall = 63457;
 27609              e.Abreve = 258;
 27610              e.Abreveacute = 7854;
 27611              e.Abrevecyrillic = 1232;
 27612              e.Abrevedotbelow = 7862;
 27613              e.Abrevegrave = 7856;
 27614              e.Abrevehookabove = 7858;
 27615              e.Abrevetilde = 7860;
 27616              e.Acaron = 461;
 27617              e.Acircle = 9398;
 27618              e.Acircumflex = 194;
 27619              e.Acircumflexacute = 7844;
 27620              e.Acircumflexdotbelow = 7852;
 27621              e.Acircumflexgrave = 7846;
 27622              e.Acircumflexhookabove = 7848;
 27623              e.Acircumflexsmall = 63458;
 27624              e.Acircumflextilde = 7850;
 27625              e.Acute = 63177;
 27626              e.Acutesmall = 63412;
 27627              e.Acyrillic = 1040;
 27628              e.Adblgrave = 512;
 27629              e.Adieresis = 196;
 27630              e.Adieresiscyrillic = 1234;
 27631              e.Adieresismacron = 478;
 27632              e.Adieresissmall = 63460;
 27633              e.Adotbelow = 7840;
 27634              e.Adotmacron = 480;
 27635              e.Agrave = 192;
 27636              e.Agravesmall = 63456;
 27637              e.Ahookabove = 7842;
 27638              e.Aiecyrillic = 1236;
 27639              e.Ainvertedbreve = 514;
 27640              e.Alpha = 913;
 27641              e.Alphatonos = 902;
 27642              e.Amacron = 256;
 27643              e.Amonospace = 65313;
 27644              e.Aogonek = 260;
 27645              e.Aring = 197;
 27646              e.Aringacute = 506;
 27647              e.Aringbelow = 7680;
 27648              e.Aringsmall = 63461;
 27649              e.Asmall = 63329;
 27650              e.Atilde = 195;
 27651              e.Atildesmall = 63459;
 27652              e.Aybarmenian = 1329;
 27653              e.B = 66;
 27654              e.Bcircle = 9399;
 27655              e.Bdotaccent = 7682;
 27656              e.Bdotbelow = 7684;
 27657              e.Becyrillic = 1041;
 27658              e.Benarmenian = 1330;
 27659              e.Beta = 914;
 27660              e.Bhook = 385;
 27661              e.Blinebelow = 7686;
 27662              e.Bmonospace = 65314;
 27663              e.Brevesmall = 63220;
 27664              e.Bsmall = 63330;
 27665              e.Btopbar = 386;
 27666              e.C = 67;
 27667              e.Caarmenian = 1342;
 27668              e.Cacute = 262;
 27669              e.Caron = 63178;
 27670              e.Caronsmall = 63221;
 27671              e.Ccaron = 268;
 27672              e.Ccedilla = 199;
 27673              e.Ccedillaacute = 7688;
 27674              e.Ccedillasmall = 63463;
 27675              e.Ccircle = 9400;
 27676              e.Ccircumflex = 264;
 27677              e.Cdot = 266;
 27678              e.Cdotaccent = 266;
 27679              e.Cedillasmall = 63416;
 27680              e.Chaarmenian = 1353;
 27681              e.Cheabkhasiancyrillic = 1212;
 27682              e.Checyrillic = 1063;
 27683              e.Chedescenderabkhasiancyrillic = 1214;
 27684              e.Chedescendercyrillic = 1206;
 27685              e.Chedieresiscyrillic = 1268;
 27686              e.Cheharmenian = 1347;
 27687              e.Chekhakassiancyrillic = 1227;
 27688              e.Cheverticalstrokecyrillic = 1208;
 27689              e.Chi = 935;
 27690              e.Chook = 391;
 27691              e.Circumflexsmall = 63222;
 27692              e.Cmonospace = 65315;
 27693              e.Coarmenian = 1361;
 27694              e.Csmall = 63331;
 27695              e.D = 68;
 27696              e.DZ = 497;
 27697              e.DZcaron = 452;
 27698              e.Daarmenian = 1332;
 27699              e.Dafrican = 393;
 27700              e.Dcaron = 270;
 27701              e.Dcedilla = 7696;
 27702              e.Dcircle = 9401;
 27703              e.Dcircumflexbelow = 7698;
 27704              e.Dcroat = 272;
 27705              e.Ddotaccent = 7690;
 27706              e.Ddotbelow = 7692;
 27707              e.Decyrillic = 1044;
 27708              e.Deicoptic = 1006;
 27709              e.Delta = 8710;
 27710              e.Deltagreek = 916;
 27711              e.Dhook = 394;
 27712              e.Dieresis = 63179;
 27713              e.DieresisAcute = 63180;
 27714              e.DieresisGrave = 63181;
 27715              e.Dieresissmall = 63400;
 27716              e.Digammagreek = 988;
 27717              e.Djecyrillic = 1026;
 27718              e.Dlinebelow = 7694;
 27719              e.Dmonospace = 65316;
 27720              e.Dotaccentsmall = 63223;
 27721              e.Dslash = 272;
 27722              e.Dsmall = 63332;
 27723              e.Dtopbar = 395;
 27724              e.Dz = 498;
 27725              e.Dzcaron = 453;
 27726              e.Dzeabkhasiancyrillic = 1248;
 27727              e.Dzecyrillic = 1029;
 27728              e.Dzhecyrillic = 1039;
 27729              e.E = 69;
 27730              e.Eacute = 201;
 27731              e.Eacutesmall = 63465;
 27732              e.Ebreve = 276;
 27733              e.Ecaron = 282;
 27734              e.Ecedillabreve = 7708;
 27735              e.Echarmenian = 1333;
 27736              e.Ecircle = 9402;
 27737              e.Ecircumflex = 202;
 27738              e.Ecircumflexacute = 7870;
 27739              e.Ecircumflexbelow = 7704;
 27740              e.Ecircumflexdotbelow = 7878;
 27741              e.Ecircumflexgrave = 7872;
 27742              e.Ecircumflexhookabove = 7874;
 27743              e.Ecircumflexsmall = 63466;
 27744              e.Ecircumflextilde = 7876;
 27745              e.Ecyrillic = 1028;
 27746              e.Edblgrave = 516;
 27747              e.Edieresis = 203;
 27748              e.Edieresissmall = 63467;
 27749              e.Edot = 278;
 27750              e.Edotaccent = 278;
 27751              e.Edotbelow = 7864;
 27752              e.Efcyrillic = 1060;
 27753              e.Egrave = 200;
 27754              e.Egravesmall = 63464;
 27755              e.Eharmenian = 1335;
 27756              e.Ehookabove = 7866;
 27757              e.Eightroman = 8551;
 27758              e.Einvertedbreve = 518;
 27759              e.Eiotifiedcyrillic = 1124;
 27760              e.Elcyrillic = 1051;
 27761              e.Elevenroman = 8554;
 27762              e.Emacron = 274;
 27763              e.Emacronacute = 7702;
 27764              e.Emacrongrave = 7700;
 27765              e.Emcyrillic = 1052;
 27766              e.Emonospace = 65317;
 27767              e.Encyrillic = 1053;
 27768              e.Endescendercyrillic = 1186;
 27769              e.Eng = 330;
 27770              e.Enghecyrillic = 1188;
 27771              e.Enhookcyrillic = 1223;
 27772              e.Eogonek = 280;
 27773              e.Eopen = 400;
 27774              e.Epsilon = 917;
 27775              e.Epsilontonos = 904;
 27776              e.Ercyrillic = 1056;
 27777              e.Ereversed = 398;
 27778              e.Ereversedcyrillic = 1069;
 27779              e.Escyrillic = 1057;
 27780              e.Esdescendercyrillic = 1194;
 27781              e.Esh = 425;
 27782              e.Esmall = 63333;
 27783              e.Eta = 919;
 27784              e.Etarmenian = 1336;
 27785              e.Etatonos = 905;
 27786              e.Eth = 208;
 27787              e.Ethsmall = 63472;
 27788              e.Etilde = 7868;
 27789              e.Etildebelow = 7706;
 27790              e.Euro = 8364;
 27791              e.Ezh = 439;
 27792              e.Ezhcaron = 494;
 27793              e.Ezhreversed = 440;
 27794              e.F = 70;
 27795              e.Fcircle = 9403;
 27796              e.Fdotaccent = 7710;
 27797              e.Feharmenian = 1366;
 27798              e.Feicoptic = 996;
 27799              e.Fhook = 401;
 27800              e.Fitacyrillic = 1138;
 27801              e.Fiveroman = 8548;
 27802              e.Fmonospace = 65318;
 27803              e.Fourroman = 8547;
 27804              e.Fsmall = 63334;
 27805              e.G = 71;
 27806              e.GBsquare = 13191;
 27807              e.Gacute = 500;
 27808              e.Gamma = 915;
 27809              e.Gammaafrican = 404;
 27810              e.Gangiacoptic = 1002;
 27811              e.Gbreve = 286;
 27812              e.Gcaron = 486;
 27813              e.Gcedilla = 290;
 27814              e.Gcircle = 9404;
 27815              e.Gcircumflex = 284;
 27816              e.Gcommaaccent = 290;
 27817              e.Gdot = 288;
 27818              e.Gdotaccent = 288;
 27819              e.Gecyrillic = 1043;
 27820              e.Ghadarmenian = 1346;
 27821              e.Ghemiddlehookcyrillic = 1172;
 27822              e.Ghestrokecyrillic = 1170;
 27823              e.Gheupturncyrillic = 1168;
 27824              e.Ghook = 403;
 27825              e.Gimarmenian = 1331;
 27826              e.Gjecyrillic = 1027;
 27827              e.Gmacron = 7712;
 27828              e.Gmonospace = 65319;
 27829              e.Grave = 63182;
 27830              e.Gravesmall = 63328;
 27831              e.Gsmall = 63335;
 27832              e.Gsmallhook = 667;
 27833              e.Gstroke = 484;
 27834              e.H = 72;
 27835              e.H18533 = 9679;
 27836              e.H18543 = 9642;
 27837              e.H18551 = 9643;
 27838              e.H22073 = 9633;
 27839              e.HPsquare = 13259;
 27840              e.Haabkhasiancyrillic = 1192;
 27841              e.Hadescendercyrillic = 1202;
 27842              e.Hardsigncyrillic = 1066;
 27843              e.Hbar = 294;
 27844              e.Hbrevebelow = 7722;
 27845              e.Hcedilla = 7720;
 27846              e.Hcircle = 9405;
 27847              e.Hcircumflex = 292;
 27848              e.Hdieresis = 7718;
 27849              e.Hdotaccent = 7714;
 27850              e.Hdotbelow = 7716;
 27851              e.Hmonospace = 65320;
 27852              e.Hoarmenian = 1344;
 27853              e.Horicoptic = 1e3;
 27854              e.Hsmall = 63336;
 27855              e.Hungarumlaut = 63183;
 27856              e.Hungarumlautsmall = 63224;
 27857              e.Hzsquare = 13200;
 27858              e.I = 73;
 27859              e.IAcyrillic = 1071;
 27860              e.IJ = 306;
 27861              e.IUcyrillic = 1070;
 27862              e.Iacute = 205;
 27863              e.Iacutesmall = 63469;
 27864              e.Ibreve = 300;
 27865              e.Icaron = 463;
 27866              e.Icircle = 9406;
 27867              e.Icircumflex = 206;
 27868              e.Icircumflexsmall = 63470;
 27869              e.Icyrillic = 1030;
 27870              e.Idblgrave = 520;
 27871              e.Idieresis = 207;
 27872              e.Idieresisacute = 7726;
 27873              e.Idieresiscyrillic = 1252;
 27874              e.Idieresissmall = 63471;
 27875              e.Idot = 304;
 27876              e.Idotaccent = 304;
 27877              e.Idotbelow = 7882;
 27878              e.Iebrevecyrillic = 1238;
 27879              e.Iecyrillic = 1045;
 27880              e.Ifraktur = 8465;
 27881              e.Igrave = 204;
 27882              e.Igravesmall = 63468;
 27883              e.Ihookabove = 7880;
 27884              e.Iicyrillic = 1048;
 27885              e.Iinvertedbreve = 522;
 27886              e.Iishortcyrillic = 1049;
 27887              e.Imacron = 298;
 27888              e.Imacroncyrillic = 1250;
 27889              e.Imonospace = 65321;
 27890              e.Iniarmenian = 1339;
 27891              e.Iocyrillic = 1025;
 27892              e.Iogonek = 302;
 27893              e.Iota = 921;
 27894              e.Iotaafrican = 406;
 27895              e.Iotadieresis = 938;
 27896              e.Iotatonos = 906;
 27897              e.Ismall = 63337;
 27898              e.Istroke = 407;
 27899              e.Itilde = 296;
 27900              e.Itildebelow = 7724;
 27901              e.Izhitsacyrillic = 1140;
 27902              e.Izhitsadblgravecyrillic = 1142;
 27903              e.J = 74;
 27904              e.Jaarmenian = 1345;
 27905              e.Jcircle = 9407;
 27906              e.Jcircumflex = 308;
 27907              e.Jecyrillic = 1032;
 27908              e.Jheharmenian = 1355;
 27909              e.Jmonospace = 65322;
 27910              e.Jsmall = 63338;
 27911              e.K = 75;
 27912              e.KBsquare = 13189;
 27913              e.KKsquare = 13261;
 27914              e.Kabashkircyrillic = 1184;
 27915              e.Kacute = 7728;
 27916              e.Kacyrillic = 1050;
 27917              e.Kadescendercyrillic = 1178;
 27918              e.Kahookcyrillic = 1219;
 27919              e.Kappa = 922;
 27920              e.Kastrokecyrillic = 1182;
 27921              e.Kaverticalstrokecyrillic = 1180;
 27922              e.Kcaron = 488;
 27923              e.Kcedilla = 310;
 27924              e.Kcircle = 9408;
 27925              e.Kcommaaccent = 310;
 27926              e.Kdotbelow = 7730;
 27927              e.Keharmenian = 1364;
 27928              e.Kenarmenian = 1343;
 27929              e.Khacyrillic = 1061;
 27930              e.Kheicoptic = 998;
 27931              e.Khook = 408;
 27932              e.Kjecyrillic = 1036;
 27933              e.Klinebelow = 7732;
 27934              e.Kmonospace = 65323;
 27935              e.Koppacyrillic = 1152;
 27936              e.Koppagreek = 990;
 27937              e.Ksicyrillic = 1134;
 27938              e.Ksmall = 63339;
 27939              e.L = 76;
 27940              e.LJ = 455;
 27941              e.LL = 63167;
 27942              e.Lacute = 313;
 27943              e.Lambda = 923;
 27944              e.Lcaron = 317;
 27945              e.Lcedilla = 315;
 27946              e.Lcircle = 9409;
 27947              e.Lcircumflexbelow = 7740;
 27948              e.Lcommaaccent = 315;
 27949              e.Ldot = 319;
 27950              e.Ldotaccent = 319;
 27951              e.Ldotbelow = 7734;
 27952              e.Ldotbelowmacron = 7736;
 27953              e.Liwnarmenian = 1340;
 27954              e.Lj = 456;
 27955              e.Ljecyrillic = 1033;
 27956              e.Llinebelow = 7738;
 27957              e.Lmonospace = 65324;
 27958              e.Lslash = 321;
 27959              e.Lslashsmall = 63225;
 27960              e.Lsmall = 63340;
 27961              e.M = 77;
 27962              e.MBsquare = 13190;
 27963              e.Macron = 63184;
 27964              e.Macronsmall = 63407;
 27965              e.Macute = 7742;
 27966              e.Mcircle = 9410;
 27967              e.Mdotaccent = 7744;
 27968              e.Mdotbelow = 7746;
 27969              e.Menarmenian = 1348;
 27970              e.Mmonospace = 65325;
 27971              e.Msmall = 63341;
 27972              e.Mturned = 412;
 27973              e.Mu = 924;
 27974              e.N = 78;
 27975              e.NJ = 458;
 27976              e.Nacute = 323;
 27977              e.Ncaron = 327;
 27978              e.Ncedilla = 325;
 27979              e.Ncircle = 9411;
 27980              e.Ncircumflexbelow = 7754;
 27981              e.Ncommaaccent = 325;
 27982              e.Ndotaccent = 7748;
 27983              e.Ndotbelow = 7750;
 27984              e.Nhookleft = 413;
 27985              e.Nineroman = 8552;
 27986              e.Nj = 459;
 27987              e.Njecyrillic = 1034;
 27988              e.Nlinebelow = 7752;
 27989              e.Nmonospace = 65326;
 27990              e.Nowarmenian = 1350;
 27991              e.Nsmall = 63342;
 27992              e.Ntilde = 209;
 27993              e.Ntildesmall = 63473;
 27994              e.Nu = 925;
 27995              e.O = 79;
 27996              e.OE = 338;
 27997              e.OEsmall = 63226;
 27998              e.Oacute = 211;
 27999              e.Oacutesmall = 63475;
 28000              e.Obarredcyrillic = 1256;
 28001              e.Obarreddieresiscyrillic = 1258;
 28002              e.Obreve = 334;
 28003              e.Ocaron = 465;
 28004              e.Ocenteredtilde = 415;
 28005              e.Ocircle = 9412;
 28006              e.Ocircumflex = 212;
 28007              e.Ocircumflexacute = 7888;
 28008              e.Ocircumflexdotbelow = 7896;
 28009              e.Ocircumflexgrave = 7890;
 28010              e.Ocircumflexhookabove = 7892;
 28011              e.Ocircumflexsmall = 63476;
 28012              e.Ocircumflextilde = 7894;
 28013              e.Ocyrillic = 1054;
 28014              e.Odblacute = 336;
 28015              e.Odblgrave = 524;
 28016              e.Odieresis = 214;
 28017              e.Odieresiscyrillic = 1254;
 28018              e.Odieresissmall = 63478;
 28019              e.Odotbelow = 7884;
 28020              e.Ogoneksmall = 63227;
 28021              e.Ograve = 210;
 28022              e.Ogravesmall = 63474;
 28023              e.Oharmenian = 1365;
 28024              e.Ohm = 8486;
 28025              e.Ohookabove = 7886;
 28026              e.Ohorn = 416;
 28027              e.Ohornacute = 7898;
 28028              e.Ohorndotbelow = 7906;
 28029              e.Ohorngrave = 7900;
 28030              e.Ohornhookabove = 7902;
 28031              e.Ohorntilde = 7904;
 28032              e.Ohungarumlaut = 336;
 28033              e.Oi = 418;
 28034              e.Oinvertedbreve = 526;
 28035              e.Omacron = 332;
 28036              e.Omacronacute = 7762;
 28037              e.Omacrongrave = 7760;
 28038              e.Omega = 8486;
 28039              e.Omegacyrillic = 1120;
 28040              e.Omegagreek = 937;
 28041              e.Omegaroundcyrillic = 1146;
 28042              e.Omegatitlocyrillic = 1148;
 28043              e.Omegatonos = 911;
 28044              e.Omicron = 927;
 28045              e.Omicrontonos = 908;
 28046              e.Omonospace = 65327;
 28047              e.Oneroman = 8544;
 28048              e.Oogonek = 490;
 28049              e.Oogonekmacron = 492;
 28050              e.Oopen = 390;
 28051              e.Oslash = 216;
 28052              e.Oslashacute = 510;
 28053              e.Oslashsmall = 63480;
 28054              e.Osmall = 63343;
 28055              e.Ostrokeacute = 510;
 28056              e.Otcyrillic = 1150;
 28057              e.Otilde = 213;
 28058              e.Otildeacute = 7756;
 28059              e.Otildedieresis = 7758;
 28060              e.Otildesmall = 63477;
 28061              e.P = 80;
 28062              e.Pacute = 7764;
 28063              e.Pcircle = 9413;
 28064              e.Pdotaccent = 7766;
 28065              e.Pecyrillic = 1055;
 28066              e.Peharmenian = 1354;
 28067              e.Pemiddlehookcyrillic = 1190;
 28068              e.Phi = 934;
 28069              e.Phook = 420;
 28070              e.Pi = 928;
 28071              e.Piwrarmenian = 1363;
 28072              e.Pmonospace = 65328;
 28073              e.Psi = 936;
 28074              e.Psicyrillic = 1136;
 28075              e.Psmall = 63344;
 28076              e.Q = 81;
 28077              e.Qcircle = 9414;
 28078              e.Qmonospace = 65329;
 28079              e.Qsmall = 63345;
 28080              e.R = 82;
 28081              e.Raarmenian = 1356;
 28082              e.Racute = 340;
 28083              e.Rcaron = 344;
 28084              e.Rcedilla = 342;
 28085              e.Rcircle = 9415;
 28086              e.Rcommaaccent = 342;
 28087              e.Rdblgrave = 528;
 28088              e.Rdotaccent = 7768;
 28089              e.Rdotbelow = 7770;
 28090              e.Rdotbelowmacron = 7772;
 28091              e.Reharmenian = 1360;
 28092              e.Rfraktur = 8476;
 28093              e.Rho = 929;
 28094              e.Ringsmall = 63228;
 28095              e.Rinvertedbreve = 530;
 28096              e.Rlinebelow = 7774;
 28097              e.Rmonospace = 65330;
 28098              e.Rsmall = 63346;
 28099              e.Rsmallinverted = 641;
 28100              e.Rsmallinvertedsuperior = 694;
 28101              e.S = 83;
 28102              e.SF010000 = 9484;
 28103              e.SF020000 = 9492;
 28104              e.SF030000 = 9488;
 28105              e.SF040000 = 9496;
 28106              e.SF050000 = 9532;
 28107              e.SF060000 = 9516;
 28108              e.SF070000 = 9524;
 28109              e.SF080000 = 9500;
 28110              e.SF090000 = 9508;
 28111              e.SF100000 = 9472;
 28112              e.SF110000 = 9474;
 28113              e.SF190000 = 9569;
 28114              e.SF200000 = 9570;
 28115              e.SF210000 = 9558;
 28116              e.SF220000 = 9557;
 28117              e.SF230000 = 9571;
 28118              e.SF240000 = 9553;
 28119              e.SF250000 = 9559;
 28120              e.SF260000 = 9565;
 28121              e.SF270000 = 9564;
 28122              e.SF280000 = 9563;
 28123              e.SF360000 = 9566;
 28124              e.SF370000 = 9567;
 28125              e.SF380000 = 9562;
 28126              e.SF390000 = 9556;
 28127              e.SF400000 = 9577;
 28128              e.SF410000 = 9574;
 28129              e.SF420000 = 9568;
 28130              e.SF430000 = 9552;
 28131              e.SF440000 = 9580;
 28132              e.SF450000 = 9575;
 28133              e.SF460000 = 9576;
 28134              e.SF470000 = 9572;
 28135              e.SF480000 = 9573;
 28136              e.SF490000 = 9561;
 28137              e.SF500000 = 9560;
 28138              e.SF510000 = 9554;
 28139              e.SF520000 = 9555;
 28140              e.SF530000 = 9579;
 28141              e.SF540000 = 9578;
 28142              e.Sacute = 346;
 28143              e.Sacutedotaccent = 7780;
 28144              e.Sampigreek = 992;
 28145              e.Scaron = 352;
 28146              e.Scarondotaccent = 7782;
 28147              e.Scaronsmall = 63229;
 28148              e.Scedilla = 350;
 28149              e.Schwa = 399;
 28150              e.Schwacyrillic = 1240;
 28151              e.Schwadieresiscyrillic = 1242;
 28152              e.Scircle = 9416;
 28153              e.Scircumflex = 348;
 28154              e.Scommaaccent = 536;
 28155              e.Sdotaccent = 7776;
 28156              e.Sdotbelow = 7778;
 28157              e.Sdotbelowdotaccent = 7784;
 28158              e.Seharmenian = 1357;
 28159              e.Sevenroman = 8550;
 28160              e.Shaarmenian = 1351;
 28161              e.Shacyrillic = 1064;
 28162              e.Shchacyrillic = 1065;
 28163              e.Sheicoptic = 994;
 28164              e.Shhacyrillic = 1210;
 28165              e.Shimacoptic = 1004;
 28166              e.Sigma = 931;
 28167              e.Sixroman = 8549;
 28168              e.Smonospace = 65331;
 28169              e.Softsigncyrillic = 1068;
 28170              e.Ssmall = 63347;
 28171              e.Stigmagreek = 986;
 28172              e.T = 84;
 28173              e.Tau = 932;
 28174              e.Tbar = 358;
 28175              e.Tcaron = 356;
 28176              e.Tcedilla = 354;
 28177              e.Tcircle = 9417;
 28178              e.Tcircumflexbelow = 7792;
 28179              e.Tcommaaccent = 354;
 28180              e.Tdotaccent = 7786;
 28181              e.Tdotbelow = 7788;
 28182              e.Tecyrillic = 1058;
 28183              e.Tedescendercyrillic = 1196;
 28184              e.Tenroman = 8553;
 28185              e.Tetsecyrillic = 1204;
 28186              e.Theta = 920;
 28187              e.Thook = 428;
 28188              e.Thorn = 222;
 28189              e.Thornsmall = 63486;
 28190              e.Threeroman = 8546;
 28191              e.Tildesmall = 63230;
 28192              e.Tiwnarmenian = 1359;
 28193              e.Tlinebelow = 7790;
 28194              e.Tmonospace = 65332;
 28195              e.Toarmenian = 1337;
 28196              e.Tonefive = 444;
 28197              e.Tonesix = 388;
 28198              e.Tonetwo = 423;
 28199              e.Tretroflexhook = 430;
 28200              e.Tsecyrillic = 1062;
 28201              e.Tshecyrillic = 1035;
 28202              e.Tsmall = 63348;
 28203              e.Twelveroman = 8555;
 28204              e.Tworoman = 8545;
 28205              e.U = 85;
 28206              e.Uacute = 218;
 28207              e.Uacutesmall = 63482;
 28208              e.Ubreve = 364;
 28209              e.Ucaron = 467;
 28210              e.Ucircle = 9418;
 28211              e.Ucircumflex = 219;
 28212              e.Ucircumflexbelow = 7798;
 28213              e.Ucircumflexsmall = 63483;
 28214              e.Ucyrillic = 1059;
 28215              e.Udblacute = 368;
 28216              e.Udblgrave = 532;
 28217              e.Udieresis = 220;
 28218              e.Udieresisacute = 471;
 28219              e.Udieresisbelow = 7794;
 28220              e.Udieresiscaron = 473;
 28221              e.Udieresiscyrillic = 1264;
 28222              e.Udieresisgrave = 475;
 28223              e.Udieresismacron = 469;
 28224              e.Udieresissmall = 63484;
 28225              e.Udotbelow = 7908;
 28226              e.Ugrave = 217;
 28227              e.Ugravesmall = 63481;
 28228              e.Uhookabove = 7910;
 28229              e.Uhorn = 431;
 28230              e.Uhornacute = 7912;
 28231              e.Uhorndotbelow = 7920;
 28232              e.Uhorngrave = 7914;
 28233              e.Uhornhookabove = 7916;
 28234              e.Uhorntilde = 7918;
 28235              e.Uhungarumlaut = 368;
 28236              e.Uhungarumlautcyrillic = 1266;
 28237              e.Uinvertedbreve = 534;
 28238              e.Ukcyrillic = 1144;
 28239              e.Umacron = 362;
 28240              e.Umacroncyrillic = 1262;
 28241              e.Umacrondieresis = 7802;
 28242              e.Umonospace = 65333;
 28243              e.Uogonek = 370;
 28244              e.Upsilon = 933;
 28245              e.Upsilon1 = 978;
 28246              e.Upsilonacutehooksymbolgreek = 979;
 28247              e.Upsilonafrican = 433;
 28248              e.Upsilondieresis = 939;
 28249              e.Upsilondieresishooksymbolgreek = 980;
 28250              e.Upsilonhooksymbol = 978;
 28251              e.Upsilontonos = 910;
 28252              e.Uring = 366;
 28253              e.Ushortcyrillic = 1038;
 28254              e.Usmall = 63349;
 28255              e.Ustraightcyrillic = 1198;
 28256              e.Ustraightstrokecyrillic = 1200;
 28257              e.Utilde = 360;
 28258              e.Utildeacute = 7800;
 28259              e.Utildebelow = 7796;
 28260              e.V = 86;
 28261              e.Vcircle = 9419;
 28262              e.Vdotbelow = 7806;
 28263              e.Vecyrillic = 1042;
 28264              e.Vewarmenian = 1358;
 28265              e.Vhook = 434;
 28266              e.Vmonospace = 65334;
 28267              e.Voarmenian = 1352;
 28268              e.Vsmall = 63350;
 28269              e.Vtilde = 7804;
 28270              e.W = 87;
 28271              e.Wacute = 7810;
 28272              e.Wcircle = 9420;
 28273              e.Wcircumflex = 372;
 28274              e.Wdieresis = 7812;
 28275              e.Wdotaccent = 7814;
 28276              e.Wdotbelow = 7816;
 28277              e.Wgrave = 7808;
 28278              e.Wmonospace = 65335;
 28279              e.Wsmall = 63351;
 28280              e.X = 88;
 28281              e.Xcircle = 9421;
 28282              e.Xdieresis = 7820;
 28283              e.Xdotaccent = 7818;
 28284              e.Xeharmenian = 1341;
 28285              e.Xi = 926;
 28286              e.Xmonospace = 65336;
 28287              e.Xsmall = 63352;
 28288              e.Y = 89;
 28289              e.Yacute = 221;
 28290              e.Yacutesmall = 63485;
 28291              e.Yatcyrillic = 1122;
 28292              e.Ycircle = 9422;
 28293              e.Ycircumflex = 374;
 28294              e.Ydieresis = 376;
 28295              e.Ydieresissmall = 63487;
 28296              e.Ydotaccent = 7822;
 28297              e.Ydotbelow = 7924;
 28298              e.Yericyrillic = 1067;
 28299              e.Yerudieresiscyrillic = 1272;
 28300              e.Ygrave = 7922;
 28301              e.Yhook = 435;
 28302              e.Yhookabove = 7926;
 28303              e.Yiarmenian = 1349;
 28304              e.Yicyrillic = 1031;
 28305              e.Yiwnarmenian = 1362;
 28306              e.Ymonospace = 65337;
 28307              e.Ysmall = 63353;
 28308              e.Ytilde = 7928;
 28309              e.Yusbigcyrillic = 1130;
 28310              e.Yusbigiotifiedcyrillic = 1132;
 28311              e.Yuslittlecyrillic = 1126;
 28312              e.Yuslittleiotifiedcyrillic = 1128;
 28313              e.Z = 90;
 28314              e.Zaarmenian = 1334;
 28315              e.Zacute = 377;
 28316              e.Zcaron = 381;
 28317              e.Zcaronsmall = 63231;
 28318              e.Zcircle = 9423;
 28319              e.Zcircumflex = 7824;
 28320              e.Zdot = 379;
 28321              e.Zdotaccent = 379;
 28322              e.Zdotbelow = 7826;
 28323              e.Zecyrillic = 1047;
 28324              e.Zedescendercyrillic = 1176;
 28325              e.Zedieresiscyrillic = 1246;
 28326              e.Zeta = 918;
 28327              e.Zhearmenian = 1338;
 28328              e.Zhebrevecyrillic = 1217;
 28329              e.Zhecyrillic = 1046;
 28330              e.Zhedescendercyrillic = 1174;
 28331              e.Zhedieresiscyrillic = 1244;
 28332              e.Zlinebelow = 7828;
 28333              e.Zmonospace = 65338;
 28334              e.Zsmall = 63354;
 28335              e.Zstroke = 437;
 28336              e.a = 97;
 28337              e.aabengali = 2438;
 28338              e.aacute = 225;
 28339              e.aadeva = 2310;
 28340              e.aagujarati = 2694;
 28341              e.aagurmukhi = 2566;
 28342              e.aamatragurmukhi = 2622;
 28343              e.aarusquare = 13059;
 28344              e.aavowelsignbengali = 2494;
 28345              e.aavowelsigndeva = 2366;
 28346              e.aavowelsigngujarati = 2750;
 28347              e.abbreviationmarkarmenian = 1375;
 28348              e.abbreviationsigndeva = 2416;
 28349              e.abengali = 2437;
 28350              e.abopomofo = 12570;
 28351              e.abreve = 259;
 28352              e.abreveacute = 7855;
 28353              e.abrevecyrillic = 1233;
 28354              e.abrevedotbelow = 7863;
 28355              e.abrevegrave = 7857;
 28356              e.abrevehookabove = 7859;
 28357              e.abrevetilde = 7861;
 28358              e.acaron = 462;
 28359              e.acircle = 9424;
 28360              e.acircumflex = 226;
 28361              e.acircumflexacute = 7845;
 28362              e.acircumflexdotbelow = 7853;
 28363              e.acircumflexgrave = 7847;
 28364              e.acircumflexhookabove = 7849;
 28365              e.acircumflextilde = 7851;
 28366              e.acute = 180;
 28367              e.acutebelowcmb = 791;
 28368              e.acutecmb = 769;
 28369              e.acutecomb = 769;
 28370              e.acutedeva = 2388;
 28371              e.acutelowmod = 719;
 28372              e.acutetonecmb = 833;
 28373              e.acyrillic = 1072;
 28374              e.adblgrave = 513;
 28375              e.addakgurmukhi = 2673;
 28376              e.adeva = 2309;
 28377              e.adieresis = 228;
 28378              e.adieresiscyrillic = 1235;
 28379              e.adieresismacron = 479;
 28380              e.adotbelow = 7841;
 28381              e.adotmacron = 481;
 28382              e.ae = 230;
 28383              e.aeacute = 509;
 28384              e.aekorean = 12624;
 28385              e.aemacron = 483;
 28386              e.afii00208 = 8213;
 28387              e.afii08941 = 8356;
 28388              e.afii10017 = 1040;
 28389              e.afii10018 = 1041;
 28390              e.afii10019 = 1042;
 28391              e.afii10020 = 1043;
 28392              e.afii10021 = 1044;
 28393              e.afii10022 = 1045;
 28394              e.afii10023 = 1025;
 28395              e.afii10024 = 1046;
 28396              e.afii10025 = 1047;
 28397              e.afii10026 = 1048;
 28398              e.afii10027 = 1049;
 28399              e.afii10028 = 1050;
 28400              e.afii10029 = 1051;
 28401              e.afii10030 = 1052;
 28402              e.afii10031 = 1053;
 28403              e.afii10032 = 1054;
 28404              e.afii10033 = 1055;
 28405              e.afii10034 = 1056;
 28406              e.afii10035 = 1057;
 28407              e.afii10036 = 1058;
 28408              e.afii10037 = 1059;
 28409              e.afii10038 = 1060;
 28410              e.afii10039 = 1061;
 28411              e.afii10040 = 1062;
 28412              e.afii10041 = 1063;
 28413              e.afii10042 = 1064;
 28414              e.afii10043 = 1065;
 28415              e.afii10044 = 1066;
 28416              e.afii10045 = 1067;
 28417              e.afii10046 = 1068;
 28418              e.afii10047 = 1069;
 28419              e.afii10048 = 1070;
 28420              e.afii10049 = 1071;
 28421              e.afii10050 = 1168;
 28422              e.afii10051 = 1026;
 28423              e.afii10052 = 1027;
 28424              e.afii10053 = 1028;
 28425              e.afii10054 = 1029;
 28426              e.afii10055 = 1030;
 28427              e.afii10056 = 1031;
 28428              e.afii10057 = 1032;
 28429              e.afii10058 = 1033;
 28430              e.afii10059 = 1034;
 28431              e.afii10060 = 1035;
 28432              e.afii10061 = 1036;
 28433              e.afii10062 = 1038;
 28434              e.afii10063 = 63172;
 28435              e.afii10064 = 63173;
 28436              e.afii10065 = 1072;
 28437              e.afii10066 = 1073;
 28438              e.afii10067 = 1074;
 28439              e.afii10068 = 1075;
 28440              e.afii10069 = 1076;
 28441              e.afii10070 = 1077;
 28442              e.afii10071 = 1105;
 28443              e.afii10072 = 1078;
 28444              e.afii10073 = 1079;
 28445              e.afii10074 = 1080;
 28446              e.afii10075 = 1081;
 28447              e.afii10076 = 1082;
 28448              e.afii10077 = 1083;
 28449              e.afii10078 = 1084;
 28450              e.afii10079 = 1085;
 28451              e.afii10080 = 1086;
 28452              e.afii10081 = 1087;
 28453              e.afii10082 = 1088;
 28454              e.afii10083 = 1089;
 28455              e.afii10084 = 1090;
 28456              e.afii10085 = 1091;
 28457              e.afii10086 = 1092;
 28458              e.afii10087 = 1093;
 28459              e.afii10088 = 1094;
 28460              e.afii10089 = 1095;
 28461              e.afii10090 = 1096;
 28462              e.afii10091 = 1097;
 28463              e.afii10092 = 1098;
 28464              e.afii10093 = 1099;
 28465              e.afii10094 = 1100;
 28466              e.afii10095 = 1101;
 28467              e.afii10096 = 1102;
 28468              e.afii10097 = 1103;
 28469              e.afii10098 = 1169;
 28470              e.afii10099 = 1106;
 28471              e.afii10100 = 1107;
 28472              e.afii10101 = 1108;
 28473              e.afii10102 = 1109;
 28474              e.afii10103 = 1110;
 28475              e.afii10104 = 1111;
 28476              e.afii10105 = 1112;
 28477              e.afii10106 = 1113;
 28478              e.afii10107 = 1114;
 28479              e.afii10108 = 1115;
 28480              e.afii10109 = 1116;
 28481              e.afii10110 = 1118;
 28482              e.afii10145 = 1039;
 28483              e.afii10146 = 1122;
 28484              e.afii10147 = 1138;
 28485              e.afii10148 = 1140;
 28486              e.afii10192 = 63174;
 28487              e.afii10193 = 1119;
 28488              e.afii10194 = 1123;
 28489              e.afii10195 = 1139;
 28490              e.afii10196 = 1141;
 28491              e.afii10831 = 63175;
 28492              e.afii10832 = 63176;
 28493              e.afii10846 = 1241;
 28494              e.afii299 = 8206;
 28495              e.afii300 = 8207;
 28496              e.afii301 = 8205;
 28497              e.afii57381 = 1642;
 28498              e.afii57388 = 1548;
 28499              e.afii57392 = 1632;
 28500              e.afii57393 = 1633;
 28501              e.afii57394 = 1634;
 28502              e.afii57395 = 1635;
 28503              e.afii57396 = 1636;
 28504              e.afii57397 = 1637;
 28505              e.afii57398 = 1638;
 28506              e.afii57399 = 1639;
 28507              e.afii57400 = 1640;
 28508              e.afii57401 = 1641;
 28509              e.afii57403 = 1563;
 28510              e.afii57407 = 1567;
 28511              e.afii57409 = 1569;
 28512              e.afii57410 = 1570;
 28513              e.afii57411 = 1571;
 28514              e.afii57412 = 1572;
 28515              e.afii57413 = 1573;
 28516              e.afii57414 = 1574;
 28517              e.afii57415 = 1575;
 28518              e.afii57416 = 1576;
 28519              e.afii57417 = 1577;
 28520              e.afii57418 = 1578;
 28521              e.afii57419 = 1579;
 28522              e.afii57420 = 1580;
 28523              e.afii57421 = 1581;
 28524              e.afii57422 = 1582;
 28525              e.afii57423 = 1583;
 28526              e.afii57424 = 1584;
 28527              e.afii57425 = 1585;
 28528              e.afii57426 = 1586;
 28529              e.afii57427 = 1587;
 28530              e.afii57428 = 1588;
 28531              e.afii57429 = 1589;
 28532              e.afii57430 = 1590;
 28533              e.afii57431 = 1591;
 28534              e.afii57432 = 1592;
 28535              e.afii57433 = 1593;
 28536              e.afii57434 = 1594;
 28537              e.afii57440 = 1600;
 28538              e.afii57441 = 1601;
 28539              e.afii57442 = 1602;
 28540              e.afii57443 = 1603;
 28541              e.afii57444 = 1604;
 28542              e.afii57445 = 1605;
 28543              e.afii57446 = 1606;
 28544              e.afii57448 = 1608;
 28545              e.afii57449 = 1609;
 28546              e.afii57450 = 1610;
 28547              e.afii57451 = 1611;
 28548              e.afii57452 = 1612;
 28549              e.afii57453 = 1613;
 28550              e.afii57454 = 1614;
 28551              e.afii57455 = 1615;
 28552              e.afii57456 = 1616;
 28553              e.afii57457 = 1617;
 28554              e.afii57458 = 1618;
 28555              e.afii57470 = 1607;
 28556              e.afii57505 = 1700;
 28557              e.afii57506 = 1662;
 28558              e.afii57507 = 1670;
 28559              e.afii57508 = 1688;
 28560              e.afii57509 = 1711;
 28561              e.afii57511 = 1657;
 28562              e.afii57512 = 1672;
 28563              e.afii57513 = 1681;
 28564              e.afii57514 = 1722;
 28565              e.afii57519 = 1746;
 28566              e.afii57534 = 1749;
 28567              e.afii57636 = 8362;
 28568              e.afii57645 = 1470;
 28569              e.afii57658 = 1475;
 28570              e.afii57664 = 1488;
 28571              e.afii57665 = 1489;
 28572              e.afii57666 = 1490;
 28573              e.afii57667 = 1491;
 28574              e.afii57668 = 1492;
 28575              e.afii57669 = 1493;
 28576              e.afii57670 = 1494;
 28577              e.afii57671 = 1495;
 28578              e.afii57672 = 1496;
 28579              e.afii57673 = 1497;
 28580              e.afii57674 = 1498;
 28581              e.afii57675 = 1499;
 28582              e.afii57676 = 1500;
 28583              e.afii57677 = 1501;
 28584              e.afii57678 = 1502;
 28585              e.afii57679 = 1503;
 28586              e.afii57680 = 1504;
 28587              e.afii57681 = 1505;
 28588              e.afii57682 = 1506;
 28589              e.afii57683 = 1507;
 28590              e.afii57684 = 1508;
 28591              e.afii57685 = 1509;
 28592              e.afii57686 = 1510;
 28593              e.afii57687 = 1511;
 28594              e.afii57688 = 1512;
 28595              e.afii57689 = 1513;
 28596              e.afii57690 = 1514;
 28597              e.afii57694 = 64298;
 28598              e.afii57695 = 64299;
 28599              e.afii57700 = 64331;
 28600              e.afii57705 = 64287;
 28601              e.afii57716 = 1520;
 28602              e.afii57717 = 1521;
 28603              e.afii57718 = 1522;
 28604              e.afii57723 = 64309;
 28605              e.afii57793 = 1460;
 28606              e.afii57794 = 1461;
 28607              e.afii57795 = 1462;
 28608              e.afii57796 = 1467;
 28609              e.afii57797 = 1464;
 28610              e.afii57798 = 1463;
 28611              e.afii57799 = 1456;
 28612              e.afii57800 = 1458;
 28613              e.afii57801 = 1457;
 28614              e.afii57802 = 1459;
 28615              e.afii57803 = 1474;
 28616              e.afii57804 = 1473;
 28617              e.afii57806 = 1465;
 28618              e.afii57807 = 1468;
 28619              e.afii57839 = 1469;
 28620              e.afii57841 = 1471;
 28621              e.afii57842 = 1472;
 28622              e.afii57929 = 700;
 28623              e.afii61248 = 8453;
 28624              e.afii61289 = 8467;
 28625              e.afii61352 = 8470;
 28626              e.afii61573 = 8236;
 28627              e.afii61574 = 8237;
 28628              e.afii61575 = 8238;
 28629              e.afii61664 = 8204;
 28630              e.afii63167 = 1645;
 28631              e.afii64937 = 701;
 28632              e.agrave = 224;
 28633              e.agujarati = 2693;
 28634              e.agurmukhi = 2565;
 28635              e.ahiragana = 12354;
 28636              e.ahookabove = 7843;
 28637              e.aibengali = 2448;
 28638              e.aibopomofo = 12574;
 28639              e.aideva = 2320;
 28640              e.aiecyrillic = 1237;
 28641              e.aigujarati = 2704;
 28642              e.aigurmukhi = 2576;
 28643              e.aimatragurmukhi = 2632;
 28644              e.ainarabic = 1593;
 28645              e.ainfinalarabic = 65226;
 28646              e.aininitialarabic = 65227;
 28647              e.ainmedialarabic = 65228;
 28648              e.ainvertedbreve = 515;
 28649              e.aivowelsignbengali = 2504;
 28650              e.aivowelsigndeva = 2376;
 28651              e.aivowelsigngujarati = 2760;
 28652              e.akatakana = 12450;
 28653              e.akatakanahalfwidth = 65393;
 28654              e.akorean = 12623;
 28655              e.alef = 1488;
 28656              e.alefarabic = 1575;
 28657              e.alefdageshhebrew = 64304;
 28658              e.aleffinalarabic = 65166;
 28659              e.alefhamzaabovearabic = 1571;
 28660              e.alefhamzaabovefinalarabic = 65156;
 28661              e.alefhamzabelowarabic = 1573;
 28662              e.alefhamzabelowfinalarabic = 65160;
 28663              e.alefhebrew = 1488;
 28664              e.aleflamedhebrew = 64335;
 28665              e.alefmaddaabovearabic = 1570;
 28666              e.alefmaddaabovefinalarabic = 65154;
 28667              e.alefmaksuraarabic = 1609;
 28668              e.alefmaksurafinalarabic = 65264;
 28669              e.alefmaksurainitialarabic = 65267;
 28670              e.alefmaksuramedialarabic = 65268;
 28671              e.alefpatahhebrew = 64302;
 28672              e.alefqamatshebrew = 64303;
 28673              e.aleph = 8501;
 28674              e.allequal = 8780;
 28675              e.alpha = 945;
 28676              e.alphatonos = 940;
 28677              e.amacron = 257;
 28678              e.amonospace = 65345;
 28679              e.ampersand = 38;
 28680              e.ampersandmonospace = 65286;
 28681              e.ampersandsmall = 63270;
 28682              e.amsquare = 13250;
 28683              e.anbopomofo = 12578;
 28684              e.angbopomofo = 12580;
 28685              e.angbracketleft = 12296;
 28686              e.angbracketright = 12297;
 28687              e.angkhankhuthai = 3674;
 28688              e.angle = 8736;
 28689              e.anglebracketleft = 12296;
 28690              e.anglebracketleftvertical = 65087;
 28691              e.anglebracketright = 12297;
 28692              e.anglebracketrightvertical = 65088;
 28693              e.angleleft = 9001;
 28694              e.angleright = 9002;
 28695              e.angstrom = 8491;
 28696              e.anoteleia = 903;
 28697              e.anudattadeva = 2386;
 28698              e.anusvarabengali = 2434;
 28699              e.anusvaradeva = 2306;
 28700              e.anusvaragujarati = 2690;
 28701              e.aogonek = 261;
 28702              e.apaatosquare = 13056;
 28703              e.aparen = 9372;
 28704              e.apostrophearmenian = 1370;
 28705              e.apostrophemod = 700;
 28706              e.apple = 63743;
 28707              e.approaches = 8784;
 28708              e.approxequal = 8776;
 28709              e.approxequalorimage = 8786;
 28710              e.approximatelyequal = 8773;
 28711              e.araeaekorean = 12686;
 28712              e.araeakorean = 12685;
 28713              e.arc = 8978;
 28714              e.arighthalfring = 7834;
 28715              e.aring = 229;
 28716              e.aringacute = 507;
 28717              e.aringbelow = 7681;
 28718              e.arrowboth = 8596;
 28719              e.arrowdashdown = 8675;
 28720              e.arrowdashleft = 8672;
 28721              e.arrowdashright = 8674;
 28722              e.arrowdashup = 8673;
 28723              e.arrowdblboth = 8660;
 28724              e.arrowdbldown = 8659;
 28725              e.arrowdblleft = 8656;
 28726              e.arrowdblright = 8658;
 28727              e.arrowdblup = 8657;
 28728              e.arrowdown = 8595;
 28729              e.arrowdownleft = 8601;
 28730              e.arrowdownright = 8600;
 28731              e.arrowdownwhite = 8681;
 28732              e.arrowheaddownmod = 709;
 28733              e.arrowheadleftmod = 706;
 28734              e.arrowheadrightmod = 707;
 28735              e.arrowheadupmod = 708;
 28736              e.arrowhorizex = 63719;
 28737              e.arrowleft = 8592;
 28738              e.arrowleftdbl = 8656;
 28739              e.arrowleftdblstroke = 8653;
 28740              e.arrowleftoverright = 8646;
 28741              e.arrowleftwhite = 8678;
 28742              e.arrowright = 8594;
 28743              e.arrowrightdblstroke = 8655;
 28744              e.arrowrightheavy = 10142;
 28745              e.arrowrightoverleft = 8644;
 28746              e.arrowrightwhite = 8680;
 28747              e.arrowtableft = 8676;
 28748              e.arrowtabright = 8677;
 28749              e.arrowup = 8593;
 28750              e.arrowupdn = 8597;
 28751              e.arrowupdnbse = 8616;
 28752              e.arrowupdownbase = 8616;
 28753              e.arrowupleft = 8598;
 28754              e.arrowupleftofdown = 8645;
 28755              e.arrowupright = 8599;
 28756              e.arrowupwhite = 8679;
 28757              e.arrowvertex = 63718;
 28758              e.asciicircum = 94;
 28759              e.asciicircummonospace = 65342;
 28760              e.asciitilde = 126;
 28761              e.asciitildemonospace = 65374;
 28762              e.ascript = 593;
 28763              e.ascriptturned = 594;
 28764              e.asmallhiragana = 12353;
 28765              e.asmallkatakana = 12449;
 28766              e.asmallkatakanahalfwidth = 65383;
 28767              e.asterisk = 42;
 28768              e.asteriskaltonearabic = 1645;
 28769              e.asteriskarabic = 1645;
 28770              e.asteriskmath = 8727;
 28771              e.asteriskmonospace = 65290;
 28772              e.asterisksmall = 65121;
 28773              e.asterism = 8258;
 28774              e.asuperior = 63209;
 28775              e.asymptoticallyequal = 8771;
 28776              e.at = 64;
 28777              e.atilde = 227;
 28778              e.atmonospace = 65312;
 28779              e.atsmall = 65131;
 28780              e.aturned = 592;
 28781              e.aubengali = 2452;
 28782              e.aubopomofo = 12576;
 28783              e.audeva = 2324;
 28784              e.augujarati = 2708;
 28785              e.augurmukhi = 2580;
 28786              e.aulengthmarkbengali = 2519;
 28787              e.aumatragurmukhi = 2636;
 28788              e.auvowelsignbengali = 2508;
 28789              e.auvowelsigndeva = 2380;
 28790              e.auvowelsigngujarati = 2764;
 28791              e.avagrahadeva = 2365;
 28792              e.aybarmenian = 1377;
 28793              e.ayin = 1506;
 28794              e.ayinaltonehebrew = 64288;
 28795              e.ayinhebrew = 1506;
 28796              e.b = 98;
 28797              e.babengali = 2476;
 28798              e.backslash = 92;
 28799              e.backslashmonospace = 65340;
 28800              e.badeva = 2348;
 28801              e.bagujarati = 2732;
 28802              e.bagurmukhi = 2604;
 28803              e.bahiragana = 12400;
 28804              e.bahtthai = 3647;
 28805              e.bakatakana = 12496;
 28806              e.bar = 124;
 28807              e.barmonospace = 65372;
 28808              e.bbopomofo = 12549;
 28809              e.bcircle = 9425;
 28810              e.bdotaccent = 7683;
 28811              e.bdotbelow = 7685;
 28812              e.beamedsixteenthnotes = 9836;
 28813              e.because = 8757;
 28814              e.becyrillic = 1073;
 28815              e.beharabic = 1576;
 28816              e.behfinalarabic = 65168;
 28817              e.behinitialarabic = 65169;
 28818              e.behiragana = 12409;
 28819              e.behmedialarabic = 65170;
 28820              e.behmeeminitialarabic = 64671;
 28821              e.behmeemisolatedarabic = 64520;
 28822              e.behnoonfinalarabic = 64621;
 28823              e.bekatakana = 12505;
 28824              e.benarmenian = 1378;
 28825              e.bet = 1489;
 28826              e.beta = 946;
 28827              e.betasymbolgreek = 976;
 28828              e.betdagesh = 64305;
 28829              e.betdageshhebrew = 64305;
 28830              e.bethebrew = 1489;
 28831              e.betrafehebrew = 64332;
 28832              e.bhabengali = 2477;
 28833              e.bhadeva = 2349;
 28834              e.bhagujarati = 2733;
 28835              e.bhagurmukhi = 2605;
 28836              e.bhook = 595;
 28837              e.bihiragana = 12403;
 28838              e.bikatakana = 12499;
 28839              e.bilabialclick = 664;
 28840              e.bindigurmukhi = 2562;
 28841              e.birusquare = 13105;
 28842              e.blackcircle = 9679;
 28843              e.blackdiamond = 9670;
 28844              e.blackdownpointingtriangle = 9660;
 28845              e.blackleftpointingpointer = 9668;
 28846              e.blackleftpointingtriangle = 9664;
 28847              e.blacklenticularbracketleft = 12304;
 28848              e.blacklenticularbracketleftvertical = 65083;
 28849              e.blacklenticularbracketright = 12305;
 28850              e.blacklenticularbracketrightvertical = 65084;
 28851              e.blacklowerlefttriangle = 9699;
 28852              e.blacklowerrighttriangle = 9698;
 28853              e.blackrectangle = 9644;
 28854              e.blackrightpointingpointer = 9658;
 28855              e.blackrightpointingtriangle = 9654;
 28856              e.blacksmallsquare = 9642;
 28857              e.blacksmilingface = 9787;
 28858              e.blacksquare = 9632;
 28859              e.blackstar = 9733;
 28860              e.blackupperlefttriangle = 9700;
 28861              e.blackupperrighttriangle = 9701;
 28862              e.blackuppointingsmalltriangle = 9652;
 28863              e.blackuppointingtriangle = 9650;
 28864              e.blank = 9251;
 28865              e.blinebelow = 7687;
 28866              e.block = 9608;
 28867              e.bmonospace = 65346;
 28868              e.bobaimaithai = 3610;
 28869              e.bohiragana = 12412;
 28870              e.bokatakana = 12508;
 28871              e.bparen = 9373;
 28872              e.bqsquare = 13251;
 28873              e.braceex = 63732;
 28874              e.braceleft = 123;
 28875              e.braceleftbt = 63731;
 28876              e.braceleftmid = 63730;
 28877              e.braceleftmonospace = 65371;
 28878              e.braceleftsmall = 65115;
 28879              e.bracelefttp = 63729;
 28880              e.braceleftvertical = 65079;
 28881              e.braceright = 125;
 28882              e.bracerightbt = 63742;
 28883              e.bracerightmid = 63741;
 28884              e.bracerightmonospace = 65373;
 28885              e.bracerightsmall = 65116;
 28886              e.bracerighttp = 63740;
 28887              e.bracerightvertical = 65080;
 28888              e.bracketleft = 91;
 28889              e.bracketleftbt = 63728;
 28890              e.bracketleftex = 63727;
 28891              e.bracketleftmonospace = 65339;
 28892              e.bracketlefttp = 63726;
 28893              e.bracketright = 93;
 28894              e.bracketrightbt = 63739;
 28895              e.bracketrightex = 63738;
 28896              e.bracketrightmonospace = 65341;
 28897              e.bracketrighttp = 63737;
 28898              e.breve = 728;
 28899              e.brevebelowcmb = 814;
 28900              e.brevecmb = 774;
 28901              e.breveinvertedbelowcmb = 815;
 28902              e.breveinvertedcmb = 785;
 28903              e.breveinverteddoublecmb = 865;
 28904              e.bridgebelowcmb = 810;
 28905              e.bridgeinvertedbelowcmb = 826;
 28906              e.brokenbar = 166;
 28907              e.bstroke = 384;
 28908              e.bsuperior = 63210;
 28909              e.btopbar = 387;
 28910              e.buhiragana = 12406;
 28911              e.bukatakana = 12502;
 28912              e.bullet = 8226;
 28913              e.bulletinverse = 9688;
 28914              e.bulletoperator = 8729;
 28915              e.bullseye = 9678;
 28916              e.c = 99;
 28917              e.caarmenian = 1390;
 28918              e.cabengali = 2458;
 28919              e.cacute = 263;
 28920              e.cadeva = 2330;
 28921              e.cagujarati = 2714;
 28922              e.cagurmukhi = 2586;
 28923              e.calsquare = 13192;
 28924              e.candrabindubengali = 2433;
 28925              e.candrabinducmb = 784;
 28926              e.candrabindudeva = 2305;
 28927              e.candrabindugujarati = 2689;
 28928              e.capslock = 8682;
 28929              e.careof = 8453;
 28930              e.caron = 711;
 28931              e.caronbelowcmb = 812;
 28932              e.caroncmb = 780;
 28933              e.carriagereturn = 8629;
 28934              e.cbopomofo = 12568;
 28935              e.ccaron = 269;
 28936              e.ccedilla = 231;
 28937              e.ccedillaacute = 7689;
 28938              e.ccircle = 9426;
 28939              e.ccircumflex = 265;
 28940              e.ccurl = 597;
 28941              e.cdot = 267;
 28942              e.cdotaccent = 267;
 28943              e.cdsquare = 13253;
 28944              e.cedilla = 184;
 28945              e.cedillacmb = 807;
 28946              e.cent = 162;
 28947              e.centigrade = 8451;
 28948              e.centinferior = 63199;
 28949              e.centmonospace = 65504;
 28950              e.centoldstyle = 63394;
 28951              e.centsuperior = 63200;
 28952              e.chaarmenian = 1401;
 28953              e.chabengali = 2459;
 28954              e.chadeva = 2331;
 28955              e.chagujarati = 2715;
 28956              e.chagurmukhi = 2587;
 28957              e.chbopomofo = 12564;
 28958              e.cheabkhasiancyrillic = 1213;
 28959              e.checkmark = 10003;
 28960              e.checyrillic = 1095;
 28961              e.chedescenderabkhasiancyrillic = 1215;
 28962              e.chedescendercyrillic = 1207;
 28963              e.chedieresiscyrillic = 1269;
 28964              e.cheharmenian = 1395;
 28965              e.chekhakassiancyrillic = 1228;
 28966              e.cheverticalstrokecyrillic = 1209;
 28967              e.chi = 967;
 28968              e.chieuchacirclekorean = 12919;
 28969              e.chieuchaparenkorean = 12823;
 28970              e.chieuchcirclekorean = 12905;
 28971              e.chieuchkorean = 12618;
 28972              e.chieuchparenkorean = 12809;
 28973              e.chochangthai = 3594;
 28974              e.chochanthai = 3592;
 28975              e.chochingthai = 3593;
 28976              e.chochoethai = 3596;
 28977              e.chook = 392;
 28978              e.cieucacirclekorean = 12918;
 28979              e.cieucaparenkorean = 12822;
 28980              e.cieuccirclekorean = 12904;
 28981              e.cieuckorean = 12616;
 28982              e.cieucparenkorean = 12808;
 28983              e.cieucuparenkorean = 12828;
 28984              e.circle = 9675;
 28985              e.circlecopyrt = 169;
 28986              e.circlemultiply = 8855;
 28987              e.circleot = 8857;
 28988              e.circleplus = 8853;
 28989              e.circlepostalmark = 12342;
 28990              e.circlewithlefthalfblack = 9680;
 28991              e.circlewithrighthalfblack = 9681;
 28992              e.circumflex = 710;
 28993              e.circumflexbelowcmb = 813;
 28994              e.circumflexcmb = 770;
 28995              e.clear = 8999;
 28996              e.clickalveolar = 450;
 28997              e.clickdental = 448;
 28998              e.clicklateral = 449;
 28999              e.clickretroflex = 451;
 29000              e.club = 9827;
 29001              e.clubsuitblack = 9827;
 29002              e.clubsuitwhite = 9831;
 29003              e.cmcubedsquare = 13220;
 29004              e.cmonospace = 65347;
 29005              e.cmsquaredsquare = 13216;
 29006              e.coarmenian = 1409;
 29007              e.colon = 58;
 29008              e.colonmonetary = 8353;
 29009              e.colonmonospace = 65306;
 29010              e.colonsign = 8353;
 29011              e.colonsmall = 65109;
 29012              e.colontriangularhalfmod = 721;
 29013              e.colontriangularmod = 720;
 29014              e.comma = 44;
 29015              e.commaabovecmb = 787;
 29016              e.commaaboverightcmb = 789;
 29017              e.commaaccent = 63171;
 29018              e.commaarabic = 1548;
 29019              e.commaarmenian = 1373;
 29020              e.commainferior = 63201;
 29021              e.commamonospace = 65292;
 29022              e.commareversedabovecmb = 788;
 29023              e.commareversedmod = 701;
 29024              e.commasmall = 65104;
 29025              e.commasuperior = 63202;
 29026              e.commaturnedabovecmb = 786;
 29027              e.commaturnedmod = 699;
 29028              e.compass = 9788;
 29029              e.congruent = 8773;
 29030              e.contourintegral = 8750;
 29031              e.control = 8963;
 29032              e.controlACK = 6;
 29033              e.controlBEL = 7;
 29034              e.controlBS = 8;
 29035              e.controlCAN = 24;
 29036              e.controlCR = 13;
 29037              e.controlDC1 = 17;
 29038              e.controlDC2 = 18;
 29039              e.controlDC3 = 19;
 29040              e.controlDC4 = 20;
 29041              e.controlDEL = 127;
 29042              e.controlDLE = 16;
 29043              e.controlEM = 25;
 29044              e.controlENQ = 5;
 29045              e.controlEOT = 4;
 29046              e.controlESC = 27;
 29047              e.controlETB = 23;
 29048              e.controlETX = 3;
 29049              e.controlFF = 12;
 29050              e.controlFS = 28;
 29051              e.controlGS = 29;
 29052              e.controlHT = 9;
 29053              e.controlLF = 10;
 29054              e.controlNAK = 21;
 29055              e.controlNULL = 0;
 29056              e.controlRS = 30;
 29057              e.controlSI = 15;
 29058              e.controlSO = 14;
 29059              e.controlSOT = 2;
 29060              e.controlSTX = 1;
 29061              e.controlSUB = 26;
 29062              e.controlSYN = 22;
 29063              e.controlUS = 31;
 29064              e.controlVT = 11;
 29065              e.copyright = 169;
 29066              e.copyrightsans = 63721;
 29067              e.copyrightserif = 63193;
 29068              e.cornerbracketleft = 12300;
 29069              e.cornerbracketlefthalfwidth = 65378;
 29070              e.cornerbracketleftvertical = 65089;
 29071              e.cornerbracketright = 12301;
 29072              e.cornerbracketrighthalfwidth = 65379;
 29073              e.cornerbracketrightvertical = 65090;
 29074              e.corporationsquare = 13183;
 29075              e.cosquare = 13255;
 29076              e.coverkgsquare = 13254;
 29077              e.cparen = 9374;
 29078              e.cruzeiro = 8354;
 29079              e.cstretched = 663;
 29080              e.curlyand = 8911;
 29081              e.curlyor = 8910;
 29082              e.currency = 164;
 29083              e.cyrBreve = 63185;
 29084              e.cyrFlex = 63186;
 29085              e.cyrbreve = 63188;
 29086              e.cyrflex = 63189;
 29087              e.d = 100;
 29088              e.daarmenian = 1380;
 29089              e.dabengali = 2470;
 29090              e.dadarabic = 1590;
 29091              e.dadeva = 2342;
 29092              e.dadfinalarabic = 65214;
 29093              e.dadinitialarabic = 65215;
 29094              e.dadmedialarabic = 65216;
 29095              e.dagesh = 1468;
 29096              e.dageshhebrew = 1468;
 29097              e.dagger = 8224;
 29098              e.daggerdbl = 8225;
 29099              e.dagujarati = 2726;
 29100              e.dagurmukhi = 2598;
 29101              e.dahiragana = 12384;
 29102              e.dakatakana = 12480;
 29103              e.dalarabic = 1583;
 29104              e.dalet = 1491;
 29105              e.daletdagesh = 64307;
 29106              e.daletdageshhebrew = 64307;
 29107              e.dalethebrew = 1491;
 29108              e.dalfinalarabic = 65194;
 29109              e.dammaarabic = 1615;
 29110              e.dammalowarabic = 1615;
 29111              e.dammatanaltonearabic = 1612;
 29112              e.dammatanarabic = 1612;
 29113              e.danda = 2404;
 29114              e.dargahebrew = 1447;
 29115              e.dargalefthebrew = 1447;
 29116              e.dasiapneumatacyrilliccmb = 1157;
 29117              e.dblGrave = 63187;
 29118              e.dblanglebracketleft = 12298;
 29119              e.dblanglebracketleftvertical = 65085;
 29120              e.dblanglebracketright = 12299;
 29121              e.dblanglebracketrightvertical = 65086;
 29122              e.dblarchinvertedbelowcmb = 811;
 29123              e.dblarrowleft = 8660;
 29124              e.dblarrowright = 8658;
 29125              e.dbldanda = 2405;
 29126              e.dblgrave = 63190;
 29127              e.dblgravecmb = 783;
 29128              e.dblintegral = 8748;
 29129              e.dbllowline = 8215;
 29130              e.dbllowlinecmb = 819;
 29131              e.dbloverlinecmb = 831;
 29132              e.dblprimemod = 698;
 29133              e.dblverticalbar = 8214;
 29134              e.dblverticallineabovecmb = 782;
 29135              e.dbopomofo = 12553;
 29136              e.dbsquare = 13256;
 29137              e.dcaron = 271;
 29138              e.dcedilla = 7697;
 29139              e.dcircle = 9427;
 29140              e.dcircumflexbelow = 7699;
 29141              e.dcroat = 273;
 29142              e.ddabengali = 2465;
 29143              e.ddadeva = 2337;
 29144              e.ddagujarati = 2721;
 29145              e.ddagurmukhi = 2593;
 29146              e.ddalarabic = 1672;
 29147              e.ddalfinalarabic = 64393;
 29148              e.dddhadeva = 2396;
 29149              e.ddhabengali = 2466;
 29150              e.ddhadeva = 2338;
 29151              e.ddhagujarati = 2722;
 29152              e.ddhagurmukhi = 2594;
 29153              e.ddotaccent = 7691;
 29154              e.ddotbelow = 7693;
 29155              e.decimalseparatorarabic = 1643;
 29156              e.decimalseparatorpersian = 1643;
 29157              e.decyrillic = 1076;
 29158              e.degree = 176;
 29159              e.dehihebrew = 1453;
 29160              e.dehiragana = 12391;
 29161              e.deicoptic = 1007;
 29162              e.dekatakana = 12487;
 29163              e.deleteleft = 9003;
 29164              e.deleteright = 8998;
 29165              e.delta = 948;
 29166              e.deltaturned = 397;
 29167              e.denominatorminusonenumeratorbengali = 2552;
 29168              e.dezh = 676;
 29169              e.dhabengali = 2471;
 29170              e.dhadeva = 2343;
 29171              e.dhagujarati = 2727;
 29172              e.dhagurmukhi = 2599;
 29173              e.dhook = 599;
 29174              e.dialytikatonos = 901;
 29175              e.dialytikatonoscmb = 836;
 29176              e.diamond = 9830;
 29177              e.diamondsuitwhite = 9826;
 29178              e.dieresis = 168;
 29179              e.dieresisacute = 63191;
 29180              e.dieresisbelowcmb = 804;
 29181              e.dieresiscmb = 776;
 29182              e.dieresisgrave = 63192;
 29183              e.dieresistonos = 901;
 29184              e.dihiragana = 12386;
 29185              e.dikatakana = 12482;
 29186              e.dittomark = 12291;
 29187              e.divide = 247;
 29188              e.divides = 8739;
 29189              e.divisionslash = 8725;
 29190              e.djecyrillic = 1106;
 29191              e.dkshade = 9619;
 29192              e.dlinebelow = 7695;
 29193              e.dlsquare = 13207;
 29194              e.dmacron = 273;
 29195              e.dmonospace = 65348;
 29196              e.dnblock = 9604;
 29197              e.dochadathai = 3598;
 29198              e.dodekthai = 3604;
 29199              e.dohiragana = 12393;
 29200              e.dokatakana = 12489;
 29201              e.dollar = 36;
 29202              e.dollarinferior = 63203;
 29203              e.dollarmonospace = 65284;
 29204              e.dollaroldstyle = 63268;
 29205              e.dollarsmall = 65129;
 29206              e.dollarsuperior = 63204;
 29207              e.dong = 8363;
 29208              e.dorusquare = 13094;
 29209              e.dotaccent = 729;
 29210              e.dotaccentcmb = 775;
 29211              e.dotbelowcmb = 803;
 29212              e.dotbelowcomb = 803;
 29213              e.dotkatakana = 12539;
 29214              e.dotlessi = 305;
 29215              e.dotlessj = 63166;
 29216              e.dotlessjstrokehook = 644;
 29217              e.dotmath = 8901;
 29218              e.dottedcircle = 9676;
 29219              e.doubleyodpatah = 64287;
 29220              e.doubleyodpatahhebrew = 64287;
 29221              e.downtackbelowcmb = 798;
 29222              e.downtackmod = 725;
 29223              e.dparen = 9375;
 29224              e.dsuperior = 63211;
 29225              e.dtail = 598;
 29226              e.dtopbar = 396;
 29227              e.duhiragana = 12389;
 29228              e.dukatakana = 12485;
 29229              e.dz = 499;
 29230              e.dzaltone = 675;
 29231              e.dzcaron = 454;
 29232              e.dzcurl = 677;
 29233              e.dzeabkhasiancyrillic = 1249;
 29234              e.dzecyrillic = 1109;
 29235              e.dzhecyrillic = 1119;
 29236              e.e = 101;
 29237              e.eacute = 233;
 29238              e.earth = 9793;
 29239              e.ebengali = 2447;
 29240              e.ebopomofo = 12572;
 29241              e.ebreve = 277;
 29242              e.ecandradeva = 2317;
 29243              e.ecandragujarati = 2701;
 29244              e.ecandravowelsigndeva = 2373;
 29245              e.ecandravowelsigngujarati = 2757;
 29246              e.ecaron = 283;
 29247              e.ecedillabreve = 7709;
 29248              e.echarmenian = 1381;
 29249              e.echyiwnarmenian = 1415;
 29250              e.ecircle = 9428;
 29251              e.ecircumflex = 234;
 29252              e.ecircumflexacute = 7871;
 29253              e.ecircumflexbelow = 7705;
 29254              e.ecircumflexdotbelow = 7879;
 29255              e.ecircumflexgrave = 7873;
 29256              e.ecircumflexhookabove = 7875;
 29257              e.ecircumflextilde = 7877;
 29258              e.ecyrillic = 1108;
 29259              e.edblgrave = 517;
 29260              e.edeva = 2319;
 29261              e.edieresis = 235;
 29262              e.edot = 279;
 29263              e.edotaccent = 279;
 29264              e.edotbelow = 7865;
 29265              e.eegurmukhi = 2575;
 29266              e.eematragurmukhi = 2631;
 29267              e.efcyrillic = 1092;
 29268              e.egrave = 232;
 29269              e.egujarati = 2703;
 29270              e.eharmenian = 1383;
 29271              e.ehbopomofo = 12573;
 29272              e.ehiragana = 12360;
 29273              e.ehookabove = 7867;
 29274              e.eibopomofo = 12575;
 29275              e.eight = 56;
 29276              e.eightarabic = 1640;
 29277              e.eightbengali = 2542;
 29278              e.eightcircle = 9319;
 29279              e.eightcircleinversesansserif = 10129;
 29280              e.eightdeva = 2414;
 29281              e.eighteencircle = 9329;
 29282              e.eighteenparen = 9349;
 29283              e.eighteenperiod = 9369;
 29284              e.eightgujarati = 2798;
 29285              e.eightgurmukhi = 2670;
 29286              e.eighthackarabic = 1640;
 29287              e.eighthangzhou = 12328;
 29288              e.eighthnotebeamed = 9835;
 29289              e.eightideographicparen = 12839;
 29290              e.eightinferior = 8328;
 29291              e.eightmonospace = 65304;
 29292              e.eightoldstyle = 63288;
 29293              e.eightparen = 9339;
 29294              e.eightperiod = 9359;
 29295              e.eightpersian = 1784;
 29296              e.eightroman = 8567;
 29297              e.eightsuperior = 8312;
 29298              e.eightthai = 3672;
 29299              e.einvertedbreve = 519;
 29300              e.eiotifiedcyrillic = 1125;
 29301              e.ekatakana = 12456;
 29302              e.ekatakanahalfwidth = 65396;
 29303              e.ekonkargurmukhi = 2676;
 29304              e.ekorean = 12628;
 29305              e.elcyrillic = 1083;
 29306              e.element = 8712;
 29307              e.elevencircle = 9322;
 29308              e.elevenparen = 9342;
 29309              e.elevenperiod = 9362;
 29310              e.elevenroman = 8570;
 29311              e.ellipsis = 8230;
 29312              e.ellipsisvertical = 8942;
 29313              e.emacron = 275;
 29314              e.emacronacute = 7703;
 29315              e.emacrongrave = 7701;
 29316              e.emcyrillic = 1084;
 29317              e.emdash = 8212;
 29318              e.emdashvertical = 65073;
 29319              e.emonospace = 65349;
 29320              e.emphasismarkarmenian = 1371;
 29321              e.emptyset = 8709;
 29322              e.enbopomofo = 12579;
 29323              e.encyrillic = 1085;
 29324              e.endash = 8211;
 29325              e.endashvertical = 65074;
 29326              e.endescendercyrillic = 1187;
 29327              e.eng = 331;
 29328              e.engbopomofo = 12581;
 29329              e.enghecyrillic = 1189;
 29330              e.enhookcyrillic = 1224;
 29331              e.enspace = 8194;
 29332              e.eogonek = 281;
 29333              e.eokorean = 12627;
 29334              e.eopen = 603;
 29335              e.eopenclosed = 666;
 29336              e.eopenreversed = 604;
 29337              e.eopenreversedclosed = 606;
 29338              e.eopenreversedhook = 605;
 29339              e.eparen = 9376;
 29340              e.epsilon = 949;
 29341              e.epsilontonos = 941;
 29342              e.equal = 61;
 29343              e.equalmonospace = 65309;
 29344              e.equalsmall = 65126;
 29345              e.equalsuperior = 8316;
 29346              e.equivalence = 8801;
 29347              e.erbopomofo = 12582;
 29348              e.ercyrillic = 1088;
 29349              e.ereversed = 600;
 29350              e.ereversedcyrillic = 1101;
 29351              e.escyrillic = 1089;
 29352              e.esdescendercyrillic = 1195;
 29353              e.esh = 643;
 29354              e.eshcurl = 646;
 29355              e.eshortdeva = 2318;
 29356              e.eshortvowelsigndeva = 2374;
 29357              e.eshreversedloop = 426;
 29358              e.eshsquatreversed = 645;
 29359              e.esmallhiragana = 12359;
 29360              e.esmallkatakana = 12455;
 29361              e.esmallkatakanahalfwidth = 65386;
 29362              e.estimated = 8494;
 29363              e.esuperior = 63212;
 29364              e.eta = 951;
 29365              e.etarmenian = 1384;
 29366              e.etatonos = 942;
 29367              e.eth = 240;
 29368              e.etilde = 7869;
 29369              e.etildebelow = 7707;
 29370              e.etnahtafoukhhebrew = 1425;
 29371              e.etnahtafoukhlefthebrew = 1425;
 29372              e.etnahtahebrew = 1425;
 29373              e.etnahtalefthebrew = 1425;
 29374              e.eturned = 477;
 29375              e.eukorean = 12641;
 29376              e.euro = 8364;
 29377              e.evowelsignbengali = 2503;
 29378              e.evowelsigndeva = 2375;
 29379              e.evowelsigngujarati = 2759;
 29380              e.exclam = 33;
 29381              e.exclamarmenian = 1372;
 29382              e.exclamdbl = 8252;
 29383              e.exclamdown = 161;
 29384              e.exclamdownsmall = 63393;
 29385              e.exclammonospace = 65281;
 29386              e.exclamsmall = 63265;
 29387              e.existential = 8707;
 29388              e.ezh = 658;
 29389              e.ezhcaron = 495;
 29390              e.ezhcurl = 659;
 29391              e.ezhreversed = 441;
 29392              e.ezhtail = 442;
 29393              e.f = 102;
 29394              e.fadeva = 2398;
 29395              e.fagurmukhi = 2654;
 29396              e.fahrenheit = 8457;
 29397              e.fathaarabic = 1614;
 29398              e.fathalowarabic = 1614;
 29399              e.fathatanarabic = 1611;
 29400              e.fbopomofo = 12552;
 29401              e.fcircle = 9429;
 29402              e.fdotaccent = 7711;
 29403              e.feharabic = 1601;
 29404              e.feharmenian = 1414;
 29405              e.fehfinalarabic = 65234;
 29406              e.fehinitialarabic = 65235;
 29407              e.fehmedialarabic = 65236;
 29408              e.feicoptic = 997;
 29409              e.female = 9792;
 29410              e.ff = 64256;
 29411              e.f_f = 64256;
 29412              e.ffi = 64259;
 29413              e.f_f_i = 64259;
 29414              e.ffl = 64260;
 29415              e.f_f_l = 64260;
 29416              e.fi = 64257;
 29417              e.f_i = 64257;
 29418              e.fifteencircle = 9326;
 29419              e.fifteenparen = 9346;
 29420              e.fifteenperiod = 9366;
 29421              e.figuredash = 8210;
 29422              e.filledbox = 9632;
 29423              e.filledrect = 9644;
 29424              e.finalkaf = 1498;
 29425              e.finalkafdagesh = 64314;
 29426              e.finalkafdageshhebrew = 64314;
 29427              e.finalkafhebrew = 1498;
 29428              e.finalmem = 1501;
 29429              e.finalmemhebrew = 1501;
 29430              e.finalnun = 1503;
 29431              e.finalnunhebrew = 1503;
 29432              e.finalpe = 1507;
 29433              e.finalpehebrew = 1507;
 29434              e.finaltsadi = 1509;
 29435              e.finaltsadihebrew = 1509;
 29436              e.firsttonechinese = 713;
 29437              e.fisheye = 9673;
 29438              e.fitacyrillic = 1139;
 29439              e.five = 53;
 29440              e.fivearabic = 1637;
 29441              e.fivebengali = 2539;
 29442              e.fivecircle = 9316;
 29443              e.fivecircleinversesansserif = 10126;
 29444              e.fivedeva = 2411;
 29445              e.fiveeighths = 8541;
 29446              e.fivegujarati = 2795;
 29447              e.fivegurmukhi = 2667;
 29448              e.fivehackarabic = 1637;
 29449              e.fivehangzhou = 12325;
 29450              e.fiveideographicparen = 12836;
 29451              e.fiveinferior = 8325;
 29452              e.fivemonospace = 65301;
 29453              e.fiveoldstyle = 63285;
 29454              e.fiveparen = 9336;
 29455              e.fiveperiod = 9356;
 29456              e.fivepersian = 1781;
 29457              e.fiveroman = 8564;
 29458              e.fivesuperior = 8309;
 29459              e.fivethai = 3669;
 29460              e.fl = 64258;
 29461              e.f_l = 64258;
 29462              e.florin = 402;
 29463              e.fmonospace = 65350;
 29464              e.fmsquare = 13209;
 29465              e.fofanthai = 3615;
 29466              e.fofathai = 3613;
 29467              e.fongmanthai = 3663;
 29468              e.forall = 8704;
 29469              e.four = 52;
 29470              e.fourarabic = 1636;
 29471              e.fourbengali = 2538;
 29472              e.fourcircle = 9315;
 29473              e.fourcircleinversesansserif = 10125;
 29474              e.fourdeva = 2410;
 29475              e.fourgujarati = 2794;
 29476              e.fourgurmukhi = 2666;
 29477              e.fourhackarabic = 1636;
 29478              e.fourhangzhou = 12324;
 29479              e.fourideographicparen = 12835;
 29480              e.fourinferior = 8324;
 29481              e.fourmonospace = 65300;
 29482              e.fournumeratorbengali = 2551;
 29483              e.fouroldstyle = 63284;
 29484              e.fourparen = 9335;
 29485              e.fourperiod = 9355;
 29486              e.fourpersian = 1780;
 29487              e.fourroman = 8563;
 29488              e.foursuperior = 8308;
 29489              e.fourteencircle = 9325;
 29490              e.fourteenparen = 9345;
 29491              e.fourteenperiod = 9365;
 29492              e.fourthai = 3668;
 29493              e.fourthtonechinese = 715;
 29494              e.fparen = 9377;
 29495              e.fraction = 8260;
 29496              e.franc = 8355;
 29497              e.g = 103;
 29498              e.gabengali = 2455;
 29499              e.gacute = 501;
 29500              e.gadeva = 2327;
 29501              e.gafarabic = 1711;
 29502              e.gaffinalarabic = 64403;
 29503              e.gafinitialarabic = 64404;
 29504              e.gafmedialarabic = 64405;
 29505              e.gagujarati = 2711;
 29506              e.gagurmukhi = 2583;
 29507              e.gahiragana = 12364;
 29508              e.gakatakana = 12460;
 29509              e.gamma = 947;
 29510              e.gammalatinsmall = 611;
 29511              e.gammasuperior = 736;
 29512              e.gangiacoptic = 1003;
 29513              e.gbopomofo = 12557;
 29514              e.gbreve = 287;
 29515              e.gcaron = 487;
 29516              e.gcedilla = 291;
 29517              e.gcircle = 9430;
 29518              e.gcircumflex = 285;
 29519              e.gcommaaccent = 291;
 29520              e.gdot = 289;
 29521              e.gdotaccent = 289;
 29522              e.gecyrillic = 1075;
 29523              e.gehiragana = 12370;
 29524              e.gekatakana = 12466;
 29525              e.geometricallyequal = 8785;
 29526              e.gereshaccenthebrew = 1436;
 29527              e.gereshhebrew = 1523;
 29528              e.gereshmuqdamhebrew = 1437;
 29529              e.germandbls = 223;
 29530              e.gershayimaccenthebrew = 1438;
 29531              e.gershayimhebrew = 1524;
 29532              e.getamark = 12307;
 29533              e.ghabengali = 2456;
 29534              e.ghadarmenian = 1394;
 29535              e.ghadeva = 2328;
 29536              e.ghagujarati = 2712;
 29537              e.ghagurmukhi = 2584;
 29538              e.ghainarabic = 1594;
 29539              e.ghainfinalarabic = 65230;
 29540              e.ghaininitialarabic = 65231;
 29541              e.ghainmedialarabic = 65232;
 29542              e.ghemiddlehookcyrillic = 1173;
 29543              e.ghestrokecyrillic = 1171;
 29544              e.gheupturncyrillic = 1169;
 29545              e.ghhadeva = 2394;
 29546              e.ghhagurmukhi = 2650;
 29547              e.ghook = 608;
 29548              e.ghzsquare = 13203;
 29549              e.gihiragana = 12366;
 29550              e.gikatakana = 12462;
 29551              e.gimarmenian = 1379;
 29552              e.gimel = 1490;
 29553              e.gimeldagesh = 64306;
 29554              e.gimeldageshhebrew = 64306;
 29555              e.gimelhebrew = 1490;
 29556              e.gjecyrillic = 1107;
 29557              e.glottalinvertedstroke = 446;
 29558              e.glottalstop = 660;
 29559              e.glottalstopinverted = 662;
 29560              e.glottalstopmod = 704;
 29561              e.glottalstopreversed = 661;
 29562              e.glottalstopreversedmod = 705;
 29563              e.glottalstopreversedsuperior = 740;
 29564              e.glottalstopstroke = 673;
 29565              e.glottalstopstrokereversed = 674;
 29566              e.gmacron = 7713;
 29567              e.gmonospace = 65351;
 29568              e.gohiragana = 12372;
 29569              e.gokatakana = 12468;
 29570              e.gparen = 9378;
 29571              e.gpasquare = 13228;
 29572              e.gradient = 8711;
 29573              e.grave = 96;
 29574              e.gravebelowcmb = 790;
 29575              e.gravecmb = 768;
 29576              e.gravecomb = 768;
 29577              e.gravedeva = 2387;
 29578              e.gravelowmod = 718;
 29579              e.gravemonospace = 65344;
 29580              e.gravetonecmb = 832;
 29581              e.greater = 62;
 29582              e.greaterequal = 8805;
 29583              e.greaterequalorless = 8923;
 29584              e.greatermonospace = 65310;
 29585              e.greaterorequivalent = 8819;
 29586              e.greaterorless = 8823;
 29587              e.greateroverequal = 8807;
 29588              e.greatersmall = 65125;
 29589              e.gscript = 609;
 29590              e.gstroke = 485;
 29591              e.guhiragana = 12368;
 29592              e.guillemotleft = 171;
 29593              e.guillemotright = 187;
 29594              e.guilsinglleft = 8249;
 29595              e.guilsinglright = 8250;
 29596              e.gukatakana = 12464;
 29597              e.guramusquare = 13080;
 29598              e.gysquare = 13257;
 29599              e.h = 104;
 29600              e.haabkhasiancyrillic = 1193;
 29601              e.haaltonearabic = 1729;
 29602              e.habengali = 2489;
 29603              e.hadescendercyrillic = 1203;
 29604              e.hadeva = 2361;
 29605              e.hagujarati = 2745;
 29606              e.hagurmukhi = 2617;
 29607              e.haharabic = 1581;
 29608              e.hahfinalarabic = 65186;
 29609              e.hahinitialarabic = 65187;
 29610              e.hahiragana = 12399;
 29611              e.hahmedialarabic = 65188;
 29612              e.haitusquare = 13098;
 29613              e.hakatakana = 12495;
 29614              e.hakatakanahalfwidth = 65418;
 29615              e.halantgurmukhi = 2637;
 29616              e.hamzaarabic = 1569;
 29617              e.hamzalowarabic = 1569;
 29618              e.hangulfiller = 12644;
 29619              e.hardsigncyrillic = 1098;
 29620              e.harpoonleftbarbup = 8636;
 29621              e.harpoonrightbarbup = 8640;
 29622              e.hasquare = 13258;
 29623              e.hatafpatah = 1458;
 29624              e.hatafpatah16 = 1458;
 29625              e.hatafpatah23 = 1458;
 29626              e.hatafpatah2f = 1458;
 29627              e.hatafpatahhebrew = 1458;
 29628              e.hatafpatahnarrowhebrew = 1458;
 29629              e.hatafpatahquarterhebrew = 1458;
 29630              e.hatafpatahwidehebrew = 1458;
 29631              e.hatafqamats = 1459;
 29632              e.hatafqamats1b = 1459;
 29633              e.hatafqamats28 = 1459;
 29634              e.hatafqamats34 = 1459;
 29635              e.hatafqamatshebrew = 1459;
 29636              e.hatafqamatsnarrowhebrew = 1459;
 29637              e.hatafqamatsquarterhebrew = 1459;
 29638              e.hatafqamatswidehebrew = 1459;
 29639              e.hatafsegol = 1457;
 29640              e.hatafsegol17 = 1457;
 29641              e.hatafsegol24 = 1457;
 29642              e.hatafsegol30 = 1457;
 29643              e.hatafsegolhebrew = 1457;
 29644              e.hatafsegolnarrowhebrew = 1457;
 29645              e.hatafsegolquarterhebrew = 1457;
 29646              e.hatafsegolwidehebrew = 1457;
 29647              e.hbar = 295;
 29648              e.hbopomofo = 12559;
 29649              e.hbrevebelow = 7723;
 29650              e.hcedilla = 7721;
 29651              e.hcircle = 9431;
 29652              e.hcircumflex = 293;
 29653              e.hdieresis = 7719;
 29654              e.hdotaccent = 7715;
 29655              e.hdotbelow = 7717;
 29656              e.he = 1492;
 29657              e.heart = 9829;
 29658              e.heartsuitblack = 9829;
 29659              e.heartsuitwhite = 9825;
 29660              e.hedagesh = 64308;
 29661              e.hedageshhebrew = 64308;
 29662              e.hehaltonearabic = 1729;
 29663              e.heharabic = 1607;
 29664              e.hehebrew = 1492;
 29665              e.hehfinalaltonearabic = 64423;
 29666              e.hehfinalalttwoarabic = 65258;
 29667              e.hehfinalarabic = 65258;
 29668              e.hehhamzaabovefinalarabic = 64421;
 29669              e.hehhamzaaboveisolatedarabic = 64420;
 29670              e.hehinitialaltonearabic = 64424;
 29671              e.hehinitialarabic = 65259;
 29672              e.hehiragana = 12408;
 29673              e.hehmedialaltonearabic = 64425;
 29674              e.hehmedialarabic = 65260;
 29675              e.heiseierasquare = 13179;
 29676              e.hekatakana = 12504;
 29677              e.hekatakanahalfwidth = 65421;
 29678              e.hekutaarusquare = 13110;
 29679              e.henghook = 615;
 29680              e.herutusquare = 13113;
 29681              e.het = 1495;
 29682              e.hethebrew = 1495;
 29683              e.hhook = 614;
 29684              e.hhooksuperior = 689;
 29685              e.hieuhacirclekorean = 12923;
 29686              e.hieuhaparenkorean = 12827;
 29687              e.hieuhcirclekorean = 12909;
 29688              e.hieuhkorean = 12622;
 29689              e.hieuhparenkorean = 12813;
 29690              e.hihiragana = 12402;
 29691              e.hikatakana = 12498;
 29692              e.hikatakanahalfwidth = 65419;
 29693              e.hiriq = 1460;
 29694              e.hiriq14 = 1460;
 29695              e.hiriq21 = 1460;
 29696              e.hiriq2d = 1460;
 29697              e.hiriqhebrew = 1460;
 29698              e.hiriqnarrowhebrew = 1460;
 29699              e.hiriqquarterhebrew = 1460;
 29700              e.hiriqwidehebrew = 1460;
 29701              e.hlinebelow = 7830;
 29702              e.hmonospace = 65352;
 29703              e.hoarmenian = 1392;
 29704              e.hohipthai = 3627;
 29705              e.hohiragana = 12411;
 29706              e.hokatakana = 12507;
 29707              e.hokatakanahalfwidth = 65422;
 29708              e.holam = 1465;
 29709              e.holam19 = 1465;
 29710              e.holam26 = 1465;
 29711              e.holam32 = 1465;
 29712              e.holamhebrew = 1465;
 29713              e.holamnarrowhebrew = 1465;
 29714              e.holamquarterhebrew = 1465;
 29715              e.holamwidehebrew = 1465;
 29716              e.honokhukthai = 3630;
 29717              e.hookabovecomb = 777;
 29718              e.hookcmb = 777;
 29719              e.hookpalatalizedbelowcmb = 801;
 29720              e.hookretroflexbelowcmb = 802;
 29721              e.hoonsquare = 13122;
 29722              e.horicoptic = 1001;
 29723              e.horizontalbar = 8213;
 29724              e.horncmb = 795;
 29725              e.hotsprings = 9832;
 29726              e.house = 8962;
 29727              e.hparen = 9379;
 29728              e.hsuperior = 688;
 29729              e.hturned = 613;
 29730              e.huhiragana = 12405;
 29731              e.huiitosquare = 13107;
 29732              e.hukatakana = 12501;
 29733              e.hukatakanahalfwidth = 65420;
 29734              e.hungarumlaut = 733;
 29735              e.hungarumlautcmb = 779;
 29736              e.hv = 405;
 29737              e.hyphen = 45;
 29738              e.hypheninferior = 63205;
 29739              e.hyphenmonospace = 65293;
 29740              e.hyphensmall = 65123;
 29741              e.hyphensuperior = 63206;
 29742              e.hyphentwo = 8208;
 29743              e.i = 105;
 29744              e.iacute = 237;
 29745              e.iacyrillic = 1103;
 29746              e.ibengali = 2439;
 29747              e.ibopomofo = 12583;
 29748              e.ibreve = 301;
 29749              e.icaron = 464;
 29750              e.icircle = 9432;
 29751              e.icircumflex = 238;
 29752              e.icyrillic = 1110;
 29753              e.idblgrave = 521;
 29754              e.ideographearthcircle = 12943;
 29755              e.ideographfirecircle = 12939;
 29756              e.ideographicallianceparen = 12863;
 29757              e.ideographiccallparen = 12858;
 29758              e.ideographiccentrecircle = 12965;
 29759              e.ideographicclose = 12294;
 29760              e.ideographiccomma = 12289;
 29761              e.ideographiccommaleft = 65380;
 29762              e.ideographiccongratulationparen = 12855;
 29763              e.ideographiccorrectcircle = 12963;
 29764              e.ideographicearthparen = 12847;
 29765              e.ideographicenterpriseparen = 12861;
 29766              e.ideographicexcellentcircle = 12957;
 29767              e.ideographicfestivalparen = 12864;
 29768              e.ideographicfinancialcircle = 12950;
 29769              e.ideographicfinancialparen = 12854;
 29770              e.ideographicfireparen = 12843;
 29771              e.ideographichaveparen = 12850;
 29772              e.ideographichighcircle = 12964;
 29773              e.ideographiciterationmark = 12293;
 29774              e.ideographiclaborcircle = 12952;
 29775              e.ideographiclaborparen = 12856;
 29776              e.ideographicleftcircle = 12967;
 29777              e.ideographiclowcircle = 12966;
 29778              e.ideographicmedicinecircle = 12969;
 29779              e.ideographicmetalparen = 12846;
 29780              e.ideographicmoonparen = 12842;
 29781              e.ideographicnameparen = 12852;
 29782              e.ideographicperiod = 12290;
 29783              e.ideographicprintcircle = 12958;
 29784              e.ideographicreachparen = 12867;
 29785              e.ideographicrepresentparen = 12857;
 29786              e.ideographicresourceparen = 12862;
 29787              e.ideographicrightcircle = 12968;
 29788              e.ideographicsecretcircle = 12953;
 29789              e.ideographicselfparen = 12866;
 29790              e.ideographicsocietyparen = 12851;
 29791              e.ideographicspace = 12288;
 29792              e.ideographicspecialparen = 12853;
 29793              e.ideographicstockparen = 12849;
 29794              e.ideographicstudyparen = 12859;
 29795              e.ideographicsunparen = 12848;
 29796              e.ideographicsuperviseparen = 12860;
 29797              e.ideographicwaterparen = 12844;
 29798              e.ideographicwoodparen = 12845;
 29799              e.ideographiczero = 12295;
 29800              e.ideographmetalcircle = 12942;
 29801              e.ideographmooncircle = 12938;
 29802              e.ideographnamecircle = 12948;
 29803              e.ideographsuncircle = 12944;
 29804              e.ideographwatercircle = 12940;
 29805              e.ideographwoodcircle = 12941;
 29806              e.ideva = 2311;
 29807              e.idieresis = 239;
 29808              e.idieresisacute = 7727;
 29809              e.idieresiscyrillic = 1253;
 29810              e.idotbelow = 7883;
 29811              e.iebrevecyrillic = 1239;
 29812              e.iecyrillic = 1077;
 29813              e.ieungacirclekorean = 12917;
 29814              e.ieungaparenkorean = 12821;
 29815              e.ieungcirclekorean = 12903;
 29816              e.ieungkorean = 12615;
 29817              e.ieungparenkorean = 12807;
 29818              e.igrave = 236;
 29819              e.igujarati = 2695;
 29820              e.igurmukhi = 2567;
 29821              e.ihiragana = 12356;
 29822              e.ihookabove = 7881;
 29823              e.iibengali = 2440;
 29824              e.iicyrillic = 1080;
 29825              e.iideva = 2312;
 29826              e.iigujarati = 2696;
 29827              e.iigurmukhi = 2568;
 29828              e.iimatragurmukhi = 2624;
 29829              e.iinvertedbreve = 523;
 29830              e.iishortcyrillic = 1081;
 29831              e.iivowelsignbengali = 2496;
 29832              e.iivowelsigndeva = 2368;
 29833              e.iivowelsigngujarati = 2752;
 29834              e.ij = 307;
 29835              e.ikatakana = 12452;
 29836              e.ikatakanahalfwidth = 65394;
 29837              e.ikorean = 12643;
 29838              e.ilde = 732;
 29839              e.iluyhebrew = 1452;
 29840              e.imacron = 299;
 29841              e.imacroncyrillic = 1251;
 29842              e.imageorapproximatelyequal = 8787;
 29843              e.imatragurmukhi = 2623;
 29844              e.imonospace = 65353;
 29845              e.increment = 8710;
 29846              e.infinity = 8734;
 29847              e.iniarmenian = 1387;
 29848              e.integral = 8747;
 29849              e.integralbottom = 8993;
 29850              e.integralbt = 8993;
 29851              e.integralex = 63733;
 29852              e.integraltop = 8992;
 29853              e.integraltp = 8992;
 29854              e.intersection = 8745;
 29855              e.intisquare = 13061;
 29856              e.invbullet = 9688;
 29857              e.invcircle = 9689;
 29858              e.invsmileface = 9787;
 29859              e.iocyrillic = 1105;
 29860              e.iogonek = 303;
 29861              e.iota = 953;
 29862              e.iotadieresis = 970;
 29863              e.iotadieresistonos = 912;
 29864              e.iotalatin = 617;
 29865              e.iotatonos = 943;
 29866              e.iparen = 9380;
 29867              e.irigurmukhi = 2674;
 29868              e.ismallhiragana = 12355;
 29869              e.ismallkatakana = 12451;
 29870              e.ismallkatakanahalfwidth = 65384;
 29871              e.issharbengali = 2554;
 29872              e.istroke = 616;
 29873              e.isuperior = 63213;
 29874              e.iterationhiragana = 12445;
 29875              e.iterationkatakana = 12541;
 29876              e.itilde = 297;
 29877              e.itildebelow = 7725;
 29878              e.iubopomofo = 12585;
 29879              e.iucyrillic = 1102;
 29880              e.ivowelsignbengali = 2495;
 29881              e.ivowelsigndeva = 2367;
 29882              e.ivowelsigngujarati = 2751;
 29883              e.izhitsacyrillic = 1141;
 29884              e.izhitsadblgravecyrillic = 1143;
 29885              e.j = 106;
 29886              e.jaarmenian = 1393;
 29887              e.jabengali = 2460;
 29888              e.jadeva = 2332;
 29889              e.jagujarati = 2716;
 29890              e.jagurmukhi = 2588;
 29891              e.jbopomofo = 12560;
 29892              e.jcaron = 496;
 29893              e.jcircle = 9433;
 29894              e.jcircumflex = 309;
 29895              e.jcrossedtail = 669;
 29896              e.jdotlessstroke = 607;
 29897              e.jecyrillic = 1112;
 29898              e.jeemarabic = 1580;
 29899              e.jeemfinalarabic = 65182;
 29900              e.jeeminitialarabic = 65183;
 29901              e.jeemmedialarabic = 65184;
 29902              e.jeharabic = 1688;
 29903              e.jehfinalarabic = 64395;
 29904              e.jhabengali = 2461;
 29905              e.jhadeva = 2333;
 29906              e.jhagujarati = 2717;
 29907              e.jhagurmukhi = 2589;
 29908              e.jheharmenian = 1403;
 29909              e.jis = 12292;
 29910              e.jmonospace = 65354;
 29911              e.jparen = 9381;
 29912              e.jsuperior = 690;
 29913              e.k = 107;
 29914              e.kabashkircyrillic = 1185;
 29915              e.kabengali = 2453;
 29916              e.kacute = 7729;
 29917              e.kacyrillic = 1082;
 29918              e.kadescendercyrillic = 1179;
 29919              e.kadeva = 2325;
 29920              e.kaf = 1499;
 29921              e.kafarabic = 1603;
 29922              e.kafdagesh = 64315;
 29923              e.kafdageshhebrew = 64315;
 29924              e.kaffinalarabic = 65242;
 29925              e.kafhebrew = 1499;
 29926              e.kafinitialarabic = 65243;
 29927              e.kafmedialarabic = 65244;
 29928              e.kafrafehebrew = 64333;
 29929              e.kagujarati = 2709;
 29930              e.kagurmukhi = 2581;
 29931              e.kahiragana = 12363;
 29932              e.kahookcyrillic = 1220;
 29933              e.kakatakana = 12459;
 29934              e.kakatakanahalfwidth = 65398;
 29935              e.kappa = 954;
 29936              e.kappasymbolgreek = 1008;
 29937              e.kapyeounmieumkorean = 12657;
 29938              e.kapyeounphieuphkorean = 12676;
 29939              e.kapyeounpieupkorean = 12664;
 29940              e.kapyeounssangpieupkorean = 12665;
 29941              e.karoriisquare = 13069;
 29942              e.kashidaautoarabic = 1600;
 29943              e.kashidaautonosidebearingarabic = 1600;
 29944              e.kasmallkatakana = 12533;
 29945              e.kasquare = 13188;
 29946              e.kasraarabic = 1616;
 29947              e.kasratanarabic = 1613;
 29948              e.kastrokecyrillic = 1183;
 29949              e.katahiraprolongmarkhalfwidth = 65392;
 29950              e.kaverticalstrokecyrillic = 1181;
 29951              e.kbopomofo = 12558;
 29952              e.kcalsquare = 13193;
 29953              e.kcaron = 489;
 29954              e.kcedilla = 311;
 29955              e.kcircle = 9434;
 29956              e.kcommaaccent = 311;
 29957              e.kdotbelow = 7731;
 29958              e.keharmenian = 1412;
 29959              e.kehiragana = 12369;
 29960              e.kekatakana = 12465;
 29961              e.kekatakanahalfwidth = 65401;
 29962              e.kenarmenian = 1391;
 29963              e.kesmallkatakana = 12534;
 29964              e.kgreenlandic = 312;
 29965              e.khabengali = 2454;
 29966              e.khacyrillic = 1093;
 29967              e.khadeva = 2326;
 29968              e.khagujarati = 2710;
 29969              e.khagurmukhi = 2582;
 29970              e.khaharabic = 1582;
 29971              e.khahfinalarabic = 65190;
 29972              e.khahinitialarabic = 65191;
 29973              e.khahmedialarabic = 65192;
 29974              e.kheicoptic = 999;
 29975              e.khhadeva = 2393;
 29976              e.khhagurmukhi = 2649;
 29977              e.khieukhacirclekorean = 12920;
 29978              e.khieukhaparenkorean = 12824;
 29979              e.khieukhcirclekorean = 12906;
 29980              e.khieukhkorean = 12619;
 29981              e.khieukhparenkorean = 12810;
 29982              e.khokhaithai = 3586;
 29983              e.khokhonthai = 3589;
 29984              e.khokhuatthai = 3587;
 29985              e.khokhwaithai = 3588;
 29986              e.khomutthai = 3675;
 29987              e.khook = 409;
 29988              e.khorakhangthai = 3590;
 29989              e.khzsquare = 13201;
 29990              e.kihiragana = 12365;
 29991              e.kikatakana = 12461;
 29992              e.kikatakanahalfwidth = 65399;
 29993              e.kiroguramusquare = 13077;
 29994              e.kiromeetorusquare = 13078;
 29995              e.kirosquare = 13076;
 29996              e.kiyeokacirclekorean = 12910;
 29997              e.kiyeokaparenkorean = 12814;
 29998              e.kiyeokcirclekorean = 12896;
 29999              e.kiyeokkorean = 12593;
 30000              e.kiyeokparenkorean = 12800;
 30001              e.kiyeoksioskorean = 12595;
 30002              e.kjecyrillic = 1116;
 30003              e.klinebelow = 7733;
 30004              e.klsquare = 13208;
 30005              e.kmcubedsquare = 13222;
 30006              e.kmonospace = 65355;
 30007              e.kmsquaredsquare = 13218;
 30008              e.kohiragana = 12371;
 30009              e.kohmsquare = 13248;
 30010              e.kokaithai = 3585;
 30011              e.kokatakana = 12467;
 30012              e.kokatakanahalfwidth = 65402;
 30013              e.kooposquare = 13086;
 30014              e.koppacyrillic = 1153;
 30015              e.koreanstandardsymbol = 12927;
 30016              e.koroniscmb = 835;
 30017              e.kparen = 9382;
 30018              e.kpasquare = 13226;
 30019              e.ksicyrillic = 1135;
 30020              e.ktsquare = 13263;
 30021              e.kturned = 670;
 30022              e.kuhiragana = 12367;
 30023              e.kukatakana = 12463;
 30024              e.kukatakanahalfwidth = 65400;
 30025              e.kvsquare = 13240;
 30026              e.kwsquare = 13246;
 30027              e.l = 108;
 30028              e.labengali = 2482;
 30029              e.lacute = 314;
 30030              e.ladeva = 2354;
 30031              e.lagujarati = 2738;
 30032              e.lagurmukhi = 2610;
 30033              e.lakkhangyaothai = 3653;
 30034              e.lamaleffinalarabic = 65276;
 30035              e.lamalefhamzaabovefinalarabic = 65272;
 30036              e.lamalefhamzaaboveisolatedarabic = 65271;
 30037              e.lamalefhamzabelowfinalarabic = 65274;
 30038              e.lamalefhamzabelowisolatedarabic = 65273;
 30039              e.lamalefisolatedarabic = 65275;
 30040              e.lamalefmaddaabovefinalarabic = 65270;
 30041              e.lamalefmaddaaboveisolatedarabic = 65269;
 30042              e.lamarabic = 1604;
 30043              e.lambda = 955;
 30044              e.lambdastroke = 411;
 30045              e.lamed = 1500;
 30046              e.lameddagesh = 64316;
 30047              e.lameddageshhebrew = 64316;
 30048              e.lamedhebrew = 1500;
 30049              e.lamfinalarabic = 65246;
 30050              e.lamhahinitialarabic = 64714;
 30051              e.laminitialarabic = 65247;
 30052              e.lamjeeminitialarabic = 64713;
 30053              e.lamkhahinitialarabic = 64715;
 30054              e.lamlamhehisolatedarabic = 65010;
 30055              e.lammedialarabic = 65248;
 30056              e.lammeemhahinitialarabic = 64904;
 30057              e.lammeeminitialarabic = 64716;
 30058              e.largecircle = 9711;
 30059              e.lbar = 410;
 30060              e.lbelt = 620;
 30061              e.lbopomofo = 12556;
 30062              e.lcaron = 318;
 30063              e.lcedilla = 316;
 30064              e.lcircle = 9435;
 30065              e.lcircumflexbelow = 7741;
 30066              e.lcommaaccent = 316;
 30067              e.ldot = 320;
 30068              e.ldotaccent = 320;
 30069              e.ldotbelow = 7735;
 30070              e.ldotbelowmacron = 7737;
 30071              e.leftangleabovecmb = 794;
 30072              e.lefttackbelowcmb = 792;
 30073              e.less = 60;
 30074              e.lessequal = 8804;
 30075              e.lessequalorgreater = 8922;
 30076              e.lessmonospace = 65308;
 30077              e.lessorequivalent = 8818;
 30078              e.lessorgreater = 8822;
 30079              e.lessoverequal = 8806;
 30080              e.lesssmall = 65124;
 30081              e.lezh = 622;
 30082              e.lfblock = 9612;
 30083              e.lhookretroflex = 621;
 30084              e.lira = 8356;
 30085              e.liwnarmenian = 1388;
 30086              e.lj = 457;
 30087              e.ljecyrillic = 1113;
 30088              e.ll = 63168;
 30089              e.lladeva = 2355;
 30090              e.llagujarati = 2739;
 30091              e.llinebelow = 7739;
 30092              e.llladeva = 2356;
 30093              e.llvocalicbengali = 2529;
 30094              e.llvocalicdeva = 2401;
 30095              e.llvocalicvowelsignbengali = 2531;
 30096              e.llvocalicvowelsigndeva = 2403;
 30097              e.lmiddletilde = 619;
 30098              e.lmonospace = 65356;
 30099              e.lmsquare = 13264;
 30100              e.lochulathai = 3628;
 30101              e.logicaland = 8743;
 30102              e.logicalnot = 172;
 30103              e.logicalnotreversed = 8976;
 30104              e.logicalor = 8744;
 30105              e.lolingthai = 3621;
 30106              e.longs = 383;
 30107              e.lowlinecenterline = 65102;
 30108              e.lowlinecmb = 818;
 30109              e.lowlinedashed = 65101;
 30110              e.lozenge = 9674;
 30111              e.lparen = 9383;
 30112              e.lslash = 322;
 30113              e.lsquare = 8467;
 30114              e.lsuperior = 63214;
 30115              e.ltshade = 9617;
 30116              e.luthai = 3622;
 30117              e.lvocalicbengali = 2444;
 30118              e.lvocalicdeva = 2316;
 30119              e.lvocalicvowelsignbengali = 2530;
 30120              e.lvocalicvowelsigndeva = 2402;
 30121              e.lxsquare = 13267;
 30122              e.m = 109;
 30123              e.mabengali = 2478;
 30124              e.macron = 175;
 30125              e.macronbelowcmb = 817;
 30126              e.macroncmb = 772;
 30127              e.macronlowmod = 717;
 30128              e.macronmonospace = 65507;
 30129              e.macute = 7743;
 30130              e.madeva = 2350;
 30131              e.magujarati = 2734;
 30132              e.magurmukhi = 2606;
 30133              e.mahapakhhebrew = 1444;
 30134              e.mahapakhlefthebrew = 1444;
 30135              e.mahiragana = 12414;
 30136              e.maichattawalowleftthai = 63637;
 30137              e.maichattawalowrightthai = 63636;
 30138              e.maichattawathai = 3659;
 30139              e.maichattawaupperleftthai = 63635;
 30140              e.maieklowleftthai = 63628;
 30141              e.maieklowrightthai = 63627;
 30142              e.maiekthai = 3656;
 30143              e.maiekupperleftthai = 63626;
 30144              e.maihanakatleftthai = 63620;
 30145              e.maihanakatthai = 3633;
 30146              e.maitaikhuleftthai = 63625;
 30147              e.maitaikhuthai = 3655;
 30148              e.maitholowleftthai = 63631;
 30149              e.maitholowrightthai = 63630;
 30150              e.maithothai = 3657;
 30151              e.maithoupperleftthai = 63629;
 30152              e.maitrilowleftthai = 63634;
 30153              e.maitrilowrightthai = 63633;
 30154              e.maitrithai = 3658;
 30155              e.maitriupperleftthai = 63632;
 30156              e.maiyamokthai = 3654;
 30157              e.makatakana = 12510;
 30158              e.makatakanahalfwidth = 65423;
 30159              e.male = 9794;
 30160              e.mansyonsquare = 13127;
 30161              e.maqafhebrew = 1470;
 30162              e.mars = 9794;
 30163              e.masoracirclehebrew = 1455;
 30164              e.masquare = 13187;
 30165              e.mbopomofo = 12551;
 30166              e.mbsquare = 13268;
 30167              e.mcircle = 9436;
 30168              e.mcubedsquare = 13221;
 30169              e.mdotaccent = 7745;
 30170              e.mdotbelow = 7747;
 30171              e.meemarabic = 1605;
 30172              e.meemfinalarabic = 65250;
 30173              e.meeminitialarabic = 65251;
 30174              e.meemmedialarabic = 65252;
 30175              e.meemmeeminitialarabic = 64721;
 30176              e.meemmeemisolatedarabic = 64584;
 30177              e.meetorusquare = 13133;
 30178              e.mehiragana = 12417;
 30179              e.meizierasquare = 13182;
 30180              e.mekatakana = 12513;
 30181              e.mekatakanahalfwidth = 65426;
 30182              e.mem = 1502;
 30183              e.memdagesh = 64318;
 30184              e.memdageshhebrew = 64318;
 30185              e.memhebrew = 1502;
 30186              e.menarmenian = 1396;
 30187              e.merkhahebrew = 1445;
 30188              e.merkhakefulahebrew = 1446;
 30189              e.merkhakefulalefthebrew = 1446;
 30190              e.merkhalefthebrew = 1445;
 30191              e.mhook = 625;
 30192              e.mhzsquare = 13202;
 30193              e.middledotkatakanahalfwidth = 65381;
 30194              e.middot = 183;
 30195              e.mieumacirclekorean = 12914;
 30196              e.mieumaparenkorean = 12818;
 30197              e.mieumcirclekorean = 12900;
 30198              e.mieumkorean = 12609;
 30199              e.mieumpansioskorean = 12656;
 30200              e.mieumparenkorean = 12804;
 30201              e.mieumpieupkorean = 12654;
 30202              e.mieumsioskorean = 12655;
 30203              e.mihiragana = 12415;
 30204              e.mikatakana = 12511;
 30205              e.mikatakanahalfwidth = 65424;
 30206              e.minus = 8722;
 30207              e.minusbelowcmb = 800;
 30208              e.minuscircle = 8854;
 30209              e.minusmod = 727;
 30210              e.minusplus = 8723;
 30211              e.minute = 8242;
 30212              e.miribaarusquare = 13130;
 30213              e.mirisquare = 13129;
 30214              e.mlonglegturned = 624;
 30215              e.mlsquare = 13206;
 30216              e.mmcubedsquare = 13219;
 30217              e.mmonospace = 65357;
 30218              e.mmsquaredsquare = 13215;
 30219              e.mohiragana = 12418;
 30220              e.mohmsquare = 13249;
 30221              e.mokatakana = 12514;
 30222              e.mokatakanahalfwidth = 65427;
 30223              e.molsquare = 13270;
 30224              e.momathai = 3617;
 30225              e.moverssquare = 13223;
 30226              e.moverssquaredsquare = 13224;
 30227              e.mparen = 9384;
 30228              e.mpasquare = 13227;
 30229              e.mssquare = 13235;
 30230              e.msuperior = 63215;
 30231              e.mturned = 623;
 30232              e.mu = 181;
 30233              e.mu1 = 181;
 30234              e.muasquare = 13186;
 30235              e.muchgreater = 8811;
 30236              e.muchless = 8810;
 30237              e.mufsquare = 13196;
 30238              e.mugreek = 956;
 30239              e.mugsquare = 13197;
 30240              e.muhiragana = 12416;
 30241              e.mukatakana = 12512;
 30242              e.mukatakanahalfwidth = 65425;
 30243              e.mulsquare = 13205;
 30244              e.multiply = 215;
 30245              e.mumsquare = 13211;
 30246              e.munahhebrew = 1443;
 30247              e.munahlefthebrew = 1443;
 30248              e.musicalnote = 9834;
 30249              e.musicalnotedbl = 9835;
 30250              e.musicflatsign = 9837;
 30251              e.musicsharpsign = 9839;
 30252              e.mussquare = 13234;
 30253              e.muvsquare = 13238;
 30254              e.muwsquare = 13244;
 30255              e.mvmegasquare = 13241;
 30256              e.mvsquare = 13239;
 30257              e.mwmegasquare = 13247;
 30258              e.mwsquare = 13245;
 30259              e.n = 110;
 30260              e.nabengali = 2472;
 30261              e.nabla = 8711;
 30262              e.nacute = 324;
 30263              e.nadeva = 2344;
 30264              e.nagujarati = 2728;
 30265              e.nagurmukhi = 2600;
 30266              e.nahiragana = 12394;
 30267              e.nakatakana = 12490;
 30268              e.nakatakanahalfwidth = 65413;
 30269              e.napostrophe = 329;
 30270              e.nasquare = 13185;
 30271              e.nbopomofo = 12555;
 30272              e.nbspace = 160;
 30273              e.ncaron = 328;
 30274              e.ncedilla = 326;
 30275              e.ncircle = 9437;
 30276              e.ncircumflexbelow = 7755;
 30277              e.ncommaaccent = 326;
 30278              e.ndotaccent = 7749;
 30279              e.ndotbelow = 7751;
 30280              e.nehiragana = 12397;
 30281              e.nekatakana = 12493;
 30282              e.nekatakanahalfwidth = 65416;
 30283              e.newsheqelsign = 8362;
 30284              e.nfsquare = 13195;
 30285              e.ngabengali = 2457;
 30286              e.ngadeva = 2329;
 30287              e.ngagujarati = 2713;
 30288              e.ngagurmukhi = 2585;
 30289              e.ngonguthai = 3591;
 30290              e.nhiragana = 12435;
 30291              e.nhookleft = 626;
 30292              e.nhookretroflex = 627;
 30293              e.nieunacirclekorean = 12911;
 30294              e.nieunaparenkorean = 12815;
 30295              e.nieuncieuckorean = 12597;
 30296              e.nieuncirclekorean = 12897;
 30297              e.nieunhieuhkorean = 12598;
 30298              e.nieunkorean = 12596;
 30299              e.nieunpansioskorean = 12648;
 30300              e.nieunparenkorean = 12801;
 30301              e.nieunsioskorean = 12647;
 30302              e.nieuntikeutkorean = 12646;
 30303              e.nihiragana = 12395;
 30304              e.nikatakana = 12491;
 30305              e.nikatakanahalfwidth = 65414;
 30306              e.nikhahitleftthai = 63641;
 30307              e.nikhahitthai = 3661;
 30308              e.nine = 57;
 30309              e.ninearabic = 1641;
 30310              e.ninebengali = 2543;
 30311              e.ninecircle = 9320;
 30312              e.ninecircleinversesansserif = 10130;
 30313              e.ninedeva = 2415;
 30314              e.ninegujarati = 2799;
 30315              e.ninegurmukhi = 2671;
 30316              e.ninehackarabic = 1641;
 30317              e.ninehangzhou = 12329;
 30318              e.nineideographicparen = 12840;
 30319              e.nineinferior = 8329;
 30320              e.ninemonospace = 65305;
 30321              e.nineoldstyle = 63289;
 30322              e.nineparen = 9340;
 30323              e.nineperiod = 9360;
 30324              e.ninepersian = 1785;
 30325              e.nineroman = 8568;
 30326              e.ninesuperior = 8313;
 30327              e.nineteencircle = 9330;
 30328              e.nineteenparen = 9350;
 30329              e.nineteenperiod = 9370;
 30330              e.ninethai = 3673;
 30331              e.nj = 460;
 30332              e.njecyrillic = 1114;
 30333              e.nkatakana = 12531;
 30334              e.nkatakanahalfwidth = 65437;
 30335              e.nlegrightlong = 414;
 30336              e.nlinebelow = 7753;
 30337              e.nmonospace = 65358;
 30338              e.nmsquare = 13210;
 30339              e.nnabengali = 2467;
 30340              e.nnadeva = 2339;
 30341              e.nnagujarati = 2723;
 30342              e.nnagurmukhi = 2595;
 30343              e.nnnadeva = 2345;
 30344              e.nohiragana = 12398;
 30345              e.nokatakana = 12494;
 30346              e.nokatakanahalfwidth = 65417;
 30347              e.nonbreakingspace = 160;
 30348              e.nonenthai = 3603;
 30349              e.nonuthai = 3609;
 30350              e.noonarabic = 1606;
 30351              e.noonfinalarabic = 65254;
 30352              e.noonghunnaarabic = 1722;
 30353              e.noonghunnafinalarabic = 64415;
 30354              e.nooninitialarabic = 65255;
 30355              e.noonjeeminitialarabic = 64722;
 30356              e.noonjeemisolatedarabic = 64587;
 30357              e.noonmedialarabic = 65256;
 30358              e.noonmeeminitialarabic = 64725;
 30359              e.noonmeemisolatedarabic = 64590;
 30360              e.noonnoonfinalarabic = 64653;
 30361              e.notcontains = 8716;
 30362              e.notelement = 8713;
 30363              e.notelementof = 8713;
 30364              e.notequal = 8800;
 30365              e.notgreater = 8815;
 30366              e.notgreaternorequal = 8817;
 30367              e.notgreaternorless = 8825;
 30368              e.notidentical = 8802;
 30369              e.notless = 8814;
 30370              e.notlessnorequal = 8816;
 30371              e.notparallel = 8742;
 30372              e.notprecedes = 8832;
 30373              e.notsubset = 8836;
 30374              e.notsucceeds = 8833;
 30375              e.notsuperset = 8837;
 30376              e.nowarmenian = 1398;
 30377              e.nparen = 9385;
 30378              e.nssquare = 13233;
 30379              e.nsuperior = 8319;
 30380              e.ntilde = 241;
 30381              e.nu = 957;
 30382              e.nuhiragana = 12396;
 30383              e.nukatakana = 12492;
 30384              e.nukatakanahalfwidth = 65415;
 30385              e.nuktabengali = 2492;
 30386              e.nuktadeva = 2364;
 30387              e.nuktagujarati = 2748;
 30388              e.nuktagurmukhi = 2620;
 30389              e.numbersign = 35;
 30390              e.numbersignmonospace = 65283;
 30391              e.numbersignsmall = 65119;
 30392              e.numeralsigngreek = 884;
 30393              e.numeralsignlowergreek = 885;
 30394              e.numero = 8470;
 30395              e.nun = 1504;
 30396              e.nundagesh = 64320;
 30397              e.nundageshhebrew = 64320;
 30398              e.nunhebrew = 1504;
 30399              e.nvsquare = 13237;
 30400              e.nwsquare = 13243;
 30401              e.nyabengali = 2462;
 30402              e.nyadeva = 2334;
 30403              e.nyagujarati = 2718;
 30404              e.nyagurmukhi = 2590;
 30405              e.o = 111;
 30406              e.oacute = 243;
 30407              e.oangthai = 3629;
 30408              e.obarred = 629;
 30409              e.obarredcyrillic = 1257;
 30410              e.obarreddieresiscyrillic = 1259;
 30411              e.obengali = 2451;
 30412              e.obopomofo = 12571;
 30413              e.obreve = 335;
 30414              e.ocandradeva = 2321;
 30415              e.ocandragujarati = 2705;
 30416              e.ocandravowelsigndeva = 2377;
 30417              e.ocandravowelsigngujarati = 2761;
 30418              e.ocaron = 466;
 30419              e.ocircle = 9438;
 30420              e.ocircumflex = 244;
 30421              e.ocircumflexacute = 7889;
 30422              e.ocircumflexdotbelow = 7897;
 30423              e.ocircumflexgrave = 7891;
 30424              e.ocircumflexhookabove = 7893;
 30425              e.ocircumflextilde = 7895;
 30426              e.ocyrillic = 1086;
 30427              e.odblacute = 337;
 30428              e.odblgrave = 525;
 30429              e.odeva = 2323;
 30430              e.odieresis = 246;
 30431              e.odieresiscyrillic = 1255;
 30432              e.odotbelow = 7885;
 30433              e.oe = 339;
 30434              e.oekorean = 12634;
 30435              e.ogonek = 731;
 30436              e.ogonekcmb = 808;
 30437              e.ograve = 242;
 30438              e.ogujarati = 2707;
 30439              e.oharmenian = 1413;
 30440              e.ohiragana = 12362;
 30441              e.ohookabove = 7887;
 30442              e.ohorn = 417;
 30443              e.ohornacute = 7899;
 30444              e.ohorndotbelow = 7907;
 30445              e.ohorngrave = 7901;
 30446              e.ohornhookabove = 7903;
 30447              e.ohorntilde = 7905;
 30448              e.ohungarumlaut = 337;
 30449              e.oi = 419;
 30450              e.oinvertedbreve = 527;
 30451              e.okatakana = 12458;
 30452              e.okatakanahalfwidth = 65397;
 30453              e.okorean = 12631;
 30454              e.olehebrew = 1451;
 30455              e.omacron = 333;
 30456              e.omacronacute = 7763;
 30457              e.omacrongrave = 7761;
 30458              e.omdeva = 2384;
 30459              e.omega = 969;
 30460              e.omega1 = 982;
 30461              e.omegacyrillic = 1121;
 30462              e.omegalatinclosed = 631;
 30463              e.omegaroundcyrillic = 1147;
 30464              e.omegatitlocyrillic = 1149;
 30465              e.omegatonos = 974;
 30466              e.omgujarati = 2768;
 30467              e.omicron = 959;
 30468              e.omicrontonos = 972;
 30469              e.omonospace = 65359;
 30470              e.one = 49;
 30471              e.onearabic = 1633;
 30472              e.onebengali = 2535;
 30473              e.onecircle = 9312;
 30474              e.onecircleinversesansserif = 10122;
 30475              e.onedeva = 2407;
 30476              e.onedotenleader = 8228;
 30477              e.oneeighth = 8539;
 30478              e.onefitted = 63196;
 30479              e.onegujarati = 2791;
 30480              e.onegurmukhi = 2663;
 30481              e.onehackarabic = 1633;
 30482              e.onehalf = 189;
 30483              e.onehangzhou = 12321;
 30484              e.oneideographicparen = 12832;
 30485              e.oneinferior = 8321;
 30486              e.onemonospace = 65297;
 30487              e.onenumeratorbengali = 2548;
 30488              e.oneoldstyle = 63281;
 30489              e.oneparen = 9332;
 30490              e.oneperiod = 9352;
 30491              e.onepersian = 1777;
 30492              e.onequarter = 188;
 30493              e.oneroman = 8560;
 30494              e.onesuperior = 185;
 30495              e.onethai = 3665;
 30496              e.onethird = 8531;
 30497              e.oogonek = 491;
 30498              e.oogonekmacron = 493;
 30499              e.oogurmukhi = 2579;
 30500              e.oomatragurmukhi = 2635;
 30501              e.oopen = 596;
 30502              e.oparen = 9386;
 30503              e.openbullet = 9702;
 30504              e.option = 8997;
 30505              e.ordfeminine = 170;
 30506              e.ordmasculine = 186;
 30507              e.orthogonal = 8735;
 30508              e.oshortdeva = 2322;
 30509              e.oshortvowelsigndeva = 2378;
 30510              e.oslash = 248;
 30511              e.oslashacute = 511;
 30512              e.osmallhiragana = 12361;
 30513              e.osmallkatakana = 12457;
 30514              e.osmallkatakanahalfwidth = 65387;
 30515              e.ostrokeacute = 511;
 30516              e.osuperior = 63216;
 30517              e.otcyrillic = 1151;
 30518              e.otilde = 245;
 30519              e.otildeacute = 7757;
 30520              e.otildedieresis = 7759;
 30521              e.oubopomofo = 12577;
 30522              e.overline = 8254;
 30523              e.overlinecenterline = 65098;
 30524              e.overlinecmb = 773;
 30525              e.overlinedashed = 65097;
 30526              e.overlinedblwavy = 65100;
 30527              e.overlinewavy = 65099;
 30528              e.overscore = 175;
 30529              e.ovowelsignbengali = 2507;
 30530              e.ovowelsigndeva = 2379;
 30531              e.ovowelsigngujarati = 2763;
 30532              e.p = 112;
 30533              e.paampssquare = 13184;
 30534              e.paasentosquare = 13099;
 30535              e.pabengali = 2474;
 30536              e.pacute = 7765;
 30537              e.padeva = 2346;
 30538              e.pagedown = 8671;
 30539              e.pageup = 8670;
 30540              e.pagujarati = 2730;
 30541              e.pagurmukhi = 2602;
 30542              e.pahiragana = 12401;
 30543              e.paiyannoithai = 3631;
 30544              e.pakatakana = 12497;
 30545              e.palatalizationcyrilliccmb = 1156;
 30546              e.palochkacyrillic = 1216;
 30547              e.pansioskorean = 12671;
 30548              e.paragraph = 182;
 30549              e.parallel = 8741;
 30550              e.parenleft = 40;
 30551              e.parenleftaltonearabic = 64830;
 30552              e.parenleftbt = 63725;
 30553              e.parenleftex = 63724;
 30554              e.parenleftinferior = 8333;
 30555              e.parenleftmonospace = 65288;
 30556              e.parenleftsmall = 65113;
 30557              e.parenleftsuperior = 8317;
 30558              e.parenlefttp = 63723;
 30559              e.parenleftvertical = 65077;
 30560              e.parenright = 41;
 30561              e.parenrightaltonearabic = 64831;
 30562              e.parenrightbt = 63736;
 30563              e.parenrightex = 63735;
 30564              e.parenrightinferior = 8334;
 30565              e.parenrightmonospace = 65289;
 30566              e.parenrightsmall = 65114;
 30567              e.parenrightsuperior = 8318;
 30568              e.parenrighttp = 63734;
 30569              e.parenrightvertical = 65078;
 30570              e.partialdiff = 8706;
 30571              e.paseqhebrew = 1472;
 30572              e.pashtahebrew = 1433;
 30573              e.pasquare = 13225;
 30574              e.patah = 1463;
 30575              e.patah11 = 1463;
 30576              e.patah1d = 1463;
 30577              e.patah2a = 1463;
 30578              e.patahhebrew = 1463;
 30579              e.patahnarrowhebrew = 1463;
 30580              e.patahquarterhebrew = 1463;
 30581              e.patahwidehebrew = 1463;
 30582              e.pazerhebrew = 1441;
 30583              e.pbopomofo = 12550;
 30584              e.pcircle = 9439;
 30585              e.pdotaccent = 7767;
 30586              e.pe = 1508;
 30587              e.pecyrillic = 1087;
 30588              e.pedagesh = 64324;
 30589              e.pedageshhebrew = 64324;
 30590              e.peezisquare = 13115;
 30591              e.pefinaldageshhebrew = 64323;
 30592              e.peharabic = 1662;
 30593              e.peharmenian = 1402;
 30594              e.pehebrew = 1508;
 30595              e.pehfinalarabic = 64343;
 30596              e.pehinitialarabic = 64344;
 30597              e.pehiragana = 12410;
 30598              e.pehmedialarabic = 64345;
 30599              e.pekatakana = 12506;
 30600              e.pemiddlehookcyrillic = 1191;
 30601              e.perafehebrew = 64334;
 30602              e.percent = 37;
 30603              e.percentarabic = 1642;
 30604              e.percentmonospace = 65285;
 30605              e.percentsmall = 65130;
 30606              e.period = 46;
 30607              e.periodarmenian = 1417;
 30608              e.periodcentered = 183;
 30609              e.periodhalfwidth = 65377;
 30610              e.periodinferior = 63207;
 30611              e.periodmonospace = 65294;
 30612              e.periodsmall = 65106;
 30613              e.periodsuperior = 63208;
 30614              e.perispomenigreekcmb = 834;
 30615              e.perpendicular = 8869;
 30616              e.perthousand = 8240;
 30617              e.peseta = 8359;
 30618              e.pfsquare = 13194;
 30619              e.phabengali = 2475;
 30620              e.phadeva = 2347;
 30621              e.phagujarati = 2731;
 30622              e.phagurmukhi = 2603;
 30623              e.phi = 966;
 30624              e.phi1 = 981;
 30625              e.phieuphacirclekorean = 12922;
 30626              e.phieuphaparenkorean = 12826;
 30627              e.phieuphcirclekorean = 12908;
 30628              e.phieuphkorean = 12621;
 30629              e.phieuphparenkorean = 12812;
 30630              e.philatin = 632;
 30631              e.phinthuthai = 3642;
 30632              e.phisymbolgreek = 981;
 30633              e.phook = 421;
 30634              e.phophanthai = 3614;
 30635              e.phophungthai = 3612;
 30636              e.phosamphaothai = 3616;
 30637              e.pi = 960;
 30638              e.pieupacirclekorean = 12915;
 30639              e.pieupaparenkorean = 12819;
 30640              e.pieupcieuckorean = 12662;
 30641              e.pieupcirclekorean = 12901;
 30642              e.pieupkiyeokkorean = 12658;
 30643              e.pieupkorean = 12610;
 30644              e.pieupparenkorean = 12805;
 30645              e.pieupsioskiyeokkorean = 12660;
 30646              e.pieupsioskorean = 12612;
 30647              e.pieupsiostikeutkorean = 12661;
 30648              e.pieupthieuthkorean = 12663;
 30649              e.pieuptikeutkorean = 12659;
 30650              e.pihiragana = 12404;
 30651              e.pikatakana = 12500;
 30652              e.pisymbolgreek = 982;
 30653              e.piwrarmenian = 1411;
 30654              e.planckover2pi = 8463;
 30655              e.planckover2pi1 = 8463;
 30656              e.plus = 43;
 30657              e.plusbelowcmb = 799;
 30658              e.pluscircle = 8853;
 30659              e.plusminus = 177;
 30660              e.plusmod = 726;
 30661              e.plusmonospace = 65291;
 30662              e.plussmall = 65122;
 30663              e.plussuperior = 8314;
 30664              e.pmonospace = 65360;
 30665              e.pmsquare = 13272;
 30666              e.pohiragana = 12413;
 30667              e.pointingindexdownwhite = 9759;
 30668              e.pointingindexleftwhite = 9756;
 30669              e.pointingindexrightwhite = 9758;
 30670              e.pointingindexupwhite = 9757;
 30671              e.pokatakana = 12509;
 30672              e.poplathai = 3611;
 30673              e.postalmark = 12306;
 30674              e.postalmarkface = 12320;
 30675              e.pparen = 9387;
 30676              e.precedes = 8826;
 30677              e.prescription = 8478;
 30678              e.primemod = 697;
 30679              e.primereversed = 8245;
 30680              e.product = 8719;
 30681              e.projective = 8965;
 30682              e.prolongedkana = 12540;
 30683              e.propellor = 8984;
 30684              e.propersubset = 8834;
 30685              e.propersuperset = 8835;
 30686              e.proportion = 8759;
 30687              e.proportional = 8733;
 30688              e.psi = 968;
 30689              e.psicyrillic = 1137;
 30690              e.psilipneumatacyrilliccmb = 1158;
 30691              e.pssquare = 13232;
 30692              e.puhiragana = 12407;
 30693              e.pukatakana = 12503;
 30694              e.pvsquare = 13236;
 30695              e.pwsquare = 13242;
 30696              e.q = 113;
 30697              e.qadeva = 2392;
 30698              e.qadmahebrew = 1448;
 30699              e.qafarabic = 1602;
 30700              e.qaffinalarabic = 65238;
 30701              e.qafinitialarabic = 65239;
 30702              e.qafmedialarabic = 65240;
 30703              e.qamats = 1464;
 30704              e.qamats10 = 1464;
 30705              e.qamats1a = 1464;
 30706              e.qamats1c = 1464;
 30707              e.qamats27 = 1464;
 30708              e.qamats29 = 1464;
 30709              e.qamats33 = 1464;
 30710              e.qamatsde = 1464;
 30711              e.qamatshebrew = 1464;
 30712              e.qamatsnarrowhebrew = 1464;
 30713              e.qamatsqatanhebrew = 1464;
 30714              e.qamatsqatannarrowhebrew = 1464;
 30715              e.qamatsqatanquarterhebrew = 1464;
 30716              e.qamatsqatanwidehebrew = 1464;
 30717              e.qamatsquarterhebrew = 1464;
 30718              e.qamatswidehebrew = 1464;
 30719              e.qarneyparahebrew = 1439;
 30720              e.qbopomofo = 12561;
 30721              e.qcircle = 9440;
 30722              e.qhook = 672;
 30723              e.qmonospace = 65361;
 30724              e.qof = 1511;
 30725              e.qofdagesh = 64327;
 30726              e.qofdageshhebrew = 64327;
 30727              e.qofhebrew = 1511;
 30728              e.qparen = 9388;
 30729              e.quarternote = 9833;
 30730              e.qubuts = 1467;
 30731              e.qubuts18 = 1467;
 30732              e.qubuts25 = 1467;
 30733              e.qubuts31 = 1467;
 30734              e.qubutshebrew = 1467;
 30735              e.qubutsnarrowhebrew = 1467;
 30736              e.qubutsquarterhebrew = 1467;
 30737              e.qubutswidehebrew = 1467;
 30738              e.question = 63;
 30739              e.questionarabic = 1567;
 30740              e.questionarmenian = 1374;
 30741              e.questiondown = 191;
 30742              e.questiondownsmall = 63423;
 30743              e.questiongreek = 894;
 30744              e.questionmonospace = 65311;
 30745              e.questionsmall = 63295;
 30746              e.quotedbl = 34;
 30747              e.quotedblbase = 8222;
 30748              e.quotedblleft = 8220;
 30749              e.quotedblmonospace = 65282;
 30750              e.quotedblprime = 12318;
 30751              e.quotedblprimereversed = 12317;
 30752              e.quotedblright = 8221;
 30753              e.quoteleft = 8216;
 30754              e.quoteleftreversed = 8219;
 30755              e.quotereversed = 8219;
 30756              e.quoteright = 8217;
 30757              e.quoterightn = 329;
 30758              e.quotesinglbase = 8218;
 30759              e.quotesingle = 39;
 30760              e.quotesinglemonospace = 65287;
 30761              e.r = 114;
 30762              e.raarmenian = 1404;
 30763              e.rabengali = 2480;
 30764              e.racute = 341;
 30765              e.radeva = 2352;
 30766              e.radical = 8730;
 30767              e.radicalex = 63717;
 30768              e.radoverssquare = 13230;
 30769              e.radoverssquaredsquare = 13231;
 30770              e.radsquare = 13229;
 30771              e.rafe = 1471;
 30772              e.rafehebrew = 1471;
 30773              e.ragujarati = 2736;
 30774              e.ragurmukhi = 2608;
 30775              e.rahiragana = 12425;
 30776              e.rakatakana = 12521;
 30777              e.rakatakanahalfwidth = 65431;
 30778              e.ralowerdiagonalbengali = 2545;
 30779              e.ramiddlediagonalbengali = 2544;
 30780              e.ramshorn = 612;
 30781              e.ratio = 8758;
 30782              e.rbopomofo = 12566;
 30783              e.rcaron = 345;
 30784              e.rcedilla = 343;
 30785              e.rcircle = 9441;
 30786              e.rcommaaccent = 343;
 30787              e.rdblgrave = 529;
 30788              e.rdotaccent = 7769;
 30789              e.rdotbelow = 7771;
 30790              e.rdotbelowmacron = 7773;
 30791              e.referencemark = 8251;
 30792              e.reflexsubset = 8838;
 30793              e.reflexsuperset = 8839;
 30794              e.registered = 174;
 30795              e.registersans = 63720;
 30796              e.registerserif = 63194;
 30797              e.reharabic = 1585;
 30798              e.reharmenian = 1408;
 30799              e.rehfinalarabic = 65198;
 30800              e.rehiragana = 12428;
 30801              e.rekatakana = 12524;
 30802              e.rekatakanahalfwidth = 65434;
 30803              e.resh = 1512;
 30804              e.reshdageshhebrew = 64328;
 30805              e.reshhebrew = 1512;
 30806              e.reversedtilde = 8765;
 30807              e.reviahebrew = 1431;
 30808              e.reviamugrashhebrew = 1431;
 30809              e.revlogicalnot = 8976;
 30810              e.rfishhook = 638;
 30811              e.rfishhookreversed = 639;
 30812              e.rhabengali = 2525;
 30813              e.rhadeva = 2397;
 30814              e.rho = 961;
 30815              e.rhook = 637;
 30816              e.rhookturned = 635;
 30817              e.rhookturnedsuperior = 693;
 30818              e.rhosymbolgreek = 1009;
 30819              e.rhotichookmod = 734;
 30820              e.rieulacirclekorean = 12913;
 30821              e.rieulaparenkorean = 12817;
 30822              e.rieulcirclekorean = 12899;
 30823              e.rieulhieuhkorean = 12608;
 30824              e.rieulkiyeokkorean = 12602;
 30825              e.rieulkiyeoksioskorean = 12649;
 30826              e.rieulkorean = 12601;
 30827              e.rieulmieumkorean = 12603;
 30828              e.rieulpansioskorean = 12652;
 30829              e.rieulparenkorean = 12803;
 30830              e.rieulphieuphkorean = 12607;
 30831              e.rieulpieupkorean = 12604;
 30832              e.rieulpieupsioskorean = 12651;
 30833              e.rieulsioskorean = 12605;
 30834              e.rieulthieuthkorean = 12606;
 30835              e.rieultikeutkorean = 12650;
 30836              e.rieulyeorinhieuhkorean = 12653;
 30837              e.rightangle = 8735;
 30838              e.righttackbelowcmb = 793;
 30839              e.righttriangle = 8895;
 30840              e.rihiragana = 12426;
 30841              e.rikatakana = 12522;
 30842              e.rikatakanahalfwidth = 65432;
 30843              e.ring = 730;
 30844              e.ringbelowcmb = 805;
 30845              e.ringcmb = 778;
 30846              e.ringhalfleft = 703;
 30847              e.ringhalfleftarmenian = 1369;
 30848              e.ringhalfleftbelowcmb = 796;
 30849              e.ringhalfleftcentered = 723;
 30850              e.ringhalfright = 702;
 30851              e.ringhalfrightbelowcmb = 825;
 30852              e.ringhalfrightcentered = 722;
 30853              e.rinvertedbreve = 531;
 30854              e.rittorusquare = 13137;
 30855              e.rlinebelow = 7775;
 30856              e.rlongleg = 636;
 30857              e.rlonglegturned = 634;
 30858              e.rmonospace = 65362;
 30859              e.rohiragana = 12429;
 30860              e.rokatakana = 12525;
 30861              e.rokatakanahalfwidth = 65435;
 30862              e.roruathai = 3619;
 30863              e.rparen = 9389;
 30864              e.rrabengali = 2524;
 30865              e.rradeva = 2353;
 30866              e.rragurmukhi = 2652;
 30867              e.rreharabic = 1681;
 30868              e.rrehfinalarabic = 64397;
 30869              e.rrvocalicbengali = 2528;
 30870              e.rrvocalicdeva = 2400;
 30871              e.rrvocalicgujarati = 2784;
 30872              e.rrvocalicvowelsignbengali = 2500;
 30873              e.rrvocalicvowelsigndeva = 2372;
 30874              e.rrvocalicvowelsigngujarati = 2756;
 30875              e.rsuperior = 63217;
 30876              e.rtblock = 9616;
 30877              e.rturned = 633;
 30878              e.rturnedsuperior = 692;
 30879              e.ruhiragana = 12427;
 30880              e.rukatakana = 12523;
 30881              e.rukatakanahalfwidth = 65433;
 30882              e.rupeemarkbengali = 2546;
 30883              e.rupeesignbengali = 2547;
 30884              e.rupiah = 63197;
 30885              e.ruthai = 3620;
 30886              e.rvocalicbengali = 2443;
 30887              e.rvocalicdeva = 2315;
 30888              e.rvocalicgujarati = 2699;
 30889              e.rvocalicvowelsignbengali = 2499;
 30890              e.rvocalicvowelsigndeva = 2371;
 30891              e.rvocalicvowelsigngujarati = 2755;
 30892              e.s = 115;
 30893              e.sabengali = 2488;
 30894              e.sacute = 347;
 30895              e.sacutedotaccent = 7781;
 30896              e.sadarabic = 1589;
 30897              e.sadeva = 2360;
 30898              e.sadfinalarabic = 65210;
 30899              e.sadinitialarabic = 65211;
 30900              e.sadmedialarabic = 65212;
 30901              e.sagujarati = 2744;
 30902              e.sagurmukhi = 2616;
 30903              e.sahiragana = 12373;
 30904              e.sakatakana = 12469;
 30905              e.sakatakanahalfwidth = 65403;
 30906              e.sallallahoualayhewasallamarabic = 65018;
 30907              e.samekh = 1505;
 30908              e.samekhdagesh = 64321;
 30909              e.samekhdageshhebrew = 64321;
 30910              e.samekhhebrew = 1505;
 30911              e.saraaathai = 3634;
 30912              e.saraaethai = 3649;
 30913              e.saraaimaimalaithai = 3652;
 30914              e.saraaimaimuanthai = 3651;
 30915              e.saraamthai = 3635;
 30916              e.saraathai = 3632;
 30917              e.saraethai = 3648;
 30918              e.saraiileftthai = 63622;
 30919              e.saraiithai = 3637;
 30920              e.saraileftthai = 63621;
 30921              e.saraithai = 3636;
 30922              e.saraothai = 3650;
 30923              e.saraueeleftthai = 63624;
 30924              e.saraueethai = 3639;
 30925              e.saraueleftthai = 63623;
 30926              e.sarauethai = 3638;
 30927              e.sarauthai = 3640;
 30928              e.sarauuthai = 3641;
 30929              e.sbopomofo = 12569;
 30930              e.scaron = 353;
 30931              e.scarondotaccent = 7783;
 30932              e.scedilla = 351;
 30933              e.schwa = 601;
 30934              e.schwacyrillic = 1241;
 30935              e.schwadieresiscyrillic = 1243;
 30936              e.schwahook = 602;
 30937              e.scircle = 9442;
 30938              e.scircumflex = 349;
 30939              e.scommaaccent = 537;
 30940              e.sdotaccent = 7777;
 30941              e.sdotbelow = 7779;
 30942              e.sdotbelowdotaccent = 7785;
 30943              e.seagullbelowcmb = 828;
 30944              e.second = 8243;
 30945              e.secondtonechinese = 714;
 30946              e.section = 167;
 30947              e.seenarabic = 1587;
 30948              e.seenfinalarabic = 65202;
 30949              e.seeninitialarabic = 65203;
 30950              e.seenmedialarabic = 65204;
 30951              e.segol = 1462;
 30952              e.segol13 = 1462;
 30953              e.segol1f = 1462;
 30954              e.segol2c = 1462;
 30955              e.segolhebrew = 1462;
 30956              e.segolnarrowhebrew = 1462;
 30957              e.segolquarterhebrew = 1462;
 30958              e.segoltahebrew = 1426;
 30959              e.segolwidehebrew = 1462;
 30960              e.seharmenian = 1405;
 30961              e.sehiragana = 12379;
 30962              e.sekatakana = 12475;
 30963              e.sekatakanahalfwidth = 65406;
 30964              e.semicolon = 59;
 30965              e.semicolonarabic = 1563;
 30966              e.semicolonmonospace = 65307;
 30967              e.semicolonsmall = 65108;
 30968              e.semivoicedmarkkana = 12444;
 30969              e.semivoicedmarkkanahalfwidth = 65439;
 30970              e.sentisquare = 13090;
 30971              e.sentosquare = 13091;
 30972              e.seven = 55;
 30973              e.sevenarabic = 1639;
 30974              e.sevenbengali = 2541;
 30975              e.sevencircle = 9318;
 30976              e.sevencircleinversesansserif = 10128;
 30977              e.sevendeva = 2413;
 30978              e.seveneighths = 8542;
 30979              e.sevengujarati = 2797;
 30980              e.sevengurmukhi = 2669;
 30981              e.sevenhackarabic = 1639;
 30982              e.sevenhangzhou = 12327;
 30983              e.sevenideographicparen = 12838;
 30984              e.seveninferior = 8327;
 30985              e.sevenmonospace = 65303;
 30986              e.sevenoldstyle = 63287;
 30987              e.sevenparen = 9338;
 30988              e.sevenperiod = 9358;
 30989              e.sevenpersian = 1783;
 30990              e.sevenroman = 8566;
 30991              e.sevensuperior = 8311;
 30992              e.seventeencircle = 9328;
 30993              e.seventeenparen = 9348;
 30994              e.seventeenperiod = 9368;
 30995              e.seventhai = 3671;
 30996              e.sfthyphen = 173;
 30997              e.shaarmenian = 1399;
 30998              e.shabengali = 2486;
 30999              e.shacyrillic = 1096;
 31000              e.shaddaarabic = 1617;
 31001              e.shaddadammaarabic = 64609;
 31002              e.shaddadammatanarabic = 64606;
 31003              e.shaddafathaarabic = 64608;
 31004              e.shaddakasraarabic = 64610;
 31005              e.shaddakasratanarabic = 64607;
 31006              e.shade = 9618;
 31007              e.shadedark = 9619;
 31008              e.shadelight = 9617;
 31009              e.shademedium = 9618;
 31010              e.shadeva = 2358;
 31011              e.shagujarati = 2742;
 31012              e.shagurmukhi = 2614;
 31013              e.shalshelethebrew = 1427;
 31014              e.shbopomofo = 12565;
 31015              e.shchacyrillic = 1097;
 31016              e.sheenarabic = 1588;
 31017              e.sheenfinalarabic = 65206;
 31018              e.sheeninitialarabic = 65207;
 31019              e.sheenmedialarabic = 65208;
 31020              e.sheicoptic = 995;
 31021              e.sheqel = 8362;
 31022              e.sheqelhebrew = 8362;
 31023              e.sheva = 1456;
 31024              e.sheva115 = 1456;
 31025              e.sheva15 = 1456;
 31026              e.sheva22 = 1456;
 31027              e.sheva2e = 1456;
 31028              e.shevahebrew = 1456;
 31029              e.shevanarrowhebrew = 1456;
 31030              e.shevaquarterhebrew = 1456;
 31031              e.shevawidehebrew = 1456;
 31032              e.shhacyrillic = 1211;
 31033              e.shimacoptic = 1005;
 31034              e.shin = 1513;
 31035              e.shindagesh = 64329;
 31036              e.shindageshhebrew = 64329;
 31037              e.shindageshshindot = 64300;
 31038              e.shindageshshindothebrew = 64300;
 31039              e.shindageshsindot = 64301;
 31040              e.shindageshsindothebrew = 64301;
 31041              e.shindothebrew = 1473;
 31042              e.shinhebrew = 1513;
 31043              e.shinshindot = 64298;
 31044              e.shinshindothebrew = 64298;
 31045              e.shinsindot = 64299;
 31046              e.shinsindothebrew = 64299;
 31047              e.shook = 642;
 31048              e.sigma = 963;
 31049              e.sigma1 = 962;
 31050              e.sigmafinal = 962;
 31051              e.sigmalunatesymbolgreek = 1010;
 31052              e.sihiragana = 12375;
 31053              e.sikatakana = 12471;
 31054              e.sikatakanahalfwidth = 65404;
 31055              e.siluqhebrew = 1469;
 31056              e.siluqlefthebrew = 1469;
 31057              e.similar = 8764;
 31058              e.sindothebrew = 1474;
 31059              e.siosacirclekorean = 12916;
 31060              e.siosaparenkorean = 12820;
 31061              e.sioscieuckorean = 12670;
 31062              e.sioscirclekorean = 12902;
 31063              e.sioskiyeokkorean = 12666;
 31064              e.sioskorean = 12613;
 31065              e.siosnieunkorean = 12667;
 31066              e.siosparenkorean = 12806;
 31067              e.siospieupkorean = 12669;
 31068              e.siostikeutkorean = 12668;
 31069              e.six = 54;
 31070              e.sixarabic = 1638;
 31071              e.sixbengali = 2540;
 31072              e.sixcircle = 9317;
 31073              e.sixcircleinversesansserif = 10127;
 31074              e.sixdeva = 2412;
 31075              e.sixgujarati = 2796;
 31076              e.sixgurmukhi = 2668;
 31077              e.sixhackarabic = 1638;
 31078              e.sixhangzhou = 12326;
 31079              e.sixideographicparen = 12837;
 31080              e.sixinferior = 8326;
 31081              e.sixmonospace = 65302;
 31082              e.sixoldstyle = 63286;
 31083              e.sixparen = 9337;
 31084              e.sixperiod = 9357;
 31085              e.sixpersian = 1782;
 31086              e.sixroman = 8565;
 31087              e.sixsuperior = 8310;
 31088              e.sixteencircle = 9327;
 31089              e.sixteencurrencydenominatorbengali = 2553;
 31090              e.sixteenparen = 9347;
 31091              e.sixteenperiod = 9367;
 31092              e.sixthai = 3670;
 31093              e.slash = 47;
 31094              e.slashmonospace = 65295;
 31095              e.slong = 383;
 31096              e.slongdotaccent = 7835;
 31097              e.smileface = 9786;
 31098              e.smonospace = 65363;
 31099              e.sofpasuqhebrew = 1475;
 31100              e.softhyphen = 173;
 31101              e.softsigncyrillic = 1100;
 31102              e.sohiragana = 12381;
 31103              e.sokatakana = 12477;
 31104              e.sokatakanahalfwidth = 65407;
 31105              e.soliduslongoverlaycmb = 824;
 31106              e.solidusshortoverlaycmb = 823;
 31107              e.sorusithai = 3625;
 31108              e.sosalathai = 3624;
 31109              e.sosothai = 3595;
 31110              e.sosuathai = 3626;
 31111              e.space = 32;
 31112              e.spacehackarabic = 32;
 31113              e.spade = 9824;
 31114              e.spadesuitblack = 9824;
 31115              e.spadesuitwhite = 9828;
 31116              e.sparen = 9390;
 31117              e.squarebelowcmb = 827;
 31118              e.squarecc = 13252;
 31119              e.squarecm = 13213;
 31120              e.squarediagonalcrosshatchfill = 9641;
 31121              e.squarehorizontalfill = 9636;
 31122              e.squarekg = 13199;
 31123              e.squarekm = 13214;
 31124              e.squarekmcapital = 13262;
 31125              e.squareln = 13265;
 31126              e.squarelog = 13266;
 31127              e.squaremg = 13198;
 31128              e.squaremil = 13269;
 31129              e.squaremm = 13212;
 31130              e.squaremsquared = 13217;
 31131              e.squareorthogonalcrosshatchfill = 9638;
 31132              e.squareupperlefttolowerrightfill = 9639;
 31133              e.squareupperrighttolowerleftfill = 9640;
 31134              e.squareverticalfill = 9637;
 31135              e.squarewhitewithsmallblack = 9635;
 31136              e.srsquare = 13275;
 31137              e.ssabengali = 2487;
 31138              e.ssadeva = 2359;
 31139              e.ssagujarati = 2743;
 31140              e.ssangcieuckorean = 12617;
 31141              e.ssanghieuhkorean = 12677;
 31142              e.ssangieungkorean = 12672;
 31143              e.ssangkiyeokkorean = 12594;
 31144              e.ssangnieunkorean = 12645;
 31145              e.ssangpieupkorean = 12611;
 31146              e.ssangsioskorean = 12614;
 31147              e.ssangtikeutkorean = 12600;
 31148              e.ssuperior = 63218;
 31149              e.sterling = 163;
 31150              e.sterlingmonospace = 65505;
 31151              e.strokelongoverlaycmb = 822;
 31152              e.strokeshortoverlaycmb = 821;
 31153              e.subset = 8834;
 31154              e.subsetnotequal = 8842;
 31155              e.subsetorequal = 8838;
 31156              e.succeeds = 8827;
 31157              e.suchthat = 8715;
 31158              e.suhiragana = 12377;
 31159              e.sukatakana = 12473;
 31160              e.sukatakanahalfwidth = 65405;
 31161              e.sukunarabic = 1618;
 31162              e.summation = 8721;
 31163              e.sun = 9788;
 31164              e.superset = 8835;
 31165              e.supersetnotequal = 8843;
 31166              e.supersetorequal = 8839;
 31167              e.svsquare = 13276;
 31168              e.syouwaerasquare = 13180;
 31169              e.t = 116;
 31170              e.tabengali = 2468;
 31171              e.tackdown = 8868;
 31172              e.tackleft = 8867;
 31173              e.tadeva = 2340;
 31174              e.tagujarati = 2724;
 31175              e.tagurmukhi = 2596;
 31176              e.taharabic = 1591;
 31177              e.tahfinalarabic = 65218;
 31178              e.tahinitialarabic = 65219;
 31179              e.tahiragana = 12383;
 31180              e.tahmedialarabic = 65220;
 31181              e.taisyouerasquare = 13181;
 31182              e.takatakana = 12479;
 31183              e.takatakanahalfwidth = 65408;
 31184              e.tatweelarabic = 1600;
 31185              e.tau = 964;
 31186              e.tav = 1514;
 31187              e.tavdages = 64330;
 31188              e.tavdagesh = 64330;
 31189              e.tavdageshhebrew = 64330;
 31190              e.tavhebrew = 1514;
 31191              e.tbar = 359;
 31192              e.tbopomofo = 12554;
 31193              e.tcaron = 357;
 31194              e.tccurl = 680;
 31195              e.tcedilla = 355;
 31196              e.tcheharabic = 1670;
 31197              e.tchehfinalarabic = 64379;
 31198              e.tchehinitialarabic = 64380;
 31199              e.tchehmedialarabic = 64381;
 31200              e.tcircle = 9443;
 31201              e.tcircumflexbelow = 7793;
 31202              e.tcommaaccent = 355;
 31203              e.tdieresis = 7831;
 31204              e.tdotaccent = 7787;
 31205              e.tdotbelow = 7789;
 31206              e.tecyrillic = 1090;
 31207              e.tedescendercyrillic = 1197;
 31208              e.teharabic = 1578;
 31209              e.tehfinalarabic = 65174;
 31210              e.tehhahinitialarabic = 64674;
 31211              e.tehhahisolatedarabic = 64524;
 31212              e.tehinitialarabic = 65175;
 31213              e.tehiragana = 12390;
 31214              e.tehjeeminitialarabic = 64673;
 31215              e.tehjeemisolatedarabic = 64523;
 31216              e.tehmarbutaarabic = 1577;
 31217              e.tehmarbutafinalarabic = 65172;
 31218              e.tehmedialarabic = 65176;
 31219              e.tehmeeminitialarabic = 64676;
 31220              e.tehmeemisolatedarabic = 64526;
 31221              e.tehnoonfinalarabic = 64627;
 31222              e.tekatakana = 12486;
 31223              e.tekatakanahalfwidth = 65411;
 31224              e.telephone = 8481;
 31225              e.telephoneblack = 9742;
 31226              e.telishagedolahebrew = 1440;
 31227              e.telishaqetanahebrew = 1449;
 31228              e.tencircle = 9321;
 31229              e.tenideographicparen = 12841;
 31230              e.tenparen = 9341;
 31231              e.tenperiod = 9361;
 31232              e.tenroman = 8569;
 31233              e.tesh = 679;
 31234              e.tet = 1496;
 31235              e.tetdagesh = 64312;
 31236              e.tetdageshhebrew = 64312;
 31237              e.tethebrew = 1496;
 31238              e.tetsecyrillic = 1205;
 31239              e.tevirhebrew = 1435;
 31240              e.tevirlefthebrew = 1435;
 31241              e.thabengali = 2469;
 31242              e.thadeva = 2341;
 31243              e.thagujarati = 2725;
 31244              e.thagurmukhi = 2597;
 31245              e.thalarabic = 1584;
 31246              e.thalfinalarabic = 65196;
 31247              e.thanthakhatlowleftthai = 63640;
 31248              e.thanthakhatlowrightthai = 63639;
 31249              e.thanthakhatthai = 3660;
 31250              e.thanthakhatupperleftthai = 63638;
 31251              e.theharabic = 1579;
 31252              e.thehfinalarabic = 65178;
 31253              e.thehinitialarabic = 65179;
 31254              e.thehmedialarabic = 65180;
 31255              e.thereexists = 8707;
 31256              e.therefore = 8756;
 31257              e.theta = 952;
 31258              e.theta1 = 977;
 31259              e.thetasymbolgreek = 977;
 31260              e.thieuthacirclekorean = 12921;
 31261              e.thieuthaparenkorean = 12825;
 31262              e.thieuthcirclekorean = 12907;
 31263              e.thieuthkorean = 12620;
 31264              e.thieuthparenkorean = 12811;
 31265              e.thirteencircle = 9324;
 31266              e.thirteenparen = 9344;
 31267              e.thirteenperiod = 9364;
 31268              e.thonangmonthothai = 3601;
 31269              e.thook = 429;
 31270              e.thophuthaothai = 3602;
 31271              e.thorn = 254;
 31272              e.thothahanthai = 3607;
 31273              e.thothanthai = 3600;
 31274              e.thothongthai = 3608;
 31275              e.thothungthai = 3606;
 31276              e.thousandcyrillic = 1154;
 31277              e.thousandsseparatorarabic = 1644;
 31278              e.thousandsseparatorpersian = 1644;
 31279              e.three = 51;
 31280              e.threearabic = 1635;
 31281              e.threebengali = 2537;
 31282              e.threecircle = 9314;
 31283              e.threecircleinversesansserif = 10124;
 31284              e.threedeva = 2409;
 31285              e.threeeighths = 8540;
 31286              e.threegujarati = 2793;
 31287              e.threegurmukhi = 2665;
 31288              e.threehackarabic = 1635;
 31289              e.threehangzhou = 12323;
 31290              e.threeideographicparen = 12834;
 31291              e.threeinferior = 8323;
 31292              e.threemonospace = 65299;
 31293              e.threenumeratorbengali = 2550;
 31294              e.threeoldstyle = 63283;
 31295              e.threeparen = 9334;
 31296              e.threeperiod = 9354;
 31297              e.threepersian = 1779;
 31298              e.threequarters = 190;
 31299              e.threequartersemdash = 63198;
 31300              e.threeroman = 8562;
 31301              e.threesuperior = 179;
 31302              e.threethai = 3667;
 31303              e.thzsquare = 13204;
 31304              e.tihiragana = 12385;
 31305              e.tikatakana = 12481;
 31306              e.tikatakanahalfwidth = 65409;
 31307              e.tikeutacirclekorean = 12912;
 31308              e.tikeutaparenkorean = 12816;
 31309              e.tikeutcirclekorean = 12898;
 31310              e.tikeutkorean = 12599;
 31311              e.tikeutparenkorean = 12802;
 31312              e.tilde = 732;
 31313              e.tildebelowcmb = 816;
 31314              e.tildecmb = 771;
 31315              e.tildecomb = 771;
 31316              e.tildedoublecmb = 864;
 31317              e.tildeoperator = 8764;
 31318              e.tildeoverlaycmb = 820;
 31319              e.tildeverticalcmb = 830;
 31320              e.timescircle = 8855;
 31321              e.tipehahebrew = 1430;
 31322              e.tipehalefthebrew = 1430;
 31323              e.tippigurmukhi = 2672;
 31324              e.titlocyrilliccmb = 1155;
 31325              e.tiwnarmenian = 1407;
 31326              e.tlinebelow = 7791;
 31327              e.tmonospace = 65364;
 31328              e.toarmenian = 1385;
 31329              e.tohiragana = 12392;
 31330              e.tokatakana = 12488;
 31331              e.tokatakanahalfwidth = 65412;
 31332              e.tonebarextrahighmod = 741;
 31333              e.tonebarextralowmod = 745;
 31334              e.tonebarhighmod = 742;
 31335              e.tonebarlowmod = 744;
 31336              e.tonebarmidmod = 743;
 31337              e.tonefive = 445;
 31338              e.tonesix = 389;
 31339              e.tonetwo = 424;
 31340              e.tonos = 900;
 31341              e.tonsquare = 13095;
 31342              e.topatakthai = 3599;
 31343              e.tortoiseshellbracketleft = 12308;
 31344              e.tortoiseshellbracketleftsmall = 65117;
 31345              e.tortoiseshellbracketleftvertical = 65081;
 31346              e.tortoiseshellbracketright = 12309;
 31347              e.tortoiseshellbracketrightsmall = 65118;
 31348              e.tortoiseshellbracketrightvertical = 65082;
 31349              e.totaothai = 3605;
 31350              e.tpalatalhook = 427;
 31351              e.tparen = 9391;
 31352              e.trademark = 8482;
 31353              e.trademarksans = 63722;
 31354              e.trademarkserif = 63195;
 31355              e.tretroflexhook = 648;
 31356              e.triagdn = 9660;
 31357              e.triaglf = 9668;
 31358              e.triagrt = 9658;
 31359              e.triagup = 9650;
 31360              e.ts = 678;
 31361              e.tsadi = 1510;
 31362              e.tsadidagesh = 64326;
 31363              e.tsadidageshhebrew = 64326;
 31364              e.tsadihebrew = 1510;
 31365              e.tsecyrillic = 1094;
 31366              e.tsere = 1461;
 31367              e.tsere12 = 1461;
 31368              e.tsere1e = 1461;
 31369              e.tsere2b = 1461;
 31370              e.tserehebrew = 1461;
 31371              e.tserenarrowhebrew = 1461;
 31372              e.tserequarterhebrew = 1461;
 31373              e.tserewidehebrew = 1461;
 31374              e.tshecyrillic = 1115;
 31375              e.tsuperior = 63219;
 31376              e.ttabengali = 2463;
 31377              e.ttadeva = 2335;
 31378              e.ttagujarati = 2719;
 31379              e.ttagurmukhi = 2591;
 31380              e.tteharabic = 1657;
 31381              e.ttehfinalarabic = 64359;
 31382              e.ttehinitialarabic = 64360;
 31383              e.ttehmedialarabic = 64361;
 31384              e.tthabengali = 2464;
 31385              e.tthadeva = 2336;
 31386              e.tthagujarati = 2720;
 31387              e.tthagurmukhi = 2592;
 31388              e.tturned = 647;
 31389              e.tuhiragana = 12388;
 31390              e.tukatakana = 12484;
 31391              e.tukatakanahalfwidth = 65410;
 31392              e.tusmallhiragana = 12387;
 31393              e.tusmallkatakana = 12483;
 31394              e.tusmallkatakanahalfwidth = 65391;
 31395              e.twelvecircle = 9323;
 31396              e.twelveparen = 9343;
 31397              e.twelveperiod = 9363;
 31398              e.twelveroman = 8571;
 31399              e.twentycircle = 9331;
 31400              e.twentyhangzhou = 21316;
 31401              e.twentyparen = 9351;
 31402              e.twentyperiod = 9371;
 31403              e.two = 50;
 31404              e.twoarabic = 1634;
 31405              e.twobengali = 2536;
 31406              e.twocircle = 9313;
 31407              e.twocircleinversesansserif = 10123;
 31408              e.twodeva = 2408;
 31409              e.twodotenleader = 8229;
 31410              e.twodotleader = 8229;
 31411              e.twodotleadervertical = 65072;
 31412              e.twogujarati = 2792;
 31413              e.twogurmukhi = 2664;
 31414              e.twohackarabic = 1634;
 31415              e.twohangzhou = 12322;
 31416              e.twoideographicparen = 12833;
 31417              e.twoinferior = 8322;
 31418              e.twomonospace = 65298;
 31419              e.twonumeratorbengali = 2549;
 31420              e.twooldstyle = 63282;
 31421              e.twoparen = 9333;
 31422              e.twoperiod = 9353;
 31423              e.twopersian = 1778;
 31424              e.tworoman = 8561;
 31425              e.twostroke = 443;
 31426              e.twosuperior = 178;
 31427              e.twothai = 3666;
 31428              e.twothirds = 8532;
 31429              e.u = 117;
 31430              e.uacute = 250;
 31431              e.ubar = 649;
 31432              e.ubengali = 2441;
 31433              e.ubopomofo = 12584;
 31434              e.ubreve = 365;
 31435              e.ucaron = 468;
 31436              e.ucircle = 9444;
 31437              e.ucircumflex = 251;
 31438              e.ucircumflexbelow = 7799;
 31439              e.ucyrillic = 1091;
 31440              e.udattadeva = 2385;
 31441              e.udblacute = 369;
 31442              e.udblgrave = 533;
 31443              e.udeva = 2313;
 31444              e.udieresis = 252;
 31445              e.udieresisacute = 472;
 31446              e.udieresisbelow = 7795;
 31447              e.udieresiscaron = 474;
 31448              e.udieresiscyrillic = 1265;
 31449              e.udieresisgrave = 476;
 31450              e.udieresismacron = 470;
 31451              e.udotbelow = 7909;
 31452              e.ugrave = 249;
 31453              e.ugujarati = 2697;
 31454              e.ugurmukhi = 2569;
 31455              e.uhiragana = 12358;
 31456              e.uhookabove = 7911;
 31457              e.uhorn = 432;
 31458              e.uhornacute = 7913;
 31459              e.uhorndotbelow = 7921;
 31460              e.uhorngrave = 7915;
 31461              e.uhornhookabove = 7917;
 31462              e.uhorntilde = 7919;
 31463              e.uhungarumlaut = 369;
 31464              e.uhungarumlautcyrillic = 1267;
 31465              e.uinvertedbreve = 535;
 31466              e.ukatakana = 12454;
 31467              e.ukatakanahalfwidth = 65395;
 31468              e.ukcyrillic = 1145;
 31469              e.ukorean = 12636;
 31470              e.umacron = 363;
 31471              e.umacroncyrillic = 1263;
 31472              e.umacrondieresis = 7803;
 31473              e.umatragurmukhi = 2625;
 31474              e.umonospace = 65365;
 31475              e.underscore = 95;
 31476              e.underscoredbl = 8215;
 31477              e.underscoremonospace = 65343;
 31478              e.underscorevertical = 65075;
 31479              e.underscorewavy = 65103;
 31480              e.union = 8746;
 31481              e.universal = 8704;
 31482              e.uogonek = 371;
 31483              e.uparen = 9392;
 31484              e.upblock = 9600;
 31485              e.upperdothebrew = 1476;
 31486              e.upsilon = 965;
 31487              e.upsilondieresis = 971;
 31488              e.upsilondieresistonos = 944;
 31489              e.upsilonlatin = 650;
 31490              e.upsilontonos = 973;
 31491              e.uptackbelowcmb = 797;
 31492              e.uptackmod = 724;
 31493              e.uragurmukhi = 2675;
 31494              e.uring = 367;
 31495              e.ushortcyrillic = 1118;
 31496              e.usmallhiragana = 12357;
 31497              e.usmallkatakana = 12453;
 31498              e.usmallkatakanahalfwidth = 65385;
 31499              e.ustraightcyrillic = 1199;
 31500              e.ustraightstrokecyrillic = 1201;
 31501              e.utilde = 361;
 31502              e.utildeacute = 7801;
 31503              e.utildebelow = 7797;
 31504              e.uubengali = 2442;
 31505              e.uudeva = 2314;
 31506              e.uugujarati = 2698;
 31507              e.uugurmukhi = 2570;
 31508              e.uumatragurmukhi = 2626;
 31509              e.uuvowelsignbengali = 2498;
 31510              e.uuvowelsigndeva = 2370;
 31511              e.uuvowelsigngujarati = 2754;
 31512              e.uvowelsignbengali = 2497;
 31513              e.uvowelsigndeva = 2369;
 31514              e.uvowelsigngujarati = 2753;
 31515              e.v = 118;
 31516              e.vadeva = 2357;
 31517              e.vagujarati = 2741;
 31518              e.vagurmukhi = 2613;
 31519              e.vakatakana = 12535;
 31520              e.vav = 1493;
 31521              e.vavdagesh = 64309;
 31522              e.vavdagesh65 = 64309;
 31523              e.vavdageshhebrew = 64309;
 31524              e.vavhebrew = 1493;
 31525              e.vavholam = 64331;
 31526              e.vavholamhebrew = 64331;
 31527              e.vavvavhebrew = 1520;
 31528              e.vavyodhebrew = 1521;
 31529              e.vcircle = 9445;
 31530              e.vdotbelow = 7807;
 31531              e.vecyrillic = 1074;
 31532              e.veharabic = 1700;
 31533              e.vehfinalarabic = 64363;
 31534              e.vehinitialarabic = 64364;
 31535              e.vehmedialarabic = 64365;
 31536              e.vekatakana = 12537;
 31537              e.venus = 9792;
 31538              e.verticalbar = 124;
 31539              e.verticallineabovecmb = 781;
 31540              e.verticallinebelowcmb = 809;
 31541              e.verticallinelowmod = 716;
 31542              e.verticallinemod = 712;
 31543              e.vewarmenian = 1406;
 31544              e.vhook = 651;
 31545              e.vikatakana = 12536;
 31546              e.viramabengali = 2509;
 31547              e.viramadeva = 2381;
 31548              e.viramagujarati = 2765;
 31549              e.visargabengali = 2435;
 31550              e.visargadeva = 2307;
 31551              e.visargagujarati = 2691;
 31552              e.vmonospace = 65366;
 31553              e.voarmenian = 1400;
 31554              e.voicediterationhiragana = 12446;
 31555              e.voicediterationkatakana = 12542;
 31556              e.voicedmarkkana = 12443;
 31557              e.voicedmarkkanahalfwidth = 65438;
 31558              e.vokatakana = 12538;
 31559              e.vparen = 9393;
 31560              e.vtilde = 7805;
 31561              e.vturned = 652;
 31562              e.vuhiragana = 12436;
 31563              e.vukatakana = 12532;
 31564              e.w = 119;
 31565              e.wacute = 7811;
 31566              e.waekorean = 12633;
 31567              e.wahiragana = 12431;
 31568              e.wakatakana = 12527;
 31569              e.wakatakanahalfwidth = 65436;
 31570              e.wakorean = 12632;
 31571              e.wasmallhiragana = 12430;
 31572              e.wasmallkatakana = 12526;
 31573              e.wattosquare = 13143;
 31574              e.wavedash = 12316;
 31575              e.wavyunderscorevertical = 65076;
 31576              e.wawarabic = 1608;
 31577              e.wawfinalarabic = 65262;
 31578              e.wawhamzaabovearabic = 1572;
 31579              e.wawhamzaabovefinalarabic = 65158;
 31580              e.wbsquare = 13277;
 31581              e.wcircle = 9446;
 31582              e.wcircumflex = 373;
 31583              e.wdieresis = 7813;
 31584              e.wdotaccent = 7815;
 31585              e.wdotbelow = 7817;
 31586              e.wehiragana = 12433;
 31587              e.weierstrass = 8472;
 31588              e.wekatakana = 12529;
 31589              e.wekorean = 12638;
 31590              e.weokorean = 12637;
 31591              e.wgrave = 7809;
 31592              e.whitebullet = 9702;
 31593              e.whitecircle = 9675;
 31594              e.whitecircleinverse = 9689;
 31595              e.whitecornerbracketleft = 12302;
 31596              e.whitecornerbracketleftvertical = 65091;
 31597              e.whitecornerbracketright = 12303;
 31598              e.whitecornerbracketrightvertical = 65092;
 31599              e.whitediamond = 9671;
 31600              e.whitediamondcontainingblacksmalldiamond = 9672;
 31601              e.whitedownpointingsmalltriangle = 9663;
 31602              e.whitedownpointingtriangle = 9661;
 31603              e.whiteleftpointingsmalltriangle = 9667;
 31604              e.whiteleftpointingtriangle = 9665;
 31605              e.whitelenticularbracketleft = 12310;
 31606              e.whitelenticularbracketright = 12311;
 31607              e.whiterightpointingsmalltriangle = 9657;
 31608              e.whiterightpointingtriangle = 9655;
 31609              e.whitesmallsquare = 9643;
 31610              e.whitesmilingface = 9786;
 31611              e.whitesquare = 9633;
 31612              e.whitestar = 9734;
 31613              e.whitetelephone = 9743;
 31614              e.whitetortoiseshellbracketleft = 12312;
 31615              e.whitetortoiseshellbracketright = 12313;
 31616              e.whiteuppointingsmalltriangle = 9653;
 31617              e.whiteuppointingtriangle = 9651;
 31618              e.wihiragana = 12432;
 31619              e.wikatakana = 12528;
 31620              e.wikorean = 12639;
 31621              e.wmonospace = 65367;
 31622              e.wohiragana = 12434;
 31623              e.wokatakana = 12530;
 31624              e.wokatakanahalfwidth = 65382;
 31625              e.won = 8361;
 31626              e.wonmonospace = 65510;
 31627              e.wowaenthai = 3623;
 31628              e.wparen = 9394;
 31629              e.wring = 7832;
 31630              e.wsuperior = 695;
 31631              e.wturned = 653;
 31632              e.wynn = 447;
 31633              e.x = 120;
 31634              e.xabovecmb = 829;
 31635              e.xbopomofo = 12562;
 31636              e.xcircle = 9447;
 31637              e.xdieresis = 7821;
 31638              e.xdotaccent = 7819;
 31639              e.xeharmenian = 1389;
 31640              e.xi = 958;
 31641              e.xmonospace = 65368;
 31642              e.xparen = 9395;
 31643              e.xsuperior = 739;
 31644              e.y = 121;
 31645              e.yaadosquare = 13134;
 31646              e.yabengali = 2479;
 31647              e.yacute = 253;
 31648              e.yadeva = 2351;
 31649              e.yaekorean = 12626;
 31650              e.yagujarati = 2735;
 31651              e.yagurmukhi = 2607;
 31652              e.yahiragana = 12420;
 31653              e.yakatakana = 12516;
 31654              e.yakatakanahalfwidth = 65428;
 31655              e.yakorean = 12625;
 31656              e.yamakkanthai = 3662;
 31657              e.yasmallhiragana = 12419;
 31658              e.yasmallkatakana = 12515;
 31659              e.yasmallkatakanahalfwidth = 65388;
 31660              e.yatcyrillic = 1123;
 31661              e.ycircle = 9448;
 31662              e.ycircumflex = 375;
 31663              e.ydieresis = 255;
 31664              e.ydotaccent = 7823;
 31665              e.ydotbelow = 7925;
 31666              e.yeharabic = 1610;
 31667              e.yehbarreearabic = 1746;
 31668              e.yehbarreefinalarabic = 64431;
 31669              e.yehfinalarabic = 65266;
 31670              e.yehhamzaabovearabic = 1574;
 31671              e.yehhamzaabovefinalarabic = 65162;
 31672              e.yehhamzaaboveinitialarabic = 65163;
 31673              e.yehhamzaabovemedialarabic = 65164;
 31674              e.yehinitialarabic = 65267;
 31675              e.yehmedialarabic = 65268;
 31676              e.yehmeeminitialarabic = 64733;
 31677              e.yehmeemisolatedarabic = 64600;
 31678              e.yehnoonfinalarabic = 64660;
 31679              e.yehthreedotsbelowarabic = 1745;
 31680              e.yekorean = 12630;
 31681              e.yen = 165;
 31682              e.yenmonospace = 65509;
 31683              e.yeokorean = 12629;
 31684              e.yeorinhieuhkorean = 12678;
 31685              e.yerahbenyomohebrew = 1450;
 31686              e.yerahbenyomolefthebrew = 1450;
 31687              e.yericyrillic = 1099;
 31688              e.yerudieresiscyrillic = 1273;
 31689              e.yesieungkorean = 12673;
 31690              e.yesieungpansioskorean = 12675;
 31691              e.yesieungsioskorean = 12674;
 31692              e.yetivhebrew = 1434;
 31693              e.ygrave = 7923;
 31694              e.yhook = 436;
 31695              e.yhookabove = 7927;
 31696              e.yiarmenian = 1397;
 31697              e.yicyrillic = 1111;
 31698              e.yikorean = 12642;
 31699              e.yinyang = 9775;
 31700              e.yiwnarmenian = 1410;
 31701              e.ymonospace = 65369;
 31702              e.yod = 1497;
 31703              e.yoddagesh = 64313;
 31704              e.yoddageshhebrew = 64313;
 31705              e.yodhebrew = 1497;
 31706              e.yodyodhebrew = 1522;
 31707              e.yodyodpatahhebrew = 64287;
 31708              e.yohiragana = 12424;
 31709              e.yoikorean = 12681;
 31710              e.yokatakana = 12520;
 31711              e.yokatakanahalfwidth = 65430;
 31712              e.yokorean = 12635;
 31713              e.yosmallhiragana = 12423;
 31714              e.yosmallkatakana = 12519;
 31715              e.yosmallkatakanahalfwidth = 65390;
 31716              e.yotgreek = 1011;
 31717              e.yoyaekorean = 12680;
 31718              e.yoyakorean = 12679;
 31719              e.yoyakthai = 3618;
 31720              e.yoyingthai = 3597;
 31721              e.yparen = 9396;
 31722              e.ypogegrammeni = 890;
 31723              e.ypogegrammenigreekcmb = 837;
 31724              e.yr = 422;
 31725              e.yring = 7833;
 31726              e.ysuperior = 696;
 31727              e.ytilde = 7929;
 31728              e.yturned = 654;
 31729              e.yuhiragana = 12422;
 31730              e.yuikorean = 12684;
 31731              e.yukatakana = 12518;
 31732              e.yukatakanahalfwidth = 65429;
 31733              e.yukorean = 12640;
 31734              e.yusbigcyrillic = 1131;
 31735              e.yusbigiotifiedcyrillic = 1133;
 31736              e.yuslittlecyrillic = 1127;
 31737              e.yuslittleiotifiedcyrillic = 1129;
 31738              e.yusmallhiragana = 12421;
 31739              e.yusmallkatakana = 12517;
 31740              e.yusmallkatakanahalfwidth = 65389;
 31741              e.yuyekorean = 12683;
 31742              e.yuyeokorean = 12682;
 31743              e.yyabengali = 2527;
 31744              e.yyadeva = 2399;
 31745              e.z = 122;
 31746              e.zaarmenian = 1382;
 31747              e.zacute = 378;
 31748              e.zadeva = 2395;
 31749              e.zagurmukhi = 2651;
 31750              e.zaharabic = 1592;
 31751              e.zahfinalarabic = 65222;
 31752              e.zahinitialarabic = 65223;
 31753              e.zahiragana = 12374;
 31754              e.zahmedialarabic = 65224;
 31755              e.zainarabic = 1586;
 31756              e.zainfinalarabic = 65200;
 31757              e.zakatakana = 12470;
 31758              e.zaqefgadolhebrew = 1429;
 31759              e.zaqefqatanhebrew = 1428;
 31760              e.zarqahebrew = 1432;
 31761              e.zayin = 1494;
 31762              e.zayindagesh = 64310;
 31763              e.zayindageshhebrew = 64310;
 31764              e.zayinhebrew = 1494;
 31765              e.zbopomofo = 12567;
 31766              e.zcaron = 382;
 31767              e.zcircle = 9449;
 31768              e.zcircumflex = 7825;
 31769              e.zcurl = 657;
 31770              e.zdot = 380;
 31771              e.zdotaccent = 380;
 31772              e.zdotbelow = 7827;
 31773              e.zecyrillic = 1079;
 31774              e.zedescendercyrillic = 1177;
 31775              e.zedieresiscyrillic = 1247;
 31776              e.zehiragana = 12380;
 31777              e.zekatakana = 12476;
 31778              e.zero = 48;
 31779              e.zeroarabic = 1632;
 31780              e.zerobengali = 2534;
 31781              e.zerodeva = 2406;
 31782              e.zerogujarati = 2790;
 31783              e.zerogurmukhi = 2662;
 31784              e.zerohackarabic = 1632;
 31785              e.zeroinferior = 8320;
 31786              e.zeromonospace = 65296;
 31787              e.zerooldstyle = 63280;
 31788              e.zeropersian = 1776;
 31789              e.zerosuperior = 8304;
 31790              e.zerothai = 3664;
 31791              e.zerowidthjoiner = 65279;
 31792              e.zerowidthnonjoiner = 8204;
 31793              e.zerowidthspace = 8203;
 31794              e.zeta = 950;
 31795              e.zhbopomofo = 12563;
 31796              e.zhearmenian = 1386;
 31797              e.zhebrevecyrillic = 1218;
 31798              e.zhecyrillic = 1078;
 31799              e.zhedescendercyrillic = 1175;
 31800              e.zhedieresiscyrillic = 1245;
 31801              e.zihiragana = 12376;
 31802              e.zikatakana = 12472;
 31803              e.zinorhebrew = 1454;
 31804              e.zlinebelow = 7829;
 31805              e.zmonospace = 65370;
 31806              e.zohiragana = 12382;
 31807              e.zokatakana = 12478;
 31808              e.zparen = 9397;
 31809              e.zretroflexhook = 656;
 31810              e.zstroke = 438;
 31811              e.zuhiragana = 12378;
 31812              e.zukatakana = 12474;
 31813              e[".notdef"] = 0;
 31814              e.angbracketleftbig = 9001;
 31815              e.angbracketleftBig = 9001;
 31816              e.angbracketleftbigg = 9001;
 31817              e.angbracketleftBigg = 9001;
 31818              e.angbracketrightBig = 9002;
 31819              e.angbracketrightbig = 9002;
 31820              e.angbracketrightBigg = 9002;
 31821              e.angbracketrightbigg = 9002;
 31822              e.arrowhookleft = 8618;
 31823              e.arrowhookright = 8617;
 31824              e.arrowlefttophalf = 8636;
 31825              e.arrowleftbothalf = 8637;
 31826              e.arrownortheast = 8599;
 31827              e.arrownorthwest = 8598;
 31828              e.arrowrighttophalf = 8640;
 31829              e.arrowrightbothalf = 8641;
 31830              e.arrowsoutheast = 8600;
 31831              e.arrowsouthwest = 8601;
 31832              e.backslashbig = 8726;
 31833              e.backslashBig = 8726;
 31834              e.backslashBigg = 8726;
 31835              e.backslashbigg = 8726;
 31836              e.bardbl = 8214;
 31837              e.bracehtipdownleft = 65079;
 31838              e.bracehtipdownright = 65079;
 31839              e.bracehtipupleft = 65080;
 31840              e.bracehtipupright = 65080;
 31841              e.braceleftBig = 123;
 31842              e.braceleftbig = 123;
 31843              e.braceleftbigg = 123;
 31844              e.braceleftBigg = 123;
 31845              e.bracerightBig = 125;
 31846              e.bracerightbig = 125;
 31847              e.bracerightbigg = 125;
 31848              e.bracerightBigg = 125;
 31849              e.bracketleftbig = 91;
 31850              e.bracketleftBig = 91;
 31851              e.bracketleftbigg = 91;
 31852              e.bracketleftBigg = 91;
 31853              e.bracketrightBig = 93;
 31854              e.bracketrightbig = 93;
 31855              e.bracketrightbigg = 93;
 31856              e.bracketrightBigg = 93;
 31857              e.ceilingleftbig = 8968;
 31858              e.ceilingleftBig = 8968;
 31859              e.ceilingleftBigg = 8968;
 31860              e.ceilingleftbigg = 8968;
 31861              e.ceilingrightbig = 8969;
 31862              e.ceilingrightBig = 8969;
 31863              e.ceilingrightbigg = 8969;
 31864              e.ceilingrightBigg = 8969;
 31865              e.circledotdisplay = 8857;
 31866              e.circledottext = 8857;
 31867              e.circlemultiplydisplay = 8855;
 31868              e.circlemultiplytext = 8855;
 31869              e.circleplusdisplay = 8853;
 31870              e.circleplustext = 8853;
 31871              e.contintegraldisplay = 8750;
 31872              e.contintegraltext = 8750;
 31873              e.coproductdisplay = 8720;
 31874              e.coproducttext = 8720;
 31875              e.floorleftBig = 8970;
 31876              e.floorleftbig = 8970;
 31877              e.floorleftbigg = 8970;
 31878              e.floorleftBigg = 8970;
 31879              e.floorrightbig = 8971;
 31880              e.floorrightBig = 8971;
 31881              e.floorrightBigg = 8971;
 31882              e.floorrightbigg = 8971;
 31883              e.hatwide = 770;
 31884              e.hatwider = 770;
 31885              e.hatwidest = 770;
 31886              e.intercal = 7488;
 31887              e.integraldisplay = 8747;
 31888              e.integraltext = 8747;
 31889              e.intersectiondisplay = 8898;
 31890              e.intersectiontext = 8898;
 31891              e.logicalanddisplay = 8743;
 31892              e.logicalandtext = 8743;
 31893              e.logicalordisplay = 8744;
 31894              e.logicalortext = 8744;
 31895              e.parenleftBig = 40;
 31896              e.parenleftbig = 40;
 31897              e.parenleftBigg = 40;
 31898              e.parenleftbigg = 40;
 31899              e.parenrightBig = 41;
 31900              e.parenrightbig = 41;
 31901              e.parenrightBigg = 41;
 31902              e.parenrightbigg = 41;
 31903              e.prime = 8242;
 31904              e.productdisplay = 8719;
 31905              e.producttext = 8719;
 31906              e.radicalbig = 8730;
 31907              e.radicalBig = 8730;
 31908              e.radicalBigg = 8730;
 31909              e.radicalbigg = 8730;
 31910              e.radicalbt = 8730;
 31911              e.radicaltp = 8730;
 31912              e.radicalvertex = 8730;
 31913              e.slashbig = 47;
 31914              e.slashBig = 47;
 31915              e.slashBigg = 47;
 31916              e.slashbigg = 47;
 31917              e.summationdisplay = 8721;
 31918              e.summationtext = 8721;
 31919              e.tildewide = 732;
 31920              e.tildewider = 732;
 31921              e.tildewidest = 732;
 31922              e.uniondisplay = 8899;
 31923              e.unionmultidisplay = 8846;
 31924              e.unionmultitext = 8846;
 31925              e.unionsqdisplay = 8852;
 31926              e.unionsqtext = 8852;
 31927              e.uniontext = 8899;
 31928              e.vextenddouble = 8741;
 31929              e.vextendsingle = 8739;
 31930            });
 31931            t.getGlyphsUnicode = n;
 31932            const i = (0, r.getLookupTableFactory)(function (e) {
 31933              e.space = 32;
 31934              e.a1 = 9985;
 31935              e.a2 = 9986;
 31936              e.a202 = 9987;
 31937              e.a3 = 9988;
 31938              e.a4 = 9742;
 31939              e.a5 = 9990;
 31940              e.a119 = 9991;
 31941              e.a118 = 9992;
 31942              e.a117 = 9993;
 31943              e.a11 = 9755;
 31944              e.a12 = 9758;
 31945              e.a13 = 9996;
 31946              e.a14 = 9997;
 31947              e.a15 = 9998;
 31948              e.a16 = 9999;
 31949              e.a105 = 1e4;
 31950              e.a17 = 10001;
 31951              e.a18 = 10002;
 31952              e.a19 = 10003;
 31953              e.a20 = 10004;
 31954              e.a21 = 10005;
 31955              e.a22 = 10006;
 31956              e.a23 = 10007;
 31957              e.a24 = 10008;
 31958              e.a25 = 10009;
 31959              e.a26 = 10010;
 31960              e.a27 = 10011;
 31961              e.a28 = 10012;
 31962              e.a6 = 10013;
 31963              e.a7 = 10014;
 31964              e.a8 = 10015;
 31965              e.a9 = 10016;
 31966              e.a10 = 10017;
 31967              e.a29 = 10018;
 31968              e.a30 = 10019;
 31969              e.a31 = 10020;
 31970              e.a32 = 10021;
 31971              e.a33 = 10022;
 31972              e.a34 = 10023;
 31973              e.a35 = 9733;
 31974              e.a36 = 10025;
 31975              e.a37 = 10026;
 31976              e.a38 = 10027;
 31977              e.a39 = 10028;
 31978              e.a40 = 10029;
 31979              e.a41 = 10030;
 31980              e.a42 = 10031;
 31981              e.a43 = 10032;
 31982              e.a44 = 10033;
 31983              e.a45 = 10034;
 31984              e.a46 = 10035;
 31985              e.a47 = 10036;
 31986              e.a48 = 10037;
 31987              e.a49 = 10038;
 31988              e.a50 = 10039;
 31989              e.a51 = 10040;
 31990              e.a52 = 10041;
 31991              e.a53 = 10042;
 31992              e.a54 = 10043;
 31993              e.a55 = 10044;
 31994              e.a56 = 10045;
 31995              e.a57 = 10046;
 31996              e.a58 = 10047;
 31997              e.a59 = 10048;
 31998              e.a60 = 10049;
 31999              e.a61 = 10050;
 32000              e.a62 = 10051;
 32001              e.a63 = 10052;
 32002              e.a64 = 10053;
 32003              e.a65 = 10054;
 32004              e.a66 = 10055;
 32005              e.a67 = 10056;
 32006              e.a68 = 10057;
 32007              e.a69 = 10058;
 32008              e.a70 = 10059;
 32009              e.a71 = 9679;
 32010              e.a72 = 10061;
 32011              e.a73 = 9632;
 32012              e.a74 = 10063;
 32013              e.a203 = 10064;
 32014              e.a75 = 10065;
 32015              e.a204 = 10066;
 32016              e.a76 = 9650;
 32017              e.a77 = 9660;
 32018              e.a78 = 9670;
 32019              e.a79 = 10070;
 32020              e.a81 = 9687;
 32021              e.a82 = 10072;
 32022              e.a83 = 10073;
 32023              e.a84 = 10074;
 32024              e.a97 = 10075;
 32025              e.a98 = 10076;
 32026              e.a99 = 10077;
 32027              e.a100 = 10078;
 32028              e.a101 = 10081;
 32029              e.a102 = 10082;
 32030              e.a103 = 10083;
 32031              e.a104 = 10084;
 32032              e.a106 = 10085;
 32033              e.a107 = 10086;
 32034              e.a108 = 10087;
 32035              e.a112 = 9827;
 32036              e.a111 = 9830;
 32037              e.a110 = 9829;
 32038              e.a109 = 9824;
 32039              e.a120 = 9312;
 32040              e.a121 = 9313;
 32041              e.a122 = 9314;
 32042              e.a123 = 9315;
 32043              e.a124 = 9316;
 32044              e.a125 = 9317;
 32045              e.a126 = 9318;
 32046              e.a127 = 9319;
 32047              e.a128 = 9320;
 32048              e.a129 = 9321;
 32049              e.a130 = 10102;
 32050              e.a131 = 10103;
 32051              e.a132 = 10104;
 32052              e.a133 = 10105;
 32053              e.a134 = 10106;
 32054              e.a135 = 10107;
 32055              e.a136 = 10108;
 32056              e.a137 = 10109;
 32057              e.a138 = 10110;
 32058              e.a139 = 10111;
 32059              e.a140 = 10112;
 32060              e.a141 = 10113;
 32061              e.a142 = 10114;
 32062              e.a143 = 10115;
 32063              e.a144 = 10116;
 32064              e.a145 = 10117;
 32065              e.a146 = 10118;
 32066              e.a147 = 10119;
 32067              e.a148 = 10120;
 32068              e.a149 = 10121;
 32069              e.a150 = 10122;
 32070              e.a151 = 10123;
 32071              e.a152 = 10124;
 32072              e.a153 = 10125;
 32073              e.a154 = 10126;
 32074              e.a155 = 10127;
 32075              e.a156 = 10128;
 32076              e.a157 = 10129;
 32077              e.a158 = 10130;
 32078              e.a159 = 10131;
 32079              e.a160 = 10132;
 32080              e.a161 = 8594;
 32081              e.a163 = 8596;
 32082              e.a164 = 8597;
 32083              e.a196 = 10136;
 32084              e.a165 = 10137;
 32085              e.a192 = 10138;
 32086              e.a166 = 10139;
 32087              e.a167 = 10140;
 32088              e.a168 = 10141;
 32089              e.a169 = 10142;
 32090              e.a170 = 10143;
 32091              e.a171 = 10144;
 32092              e.a172 = 10145;
 32093              e.a173 = 10146;
 32094              e.a162 = 10147;
 32095              e.a174 = 10148;
 32096              e.a175 = 10149;
 32097              e.a176 = 10150;
 32098              e.a177 = 10151;
 32099              e.a178 = 10152;
 32100              e.a179 = 10153;
 32101              e.a193 = 10154;
 32102              e.a180 = 10155;
 32103              e.a199 = 10156;
 32104              e.a181 = 10157;
 32105              e.a200 = 10158;
 32106              e.a182 = 10159;
 32107              e.a201 = 10161;
 32108              e.a183 = 10162;
 32109              e.a184 = 10163;
 32110              e.a197 = 10164;
 32111              e.a185 = 10165;
 32112              e.a194 = 10166;
 32113              e.a198 = 10167;
 32114              e.a186 = 10168;
 32115              e.a195 = 10169;
 32116              e.a187 = 10170;
 32117              e.a188 = 10171;
 32118              e.a189 = 10172;
 32119              e.a190 = 10173;
 32120              e.a191 = 10174;
 32121              e.a89 = 10088;
 32122              e.a90 = 10089;
 32123              e.a93 = 10090;
 32124              e.a94 = 10091;
 32125              e.a91 = 10092;
 32126              e.a92 = 10093;
 32127              e.a205 = 10094;
 32128              e.a85 = 10095;
 32129              e.a206 = 10096;
 32130              e.a86 = 10097;
 32131              e.a87 = 10098;
 32132              e.a88 = 10099;
 32133              e.a95 = 10100;
 32134              e.a96 = 10101;
 32135              e[".notdef"] = 0;
 32136            });
 32137            t.getDingbatsGlyphsUnicode = i;
 32138          },
 32139          (e, t, a) => {
 32140            Object.defineProperty(t, "__esModule", { value: !0 });
 32141            t.clearUnicodeCaches = function clearUnicodeCaches() {
 32142              s.clear();
 32143            };
 32144            t.getCharUnicodeCategory = function getCharUnicodeCategory(e) {
 32145              const t = s.get(e);
 32146              if (t) return t;
 32147              const a = e.match(i),
 32148                r = {
 32149                  isWhitespace: !!a?.[1],
 32150                  isZeroWidthDiacritic: !!a?.[2],
 32151                  isInvisibleFormatMark: !!a?.[3],
 32152                };
 32153              s.set(e, r);
 32154              return r;
 32155            };
 32156            t.getUnicodeForGlyph = function getUnicodeForGlyph(e, t) {
 32157              let a = t[e];
 32158              if (void 0 !== a) return a;
 32159              if (!e) return -1;
 32160              if ("u" === e[0]) {
 32161                const t = e.length;
 32162                let r;
 32163                if (7 === t && "n" === e[1] && "i" === e[2]) r = e.substring(3);
 32164                else {
 32165                  if (!(t >= 5 && t <= 7)) return -1;
 32166                  r = e.substring(1);
 32167                }
 32168                if (r === r.toUpperCase()) {
 32169                  a = parseInt(r, 16);
 32170                  if (a >= 0) return a;
 32171                }
 32172              }
 32173              return -1;
 32174            };
 32175            t.getUnicodeRangeFor = function getUnicodeRangeFor(e, t = -1) {
 32176              if (-1 !== t) {
 32177                const a = n[t];
 32178                for (let r = 0, n = a.length; r < n; r += 2)
 32179                  if (e >= a[r] && e <= a[r + 1]) return t;
 32180              }
 32181              for (let t = 0, a = n.length; t < a; t++) {
 32182                const a = n[t];
 32183                for (let r = 0, n = a.length; r < n; r += 2)
 32184                  if (e >= a[r] && e <= a[r + 1]) return t;
 32185              }
 32186              return -1;
 32187            };
 32188            t.mapSpecialUnicodeValues = function mapSpecialUnicodeValues(e) {
 32189              if (e >= 65520 && e <= 65535) return 0;
 32190              if (e >= 62976 && e <= 63743) return r()[e] || e;
 32191              if (173 === e) return 45;
 32192              return e;
 32193            };
 32194            const r = (0, a(3).getLookupTableFactory)(function (e) {
 32195              e[63721] = 169;
 32196              e[63193] = 169;
 32197              e[63720] = 174;
 32198              e[63194] = 174;
 32199              e[63722] = 8482;
 32200              e[63195] = 8482;
 32201              e[63729] = 9127;
 32202              e[63730] = 9128;
 32203              e[63731] = 9129;
 32204              e[63740] = 9131;
 32205              e[63741] = 9132;
 32206              e[63742] = 9133;
 32207              e[63726] = 9121;
 32208              e[63727] = 9122;
 32209              e[63728] = 9123;
 32210              e[63737] = 9124;
 32211              e[63738] = 9125;
 32212              e[63739] = 9126;
 32213              e[63723] = 9115;
 32214              e[63724] = 9116;
 32215              e[63725] = 9117;
 32216              e[63734] = 9118;
 32217              e[63735] = 9119;
 32218              e[63736] = 9120;
 32219            });
 32220            const n = [
 32221              [0, 127],
 32222              [128, 255],
 32223              [256, 383],
 32224              [384, 591],
 32225              [592, 687, 7424, 7551, 7552, 7615],
 32226              [688, 767, 42752, 42783],
 32227              [768, 879, 7616, 7679],
 32228              [880, 1023],
 32229              [11392, 11519],
 32230              [1024, 1279, 1280, 1327, 11744, 11775, 42560, 42655],
 32231              [1328, 1423],
 32232              [1424, 1535],
 32233              [42240, 42559],
 32234              [1536, 1791, 1872, 1919],
 32235              [1984, 2047],
 32236              [2304, 2431],
 32237              [2432, 2559],
 32238              [2560, 2687],
 32239              [2688, 2815],
 32240              [2816, 2943],
 32241              [2944, 3071],
 32242              [3072, 3199],
 32243              [3200, 3327],
 32244              [3328, 3455],
 32245              [3584, 3711],
 32246              [3712, 3839],
 32247              [4256, 4351, 11520, 11567],
 32248              [6912, 7039],
 32249              [4352, 4607],
 32250              [7680, 7935, 11360, 11391, 42784, 43007],
 32251              [7936, 8191],
 32252              [8192, 8303, 11776, 11903],
 32253              [8304, 8351],
 32254              [8352, 8399],
 32255              [8400, 8447],
 32256              [8448, 8527],
 32257              [8528, 8591],
 32258              [8592, 8703, 10224, 10239, 10496, 10623, 11008, 11263],
 32259              [8704, 8959, 10752, 11007, 10176, 10223, 10624, 10751],
 32260              [8960, 9215],
 32261              [9216, 9279],
 32262              [9280, 9311],
 32263              [9312, 9471],
 32264              [9472, 9599],
 32265              [9600, 9631],
 32266              [9632, 9727],
 32267              [9728, 9983],
 32268              [9984, 10175],
 32269              [12288, 12351],
 32270              [12352, 12447],
 32271              [12448, 12543, 12784, 12799],
 32272              [12544, 12591, 12704, 12735],
 32273              [12592, 12687],
 32274              [43072, 43135],
 32275              [12800, 13055],
 32276              [13056, 13311],
 32277              [44032, 55215],
 32278              [55296, 57343],
 32279              [67840, 67871],
 32280              [
 32281                19968, 40959, 11904, 12031, 12032, 12255, 12272, 12287, 13312,
 32282                19903, 131072, 173791, 12688, 12703,
 32283              ],
 32284              [57344, 63743],
 32285              [12736, 12783, 63744, 64255, 194560, 195103],
 32286              [64256, 64335],
 32287              [64336, 65023],
 32288              [65056, 65071],
 32289              [65040, 65055],
 32290              [65104, 65135],
 32291              [65136, 65279],
 32292              [65280, 65519],
 32293              [65520, 65535],
 32294              [3840, 4095],
 32295              [1792, 1871],
 32296              [1920, 1983],
 32297              [3456, 3583],
 32298              [4096, 4255],
 32299              [4608, 4991, 4992, 5023, 11648, 11743],
 32300              [5024, 5119],
 32301              [5120, 5759],
 32302              [5760, 5791],
 32303              [5792, 5887],
 32304              [6016, 6143],
 32305              [6144, 6319],
 32306              [10240, 10495],
 32307              [40960, 42127],
 32308              [5888, 5919, 5920, 5951, 5952, 5983, 5984, 6015],
 32309              [66304, 66351],
 32310              [66352, 66383],
 32311              [66560, 66639],
 32312              [118784, 119039, 119040, 119295, 119296, 119375],
 32313              [119808, 120831],
 32314              [1044480, 1048573],
 32315              [65024, 65039, 917760, 917999],
 32316              [917504, 917631],
 32317              [6400, 6479],
 32318              [6480, 6527],
 32319              [6528, 6623],
 32320              [6656, 6687],
 32321              [11264, 11359],
 32322              [11568, 11647],
 32323              [19904, 19967],
 32324              [43008, 43055],
 32325              [65536, 65663, 65664, 65791, 65792, 65855],
 32326              [65856, 65935],
 32327              [66432, 66463],
 32328              [66464, 66527],
 32329              [66640, 66687],
 32330              [66688, 66735],
 32331              [67584, 67647],
 32332              [68096, 68191],
 32333              [119552, 119647],
 32334              [73728, 74751, 74752, 74879],
 32335              [119648, 119679],
 32336              [7040, 7103],
 32337              [7168, 7247],
 32338              [7248, 7295],
 32339              [43136, 43231],
 32340              [43264, 43311],
 32341              [43312, 43359],
 32342              [43520, 43615],
 32343              [65936, 65999],
 32344              [66e3, 66047],
 32345              [66208, 66271, 66176, 66207, 67872, 67903],
 32346              [127024, 127135, 126976, 127023],
 32347            ];
 32348            const i = new RegExp("^(\\s)|(\\p{Mn})|(\\p{Cf})$", "u"),
 32349              s = new Map();
 32350          },
 32351          (e, t, a) => {
 32352            Object.defineProperty(t, "__esModule", { value: !0 });
 32353            t.getSerifFonts =
 32354              t.getNonStdFontMap =
 32355              t.getGlyphMapForStandardFonts =
 32356              t.getFontNameToFileMap =
 32357                void 0;
 32358            t.getStandardFontName = function getStandardFontName(e) {
 32359              const t = (0, n.normalizeFontName)(e);
 32360              return i()[t];
 32361            };
 32362            t.getSymbolsFonts =
 32363              t.getSupplementalGlyphMapForCalibri =
 32364              t.getSupplementalGlyphMapForArialBlack =
 32365              t.getStdFontMap =
 32366                void 0;
 32367            t.isKnownFontName = function isKnownFontName(e) {
 32368              const t = (0, n.normalizeFontName)(e);
 32369              return !!(i()[t] || o()[t] || c()[t] || l()[t]);
 32370            };
 32371            var r = a(3),
 32372              n = a(38);
 32373            const i = (0, r.getLookupTableFactory)(function (e) {
 32374              e["Times-Roman"] = "Times-Roman";
 32375              e.Helvetica = "Helvetica";
 32376              e.Courier = "Courier";
 32377              e.Symbol = "Symbol";
 32378              e["Times-Bold"] = "Times-Bold";
 32379              e["Helvetica-Bold"] = "Helvetica-Bold";
 32380              e["Courier-Bold"] = "Courier-Bold";
 32381              e.ZapfDingbats = "ZapfDingbats";
 32382              e["Times-Italic"] = "Times-Italic";
 32383              e["Helvetica-Oblique"] = "Helvetica-Oblique";
 32384              e["Courier-Oblique"] = "Courier-Oblique";
 32385              e["Times-BoldItalic"] = "Times-BoldItalic";
 32386              e["Helvetica-BoldOblique"] = "Helvetica-BoldOblique";
 32387              e["Courier-BoldOblique"] = "Courier-BoldOblique";
 32388              e.ArialNarrow = "Helvetica";
 32389              e["ArialNarrow-Bold"] = "Helvetica-Bold";
 32390              e["ArialNarrow-BoldItalic"] = "Helvetica-BoldOblique";
 32391              e["ArialNarrow-Italic"] = "Helvetica-Oblique";
 32392              e.ArialBlack = "Helvetica";
 32393              e["ArialBlack-Bold"] = "Helvetica-Bold";
 32394              e["ArialBlack-BoldItalic"] = "Helvetica-BoldOblique";
 32395              e["ArialBlack-Italic"] = "Helvetica-Oblique";
 32396              e["Arial-Black"] = "Helvetica";
 32397              e["Arial-Black-Bold"] = "Helvetica-Bold";
 32398              e["Arial-Black-BoldItalic"] = "Helvetica-BoldOblique";
 32399              e["Arial-Black-Italic"] = "Helvetica-Oblique";
 32400              e.Arial = "Helvetica";
 32401              e["Arial-Bold"] = "Helvetica-Bold";
 32402              e["Arial-BoldItalic"] = "Helvetica-BoldOblique";
 32403              e["Arial-Italic"] = "Helvetica-Oblique";
 32404              e.ArialMT = "Helvetica";
 32405              e["Arial-BoldItalicMT"] = "Helvetica-BoldOblique";
 32406              e["Arial-BoldMT"] = "Helvetica-Bold";
 32407              e["Arial-ItalicMT"] = "Helvetica-Oblique";
 32408              e["Arial-BoldItalicMT-BoldItalic"] = "Helvetica-BoldOblique";
 32409              e["Arial-BoldMT-Bold"] = "Helvetica-Bold";
 32410              e["Arial-ItalicMT-Italic"] = "Helvetica-Oblique";
 32411              e.ArialUnicodeMS = "Helvetica";
 32412              e["ArialUnicodeMS-Bold"] = "Helvetica-Bold";
 32413              e["ArialUnicodeMS-BoldItalic"] = "Helvetica-BoldOblique";
 32414              e["ArialUnicodeMS-Italic"] = "Helvetica-Oblique";
 32415              e["Courier-BoldItalic"] = "Courier-BoldOblique";
 32416              e["Courier-Italic"] = "Courier-Oblique";
 32417              e.CourierNew = "Courier";
 32418              e["CourierNew-Bold"] = "Courier-Bold";
 32419              e["CourierNew-BoldItalic"] = "Courier-BoldOblique";
 32420              e["CourierNew-Italic"] = "Courier-Oblique";
 32421              e["CourierNewPS-BoldItalicMT"] = "Courier-BoldOblique";
 32422              e["CourierNewPS-BoldMT"] = "Courier-Bold";
 32423              e["CourierNewPS-ItalicMT"] = "Courier-Oblique";
 32424              e.CourierNewPSMT = "Courier";
 32425              e["Helvetica-BoldItalic"] = "Helvetica-BoldOblique";
 32426              e["Helvetica-Italic"] = "Helvetica-Oblique";
 32427              e["Symbol-Bold"] = "Symbol";
 32428              e["Symbol-BoldItalic"] = "Symbol";
 32429              e["Symbol-Italic"] = "Symbol";
 32430              e.TimesNewRoman = "Times-Roman";
 32431              e["TimesNewRoman-Bold"] = "Times-Bold";
 32432              e["TimesNewRoman-BoldItalic"] = "Times-BoldItalic";
 32433              e["TimesNewRoman-Italic"] = "Times-Italic";
 32434              e.TimesNewRomanPS = "Times-Roman";
 32435              e["TimesNewRomanPS-Bold"] = "Times-Bold";
 32436              e["TimesNewRomanPS-BoldItalic"] = "Times-BoldItalic";
 32437              e["TimesNewRomanPS-BoldItalicMT"] = "Times-BoldItalic";
 32438              e["TimesNewRomanPS-BoldMT"] = "Times-Bold";
 32439              e["TimesNewRomanPS-Italic"] = "Times-Italic";
 32440              e["TimesNewRomanPS-ItalicMT"] = "Times-Italic";
 32441              e.TimesNewRomanPSMT = "Times-Roman";
 32442              e["TimesNewRomanPSMT-Bold"] = "Times-Bold";
 32443              e["TimesNewRomanPSMT-BoldItalic"] = "Times-BoldItalic";
 32444              e["TimesNewRomanPSMT-Italic"] = "Times-Italic";
 32445            });
 32446            t.getStdFontMap = i;
 32447            const s = (0, r.getLookupTableFactory)(function (e) {
 32448              e.Courier = "FoxitFixed.pfb";
 32449              e["Courier-Bold"] = "FoxitFixedBold.pfb";
 32450              e["Courier-BoldOblique"] = "FoxitFixedBoldItalic.pfb";
 32451              e["Courier-Oblique"] = "FoxitFixedItalic.pfb";
 32452              e.Helvetica = "LiberationSans-Regular.ttf";
 32453              e["Helvetica-Bold"] = "LiberationSans-Bold.ttf";
 32454              e["Helvetica-BoldOblique"] = "LiberationSans-BoldItalic.ttf";
 32455              e["Helvetica-Oblique"] = "LiberationSans-Italic.ttf";
 32456              e["Times-Roman"] = "FoxitSerif.pfb";
 32457              e["Times-Bold"] = "FoxitSerifBold.pfb";
 32458              e["Times-BoldItalic"] = "FoxitSerifBoldItalic.pfb";
 32459              e["Times-Italic"] = "FoxitSerifItalic.pfb";
 32460              e.Symbol = "FoxitSymbol.pfb";
 32461              e.ZapfDingbats = "FoxitDingbats.pfb";
 32462              e["LiberationSans-Regular"] = "LiberationSans-Regular.ttf";
 32463              e["LiberationSans-Bold"] = "LiberationSans-Bold.ttf";
 32464              e["LiberationSans-Italic"] = "LiberationSans-Italic.ttf";
 32465              e["LiberationSans-BoldItalic"] = "LiberationSans-BoldItalic.ttf";
 32466            });
 32467            t.getFontNameToFileMap = s;
 32468            const o = (0, r.getLookupTableFactory)(function (e) {
 32469              e.Calibri = "Helvetica";
 32470              e["Calibri-Bold"] = "Helvetica-Bold";
 32471              e["Calibri-BoldItalic"] = "Helvetica-BoldOblique";
 32472              e["Calibri-Italic"] = "Helvetica-Oblique";
 32473              e.CenturyGothic = "Helvetica";
 32474              e["CenturyGothic-Bold"] = "Helvetica-Bold";
 32475              e["CenturyGothic-BoldItalic"] = "Helvetica-BoldOblique";
 32476              e["CenturyGothic-Italic"] = "Helvetica-Oblique";
 32477              e.ComicSansMS = "Comic Sans MS";
 32478              e["ComicSansMS-Bold"] = "Comic Sans MS-Bold";
 32479              e["ComicSansMS-BoldItalic"] = "Comic Sans MS-BoldItalic";
 32480              e["ComicSansMS-Italic"] = "Comic Sans MS-Italic";
 32481              e.Impact = "Helvetica";
 32482              e["ItcSymbol-Bold"] = "Helvetica-Bold";
 32483              e["ItcSymbol-BoldItalic"] = "Helvetica-BoldOblique";
 32484              e["ItcSymbol-Book"] = "Helvetica";
 32485              e["ItcSymbol-BookItalic"] = "Helvetica-Oblique";
 32486              e["ItcSymbol-Medium"] = "Helvetica";
 32487              e["ItcSymbol-MediumItalic"] = "Helvetica-Oblique";
 32488              e.LucidaConsole = "Courier";
 32489              e["LucidaConsole-Bold"] = "Courier-Bold";
 32490              e["LucidaConsole-BoldItalic"] = "Courier-BoldOblique";
 32491              e["LucidaConsole-Italic"] = "Courier-Oblique";
 32492              e["LucidaSans-Demi"] = "Helvetica-Bold";
 32493              e["MS-Gothic"] = "MS Gothic";
 32494              e["MS-Gothic-Bold"] = "MS Gothic-Bold";
 32495              e["MS-Gothic-BoldItalic"] = "MS Gothic-BoldItalic";
 32496              e["MS-Gothic-Italic"] = "MS Gothic-Italic";
 32497              e["MS-Mincho"] = "MS Mincho";
 32498              e["MS-Mincho-Bold"] = "MS Mincho-Bold";
 32499              e["MS-Mincho-BoldItalic"] = "MS Mincho-BoldItalic";
 32500              e["MS-Mincho-Italic"] = "MS Mincho-Italic";
 32501              e["MS-PGothic"] = "MS PGothic";
 32502              e["MS-PGothic-Bold"] = "MS PGothic-Bold";
 32503              e["MS-PGothic-BoldItalic"] = "MS PGothic-BoldItalic";
 32504              e["MS-PGothic-Italic"] = "MS PGothic-Italic";
 32505              e["MS-PMincho"] = "MS PMincho";
 32506              e["MS-PMincho-Bold"] = "MS PMincho-Bold";
 32507              e["MS-PMincho-BoldItalic"] = "MS PMincho-BoldItalic";
 32508              e["MS-PMincho-Italic"] = "MS PMincho-Italic";
 32509              e.NuptialScript = "Times-Italic";
 32510              e.SegoeUISymbol = "Helvetica";
 32511            });
 32512            t.getNonStdFontMap = o;
 32513            const c = (0, r.getLookupTableFactory)(function (e) {
 32514              e["Adobe Jenson"] = !0;
 32515              e["Adobe Text"] = !0;
 32516              e.Albertus = !0;
 32517              e.Aldus = !0;
 32518              e.Alexandria = !0;
 32519              e.Algerian = !0;
 32520              e["American Typewriter"] = !0;
 32521              e.Antiqua = !0;
 32522              e.Apex = !0;
 32523              e.Arno = !0;
 32524              e.Aster = !0;
 32525              e.Aurora = !0;
 32526              e.Baskerville = !0;
 32527              e.Bell = !0;
 32528              e.Bembo = !0;
 32529              e["Bembo Schoolbook"] = !0;
 32530              e.Benguiat = !0;
 32531              e["Berkeley Old Style"] = !0;
 32532              e["Bernhard Modern"] = !0;
 32533              e["Berthold City"] = !0;
 32534              e.Bodoni = !0;
 32535              e["Bauer Bodoni"] = !0;
 32536              e["Book Antiqua"] = !0;
 32537              e.Bookman = !0;
 32538              e["Bordeaux Roman"] = !0;
 32539              e["Californian FB"] = !0;
 32540              e.Calisto = !0;
 32541              e.Calvert = !0;
 32542              e.Capitals = !0;
 32543              e.Cambria = !0;
 32544              e.Cartier = !0;
 32545              e.Caslon = !0;
 32546              e.Catull = !0;
 32547              e.Centaur = !0;
 32548              e["Century Old Style"] = !0;
 32549              e["Century Schoolbook"] = !0;
 32550              e.Chaparral = !0;
 32551              e["Charis SIL"] = !0;
 32552              e.Cheltenham = !0;
 32553              e["Cholla Slab"] = !0;
 32554              e.Clarendon = !0;
 32555              e.Clearface = !0;
 32556              e.Cochin = !0;
 32557              e.Colonna = !0;
 32558              e["Computer Modern"] = !0;
 32559              e["Concrete Roman"] = !0;
 32560              e.Constantia = !0;
 32561              e["Cooper Black"] = !0;
 32562              e.Corona = !0;
 32563              e.Ecotype = !0;
 32564              e.Egyptienne = !0;
 32565              e.Elephant = !0;
 32566              e.Excelsior = !0;
 32567              e.Fairfield = !0;
 32568              e["FF Scala"] = !0;
 32569              e.Folkard = !0;
 32570              e.Footlight = !0;
 32571              e.FreeSerif = !0;
 32572              e["Friz Quadrata"] = !0;
 32573              e.Garamond = !0;
 32574              e.Gentium = !0;
 32575              e.Georgia = !0;
 32576              e.Gloucester = !0;
 32577              e["Goudy Old Style"] = !0;
 32578              e["Goudy Schoolbook"] = !0;
 32579              e["Goudy Pro Font"] = !0;
 32580              e.Granjon = !0;
 32581              e["Guardian Egyptian"] = !0;
 32582              e.Heather = !0;
 32583              e.Hercules = !0;
 32584              e["High Tower Text"] = !0;
 32585              e.Hiroshige = !0;
 32586              e["Hoefler Text"] = !0;
 32587              e["Humana Serif"] = !0;
 32588              e.Imprint = !0;
 32589              e["Ionic No. 5"] = !0;
 32590              e.Janson = !0;
 32591              e.Joanna = !0;
 32592              e.Korinna = !0;
 32593              e.Lexicon = !0;
 32594              e.LiberationSerif = !0;
 32595              e["Liberation Serif"] = !0;
 32596              e["Linux Libertine"] = !0;
 32597              e.Literaturnaya = !0;
 32598              e.Lucida = !0;
 32599              e["Lucida Bright"] = !0;
 32600              e.Melior = !0;
 32601              e.Memphis = !0;
 32602              e.Miller = !0;
 32603              e.Minion = !0;
 32604              e.Modern = !0;
 32605              e["Mona Lisa"] = !0;
 32606              e["Mrs Eaves"] = !0;
 32607              e["MS Serif"] = !0;
 32608              e["Museo Slab"] = !0;
 32609              e["New York"] = !0;
 32610              e["Nimbus Roman"] = !0;
 32611              e["NPS Rawlinson Roadway"] = !0;
 32612              e.NuptialScript = !0;
 32613              e.Palatino = !0;
 32614              e.Perpetua = !0;
 32615              e.Plantin = !0;
 32616              e["Plantin Schoolbook"] = !0;
 32617              e.Playbill = !0;
 32618              e["Poor Richard"] = !0;
 32619              e["Rawlinson Roadway"] = !0;
 32620              e.Renault = !0;
 32621              e.Requiem = !0;
 32622              e.Rockwell = !0;
 32623              e.Roman = !0;
 32624              e["Rotis Serif"] = !0;
 32625              e.Sabon = !0;
 32626              e.Scala = !0;
 32627              e.Seagull = !0;
 32628              e.Sistina = !0;
 32629              e.Souvenir = !0;
 32630              e.STIX = !0;
 32631              e["Stone Informal"] = !0;
 32632              e["Stone Serif"] = !0;
 32633              e.Sylfaen = !0;
 32634              e.Times = !0;
 32635              e.Trajan = !0;
 32636              e["Trinité"] = !0;
 32637              e["Trump Mediaeval"] = !0;
 32638              e.Utopia = !0;
 32639              e["Vale Type"] = !0;
 32640              e["Bitstream Vera"] = !0;
 32641              e["Vera Serif"] = !0;
 32642              e.Versailles = !0;
 32643              e.Wanted = !0;
 32644              e.Weiss = !0;
 32645              e["Wide Latin"] = !0;
 32646              e.Windsor = !0;
 32647              e.XITS = !0;
 32648            });
 32649            t.getSerifFonts = c;
 32650            const l = (0, r.getLookupTableFactory)(function (e) {
 32651              e.Dingbats = !0;
 32652              e.Symbol = !0;
 32653              e.ZapfDingbats = !0;
 32654              e.Wingdings = !0;
 32655              e["Wingdings-Bold"] = !0;
 32656              e["Wingdings-Regular"] = !0;
 32657            });
 32658            t.getSymbolsFonts = l;
 32659            const h = (0, r.getLookupTableFactory)(function (e) {
 32660              e[2] = 10;
 32661              e[3] = 32;
 32662              e[4] = 33;
 32663              e[5] = 34;
 32664              e[6] = 35;
 32665              e[7] = 36;
 32666              e[8] = 37;
 32667              e[9] = 38;
 32668              e[10] = 39;
 32669              e[11] = 40;
 32670              e[12] = 41;
 32671              e[13] = 42;
 32672              e[14] = 43;
 32673              e[15] = 44;
 32674              e[16] = 45;
 32675              e[17] = 46;
 32676              e[18] = 47;
 32677              e[19] = 48;
 32678              e[20] = 49;
 32679              e[21] = 50;
 32680              e[22] = 51;
 32681              e[23] = 52;
 32682              e[24] = 53;
 32683              e[25] = 54;
 32684              e[26] = 55;
 32685              e[27] = 56;
 32686              e[28] = 57;
 32687              e[29] = 58;
 32688              e[30] = 894;
 32689              e[31] = 60;
 32690              e[32] = 61;
 32691              e[33] = 62;
 32692              e[34] = 63;
 32693              e[35] = 64;
 32694              e[36] = 65;
 32695              e[37] = 66;
 32696              e[38] = 67;
 32697              e[39] = 68;
 32698              e[40] = 69;
 32699              e[41] = 70;
 32700              e[42] = 71;
 32701              e[43] = 72;
 32702              e[44] = 73;
 32703              e[45] = 74;
 32704              e[46] = 75;
 32705              e[47] = 76;
 32706              e[48] = 77;
 32707              e[49] = 78;
 32708              e[50] = 79;
 32709              e[51] = 80;
 32710              e[52] = 81;
 32711              e[53] = 82;
 32712              e[54] = 83;
 32713              e[55] = 84;
 32714              e[56] = 85;
 32715              e[57] = 86;
 32716              e[58] = 87;
 32717              e[59] = 88;
 32718              e[60] = 89;
 32719              e[61] = 90;
 32720              e[62] = 91;
 32721              e[63] = 92;
 32722              e[64] = 93;
 32723              e[65] = 94;
 32724              e[66] = 95;
 32725              e[67] = 96;
 32726              e[68] = 97;
 32727              e[69] = 98;
 32728              e[70] = 99;
 32729              e[71] = 100;
 32730              e[72] = 101;
 32731              e[73] = 102;
 32732              e[74] = 103;
 32733              e[75] = 104;
 32734              e[76] = 105;
 32735              e[77] = 106;
 32736              e[78] = 107;
 32737              e[79] = 108;
 32738              e[80] = 109;
 32739              e[81] = 110;
 32740              e[82] = 111;
 32741              e[83] = 112;
 32742              e[84] = 113;
 32743              e[85] = 114;
 32744              e[86] = 115;
 32745              e[87] = 116;
 32746              e[88] = 117;
 32747              e[89] = 118;
 32748              e[90] = 119;
 32749              e[91] = 120;
 32750              e[92] = 121;
 32751              e[93] = 122;
 32752              e[94] = 123;
 32753              e[95] = 124;
 32754              e[96] = 125;
 32755              e[97] = 126;
 32756              e[98] = 196;
 32757              e[99] = 197;
 32758              e[100] = 199;
 32759              e[101] = 201;
 32760              e[102] = 209;
 32761              e[103] = 214;
 32762              e[104] = 220;
 32763              e[105] = 225;
 32764              e[106] = 224;
 32765              e[107] = 226;
 32766              e[108] = 228;
 32767              e[109] = 227;
 32768              e[110] = 229;
 32769              e[111] = 231;
 32770              e[112] = 233;
 32771              e[113] = 232;
 32772              e[114] = 234;
 32773              e[115] = 235;
 32774              e[116] = 237;
 32775              e[117] = 236;
 32776              e[118] = 238;
 32777              e[119] = 239;
 32778              e[120] = 241;
 32779              e[121] = 243;
 32780              e[122] = 242;
 32781              e[123] = 244;
 32782              e[124] = 246;
 32783              e[125] = 245;
 32784              e[126] = 250;
 32785              e[127] = 249;
 32786              e[128] = 251;
 32787              e[129] = 252;
 32788              e[130] = 8224;
 32789              e[131] = 176;
 32790              e[132] = 162;
 32791              e[133] = 163;
 32792              e[134] = 167;
 32793              e[135] = 8226;
 32794              e[136] = 182;
 32795              e[137] = 223;
 32796              e[138] = 174;
 32797              e[139] = 169;
 32798              e[140] = 8482;
 32799              e[141] = 180;
 32800              e[142] = 168;
 32801              e[143] = 8800;
 32802              e[144] = 198;
 32803              e[145] = 216;
 32804              e[146] = 8734;
 32805              e[147] = 177;
 32806              e[148] = 8804;
 32807              e[149] = 8805;
 32808              e[150] = 165;
 32809              e[151] = 181;
 32810              e[152] = 8706;
 32811              e[153] = 8721;
 32812              e[154] = 8719;
 32813              e[156] = 8747;
 32814              e[157] = 170;
 32815              e[158] = 186;
 32816              e[159] = 8486;
 32817              e[160] = 230;
 32818              e[161] = 248;
 32819              e[162] = 191;
 32820              e[163] = 161;
 32821              e[164] = 172;
 32822              e[165] = 8730;
 32823              e[166] = 402;
 32824              e[167] = 8776;
 32825              e[168] = 8710;
 32826              e[169] = 171;
 32827              e[170] = 187;
 32828              e[171] = 8230;
 32829              e[179] = 8220;
 32830              e[180] = 8221;
 32831              e[181] = 8216;
 32832              e[182] = 8217;
 32833              e[200] = 193;
 32834              e[203] = 205;
 32835              e[207] = 211;
 32836              e[210] = 218;
 32837              e[223] = 711;
 32838              e[224] = 321;
 32839              e[225] = 322;
 32840              e[226] = 352;
 32841              e[227] = 353;
 32842              e[228] = 381;
 32843              e[229] = 382;
 32844              e[233] = 221;
 32845              e[234] = 253;
 32846              e[252] = 263;
 32847              e[253] = 268;
 32848              e[254] = 269;
 32849              e[258] = 258;
 32850              e[260] = 260;
 32851              e[261] = 261;
 32852              e[265] = 280;
 32853              e[266] = 281;
 32854              e[267] = 282;
 32855              e[268] = 283;
 32856              e[269] = 313;
 32857              e[275] = 323;
 32858              e[276] = 324;
 32859              e[278] = 328;
 32860              e[283] = 344;
 32861              e[284] = 345;
 32862              e[285] = 346;
 32863              e[286] = 347;
 32864              e[292] = 367;
 32865              e[295] = 377;
 32866              e[296] = 378;
 32867              e[298] = 380;
 32868              e[305] = 963;
 32869              e[306] = 964;
 32870              e[307] = 966;
 32871              e[308] = 8215;
 32872              e[309] = 8252;
 32873              e[310] = 8319;
 32874              e[311] = 8359;
 32875              e[312] = 8592;
 32876              e[313] = 8593;
 32877              e[337] = 9552;
 32878              e[493] = 1039;
 32879              e[494] = 1040;
 32880              e[672] = 1488;
 32881              e[673] = 1489;
 32882              e[674] = 1490;
 32883              e[675] = 1491;
 32884              e[676] = 1492;
 32885              e[677] = 1493;
 32886              e[678] = 1494;
 32887              e[679] = 1495;
 32888              e[680] = 1496;
 32889              e[681] = 1497;
 32890              e[682] = 1498;
 32891              e[683] = 1499;
 32892              e[684] = 1500;
 32893              e[685] = 1501;
 32894              e[686] = 1502;
 32895              e[687] = 1503;
 32896              e[688] = 1504;
 32897              e[689] = 1505;
 32898              e[690] = 1506;
 32899              e[691] = 1507;
 32900              e[692] = 1508;
 32901              e[693] = 1509;
 32902              e[694] = 1510;
 32903              e[695] = 1511;
 32904              e[696] = 1512;
 32905              e[697] = 1513;
 32906              e[698] = 1514;
 32907              e[705] = 1524;
 32908              e[706] = 8362;
 32909              e[710] = 64288;
 32910              e[711] = 64298;
 32911              e[759] = 1617;
 32912              e[761] = 1776;
 32913              e[763] = 1778;
 32914              e[775] = 1652;
 32915              e[777] = 1764;
 32916              e[778] = 1780;
 32917              e[779] = 1781;
 32918              e[780] = 1782;
 32919              e[782] = 771;
 32920              e[783] = 64726;
 32921              e[786] = 8363;
 32922              e[788] = 8532;
 32923              e[790] = 768;
 32924              e[791] = 769;
 32925              e[792] = 768;
 32926              e[795] = 803;
 32927              e[797] = 64336;
 32928              e[798] = 64337;
 32929              e[799] = 64342;
 32930              e[800] = 64343;
 32931              e[801] = 64344;
 32932              e[802] = 64345;
 32933              e[803] = 64362;
 32934              e[804] = 64363;
 32935              e[805] = 64364;
 32936              e[2424] = 7821;
 32937              e[2425] = 7822;
 32938              e[2426] = 7823;
 32939              e[2427] = 7824;
 32940              e[2428] = 7825;
 32941              e[2429] = 7826;
 32942              e[2430] = 7827;
 32943              e[2433] = 7682;
 32944              e[2678] = 8045;
 32945              e[2679] = 8046;
 32946              e[2830] = 1552;
 32947              e[2838] = 686;
 32948              e[2840] = 751;
 32949              e[2842] = 753;
 32950              e[2843] = 754;
 32951              e[2844] = 755;
 32952              e[2846] = 757;
 32953              e[2856] = 767;
 32954              e[2857] = 848;
 32955              e[2858] = 849;
 32956              e[2862] = 853;
 32957              e[2863] = 854;
 32958              e[2864] = 855;
 32959              e[2865] = 861;
 32960              e[2866] = 862;
 32961              e[2906] = 7460;
 32962              e[2908] = 7462;
 32963              e[2909] = 7463;
 32964              e[2910] = 7464;
 32965              e[2912] = 7466;
 32966              e[2913] = 7467;
 32967              e[2914] = 7468;
 32968              e[2916] = 7470;
 32969              e[2917] = 7471;
 32970              e[2918] = 7472;
 32971              e[2920] = 7474;
 32972              e[2921] = 7475;
 32973              e[2922] = 7476;
 32974              e[2924] = 7478;
 32975              e[2925] = 7479;
 32976              e[2926] = 7480;
 32977              e[2928] = 7482;
 32978              e[2929] = 7483;
 32979              e[2930] = 7484;
 32980              e[2932] = 7486;
 32981              e[2933] = 7487;
 32982              e[2934] = 7488;
 32983              e[2936] = 7490;
 32984              e[2937] = 7491;
 32985              e[2938] = 7492;
 32986              e[2940] = 7494;
 32987              e[2941] = 7495;
 32988              e[2942] = 7496;
 32989              e[2944] = 7498;
 32990              e[2946] = 7500;
 32991              e[2948] = 7502;
 32992              e[2950] = 7504;
 32993              e[2951] = 7505;
 32994              e[2952] = 7506;
 32995              e[2954] = 7508;
 32996              e[2955] = 7509;
 32997              e[2956] = 7510;
 32998              e[2958] = 7512;
 32999              e[2959] = 7513;
 33000              e[2960] = 7514;
 33001              e[2962] = 7516;
 33002              e[2963] = 7517;
 33003              e[2964] = 7518;
 33004              e[2966] = 7520;
 33005              e[2967] = 7521;
 33006              e[2968] = 7522;
 33007              e[2970] = 7524;
 33008              e[2971] = 7525;
 33009              e[2972] = 7526;
 33010              e[2974] = 7528;
 33011              e[2975] = 7529;
 33012              e[2976] = 7530;
 33013              e[2978] = 1537;
 33014              e[2979] = 1538;
 33015              e[2980] = 1539;
 33016              e[2982] = 1549;
 33017              e[2983] = 1551;
 33018              e[2984] = 1552;
 33019              e[2986] = 1554;
 33020              e[2987] = 1555;
 33021              e[2988] = 1556;
 33022              e[2990] = 1623;
 33023              e[2991] = 1624;
 33024              e[2995] = 1775;
 33025              e[2999] = 1791;
 33026              e[3002] = 64290;
 33027              e[3003] = 64291;
 33028              e[3004] = 64292;
 33029              e[3006] = 64294;
 33030              e[3007] = 64295;
 33031              e[3008] = 64296;
 33032              e[3011] = 1900;
 33033              e[3014] = 8223;
 33034              e[3015] = 8244;
 33035              e[3017] = 7532;
 33036              e[3018] = 7533;
 33037              e[3019] = 7534;
 33038              e[3075] = 7590;
 33039              e[3076] = 7591;
 33040              e[3079] = 7594;
 33041              e[3080] = 7595;
 33042              e[3083] = 7598;
 33043              e[3084] = 7599;
 33044              e[3087] = 7602;
 33045              e[3088] = 7603;
 33046              e[3091] = 7606;
 33047              e[3092] = 7607;
 33048              e[3095] = 7610;
 33049              e[3096] = 7611;
 33050              e[3099] = 7614;
 33051              e[3100] = 7615;
 33052              e[3103] = 7618;
 33053              e[3104] = 7619;
 33054              e[3107] = 8337;
 33055              e[3108] = 8338;
 33056              e[3116] = 1884;
 33057              e[3119] = 1885;
 33058              e[3120] = 1885;
 33059              e[3123] = 1886;
 33060              e[3124] = 1886;
 33061              e[3127] = 1887;
 33062              e[3128] = 1887;
 33063              e[3131] = 1888;
 33064              e[3132] = 1888;
 33065              e[3135] = 1889;
 33066              e[3136] = 1889;
 33067              e[3139] = 1890;
 33068              e[3140] = 1890;
 33069              e[3143] = 1891;
 33070              e[3144] = 1891;
 33071              e[3147] = 1892;
 33072              e[3148] = 1892;
 33073              e[3153] = 580;
 33074              e[3154] = 581;
 33075              e[3157] = 584;
 33076              e[3158] = 585;
 33077              e[3161] = 588;
 33078              e[3162] = 589;
 33079              e[3165] = 891;
 33080              e[3166] = 892;
 33081              e[3169] = 1274;
 33082              e[3170] = 1275;
 33083              e[3173] = 1278;
 33084              e[3174] = 1279;
 33085              e[3181] = 7622;
 33086              e[3182] = 7623;
 33087              e[3282] = 11799;
 33088              e[3316] = 578;
 33089              e[3379] = 42785;
 33090              e[3393] = 1159;
 33091              e[3416] = 8377;
 33092            });
 33093            t.getGlyphMapForStandardFonts = h;
 33094            const u = (0, r.getLookupTableFactory)(function (e) {
 33095              e[227] = 322;
 33096              e[264] = 261;
 33097              e[291] = 346;
 33098            });
 33099            t.getSupplementalGlyphMapForArialBlack = u;
 33100            const d = (0, r.getLookupTableFactory)(function (e) {
 33101              e[1] = 32;
 33102              e[4] = 65;
 33103              e[5] = 192;
 33104              e[6] = 193;
 33105              e[9] = 196;
 33106              e[17] = 66;
 33107              e[18] = 67;
 33108              e[21] = 268;
 33109              e[24] = 68;
 33110              e[28] = 69;
 33111              e[29] = 200;
 33112              e[30] = 201;
 33113              e[32] = 282;
 33114              e[38] = 70;
 33115              e[39] = 71;
 33116              e[44] = 72;
 33117              e[47] = 73;
 33118              e[48] = 204;
 33119              e[49] = 205;
 33120              e[58] = 74;
 33121              e[60] = 75;
 33122              e[62] = 76;
 33123              e[68] = 77;
 33124              e[69] = 78;
 33125              e[75] = 79;
 33126              e[76] = 210;
 33127              e[80] = 214;
 33128              e[87] = 80;
 33129              e[89] = 81;
 33130              e[90] = 82;
 33131              e[92] = 344;
 33132              e[94] = 83;
 33133              e[97] = 352;
 33134              e[100] = 84;
 33135              e[104] = 85;
 33136              e[109] = 220;
 33137              e[115] = 86;
 33138              e[116] = 87;
 33139              e[121] = 88;
 33140              e[122] = 89;
 33141              e[124] = 221;
 33142              e[127] = 90;
 33143              e[129] = 381;
 33144              e[258] = 97;
 33145              e[259] = 224;
 33146              e[260] = 225;
 33147              e[263] = 228;
 33148              e[268] = 261;
 33149              e[271] = 98;
 33150              e[272] = 99;
 33151              e[273] = 263;
 33152              e[275] = 269;
 33153              e[282] = 100;
 33154              e[286] = 101;
 33155              e[287] = 232;
 33156              e[288] = 233;
 33157              e[290] = 283;
 33158              e[295] = 281;
 33159              e[296] = 102;
 33160              e[336] = 103;
 33161              e[346] = 104;
 33162              e[349] = 105;
 33163              e[350] = 236;
 33164              e[351] = 237;
 33165              e[361] = 106;
 33166              e[364] = 107;
 33167              e[367] = 108;
 33168              e[371] = 322;
 33169              e[373] = 109;
 33170              e[374] = 110;
 33171              e[381] = 111;
 33172              e[382] = 242;
 33173              e[383] = 243;
 33174              e[386] = 246;
 33175              e[393] = 112;
 33176              e[395] = 113;
 33177              e[396] = 114;
 33178              e[398] = 345;
 33179              e[400] = 115;
 33180              e[401] = 347;
 33181              e[403] = 353;
 33182              e[410] = 116;
 33183              e[437] = 117;
 33184              e[442] = 252;
 33185              e[448] = 118;
 33186              e[449] = 119;
 33187              e[454] = 120;
 33188              e[455] = 121;
 33189              e[457] = 253;
 33190              e[460] = 122;
 33191              e[462] = 382;
 33192              e[463] = 380;
 33193              e[853] = 44;
 33194              e[855] = 58;
 33195              e[856] = 46;
 33196              e[876] = 47;
 33197              e[878] = 45;
 33198              e[882] = 45;
 33199              e[894] = 40;
 33200              e[895] = 41;
 33201              e[896] = 91;
 33202              e[897] = 93;
 33203              e[923] = 64;
 33204              e[1004] = 48;
 33205              e[1005] = 49;
 33206              e[1006] = 50;
 33207              e[1007] = 51;
 33208              e[1008] = 52;
 33209              e[1009] = 53;
 33210              e[1010] = 54;
 33211              e[1011] = 55;
 33212              e[1012] = 56;
 33213              e[1013] = 57;
 33214              e[1081] = 37;
 33215              e[1085] = 43;
 33216              e[1086] = 45;
 33217            });
 33218            t.getSupplementalGlyphMapForCalibri = d;
 33219          },
 33220          (e, t, a) => {
 33221            Object.defineProperty(t, "__esModule", { value: !0 });
 33222            t.ToUnicodeMap = t.IdentityToUnicodeMap = void 0;
 33223            var r = a(2);
 33224            t.ToUnicodeMap = class ToUnicodeMap {
 33225              constructor(e = []) {
 33226                this._map = e;
 33227              }
 33228              get length() {
 33229                return this._map.length;
 33230              }
 33231              forEach(e) {
 33232                for (const t in this._map) e(t, this._map[t].charCodeAt(0));
 33233              }
 33234              has(e) {
 33235                return void 0 !== this._map[e];
 33236              }
 33237              get(e) {
 33238                return this._map[e];
 33239              }
 33240              charCodeOf(e) {
 33241                const t = this._map;
 33242                if (t.length <= 65536) return t.indexOf(e);
 33243                for (const a in t) if (t[a] === e) return 0 | a;
 33244                return -1;
 33245              }
 33246              amend(e) {
 33247                for (const t in e) this._map[t] = e[t];
 33248              }
 33249            };
 33250            t.IdentityToUnicodeMap = class IdentityToUnicodeMap {
 33251              constructor(e, t) {
 33252                this.firstChar = e;
 33253                this.lastChar = t;
 33254              }
 33255              get length() {
 33256                return this.lastChar + 1 - this.firstChar;
 33257              }
 33258              forEach(e) {
 33259                for (let t = this.firstChar, a = this.lastChar; t <= a; t++)
 33260                  e(t, t);
 33261              }
 33262              has(e) {
 33263                return this.firstChar <= e && e <= this.lastChar;
 33264              }
 33265              get(e) {
 33266                if (this.firstChar <= e && e <= this.lastChar)
 33267                  return String.fromCharCode(e);
 33268              }
 33269              charCodeOf(e) {
 33270                return Number.isInteger(e) &&
 33271                  e >= this.firstChar &&
 33272                  e <= this.lastChar
 33273                  ? e
 33274                  : -1;
 33275              }
 33276              amend(e) {
 33277                (0, r.unreachable)("Should not call amend()");
 33278              }
 33279            };
 33280          },
 33281          (e, t, a) => {
 33282            Object.defineProperty(t, "__esModule", { value: !0 });
 33283            t.CFFFont = void 0;
 33284            var r = a(35),
 33285              n = a(38),
 33286              i = a(2);
 33287            t.CFFFont = class CFFFont {
 33288              constructor(e, t) {
 33289                this.properties = t;
 33290                const a = new r.CFFParser(e, t, n.SEAC_ANALYSIS_ENABLED);
 33291                this.cff = a.parse();
 33292                this.cff.duplicateFirstGlyph();
 33293                const s = new r.CFFCompiler(this.cff);
 33294                this.seacs = this.cff.seacs;
 33295                try {
 33296                  this.data = s.compile();
 33297                } catch {
 33298                  (0, i.warn)("Failed to compile font " + t.loadedName);
 33299                  this.data = e;
 33300                }
 33301                this._createBuiltInEncoding();
 33302              }
 33303              get numGlyphs() {
 33304                return this.cff.charStrings.count;
 33305              }
 33306              getCharset() {
 33307                return this.cff.charset.charset;
 33308              }
 33309              getGlyphMapping() {
 33310                const e = this.cff,
 33311                  t = this.properties,
 33312                  { cidToGidMap: a, cMap: r } = t,
 33313                  i = e.charset.charset;
 33314                let s, o;
 33315                if (t.composite) {
 33316                  let t, n;
 33317                  if (a?.length > 0) {
 33318                    t = Object.create(null);
 33319                    for (let e = 0, r = a.length; e < r; e++) {
 33320                      const r = a[e];
 33321                      void 0 !== r && (t[r] = e);
 33322                    }
 33323                  }
 33324                  s = Object.create(null);
 33325                  if (e.isCIDFont)
 33326                    for (o = 0; o < i.length; o++) {
 33327                      const e = i[o];
 33328                      n = r.charCodeOf(e);
 33329                      void 0 !== t?.[n] && (n = t[n]);
 33330                      s[n] = o;
 33331                    }
 33332                  else
 33333                    for (o = 0; o < e.charStrings.count; o++) {
 33334                      n = r.charCodeOf(o);
 33335                      s[n] = o;
 33336                    }
 33337                  return s;
 33338                }
 33339                let c = e.encoding ? e.encoding.encoding : null;
 33340                t.isInternalFont && (c = t.defaultEncoding);
 33341                s = (0, n.type1FontGlyphMapping)(t, c, i);
 33342                return s;
 33343              }
 33344              hasGlyphId(e) {
 33345                return this.cff.hasGlyphId(e);
 33346              }
 33347              _createBuiltInEncoding() {
 33348                const { charset: e, encoding: t } = this.cff;
 33349                if (!e || !t) return;
 33350                const a = e.charset,
 33351                  r = t.encoding,
 33352                  n = [];
 33353                for (const e in r) {
 33354                  const t = r[e];
 33355                  if (t >= 0) {
 33356                    const r = a[t];
 33357                    r && (n[e] = r);
 33358                  }
 33359                }
 33360                n.length > 0 && (this.properties.builtInEncoding = n);
 33361              }
 33362            };
 33363          },
 33364          (e, t, a) => {
 33365            Object.defineProperty(t, "__esModule", { value: !0 });
 33366            t.FontRendererFactory = void 0;
 33367            var r = a(2),
 33368              n = a(35),
 33369              i = a(39),
 33370              s = a(37),
 33371              o = a(8);
 33372            function getUint32(e, t) {
 33373              return (
 33374                ((e[t] << 24) | (e[t + 1] << 16) | (e[t + 2] << 8) | e[t + 3]) >>>
 33375                0
 33376              );
 33377            }
 33378            function getUint16(e, t) {
 33379              return (e[t] << 8) | e[t + 1];
 33380            }
 33381            function getInt16(e, t) {
 33382              return ((e[t] << 24) | (e[t + 1] << 16)) >> 16;
 33383            }
 33384            function getInt8(e, t) {
 33385              return (e[t] << 24) >> 24;
 33386            }
 33387            function getFloat214(e, t) {
 33388              return getInt16(e, t) / 16384;
 33389            }
 33390            function getSubroutineBias(e) {
 33391              const t = e.length;
 33392              let a = 32768;
 33393              t < 1240 ? (a = 107) : t < 33900 && (a = 1131);
 33394              return a;
 33395            }
 33396            function parseCmap(e, t, a) {
 33397              const n =
 33398                  1 === getUint16(e, t + 2)
 33399                    ? getUint32(e, t + 8)
 33400                    : getUint32(e, t + 16),
 33401                i = getUint16(e, t + n);
 33402              let s, o, c;
 33403              if (4 === i) {
 33404                getUint16(e, t + n + 2);
 33405                const a = getUint16(e, t + n + 6) >> 1;
 33406                o = t + n + 14;
 33407                s = [];
 33408                for (c = 0; c < a; c++, o += 2) s[c] = { end: getUint16(e, o) };
 33409                o += 2;
 33410                for (c = 0; c < a; c++, o += 2) s[c].start = getUint16(e, o);
 33411                for (c = 0; c < a; c++, o += 2) s[c].idDelta = getUint16(e, o);
 33412                for (c = 0; c < a; c++, o += 2) {
 33413                  let t = getUint16(e, o);
 33414                  if (0 !== t) {
 33415                    s[c].ids = [];
 33416                    for (let a = 0, r = s[c].end - s[c].start + 1; a < r; a++) {
 33417                      s[c].ids[a] = getUint16(e, o + t);
 33418                      t += 2;
 33419                    }
 33420                  }
 33421                }
 33422                return s;
 33423              }
 33424              if (12 === i) {
 33425                const a = getUint32(e, t + n + 12);
 33426                o = t + n + 16;
 33427                s = [];
 33428                for (c = 0; c < a; c++) {
 33429                  t = getUint32(e, o);
 33430                  s.push({
 33431                    start: t,
 33432                    end: getUint32(e, o + 4),
 33433                    idDelta: getUint32(e, o + 8) - t,
 33434                  });
 33435                  o += 12;
 33436                }
 33437                return s;
 33438              }
 33439              throw new r.FormatError(`unsupported cmap: ${i}`);
 33440            }
 33441            function parseCff(e, t, a, r) {
 33442              const i = new n.CFFParser(new o.Stream(e, t, a - t), {}, r).parse();
 33443              return {
 33444                glyphs: i.charStrings.objects,
 33445                subrs: i.topDict.privateDict?.subrsIndex?.objects,
 33446                gsubrs: i.globalSubrIndex?.objects,
 33447                isCFFCIDFont: i.isCIDFont,
 33448                fdSelect: i.fdSelect,
 33449                fdArray: i.fdArray,
 33450              };
 33451            }
 33452            function lookupCmap(e, t) {
 33453              const a = t.codePointAt(0);
 33454              let r = 0,
 33455                n = 0,
 33456                i = e.length - 1;
 33457              for (; n < i; ) {
 33458                const t = (n + i + 1) >> 1;
 33459                a < e[t].start ? (i = t - 1) : (n = t);
 33460              }
 33461              e[n].start <= a &&
 33462                a <= e[n].end &&
 33463                (r =
 33464                  (e[n].idDelta + (e[n].ids ? e[n].ids[a - e[n].start] : a)) &
 33465                  65535);
 33466              return { charCode: a, glyphId: r };
 33467            }
 33468            function compileGlyf(e, t, a) {
 33469              function moveTo(e, a) {
 33470                t.push({ cmd: "moveTo", args: [e, a] });
 33471              }
 33472              function lineTo(e, a) {
 33473                t.push({ cmd: "lineTo", args: [e, a] });
 33474              }
 33475              function quadraticCurveTo(e, a, r, n) {
 33476                t.push({ cmd: "quadraticCurveTo", args: [e, a, r, n] });
 33477              }
 33478              let r = 0;
 33479              const n = getInt16(e, r);
 33480              let i,
 33481                s = 0,
 33482                o = 0;
 33483              r += 10;
 33484              if (n < 0)
 33485                do {
 33486                  i = getUint16(e, r);
 33487                  const n = getUint16(e, r + 2);
 33488                  r += 4;
 33489                  let c, l;
 33490                  if (1 & i) {
 33491                    if (2 & i) {
 33492                      c = getInt16(e, r);
 33493                      l = getInt16(e, r + 2);
 33494                    } else {
 33495                      c = getUint16(e, r);
 33496                      l = getUint16(e, r + 2);
 33497                    }
 33498                    r += 4;
 33499                  } else if (2 & i) {
 33500                    c = getInt8(e, r++);
 33501                    l = getInt8(e, r++);
 33502                  } else {
 33503                    c = e[r++];
 33504                    l = e[r++];
 33505                  }
 33506                  if (2 & i) {
 33507                    s = c;
 33508                    o = l;
 33509                  } else {
 33510                    s = 0;
 33511                    o = 0;
 33512                  }
 33513                  let h = 1,
 33514                    u = 1,
 33515                    d = 0,
 33516                    f = 0;
 33517                  if (8 & i) {
 33518                    h = u = getFloat214(e, r);
 33519                    r += 2;
 33520                  } else if (64 & i) {
 33521                    h = getFloat214(e, r);
 33522                    u = getFloat214(e, r + 2);
 33523                    r += 4;
 33524                  } else if (128 & i) {
 33525                    h = getFloat214(e, r);
 33526                    d = getFloat214(e, r + 2);
 33527                    f = getFloat214(e, r + 4);
 33528                    u = getFloat214(e, r + 6);
 33529                    r += 8;
 33530                  }
 33531                  const g = a.glyphs[n];
 33532                  if (g) {
 33533                    t.push(
 33534                      { cmd: "save" },
 33535                      { cmd: "transform", args: [h, d, f, u, s, o] },
 33536                    );
 33537                    compileGlyf(g, t, a);
 33538                    t.push({ cmd: "restore" });
 33539                  }
 33540                } while (32 & i);
 33541              else {
 33542                const t = [];
 33543                let a, c;
 33544                for (a = 0; a < n; a++) {
 33545                  t.push(getUint16(e, r));
 33546                  r += 2;
 33547                }
 33548                r += 2 + getUint16(e, r);
 33549                const l = t.at(-1) + 1,
 33550                  h = [];
 33551                for (; h.length < l; ) {
 33552                  i = e[r++];
 33553                  let t = 1;
 33554                  8 & i && (t += e[r++]);
 33555                  for (; t-- > 0; ) h.push({ flags: i });
 33556                }
 33557                for (a = 0; a < l; a++) {
 33558                  switch (18 & h[a].flags) {
 33559                    case 0:
 33560                      s += getInt16(e, r);
 33561                      r += 2;
 33562                      break;
 33563                    case 2:
 33564                      s -= e[r++];
 33565                      break;
 33566                    case 18:
 33567                      s += e[r++];
 33568                  }
 33569                  h[a].x = s;
 33570                }
 33571                for (a = 0; a < l; a++) {
 33572                  switch (36 & h[a].flags) {
 33573                    case 0:
 33574                      o += getInt16(e, r);
 33575                      r += 2;
 33576                      break;
 33577                    case 4:
 33578                      o -= e[r++];
 33579                      break;
 33580                    case 36:
 33581                      o += e[r++];
 33582                  }
 33583                  h[a].y = o;
 33584                }
 33585                let u = 0;
 33586                for (r = 0; r < n; r++) {
 33587                  const e = t[r],
 33588                    n = h.slice(u, e + 1);
 33589                  if (1 & n[0].flags) n.push(n[0]);
 33590                  else if (1 & n.at(-1).flags) n.unshift(n.at(-1));
 33591                  else {
 33592                    const e = {
 33593                      flags: 1,
 33594                      x: (n[0].x + n.at(-1).x) / 2,
 33595                      y: (n[0].y + n.at(-1).y) / 2,
 33596                    };
 33597                    n.unshift(e);
 33598                    n.push(e);
 33599                  }
 33600                  moveTo(n[0].x, n[0].y);
 33601                  for (a = 1, c = n.length; a < c; a++)
 33602                    if (1 & n[a].flags) lineTo(n[a].x, n[a].y);
 33603                    else if (1 & n[a + 1].flags) {
 33604                      quadraticCurveTo(n[a].x, n[a].y, n[a + 1].x, n[a + 1].y);
 33605                      a++;
 33606                    } else
 33607                      quadraticCurveTo(
 33608                        n[a].x,
 33609                        n[a].y,
 33610                        (n[a].x + n[a + 1].x) / 2,
 33611                        (n[a].y + n[a + 1].y) / 2,
 33612                      );
 33613                  u = e + 1;
 33614                }
 33615              }
 33616            }
 33617            function compileCharString(e, t, a, n) {
 33618              function moveTo(e, a) {
 33619                t.push({ cmd: "moveTo", args: [e, a] });
 33620              }
 33621              function lineTo(e, a) {
 33622                t.push({ cmd: "lineTo", args: [e, a] });
 33623              }
 33624              function bezierCurveTo(e, a, r, n, i, s) {
 33625                t.push({ cmd: "bezierCurveTo", args: [e, a, r, n, i, s] });
 33626              }
 33627              const i = [];
 33628              let o = 0,
 33629                c = 0,
 33630                l = 0;
 33631              !(function parse(e) {
 33632                let h = 0;
 33633                for (; h < e.length; ) {
 33634                  let u,
 33635                    d,
 33636                    f,
 33637                    g,
 33638                    p,
 33639                    m,
 33640                    b,
 33641                    y,
 33642                    w,
 33643                    S = !1,
 33644                    x = e[h++];
 33645                  switch (x) {
 33646                    case 1:
 33647                    case 3:
 33648                    case 18:
 33649                    case 23:
 33650                      l += i.length >> 1;
 33651                      S = !0;
 33652                      break;
 33653                    case 4:
 33654                      c += i.pop();
 33655                      moveTo(o, c);
 33656                      S = !0;
 33657                      break;
 33658                    case 5:
 33659                      for (; i.length > 0; ) {
 33660                        o += i.shift();
 33661                        c += i.shift();
 33662                        lineTo(o, c);
 33663                      }
 33664                      break;
 33665                    case 6:
 33666                      for (; i.length > 0; ) {
 33667                        o += i.shift();
 33668                        lineTo(o, c);
 33669                        if (0 === i.length) break;
 33670                        c += i.shift();
 33671                        lineTo(o, c);
 33672                      }
 33673                      break;
 33674                    case 7:
 33675                      for (; i.length > 0; ) {
 33676                        c += i.shift();
 33677                        lineTo(o, c);
 33678                        if (0 === i.length) break;
 33679                        o += i.shift();
 33680                        lineTo(o, c);
 33681                      }
 33682                      break;
 33683                    case 8:
 33684                      for (; i.length > 0; ) {
 33685                        u = o + i.shift();
 33686                        f = c + i.shift();
 33687                        d = u + i.shift();
 33688                        g = f + i.shift();
 33689                        o = d + i.shift();
 33690                        c = g + i.shift();
 33691                        bezierCurveTo(u, f, d, g, o, c);
 33692                      }
 33693                      break;
 33694                    case 10:
 33695                      y = i.pop();
 33696                      w = null;
 33697                      if (a.isCFFCIDFont) {
 33698                        const e = a.fdSelect.getFDIndex(n);
 33699                        if (e >= 0 && e < a.fdArray.length) {
 33700                          const t = a.fdArray[e];
 33701                          let r;
 33702                          t.privateDict?.subrsIndex &&
 33703                            (r = t.privateDict.subrsIndex.objects);
 33704                          if (r) {
 33705                            y += getSubroutineBias(r);
 33706                            w = r[y];
 33707                          }
 33708                        } else (0, r.warn)("Invalid fd index for glyph index.");
 33709                      } else w = a.subrs[y + a.subrsBias];
 33710                      w && parse(w);
 33711                      break;
 33712                    case 11:
 33713                      return;
 33714                    case 12:
 33715                      x = e[h++];
 33716                      switch (x) {
 33717                        case 34:
 33718                          u = o + i.shift();
 33719                          d = u + i.shift();
 33720                          p = c + i.shift();
 33721                          o = d + i.shift();
 33722                          bezierCurveTo(u, c, d, p, o, p);
 33723                          u = o + i.shift();
 33724                          d = u + i.shift();
 33725                          o = d + i.shift();
 33726                          bezierCurveTo(u, p, d, c, o, c);
 33727                          break;
 33728                        case 35:
 33729                          u = o + i.shift();
 33730                          f = c + i.shift();
 33731                          d = u + i.shift();
 33732                          g = f + i.shift();
 33733                          o = d + i.shift();
 33734                          c = g + i.shift();
 33735                          bezierCurveTo(u, f, d, g, o, c);
 33736                          u = o + i.shift();
 33737                          f = c + i.shift();
 33738                          d = u + i.shift();
 33739                          g = f + i.shift();
 33740                          o = d + i.shift();
 33741                          c = g + i.shift();
 33742                          bezierCurveTo(u, f, d, g, o, c);
 33743                          i.pop();
 33744                          break;
 33745                        case 36:
 33746                          u = o + i.shift();
 33747                          p = c + i.shift();
 33748                          d = u + i.shift();
 33749                          m = p + i.shift();
 33750                          o = d + i.shift();
 33751                          bezierCurveTo(u, p, d, m, o, m);
 33752                          u = o + i.shift();
 33753                          d = u + i.shift();
 33754                          b = m + i.shift();
 33755                          o = d + i.shift();
 33756                          bezierCurveTo(u, m, d, b, o, c);
 33757                          break;
 33758                        case 37:
 33759                          const e = o,
 33760                            t = c;
 33761                          u = o + i.shift();
 33762                          f = c + i.shift();
 33763                          d = u + i.shift();
 33764                          g = f + i.shift();
 33765                          o = d + i.shift();
 33766                          c = g + i.shift();
 33767                          bezierCurveTo(u, f, d, g, o, c);
 33768                          u = o + i.shift();
 33769                          f = c + i.shift();
 33770                          d = u + i.shift();
 33771                          g = f + i.shift();
 33772                          o = d;
 33773                          c = g;
 33774                          Math.abs(o - e) > Math.abs(c - t)
 33775                            ? (o += i.shift())
 33776                            : (c += i.shift());
 33777                          bezierCurveTo(u, f, d, g, o, c);
 33778                          break;
 33779                        default:
 33780                          throw new r.FormatError(`unknown operator: 12 ${x}`);
 33781                      }
 33782                      break;
 33783                    case 14:
 33784                      if (i.length >= 4) {
 33785                        const e = i.pop(),
 33786                          r = i.pop();
 33787                        c = i.pop();
 33788                        o = i.pop();
 33789                        t.push(
 33790                          { cmd: "save" },
 33791                          { cmd: "translate", args: [o, c] },
 33792                        );
 33793                        let n = lookupCmap(
 33794                          a.cmap,
 33795                          String.fromCharCode(
 33796                            a.glyphNameMap[s.StandardEncoding[e]],
 33797                          ),
 33798                        );
 33799                        compileCharString(a.glyphs[n.glyphId], t, a, n.glyphId);
 33800                        t.push({ cmd: "restore" });
 33801                        n = lookupCmap(
 33802                          a.cmap,
 33803                          String.fromCharCode(
 33804                            a.glyphNameMap[s.StandardEncoding[r]],
 33805                          ),
 33806                        );
 33807                        compileCharString(a.glyphs[n.glyphId], t, a, n.glyphId);
 33808                      }
 33809                      return;
 33810                    case 19:
 33811                    case 20:
 33812                      l += i.length >> 1;
 33813                      h += (l + 7) >> 3;
 33814                      S = !0;
 33815                      break;
 33816                    case 21:
 33817                      c += i.pop();
 33818                      o += i.pop();
 33819                      moveTo(o, c);
 33820                      S = !0;
 33821                      break;
 33822                    case 22:
 33823                      o += i.pop();
 33824                      moveTo(o, c);
 33825                      S = !0;
 33826                      break;
 33827                    case 24:
 33828                      for (; i.length > 2; ) {
 33829                        u = o + i.shift();
 33830                        f = c + i.shift();
 33831                        d = u + i.shift();
 33832                        g = f + i.shift();
 33833                        o = d + i.shift();
 33834                        c = g + i.shift();
 33835                        bezierCurveTo(u, f, d, g, o, c);
 33836                      }
 33837                      o += i.shift();
 33838                      c += i.shift();
 33839                      lineTo(o, c);
 33840                      break;
 33841                    case 25:
 33842                      for (; i.length > 6; ) {
 33843                        o += i.shift();
 33844                        c += i.shift();
 33845                        lineTo(o, c);
 33846                      }
 33847                      u = o + i.shift();
 33848                      f = c + i.shift();
 33849                      d = u + i.shift();
 33850                      g = f + i.shift();
 33851                      o = d + i.shift();
 33852                      c = g + i.shift();
 33853                      bezierCurveTo(u, f, d, g, o, c);
 33854                      break;
 33855                    case 26:
 33856                      i.length % 2 && (o += i.shift());
 33857                      for (; i.length > 0; ) {
 33858                        u = o;
 33859                        f = c + i.shift();
 33860                        d = u + i.shift();
 33861                        g = f + i.shift();
 33862                        o = d;
 33863                        c = g + i.shift();
 33864                        bezierCurveTo(u, f, d, g, o, c);
 33865                      }
 33866                      break;
 33867                    case 27:
 33868                      i.length % 2 && (c += i.shift());
 33869                      for (; i.length > 0; ) {
 33870                        u = o + i.shift();
 33871                        f = c;
 33872                        d = u + i.shift();
 33873                        g = f + i.shift();
 33874                        o = d + i.shift();
 33875                        c = g;
 33876                        bezierCurveTo(u, f, d, g, o, c);
 33877                      }
 33878                      break;
 33879                    case 28:
 33880                      i.push(((e[h] << 24) | (e[h + 1] << 16)) >> 16);
 33881                      h += 2;
 33882                      break;
 33883                    case 29:
 33884                      y = i.pop() + a.gsubrsBias;
 33885                      w = a.gsubrs[y];
 33886                      w && parse(w);
 33887                      break;
 33888                    case 30:
 33889                      for (; i.length > 0; ) {
 33890                        u = o;
 33891                        f = c + i.shift();
 33892                        d = u + i.shift();
 33893                        g = f + i.shift();
 33894                        o = d + i.shift();
 33895                        c = g + (1 === i.length ? i.shift() : 0);
 33896                        bezierCurveTo(u, f, d, g, o, c);
 33897                        if (0 === i.length) break;
 33898                        u = o + i.shift();
 33899                        f = c;
 33900                        d = u + i.shift();
 33901                        g = f + i.shift();
 33902                        c = g + i.shift();
 33903                        o = d + (1 === i.length ? i.shift() : 0);
 33904                        bezierCurveTo(u, f, d, g, o, c);
 33905                      }
 33906                      break;
 33907                    case 31:
 33908                      for (; i.length > 0; ) {
 33909                        u = o + i.shift();
 33910                        f = c;
 33911                        d = u + i.shift();
 33912                        g = f + i.shift();
 33913                        c = g + i.shift();
 33914                        o = d + (1 === i.length ? i.shift() : 0);
 33915                        bezierCurveTo(u, f, d, g, o, c);
 33916                        if (0 === i.length) break;
 33917                        u = o;
 33918                        f = c + i.shift();
 33919                        d = u + i.shift();
 33920                        g = f + i.shift();
 33921                        o = d + i.shift();
 33922                        c = g + (1 === i.length ? i.shift() : 0);
 33923                        bezierCurveTo(u, f, d, g, o, c);
 33924                      }
 33925                      break;
 33926                    default:
 33927                      if (x < 32)
 33928                        throw new r.FormatError(`unknown operator: ${x}`);
 33929                      if (x < 247) i.push(x - 139);
 33930                      else if (x < 251) i.push(256 * (x - 247) + e[h++] + 108);
 33931                      else if (x < 255) i.push(256 * -(x - 251) - e[h++] - 108);
 33932                      else {
 33933                        i.push(
 33934                          ((e[h] << 24) |
 33935                            (e[h + 1] << 16) |
 33936                            (e[h + 2] << 8) |
 33937                            e[h + 3]) /
 33938                            65536,
 33939                        );
 33940                        h += 4;
 33941                      }
 33942                  }
 33943                  S && (i.length = 0);
 33944                }
 33945              })(e);
 33946            }
 33947            const c = [];
 33948            class CompiledFont {
 33949              constructor(e) {
 33950                this.constructor === CompiledFont &&
 33951                  (0, r.unreachable)("Cannot initialize CompiledFont.");
 33952                this.fontMatrix = e;
 33953                this.compiledGlyphs = Object.create(null);
 33954                this.compiledCharCodeToGlyphId = Object.create(null);
 33955              }
 33956              getPathJs(e) {
 33957                const { charCode: t, glyphId: a } = lookupCmap(this.cmap, e);
 33958                let r = this.compiledGlyphs[a];
 33959                if (!r)
 33960                  try {
 33961                    r = this.compileGlyph(this.glyphs[a], a);
 33962                    this.compiledGlyphs[a] = r;
 33963                  } catch (e) {
 33964                    this.compiledGlyphs[a] = c;
 33965                    void 0 === this.compiledCharCodeToGlyphId[t] &&
 33966                      (this.compiledCharCodeToGlyphId[t] = a);
 33967                    throw e;
 33968                  }
 33969                void 0 === this.compiledCharCodeToGlyphId[t] &&
 33970                  (this.compiledCharCodeToGlyphId[t] = a);
 33971                return r;
 33972              }
 33973              compileGlyph(e, t) {
 33974                if (!e || 0 === e.length || 14 === e[0]) return c;
 33975                let a = this.fontMatrix;
 33976                if (this.isCFFCIDFont) {
 33977                  const e = this.fdSelect.getFDIndex(t);
 33978                  if (e >= 0 && e < this.fdArray.length) {
 33979                    a =
 33980                      this.fdArray[e].getByName("FontMatrix") ||
 33981                      r.FONT_IDENTITY_MATRIX;
 33982                  } else (0, r.warn)("Invalid fd index for glyph index.");
 33983                }
 33984                const n = [
 33985                  { cmd: "save" },
 33986                  { cmd: "transform", args: a.slice() },
 33987                  { cmd: "scale", args: ["size", "-size"] },
 33988                ];
 33989                this.compileGlyphImpl(e, n, t);
 33990                n.push({ cmd: "restore" });
 33991                return n;
 33992              }
 33993              compileGlyphImpl() {
 33994                (0, r.unreachable)("Children classes should implement this.");
 33995              }
 33996              hasBuiltPath(e) {
 33997                const { charCode: t, glyphId: a } = lookupCmap(this.cmap, e);
 33998                return (
 33999                  void 0 !== this.compiledGlyphs[a] &&
 34000                  void 0 !== this.compiledCharCodeToGlyphId[t]
 34001                );
 34002              }
 34003            }
 34004            class TrueTypeCompiled extends CompiledFont {
 34005              constructor(e, t, a) {
 34006                super(a || [488e-6, 0, 0, 488e-6, 0, 0]);
 34007                this.glyphs = e;
 34008                this.cmap = t;
 34009              }
 34010              compileGlyphImpl(e, t) {
 34011                compileGlyf(e, t, this);
 34012              }
 34013            }
 34014            class Type2Compiled extends CompiledFont {
 34015              constructor(e, t, a, r) {
 34016                super(a || [0.001, 0, 0, 0.001, 0, 0]);
 34017                this.glyphs = e.glyphs;
 34018                this.gsubrs = e.gsubrs || [];
 34019                this.subrs = e.subrs || [];
 34020                this.cmap = t;
 34021                this.glyphNameMap = r || (0, i.getGlyphsUnicode)();
 34022                this.gsubrsBias = getSubroutineBias(this.gsubrs);
 34023                this.subrsBias = getSubroutineBias(this.subrs);
 34024                this.isCFFCIDFont = e.isCFFCIDFont;
 34025                this.fdSelect = e.fdSelect;
 34026                this.fdArray = e.fdArray;
 34027              }
 34028              compileGlyphImpl(e, t, a) {
 34029                compileCharString(e, t, this, a);
 34030              }
 34031            }
 34032            t.FontRendererFactory = class FontRendererFactory {
 34033              static create(e, t) {
 34034                const a = new Uint8Array(e.data);
 34035                let n, i, s, o, c, l;
 34036                const h = getUint16(a, 4);
 34037                for (let e = 0, u = 12; e < h; e++, u += 16) {
 34038                  const e = (0, r.bytesToString)(a.subarray(u, u + 4)),
 34039                    h = getUint32(a, u + 8),
 34040                    d = getUint32(a, u + 12);
 34041                  switch (e) {
 34042                    case "cmap":
 34043                      n = parseCmap(a, h);
 34044                      break;
 34045                    case "glyf":
 34046                      i = a.subarray(h, h + d);
 34047                      break;
 34048                    case "loca":
 34049                      s = a.subarray(h, h + d);
 34050                      break;
 34051                    case "head":
 34052                      l = getUint16(a, h + 18);
 34053                      c = getUint16(a, h + 50);
 34054                      break;
 34055                    case "CFF ":
 34056                      o = parseCff(a, h, h + d, t);
 34057                  }
 34058                }
 34059                if (i) {
 34060                  const t = l ? [1 / l, 0, 0, 1 / l, 0, 0] : e.fontMatrix;
 34061                  return new TrueTypeCompiled(
 34062                    (function parseGlyfTable(e, t, a) {
 34063                      let r, n;
 34064                      if (a) {
 34065                        r = 4;
 34066                        n = getUint32;
 34067                      } else {
 34068                        r = 2;
 34069                        n = (e, t) => 2 * getUint16(e, t);
 34070                      }
 34071                      const i = [];
 34072                      let s = n(t, 0);
 34073                      for (let a = r; a < t.length; a += r) {
 34074                        const r = n(t, a);
 34075                        i.push(e.subarray(s, r));
 34076                        s = r;
 34077                      }
 34078                      return i;
 34079                    })(i, s, c),
 34080                    n,
 34081                    t,
 34082                  );
 34083                }
 34084                return new Type2Compiled(o, n, e.fontMatrix, e.glyphNameMap);
 34085              }
 34086            };
 34087          },
 34088          (e, t, a) => {
 34089            Object.defineProperty(t, "__esModule", { value: !0 });
 34090            t.getMetrics = t.getFontBasicMetrics = void 0;
 34091            var r = a(3);
 34092            const n = (0, r.getLookupTableFactory)(function (e) {
 34093              e.Courier = 600;
 34094              e["Courier-Bold"] = 600;
 34095              e["Courier-BoldOblique"] = 600;
 34096              e["Courier-Oblique"] = 600;
 34097              e.Helvetica = (0, r.getLookupTableFactory)(function (e) {
 34098                e.space = 278;
 34099                e.exclam = 278;
 34100                e.quotedbl = 355;
 34101                e.numbersign = 556;
 34102                e.dollar = 556;
 34103                e.percent = 889;
 34104                e.ampersand = 667;
 34105                e.quoteright = 222;
 34106                e.parenleft = 333;
 34107                e.parenright = 333;
 34108                e.asterisk = 389;
 34109                e.plus = 584;
 34110                e.comma = 278;
 34111                e.hyphen = 333;
 34112                e.period = 278;
 34113                e.slash = 278;
 34114                e.zero = 556;
 34115                e.one = 556;
 34116                e.two = 556;
 34117                e.three = 556;
 34118                e.four = 556;
 34119                e.five = 556;
 34120                e.six = 556;
 34121                e.seven = 556;
 34122                e.eight = 556;
 34123                e.nine = 556;
 34124                e.colon = 278;
 34125                e.semicolon = 278;
 34126                e.less = 584;
 34127                e.equal = 584;
 34128                e.greater = 584;
 34129                e.question = 556;
 34130                e.at = 1015;
 34131                e.A = 667;
 34132                e.B = 667;
 34133                e.C = 722;
 34134                e.D = 722;
 34135                e.E = 667;
 34136                e.F = 611;
 34137                e.G = 778;
 34138                e.H = 722;
 34139                e.I = 278;
 34140                e.J = 500;
 34141                e.K = 667;
 34142                e.L = 556;
 34143                e.M = 833;
 34144                e.N = 722;
 34145                e.O = 778;
 34146                e.P = 667;
 34147                e.Q = 778;
 34148                e.R = 722;
 34149                e.S = 667;
 34150                e.T = 611;
 34151                e.U = 722;
 34152                e.V = 667;
 34153                e.W = 944;
 34154                e.X = 667;
 34155                e.Y = 667;
 34156                e.Z = 611;
 34157                e.bracketleft = 278;
 34158                e.backslash = 278;
 34159                e.bracketright = 278;
 34160                e.asciicircum = 469;
 34161                e.underscore = 556;
 34162                e.quoteleft = 222;
 34163                e.a = 556;
 34164                e.b = 556;
 34165                e.c = 500;
 34166                e.d = 556;
 34167                e.e = 556;
 34168                e.f = 278;
 34169                e.g = 556;
 34170                e.h = 556;
 34171                e.i = 222;
 34172                e.j = 222;
 34173                e.k = 500;
 34174                e.l = 222;
 34175                e.m = 833;
 34176                e.n = 556;
 34177                e.o = 556;
 34178                e.p = 556;
 34179                e.q = 556;
 34180                e.r = 333;
 34181                e.s = 500;
 34182                e.t = 278;
 34183                e.u = 556;
 34184                e.v = 500;
 34185                e.w = 722;
 34186                e.x = 500;
 34187                e.y = 500;
 34188                e.z = 500;
 34189                e.braceleft = 334;
 34190                e.bar = 260;
 34191                e.braceright = 334;
 34192                e.asciitilde = 584;
 34193                e.exclamdown = 333;
 34194                e.cent = 556;
 34195                e.sterling = 556;
 34196                e.fraction = 167;
 34197                e.yen = 556;
 34198                e.florin = 556;
 34199                e.section = 556;
 34200                e.currency = 556;
 34201                e.quotesingle = 191;
 34202                e.quotedblleft = 333;
 34203                e.guillemotleft = 556;
 34204                e.guilsinglleft = 333;
 34205                e.guilsinglright = 333;
 34206                e.fi = 500;
 34207                e.fl = 500;
 34208                e.endash = 556;
 34209                e.dagger = 556;
 34210                e.daggerdbl = 556;
 34211                e.periodcentered = 278;
 34212                e.paragraph = 537;
 34213                e.bullet = 350;
 34214                e.quotesinglbase = 222;
 34215                e.quotedblbase = 333;
 34216                e.quotedblright = 333;
 34217                e.guillemotright = 556;
 34218                e.ellipsis = 1e3;
 34219                e.perthousand = 1e3;
 34220                e.questiondown = 611;
 34221                e.grave = 333;
 34222                e.acute = 333;
 34223                e.circumflex = 333;
 34224                e.tilde = 333;
 34225                e.macron = 333;
 34226                e.breve = 333;
 34227                e.dotaccent = 333;
 34228                e.dieresis = 333;
 34229                e.ring = 333;
 34230                e.cedilla = 333;
 34231                e.hungarumlaut = 333;
 34232                e.ogonek = 333;
 34233                e.caron = 333;
 34234                e.emdash = 1e3;
 34235                e.AE = 1e3;
 34236                e.ordfeminine = 370;
 34237                e.Lslash = 556;
 34238                e.Oslash = 778;
 34239                e.OE = 1e3;
 34240                e.ordmasculine = 365;
 34241                e.ae = 889;
 34242                e.dotlessi = 278;
 34243                e.lslash = 222;
 34244                e.oslash = 611;
 34245                e.oe = 944;
 34246                e.germandbls = 611;
 34247                e.Idieresis = 278;
 34248                e.eacute = 556;
 34249                e.abreve = 556;
 34250                e.uhungarumlaut = 556;
 34251                e.ecaron = 556;
 34252                e.Ydieresis = 667;
 34253                e.divide = 584;
 34254                e.Yacute = 667;
 34255                e.Acircumflex = 667;
 34256                e.aacute = 556;
 34257                e.Ucircumflex = 722;
 34258                e.yacute = 500;
 34259                e.scommaaccent = 500;
 34260                e.ecircumflex = 556;
 34261                e.Uring = 722;
 34262                e.Udieresis = 722;
 34263                e.aogonek = 556;
 34264                e.Uacute = 722;
 34265                e.uogonek = 556;
 34266                e.Edieresis = 667;
 34267                e.Dcroat = 722;
 34268                e.commaaccent = 250;
 34269                e.copyright = 737;
 34270                e.Emacron = 667;
 34271                e.ccaron = 500;
 34272                e.aring = 556;
 34273                e.Ncommaaccent = 722;
 34274                e.lacute = 222;
 34275                e.agrave = 556;
 34276                e.Tcommaaccent = 611;
 34277                e.Cacute = 722;
 34278                e.atilde = 556;
 34279                e.Edotaccent = 667;
 34280                e.scaron = 500;
 34281                e.scedilla = 500;
 34282                e.iacute = 278;
 34283                e.lozenge = 471;
 34284                e.Rcaron = 722;
 34285                e.Gcommaaccent = 778;
 34286                e.ucircumflex = 556;
 34287                e.acircumflex = 556;
 34288                e.Amacron = 667;
 34289                e.rcaron = 333;
 34290                e.ccedilla = 500;
 34291                e.Zdotaccent = 611;
 34292                e.Thorn = 667;
 34293                e.Omacron = 778;
 34294                e.Racute = 722;
 34295                e.Sacute = 667;
 34296                e.dcaron = 643;
 34297                e.Umacron = 722;
 34298                e.uring = 556;
 34299                e.threesuperior = 333;
 34300                e.Ograve = 778;
 34301                e.Agrave = 667;
 34302                e.Abreve = 667;
 34303                e.multiply = 584;
 34304                e.uacute = 556;
 34305                e.Tcaron = 611;
 34306                e.partialdiff = 476;
 34307                e.ydieresis = 500;
 34308                e.Nacute = 722;
 34309                e.icircumflex = 278;
 34310                e.Ecircumflex = 667;
 34311                e.adieresis = 556;
 34312                e.edieresis = 556;
 34313                e.cacute = 500;
 34314                e.nacute = 556;
 34315                e.umacron = 556;
 34316                e.Ncaron = 722;
 34317                e.Iacute = 278;
 34318                e.plusminus = 584;
 34319                e.brokenbar = 260;
 34320                e.registered = 737;
 34321                e.Gbreve = 778;
 34322                e.Idotaccent = 278;
 34323                e.summation = 600;
 34324                e.Egrave = 667;
 34325                e.racute = 333;
 34326                e.omacron = 556;
 34327                e.Zacute = 611;
 34328                e.Zcaron = 611;
 34329                e.greaterequal = 549;
 34330                e.Eth = 722;
 34331                e.Ccedilla = 722;
 34332                e.lcommaaccent = 222;
 34333                e.tcaron = 317;
 34334                e.eogonek = 556;
 34335                e.Uogonek = 722;
 34336                e.Aacute = 667;
 34337                e.Adieresis = 667;
 34338                e.egrave = 556;
 34339                e.zacute = 500;
 34340                e.iogonek = 222;
 34341                e.Oacute = 778;
 34342                e.oacute = 556;
 34343                e.amacron = 556;
 34344                e.sacute = 500;
 34345                e.idieresis = 278;
 34346                e.Ocircumflex = 778;
 34347                e.Ugrave = 722;
 34348                e.Delta = 612;
 34349                e.thorn = 556;
 34350                e.twosuperior = 333;
 34351                e.Odieresis = 778;
 34352                e.mu = 556;
 34353                e.igrave = 278;
 34354                e.ohungarumlaut = 556;
 34355                e.Eogonek = 667;
 34356                e.dcroat = 556;
 34357                e.threequarters = 834;
 34358                e.Scedilla = 667;
 34359                e.lcaron = 299;
 34360                e.Kcommaaccent = 667;
 34361                e.Lacute = 556;
 34362                e.trademark = 1e3;
 34363                e.edotaccent = 556;
 34364                e.Igrave = 278;
 34365                e.Imacron = 278;
 34366                e.Lcaron = 556;
 34367                e.onehalf = 834;
 34368                e.lessequal = 549;
 34369                e.ocircumflex = 556;
 34370                e.ntilde = 556;
 34371                e.Uhungarumlaut = 722;
 34372                e.Eacute = 667;
 34373                e.emacron = 556;
 34374                e.gbreve = 556;
 34375                e.onequarter = 834;
 34376                e.Scaron = 667;
 34377                e.Scommaaccent = 667;
 34378                e.Ohungarumlaut = 778;
 34379                e.degree = 400;
 34380                e.ograve = 556;
 34381                e.Ccaron = 722;
 34382                e.ugrave = 556;
 34383                e.radical = 453;
 34384                e.Dcaron = 722;
 34385                e.rcommaaccent = 333;
 34386                e.Ntilde = 722;
 34387                e.otilde = 556;
 34388                e.Rcommaaccent = 722;
 34389                e.Lcommaaccent = 556;
 34390                e.Atilde = 667;
 34391                e.Aogonek = 667;
 34392                e.Aring = 667;
 34393                e.Otilde = 778;
 34394                e.zdotaccent = 500;
 34395                e.Ecaron = 667;
 34396                e.Iogonek = 278;
 34397                e.kcommaaccent = 500;
 34398                e.minus = 584;
 34399                e.Icircumflex = 278;
 34400                e.ncaron = 556;
 34401                e.tcommaaccent = 278;
 34402                e.logicalnot = 584;
 34403                e.odieresis = 556;
 34404                e.udieresis = 556;
 34405                e.notequal = 549;
 34406                e.gcommaaccent = 556;
 34407                e.eth = 556;
 34408                e.zcaron = 500;
 34409                e.ncommaaccent = 556;
 34410                e.onesuperior = 333;
 34411                e.imacron = 278;
 34412                e.Euro = 556;
 34413              });
 34414              e["Helvetica-Bold"] = (0, r.getLookupTableFactory)(function (e) {
 34415                e.space = 278;
 34416                e.exclam = 333;
 34417                e.quotedbl = 474;
 34418                e.numbersign = 556;
 34419                e.dollar = 556;
 34420                e.percent = 889;
 34421                e.ampersand = 722;
 34422                e.quoteright = 278;
 34423                e.parenleft = 333;
 34424                e.parenright = 333;
 34425                e.asterisk = 389;
 34426                e.plus = 584;
 34427                e.comma = 278;
 34428                e.hyphen = 333;
 34429                e.period = 278;
 34430                e.slash = 278;
 34431                e.zero = 556;
 34432                e.one = 556;
 34433                e.two = 556;
 34434                e.three = 556;
 34435                e.four = 556;
 34436                e.five = 556;
 34437                e.six = 556;
 34438                e.seven = 556;
 34439                e.eight = 556;
 34440                e.nine = 556;
 34441                e.colon = 333;
 34442                e.semicolon = 333;
 34443                e.less = 584;
 34444                e.equal = 584;
 34445                e.greater = 584;
 34446                e.question = 611;
 34447                e.at = 975;
 34448                e.A = 722;
 34449                e.B = 722;
 34450                e.C = 722;
 34451                e.D = 722;
 34452                e.E = 667;
 34453                e.F = 611;
 34454                e.G = 778;
 34455                e.H = 722;
 34456                e.I = 278;
 34457                e.J = 556;
 34458                e.K = 722;
 34459                e.L = 611;
 34460                e.M = 833;
 34461                e.N = 722;
 34462                e.O = 778;
 34463                e.P = 667;
 34464                e.Q = 778;
 34465                e.R = 722;
 34466                e.S = 667;
 34467                e.T = 611;
 34468                e.U = 722;
 34469                e.V = 667;
 34470                e.W = 944;
 34471                e.X = 667;
 34472                e.Y = 667;
 34473                e.Z = 611;
 34474                e.bracketleft = 333;
 34475                e.backslash = 278;
 34476                e.bracketright = 333;
 34477                e.asciicircum = 584;
 34478                e.underscore = 556;
 34479                e.quoteleft = 278;
 34480                e.a = 556;
 34481                e.b = 611;
 34482                e.c = 556;
 34483                e.d = 611;
 34484                e.e = 556;
 34485                e.f = 333;
 34486                e.g = 611;
 34487                e.h = 611;
 34488                e.i = 278;
 34489                e.j = 278;
 34490                e.k = 556;
 34491                e.l = 278;
 34492                e.m = 889;
 34493                e.n = 611;
 34494                e.o = 611;
 34495                e.p = 611;
 34496                e.q = 611;
 34497                e.r = 389;
 34498                e.s = 556;
 34499                e.t = 333;
 34500                e.u = 611;
 34501                e.v = 556;
 34502                e.w = 778;
 34503                e.x = 556;
 34504                e.y = 556;
 34505                e.z = 500;
 34506                e.braceleft = 389;
 34507                e.bar = 280;
 34508                e.braceright = 389;
 34509                e.asciitilde = 584;
 34510                e.exclamdown = 333;
 34511                e.cent = 556;
 34512                e.sterling = 556;
 34513                e.fraction = 167;
 34514                e.yen = 556;
 34515                e.florin = 556;
 34516                e.section = 556;
 34517                e.currency = 556;
 34518                e.quotesingle = 238;
 34519                e.quotedblleft = 500;
 34520                e.guillemotleft = 556;
 34521                e.guilsinglleft = 333;
 34522                e.guilsinglright = 333;
 34523                e.fi = 611;
 34524                e.fl = 611;
 34525                e.endash = 556;
 34526                e.dagger = 556;
 34527                e.daggerdbl = 556;
 34528                e.periodcentered = 278;
 34529                e.paragraph = 556;
 34530                e.bullet = 350;
 34531                e.quotesinglbase = 278;
 34532                e.quotedblbase = 500;
 34533                e.quotedblright = 500;
 34534                e.guillemotright = 556;
 34535                e.ellipsis = 1e3;
 34536                e.perthousand = 1e3;
 34537                e.questiondown = 611;
 34538                e.grave = 333;
 34539                e.acute = 333;
 34540                e.circumflex = 333;
 34541                e.tilde = 333;
 34542                e.macron = 333;
 34543                e.breve = 333;
 34544                e.dotaccent = 333;
 34545                e.dieresis = 333;
 34546                e.ring = 333;
 34547                e.cedilla = 333;
 34548                e.hungarumlaut = 333;
 34549                e.ogonek = 333;
 34550                e.caron = 333;
 34551                e.emdash = 1e3;
 34552                e.AE = 1e3;
 34553                e.ordfeminine = 370;
 34554                e.Lslash = 611;
 34555                e.Oslash = 778;
 34556                e.OE = 1e3;
 34557                e.ordmasculine = 365;
 34558                e.ae = 889;
 34559                e.dotlessi = 278;
 34560                e.lslash = 278;
 34561                e.oslash = 611;
 34562                e.oe = 944;
 34563                e.germandbls = 611;
 34564                e.Idieresis = 278;
 34565                e.eacute = 556;
 34566                e.abreve = 556;
 34567                e.uhungarumlaut = 611;
 34568                e.ecaron = 556;
 34569                e.Ydieresis = 667;
 34570                e.divide = 584;
 34571                e.Yacute = 667;
 34572                e.Acircumflex = 722;
 34573                e.aacute = 556;
 34574                e.Ucircumflex = 722;
 34575                e.yacute = 556;
 34576                e.scommaaccent = 556;
 34577                e.ecircumflex = 556;
 34578                e.Uring = 722;
 34579                e.Udieresis = 722;
 34580                e.aogonek = 556;
 34581                e.Uacute = 722;
 34582                e.uogonek = 611;
 34583                e.Edieresis = 667;
 34584                e.Dcroat = 722;
 34585                e.commaaccent = 250;
 34586                e.copyright = 737;
 34587                e.Emacron = 667;
 34588                e.ccaron = 556;
 34589                e.aring = 556;
 34590                e.Ncommaaccent = 722;
 34591                e.lacute = 278;
 34592                e.agrave = 556;
 34593                e.Tcommaaccent = 611;
 34594                e.Cacute = 722;
 34595                e.atilde = 556;
 34596                e.Edotaccent = 667;
 34597                e.scaron = 556;
 34598                e.scedilla = 556;
 34599                e.iacute = 278;
 34600                e.lozenge = 494;
 34601                e.Rcaron = 722;
 34602                e.Gcommaaccent = 778;
 34603                e.ucircumflex = 611;
 34604                e.acircumflex = 556;
 34605                e.Amacron = 722;
 34606                e.rcaron = 389;
 34607                e.ccedilla = 556;
 34608                e.Zdotaccent = 611;
 34609                e.Thorn = 667;
 34610                e.Omacron = 778;
 34611                e.Racute = 722;
 34612                e.Sacute = 667;
 34613                e.dcaron = 743;
 34614                e.Umacron = 722;
 34615                e.uring = 611;
 34616                e.threesuperior = 333;
 34617                e.Ograve = 778;
 34618                e.Agrave = 722;
 34619                e.Abreve = 722;
 34620                e.multiply = 584;
 34621                e.uacute = 611;
 34622                e.Tcaron = 611;
 34623                e.partialdiff = 494;
 34624                e.ydieresis = 556;
 34625                e.Nacute = 722;
 34626                e.icircumflex = 278;
 34627                e.Ecircumflex = 667;
 34628                e.adieresis = 556;
 34629                e.edieresis = 556;
 34630                e.cacute = 556;
 34631                e.nacute = 611;
 34632                e.umacron = 611;
 34633                e.Ncaron = 722;
 34634                e.Iacute = 278;
 34635                e.plusminus = 584;
 34636                e.brokenbar = 280;
 34637                e.registered = 737;
 34638                e.Gbreve = 778;
 34639                e.Idotaccent = 278;
 34640                e.summation = 600;
 34641                e.Egrave = 667;
 34642                e.racute = 389;
 34643                e.omacron = 611;
 34644                e.Zacute = 611;
 34645                e.Zcaron = 611;
 34646                e.greaterequal = 549;
 34647                e.Eth = 722;
 34648                e.Ccedilla = 722;
 34649                e.lcommaaccent = 278;
 34650                e.tcaron = 389;
 34651                e.eogonek = 556;
 34652                e.Uogonek = 722;
 34653                e.Aacute = 722;
 34654                e.Adieresis = 722;
 34655                e.egrave = 556;
 34656                e.zacute = 500;
 34657                e.iogonek = 278;
 34658                e.Oacute = 778;
 34659                e.oacute = 611;
 34660                e.amacron = 556;
 34661                e.sacute = 556;
 34662                e.idieresis = 278;
 34663                e.Ocircumflex = 778;
 34664                e.Ugrave = 722;
 34665                e.Delta = 612;
 34666                e.thorn = 611;
 34667                e.twosuperior = 333;
 34668                e.Odieresis = 778;
 34669                e.mu = 611;
 34670                e.igrave = 278;
 34671                e.ohungarumlaut = 611;
 34672                e.Eogonek = 667;
 34673                e.dcroat = 611;
 34674                e.threequarters = 834;
 34675                e.Scedilla = 667;
 34676                e.lcaron = 400;
 34677                e.Kcommaaccent = 722;
 34678                e.Lacute = 611;
 34679                e.trademark = 1e3;
 34680                e.edotaccent = 556;
 34681                e.Igrave = 278;
 34682                e.Imacron = 278;
 34683                e.Lcaron = 611;
 34684                e.onehalf = 834;
 34685                e.lessequal = 549;
 34686                e.ocircumflex = 611;
 34687                e.ntilde = 611;
 34688                e.Uhungarumlaut = 722;
 34689                e.Eacute = 667;
 34690                e.emacron = 556;
 34691                e.gbreve = 611;
 34692                e.onequarter = 834;
 34693                e.Scaron = 667;
 34694                e.Scommaaccent = 667;
 34695                e.Ohungarumlaut = 778;
 34696                e.degree = 400;
 34697                e.ograve = 611;
 34698                e.Ccaron = 722;
 34699                e.ugrave = 611;
 34700                e.radical = 549;
 34701                e.Dcaron = 722;
 34702                e.rcommaaccent = 389;
 34703                e.Ntilde = 722;
 34704                e.otilde = 611;
 34705                e.Rcommaaccent = 722;
 34706                e.Lcommaaccent = 611;
 34707                e.Atilde = 722;
 34708                e.Aogonek = 722;
 34709                e.Aring = 722;
 34710                e.Otilde = 778;
 34711                e.zdotaccent = 500;
 34712                e.Ecaron = 667;
 34713                e.Iogonek = 278;
 34714                e.kcommaaccent = 556;
 34715                e.minus = 584;
 34716                e.Icircumflex = 278;
 34717                e.ncaron = 611;
 34718                e.tcommaaccent = 333;
 34719                e.logicalnot = 584;
 34720                e.odieresis = 611;
 34721                e.udieresis = 611;
 34722                e.notequal = 549;
 34723                e.gcommaaccent = 611;
 34724                e.eth = 611;
 34725                e.zcaron = 500;
 34726                e.ncommaaccent = 611;
 34727                e.onesuperior = 333;
 34728                e.imacron = 278;
 34729                e.Euro = 556;
 34730              });
 34731              e["Helvetica-BoldOblique"] = (0, r.getLookupTableFactory)(
 34732                function (e) {
 34733                  e.space = 278;
 34734                  e.exclam = 333;
 34735                  e.quotedbl = 474;
 34736                  e.numbersign = 556;
 34737                  e.dollar = 556;
 34738                  e.percent = 889;
 34739                  e.ampersand = 722;
 34740                  e.quoteright = 278;
 34741                  e.parenleft = 333;
 34742                  e.parenright = 333;
 34743                  e.asterisk = 389;
 34744                  e.plus = 584;
 34745                  e.comma = 278;
 34746                  e.hyphen = 333;
 34747                  e.period = 278;
 34748                  e.slash = 278;
 34749                  e.zero = 556;
 34750                  e.one = 556;
 34751                  e.two = 556;
 34752                  e.three = 556;
 34753                  e.four = 556;
 34754                  e.five = 556;
 34755                  e.six = 556;
 34756                  e.seven = 556;
 34757                  e.eight = 556;
 34758                  e.nine = 556;
 34759                  e.colon = 333;
 34760                  e.semicolon = 333;
 34761                  e.less = 584;
 34762                  e.equal = 584;
 34763                  e.greater = 584;
 34764                  e.question = 611;
 34765                  e.at = 975;
 34766                  e.A = 722;
 34767                  e.B = 722;
 34768                  e.C = 722;
 34769                  e.D = 722;
 34770                  e.E = 667;
 34771                  e.F = 611;
 34772                  e.G = 778;
 34773                  e.H = 722;
 34774                  e.I = 278;
 34775                  e.J = 556;
 34776                  e.K = 722;
 34777                  e.L = 611;
 34778                  e.M = 833;
 34779                  e.N = 722;
 34780                  e.O = 778;
 34781                  e.P = 667;
 34782                  e.Q = 778;
 34783                  e.R = 722;
 34784                  e.S = 667;
 34785                  e.T = 611;
 34786                  e.U = 722;
 34787                  e.V = 667;
 34788                  e.W = 944;
 34789                  e.X = 667;
 34790                  e.Y = 667;
 34791                  e.Z = 611;
 34792                  e.bracketleft = 333;
 34793                  e.backslash = 278;
 34794                  e.bracketright = 333;
 34795                  e.asciicircum = 584;
 34796                  e.underscore = 556;
 34797                  e.quoteleft = 278;
 34798                  e.a = 556;
 34799                  e.b = 611;
 34800                  e.c = 556;
 34801                  e.d = 611;
 34802                  e.e = 556;
 34803                  e.f = 333;
 34804                  e.g = 611;
 34805                  e.h = 611;
 34806                  e.i = 278;
 34807                  e.j = 278;
 34808                  e.k = 556;
 34809                  e.l = 278;
 34810                  e.m = 889;
 34811                  e.n = 611;
 34812                  e.o = 611;
 34813                  e.p = 611;
 34814                  e.q = 611;
 34815                  e.r = 389;
 34816                  e.s = 556;
 34817                  e.t = 333;
 34818                  e.u = 611;
 34819                  e.v = 556;
 34820                  e.w = 778;
 34821                  e.x = 556;
 34822                  e.y = 556;
 34823                  e.z = 500;
 34824                  e.braceleft = 389;
 34825                  e.bar = 280;
 34826                  e.braceright = 389;
 34827                  e.asciitilde = 584;
 34828                  e.exclamdown = 333;
 34829                  e.cent = 556;
 34830                  e.sterling = 556;
 34831                  e.fraction = 167;
 34832                  e.yen = 556;
 34833                  e.florin = 556;
 34834                  e.section = 556;
 34835                  e.currency = 556;
 34836                  e.quotesingle = 238;
 34837                  e.quotedblleft = 500;
 34838                  e.guillemotleft = 556;
 34839                  e.guilsinglleft = 333;
 34840                  e.guilsinglright = 333;
 34841                  e.fi = 611;
 34842                  e.fl = 611;
 34843                  e.endash = 556;
 34844                  e.dagger = 556;
 34845                  e.daggerdbl = 556;
 34846                  e.periodcentered = 278;
 34847                  e.paragraph = 556;
 34848                  e.bullet = 350;
 34849                  e.quotesinglbase = 278;
 34850                  e.quotedblbase = 500;
 34851                  e.quotedblright = 500;
 34852                  e.guillemotright = 556;
 34853                  e.ellipsis = 1e3;
 34854                  e.perthousand = 1e3;
 34855                  e.questiondown = 611;
 34856                  e.grave = 333;
 34857                  e.acute = 333;
 34858                  e.circumflex = 333;
 34859                  e.tilde = 333;
 34860                  e.macron = 333;
 34861                  e.breve = 333;
 34862                  e.dotaccent = 333;
 34863                  e.dieresis = 333;
 34864                  e.ring = 333;
 34865                  e.cedilla = 333;
 34866                  e.hungarumlaut = 333;
 34867                  e.ogonek = 333;
 34868                  e.caron = 333;
 34869                  e.emdash = 1e3;
 34870                  e.AE = 1e3;
 34871                  e.ordfeminine = 370;
 34872                  e.Lslash = 611;
 34873                  e.Oslash = 778;
 34874                  e.OE = 1e3;
 34875                  e.ordmasculine = 365;
 34876                  e.ae = 889;
 34877                  e.dotlessi = 278;
 34878                  e.lslash = 278;
 34879                  e.oslash = 611;
 34880                  e.oe = 944;
 34881                  e.germandbls = 611;
 34882                  e.Idieresis = 278;
 34883                  e.eacute = 556;
 34884                  e.abreve = 556;
 34885                  e.uhungarumlaut = 611;
 34886                  e.ecaron = 556;
 34887                  e.Ydieresis = 667;
 34888                  e.divide = 584;
 34889                  e.Yacute = 667;
 34890                  e.Acircumflex = 722;
 34891                  e.aacute = 556;
 34892                  e.Ucircumflex = 722;
 34893                  e.yacute = 556;
 34894                  e.scommaaccent = 556;
 34895                  e.ecircumflex = 556;
 34896                  e.Uring = 722;
 34897                  e.Udieresis = 722;
 34898                  e.aogonek = 556;
 34899                  e.Uacute = 722;
 34900                  e.uogonek = 611;
 34901                  e.Edieresis = 667;
 34902                  e.Dcroat = 722;
 34903                  e.commaaccent = 250;
 34904                  e.copyright = 737;
 34905                  e.Emacron = 667;
 34906                  e.ccaron = 556;
 34907                  e.aring = 556;
 34908                  e.Ncommaaccent = 722;
 34909                  e.lacute = 278;
 34910                  e.agrave = 556;
 34911                  e.Tcommaaccent = 611;
 34912                  e.Cacute = 722;
 34913                  e.atilde = 556;
 34914                  e.Edotaccent = 667;
 34915                  e.scaron = 556;
 34916                  e.scedilla = 556;
 34917                  e.iacute = 278;
 34918                  e.lozenge = 494;
 34919                  e.Rcaron = 722;
 34920                  e.Gcommaaccent = 778;
 34921                  e.ucircumflex = 611;
 34922                  e.acircumflex = 556;
 34923                  e.Amacron = 722;
 34924                  e.rcaron = 389;
 34925                  e.ccedilla = 556;
 34926                  e.Zdotaccent = 611;
 34927                  e.Thorn = 667;
 34928                  e.Omacron = 778;
 34929                  e.Racute = 722;
 34930                  e.Sacute = 667;
 34931                  e.dcaron = 743;
 34932                  e.Umacron = 722;
 34933                  e.uring = 611;
 34934                  e.threesuperior = 333;
 34935                  e.Ograve = 778;
 34936                  e.Agrave = 722;
 34937                  e.Abreve = 722;
 34938                  e.multiply = 584;
 34939                  e.uacute = 611;
 34940                  e.Tcaron = 611;
 34941                  e.partialdiff = 494;
 34942                  e.ydieresis = 556;
 34943                  e.Nacute = 722;
 34944                  e.icircumflex = 278;
 34945                  e.Ecircumflex = 667;
 34946                  e.adieresis = 556;
 34947                  e.edieresis = 556;
 34948                  e.cacute = 556;
 34949                  e.nacute = 611;
 34950                  e.umacron = 611;
 34951                  e.Ncaron = 722;
 34952                  e.Iacute = 278;
 34953                  e.plusminus = 584;
 34954                  e.brokenbar = 280;
 34955                  e.registered = 737;
 34956                  e.Gbreve = 778;
 34957                  e.Idotaccent = 278;
 34958                  e.summation = 600;
 34959                  e.Egrave = 667;
 34960                  e.racute = 389;
 34961                  e.omacron = 611;
 34962                  e.Zacute = 611;
 34963                  e.Zcaron = 611;
 34964                  e.greaterequal = 549;
 34965                  e.Eth = 722;
 34966                  e.Ccedilla = 722;
 34967                  e.lcommaaccent = 278;
 34968                  e.tcaron = 389;
 34969                  e.eogonek = 556;
 34970                  e.Uogonek = 722;
 34971                  e.Aacute = 722;
 34972                  e.Adieresis = 722;
 34973                  e.egrave = 556;
 34974                  e.zacute = 500;
 34975                  e.iogonek = 278;
 34976                  e.Oacute = 778;
 34977                  e.oacute = 611;
 34978                  e.amacron = 556;
 34979                  e.sacute = 556;
 34980                  e.idieresis = 278;
 34981                  e.Ocircumflex = 778;
 34982                  e.Ugrave = 722;
 34983                  e.Delta = 612;
 34984                  e.thorn = 611;
 34985                  e.twosuperior = 333;
 34986                  e.Odieresis = 778;
 34987                  e.mu = 611;
 34988                  e.igrave = 278;
 34989                  e.ohungarumlaut = 611;
 34990                  e.Eogonek = 667;
 34991                  e.dcroat = 611;
 34992                  e.threequarters = 834;
 34993                  e.Scedilla = 667;
 34994                  e.lcaron = 400;
 34995                  e.Kcommaaccent = 722;
 34996                  e.Lacute = 611;
 34997                  e.trademark = 1e3;
 34998                  e.edotaccent = 556;
 34999                  e.Igrave = 278;
 35000                  e.Imacron = 278;
 35001                  e.Lcaron = 611;
 35002                  e.onehalf = 834;
 35003                  e.lessequal = 549;
 35004                  e.ocircumflex = 611;
 35005                  e.ntilde = 611;
 35006                  e.Uhungarumlaut = 722;
 35007                  e.Eacute = 667;
 35008                  e.emacron = 556;
 35009                  e.gbreve = 611;
 35010                  e.onequarter = 834;
 35011                  e.Scaron = 667;
 35012                  e.Scommaaccent = 667;
 35013                  e.Ohungarumlaut = 778;
 35014                  e.degree = 400;
 35015                  e.ograve = 611;
 35016                  e.Ccaron = 722;
 35017                  e.ugrave = 611;
 35018                  e.radical = 549;
 35019                  e.Dcaron = 722;
 35020                  e.rcommaaccent = 389;
 35021                  e.Ntilde = 722;
 35022                  e.otilde = 611;
 35023                  e.Rcommaaccent = 722;
 35024                  e.Lcommaaccent = 611;
 35025                  e.Atilde = 722;
 35026                  e.Aogonek = 722;
 35027                  e.Aring = 722;
 35028                  e.Otilde = 778;
 35029                  e.zdotaccent = 500;
 35030                  e.Ecaron = 667;
 35031                  e.Iogonek = 278;
 35032                  e.kcommaaccent = 556;
 35033                  e.minus = 584;
 35034                  e.Icircumflex = 278;
 35035                  e.ncaron = 611;
 35036                  e.tcommaaccent = 333;
 35037                  e.logicalnot = 584;
 35038                  e.odieresis = 611;
 35039                  e.udieresis = 611;
 35040                  e.notequal = 549;
 35041                  e.gcommaaccent = 611;
 35042                  e.eth = 611;
 35043                  e.zcaron = 500;
 35044                  e.ncommaaccent = 611;
 35045                  e.onesuperior = 333;
 35046                  e.imacron = 278;
 35047                  e.Euro = 556;
 35048                },
 35049              );
 35050              e["Helvetica-Oblique"] = (0, r.getLookupTableFactory)(function (e) {
 35051                e.space = 278;
 35052                e.exclam = 278;
 35053                e.quotedbl = 355;
 35054                e.numbersign = 556;
 35055                e.dollar = 556;
 35056                e.percent = 889;
 35057                e.ampersand = 667;
 35058                e.quoteright = 222;
 35059                e.parenleft = 333;
 35060                e.parenright = 333;
 35061                e.asterisk = 389;
 35062                e.plus = 584;
 35063                e.comma = 278;
 35064                e.hyphen = 333;
 35065                e.period = 278;
 35066                e.slash = 278;
 35067                e.zero = 556;
 35068                e.one = 556;
 35069                e.two = 556;
 35070                e.three = 556;
 35071                e.four = 556;
 35072                e.five = 556;
 35073                e.six = 556;
 35074                e.seven = 556;
 35075                e.eight = 556;
 35076                e.nine = 556;
 35077                e.colon = 278;
 35078                e.semicolon = 278;
 35079                e.less = 584;
 35080                e.equal = 584;
 35081                e.greater = 584;
 35082                e.question = 556;
 35083                e.at = 1015;
 35084                e.A = 667;
 35085                e.B = 667;
 35086                e.C = 722;
 35087                e.D = 722;
 35088                e.E = 667;
 35089                e.F = 611;
 35090                e.G = 778;
 35091                e.H = 722;
 35092                e.I = 278;
 35093                e.J = 500;
 35094                e.K = 667;
 35095                e.L = 556;
 35096                e.M = 833;
 35097                e.N = 722;
 35098                e.O = 778;
 35099                e.P = 667;
 35100                e.Q = 778;
 35101                e.R = 722;
 35102                e.S = 667;
 35103                e.T = 611;
 35104                e.U = 722;
 35105                e.V = 667;
 35106                e.W = 944;
 35107                e.X = 667;
 35108                e.Y = 667;
 35109                e.Z = 611;
 35110                e.bracketleft = 278;
 35111                e.backslash = 278;
 35112                e.bracketright = 278;
 35113                e.asciicircum = 469;
 35114                e.underscore = 556;
 35115                e.quoteleft = 222;
 35116                e.a = 556;
 35117                e.b = 556;
 35118                e.c = 500;
 35119                e.d = 556;
 35120                e.e = 556;
 35121                e.f = 278;
 35122                e.g = 556;
 35123                e.h = 556;
 35124                e.i = 222;
 35125                e.j = 222;
 35126                e.k = 500;
 35127                e.l = 222;
 35128                e.m = 833;
 35129                e.n = 556;
 35130                e.o = 556;
 35131                e.p = 556;
 35132                e.q = 556;
 35133                e.r = 333;
 35134                e.s = 500;
 35135                e.t = 278;
 35136                e.u = 556;
 35137                e.v = 500;
 35138                e.w = 722;
 35139                e.x = 500;
 35140                e.y = 500;
 35141                e.z = 500;
 35142                e.braceleft = 334;
 35143                e.bar = 260;
 35144                e.braceright = 334;
 35145                e.asciitilde = 584;
 35146                e.exclamdown = 333;
 35147                e.cent = 556;
 35148                e.sterling = 556;
 35149                e.fraction = 167;
 35150                e.yen = 556;
 35151                e.florin = 556;
 35152                e.section = 556;
 35153                e.currency = 556;
 35154                e.quotesingle = 191;
 35155                e.quotedblleft = 333;
 35156                e.guillemotleft = 556;
 35157                e.guilsinglleft = 333;
 35158                e.guilsinglright = 333;
 35159                e.fi = 500;
 35160                e.fl = 500;
 35161                e.endash = 556;
 35162                e.dagger = 556;
 35163                e.daggerdbl = 556;
 35164                e.periodcentered = 278;
 35165                e.paragraph = 537;
 35166                e.bullet = 350;
 35167                e.quotesinglbase = 222;
 35168                e.quotedblbase = 333;
 35169                e.quotedblright = 333;
 35170                e.guillemotright = 556;
 35171                e.ellipsis = 1e3;
 35172                e.perthousand = 1e3;
 35173                e.questiondown = 611;
 35174                e.grave = 333;
 35175                e.acute = 333;
 35176                e.circumflex = 333;
 35177                e.tilde = 333;
 35178                e.macron = 333;
 35179                e.breve = 333;
 35180                e.dotaccent = 333;
 35181                e.dieresis = 333;
 35182                e.ring = 333;
 35183                e.cedilla = 333;
 35184                e.hungarumlaut = 333;
 35185                e.ogonek = 333;
 35186                e.caron = 333;
 35187                e.emdash = 1e3;
 35188                e.AE = 1e3;
 35189                e.ordfeminine = 370;
 35190                e.Lslash = 556;
 35191                e.Oslash = 778;
 35192                e.OE = 1e3;
 35193                e.ordmasculine = 365;
 35194                e.ae = 889;
 35195                e.dotlessi = 278;
 35196                e.lslash = 222;
 35197                e.oslash = 611;
 35198                e.oe = 944;
 35199                e.germandbls = 611;
 35200                e.Idieresis = 278;
 35201                e.eacute = 556;
 35202                e.abreve = 556;
 35203                e.uhungarumlaut = 556;
 35204                e.ecaron = 556;
 35205                e.Ydieresis = 667;
 35206                e.divide = 584;
 35207                e.Yacute = 667;
 35208                e.Acircumflex = 667;
 35209                e.aacute = 556;
 35210                e.Ucircumflex = 722;
 35211                e.yacute = 500;
 35212                e.scommaaccent = 500;
 35213                e.ecircumflex = 556;
 35214                e.Uring = 722;
 35215                e.Udieresis = 722;
 35216                e.aogonek = 556;
 35217                e.Uacute = 722;
 35218                e.uogonek = 556;
 35219                e.Edieresis = 667;
 35220                e.Dcroat = 722;
 35221                e.commaaccent = 250;
 35222                e.copyright = 737;
 35223                e.Emacron = 667;
 35224                e.ccaron = 500;
 35225                e.aring = 556;
 35226                e.Ncommaaccent = 722;
 35227                e.lacute = 222;
 35228                e.agrave = 556;
 35229                e.Tcommaaccent = 611;
 35230                e.Cacute = 722;
 35231                e.atilde = 556;
 35232                e.Edotaccent = 667;
 35233                e.scaron = 500;
 35234                e.scedilla = 500;
 35235                e.iacute = 278;
 35236                e.lozenge = 471;
 35237                e.Rcaron = 722;
 35238                e.Gcommaaccent = 778;
 35239                e.ucircumflex = 556;
 35240                e.acircumflex = 556;
 35241                e.Amacron = 667;
 35242                e.rcaron = 333;
 35243                e.ccedilla = 500;
 35244                e.Zdotaccent = 611;
 35245                e.Thorn = 667;
 35246                e.Omacron = 778;
 35247                e.Racute = 722;
 35248                e.Sacute = 667;
 35249                e.dcaron = 643;
 35250                e.Umacron = 722;
 35251                e.uring = 556;
 35252                e.threesuperior = 333;
 35253                e.Ograve = 778;
 35254                e.Agrave = 667;
 35255                e.Abreve = 667;
 35256                e.multiply = 584;
 35257                e.uacute = 556;
 35258                e.Tcaron = 611;
 35259                e.partialdiff = 476;
 35260                e.ydieresis = 500;
 35261                e.Nacute = 722;
 35262                e.icircumflex = 278;
 35263                e.Ecircumflex = 667;
 35264                e.adieresis = 556;
 35265                e.edieresis = 556;
 35266                e.cacute = 500;
 35267                e.nacute = 556;
 35268                e.umacron = 556;
 35269                e.Ncaron = 722;
 35270                e.Iacute = 278;
 35271                e.plusminus = 584;
 35272                e.brokenbar = 260;
 35273                e.registered = 737;
 35274                e.Gbreve = 778;
 35275                e.Idotaccent = 278;
 35276                e.summation = 600;
 35277                e.Egrave = 667;
 35278                e.racute = 333;
 35279                e.omacron = 556;
 35280                e.Zacute = 611;
 35281                e.Zcaron = 611;
 35282                e.greaterequal = 549;
 35283                e.Eth = 722;
 35284                e.Ccedilla = 722;
 35285                e.lcommaaccent = 222;
 35286                e.tcaron = 317;
 35287                e.eogonek = 556;
 35288                e.Uogonek = 722;
 35289                e.Aacute = 667;
 35290                e.Adieresis = 667;
 35291                e.egrave = 556;
 35292                e.zacute = 500;
 35293                e.iogonek = 222;
 35294                e.Oacute = 778;
 35295                e.oacute = 556;
 35296                e.amacron = 556;
 35297                e.sacute = 500;
 35298                e.idieresis = 278;
 35299                e.Ocircumflex = 778;
 35300                e.Ugrave = 722;
 35301                e.Delta = 612;
 35302                e.thorn = 556;
 35303                e.twosuperior = 333;
 35304                e.Odieresis = 778;
 35305                e.mu = 556;
 35306                e.igrave = 278;
 35307                e.ohungarumlaut = 556;
 35308                e.Eogonek = 667;
 35309                e.dcroat = 556;
 35310                e.threequarters = 834;
 35311                e.Scedilla = 667;
 35312                e.lcaron = 299;
 35313                e.Kcommaaccent = 667;
 35314                e.Lacute = 556;
 35315                e.trademark = 1e3;
 35316                e.edotaccent = 556;
 35317                e.Igrave = 278;
 35318                e.Imacron = 278;
 35319                e.Lcaron = 556;
 35320                e.onehalf = 834;
 35321                e.lessequal = 549;
 35322                e.ocircumflex = 556;
 35323                e.ntilde = 556;
 35324                e.Uhungarumlaut = 722;
 35325                e.Eacute = 667;
 35326                e.emacron = 556;
 35327                e.gbreve = 556;
 35328                e.onequarter = 834;
 35329                e.Scaron = 667;
 35330                e.Scommaaccent = 667;
 35331                e.Ohungarumlaut = 778;
 35332                e.degree = 400;
 35333                e.ograve = 556;
 35334                e.Ccaron = 722;
 35335                e.ugrave = 556;
 35336                e.radical = 453;
 35337                e.Dcaron = 722;
 35338                e.rcommaaccent = 333;
 35339                e.Ntilde = 722;
 35340                e.otilde = 556;
 35341                e.Rcommaaccent = 722;
 35342                e.Lcommaaccent = 556;
 35343                e.Atilde = 667;
 35344                e.Aogonek = 667;
 35345                e.Aring = 667;
 35346                e.Otilde = 778;
 35347                e.zdotaccent = 500;
 35348                e.Ecaron = 667;
 35349                e.Iogonek = 278;
 35350                e.kcommaaccent = 500;
 35351                e.minus = 584;
 35352                e.Icircumflex = 278;
 35353                e.ncaron = 556;
 35354                e.tcommaaccent = 278;
 35355                e.logicalnot = 584;
 35356                e.odieresis = 556;
 35357                e.udieresis = 556;
 35358                e.notequal = 549;
 35359                e.gcommaaccent = 556;
 35360                e.eth = 556;
 35361                e.zcaron = 500;
 35362                e.ncommaaccent = 556;
 35363                e.onesuperior = 333;
 35364                e.imacron = 278;
 35365                e.Euro = 556;
 35366              });
 35367              e.Symbol = (0, r.getLookupTableFactory)(function (e) {
 35368                e.space = 250;
 35369                e.exclam = 333;
 35370                e.universal = 713;
 35371                e.numbersign = 500;
 35372                e.existential = 549;
 35373                e.percent = 833;
 35374                e.ampersand = 778;
 35375                e.suchthat = 439;
 35376                e.parenleft = 333;
 35377                e.parenright = 333;
 35378                e.asteriskmath = 500;
 35379                e.plus = 549;
 35380                e.comma = 250;
 35381                e.minus = 549;
 35382                e.period = 250;
 35383                e.slash = 278;
 35384                e.zero = 500;
 35385                e.one = 500;
 35386                e.two = 500;
 35387                e.three = 500;
 35388                e.four = 500;
 35389                e.five = 500;
 35390                e.six = 500;
 35391                e.seven = 500;
 35392                e.eight = 500;
 35393                e.nine = 500;
 35394                e.colon = 278;
 35395                e.semicolon = 278;
 35396                e.less = 549;
 35397                e.equal = 549;
 35398                e.greater = 549;
 35399                e.question = 444;
 35400                e.congruent = 549;
 35401                e.Alpha = 722;
 35402                e.Beta = 667;
 35403                e.Chi = 722;
 35404                e.Delta = 612;
 35405                e.Epsilon = 611;
 35406                e.Phi = 763;
 35407                e.Gamma = 603;
 35408                e.Eta = 722;
 35409                e.Iota = 333;
 35410                e.theta1 = 631;
 35411                e.Kappa = 722;
 35412                e.Lambda = 686;
 35413                e.Mu = 889;
 35414                e.Nu = 722;
 35415                e.Omicron = 722;
 35416                e.Pi = 768;
 35417                e.Theta = 741;
 35418                e.Rho = 556;
 35419                e.Sigma = 592;
 35420                e.Tau = 611;
 35421                e.Upsilon = 690;
 35422                e.sigma1 = 439;
 35423                e.Omega = 768;
 35424                e.Xi = 645;
 35425                e.Psi = 795;
 35426                e.Zeta = 611;
 35427                e.bracketleft = 333;
 35428                e.therefore = 863;
 35429                e.bracketright = 333;
 35430                e.perpendicular = 658;
 35431                e.underscore = 500;
 35432                e.radicalex = 500;
 35433                e.alpha = 631;
 35434                e.beta = 549;
 35435                e.chi = 549;
 35436                e.delta = 494;
 35437                e.epsilon = 439;
 35438                e.phi = 521;
 35439                e.gamma = 411;
 35440                e.eta = 603;
 35441                e.iota = 329;
 35442                e.phi1 = 603;
 35443                e.kappa = 549;
 35444                e.lambda = 549;
 35445                e.mu = 576;
 35446                e.nu = 521;
 35447                e.omicron = 549;
 35448                e.pi = 549;
 35449                e.theta = 521;
 35450                e.rho = 549;
 35451                e.sigma = 603;
 35452                e.tau = 439;
 35453                e.upsilon = 576;
 35454                e.omega1 = 713;
 35455                e.omega = 686;
 35456                e.xi = 493;
 35457                e.psi = 686;
 35458                e.zeta = 494;
 35459                e.braceleft = 480;
 35460                e.bar = 200;
 35461                e.braceright = 480;
 35462                e.similar = 549;
 35463                e.Euro = 750;
 35464                e.Upsilon1 = 620;
 35465                e.minute = 247;
 35466                e.lessequal = 549;
 35467                e.fraction = 167;
 35468                e.infinity = 713;
 35469                e.florin = 500;
 35470                e.club = 753;
 35471                e.diamond = 753;
 35472                e.heart = 753;
 35473                e.spade = 753;
 35474                e.arrowboth = 1042;
 35475                e.arrowleft = 987;
 35476                e.arrowup = 603;
 35477                e.arrowright = 987;
 35478                e.arrowdown = 603;
 35479                e.degree = 400;
 35480                e.plusminus = 549;
 35481                e.second = 411;
 35482                e.greaterequal = 549;
 35483                e.multiply = 549;
 35484                e.proportional = 713;
 35485                e.partialdiff = 494;
 35486                e.bullet = 460;
 35487                e.divide = 549;
 35488                e.notequal = 549;
 35489                e.equivalence = 549;
 35490                e.approxequal = 549;
 35491                e.ellipsis = 1e3;
 35492                e.arrowvertex = 603;
 35493                e.arrowhorizex = 1e3;
 35494                e.carriagereturn = 658;
 35495                e.aleph = 823;
 35496                e.Ifraktur = 686;
 35497                e.Rfraktur = 795;
 35498                e.weierstrass = 987;
 35499                e.circlemultiply = 768;
 35500                e.circleplus = 768;
 35501                e.emptyset = 823;
 35502                e.intersection = 768;
 35503                e.union = 768;
 35504                e.propersuperset = 713;
 35505                e.reflexsuperset = 713;
 35506                e.notsubset = 713;
 35507                e.propersubset = 713;
 35508                e.reflexsubset = 713;
 35509                e.element = 713;
 35510                e.notelement = 713;
 35511                e.angle = 768;
 35512                e.gradient = 713;
 35513                e.registerserif = 790;
 35514                e.copyrightserif = 790;
 35515                e.trademarkserif = 890;
 35516                e.product = 823;
 35517                e.radical = 549;
 35518                e.dotmath = 250;
 35519                e.logicalnot = 713;
 35520                e.logicaland = 603;
 35521                e.logicalor = 603;
 35522                e.arrowdblboth = 1042;
 35523                e.arrowdblleft = 987;
 35524                e.arrowdblup = 603;
 35525                e.arrowdblright = 987;
 35526                e.arrowdbldown = 603;
 35527                e.lozenge = 494;
 35528                e.angleleft = 329;
 35529                e.registersans = 790;
 35530                e.copyrightsans = 790;
 35531                e.trademarksans = 786;
 35532                e.summation = 713;
 35533                e.parenlefttp = 384;
 35534                e.parenleftex = 384;
 35535                e.parenleftbt = 384;
 35536                e.bracketlefttp = 384;
 35537                e.bracketleftex = 384;
 35538                e.bracketleftbt = 384;
 35539                e.bracelefttp = 494;
 35540                e.braceleftmid = 494;
 35541                e.braceleftbt = 494;
 35542                e.braceex = 494;
 35543                e.angleright = 329;
 35544                e.integral = 274;
 35545                e.integraltp = 686;
 35546                e.integralex = 686;
 35547                e.integralbt = 686;
 35548                e.parenrighttp = 384;
 35549                e.parenrightex = 384;
 35550                e.parenrightbt = 384;
 35551                e.bracketrighttp = 384;
 35552                e.bracketrightex = 384;
 35553                e.bracketrightbt = 384;
 35554                e.bracerighttp = 494;
 35555                e.bracerightmid = 494;
 35556                e.bracerightbt = 494;
 35557                e.apple = 790;
 35558              });
 35559              e["Times-Roman"] = (0, r.getLookupTableFactory)(function (e) {
 35560                e.space = 250;
 35561                e.exclam = 333;
 35562                e.quotedbl = 408;
 35563                e.numbersign = 500;
 35564                e.dollar = 500;
 35565                e.percent = 833;
 35566                e.ampersand = 778;
 35567                e.quoteright = 333;
 35568                e.parenleft = 333;
 35569                e.parenright = 333;
 35570                e.asterisk = 500;
 35571                e.plus = 564;
 35572                e.comma = 250;
 35573                e.hyphen = 333;
 35574                e.period = 250;
 35575                e.slash = 278;
 35576                e.zero = 500;
 35577                e.one = 500;
 35578                e.two = 500;
 35579                e.three = 500;
 35580                e.four = 500;
 35581                e.five = 500;
 35582                e.six = 500;
 35583                e.seven = 500;
 35584                e.eight = 500;
 35585                e.nine = 500;
 35586                e.colon = 278;
 35587                e.semicolon = 278;
 35588                e.less = 564;
 35589                e.equal = 564;
 35590                e.greater = 564;
 35591                e.question = 444;
 35592                e.at = 921;
 35593                e.A = 722;
 35594                e.B = 667;
 35595                e.C = 667;
 35596                e.D = 722;
 35597                e.E = 611;
 35598                e.F = 556;
 35599                e.G = 722;
 35600                e.H = 722;
 35601                e.I = 333;
 35602                e.J = 389;
 35603                e.K = 722;
 35604                e.L = 611;
 35605                e.M = 889;
 35606                e.N = 722;
 35607                e.O = 722;
 35608                e.P = 556;
 35609                e.Q = 722;
 35610                e.R = 667;
 35611                e.S = 556;
 35612                e.T = 611;
 35613                e.U = 722;
 35614                e.V = 722;
 35615                e.W = 944;
 35616                e.X = 722;
 35617                e.Y = 722;
 35618                e.Z = 611;
 35619                e.bracketleft = 333;
 35620                e.backslash = 278;
 35621                e.bracketright = 333;
 35622                e.asciicircum = 469;
 35623                e.underscore = 500;
 35624                e.quoteleft = 333;
 35625                e.a = 444;
 35626                e.b = 500;
 35627                e.c = 444;
 35628                e.d = 500;
 35629                e.e = 444;
 35630                e.f = 333;
 35631                e.g = 500;
 35632                e.h = 500;
 35633                e.i = 278;
 35634                e.j = 278;
 35635                e.k = 500;
 35636                e.l = 278;
 35637                e.m = 778;
 35638                e.n = 500;
 35639                e.o = 500;
 35640                e.p = 500;
 35641                e.q = 500;
 35642                e.r = 333;
 35643                e.s = 389;
 35644                e.t = 278;
 35645                e.u = 500;
 35646                e.v = 500;
 35647                e.w = 722;
 35648                e.x = 500;
 35649                e.y = 500;
 35650                e.z = 444;
 35651                e.braceleft = 480;
 35652                e.bar = 200;
 35653                e.braceright = 480;
 35654                e.asciitilde = 541;
 35655                e.exclamdown = 333;
 35656                e.cent = 500;
 35657                e.sterling = 500;
 35658                e.fraction = 167;
 35659                e.yen = 500;
 35660                e.florin = 500;
 35661                e.section = 500;
 35662                e.currency = 500;
 35663                e.quotesingle = 180;
 35664                e.quotedblleft = 444;
 35665                e.guillemotleft = 500;
 35666                e.guilsinglleft = 333;
 35667                e.guilsinglright = 333;
 35668                e.fi = 556;
 35669                e.fl = 556;
 35670                e.endash = 500;
 35671                e.dagger = 500;
 35672                e.daggerdbl = 500;
 35673                e.periodcentered = 250;
 35674                e.paragraph = 453;
 35675                e.bullet = 350;
 35676                e.quotesinglbase = 333;
 35677                e.quotedblbase = 444;
 35678                e.quotedblright = 444;
 35679                e.guillemotright = 500;
 35680                e.ellipsis = 1e3;
 35681                e.perthousand = 1e3;
 35682                e.questiondown = 444;
 35683                e.grave = 333;
 35684                e.acute = 333;
 35685                e.circumflex = 333;
 35686                e.tilde = 333;
 35687                e.macron = 333;
 35688                e.breve = 333;
 35689                e.dotaccent = 333;
 35690                e.dieresis = 333;
 35691                e.ring = 333;
 35692                e.cedilla = 333;
 35693                e.hungarumlaut = 333;
 35694                e.ogonek = 333;
 35695                e.caron = 333;
 35696                e.emdash = 1e3;
 35697                e.AE = 889;
 35698                e.ordfeminine = 276;
 35699                e.Lslash = 611;
 35700                e.Oslash = 722;
 35701                e.OE = 889;
 35702                e.ordmasculine = 310;
 35703                e.ae = 667;
 35704                e.dotlessi = 278;
 35705                e.lslash = 278;
 35706                e.oslash = 500;
 35707                e.oe = 722;
 35708                e.germandbls = 500;
 35709                e.Idieresis = 333;
 35710                e.eacute = 444;
 35711                e.abreve = 444;
 35712                e.uhungarumlaut = 500;
 35713                e.ecaron = 444;
 35714                e.Ydieresis = 722;
 35715                e.divide = 564;
 35716                e.Yacute = 722;
 35717                e.Acircumflex = 722;
 35718                e.aacute = 444;
 35719                e.Ucircumflex = 722;
 35720                e.yacute = 500;
 35721                e.scommaaccent = 389;
 35722                e.ecircumflex = 444;
 35723                e.Uring = 722;
 35724                e.Udieresis = 722;
 35725                e.aogonek = 444;
 35726                e.Uacute = 722;
 35727                e.uogonek = 500;
 35728                e.Edieresis = 611;
 35729                e.Dcroat = 722;
 35730                e.commaaccent = 250;
 35731                e.copyright = 760;
 35732                e.Emacron = 611;
 35733                e.ccaron = 444;
 35734                e.aring = 444;
 35735                e.Ncommaaccent = 722;
 35736                e.lacute = 278;
 35737                e.agrave = 444;
 35738                e.Tcommaaccent = 611;
 35739                e.Cacute = 667;
 35740                e.atilde = 444;
 35741                e.Edotaccent = 611;
 35742                e.scaron = 389;
 35743                e.scedilla = 389;
 35744                e.iacute = 278;
 35745                e.lozenge = 471;
 35746                e.Rcaron = 667;
 35747                e.Gcommaaccent = 722;
 35748                e.ucircumflex = 500;
 35749                e.acircumflex = 444;
 35750                e.Amacron = 722;
 35751                e.rcaron = 333;
 35752                e.ccedilla = 444;
 35753                e.Zdotaccent = 611;
 35754                e.Thorn = 556;
 35755                e.Omacron = 722;
 35756                e.Racute = 667;
 35757                e.Sacute = 556;
 35758                e.dcaron = 588;
 35759                e.Umacron = 722;
 35760                e.uring = 500;
 35761                e.threesuperior = 300;
 35762                e.Ograve = 722;
 35763                e.Agrave = 722;
 35764                e.Abreve = 722;
 35765                e.multiply = 564;
 35766                e.uacute = 500;
 35767                e.Tcaron = 611;
 35768                e.partialdiff = 476;
 35769                e.ydieresis = 500;
 35770                e.Nacute = 722;
 35771                e.icircumflex = 278;
 35772                e.Ecircumflex = 611;
 35773                e.adieresis = 444;
 35774                e.edieresis = 444;
 35775                e.cacute = 444;
 35776                e.nacute = 500;
 35777                e.umacron = 500;
 35778                e.Ncaron = 722;
 35779                e.Iacute = 333;
 35780                e.plusminus = 564;
 35781                e.brokenbar = 200;
 35782                e.registered = 760;
 35783                e.Gbreve = 722;
 35784                e.Idotaccent = 333;
 35785                e.summation = 600;
 35786                e.Egrave = 611;
 35787                e.racute = 333;
 35788                e.omacron = 500;
 35789                e.Zacute = 611;
 35790                e.Zcaron = 611;
 35791                e.greaterequal = 549;
 35792                e.Eth = 722;
 35793                e.Ccedilla = 667;
 35794                e.lcommaaccent = 278;
 35795                e.tcaron = 326;
 35796                e.eogonek = 444;
 35797                e.Uogonek = 722;
 35798                e.Aacute = 722;
 35799                e.Adieresis = 722;
 35800                e.egrave = 444;
 35801                e.zacute = 444;
 35802                e.iogonek = 278;
 35803                e.Oacute = 722;
 35804                e.oacute = 500;
 35805                e.amacron = 444;
 35806                e.sacute = 389;
 35807                e.idieresis = 278;
 35808                e.Ocircumflex = 722;
 35809                e.Ugrave = 722;
 35810                e.Delta = 612;
 35811                e.thorn = 500;
 35812                e.twosuperior = 300;
 35813                e.Odieresis = 722;
 35814                e.mu = 500;
 35815                e.igrave = 278;
 35816                e.ohungarumlaut = 500;
 35817                e.Eogonek = 611;
 35818                e.dcroat = 500;
 35819                e.threequarters = 750;
 35820                e.Scedilla = 556;
 35821                e.lcaron = 344;
 35822                e.Kcommaaccent = 722;
 35823                e.Lacute = 611;
 35824                e.trademark = 980;
 35825                e.edotaccent = 444;
 35826                e.Igrave = 333;
 35827                e.Imacron = 333;
 35828                e.Lcaron = 611;
 35829                e.onehalf = 750;
 35830                e.lessequal = 549;
 35831                e.ocircumflex = 500;
 35832                e.ntilde = 500;
 35833                e.Uhungarumlaut = 722;
 35834                e.Eacute = 611;
 35835                e.emacron = 444;
 35836                e.gbreve = 500;
 35837                e.onequarter = 750;
 35838                e.Scaron = 556;
 35839                e.Scommaaccent = 556;
 35840                e.Ohungarumlaut = 722;
 35841                e.degree = 400;
 35842                e.ograve = 500;
 35843                e.Ccaron = 667;
 35844                e.ugrave = 500;
 35845                e.radical = 453;
 35846                e.Dcaron = 722;
 35847                e.rcommaaccent = 333;
 35848                e.Ntilde = 722;
 35849                e.otilde = 500;
 35850                e.Rcommaaccent = 667;
 35851                e.Lcommaaccent = 611;
 35852                e.Atilde = 722;
 35853                e.Aogonek = 722;
 35854                e.Aring = 722;
 35855                e.Otilde = 722;
 35856                e.zdotaccent = 444;
 35857                e.Ecaron = 611;
 35858                e.Iogonek = 333;
 35859                e.kcommaaccent = 500;
 35860                e.minus = 564;
 35861                e.Icircumflex = 333;
 35862                e.ncaron = 500;
 35863                e.tcommaaccent = 278;
 35864                e.logicalnot = 564;
 35865                e.odieresis = 500;
 35866                e.udieresis = 500;
 35867                e.notequal = 549;
 35868                e.gcommaaccent = 500;
 35869                e.eth = 500;
 35870                e.zcaron = 444;
 35871                e.ncommaaccent = 500;
 35872                e.onesuperior = 300;
 35873                e.imacron = 278;
 35874                e.Euro = 500;
 35875              });
 35876              e["Times-Bold"] = (0, r.getLookupTableFactory)(function (e) {
 35877                e.space = 250;
 35878                e.exclam = 333;
 35879                e.quotedbl = 555;
 35880                e.numbersign = 500;
 35881                e.dollar = 500;
 35882                e.percent = 1e3;
 35883                e.ampersand = 833;
 35884                e.quoteright = 333;
 35885                e.parenleft = 333;
 35886                e.parenright = 333;
 35887                e.asterisk = 500;
 35888                e.plus = 570;
 35889                e.comma = 250;
 35890                e.hyphen = 333;
 35891                e.period = 250;
 35892                e.slash = 278;
 35893                e.zero = 500;
 35894                e.one = 500;
 35895                e.two = 500;
 35896                e.three = 500;
 35897                e.four = 500;
 35898                e.five = 500;
 35899                e.six = 500;
 35900                e.seven = 500;
 35901                e.eight = 500;
 35902                e.nine = 500;
 35903                e.colon = 333;
 35904                e.semicolon = 333;
 35905                e.less = 570;
 35906                e.equal = 570;
 35907                e.greater = 570;
 35908                e.question = 500;
 35909                e.at = 930;
 35910                e.A = 722;
 35911                e.B = 667;
 35912                e.C = 722;
 35913                e.D = 722;
 35914                e.E = 667;
 35915                e.F = 611;
 35916                e.G = 778;
 35917                e.H = 778;
 35918                e.I = 389;
 35919                e.J = 500;
 35920                e.K = 778;
 35921                e.L = 667;
 35922                e.M = 944;
 35923                e.N = 722;
 35924                e.O = 778;
 35925                e.P = 611;
 35926                e.Q = 778;
 35927                e.R = 722;
 35928                e.S = 556;
 35929                e.T = 667;
 35930                e.U = 722;
 35931                e.V = 722;
 35932                e.W = 1e3;
 35933                e.X = 722;
 35934                e.Y = 722;
 35935                e.Z = 667;
 35936                e.bracketleft = 333;
 35937                e.backslash = 278;
 35938                e.bracketright = 333;
 35939                e.asciicircum = 581;
 35940                e.underscore = 500;
 35941                e.quoteleft = 333;
 35942                e.a = 500;
 35943                e.b = 556;
 35944                e.c = 444;
 35945                e.d = 556;
 35946                e.e = 444;
 35947                e.f = 333;
 35948                e.g = 500;
 35949                e.h = 556;
 35950                e.i = 278;
 35951                e.j = 333;
 35952                e.k = 556;
 35953                e.l = 278;
 35954                e.m = 833;
 35955                e.n = 556;
 35956                e.o = 500;
 35957                e.p = 556;
 35958                e.q = 556;
 35959                e.r = 444;
 35960                e.s = 389;
 35961                e.t = 333;
 35962                e.u = 556;
 35963                e.v = 500;
 35964                e.w = 722;
 35965                e.x = 500;
 35966                e.y = 500;
 35967                e.z = 444;
 35968                e.braceleft = 394;
 35969                e.bar = 220;
 35970                e.braceright = 394;
 35971                e.asciitilde = 520;
 35972                e.exclamdown = 333;
 35973                e.cent = 500;
 35974                e.sterling = 500;
 35975                e.fraction = 167;
 35976                e.yen = 500;
 35977                e.florin = 500;
 35978                e.section = 500;
 35979                e.currency = 500;
 35980                e.quotesingle = 278;
 35981                e.quotedblleft = 500;
 35982                e.guillemotleft = 500;
 35983                e.guilsinglleft = 333;
 35984                e.guilsinglright = 333;
 35985                e.fi = 556;
 35986                e.fl = 556;
 35987                e.endash = 500;
 35988                e.dagger = 500;
 35989                e.daggerdbl = 500;
 35990                e.periodcentered = 250;
 35991                e.paragraph = 540;
 35992                e.bullet = 350;
 35993                e.quotesinglbase = 333;
 35994                e.quotedblbase = 500;
 35995                e.quotedblright = 500;
 35996                e.guillemotright = 500;
 35997                e.ellipsis = 1e3;
 35998                e.perthousand = 1e3;
 35999                e.questiondown = 500;
 36000                e.grave = 333;
 36001                e.acute = 333;
 36002                e.circumflex = 333;
 36003                e.tilde = 333;
 36004                e.macron = 333;
 36005                e.breve = 333;
 36006                e.dotaccent = 333;
 36007                e.dieresis = 333;
 36008                e.ring = 333;
 36009                e.cedilla = 333;
 36010                e.hungarumlaut = 333;
 36011                e.ogonek = 333;
 36012                e.caron = 333;
 36013                e.emdash = 1e3;
 36014                e.AE = 1e3;
 36015                e.ordfeminine = 300;
 36016                e.Lslash = 667;
 36017                e.Oslash = 778;
 36018                e.OE = 1e3;
 36019                e.ordmasculine = 330;
 36020                e.ae = 722;
 36021                e.dotlessi = 278;
 36022                e.lslash = 278;
 36023                e.oslash = 500;
 36024                e.oe = 722;
 36025                e.germandbls = 556;
 36026                e.Idieresis = 389;
 36027                e.eacute = 444;
 36028                e.abreve = 500;
 36029                e.uhungarumlaut = 556;
 36030                e.ecaron = 444;
 36031                e.Ydieresis = 722;
 36032                e.divide = 570;
 36033                e.Yacute = 722;
 36034                e.Acircumflex = 722;
 36035                e.aacute = 500;
 36036                e.Ucircumflex = 722;
 36037                e.yacute = 500;
 36038                e.scommaaccent = 389;
 36039                e.ecircumflex = 444;
 36040                e.Uring = 722;
 36041                e.Udieresis = 722;
 36042                e.aogonek = 500;
 36043                e.Uacute = 722;
 36044                e.uogonek = 556;
 36045                e.Edieresis = 667;
 36046                e.Dcroat = 722;
 36047                e.commaaccent = 250;
 36048                e.copyright = 747;
 36049                e.Emacron = 667;
 36050                e.ccaron = 444;
 36051                e.aring = 500;
 36052                e.Ncommaaccent = 722;
 36053                e.lacute = 278;
 36054                e.agrave = 500;
 36055                e.Tcommaaccent = 667;
 36056                e.Cacute = 722;
 36057                e.atilde = 500;
 36058                e.Edotaccent = 667;
 36059                e.scaron = 389;
 36060                e.scedilla = 389;
 36061                e.iacute = 278;
 36062                e.lozenge = 494;
 36063                e.Rcaron = 722;
 36064                e.Gcommaaccent = 778;
 36065                e.ucircumflex = 556;
 36066                e.acircumflex = 500;
 36067                e.Amacron = 722;
 36068                e.rcaron = 444;
 36069                e.ccedilla = 444;
 36070                e.Zdotaccent = 667;
 36071                e.Thorn = 611;
 36072                e.Omacron = 778;
 36073                e.Racute = 722;
 36074                e.Sacute = 556;
 36075                e.dcaron = 672;
 36076                e.Umacron = 722;
 36077                e.uring = 556;
 36078                e.threesuperior = 300;
 36079                e.Ograve = 778;
 36080                e.Agrave = 722;
 36081                e.Abreve = 722;
 36082                e.multiply = 570;
 36083                e.uacute = 556;
 36084                e.Tcaron = 667;
 36085                e.partialdiff = 494;
 36086                e.ydieresis = 500;
 36087                e.Nacute = 722;
 36088                e.icircumflex = 278;
 36089                e.Ecircumflex = 667;
 36090                e.adieresis = 500;
 36091                e.edieresis = 444;
 36092                e.cacute = 444;
 36093                e.nacute = 556;
 36094                e.umacron = 556;
 36095                e.Ncaron = 722;
 36096                e.Iacute = 389;
 36097                e.plusminus = 570;
 36098                e.brokenbar = 220;
 36099                e.registered = 747;
 36100                e.Gbreve = 778;
 36101                e.Idotaccent = 389;
 36102                e.summation = 600;
 36103                e.Egrave = 667;
 36104                e.racute = 444;
 36105                e.omacron = 500;
 36106                e.Zacute = 667;
 36107                e.Zcaron = 667;
 36108                e.greaterequal = 549;
 36109                e.Eth = 722;
 36110                e.Ccedilla = 722;
 36111                e.lcommaaccent = 278;
 36112                e.tcaron = 416;
 36113                e.eogonek = 444;
 36114                e.Uogonek = 722;
 36115                e.Aacute = 722;
 36116                e.Adieresis = 722;
 36117                e.egrave = 444;
 36118                e.zacute = 444;
 36119                e.iogonek = 278;
 36120                e.Oacute = 778;
 36121                e.oacute = 500;
 36122                e.amacron = 500;
 36123                e.sacute = 389;
 36124                e.idieresis = 278;
 36125                e.Ocircumflex = 778;
 36126                e.Ugrave = 722;
 36127                e.Delta = 612;
 36128                e.thorn = 556;
 36129                e.twosuperior = 300;
 36130                e.Odieresis = 778;
 36131                e.mu = 556;
 36132                e.igrave = 278;
 36133                e.ohungarumlaut = 500;
 36134                e.Eogonek = 667;
 36135                e.dcroat = 556;
 36136                e.threequarters = 750;
 36137                e.Scedilla = 556;
 36138                e.lcaron = 394;
 36139                e.Kcommaaccent = 778;
 36140                e.Lacute = 667;
 36141                e.trademark = 1e3;
 36142                e.edotaccent = 444;
 36143                e.Igrave = 389;
 36144                e.Imacron = 389;
 36145                e.Lcaron = 667;
 36146                e.onehalf = 750;
 36147                e.lessequal = 549;
 36148                e.ocircumflex = 500;
 36149                e.ntilde = 556;
 36150                e.Uhungarumlaut = 722;
 36151                e.Eacute = 667;
 36152                e.emacron = 444;
 36153                e.gbreve = 500;
 36154                e.onequarter = 750;
 36155                e.Scaron = 556;
 36156                e.Scommaaccent = 556;
 36157                e.Ohungarumlaut = 778;
 36158                e.degree = 400;
 36159                e.ograve = 500;
 36160                e.Ccaron = 722;
 36161                e.ugrave = 556;
 36162                e.radical = 549;
 36163                e.Dcaron = 722;
 36164                e.rcommaaccent = 444;
 36165                e.Ntilde = 722;
 36166                e.otilde = 500;
 36167                e.Rcommaaccent = 722;
 36168                e.Lcommaaccent = 667;
 36169                e.Atilde = 722;
 36170                e.Aogonek = 722;
 36171                e.Aring = 722;
 36172                e.Otilde = 778;
 36173                e.zdotaccent = 444;
 36174                e.Ecaron = 667;
 36175                e.Iogonek = 389;
 36176                e.kcommaaccent = 556;
 36177                e.minus = 570;
 36178                e.Icircumflex = 389;
 36179                e.ncaron = 556;
 36180                e.tcommaaccent = 333;
 36181                e.logicalnot = 570;
 36182                e.odieresis = 500;
 36183                e.udieresis = 556;
 36184                e.notequal = 549;
 36185                e.gcommaaccent = 500;
 36186                e.eth = 500;
 36187                e.zcaron = 444;
 36188                e.ncommaaccent = 556;
 36189                e.onesuperior = 300;
 36190                e.imacron = 278;
 36191                e.Euro = 500;
 36192              });
 36193              e["Times-BoldItalic"] = (0, r.getLookupTableFactory)(function (e) {
 36194                e.space = 250;
 36195                e.exclam = 389;
 36196                e.quotedbl = 555;
 36197                e.numbersign = 500;
 36198                e.dollar = 500;
 36199                e.percent = 833;
 36200                e.ampersand = 778;
 36201                e.quoteright = 333;
 36202                e.parenleft = 333;
 36203                e.parenright = 333;
 36204                e.asterisk = 500;
 36205                e.plus = 570;
 36206                e.comma = 250;
 36207                e.hyphen = 333;
 36208                e.period = 250;
 36209                e.slash = 278;
 36210                e.zero = 500;
 36211                e.one = 500;
 36212                e.two = 500;
 36213                e.three = 500;
 36214                e.four = 500;
 36215                e.five = 500;
 36216                e.six = 500;
 36217                e.seven = 500;
 36218                e.eight = 500;
 36219                e.nine = 500;
 36220                e.colon = 333;
 36221                e.semicolon = 333;
 36222                e.less = 570;
 36223                e.equal = 570;
 36224                e.greater = 570;
 36225                e.question = 500;
 36226                e.at = 832;
 36227                e.A = 667;
 36228                e.B = 667;
 36229                e.C = 667;
 36230                e.D = 722;
 36231                e.E = 667;
 36232                e.F = 667;
 36233                e.G = 722;
 36234                e.H = 778;
 36235                e.I = 389;
 36236                e.J = 500;
 36237                e.K = 667;
 36238                e.L = 611;
 36239                e.M = 889;
 36240                e.N = 722;
 36241                e.O = 722;
 36242                e.P = 611;
 36243                e.Q = 722;
 36244                e.R = 667;
 36245                e.S = 556;
 36246                e.T = 611;
 36247                e.U = 722;
 36248                e.V = 667;
 36249                e.W = 889;
 36250                e.X = 667;
 36251                e.Y = 611;
 36252                e.Z = 611;
 36253                e.bracketleft = 333;
 36254                e.backslash = 278;
 36255                e.bracketright = 333;
 36256                e.asciicircum = 570;
 36257                e.underscore = 500;
 36258                e.quoteleft = 333;
 36259                e.a = 500;
 36260                e.b = 500;
 36261                e.c = 444;
 36262                e.d = 500;
 36263                e.e = 444;
 36264                e.f = 333;
 36265                e.g = 500;
 36266                e.h = 556;
 36267                e.i = 278;
 36268                e.j = 278;
 36269                e.k = 500;
 36270                e.l = 278;
 36271                e.m = 778;
 36272                e.n = 556;
 36273                e.o = 500;
 36274                e.p = 500;
 36275                e.q = 500;
 36276                e.r = 389;
 36277                e.s = 389;
 36278                e.t = 278;
 36279                e.u = 556;
 36280                e.v = 444;
 36281                e.w = 667;
 36282                e.x = 500;
 36283                e.y = 444;
 36284                e.z = 389;
 36285                e.braceleft = 348;
 36286                e.bar = 220;
 36287                e.braceright = 348;
 36288                e.asciitilde = 570;
 36289                e.exclamdown = 389;
 36290                e.cent = 500;
 36291                e.sterling = 500;
 36292                e.fraction = 167;
 36293                e.yen = 500;
 36294                e.florin = 500;
 36295                e.section = 500;
 36296                e.currency = 500;
 36297                e.quotesingle = 278;
 36298                e.quotedblleft = 500;
 36299                e.guillemotleft = 500;
 36300                e.guilsinglleft = 333;
 36301                e.guilsinglright = 333;
 36302                e.fi = 556;
 36303                e.fl = 556;
 36304                e.endash = 500;
 36305                e.dagger = 500;
 36306                e.daggerdbl = 500;
 36307                e.periodcentered = 250;
 36308                e.paragraph = 500;
 36309                e.bullet = 350;
 36310                e.quotesinglbase = 333;
 36311                e.quotedblbase = 500;
 36312                e.quotedblright = 500;
 36313                e.guillemotright = 500;
 36314                e.ellipsis = 1e3;
 36315                e.perthousand = 1e3;
 36316                e.questiondown = 500;
 36317                e.grave = 333;
 36318                e.acute = 333;
 36319                e.circumflex = 333;
 36320                e.tilde = 333;
 36321                e.macron = 333;
 36322                e.breve = 333;
 36323                e.dotaccent = 333;
 36324                e.dieresis = 333;
 36325                e.ring = 333;
 36326                e.cedilla = 333;
 36327                e.hungarumlaut = 333;
 36328                e.ogonek = 333;
 36329                e.caron = 333;
 36330                e.emdash = 1e3;
 36331                e.AE = 944;
 36332                e.ordfeminine = 266;
 36333                e.Lslash = 611;
 36334                e.Oslash = 722;
 36335                e.OE = 944;
 36336                e.ordmasculine = 300;
 36337                e.ae = 722;
 36338                e.dotlessi = 278;
 36339                e.lslash = 278;
 36340                e.oslash = 500;
 36341                e.oe = 722;
 36342                e.germandbls = 500;
 36343                e.Idieresis = 389;
 36344                e.eacute = 444;
 36345                e.abreve = 500;
 36346                e.uhungarumlaut = 556;
 36347                e.ecaron = 444;
 36348                e.Ydieresis = 611;
 36349                e.divide = 570;
 36350                e.Yacute = 611;
 36351                e.Acircumflex = 667;
 36352                e.aacute = 500;
 36353                e.Ucircumflex = 722;
 36354                e.yacute = 444;
 36355                e.scommaaccent = 389;
 36356                e.ecircumflex = 444;
 36357                e.Uring = 722;
 36358                e.Udieresis = 722;
 36359                e.aogonek = 500;
 36360                e.Uacute = 722;
 36361                e.uogonek = 556;
 36362                e.Edieresis = 667;
 36363                e.Dcroat = 722;
 36364                e.commaaccent = 250;
 36365                e.copyright = 747;
 36366                e.Emacron = 667;
 36367                e.ccaron = 444;
 36368                e.aring = 500;
 36369                e.Ncommaaccent = 722;
 36370                e.lacute = 278;
 36371                e.agrave = 500;
 36372                e.Tcommaaccent = 611;
 36373                e.Cacute = 667;
 36374                e.atilde = 500;
 36375                e.Edotaccent = 667;
 36376                e.scaron = 389;
 36377                e.scedilla = 389;
 36378                e.iacute = 278;
 36379                e.lozenge = 494;
 36380                e.Rcaron = 667;
 36381                e.Gcommaaccent = 722;
 36382                e.ucircumflex = 556;
 36383                e.acircumflex = 500;
 36384                e.Amacron = 667;
 36385                e.rcaron = 389;
 36386                e.ccedilla = 444;
 36387                e.Zdotaccent = 611;
 36388                e.Thorn = 611;
 36389                e.Omacron = 722;
 36390                e.Racute = 667;
 36391                e.Sacute = 556;
 36392                e.dcaron = 608;
 36393                e.Umacron = 722;
 36394                e.uring = 556;
 36395                e.threesuperior = 300;
 36396                e.Ograve = 722;
 36397                e.Agrave = 667;
 36398                e.Abreve = 667;
 36399                e.multiply = 570;
 36400                e.uacute = 556;
 36401                e.Tcaron = 611;
 36402                e.partialdiff = 494;
 36403                e.ydieresis = 444;
 36404                e.Nacute = 722;
 36405                e.icircumflex = 278;
 36406                e.Ecircumflex = 667;
 36407                e.adieresis = 500;
 36408                e.edieresis = 444;
 36409                e.cacute = 444;
 36410                e.nacute = 556;
 36411                e.umacron = 556;
 36412                e.Ncaron = 722;
 36413                e.Iacute = 389;
 36414                e.plusminus = 570;
 36415                e.brokenbar = 220;
 36416                e.registered = 747;
 36417                e.Gbreve = 722;
 36418                e.Idotaccent = 389;
 36419                e.summation = 600;
 36420                e.Egrave = 667;
 36421                e.racute = 389;
 36422                e.omacron = 500;
 36423                e.Zacute = 611;
 36424                e.Zcaron = 611;
 36425                e.greaterequal = 549;
 36426                e.Eth = 722;
 36427                e.Ccedilla = 667;
 36428                e.lcommaaccent = 278;
 36429                e.tcaron = 366;
 36430                e.eogonek = 444;
 36431                e.Uogonek = 722;
 36432                e.Aacute = 667;
 36433                e.Adieresis = 667;
 36434                e.egrave = 444;
 36435                e.zacute = 389;
 36436                e.iogonek = 278;
 36437                e.Oacute = 722;
 36438                e.oacute = 500;
 36439                e.amacron = 500;
 36440                e.sacute = 389;
 36441                e.idieresis = 278;
 36442                e.Ocircumflex = 722;
 36443                e.Ugrave = 722;
 36444                e.Delta = 612;
 36445                e.thorn = 500;
 36446                e.twosuperior = 300;
 36447                e.Odieresis = 722;
 36448                e.mu = 576;
 36449                e.igrave = 278;
 36450                e.ohungarumlaut = 500;
 36451                e.Eogonek = 667;
 36452                e.dcroat = 500;
 36453                e.threequarters = 750;
 36454                e.Scedilla = 556;
 36455                e.lcaron = 382;
 36456                e.Kcommaaccent = 667;
 36457                e.Lacute = 611;
 36458                e.trademark = 1e3;
 36459                e.edotaccent = 444;
 36460                e.Igrave = 389;
 36461                e.Imacron = 389;
 36462                e.Lcaron = 611;
 36463                e.onehalf = 750;
 36464                e.lessequal = 549;
 36465                e.ocircumflex = 500;
 36466                e.ntilde = 556;
 36467                e.Uhungarumlaut = 722;
 36468                e.Eacute = 667;
 36469                e.emacron = 444;
 36470                e.gbreve = 500;
 36471                e.onequarter = 750;
 36472                e.Scaron = 556;
 36473                e.Scommaaccent = 556;
 36474                e.Ohungarumlaut = 722;
 36475                e.degree = 400;
 36476                e.ograve = 500;
 36477                e.Ccaron = 667;
 36478                e.ugrave = 556;
 36479                e.radical = 549;
 36480                e.Dcaron = 722;
 36481                e.rcommaaccent = 389;
 36482                e.Ntilde = 722;
 36483                e.otilde = 500;
 36484                e.Rcommaaccent = 667;
 36485                e.Lcommaaccent = 611;
 36486                e.Atilde = 667;
 36487                e.Aogonek = 667;
 36488                e.Aring = 667;
 36489                e.Otilde = 722;
 36490                e.zdotaccent = 389;
 36491                e.Ecaron = 667;
 36492                e.Iogonek = 389;
 36493                e.kcommaaccent = 500;
 36494                e.minus = 606;
 36495                e.Icircumflex = 389;
 36496                e.ncaron = 556;
 36497                e.tcommaaccent = 278;
 36498                e.logicalnot = 606;
 36499                e.odieresis = 500;
 36500                e.udieresis = 556;
 36501                e.notequal = 549;
 36502                e.gcommaaccent = 500;
 36503                e.eth = 500;
 36504                e.zcaron = 389;
 36505                e.ncommaaccent = 556;
 36506                e.onesuperior = 300;
 36507                e.imacron = 278;
 36508                e.Euro = 500;
 36509              });
 36510              e["Times-Italic"] = (0, r.getLookupTableFactory)(function (e) {
 36511                e.space = 250;
 36512                e.exclam = 333;
 36513                e.quotedbl = 420;
 36514                e.numbersign = 500;
 36515                e.dollar = 500;
 36516                e.percent = 833;
 36517                e.ampersand = 778;
 36518                e.quoteright = 333;
 36519                e.parenleft = 333;
 36520                e.parenright = 333;
 36521                e.asterisk = 500;
 36522                e.plus = 675;
 36523                e.comma = 250;
 36524                e.hyphen = 333;
 36525                e.period = 250;
 36526                e.slash = 278;
 36527                e.zero = 500;
 36528                e.one = 500;
 36529                e.two = 500;
 36530                e.three = 500;
 36531                e.four = 500;
 36532                e.five = 500;
 36533                e.six = 500;
 36534                e.seven = 500;
 36535                e.eight = 500;
 36536                e.nine = 500;
 36537                e.colon = 333;
 36538                e.semicolon = 333;
 36539                e.less = 675;
 36540                e.equal = 675;
 36541                e.greater = 675;
 36542                e.question = 500;
 36543                e.at = 920;
 36544                e.A = 611;
 36545                e.B = 611;
 36546                e.C = 667;
 36547                e.D = 722;
 36548                e.E = 611;
 36549                e.F = 611;
 36550                e.G = 722;
 36551                e.H = 722;
 36552                e.I = 333;
 36553                e.J = 444;
 36554                e.K = 667;
 36555                e.L = 556;
 36556                e.M = 833;
 36557                e.N = 667;
 36558                e.O = 722;
 36559                e.P = 611;
 36560                e.Q = 722;
 36561                e.R = 611;
 36562                e.S = 500;
 36563                e.T = 556;
 36564                e.U = 722;
 36565                e.V = 611;
 36566                e.W = 833;
 36567                e.X = 611;
 36568                e.Y = 556;
 36569                e.Z = 556;
 36570                e.bracketleft = 389;
 36571                e.backslash = 278;
 36572                e.bracketright = 389;
 36573                e.asciicircum = 422;
 36574                e.underscore = 500;
 36575                e.quoteleft = 333;
 36576                e.a = 500;
 36577                e.b = 500;
 36578                e.c = 444;
 36579                e.d = 500;
 36580                e.e = 444;
 36581                e.f = 278;
 36582                e.g = 500;
 36583                e.h = 500;
 36584                e.i = 278;
 36585                e.j = 278;
 36586                e.k = 444;
 36587                e.l = 278;
 36588                e.m = 722;
 36589                e.n = 500;
 36590                e.o = 500;
 36591                e.p = 500;
 36592                e.q = 500;
 36593                e.r = 389;
 36594                e.s = 389;
 36595                e.t = 278;
 36596                e.u = 500;
 36597                e.v = 444;
 36598                e.w = 667;
 36599                e.x = 444;
 36600                e.y = 444;
 36601                e.z = 389;
 36602                e.braceleft = 400;
 36603                e.bar = 275;
 36604                e.braceright = 400;
 36605                e.asciitilde = 541;
 36606                e.exclamdown = 389;
 36607                e.cent = 500;
 36608                e.sterling = 500;
 36609                e.fraction = 167;
 36610                e.yen = 500;
 36611                e.florin = 500;
 36612                e.section = 500;
 36613                e.currency = 500;
 36614                e.quotesingle = 214;
 36615                e.quotedblleft = 556;
 36616                e.guillemotleft = 500;
 36617                e.guilsinglleft = 333;
 36618                e.guilsinglright = 333;
 36619                e.fi = 500;
 36620                e.fl = 500;
 36621                e.endash = 500;
 36622                e.dagger = 500;
 36623                e.daggerdbl = 500;
 36624                e.periodcentered = 250;
 36625                e.paragraph = 523;
 36626                e.bullet = 350;
 36627                e.quotesinglbase = 333;
 36628                e.quotedblbase = 556;
 36629                e.quotedblright = 556;
 36630                e.guillemotright = 500;
 36631                e.ellipsis = 889;
 36632                e.perthousand = 1e3;
 36633                e.questiondown = 500;
 36634                e.grave = 333;
 36635                e.acute = 333;
 36636                e.circumflex = 333;
 36637                e.tilde = 333;
 36638                e.macron = 333;
 36639                e.breve = 333;
 36640                e.dotaccent = 333;
 36641                e.dieresis = 333;
 36642                e.ring = 333;
 36643                e.cedilla = 333;
 36644                e.hungarumlaut = 333;
 36645                e.ogonek = 333;
 36646                e.caron = 333;
 36647                e.emdash = 889;
 36648                e.AE = 889;
 36649                e.ordfeminine = 276;
 36650                e.Lslash = 556;
 36651                e.Oslash = 722;
 36652                e.OE = 944;
 36653                e.ordmasculine = 310;
 36654                e.ae = 667;
 36655                e.dotlessi = 278;
 36656                e.lslash = 278;
 36657                e.oslash = 500;
 36658                e.oe = 667;
 36659                e.germandbls = 500;
 36660                e.Idieresis = 333;
 36661                e.eacute = 444;
 36662                e.abreve = 500;
 36663                e.uhungarumlaut = 500;
 36664                e.ecaron = 444;
 36665                e.Ydieresis = 556;
 36666                e.divide = 675;
 36667                e.Yacute = 556;
 36668                e.Acircumflex = 611;
 36669                e.aacute = 500;
 36670                e.Ucircumflex = 722;
 36671                e.yacute = 444;
 36672                e.scommaaccent = 389;
 36673                e.ecircumflex = 444;
 36674                e.Uring = 722;
 36675                e.Udieresis = 722;
 36676                e.aogonek = 500;
 36677                e.Uacute = 722;
 36678                e.uogonek = 500;
 36679                e.Edieresis = 611;
 36680                e.Dcroat = 722;
 36681                e.commaaccent = 250;
 36682                e.copyright = 760;
 36683                e.Emacron = 611;
 36684                e.ccaron = 444;
 36685                e.aring = 500;
 36686                e.Ncommaaccent = 667;
 36687                e.lacute = 278;
 36688                e.agrave = 500;
 36689                e.Tcommaaccent = 556;
 36690                e.Cacute = 667;
 36691                e.atilde = 500;
 36692                e.Edotaccent = 611;
 36693                e.scaron = 389;
 36694                e.scedilla = 389;
 36695                e.iacute = 278;
 36696                e.lozenge = 471;
 36697                e.Rcaron = 611;
 36698                e.Gcommaaccent = 722;
 36699                e.ucircumflex = 500;
 36700                e.acircumflex = 500;
 36701                e.Amacron = 611;
 36702                e.rcaron = 389;
 36703                e.ccedilla = 444;
 36704                e.Zdotaccent = 556;
 36705                e.Thorn = 611;
 36706                e.Omacron = 722;
 36707                e.Racute = 611;
 36708                e.Sacute = 500;
 36709                e.dcaron = 544;
 36710                e.Umacron = 722;
 36711                e.uring = 500;
 36712                e.threesuperior = 300;
 36713                e.Ograve = 722;
 36714                e.Agrave = 611;
 36715                e.Abreve = 611;
 36716                e.multiply = 675;
 36717                e.uacute = 500;
 36718                e.Tcaron = 556;
 36719                e.partialdiff = 476;
 36720                e.ydieresis = 444;
 36721                e.Nacute = 667;
 36722                e.icircumflex = 278;
 36723                e.Ecircumflex = 611;
 36724                e.adieresis = 500;
 36725                e.edieresis = 444;
 36726                e.cacute = 444;
 36727                e.nacute = 500;
 36728                e.umacron = 500;
 36729                e.Ncaron = 667;
 36730                e.Iacute = 333;
 36731                e.plusminus = 675;
 36732                e.brokenbar = 275;
 36733                e.registered = 760;
 36734                e.Gbreve = 722;
 36735                e.Idotaccent = 333;
 36736                e.summation = 600;
 36737                e.Egrave = 611;
 36738                e.racute = 389;
 36739                e.omacron = 500;
 36740                e.Zacute = 556;
 36741                e.Zcaron = 556;
 36742                e.greaterequal = 549;
 36743                e.Eth = 722;
 36744                e.Ccedilla = 667;
 36745                e.lcommaaccent = 278;
 36746                e.tcaron = 300;
 36747                e.eogonek = 444;
 36748                e.Uogonek = 722;
 36749                e.Aacute = 611;
 36750                e.Adieresis = 611;
 36751                e.egrave = 444;
 36752                e.zacute = 389;
 36753                e.iogonek = 278;
 36754                e.Oacute = 722;
 36755                e.oacute = 500;
 36756                e.amacron = 500;
 36757                e.sacute = 389;
 36758                e.idieresis = 278;
 36759                e.Ocircumflex = 722;
 36760                e.Ugrave = 722;
 36761                e.Delta = 612;
 36762                e.thorn = 500;
 36763                e.twosuperior = 300;
 36764                e.Odieresis = 722;
 36765                e.mu = 500;
 36766                e.igrave = 278;
 36767                e.ohungarumlaut = 500;
 36768                e.Eogonek = 611;
 36769                e.dcroat = 500;
 36770                e.threequarters = 750;
 36771                e.Scedilla = 500;
 36772                e.lcaron = 300;
 36773                e.Kcommaaccent = 667;
 36774                e.Lacute = 556;
 36775                e.trademark = 980;
 36776                e.edotaccent = 444;
 36777                e.Igrave = 333;
 36778                e.Imacron = 333;
 36779                e.Lcaron = 611;
 36780                e.onehalf = 750;
 36781                e.lessequal = 549;
 36782                e.ocircumflex = 500;
 36783                e.ntilde = 500;
 36784                e.Uhungarumlaut = 722;
 36785                e.Eacute = 611;
 36786                e.emacron = 444;
 36787                e.gbreve = 500;
 36788                e.onequarter = 750;
 36789                e.Scaron = 500;
 36790                e.Scommaaccent = 500;
 36791                e.Ohungarumlaut = 722;
 36792                e.degree = 400;
 36793                e.ograve = 500;
 36794                e.Ccaron = 667;
 36795                e.ugrave = 500;
 36796                e.radical = 453;
 36797                e.Dcaron = 722;
 36798                e.rcommaaccent = 389;
 36799                e.Ntilde = 667;
 36800                e.otilde = 500;
 36801                e.Rcommaaccent = 611;
 36802                e.Lcommaaccent = 556;
 36803                e.Atilde = 611;
 36804                e.Aogonek = 611;
 36805                e.Aring = 611;
 36806                e.Otilde = 722;
 36807                e.zdotaccent = 389;
 36808                e.Ecaron = 611;
 36809                e.Iogonek = 333;
 36810                e.kcommaaccent = 444;
 36811                e.minus = 675;
 36812                e.Icircumflex = 333;
 36813                e.ncaron = 500;
 36814                e.tcommaaccent = 278;
 36815                e.logicalnot = 675;
 36816                e.odieresis = 500;
 36817                e.udieresis = 500;
 36818                e.notequal = 549;
 36819                e.gcommaaccent = 500;
 36820                e.eth = 500;
 36821                e.zcaron = 389;
 36822                e.ncommaaccent = 500;
 36823                e.onesuperior = 300;
 36824                e.imacron = 278;
 36825                e.Euro = 500;
 36826              });
 36827              e.ZapfDingbats = (0, r.getLookupTableFactory)(function (e) {
 36828                e.space = 278;
 36829                e.a1 = 974;
 36830                e.a2 = 961;
 36831                e.a202 = 974;
 36832                e.a3 = 980;
 36833                e.a4 = 719;
 36834                e.a5 = 789;
 36835                e.a119 = 790;
 36836                e.a118 = 791;
 36837                e.a117 = 690;
 36838                e.a11 = 960;
 36839                e.a12 = 939;
 36840                e.a13 = 549;
 36841                e.a14 = 855;
 36842                e.a15 = 911;
 36843                e.a16 = 933;
 36844                e.a105 = 911;
 36845                e.a17 = 945;
 36846                e.a18 = 974;
 36847                e.a19 = 755;
 36848                e.a20 = 846;
 36849                e.a21 = 762;
 36850                e.a22 = 761;
 36851                e.a23 = 571;
 36852                e.a24 = 677;
 36853                e.a25 = 763;
 36854                e.a26 = 760;
 36855                e.a27 = 759;
 36856                e.a28 = 754;
 36857                e.a6 = 494;
 36858                e.a7 = 552;
 36859                e.a8 = 537;
 36860                e.a9 = 577;
 36861                e.a10 = 692;
 36862                e.a29 = 786;
 36863                e.a30 = 788;
 36864                e.a31 = 788;
 36865                e.a32 = 790;
 36866                e.a33 = 793;
 36867                e.a34 = 794;
 36868                e.a35 = 816;
 36869                e.a36 = 823;
 36870                e.a37 = 789;
 36871                e.a38 = 841;
 36872                e.a39 = 823;
 36873                e.a40 = 833;
 36874                e.a41 = 816;
 36875                e.a42 = 831;
 36876                e.a43 = 923;
 36877                e.a44 = 744;
 36878                e.a45 = 723;
 36879                e.a46 = 749;
 36880                e.a47 = 790;
 36881                e.a48 = 792;
 36882                e.a49 = 695;
 36883                e.a50 = 776;
 36884                e.a51 = 768;
 36885                e.a52 = 792;
 36886                e.a53 = 759;
 36887                e.a54 = 707;
 36888                e.a55 = 708;
 36889                e.a56 = 682;
 36890                e.a57 = 701;
 36891                e.a58 = 826;
 36892                e.a59 = 815;
 36893                e.a60 = 789;
 36894                e.a61 = 789;
 36895                e.a62 = 707;
 36896                e.a63 = 687;
 36897                e.a64 = 696;
 36898                e.a65 = 689;
 36899                e.a66 = 786;
 36900                e.a67 = 787;
 36901                e.a68 = 713;
 36902                e.a69 = 791;
 36903                e.a70 = 785;
 36904                e.a71 = 791;
 36905                e.a72 = 873;
 36906                e.a73 = 761;
 36907                e.a74 = 762;
 36908                e.a203 = 762;
 36909                e.a75 = 759;
 36910                e.a204 = 759;
 36911                e.a76 = 892;
 36912                e.a77 = 892;
 36913                e.a78 = 788;
 36914                e.a79 = 784;
 36915                e.a81 = 438;
 36916                e.a82 = 138;
 36917                e.a83 = 277;
 36918                e.a84 = 415;
 36919                e.a97 = 392;
 36920                e.a98 = 392;
 36921                e.a99 = 668;
 36922                e.a100 = 668;
 36923                e.a89 = 390;
 36924                e.a90 = 390;
 36925                e.a93 = 317;
 36926                e.a94 = 317;
 36927                e.a91 = 276;
 36928                e.a92 = 276;
 36929                e.a205 = 509;
 36930                e.a85 = 509;
 36931                e.a206 = 410;
 36932                e.a86 = 410;
 36933                e.a87 = 234;
 36934                e.a88 = 234;
 36935                e.a95 = 334;
 36936                e.a96 = 334;
 36937                e.a101 = 732;
 36938                e.a102 = 544;
 36939                e.a103 = 544;
 36940                e.a104 = 910;
 36941                e.a106 = 667;
 36942                e.a107 = 760;
 36943                e.a108 = 760;
 36944                e.a112 = 776;
 36945                e.a111 = 595;
 36946                e.a110 = 694;
 36947                e.a109 = 626;
 36948                e.a120 = 788;
 36949                e.a121 = 788;
 36950                e.a122 = 788;
 36951                e.a123 = 788;
 36952                e.a124 = 788;
 36953                e.a125 = 788;
 36954                e.a126 = 788;
 36955                e.a127 = 788;
 36956                e.a128 = 788;
 36957                e.a129 = 788;
 36958                e.a130 = 788;
 36959                e.a131 = 788;
 36960                e.a132 = 788;
 36961                e.a133 = 788;
 36962                e.a134 = 788;
 36963                e.a135 = 788;
 36964                e.a136 = 788;
 36965                e.a137 = 788;
 36966                e.a138 = 788;
 36967                e.a139 = 788;
 36968                e.a140 = 788;
 36969                e.a141 = 788;
 36970                e.a142 = 788;
 36971                e.a143 = 788;
 36972                e.a144 = 788;
 36973                e.a145 = 788;
 36974                e.a146 = 788;
 36975                e.a147 = 788;
 36976                e.a148 = 788;
 36977                e.a149 = 788;
 36978                e.a150 = 788;
 36979                e.a151 = 788;
 36980                e.a152 = 788;
 36981                e.a153 = 788;
 36982                e.a154 = 788;
 36983                e.a155 = 788;
 36984                e.a156 = 788;
 36985                e.a157 = 788;
 36986                e.a158 = 788;
 36987                e.a159 = 788;
 36988                e.a160 = 894;
 36989                e.a161 = 838;
 36990                e.a163 = 1016;
 36991                e.a164 = 458;
 36992                e.a196 = 748;
 36993                e.a165 = 924;
 36994                e.a192 = 748;
 36995                e.a166 = 918;
 36996                e.a167 = 927;
 36997                e.a168 = 928;
 36998                e.a169 = 928;
 36999                e.a170 = 834;
 37000                e.a171 = 873;
 37001                e.a172 = 828;
 37002                e.a173 = 924;
 37003                e.a162 = 924;
 37004                e.a174 = 917;
 37005                e.a175 = 930;
 37006                e.a176 = 931;
 37007                e.a177 = 463;
 37008                e.a178 = 883;
 37009                e.a179 = 836;
 37010                e.a193 = 836;
 37011                e.a180 = 867;
 37012                e.a199 = 867;
 37013                e.a181 = 696;
 37014                e.a200 = 696;
 37015                e.a182 = 874;
 37016                e.a201 = 874;
 37017                e.a183 = 760;
 37018                e.a184 = 946;
 37019                e.a197 = 771;
 37020                e.a185 = 865;
 37021                e.a194 = 771;
 37022                e.a198 = 888;
 37023                e.a186 = 967;
 37024                e.a195 = 888;
 37025                e.a187 = 831;
 37026                e.a188 = 873;
 37027                e.a189 = 927;
 37028                e.a190 = 970;
 37029                e.a191 = 918;
 37030              });
 37031            });
 37032            t.getMetrics = n;
 37033            const i = (0, r.getLookupTableFactory)(function (e) {
 37034              e.Courier = {
 37035                ascent: 629,
 37036                descent: -157,
 37037                capHeight: 562,
 37038                xHeight: -426,
 37039              };
 37040              e["Courier-Bold"] = {
 37041                ascent: 629,
 37042                descent: -157,
 37043                capHeight: 562,
 37044                xHeight: 439,
 37045              };
 37046              e["Courier-Oblique"] = {
 37047                ascent: 629,
 37048                descent: -157,
 37049                capHeight: 562,
 37050                xHeight: 426,
 37051              };
 37052              e["Courier-BoldOblique"] = {
 37053                ascent: 629,
 37054                descent: -157,
 37055                capHeight: 562,
 37056                xHeight: 426,
 37057              };
 37058              e.Helvetica = {
 37059                ascent: 718,
 37060                descent: -207,
 37061                capHeight: 718,
 37062                xHeight: 523,
 37063              };
 37064              e["Helvetica-Bold"] = {
 37065                ascent: 718,
 37066                descent: -207,
 37067                capHeight: 718,
 37068                xHeight: 532,
 37069              };
 37070              e["Helvetica-Oblique"] = {
 37071                ascent: 718,
 37072                descent: -207,
 37073                capHeight: 718,
 37074                xHeight: 523,
 37075              };
 37076              e["Helvetica-BoldOblique"] = {
 37077                ascent: 718,
 37078                descent: -207,
 37079                capHeight: 718,
 37080                xHeight: 532,
 37081              };
 37082              e["Times-Roman"] = {
 37083                ascent: 683,
 37084                descent: -217,
 37085                capHeight: 662,
 37086                xHeight: 450,
 37087              };
 37088              e["Times-Bold"] = {
 37089                ascent: 683,
 37090                descent: -217,
 37091                capHeight: 676,
 37092                xHeight: 461,
 37093              };
 37094              e["Times-Italic"] = {
 37095                ascent: 683,
 37096                descent: -217,
 37097                capHeight: 653,
 37098                xHeight: 441,
 37099              };
 37100              e["Times-BoldItalic"] = {
 37101                ascent: 683,
 37102                descent: -217,
 37103                capHeight: 669,
 37104                xHeight: 462,
 37105              };
 37106              e.Symbol = {
 37107                ascent: Math.NaN,
 37108                descent: Math.NaN,
 37109                capHeight: Math.NaN,
 37110                xHeight: Math.NaN,
 37111              };
 37112              e.ZapfDingbats = {
 37113                ascent: Math.NaN,
 37114                descent: Math.NaN,
 37115                capHeight: Math.NaN,
 37116                xHeight: Math.NaN,
 37117              };
 37118            });
 37119            t.getFontBasicMetrics = i;
 37120          },
 37121          (e, t) => {
 37122            Object.defineProperty(t, "__esModule", { value: !0 });
 37123            t.GlyfTable = void 0;
 37124            t.GlyfTable = class GlyfTable {
 37125              constructor({
 37126                glyfTable: e,
 37127                isGlyphLocationsLong: t,
 37128                locaTable: a,
 37129                numGlyphs: r,
 37130              }) {
 37131                this.glyphs = [];
 37132                const n = new DataView(a.buffer, a.byteOffset, a.byteLength),
 37133                  i = new DataView(e.buffer, e.byteOffset, e.byteLength),
 37134                  s = t ? 4 : 2;
 37135                let o = t ? n.getUint32(0) : 2 * n.getUint16(0),
 37136                  c = 0;
 37137                for (let e = 0; e < r; e++) {
 37138                  c += s;
 37139                  const e = t ? n.getUint32(c) : 2 * n.getUint16(c);
 37140                  if (e === o) {
 37141                    this.glyphs.push(new Glyph({}));
 37142                    continue;
 37143                  }
 37144                  const a = Glyph.parse(o, i);
 37145                  this.glyphs.push(a);
 37146                  o = e;
 37147                }
 37148              }
 37149              getSize() {
 37150                return this.glyphs.reduce(
 37151                  (e, t) => e + ((t.getSize() + 3) & -4),
 37152                  0,
 37153                );
 37154              }
 37155              write() {
 37156                const e = this.getSize(),
 37157                  t = new DataView(new ArrayBuffer(e)),
 37158                  a = e > 131070,
 37159                  r = a ? 4 : 2,
 37160                  n = new DataView(new ArrayBuffer((this.glyphs.length + 1) * r));
 37161                a ? n.setUint32(0, 0) : n.setUint16(0, 0);
 37162                let i = 0,
 37163                  s = 0;
 37164                for (const e of this.glyphs) {
 37165                  i += e.write(i, t);
 37166                  i = (i + 3) & -4;
 37167                  s += r;
 37168                  a ? n.setUint32(s, i) : n.setUint16(s, i >> 1);
 37169                }
 37170                return {
 37171                  isLocationLong: a,
 37172                  loca: new Uint8Array(n.buffer),
 37173                  glyf: new Uint8Array(t.buffer),
 37174                };
 37175              }
 37176              scale(e) {
 37177                for (let t = 0, a = this.glyphs.length; t < a; t++)
 37178                  this.glyphs[t].scale(e[t]);
 37179              }
 37180            };
 37181            class Glyph {
 37182              constructor({
 37183                header: e = null,
 37184                simple: t = null,
 37185                composites: a = null,
 37186              }) {
 37187                this.header = e;
 37188                this.simple = t;
 37189                this.composites = a;
 37190              }
 37191              static parse(e, t) {
 37192                const [a, r] = GlyphHeader.parse(e, t);
 37193                e += a;
 37194                if (r.numberOfContours < 0) {
 37195                  const a = [];
 37196                  for (;;) {
 37197                    const [r, n] = CompositeGlyph.parse(e, t);
 37198                    e += r;
 37199                    a.push(n);
 37200                    if (!(32 & n.flags)) break;
 37201                  }
 37202                  return new Glyph({ header: r, composites: a });
 37203                }
 37204                const n = SimpleGlyph.parse(e, t, r.numberOfContours);
 37205                return new Glyph({ header: r, simple: n });
 37206              }
 37207              getSize() {
 37208                if (!this.header) return 0;
 37209                const e = this.simple
 37210                  ? this.simple.getSize()
 37211                  : this.composites.reduce((e, t) => e + t.getSize(), 0);
 37212                return this.header.getSize() + e;
 37213              }
 37214              write(e, t) {
 37215                if (!this.header) return 0;
 37216                const a = e;
 37217                e += this.header.write(e, t);
 37218                if (this.simple) e += this.simple.write(e, t);
 37219                else for (const a of this.composites) e += a.write(e, t);
 37220                return e - a;
 37221              }
 37222              scale(e) {
 37223                if (!this.header) return;
 37224                const t = (this.header.xMin + this.header.xMax) / 2;
 37225                this.header.scale(t, e);
 37226                if (this.simple) this.simple.scale(t, e);
 37227                else for (const a of this.composites) a.scale(t, e);
 37228              }
 37229            }
 37230            class GlyphHeader {
 37231              constructor({
 37232                numberOfContours: e,
 37233                xMin: t,
 37234                yMin: a,
 37235                xMax: r,
 37236                yMax: n,
 37237              }) {
 37238                this.numberOfContours = e;
 37239                this.xMin = t;
 37240                this.yMin = a;
 37241                this.xMax = r;
 37242                this.yMax = n;
 37243              }
 37244              static parse(e, t) {
 37245                return [
 37246                  10,
 37247                  new GlyphHeader({
 37248                    numberOfContours: t.getInt16(e),
 37249                    xMin: t.getInt16(e + 2),
 37250                    yMin: t.getInt16(e + 4),
 37251                    xMax: t.getInt16(e + 6),
 37252                    yMax: t.getInt16(e + 8),
 37253                  }),
 37254                ];
 37255              }
 37256              getSize() {
 37257                return 10;
 37258              }
 37259              write(e, t) {
 37260                t.setInt16(e, this.numberOfContours);
 37261                t.setInt16(e + 2, this.xMin);
 37262                t.setInt16(e + 4, this.yMin);
 37263                t.setInt16(e + 6, this.xMax);
 37264                t.setInt16(e + 8, this.yMax);
 37265                return 10;
 37266              }
 37267              scale(e, t) {
 37268                this.xMin = Math.round(e + (this.xMin - e) * t);
 37269                this.xMax = Math.round(e + (this.xMax - e) * t);
 37270              }
 37271            }
 37272            class Contour {
 37273              constructor({ flags: e, xCoordinates: t, yCoordinates: a }) {
 37274                this.xCoordinates = t;
 37275                this.yCoordinates = a;
 37276                this.flags = e;
 37277              }
 37278            }
 37279            class SimpleGlyph {
 37280              constructor({ contours: e, instructions: t }) {
 37281                this.contours = e;
 37282                this.instructions = t;
 37283              }
 37284              static parse(e, t, a) {
 37285                const r = [];
 37286                for (let n = 0; n < a; n++) {
 37287                  const a = t.getUint16(e);
 37288                  e += 2;
 37289                  r.push(a);
 37290                }
 37291                const n = r[a - 1] + 1,
 37292                  i = t.getUint16(e);
 37293                e += 2;
 37294                const s = new Uint8Array(t).slice(e, e + i);
 37295                e += i;
 37296                const o = [];
 37297                for (let a = 0; a < n; e++, a++) {
 37298                  let r = t.getUint8(e);
 37299                  o.push(r);
 37300                  if (8 & r) {
 37301                    const n = t.getUint8(++e);
 37302                    r ^= 8;
 37303                    for (let e = 0; e < n; e++) o.push(r);
 37304                    a += n;
 37305                  }
 37306                }
 37307                const c = [];
 37308                let l = [],
 37309                  h = [],
 37310                  u = [];
 37311                const d = [];
 37312                let f = 0,
 37313                  g = 0;
 37314                for (let a = 0; a < n; a++) {
 37315                  const n = o[a];
 37316                  if (2 & n) {
 37317                    const a = t.getUint8(e++);
 37318                    g += 16 & n ? a : -a;
 37319                    l.push(g);
 37320                  } else if (16 & n) l.push(g);
 37321                  else {
 37322                    g += t.getInt16(e);
 37323                    e += 2;
 37324                    l.push(g);
 37325                  }
 37326                  if (r[f] === a) {
 37327                    f++;
 37328                    c.push(l);
 37329                    l = [];
 37330                  }
 37331                }
 37332                g = 0;
 37333                f = 0;
 37334                for (let a = 0; a < n; a++) {
 37335                  const n = o[a];
 37336                  if (4 & n) {
 37337                    const a = t.getUint8(e++);
 37338                    g += 32 & n ? a : -a;
 37339                    h.push(g);
 37340                  } else if (32 & n) h.push(g);
 37341                  else {
 37342                    g += t.getInt16(e);
 37343                    e += 2;
 37344                    h.push(g);
 37345                  }
 37346                  u.push((1 & n) | (64 & n));
 37347                  if (r[f] === a) {
 37348                    l = c[f];
 37349                    f++;
 37350                    d.push(
 37351                      new Contour({ flags: u, xCoordinates: l, yCoordinates: h }),
 37352                    );
 37353                    h = [];
 37354                    u = [];
 37355                  }
 37356                }
 37357                return new SimpleGlyph({ contours: d, instructions: s });
 37358              }
 37359              getSize() {
 37360                let e = 2 * this.contours.length + 2 + this.instructions.length,
 37361                  t = 0,
 37362                  a = 0;
 37363                for (const r of this.contours) {
 37364                  e += r.flags.length;
 37365                  for (let n = 0, i = r.xCoordinates.length; n < i; n++) {
 37366                    const i = r.xCoordinates[n],
 37367                      s = r.yCoordinates[n];
 37368                    let o = Math.abs(i - t);
 37369                    o > 255 ? (e += 2) : o > 0 && (e += 1);
 37370                    t = i;
 37371                    o = Math.abs(s - a);
 37372                    o > 255 ? (e += 2) : o > 0 && (e += 1);
 37373                    a = s;
 37374                  }
 37375                }
 37376                return e;
 37377              }
 37378              write(e, t) {
 37379                const a = e,
 37380                  r = [],
 37381                  n = [],
 37382                  i = [];
 37383                let s = 0,
 37384                  o = 0;
 37385                for (const a of this.contours) {
 37386                  for (let e = 0, t = a.xCoordinates.length; e < t; e++) {
 37387                    let t = a.flags[e];
 37388                    const c = a.xCoordinates[e];
 37389                    let l = c - s;
 37390                    if (0 === l) {
 37391                      t |= 16;
 37392                      r.push(0);
 37393                    } else {
 37394                      const e = Math.abs(l);
 37395                      if (e <= 255) {
 37396                        t |= l >= 0 ? 18 : 2;
 37397                        r.push(e);
 37398                      } else r.push(l);
 37399                    }
 37400                    s = c;
 37401                    const h = a.yCoordinates[e];
 37402                    l = h - o;
 37403                    if (0 === l) {
 37404                      t |= 32;
 37405                      n.push(0);
 37406                    } else {
 37407                      const e = Math.abs(l);
 37408                      if (e <= 255) {
 37409                        t |= l >= 0 ? 36 : 4;
 37410                        n.push(e);
 37411                      } else n.push(l);
 37412                    }
 37413                    o = h;
 37414                    i.push(t);
 37415                  }
 37416                  t.setUint16(e, r.length - 1);
 37417                  e += 2;
 37418                }
 37419                t.setUint16(e, this.instructions.length);
 37420                e += 2;
 37421                if (this.instructions.length) {
 37422                  new Uint8Array(t.buffer, 0, t.buffer.byteLength).set(
 37423                    this.instructions,
 37424                    e,
 37425                  );
 37426                  e += this.instructions.length;
 37427                }
 37428                for (const a of i) t.setUint8(e++, a);
 37429                for (let a = 0, n = r.length; a < n; a++) {
 37430                  const n = r[a],
 37431                    s = i[a];
 37432                  if (2 & s) t.setUint8(e++, n);
 37433                  else if (!(16 & s)) {
 37434                    t.setInt16(e, n);
 37435                    e += 2;
 37436                  }
 37437                }
 37438                for (let a = 0, r = n.length; a < r; a++) {
 37439                  const r = n[a],
 37440                    s = i[a];
 37441                  if (4 & s) t.setUint8(e++, r);
 37442                  else if (!(32 & s)) {
 37443                    t.setInt16(e, r);
 37444                    e += 2;
 37445                  }
 37446                }
 37447                return e - a;
 37448              }
 37449              scale(e, t) {
 37450                for (const a of this.contours)
 37451                  if (0 !== a.xCoordinates.length)
 37452                    for (let r = 0, n = a.xCoordinates.length; r < n; r++)
 37453                      a.xCoordinates[r] = Math.round(
 37454                        e + (a.xCoordinates[r] - e) * t,
 37455                      );
 37456              }
 37457            }
 37458            class CompositeGlyph {
 37459              constructor({
 37460                flags: e,
 37461                glyphIndex: t,
 37462                argument1: a,
 37463                argument2: r,
 37464                transf: n,
 37465                instructions: i,
 37466              }) {
 37467                this.flags = e;
 37468                this.glyphIndex = t;
 37469                this.argument1 = a;
 37470                this.argument2 = r;
 37471                this.transf = n;
 37472                this.instructions = i;
 37473              }
 37474              static parse(e, t) {
 37475                const a = e,
 37476                  r = [];
 37477                let n = t.getUint16(e);
 37478                const i = t.getUint16(e + 2);
 37479                e += 4;
 37480                let s, o;
 37481                if (1 & n) {
 37482                  if (2 & n) {
 37483                    s = t.getInt16(e);
 37484                    o = t.getInt16(e + 2);
 37485                  } else {
 37486                    s = t.getUint16(e);
 37487                    o = t.getUint16(e + 2);
 37488                  }
 37489                  e += 4;
 37490                  n ^= 1;
 37491                } else {
 37492                  if (2 & n) {
 37493                    s = t.getInt8(e);
 37494                    o = t.getInt8(e + 1);
 37495                  } else {
 37496                    s = t.getUint8(e);
 37497                    o = t.getUint8(e + 1);
 37498                  }
 37499                  e += 2;
 37500                }
 37501                if (8 & n) {
 37502                  r.push(t.getUint16(e));
 37503                  e += 2;
 37504                } else if (64 & n) {
 37505                  r.push(t.getUint16(e), t.getUint16(e + 2));
 37506                  e += 4;
 37507                } else if (128 & n) {
 37508                  r.push(
 37509                    t.getUint16(e),
 37510                    t.getUint16(e + 2),
 37511                    t.getUint16(e + 4),
 37512                    t.getUint16(e + 6),
 37513                  );
 37514                  e += 8;
 37515                }
 37516                let c = null;
 37517                if (256 & n) {
 37518                  const a = t.getUint16(e);
 37519                  e += 2;
 37520                  c = new Uint8Array(t).slice(e, e + a);
 37521                  e += a;
 37522                }
 37523                return [
 37524                  e - a,
 37525                  new CompositeGlyph({
 37526                    flags: n,
 37527                    glyphIndex: i,
 37528                    argument1: s,
 37529                    argument2: o,
 37530                    transf: r,
 37531                    instructions: c,
 37532                  }),
 37533                ];
 37534              }
 37535              getSize() {
 37536                let e = 4 + 2 * this.transf.length;
 37537                256 & this.flags && (e += 2 + this.instructions.length);
 37538                e += 2;
 37539                2 & this.flags
 37540                  ? (this.argument1 >= -128 &&
 37541                      this.argument1 <= 127 &&
 37542                      this.argument2 >= -128 &&
 37543                      this.argument2 <= 127) ||
 37544                    (e += 2)
 37545                  : (this.argument1 >= 0 &&
 37546                      this.argument1 <= 255 &&
 37547                      this.argument2 >= 0 &&
 37548                      this.argument2 <= 255) ||
 37549                    (e += 2);
 37550                return e;
 37551              }
 37552              write(e, t) {
 37553                const a = e;
 37554                2 & this.flags
 37555                  ? (this.argument1 >= -128 &&
 37556                      this.argument1 <= 127 &&
 37557                      this.argument2 >= -128 &&
 37558                      this.argument2 <= 127) ||
 37559                    (this.flags |= 1)
 37560                  : (this.argument1 >= 0 &&
 37561                      this.argument1 <= 255 &&
 37562                      this.argument2 >= 0 &&
 37563                      this.argument2 <= 255) ||
 37564                    (this.flags |= 1);
 37565                t.setUint16(e, this.flags);
 37566                t.setUint16(e + 2, this.glyphIndex);
 37567                e += 4;
 37568                if (1 & this.flags) {
 37569                  if (2 & this.flags) {
 37570                    t.setInt16(e, this.argument1);
 37571                    t.setInt16(e + 2, this.argument2);
 37572                  } else {
 37573                    t.setUint16(e, this.argument1);
 37574                    t.setUint16(e + 2, this.argument2);
 37575                  }
 37576                  e += 4;
 37577                } else {
 37578                  t.setUint8(e, this.argument1);
 37579                  t.setUint8(e + 1, this.argument2);
 37580                  e += 2;
 37581                }
 37582                if (256 & this.flags) {
 37583                  t.setUint16(e, this.instructions.length);
 37584                  e += 2;
 37585                  if (this.instructions.length) {
 37586                    new Uint8Array(t.buffer, 0, t.buffer.byteLength).set(
 37587                      this.instructions,
 37588                      e,
 37589                    );
 37590                    e += this.instructions.length;
 37591                  }
 37592                }
 37593                return e - a;
 37594              }
 37595              scale(e, t) {}
 37596            }
 37597          },
 37598          (e, t, a) => {
 37599            Object.defineProperty(t, "__esModule", { value: !0 });
 37600            t.OpenTypeFileBuilder = void 0;
 37601            var r = a(3),
 37602              n = a(2);
 37603            function writeInt16(e, t, a) {
 37604              e[t] = (a >> 8) & 255;
 37605              e[t + 1] = 255 & a;
 37606            }
 37607            function writeInt32(e, t, a) {
 37608              e[t] = (a >> 24) & 255;
 37609              e[t + 1] = (a >> 16) & 255;
 37610              e[t + 2] = (a >> 8) & 255;
 37611              e[t + 3] = 255 & a;
 37612            }
 37613            function writeData(e, t, a) {
 37614              if (a instanceof Uint8Array) e.set(a, t);
 37615              else if ("string" == typeof a)
 37616                for (let r = 0, n = a.length; r < n; r++)
 37617                  e[t++] = 255 & a.charCodeAt(r);
 37618              else for (const r of a) e[t++] = 255 & r;
 37619            }
 37620            class OpenTypeFileBuilder {
 37621              constructor(e) {
 37622                this.sfnt = e;
 37623                this.tables = Object.create(null);
 37624              }
 37625              static getSearchParams(e, t) {
 37626                let a = 1,
 37627                  r = 0;
 37628                for (; (a ^ e) > a; ) {
 37629                  a <<= 1;
 37630                  r++;
 37631                }
 37632                const n = a * t;
 37633                return { range: n, entry: r, rangeShift: t * e - n };
 37634              }
 37635              toArray() {
 37636                let e = this.sfnt;
 37637                const t = this.tables,
 37638                  a = Object.keys(t);
 37639                a.sort();
 37640                const i = a.length;
 37641                let s,
 37642                  o,
 37643                  c,
 37644                  l,
 37645                  h,
 37646                  u = 12 + 16 * i;
 37647                const d = [u];
 37648                for (s = 0; s < i; s++) {
 37649                  l = t[a[s]];
 37650                  u += ((l.length + 3) & -4) >>> 0;
 37651                  d.push(u);
 37652                }
 37653                const f = new Uint8Array(u);
 37654                for (s = 0; s < i; s++) {
 37655                  l = t[a[s]];
 37656                  writeData(f, d[s], l);
 37657                }
 37658                "true" === e && (e = (0, n.string32)(65536));
 37659                f[0] = 255 & e.charCodeAt(0);
 37660                f[1] = 255 & e.charCodeAt(1);
 37661                f[2] = 255 & e.charCodeAt(2);
 37662                f[3] = 255 & e.charCodeAt(3);
 37663                writeInt16(f, 4, i);
 37664                const g = OpenTypeFileBuilder.getSearchParams(i, 16);
 37665                writeInt16(f, 6, g.range);
 37666                writeInt16(f, 8, g.entry);
 37667                writeInt16(f, 10, g.rangeShift);
 37668                u = 12;
 37669                for (s = 0; s < i; s++) {
 37670                  h = a[s];
 37671                  f[u] = 255 & h.charCodeAt(0);
 37672                  f[u + 1] = 255 & h.charCodeAt(1);
 37673                  f[u + 2] = 255 & h.charCodeAt(2);
 37674                  f[u + 3] = 255 & h.charCodeAt(3);
 37675                  let e = 0;
 37676                  for (o = d[s], c = d[s + 1]; o < c; o += 4) {
 37677                    e = (e + (0, r.readUint32)(f, o)) >>> 0;
 37678                  }
 37679                  writeInt32(f, u + 4, e);
 37680                  writeInt32(f, u + 8, d[s]);
 37681                  writeInt32(f, u + 12, t[h].length);
 37682                  u += 16;
 37683                }
 37684                return f;
 37685              }
 37686              addTable(e, t) {
 37687                if (e in this.tables)
 37688                  throw new Error("Table " + e + " already exists");
 37689                this.tables[e] = t;
 37690              }
 37691            }
 37692            t.OpenTypeFileBuilder = OpenTypeFileBuilder;
 37693          },
 37694          (e, t, a) => {
 37695            Object.defineProperty(t, "__esModule", { value: !0 });
 37696            t.Type1Font = void 0;
 37697            var r = a(35),
 37698              n = a(2),
 37699              i = a(38),
 37700              s = a(3),
 37701              o = a(8),
 37702              c = a(49);
 37703            function findBlock(e, t, a) {
 37704              const r = e.length,
 37705                n = t.length,
 37706                i = r - n;
 37707              let o = a,
 37708                c = !1;
 37709              for (; o < i; ) {
 37710                let a = 0;
 37711                for (; a < n && e[o + a] === t[a]; ) a++;
 37712                if (a >= n) {
 37713                  o += a;
 37714                  for (; o < r && (0, s.isWhiteSpace)(e[o]); ) o++;
 37715                  c = !0;
 37716                  break;
 37717                }
 37718                o++;
 37719              }
 37720              return { found: c, length: o };
 37721            }
 37722            t.Type1Font = class Type1Font {
 37723              constructor(e, t, a) {
 37724                let r = a.length1,
 37725                  s = a.length2,
 37726                  l = t.peekBytes(6);
 37727                const h = 128 === l[0] && 1 === l[1];
 37728                if (h) {
 37729                  t.skip(6);
 37730                  r = (l[5] << 24) | (l[4] << 16) | (l[3] << 8) | l[2];
 37731                }
 37732                const u = (function getHeaderBlock(e, t) {
 37733                  const a = [101, 101, 120, 101, 99],
 37734                    r = e.pos;
 37735                  let i, s, c, l;
 37736                  try {
 37737                    i = e.getBytes(t);
 37738                    s = i.length;
 37739                  } catch {}
 37740                  if (s === t) {
 37741                    c = findBlock(i, a, t - 2 * a.length);
 37742                    if (c.found && c.length === t)
 37743                      return { stream: new o.Stream(i), length: t };
 37744                  }
 37745                  (0, n.warn)(
 37746                    'Invalid "Length1" property in Type1 font -- trying to recover.',
 37747                  );
 37748                  e.pos = r;
 37749                  for (;;) {
 37750                    c = findBlock(e.peekBytes(2048), a, 0);
 37751                    if (0 === c.length) break;
 37752                    e.pos += c.length;
 37753                    if (c.found) {
 37754                      l = e.pos - r;
 37755                      break;
 37756                    }
 37757                  }
 37758                  e.pos = r;
 37759                  if (l)
 37760                    return { stream: new o.Stream(e.getBytes(l)), length: l };
 37761                  (0, n.warn)(
 37762                    'Unable to recover "Length1" property in Type1 font -- using as is.',
 37763                  );
 37764                  return { stream: new o.Stream(e.getBytes(t)), length: t };
 37765                })(t, r);
 37766                new c.Type1Parser(
 37767                  u.stream,
 37768                  !1,
 37769                  i.SEAC_ANALYSIS_ENABLED,
 37770                ).extractFontHeader(a);
 37771                if (h) {
 37772                  l = t.getBytes(6);
 37773                  s = (l[5] << 24) | (l[4] << 16) | (l[3] << 8) | l[2];
 37774                }
 37775                const d = (function getEexecBlock(e, t) {
 37776                    const a = e.getBytes();
 37777                    if (0 === a.length)
 37778                      throw new n.FormatError(
 37779                        "getEexecBlock - no font program found.",
 37780                      );
 37781                    return { stream: new o.Stream(a), length: a.length };
 37782                  })(t),
 37783                  f = new c.Type1Parser(
 37784                    d.stream,
 37785                    !0,
 37786                    i.SEAC_ANALYSIS_ENABLED,
 37787                  ).extractFontProgram(a);
 37788                for (const e in f.properties) a[e] = f.properties[e];
 37789                const g = f.charstrings,
 37790                  p = this.getType2Charstrings(g),
 37791                  m = this.getType2Subrs(f.subrs);
 37792                this.charstrings = g;
 37793                this.data = this.wrap(e, p, this.charstrings, m, a);
 37794                this.seacs = this.getSeacs(f.charstrings);
 37795              }
 37796              get numGlyphs() {
 37797                return this.charstrings.length + 1;
 37798              }
 37799              getCharset() {
 37800                const e = [".notdef"];
 37801                for (const { glyphName: t } of this.charstrings) e.push(t);
 37802                return e;
 37803              }
 37804              getGlyphMapping(e) {
 37805                const t = this.charstrings;
 37806                if (e.composite) {
 37807                  const a = Object.create(null);
 37808                  for (let r = 0, n = t.length; r < n; r++) {
 37809                    a[e.cMap.charCodeOf(r)] = r + 1;
 37810                  }
 37811                  return a;
 37812                }
 37813                const a = [".notdef"];
 37814                let r, n;
 37815                for (n = 0; n < t.length; n++) a.push(t[n].glyphName);
 37816                const s = e.builtInEncoding;
 37817                if (s) {
 37818                  r = Object.create(null);
 37819                  for (const e in s) {
 37820                    n = a.indexOf(s[e]);
 37821                    n >= 0 && (r[e] = n);
 37822                  }
 37823                }
 37824                return (0, i.type1FontGlyphMapping)(e, r, a);
 37825              }
 37826              hasGlyphId(e) {
 37827                if (e < 0 || e >= this.numGlyphs) return !1;
 37828                if (0 === e) return !0;
 37829                return this.charstrings[e - 1].charstring.length > 0;
 37830              }
 37831              getSeacs(e) {
 37832                const t = [];
 37833                for (let a = 0, r = e.length; a < r; a++) {
 37834                  const r = e[a];
 37835                  r.seac && (t[a + 1] = r.seac);
 37836                }
 37837                return t;
 37838              }
 37839              getType2Charstrings(e) {
 37840                const t = [];
 37841                for (const a of e) t.push(a.charstring);
 37842                return t;
 37843              }
 37844              getType2Subrs(e) {
 37845                let t = 0;
 37846                const a = e.length;
 37847                t = a < 1133 ? 107 : a < 33769 ? 1131 : 32768;
 37848                const r = [];
 37849                let n;
 37850                for (n = 0; n < t; n++) r.push([11]);
 37851                for (n = 0; n < a; n++) r.push(e[n]);
 37852                return r;
 37853              }
 37854              wrap(e, t, a, n, i) {
 37855                const s = new r.CFF();
 37856                s.header = new r.CFFHeader(1, 0, 4, 4);
 37857                s.names = [e];
 37858                const o = new r.CFFTopDict();
 37859                o.setByName("version", 391);
 37860                o.setByName("Notice", 392);
 37861                o.setByName("FullName", 393);
 37862                o.setByName("FamilyName", 394);
 37863                o.setByName("Weight", 395);
 37864                o.setByName("Encoding", null);
 37865                o.setByName("FontMatrix", i.fontMatrix);
 37866                o.setByName("FontBBox", i.bbox);
 37867                o.setByName("charset", null);
 37868                o.setByName("CharStrings", null);
 37869                o.setByName("Private", null);
 37870                s.topDict = o;
 37871                const c = new r.CFFStrings();
 37872                c.add("Version 0.11");
 37873                c.add("See original notice");
 37874                c.add(e);
 37875                c.add(e);
 37876                c.add("Medium");
 37877                s.strings = c;
 37878                s.globalSubrIndex = new r.CFFIndex();
 37879                const l = t.length,
 37880                  h = [".notdef"];
 37881                let u, d;
 37882                for (u = 0; u < l; u++) {
 37883                  const e = a[u].glyphName;
 37884                  -1 === r.CFFStandardStrings.indexOf(e) && c.add(e);
 37885                  h.push(e);
 37886                }
 37887                s.charset = new r.CFFCharset(!1, 0, h);
 37888                const f = new r.CFFIndex();
 37889                f.add([139, 14]);
 37890                for (u = 0; u < l; u++) f.add(t[u]);
 37891                s.charStrings = f;
 37892                const g = new r.CFFPrivateDict();
 37893                g.setByName("Subrs", null);
 37894                const p = [
 37895                  "BlueValues",
 37896                  "OtherBlues",
 37897                  "FamilyBlues",
 37898                  "FamilyOtherBlues",
 37899                  "StemSnapH",
 37900                  "StemSnapV",
 37901                  "BlueShift",
 37902                  "BlueFuzz",
 37903                  "BlueScale",
 37904                  "LanguageGroup",
 37905                  "ExpansionFactor",
 37906                  "ForceBold",
 37907                  "StdHW",
 37908                  "StdVW",
 37909                ];
 37910                for (u = 0, d = p.length; u < d; u++) {
 37911                  const e = p[u];
 37912                  if (!(e in i.privateData)) continue;
 37913                  const t = i.privateData[e];
 37914                  if (Array.isArray(t))
 37915                    for (let e = t.length - 1; e > 0; e--) t[e] -= t[e - 1];
 37916                  g.setByName(e, t);
 37917                }
 37918                s.topDict.privateDict = g;
 37919                const m = new r.CFFIndex();
 37920                for (u = 0, d = n.length; u < d; u++) m.add(n[u]);
 37921                g.subrsIndex = m;
 37922                return new r.CFFCompiler(s).compile();
 37923              }
 37924            };
 37925          },
 37926          (e, t, a) => {
 37927            Object.defineProperty(t, "__esModule", { value: !0 });
 37928            t.Type1Parser = void 0;
 37929            var r = a(37),
 37930              n = a(3),
 37931              i = a(8),
 37932              s = a(2);
 37933            const o = [4],
 37934              c = [5],
 37935              l = [6],
 37936              h = [7],
 37937              u = [8],
 37938              d = [12, 35],
 37939              f = [14],
 37940              g = [21],
 37941              p = [22],
 37942              m = [30],
 37943              b = [31];
 37944            class Type1CharString {
 37945              constructor() {
 37946                this.width = 0;
 37947                this.lsb = 0;
 37948                this.flexing = !1;
 37949                this.output = [];
 37950                this.stack = [];
 37951              }
 37952              convert(e, t, a) {
 37953                const r = e.length;
 37954                let n,
 37955                  i,
 37956                  y,
 37957                  w = !1;
 37958                for (let S = 0; S < r; S++) {
 37959                  let r = e[S];
 37960                  if (r < 32) {
 37961                    12 === r && (r = (r << 8) + e[++S]);
 37962                    switch (r) {
 37963                      case 1:
 37964                      case 3:
 37965                      case 9:
 37966                      case 3072:
 37967                      case 3073:
 37968                      case 3074:
 37969                      case 3105:
 37970                        this.stack = [];
 37971                        break;
 37972                      case 4:
 37973                        if (this.flexing) {
 37974                          if (this.stack.length < 1) {
 37975                            w = !0;
 37976                            break;
 37977                          }
 37978                          const e = this.stack.pop();
 37979                          this.stack.push(0, e);
 37980                          break;
 37981                        }
 37982                        w = this.executeCommand(1, o);
 37983                        break;
 37984                      case 5:
 37985                        w = this.executeCommand(2, c);
 37986                        break;
 37987                      case 6:
 37988                        w = this.executeCommand(1, l);
 37989                        break;
 37990                      case 7:
 37991                        w = this.executeCommand(1, h);
 37992                        break;
 37993                      case 8:
 37994                        w = this.executeCommand(6, u);
 37995                        break;
 37996                      case 10:
 37997                        if (this.stack.length < 1) {
 37998                          w = !0;
 37999                          break;
 38000                        }
 38001                        y = this.stack.pop();
 38002                        if (!t[y]) {
 38003                          w = !0;
 38004                          break;
 38005                        }
 38006                        w = this.convert(t[y], t, a);
 38007                        break;
 38008                      case 11:
 38009                        return w;
 38010                      case 13:
 38011                        if (this.stack.length < 2) {
 38012                          w = !0;
 38013                          break;
 38014                        }
 38015                        n = this.stack.pop();
 38016                        i = this.stack.pop();
 38017                        this.lsb = i;
 38018                        this.width = n;
 38019                        this.stack.push(n, i);
 38020                        w = this.executeCommand(2, p);
 38021                        break;
 38022                      case 14:
 38023                        this.output.push(f[0]);
 38024                        break;
 38025                      case 21:
 38026                        if (this.flexing) break;
 38027                        w = this.executeCommand(2, g);
 38028                        break;
 38029                      case 22:
 38030                        if (this.flexing) {
 38031                          this.stack.push(0);
 38032                          break;
 38033                        }
 38034                        w = this.executeCommand(1, p);
 38035                        break;
 38036                      case 30:
 38037                        w = this.executeCommand(4, m);
 38038                        break;
 38039                      case 31:
 38040                        w = this.executeCommand(4, b);
 38041                        break;
 38042                      case 3078:
 38043                        if (a) {
 38044                          const e = this.stack.at(-5);
 38045                          this.seac = this.stack.splice(-4, 4);
 38046                          this.seac[0] += this.lsb - e;
 38047                          w = this.executeCommand(0, f);
 38048                        } else w = this.executeCommand(4, f);
 38049                        break;
 38050                      case 3079:
 38051                        if (this.stack.length < 4) {
 38052                          w = !0;
 38053                          break;
 38054                        }
 38055                        this.stack.pop();
 38056                        n = this.stack.pop();
 38057                        const e = this.stack.pop();
 38058                        i = this.stack.pop();
 38059                        this.lsb = i;
 38060                        this.width = n;
 38061                        this.stack.push(n, i, e);
 38062                        w = this.executeCommand(3, g);
 38063                        break;
 38064                      case 3084:
 38065                        if (this.stack.length < 2) {
 38066                          w = !0;
 38067                          break;
 38068                        }
 38069                        const S = this.stack.pop(),
 38070                          x = this.stack.pop();
 38071                        this.stack.push(x / S);
 38072                        break;
 38073                      case 3088:
 38074                        if (this.stack.length < 2) {
 38075                          w = !0;
 38076                          break;
 38077                        }
 38078                        y = this.stack.pop();
 38079                        const C = this.stack.pop();
 38080                        if (0 === y && 3 === C) {
 38081                          const e = this.stack.splice(-17, 17);
 38082                          this.stack.push(
 38083                            e[2] + e[0],
 38084                            e[3] + e[1],
 38085                            e[4],
 38086                            e[5],
 38087                            e[6],
 38088                            e[7],
 38089                            e[8],
 38090                            e[9],
 38091                            e[10],
 38092                            e[11],
 38093                            e[12],
 38094                            e[13],
 38095                            e[14],
 38096                          );
 38097                          w = this.executeCommand(13, d, !0);
 38098                          this.flexing = !1;
 38099                          this.stack.push(e[15], e[16]);
 38100                        } else 1 === y && 0 === C && (this.flexing = !0);
 38101                        break;
 38102                      case 3089:
 38103                        break;
 38104                      default:
 38105                        (0, s.warn)(
 38106                          'Unknown type 1 charstring command of "' + r + '"',
 38107                        );
 38108                    }
 38109                    if (w) break;
 38110                  } else {
 38111                    r <= 246
 38112                      ? (r -= 139)
 38113                      : (r =
 38114                          r <= 250
 38115                            ? 256 * (r - 247) + e[++S] + 108
 38116                            : r <= 254
 38117                              ? -256 * (r - 251) - e[++S] - 108
 38118                              : ((255 & e[++S]) << 24) |
 38119                                ((255 & e[++S]) << 16) |
 38120                                ((255 & e[++S]) << 8) |
 38121                                ((255 & e[++S]) << 0));
 38122                    this.stack.push(r);
 38123                  }
 38124                }
 38125                return w;
 38126              }
 38127              executeCommand(e, t, a) {
 38128                const r = this.stack.length;
 38129                if (e > r) return !0;
 38130                const n = r - e;
 38131                for (let e = n; e < r; e++) {
 38132                  let t = this.stack[e];
 38133                  if (Number.isInteger(t))
 38134                    this.output.push(28, (t >> 8) & 255, 255 & t);
 38135                  else {
 38136                    t = (65536 * t) | 0;
 38137                    this.output.push(
 38138                      255,
 38139                      (t >> 24) & 255,
 38140                      (t >> 16) & 255,
 38141                      (t >> 8) & 255,
 38142                      255 & t,
 38143                    );
 38144                  }
 38145                }
 38146                this.output.push(...t);
 38147                a ? this.stack.splice(n, e) : (this.stack.length = 0);
 38148                return !1;
 38149              }
 38150            }
 38151            function isHexDigit(e) {
 38152              return (
 38153                (e >= 48 && e <= 57) ||
 38154                (e >= 65 && e <= 70) ||
 38155                (e >= 97 && e <= 102)
 38156              );
 38157            }
 38158            function decrypt(e, t, a) {
 38159              if (a >= e.length) return new Uint8Array(0);
 38160              let r,
 38161                n,
 38162                i = 0 | t;
 38163              for (r = 0; r < a; r++) i = (52845 * (e[r] + i) + 22719) & 65535;
 38164              const s = e.length - a,
 38165                o = new Uint8Array(s);
 38166              for (r = a, n = 0; n < s; r++, n++) {
 38167                const t = e[r];
 38168                o[n] = t ^ (i >> 8);
 38169                i = (52845 * (t + i) + 22719) & 65535;
 38170              }
 38171              return o;
 38172            }
 38173            function isSpecial(e) {
 38174              return (
 38175                47 === e ||
 38176                91 === e ||
 38177                93 === e ||
 38178                123 === e ||
 38179                125 === e ||
 38180                40 === e ||
 38181                41 === e
 38182              );
 38183            }
 38184            t.Type1Parser = class Type1Parser {
 38185              constructor(e, t, a) {
 38186                if (t) {
 38187                  const t = e.getBytes(),
 38188                    a = !(
 38189                      (isHexDigit(t[0]) || (0, n.isWhiteSpace)(t[0])) &&
 38190                      isHexDigit(t[1]) &&
 38191                      isHexDigit(t[2]) &&
 38192                      isHexDigit(t[3]) &&
 38193                      isHexDigit(t[4]) &&
 38194                      isHexDigit(t[5]) &&
 38195                      isHexDigit(t[6]) &&
 38196                      isHexDigit(t[7])
 38197                    );
 38198                  e = new i.Stream(
 38199                    a
 38200                      ? decrypt(t, 55665, 4)
 38201                      : (function decryptAscii(e, t, a) {
 38202                          let r = 0 | t;
 38203                          const n = e.length,
 38204                            i = new Uint8Array(n >>> 1);
 38205                          let s, o;
 38206                          for (s = 0, o = 0; s < n; s++) {
 38207                            const t = e[s];
 38208                            if (!isHexDigit(t)) continue;
 38209                            s++;
 38210                            let a;
 38211                            for (; s < n && !isHexDigit((a = e[s])); ) s++;
 38212                            if (s < n) {
 38213                              const e = parseInt(String.fromCharCode(t, a), 16);
 38214                              i[o++] = e ^ (r >> 8);
 38215                              r = (52845 * (e + r) + 22719) & 65535;
 38216                            }
 38217                          }
 38218                          return i.slice(a, o);
 38219                        })(t, 55665, 4),
 38220                  );
 38221                }
 38222                this.seacAnalysisEnabled = !!a;
 38223                this.stream = e;
 38224                this.nextChar();
 38225              }
 38226              readNumberArray() {
 38227                this.getToken();
 38228                const e = [];
 38229                for (;;) {
 38230                  const t = this.getToken();
 38231                  if (null === t || "]" === t || "}" === t) break;
 38232                  e.push(parseFloat(t || 0));
 38233                }
 38234                return e;
 38235              }
 38236              readNumber() {
 38237                const e = this.getToken();
 38238                return parseFloat(e || 0);
 38239              }
 38240              readInt() {
 38241                const e = this.getToken();
 38242                return 0 | parseInt(e || 0, 10);
 38243              }
 38244              readBoolean() {
 38245                return "true" === this.getToken() ? 1 : 0;
 38246              }
 38247              nextChar() {
 38248                return (this.currentChar = this.stream.getByte());
 38249              }
 38250              prevChar() {
 38251                this.stream.skip(-2);
 38252                return (this.currentChar = this.stream.getByte());
 38253              }
 38254              getToken() {
 38255                let e = !1,
 38256                  t = this.currentChar;
 38257                for (;;) {
 38258                  if (-1 === t) return null;
 38259                  if (e) (10 !== t && 13 !== t) || (e = !1);
 38260                  else if (37 === t) e = !0;
 38261                  else if (!(0, n.isWhiteSpace)(t)) break;
 38262                  t = this.nextChar();
 38263                }
 38264                if (isSpecial(t)) {
 38265                  this.nextChar();
 38266                  return String.fromCharCode(t);
 38267                }
 38268                let a = "";
 38269                do {
 38270                  a += String.fromCharCode(t);
 38271                  t = this.nextChar();
 38272                } while (t >= 0 && !(0, n.isWhiteSpace)(t) && !isSpecial(t));
 38273                return a;
 38274              }
 38275              readCharStrings(e, t) {
 38276                return -1 === t ? e : decrypt(e, 4330, t);
 38277              }
 38278              extractFontProgram(e) {
 38279                const t = this.stream,
 38280                  a = [],
 38281                  r = [],
 38282                  n = Object.create(null);
 38283                n.lenIV = 4;
 38284                const i = {
 38285                  subrs: [],
 38286                  charstrings: [],
 38287                  properties: { privateData: n },
 38288                };
 38289                let s, o, c, l;
 38290                for (; null !== (s = this.getToken()); )
 38291                  if ("/" === s) {
 38292                    s = this.getToken();
 38293                    switch (s) {
 38294                      case "CharStrings":
 38295                        this.getToken();
 38296                        this.getToken();
 38297                        this.getToken();
 38298                        this.getToken();
 38299                        for (;;) {
 38300                          s = this.getToken();
 38301                          if (null === s || "end" === s) break;
 38302                          if ("/" !== s) continue;
 38303                          const e = this.getToken();
 38304                          o = this.readInt();
 38305                          this.getToken();
 38306                          c = o > 0 ? t.getBytes(o) : new Uint8Array(0);
 38307                          l = i.properties.privateData.lenIV;
 38308                          const a = this.readCharStrings(c, l);
 38309                          this.nextChar();
 38310                          s = this.getToken();
 38311                          "noaccess" === s
 38312                            ? this.getToken()
 38313                            : "/" === s && this.prevChar();
 38314                          r.push({ glyph: e, encoded: a });
 38315                        }
 38316                        break;
 38317                      case "Subrs":
 38318                        this.readInt();
 38319                        this.getToken();
 38320                        for (; "dup" === this.getToken(); ) {
 38321                          const e = this.readInt();
 38322                          o = this.readInt();
 38323                          this.getToken();
 38324                          c = o > 0 ? t.getBytes(o) : new Uint8Array(0);
 38325                          l = i.properties.privateData.lenIV;
 38326                          const r = this.readCharStrings(c, l);
 38327                          this.nextChar();
 38328                          s = this.getToken();
 38329                          "noaccess" === s && this.getToken();
 38330                          a[e] = r;
 38331                        }
 38332                        break;
 38333                      case "BlueValues":
 38334                      case "OtherBlues":
 38335                      case "FamilyBlues":
 38336                      case "FamilyOtherBlues":
 38337                        const e = this.readNumberArray();
 38338                        e.length > 0 && e.length, 0;
 38339                        break;
 38340                      case "StemSnapH":
 38341                      case "StemSnapV":
 38342                        i.properties.privateData[s] = this.readNumberArray();
 38343                        break;
 38344                      case "StdHW":
 38345                      case "StdVW":
 38346                        i.properties.privateData[s] = this.readNumberArray()[0];
 38347                        break;
 38348                      case "BlueShift":
 38349                      case "lenIV":
 38350                      case "BlueFuzz":
 38351                      case "BlueScale":
 38352                      case "LanguageGroup":
 38353                        i.properties.privateData[s] = this.readNumber();
 38354                        break;
 38355                      case "ExpansionFactor":
 38356                        i.properties.privateData[s] = this.readNumber() || 0.06;
 38357                        break;
 38358                      case "ForceBold":
 38359                        i.properties.privateData[s] = this.readBoolean();
 38360                    }
 38361                  }
 38362                for (const { encoded: t, glyph: n } of r) {
 38363                  const r = new Type1CharString(),
 38364                    s = r.convert(t, a, this.seacAnalysisEnabled);
 38365                  let o = r.output;
 38366                  s && (o = [14]);
 38367                  const c = {
 38368                    glyphName: n,
 38369                    charstring: o,
 38370                    width: r.width,
 38371                    lsb: r.lsb,
 38372                    seac: r.seac,
 38373                  };
 38374                  ".notdef" === n
 38375                    ? i.charstrings.unshift(c)
 38376                    : i.charstrings.push(c);
 38377                  if (e.builtInEncoding) {
 38378                    const t = e.builtInEncoding.indexOf(n);
 38379                    t > -1 &&
 38380                      void 0 === e.widths[t] &&
 38381                      t >= e.firstChar &&
 38382                      t <= e.lastChar &&
 38383                      (e.widths[t] = r.width);
 38384                  }
 38385                }
 38386                return i;
 38387              }
 38388              extractFontHeader(e) {
 38389                let t;
 38390                for (; null !== (t = this.getToken()); )
 38391                  if ("/" === t) {
 38392                    t = this.getToken();
 38393                    switch (t) {
 38394                      case "FontMatrix":
 38395                        const a = this.readNumberArray();
 38396                        e.fontMatrix = a;
 38397                        break;
 38398                      case "Encoding":
 38399                        const n = this.getToken();
 38400                        let i;
 38401                        if (/^\d+$/.test(n)) {
 38402                          i = [];
 38403                          const e = 0 | parseInt(n, 10);
 38404                          this.getToken();
 38405                          for (let a = 0; a < e; a++) {
 38406                            t = this.getToken();
 38407                            for (; "dup" !== t && "def" !== t; ) {
 38408                              t = this.getToken();
 38409                              if (null === t) return;
 38410                            }
 38411                            if ("def" === t) break;
 38412                            const e = this.readInt();
 38413                            this.getToken();
 38414                            const a = this.getToken();
 38415                            i[e] = a;
 38416                            this.getToken();
 38417                          }
 38418                        } else i = (0, r.getEncoding)(n);
 38419                        e.builtInEncoding = i;
 38420                        break;
 38421                      case "FontBBox":
 38422                        const s = this.readNumberArray();
 38423                        e.ascent = Math.max(s[3], s[1]);
 38424                        e.descent = Math.min(s[1], s[3]);
 38425                        e.ascentScaled = !0;
 38426                    }
 38427                  }
 38428              }
 38429            };
 38430          },
 38431          (e, t, a) => {
 38432            Object.defineProperty(t, "__esModule", { value: !0 });
 38433            t.Pattern = void 0;
 38434            t.clearPatternCaches = function clearPatternCaches() {
 38435              f = Object.create(null);
 38436            };
 38437            t.getTilingPatternIR = function getTilingPatternIR(e, t, a) {
 38438              const n = t.getArray("Matrix"),
 38439                i = r.Util.normalizeRect(t.getArray("BBox")),
 38440                s = t.get("XStep"),
 38441                o = t.get("YStep"),
 38442                c = t.get("PaintType"),
 38443                l = t.get("TilingType");
 38444              if (i[2] - i[0] == 0 || i[3] - i[1] == 0)
 38445                throw new r.FormatError(
 38446                  `Invalid getTilingPatternIR /BBox array: [${i}].`,
 38447                );
 38448              return ["TilingPattern", a, e, n, i, s, o, c, l];
 38449            };
 38450            var r = a(2),
 38451              n = a(5),
 38452              i = a(12),
 38453              s = a(3);
 38454            const o = 2,
 38455              c = 3,
 38456              l = 4,
 38457              h = 5,
 38458              u = 6,
 38459              d = 7;
 38460            t.Pattern = class Pattern {
 38461              constructor() {
 38462                (0, r.unreachable)("Cannot initialize Pattern.");
 38463              }
 38464              static parseShading(e, t, a, i, f) {
 38465                const g = e instanceof n.BaseStream ? e.dict : e,
 38466                  p = g.get("ShadingType");
 38467                try {
 38468                  switch (p) {
 38469                    case o:
 38470                    case c:
 38471                      return new RadialAxialShading(g, t, a, i, f);
 38472                    case l:
 38473                    case h:
 38474                    case u:
 38475                    case d:
 38476                      return new MeshShading(e, t, a, i, f);
 38477                    default:
 38478                      throw new r.FormatError("Unsupported ShadingType: " + p);
 38479                  }
 38480                } catch (e) {
 38481                  if (e instanceof s.MissingDataException) throw e;
 38482                  (0, r.warn)(e);
 38483                  return new DummyShading();
 38484                }
 38485              }
 38486            };
 38487            class BaseShading {
 38488              static SMALL_NUMBER = 1e-6;
 38489              constructor() {
 38490                this.constructor === BaseShading &&
 38491                  (0, r.unreachable)("Cannot initialize BaseShading.");
 38492              }
 38493              getIR() {
 38494                (0, r.unreachable)("Abstract method `getIR` called.");
 38495              }
 38496            }
 38497            class RadialAxialShading extends BaseShading {
 38498              constructor(e, t, a, n, s) {
 38499                super();
 38500                this.coordsArr = e.getArray("Coords");
 38501                this.shadingType = e.get("ShadingType");
 38502                const o = i.ColorSpace.parse({
 38503                    cs: e.getRaw("CS") || e.getRaw("ColorSpace"),
 38504                    xref: t,
 38505                    resources: a,
 38506                    pdfFunctionFactory: n,
 38507                    localColorSpaceCache: s,
 38508                  }),
 38509                  l = e.getArray("BBox");
 38510                this.bbox =
 38511                  Array.isArray(l) && 4 === l.length
 38512                    ? r.Util.normalizeRect(l)
 38513                    : null;
 38514                let h = 0,
 38515                  u = 1;
 38516                if (e.has("Domain")) {
 38517                  const t = e.getArray("Domain");
 38518                  h = t[0];
 38519                  u = t[1];
 38520                }
 38521                let d = !1,
 38522                  f = !1;
 38523                if (e.has("Extend")) {
 38524                  const t = e.getArray("Extend");
 38525                  d = t[0];
 38526                  f = t[1];
 38527                }
 38528                if (!(this.shadingType !== c || (d && f))) {
 38529                  const [e, t, a, n, i, s] = this.coordsArr,
 38530                    o = Math.hypot(e - n, t - i);
 38531                  a <= s + o &&
 38532                    s <= a + o &&
 38533                    (0, r.warn)("Unsupported radial gradient.");
 38534                }
 38535                this.extendStart = d;
 38536                this.extendEnd = f;
 38537                const g = e.getRaw("Function"),
 38538                  p = n.createFromArray(g),
 38539                  m = (u - h) / 840,
 38540                  b = (this.colorStops = []);
 38541                if (h >= u || m <= 0) {
 38542                  (0, r.info)("Bad shading domain.");
 38543                  return;
 38544                }
 38545                const y = new Float32Array(o.numComps),
 38546                  w = new Float32Array(1);
 38547                let S,
 38548                  x = 0;
 38549                w[0] = h;
 38550                p(w, 0, y, 0);
 38551                let C = o.getRgb(y, 0);
 38552                const k = r.Util.makeHexColor(C[0], C[1], C[2]);
 38553                b.push([0, k]);
 38554                let v = 1;
 38555                w[0] = h + m;
 38556                p(w, 0, y, 0);
 38557                let F = o.getRgb(y, 0),
 38558                  O = F[0] - C[0] + 1,
 38559                  T = F[1] - C[1] + 1,
 38560                  M = F[2] - C[2] + 1,
 38561                  D = F[0] - C[0] - 1,
 38562                  E = F[1] - C[1] - 1,
 38563                  N = F[2] - C[2] - 1;
 38564                for (let e = 2; e < 840; e++) {
 38565                  w[0] = h + e * m;
 38566                  p(w, 0, y, 0);
 38567                  S = o.getRgb(y, 0);
 38568                  const t = e - x;
 38569                  O = Math.min(O, (S[0] - C[0] + 1) / t);
 38570                  T = Math.min(T, (S[1] - C[1] + 1) / t);
 38571                  M = Math.min(M, (S[2] - C[2] + 1) / t);
 38572                  D = Math.max(D, (S[0] - C[0] - 1) / t);
 38573                  E = Math.max(E, (S[1] - C[1] - 1) / t);
 38574                  N = Math.max(N, (S[2] - C[2] - 1) / t);
 38575                  if (!(D <= O && E <= T && N <= M)) {
 38576                    const e = r.Util.makeHexColor(F[0], F[1], F[2]);
 38577                    b.push([v / 840, e]);
 38578                    O = S[0] - F[0] + 1;
 38579                    T = S[1] - F[1] + 1;
 38580                    M = S[2] - F[2] + 1;
 38581                    D = S[0] - F[0] - 1;
 38582                    E = S[1] - F[1] - 1;
 38583                    N = S[2] - F[2] - 1;
 38584                    x = v;
 38585                    C = F;
 38586                  }
 38587                  v = e;
 38588                  F = S;
 38589                }
 38590                const R = r.Util.makeHexColor(F[0], F[1], F[2]);
 38591                b.push([1, R]);
 38592                let L = "transparent";
 38593                if (e.has("Background")) {
 38594                  S = o.getRgb(e.get("Background"), 0);
 38595                  L = r.Util.makeHexColor(S[0], S[1], S[2]);
 38596                }
 38597                if (!d) {
 38598                  b.unshift([0, L]);
 38599                  b[1][0] += BaseShading.SMALL_NUMBER;
 38600                }
 38601                if (!f) {
 38602                  b.at(-1)[0] -= BaseShading.SMALL_NUMBER;
 38603                  b.push([1, L]);
 38604                }
 38605                this.colorStops = b;
 38606              }
 38607              getIR() {
 38608                const e = this.coordsArr,
 38609                  t = this.shadingType;
 38610                let a, n, i, s, l;
 38611                if (t === o) {
 38612                  n = [e[0], e[1]];
 38613                  i = [e[2], e[3]];
 38614                  s = null;
 38615                  l = null;
 38616                  a = "axial";
 38617                } else if (t === c) {
 38618                  n = [e[0], e[1]];
 38619                  i = [e[3], e[4]];
 38620                  s = e[2];
 38621                  l = e[5];
 38622                  a = "radial";
 38623                } else (0, r.unreachable)(`getPattern type unknown: ${t}`);
 38624                return ["RadialAxial", a, this.bbox, this.colorStops, n, i, s, l];
 38625              }
 38626            }
 38627            class MeshStreamReader {
 38628              constructor(e, t) {
 38629                this.stream = e;
 38630                this.context = t;
 38631                this.buffer = 0;
 38632                this.bufferLength = 0;
 38633                const a = t.numComps;
 38634                this.tmpCompsBuf = new Float32Array(a);
 38635                const r = t.colorSpace.numComps;
 38636                this.tmpCsCompsBuf = t.colorFn
 38637                  ? new Float32Array(r)
 38638                  : this.tmpCompsBuf;
 38639              }
 38640              get hasData() {
 38641                if (this.stream.end) return this.stream.pos < this.stream.end;
 38642                if (this.bufferLength > 0) return !0;
 38643                const e = this.stream.getByte();
 38644                if (e < 0) return !1;
 38645                this.buffer = e;
 38646                this.bufferLength = 8;
 38647                return !0;
 38648              }
 38649              readBits(e) {
 38650                let t = this.buffer,
 38651                  a = this.bufferLength;
 38652                if (32 === e) {
 38653                  if (0 === a)
 38654                    return (
 38655                      ((this.stream.getByte() << 24) |
 38656                        (this.stream.getByte() << 16) |
 38657                        (this.stream.getByte() << 8) |
 38658                        this.stream.getByte()) >>>
 38659                      0
 38660                    );
 38661                  t =
 38662                    (t << 24) |
 38663                    (this.stream.getByte() << 16) |
 38664                    (this.stream.getByte() << 8) |
 38665                    this.stream.getByte();
 38666                  const e = this.stream.getByte();
 38667                  this.buffer = e & ((1 << a) - 1);
 38668                  return ((t << (8 - a)) | ((255 & e) >> a)) >>> 0;
 38669                }
 38670                if (8 === e && 0 === a) return this.stream.getByte();
 38671                for (; a < e; ) {
 38672                  t = (t << 8) | this.stream.getByte();
 38673                  a += 8;
 38674                }
 38675                a -= e;
 38676                this.bufferLength = a;
 38677                this.buffer = t & ((1 << a) - 1);
 38678                return t >> a;
 38679              }
 38680              align() {
 38681                this.buffer = 0;
 38682                this.bufferLength = 0;
 38683              }
 38684              readFlag() {
 38685                return this.readBits(this.context.bitsPerFlag);
 38686              }
 38687              readCoordinate() {
 38688                const e = this.context.bitsPerCoordinate,
 38689                  t = this.readBits(e),
 38690                  a = this.readBits(e),
 38691                  r = this.context.decode,
 38692                  n = e < 32 ? 1 / ((1 << e) - 1) : 2.3283064365386963e-10;
 38693                return [
 38694                  t * n * (r[1] - r[0]) + r[0],
 38695                  a * n * (r[3] - r[2]) + r[2],
 38696                ];
 38697              }
 38698              readComponents() {
 38699                const e = this.context.numComps,
 38700                  t = this.context.bitsPerComponent,
 38701                  a = t < 32 ? 1 / ((1 << t) - 1) : 2.3283064365386963e-10,
 38702                  r = this.context.decode,
 38703                  n = this.tmpCompsBuf;
 38704                for (let i = 0, s = 4; i < e; i++, s += 2) {
 38705                  const e = this.readBits(t);
 38706                  n[i] = e * a * (r[s + 1] - r[s]) + r[s];
 38707                }
 38708                const i = this.tmpCsCompsBuf;
 38709                this.context.colorFn && this.context.colorFn(n, 0, i, 0);
 38710                return this.context.colorSpace.getRgb(i, 0);
 38711              }
 38712            }
 38713            let f = Object.create(null);
 38714            function getB(e) {
 38715              return (f[e] ||= (function buildB(e) {
 38716                const t = [];
 38717                for (let a = 0; a <= e; a++) {
 38718                  const r = a / e,
 38719                    n = 1 - r;
 38720                  t.push(
 38721                    new Float32Array([
 38722                      n ** 3,
 38723                      3 * r * n ** 2,
 38724                      3 * r ** 2 * n,
 38725                      r ** 3,
 38726                    ]),
 38727                  );
 38728                }
 38729                return t;
 38730              })(e));
 38731            }
 38732            class MeshShading extends BaseShading {
 38733              static MIN_SPLIT_PATCH_CHUNKS_AMOUNT = 3;
 38734              static MAX_SPLIT_PATCH_CHUNKS_AMOUNT = 20;
 38735              static TRIANGLE_DENSITY = 20;
 38736              constructor(e, t, a, s, o) {
 38737                super();
 38738                if (!(e instanceof n.BaseStream))
 38739                  throw new r.FormatError("Mesh data is not a stream");
 38740                const c = e.dict;
 38741                this.shadingType = c.get("ShadingType");
 38742                const f = c.getArray("BBox");
 38743                this.bbox =
 38744                  Array.isArray(f) && 4 === f.length
 38745                    ? r.Util.normalizeRect(f)
 38746                    : null;
 38747                const g = i.ColorSpace.parse({
 38748                  cs: c.getRaw("CS") || c.getRaw("ColorSpace"),
 38749                  xref: t,
 38750                  resources: a,
 38751                  pdfFunctionFactory: s,
 38752                  localColorSpaceCache: o,
 38753                });
 38754                this.background = c.has("Background")
 38755                  ? g.getRgb(c.get("Background"), 0)
 38756                  : null;
 38757                const p = c.getRaw("Function"),
 38758                  m = p ? s.createFromArray(p) : null;
 38759                this.coords = [];
 38760                this.colors = [];
 38761                this.figures = [];
 38762                const b = {
 38763                    bitsPerCoordinate: c.get("BitsPerCoordinate"),
 38764                    bitsPerComponent: c.get("BitsPerComponent"),
 38765                    bitsPerFlag: c.get("BitsPerFlag"),
 38766                    decode: c.getArray("Decode"),
 38767                    colorFn: m,
 38768                    colorSpace: g,
 38769                    numComps: m ? 1 : g.numComps,
 38770                  },
 38771                  y = new MeshStreamReader(e, b);
 38772                let w = !1;
 38773                switch (this.shadingType) {
 38774                  case l:
 38775                    this._decodeType4Shading(y);
 38776                    break;
 38777                  case h:
 38778                    const e = 0 | c.get("VerticesPerRow");
 38779                    if (e < 2) throw new r.FormatError("Invalid VerticesPerRow");
 38780                    this._decodeType5Shading(y, e);
 38781                    break;
 38782                  case u:
 38783                    this._decodeType6Shading(y);
 38784                    w = !0;
 38785                    break;
 38786                  case d:
 38787                    this._decodeType7Shading(y);
 38788                    w = !0;
 38789                    break;
 38790                  default:
 38791                    (0, r.unreachable)("Unsupported mesh type.");
 38792                }
 38793                if (w) {
 38794                  this._updateBounds();
 38795                  for (let e = 0, t = this.figures.length; e < t; e++)
 38796                    this._buildFigureFromPatch(e);
 38797                }
 38798                this._updateBounds();
 38799                this._packData();
 38800              }
 38801              _decodeType4Shading(e) {
 38802                const t = this.coords,
 38803                  a = this.colors,
 38804                  n = [],
 38805                  i = [];
 38806                let s = 0;
 38807                for (; e.hasData; ) {
 38808                  const o = e.readFlag(),
 38809                    c = e.readCoordinate(),
 38810                    l = e.readComponents();
 38811                  if (0 === s) {
 38812                    if (!(0 <= o && o <= 2))
 38813                      throw new r.FormatError("Unknown type4 flag");
 38814                    switch (o) {
 38815                      case 0:
 38816                        s = 3;
 38817                        break;
 38818                      case 1:
 38819                        i.push(i.at(-2), i.at(-1));
 38820                        s = 1;
 38821                        break;
 38822                      case 2:
 38823                        i.push(i.at(-3), i.at(-1));
 38824                        s = 1;
 38825                    }
 38826                    n.push(o);
 38827                  }
 38828                  i.push(t.length);
 38829                  t.push(c);
 38830                  a.push(l);
 38831                  s--;
 38832                  e.align();
 38833                }
 38834                this.figures.push({
 38835                  type: "triangles",
 38836                  coords: new Int32Array(i),
 38837                  colors: new Int32Array(i),
 38838                });
 38839              }
 38840              _decodeType5Shading(e, t) {
 38841                const a = this.coords,
 38842                  r = this.colors,
 38843                  n = [];
 38844                for (; e.hasData; ) {
 38845                  const t = e.readCoordinate(),
 38846                    i = e.readComponents();
 38847                  n.push(a.length);
 38848                  a.push(t);
 38849                  r.push(i);
 38850                }
 38851                this.figures.push({
 38852                  type: "lattice",
 38853                  coords: new Int32Array(n),
 38854                  colors: new Int32Array(n),
 38855                  verticesPerRow: t,
 38856                });
 38857              }
 38858              _decodeType6Shading(e) {
 38859                const t = this.coords,
 38860                  a = this.colors,
 38861                  n = new Int32Array(16),
 38862                  i = new Int32Array(4);
 38863                for (; e.hasData; ) {
 38864                  const s = e.readFlag();
 38865                  if (!(0 <= s && s <= 3))
 38866                    throw new r.FormatError("Unknown type6 flag");
 38867                  const o = t.length;
 38868                  for (let a = 0, r = 0 !== s ? 8 : 12; a < r; a++)
 38869                    t.push(e.readCoordinate());
 38870                  const c = a.length;
 38871                  for (let t = 0, r = 0 !== s ? 2 : 4; t < r; t++)
 38872                    a.push(e.readComponents());
 38873                  let l, h, u, d;
 38874                  switch (s) {
 38875                    case 0:
 38876                      n[12] = o + 3;
 38877                      n[13] = o + 4;
 38878                      n[14] = o + 5;
 38879                      n[15] = o + 6;
 38880                      n[8] = o + 2;
 38881                      n[11] = o + 7;
 38882                      n[4] = o + 1;
 38883                      n[7] = o + 8;
 38884                      n[0] = o;
 38885                      n[1] = o + 11;
 38886                      n[2] = o + 10;
 38887                      n[3] = o + 9;
 38888                      i[2] = c + 1;
 38889                      i[3] = c + 2;
 38890                      i[0] = c;
 38891                      i[1] = c + 3;
 38892                      break;
 38893                    case 1:
 38894                      l = n[12];
 38895                      h = n[13];
 38896                      u = n[14];
 38897                      d = n[15];
 38898                      n[12] = d;
 38899                      n[13] = o + 0;
 38900                      n[14] = o + 1;
 38901                      n[15] = o + 2;
 38902                      n[8] = u;
 38903                      n[11] = o + 3;
 38904                      n[4] = h;
 38905                      n[7] = o + 4;
 38906                      n[0] = l;
 38907                      n[1] = o + 7;
 38908                      n[2] = o + 6;
 38909                      n[3] = o + 5;
 38910                      l = i[2];
 38911                      h = i[3];
 38912                      i[2] = h;
 38913                      i[3] = c;
 38914                      i[0] = l;
 38915                      i[1] = c + 1;
 38916                      break;
 38917                    case 2:
 38918                      l = n[15];
 38919                      h = n[11];
 38920                      n[12] = n[3];
 38921                      n[13] = o + 0;
 38922                      n[14] = o + 1;
 38923                      n[15] = o + 2;
 38924                      n[8] = n[7];
 38925                      n[11] = o + 3;
 38926                      n[4] = h;
 38927                      n[7] = o + 4;
 38928                      n[0] = l;
 38929                      n[1] = o + 7;
 38930                      n[2] = o + 6;
 38931                      n[3] = o + 5;
 38932                      l = i[3];
 38933                      i[2] = i[1];
 38934                      i[3] = c;
 38935                      i[0] = l;
 38936                      i[1] = c + 1;
 38937                      break;
 38938                    case 3:
 38939                      n[12] = n[0];
 38940                      n[13] = o + 0;
 38941                      n[14] = o + 1;
 38942                      n[15] = o + 2;
 38943                      n[8] = n[1];
 38944                      n[11] = o + 3;
 38945                      n[4] = n[2];
 38946                      n[7] = o + 4;
 38947                      n[0] = n[3];
 38948                      n[1] = o + 7;
 38949                      n[2] = o + 6;
 38950                      n[3] = o + 5;
 38951                      i[2] = i[0];
 38952                      i[3] = c;
 38953                      i[0] = i[1];
 38954                      i[1] = c + 1;
 38955                  }
 38956                  n[5] = t.length;
 38957                  t.push([
 38958                    (-4 * t[n[0]][0] -
 38959                      t[n[15]][0] +
 38960                      6 * (t[n[4]][0] + t[n[1]][0]) -
 38961                      2 * (t[n[12]][0] + t[n[3]][0]) +
 38962                      3 * (t[n[13]][0] + t[n[7]][0])) /
 38963                      9,
 38964                    (-4 * t[n[0]][1] -
 38965                      t[n[15]][1] +
 38966                      6 * (t[n[4]][1] + t[n[1]][1]) -
 38967                      2 * (t[n[12]][1] + t[n[3]][1]) +
 38968                      3 * (t[n[13]][1] + t[n[7]][1])) /
 38969                      9,
 38970                  ]);
 38971                  n[6] = t.length;
 38972                  t.push([
 38973                    (-4 * t[n[3]][0] -
 38974                      t[n[12]][0] +
 38975                      6 * (t[n[2]][0] + t[n[7]][0]) -
 38976                      2 * (t[n[0]][0] + t[n[15]][0]) +
 38977                      3 * (t[n[4]][0] + t[n[14]][0])) /
 38978                      9,
 38979                    (-4 * t[n[3]][1] -
 38980                      t[n[12]][1] +
 38981                      6 * (t[n[2]][1] + t[n[7]][1]) -
 38982                      2 * (t[n[0]][1] + t[n[15]][1]) +
 38983                      3 * (t[n[4]][1] + t[n[14]][1])) /
 38984                      9,
 38985                  ]);
 38986                  n[9] = t.length;
 38987                  t.push([
 38988                    (-4 * t[n[12]][0] -
 38989                      t[n[3]][0] +
 38990                      6 * (t[n[8]][0] + t[n[13]][0]) -
 38991                      2 * (t[n[0]][0] + t[n[15]][0]) +
 38992                      3 * (t[n[11]][0] + t[n[1]][0])) /
 38993                      9,
 38994                    (-4 * t[n[12]][1] -
 38995                      t[n[3]][1] +
 38996                      6 * (t[n[8]][1] + t[n[13]][1]) -
 38997                      2 * (t[n[0]][1] + t[n[15]][1]) +
 38998                      3 * (t[n[11]][1] + t[n[1]][1])) /
 38999                      9,
 39000                  ]);
 39001                  n[10] = t.length;
 39002                  t.push([
 39003                    (-4 * t[n[15]][0] -
 39004                      t[n[0]][0] +
 39005                      6 * (t[n[11]][0] + t[n[14]][0]) -
 39006                      2 * (t[n[12]][0] + t[n[3]][0]) +
 39007                      3 * (t[n[2]][0] + t[n[8]][0])) /
 39008                      9,
 39009                    (-4 * t[n[15]][1] -
 39010                      t[n[0]][1] +
 39011                      6 * (t[n[11]][1] + t[n[14]][1]) -
 39012                      2 * (t[n[12]][1] + t[n[3]][1]) +
 39013                      3 * (t[n[2]][1] + t[n[8]][1])) /
 39014                      9,
 39015                  ]);
 39016                  this.figures.push({
 39017                    type: "patch",
 39018                    coords: new Int32Array(n),
 39019                    colors: new Int32Array(i),
 39020                  });
 39021                }
 39022              }
 39023              _decodeType7Shading(e) {
 39024                const t = this.coords,
 39025                  a = this.colors,
 39026                  n = new Int32Array(16),
 39027                  i = new Int32Array(4);
 39028                for (; e.hasData; ) {
 39029                  const s = e.readFlag();
 39030                  if (!(0 <= s && s <= 3))
 39031                    throw new r.FormatError("Unknown type7 flag");
 39032                  const o = t.length;
 39033                  for (let a = 0, r = 0 !== s ? 12 : 16; a < r; a++)
 39034                    t.push(e.readCoordinate());
 39035                  const c = a.length;
 39036                  for (let t = 0, r = 0 !== s ? 2 : 4; t < r; t++)
 39037                    a.push(e.readComponents());
 39038                  let l, h, u, d;
 39039                  switch (s) {
 39040                    case 0:
 39041                      n[12] = o + 3;
 39042                      n[13] = o + 4;
 39043                      n[14] = o + 5;
 39044                      n[15] = o + 6;
 39045                      n[8] = o + 2;
 39046                      n[9] = o + 13;
 39047                      n[10] = o + 14;
 39048                      n[11] = o + 7;
 39049                      n[4] = o + 1;
 39050                      n[5] = o + 12;
 39051                      n[6] = o + 15;
 39052                      n[7] = o + 8;
 39053                      n[0] = o;
 39054                      n[1] = o + 11;
 39055                      n[2] = o + 10;
 39056                      n[3] = o + 9;
 39057                      i[2] = c + 1;
 39058                      i[3] = c + 2;
 39059                      i[0] = c;
 39060                      i[1] = c + 3;
 39061                      break;
 39062                    case 1:
 39063                      l = n[12];
 39064                      h = n[13];
 39065                      u = n[14];
 39066                      d = n[15];
 39067                      n[12] = d;
 39068                      n[13] = o + 0;
 39069                      n[14] = o + 1;
 39070                      n[15] = o + 2;
 39071                      n[8] = u;
 39072                      n[9] = o + 9;
 39073                      n[10] = o + 10;
 39074                      n[11] = o + 3;
 39075                      n[4] = h;
 39076                      n[5] = o + 8;
 39077                      n[6] = o + 11;
 39078                      n[7] = o + 4;
 39079                      n[0] = l;
 39080                      n[1] = o + 7;
 39081                      n[2] = o + 6;
 39082                      n[3] = o + 5;
 39083                      l = i[2];
 39084                      h = i[3];
 39085                      i[2] = h;
 39086                      i[3] = c;
 39087                      i[0] = l;
 39088                      i[1] = c + 1;
 39089                      break;
 39090                    case 2:
 39091                      l = n[15];
 39092                      h = n[11];
 39093                      n[12] = n[3];
 39094                      n[13] = o + 0;
 39095                      n[14] = o + 1;
 39096                      n[15] = o + 2;
 39097                      n[8] = n[7];
 39098                      n[9] = o + 9;
 39099                      n[10] = o + 10;
 39100                      n[11] = o + 3;
 39101                      n[4] = h;
 39102                      n[5] = o + 8;
 39103                      n[6] = o + 11;
 39104                      n[7] = o + 4;
 39105                      n[0] = l;
 39106                      n[1] = o + 7;
 39107                      n[2] = o + 6;
 39108                      n[3] = o + 5;
 39109                      l = i[3];
 39110                      i[2] = i[1];
 39111                      i[3] = c;
 39112                      i[0] = l;
 39113                      i[1] = c + 1;
 39114                      break;
 39115                    case 3:
 39116                      n[12] = n[0];
 39117                      n[13] = o + 0;
 39118                      n[14] = o + 1;
 39119                      n[15] = o + 2;
 39120                      n[8] = n[1];
 39121                      n[9] = o + 9;
 39122                      n[10] = o + 10;
 39123                      n[11] = o + 3;
 39124                      n[4] = n[2];
 39125                      n[5] = o + 8;
 39126                      n[6] = o + 11;
 39127                      n[7] = o + 4;
 39128                      n[0] = n[3];
 39129                      n[1] = o + 7;
 39130                      n[2] = o + 6;
 39131                      n[3] = o + 5;
 39132                      i[2] = i[0];
 39133                      i[3] = c;
 39134                      i[0] = i[1];
 39135                      i[1] = c + 1;
 39136                  }
 39137                  this.figures.push({
 39138                    type: "patch",
 39139                    coords: new Int32Array(n),
 39140                    colors: new Int32Array(i),
 39141                  });
 39142                }
 39143              }
 39144              _buildFigureFromPatch(e) {
 39145                const t = this.figures[e];
 39146                (0, r.assert)("patch" === t.type, "Unexpected patch mesh figure");
 39147                const a = this.coords,
 39148                  n = this.colors,
 39149                  i = t.coords,
 39150                  s = t.colors,
 39151                  o = Math.min(a[i[0]][0], a[i[3]][0], a[i[12]][0], a[i[15]][0]),
 39152                  c = Math.min(a[i[0]][1], a[i[3]][1], a[i[12]][1], a[i[15]][1]),
 39153                  l = Math.max(a[i[0]][0], a[i[3]][0], a[i[12]][0], a[i[15]][0]),
 39154                  h = Math.max(a[i[0]][1], a[i[3]][1], a[i[12]][1], a[i[15]][1]);
 39155                let u = Math.ceil(
 39156                  ((l - o) * MeshShading.TRIANGLE_DENSITY) /
 39157                    (this.bounds[2] - this.bounds[0]),
 39158                );
 39159                u = Math.max(
 39160                  MeshShading.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,
 39161                  Math.min(MeshShading.MAX_SPLIT_PATCH_CHUNKS_AMOUNT, u),
 39162                );
 39163                let d = Math.ceil(
 39164                  ((h - c) * MeshShading.TRIANGLE_DENSITY) /
 39165                    (this.bounds[3] - this.bounds[1]),
 39166                );
 39167                d = Math.max(
 39168                  MeshShading.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,
 39169                  Math.min(MeshShading.MAX_SPLIT_PATCH_CHUNKS_AMOUNT, d),
 39170                );
 39171                const f = u + 1,
 39172                  g = new Int32Array((d + 1) * f),
 39173                  p = new Int32Array((d + 1) * f);
 39174                let m = 0;
 39175                const b = new Uint8Array(3),
 39176                  y = new Uint8Array(3),
 39177                  w = n[s[0]],
 39178                  S = n[s[1]],
 39179                  x = n[s[2]],
 39180                  C = n[s[3]],
 39181                  k = getB(d),
 39182                  v = getB(u);
 39183                for (let e = 0; e <= d; e++) {
 39184                  b[0] = ((w[0] * (d - e) + x[0] * e) / d) | 0;
 39185                  b[1] = ((w[1] * (d - e) + x[1] * e) / d) | 0;
 39186                  b[2] = ((w[2] * (d - e) + x[2] * e) / d) | 0;
 39187                  y[0] = ((S[0] * (d - e) + C[0] * e) / d) | 0;
 39188                  y[1] = ((S[1] * (d - e) + C[1] * e) / d) | 0;
 39189                  y[2] = ((S[2] * (d - e) + C[2] * e) / d) | 0;
 39190                  for (let t = 0; t <= u; t++, m++) {
 39191                    if (!((0 !== e && e !== d) || (0 !== t && t !== u))) continue;
 39192                    let r = 0,
 39193                      s = 0,
 39194                      o = 0;
 39195                    for (let n = 0; n <= 3; n++)
 39196                      for (let c = 0; c <= 3; c++, o++) {
 39197                        const l = k[e][n] * v[t][c];
 39198                        r += a[i[o]][0] * l;
 39199                        s += a[i[o]][1] * l;
 39200                      }
 39201                    g[m] = a.length;
 39202                    a.push([r, s]);
 39203                    p[m] = n.length;
 39204                    const c = new Uint8Array(3);
 39205                    c[0] = ((b[0] * (u - t) + y[0] * t) / u) | 0;
 39206                    c[1] = ((b[1] * (u - t) + y[1] * t) / u) | 0;
 39207                    c[2] = ((b[2] * (u - t) + y[2] * t) / u) | 0;
 39208                    n.push(c);
 39209                  }
 39210                }
 39211                g[0] = i[0];
 39212                p[0] = s[0];
 39213                g[u] = i[3];
 39214                p[u] = s[1];
 39215                g[f * d] = i[12];
 39216                p[f * d] = s[2];
 39217                g[f * d + u] = i[15];
 39218                p[f * d + u] = s[3];
 39219                this.figures[e] = {
 39220                  type: "lattice",
 39221                  coords: g,
 39222                  colors: p,
 39223                  verticesPerRow: f,
 39224                };
 39225              }
 39226              _updateBounds() {
 39227                let e = this.coords[0][0],
 39228                  t = this.coords[0][1],
 39229                  a = e,
 39230                  r = t;
 39231                for (let n = 1, i = this.coords.length; n < i; n++) {
 39232                  const i = this.coords[n][0],
 39233                    s = this.coords[n][1];
 39234                  e = e > i ? i : e;
 39235                  t = t > s ? s : t;
 39236                  a = a < i ? i : a;
 39237                  r = r < s ? s : r;
 39238                }
 39239                this.bounds = [e, t, a, r];
 39240              }
 39241              _packData() {
 39242                let e, t, a, r;
 39243                const n = this.coords,
 39244                  i = new Float32Array(2 * n.length);
 39245                for (e = 0, a = 0, t = n.length; e < t; e++) {
 39246                  const t = n[e];
 39247                  i[a++] = t[0];
 39248                  i[a++] = t[1];
 39249                }
 39250                this.coords = i;
 39251                const s = this.colors,
 39252                  o = new Uint8Array(3 * s.length);
 39253                for (e = 0, a = 0, t = s.length; e < t; e++) {
 39254                  const t = s[e];
 39255                  o[a++] = t[0];
 39256                  o[a++] = t[1];
 39257                  o[a++] = t[2];
 39258                }
 39259                this.colors = o;
 39260                const c = this.figures;
 39261                for (e = 0, t = c.length; e < t; e++) {
 39262                  const t = c[e],
 39263                    n = t.coords,
 39264                    i = t.colors;
 39265                  for (a = 0, r = n.length; a < r; a++) {
 39266                    n[a] *= 2;
 39267                    i[a] *= 3;
 39268                  }
 39269                }
 39270              }
 39271              getIR() {
 39272                return [
 39273                  "Mesh",
 39274                  this.shadingType,
 39275                  this.coords,
 39276                  this.colors,
 39277                  this.figures,
 39278                  this.bounds,
 39279                  this.bbox,
 39280                  this.background,
 39281                ];
 39282              }
 39283            }
 39284            class DummyShading extends BaseShading {
 39285              getIR() {
 39286                return ["Dummy"];
 39287              }
 39288            }
 39289          },
 39290          (e, t, a) => {
 39291            Object.defineProperty(t, "__esModule", { value: !0 });
 39292            t.getXfaFontDict = function getXfaFontDict(e) {
 39293              const t = (function getXfaFontWidths(e) {
 39294                  const t = getXfaFontName(e);
 39295                  if (!t) return null;
 39296                  const { baseWidths: a, baseMapping: r, factors: n } = t,
 39297                    i = n ? a.map((e, t) => e * n[t]) : a;
 39298                  let s,
 39299                    o = -2;
 39300                  const c = [];
 39301                  for (const [e, t] of r
 39302                    .map((e, t) => [e, t])
 39303                    .sort(([e], [t]) => e - t))
 39304                    if (-1 !== e)
 39305                      if (e === o + 1) {
 39306                        s.push(i[t]);
 39307                        o += 1;
 39308                      } else {
 39309                        o = e;
 39310                        s = [i[t]];
 39311                        c.push(e, s);
 39312                      }
 39313                  return c;
 39314                })(e),
 39315                a = new n.Dict(null);
 39316              a.set("BaseFont", n.Name.get(e));
 39317              a.set("Type", n.Name.get("Font"));
 39318              a.set("Subtype", n.Name.get("CIDFontType2"));
 39319              a.set("Encoding", n.Name.get("Identity-H"));
 39320              a.set("CIDToGIDMap", n.Name.get("Identity"));
 39321              a.set("W", t);
 39322              a.set("FirstChar", t[0]);
 39323              a.set("LastChar", t.at(-2) + t.at(-1).length - 1);
 39324              const r = new n.Dict(null);
 39325              a.set("FontDescriptor", r);
 39326              const i = new n.Dict(null);
 39327              i.set("Ordering", "Identity");
 39328              i.set("Registry", "Adobe");
 39329              i.set("Supplement", 0);
 39330              a.set("CIDSystemInfo", i);
 39331              return a;
 39332            };
 39333            t.getXfaFontName = getXfaFontName;
 39334            var r = a(52),
 39335              n = a(4),
 39336              i = a(53),
 39337              s = a(54),
 39338              o = a(55),
 39339              c = a(56),
 39340              l = a(3),
 39341              h = a(38);
 39342            const u = (0, l.getLookupTableFactory)(function (e) {
 39343              e["MyriadPro-Regular"] = e["PdfJS-Fallback-Regular"] = {
 39344                name: "LiberationSans-Regular",
 39345                factors: o.MyriadProRegularFactors,
 39346                baseWidths: s.LiberationSansRegularWidths,
 39347                baseMapping: s.LiberationSansRegularMapping,
 39348                metrics: o.MyriadProRegularMetrics,
 39349              };
 39350              e["MyriadPro-Bold"] = e["PdfJS-Fallback-Bold"] = {
 39351                name: "LiberationSans-Bold",
 39352                factors: o.MyriadProBoldFactors,
 39353                baseWidths: s.LiberationSansBoldWidths,
 39354                baseMapping: s.LiberationSansBoldMapping,
 39355                metrics: o.MyriadProBoldMetrics,
 39356              };
 39357              e["MyriadPro-It"] =
 39358                e["MyriadPro-Italic"] =
 39359                e["PdfJS-Fallback-Italic"] =
 39360                  {
 39361                    name: "LiberationSans-Italic",
 39362                    factors: o.MyriadProItalicFactors,
 39363                    baseWidths: s.LiberationSansItalicWidths,
 39364                    baseMapping: s.LiberationSansItalicMapping,
 39365                    metrics: o.MyriadProItalicMetrics,
 39366                  };
 39367              e["MyriadPro-BoldIt"] =
 39368                e["MyriadPro-BoldItalic"] =
 39369                e["PdfJS-Fallback-BoldItalic"] =
 39370                  {
 39371                    name: "LiberationSans-BoldItalic",
 39372                    factors: o.MyriadProBoldItalicFactors,
 39373                    baseWidths: s.LiberationSansBoldItalicWidths,
 39374                    baseMapping: s.LiberationSansBoldItalicMapping,
 39375                    metrics: o.MyriadProBoldItalicMetrics,
 39376                  };
 39377              e.ArialMT =
 39378                e.Arial =
 39379                e["Arial-Regular"] =
 39380                  {
 39381                    name: "LiberationSans-Regular",
 39382                    baseWidths: s.LiberationSansRegularWidths,
 39383                    baseMapping: s.LiberationSansRegularMapping,
 39384                  };
 39385              e["Arial-BoldMT"] = e["Arial-Bold"] = {
 39386                name: "LiberationSans-Bold",
 39387                baseWidths: s.LiberationSansBoldWidths,
 39388                baseMapping: s.LiberationSansBoldMapping,
 39389              };
 39390              e["Arial-ItalicMT"] = e["Arial-Italic"] = {
 39391                name: "LiberationSans-Italic",
 39392                baseWidths: s.LiberationSansItalicWidths,
 39393                baseMapping: s.LiberationSansItalicMapping,
 39394              };
 39395              e["Arial-BoldItalicMT"] = e["Arial-BoldItalic"] = {
 39396                name: "LiberationSans-BoldItalic",
 39397                baseWidths: s.LiberationSansBoldItalicWidths,
 39398                baseMapping: s.LiberationSansBoldItalicMapping,
 39399              };
 39400              e["Calibri-Regular"] = {
 39401                name: "LiberationSans-Regular",
 39402                factors: r.CalibriRegularFactors,
 39403                baseWidths: s.LiberationSansRegularWidths,
 39404                baseMapping: s.LiberationSansRegularMapping,
 39405                metrics: r.CalibriRegularMetrics,
 39406              };
 39407              e["Calibri-Bold"] = {
 39408                name: "LiberationSans-Bold",
 39409                factors: r.CalibriBoldFactors,
 39410                baseWidths: s.LiberationSansBoldWidths,
 39411                baseMapping: s.LiberationSansBoldMapping,
 39412                metrics: r.CalibriBoldMetrics,
 39413              };
 39414              e["Calibri-Italic"] = {
 39415                name: "LiberationSans-Italic",
 39416                factors: r.CalibriItalicFactors,
 39417                baseWidths: s.LiberationSansItalicWidths,
 39418                baseMapping: s.LiberationSansItalicMapping,
 39419                metrics: r.CalibriItalicMetrics,
 39420              };
 39421              e["Calibri-BoldItalic"] = {
 39422                name: "LiberationSans-BoldItalic",
 39423                factors: r.CalibriBoldItalicFactors,
 39424                baseWidths: s.LiberationSansBoldItalicWidths,
 39425                baseMapping: s.LiberationSansBoldItalicMapping,
 39426                metrics: r.CalibriBoldItalicMetrics,
 39427              };
 39428              e["Segoeui-Regular"] = {
 39429                name: "LiberationSans-Regular",
 39430                factors: c.SegoeuiRegularFactors,
 39431                baseWidths: s.LiberationSansRegularWidths,
 39432                baseMapping: s.LiberationSansRegularMapping,
 39433                metrics: c.SegoeuiRegularMetrics,
 39434              };
 39435              e["Segoeui-Bold"] = {
 39436                name: "LiberationSans-Bold",
 39437                factors: c.SegoeuiBoldFactors,
 39438                baseWidths: s.LiberationSansBoldWidths,
 39439                baseMapping: s.LiberationSansBoldMapping,
 39440                metrics: c.SegoeuiBoldMetrics,
 39441              };
 39442              e["Segoeui-Italic"] = {
 39443                name: "LiberationSans-Italic",
 39444                factors: c.SegoeuiItalicFactors,
 39445                baseWidths: s.LiberationSansItalicWidths,
 39446                baseMapping: s.LiberationSansItalicMapping,
 39447                metrics: c.SegoeuiItalicMetrics,
 39448              };
 39449              e["Segoeui-BoldItalic"] = {
 39450                name: "LiberationSans-BoldItalic",
 39451                factors: c.SegoeuiBoldItalicFactors,
 39452                baseWidths: s.LiberationSansBoldItalicWidths,
 39453                baseMapping: s.LiberationSansBoldItalicMapping,
 39454                metrics: c.SegoeuiBoldItalicMetrics,
 39455              };
 39456              e["Helvetica-Regular"] = e.Helvetica = {
 39457                name: "LiberationSans-Regular",
 39458                factors: i.HelveticaRegularFactors,
 39459                baseWidths: s.LiberationSansRegularWidths,
 39460                baseMapping: s.LiberationSansRegularMapping,
 39461                metrics: i.HelveticaRegularMetrics,
 39462              };
 39463              e["Helvetica-Bold"] = {
 39464                name: "LiberationSans-Bold",
 39465                factors: i.HelveticaBoldFactors,
 39466                baseWidths: s.LiberationSansBoldWidths,
 39467                baseMapping: s.LiberationSansBoldMapping,
 39468                metrics: i.HelveticaBoldMetrics,
 39469              };
 39470              e["Helvetica-Italic"] = {
 39471                name: "LiberationSans-Italic",
 39472                factors: i.HelveticaItalicFactors,
 39473                baseWidths: s.LiberationSansItalicWidths,
 39474                baseMapping: s.LiberationSansItalicMapping,
 39475                metrics: i.HelveticaItalicMetrics,
 39476              };
 39477              e["Helvetica-BoldItalic"] = {
 39478                name: "LiberationSans-BoldItalic",
 39479                factors: i.HelveticaBoldItalicFactors,
 39480                baseWidths: s.LiberationSansBoldItalicWidths,
 39481                baseMapping: s.LiberationSansBoldItalicMapping,
 39482                metrics: i.HelveticaBoldItalicMetrics,
 39483              };
 39484            });
 39485            function getXfaFontName(e) {
 39486              const t = (0, h.normalizeFontName)(e);
 39487              return u()[t];
 39488            }
 39489          },
 39490          (e, t) => {
 39491            Object.defineProperty(t, "__esModule", { value: !0 });
 39492            t.CalibriRegularMetrics =
 39493              t.CalibriRegularFactors =
 39494              t.CalibriItalicMetrics =
 39495              t.CalibriItalicFactors =
 39496              t.CalibriBoldMetrics =
 39497              t.CalibriBoldItalicMetrics =
 39498              t.CalibriBoldItalicFactors =
 39499              t.CalibriBoldFactors =
 39500                void 0;
 39501            t.CalibriBoldFactors = [
 39502              1.3877, 1, 1, 1, 0.97801, 0.92482, 0.89552, 0.91133, 0.81988,
 39503              0.97566, 0.98152, 0.93548, 0.93548, 1.2798, 0.85284, 0.92794, 1,
 39504              0.96134, 1.54657, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133,
 39505              0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.82845, 0.82845,
 39506              0.85284, 0.85284, 0.85284, 0.75859, 0.92138, 0.83908, 0.7762,
 39507              0.73293, 0.87289, 0.73133, 0.7514, 0.81921, 0.87356, 0.95958,
 39508              0.59526, 0.75727, 0.69225, 1.04924, 0.9121, 0.86943, 0.79795,
 39509              0.88198, 0.77958, 0.70864, 0.81055, 0.90399, 0.88653, 0.96017,
 39510              0.82577, 0.77892, 0.78257, 0.97507, 1.54657, 0.97507, 0.85284,
 39511              0.89552, 0.90176, 0.88762, 0.8785, 0.75241, 0.8785, 0.90518,
 39512              0.95015, 0.77618, 0.8785, 0.88401, 0.91916, 0.86304, 0.88401,
 39513              0.91488, 0.8785, 0.8801, 0.8785, 0.8785, 0.91343, 0.7173, 1.04106,
 39514              0.8785, 0.85075, 0.95794, 0.82616, 0.85162, 0.79492, 0.88331,
 39515              1.69808, 0.88331, 0.85284, 0.97801, 0.89552, 0.91133, 0.89552,
 39516              0.91133, 1.7801, 0.89552, 1.24487, 1.13254, 1.12401, 0.96839,
 39517              0.85284, 0.68787, 0.70645, 0.85592, 0.90747, 1.01466, 1.0088,
 39518              0.90323, 1, 1.07463, 1, 0.91056, 0.75806, 1.19118, 0.96839, 0.78864,
 39519              0.82845, 0.84133, 0.75859, 0.83908, 0.83908, 0.83908, 0.83908,
 39520              0.83908, 0.83908, 0.77539, 0.73293, 0.73133, 0.73133, 0.73133,
 39521              0.73133, 0.95958, 0.95958, 0.95958, 0.95958, 0.88506, 0.9121,
 39522              0.86943, 0.86943, 0.86943, 0.86943, 0.86943, 0.85284, 0.87508,
 39523              0.90399, 0.90399, 0.90399, 0.90399, 0.77892, 0.79795, 0.90807,
 39524              0.88762, 0.88762, 0.88762, 0.88762, 0.88762, 0.88762, 0.8715,
 39525              0.75241, 0.90518, 0.90518, 0.90518, 0.90518, 0.88401, 0.88401,
 39526              0.88401, 0.88401, 0.8785, 0.8785, 0.8801, 0.8801, 0.8801, 0.8801,
 39527              0.8801, 0.90747, 0.89049, 0.8785, 0.8785, 0.8785, 0.8785, 0.85162,
 39528              0.8785, 0.85162, 0.83908, 0.88762, 0.83908, 0.88762, 0.83908,
 39529              0.88762, 0.73293, 0.75241, 0.73293, 0.75241, 0.73293, 0.75241,
 39530              0.73293, 0.75241, 0.87289, 0.83016, 0.88506, 0.93125, 0.73133,
 39531              0.90518, 0.73133, 0.90518, 0.73133, 0.90518, 0.73133, 0.90518,
 39532              0.73133, 0.90518, 0.81921, 0.77618, 0.81921, 0.77618, 0.81921,
 39533              0.77618, 1, 1, 0.87356, 0.8785, 0.91075, 0.89608, 0.95958, 0.88401,
 39534              0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958,
 39535              0.88401, 0.76229, 0.90167, 0.59526, 0.91916, 1, 1, 0.86304, 0.69225,
 39536              0.88401, 1, 1, 0.70424, 0.79468, 0.91926, 0.88175, 0.70823, 0.94903,
 39537              0.9121, 0.8785, 1, 1, 0.9121, 0.8785, 0.87802, 0.88656, 0.8785,
 39538              0.86943, 0.8801, 0.86943, 0.8801, 0.86943, 0.8801, 0.87402, 0.89291,
 39539              0.77958, 0.91343, 1, 1, 0.77958, 0.91343, 0.70864, 0.7173, 0.70864,
 39540              0.7173, 0.70864, 0.7173, 0.70864, 0.7173, 1, 1, 0.81055, 0.75841,
 39541              0.81055, 1.06452, 0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785,
 39542              0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785, 0.96017, 0.95794,
 39543              0.77892, 0.85162, 0.77892, 0.78257, 0.79492, 0.78257, 0.79492,
 39544              0.78257, 0.79492, 0.9297, 0.56892, 0.83908, 0.88762, 0.77539,
 39545              0.8715, 0.87508, 0.89049, 1, 1, 0.81055, 1.04106, 1.20528, 1.20528,
 39546              1, 1.15543, 0.70674, 0.98387, 0.94721, 1.33431, 1.45894, 0.95161,
 39547              1.06303, 0.83908, 0.80352, 0.57184, 0.6965, 0.56289, 0.82001,
 39548              0.56029, 0.81235, 1.02988, 0.83908, 0.7762, 0.68156, 0.80367,
 39549              0.73133, 0.78257, 0.87356, 0.86943, 0.95958, 0.75727, 0.89019,
 39550              1.04924, 0.9121, 0.7648, 0.86943, 0.87356, 0.79795, 0.78275,
 39551              0.81055, 0.77892, 0.9762, 0.82577, 0.99819, 0.84896, 0.95958,
 39552              0.77892, 0.96108, 1.01407, 0.89049, 1.02988, 0.94211, 0.96108,
 39553              0.8936, 0.84021, 0.87842, 0.96399, 0.79109, 0.89049, 1.00813,
 39554              1.02988, 0.86077, 0.87445, 0.92099, 0.84723, 0.86513, 0.8801,
 39555              0.75638, 0.85714, 0.78216, 0.79586, 0.87965, 0.94211, 0.97747,
 39556              0.78287, 0.97926, 0.84971, 1.02988, 0.94211, 0.8801, 0.94211,
 39557              0.84971, 0.73133, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90264, 1, 1,
 39558              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39559              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39560              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90518, 1, 1,
 39561              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90548, 1, 1, 1, 1, 1, 1, 0.96017,
 39562              0.95794, 0.96017, 0.95794, 0.96017, 0.95794, 0.77892, 0.85162, 1, 1,
 39563              0.89552, 0.90527, 1, 0.90363, 0.92794, 0.92794, 0.92794, 0.92794,
 39564              0.87012, 0.87012, 0.87012, 0.89552, 0.89552, 1.42259, 0.71143,
 39565              1.06152, 1, 1, 1.03372, 1.03372, 0.97171, 1.4956, 2.2807, 0.93835,
 39566              0.83406, 0.91133, 0.84107, 0.91133, 1, 1, 1, 0.72021, 1, 1.23108,
 39567              0.83489, 0.88525, 0.88525, 0.81499, 0.90527, 1.81055, 0.90527,
 39568              1.81055, 1.31006, 1.53711, 0.94434, 1.08696, 1, 0.95018, 0.77192,
 39569              0.85284, 0.90747, 1.17534, 0.69825, 0.9716, 1.37077, 0.90747,
 39570              0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284, 0.8941,
 39571              0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1,
 39572              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39573              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99862,
 39574              0.99862, 1, 1, 1, 1, 1, 1.08004, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1,
 39575              1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90727, 0.90727, 1, 1, 1, 1, 1, 1, 1, 1,
 39576              1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39577            ];
 39578            t.CalibriBoldMetrics = { lineHeight: 1.2207, lineGap: 0.2207 };
 39579            t.CalibriBoldItalicFactors = [
 39580              1.3877, 1, 1, 1, 0.97801, 0.92482, 0.89552, 0.91133, 0.81988,
 39581              0.97566, 0.98152, 0.93548, 0.93548, 1.2798, 0.85284, 0.92794, 1,
 39582              0.96134, 1.56239, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133,
 39583              0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.82845, 0.82845,
 39584              0.85284, 0.85284, 0.85284, 0.75859, 0.92138, 0.83908, 0.7762,
 39585              0.71805, 0.87289, 0.73133, 0.7514, 0.81921, 0.87356, 0.95958,
 39586              0.59526, 0.75727, 0.69225, 1.04924, 0.90872, 0.85938, 0.79795,
 39587              0.87068, 0.77958, 0.69766, 0.81055, 0.90399, 0.88653, 0.96068,
 39588              0.82577, 0.77892, 0.78257, 0.97507, 1.529, 0.97507, 0.85284,
 39589              0.89552, 0.90176, 0.94908, 0.86411, 0.74012, 0.86411, 0.88323,
 39590              0.95015, 0.86411, 0.86331, 0.88401, 0.91916, 0.86304, 0.88401,
 39591              0.9039, 0.86331, 0.86331, 0.86411, 0.86411, 0.90464, 0.70852,
 39592              1.04106, 0.86331, 0.84372, 0.95794, 0.82616, 0.84548, 0.79492,
 39593              0.88331, 1.69808, 0.88331, 0.85284, 0.97801, 0.89552, 0.91133,
 39594              0.89552, 0.91133, 1.7801, 0.89552, 1.24487, 1.13254, 1.19129,
 39595              0.96839, 0.85284, 0.68787, 0.70645, 0.85592, 0.90747, 1.01466,
 39596              1.0088, 0.90323, 1, 1.07463, 1, 0.91056, 0.75806, 1.19118, 0.96839,
 39597              0.78864, 0.82845, 0.84133, 0.75859, 0.83908, 0.83908, 0.83908,
 39598              0.83908, 0.83908, 0.83908, 0.77539, 0.71805, 0.73133, 0.73133,
 39599              0.73133, 0.73133, 0.95958, 0.95958, 0.95958, 0.95958, 0.88506,
 39600              0.90872, 0.85938, 0.85938, 0.85938, 0.85938, 0.85938, 0.85284,
 39601              0.87068, 0.90399, 0.90399, 0.90399, 0.90399, 0.77892, 0.79795,
 39602              0.90807, 0.94908, 0.94908, 0.94908, 0.94908, 0.94908, 0.94908,
 39603              0.85887, 0.74012, 0.88323, 0.88323, 0.88323, 0.88323, 0.88401,
 39604              0.88401, 0.88401, 0.88401, 0.8785, 0.86331, 0.86331, 0.86331,
 39605              0.86331, 0.86331, 0.86331, 0.90747, 0.89049, 0.86331, 0.86331,
 39606              0.86331, 0.86331, 0.84548, 0.86411, 0.84548, 0.83908, 0.94908,
 39607              0.83908, 0.94908, 0.83908, 0.94908, 0.71805, 0.74012, 0.71805,
 39608              0.74012, 0.71805, 0.74012, 0.71805, 0.74012, 0.87289, 0.79538,
 39609              0.88506, 0.92726, 0.73133, 0.88323, 0.73133, 0.88323, 0.73133,
 39610              0.88323, 0.73133, 0.88323, 0.73133, 0.88323, 0.81921, 0.86411,
 39611              0.81921, 0.86411, 0.81921, 0.86411, 1, 1, 0.87356, 0.86331, 0.91075,
 39612              0.8777, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401,
 39613              0.95958, 0.88401, 0.95958, 0.88401, 0.76467, 0.90167, 0.59526,
 39614              0.91916, 1, 1, 0.86304, 0.69225, 0.88401, 1, 1, 0.70424, 0.77312,
 39615              0.91926, 0.88175, 0.70823, 0.94903, 0.90872, 0.86331, 1, 1, 0.90872,
 39616              0.86331, 0.86906, 0.88116, 0.86331, 0.85938, 0.86331, 0.85938,
 39617              0.86331, 0.85938, 0.86331, 0.87402, 0.86549, 0.77958, 0.90464, 1, 1,
 39618              0.77958, 0.90464, 0.69766, 0.70852, 0.69766, 0.70852, 0.69766,
 39619              0.70852, 0.69766, 0.70852, 1, 1, 0.81055, 0.75841, 0.81055, 1.06452,
 39620              0.90399, 0.86331, 0.90399, 0.86331, 0.90399, 0.86331, 0.90399,
 39621              0.86331, 0.90399, 0.86331, 0.90399, 0.86331, 0.96068, 0.95794,
 39622              0.77892, 0.84548, 0.77892, 0.78257, 0.79492, 0.78257, 0.79492,
 39623              0.78257, 0.79492, 0.9297, 0.56892, 0.83908, 0.94908, 0.77539,
 39624              0.85887, 0.87068, 0.89049, 1, 1, 0.81055, 1.04106, 1.20528, 1.20528,
 39625              1, 1.15543, 0.70088, 0.98387, 0.94721, 1.33431, 1.45894, 0.95161,
 39626              1.48387, 0.83908, 0.80352, 0.57118, 0.6965, 0.56347, 0.79179,
 39627              0.55853, 0.80346, 1.02988, 0.83908, 0.7762, 0.67174, 0.86036,
 39628              0.73133, 0.78257, 0.87356, 0.86441, 0.95958, 0.75727, 0.89019,
 39629              1.04924, 0.90872, 0.74889, 0.85938, 0.87891, 0.79795, 0.7957,
 39630              0.81055, 0.77892, 0.97447, 0.82577, 0.97466, 0.87179, 0.95958,
 39631              0.77892, 0.94252, 0.95612, 0.8753, 1.02988, 0.92733, 0.94252,
 39632              0.87411, 0.84021, 0.8728, 0.95612, 0.74081, 0.8753, 1.02189,
 39633              1.02988, 0.84814, 0.87445, 0.91822, 0.84723, 0.85668, 0.86331,
 39634              0.81344, 0.87581, 0.76422, 0.82046, 0.96057, 0.92733, 0.99375,
 39635              0.78022, 0.95452, 0.86015, 1.02988, 0.92733, 0.86331, 0.92733,
 39636              0.86015, 0.73133, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90631, 1, 1,
 39637              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39638              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39639              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.88323, 1, 1,
 39640              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.85174, 1, 1, 1, 1, 1, 1, 0.96068,
 39641              0.95794, 0.96068, 0.95794, 0.96068, 0.95794, 0.77892, 0.84548, 1, 1,
 39642              0.89552, 0.90527, 1, 0.90363, 0.92794, 0.92794, 0.92794, 0.89807,
 39643              0.87012, 0.87012, 0.87012, 0.89552, 0.89552, 1.42259, 0.71094,
 39644              1.06152, 1, 1, 1.03372, 1.03372, 0.97171, 1.4956, 2.2807, 0.92972,
 39645              0.83406, 0.91133, 0.83326, 0.91133, 1, 1, 1, 0.72021, 1, 1.23108,
 39646              0.83489, 0.88525, 0.88525, 0.81499, 0.90616, 1.81055, 0.90527,
 39647              1.81055, 1.3107, 1.53711, 0.94434, 1.08696, 1, 0.95018, 0.77192,
 39648              0.85284, 0.90747, 1.17534, 0.69825, 0.9716, 1.37077, 0.90747,
 39649              0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284, 0.8941,
 39650              0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1,
 39651              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39652              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99862,
 39653              0.99862, 1, 1, 1, 1, 1, 1.08004, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1,
 39654              1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90727, 0.90727, 1, 1, 1, 1, 1, 1, 1, 1,
 39655              1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39656            ];
 39657            t.CalibriBoldItalicMetrics = { lineHeight: 1.2207, lineGap: 0.2207 };
 39658            t.CalibriItalicFactors = [
 39659              1.3877, 1, 1, 1, 1.17223, 1.1293, 0.89552, 0.91133, 0.80395,
 39660              1.02269, 1.15601, 0.91056, 0.91056, 1.2798, 0.85284, 0.89807, 1,
 39661              0.90861, 1.39543, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133,
 39662              0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.96309, 0.96309,
 39663              0.85284, 0.85284, 0.85284, 0.83319, 0.88071, 0.8675, 0.81552,
 39664              0.72346, 0.85193, 0.73206, 0.7522, 0.81105, 0.86275, 0.90685,
 39665              0.6377, 0.77892, 0.75593, 1.02638, 0.89249, 0.84118, 0.77452,
 39666              0.85374, 0.75186, 0.67789, 0.79776, 0.88844, 0.85066, 0.94309,
 39667              0.77818, 0.7306, 0.76659, 1.10369, 1.38313, 1.10369, 1.06139,
 39668              0.89552, 0.8739, 0.9245, 0.9245, 0.83203, 0.9245, 0.85865, 1.09842,
 39669              0.9245, 0.9245, 1.03297, 1.07692, 0.90918, 1.03297, 0.94959, 0.9245,
 39670              0.92274, 0.9245, 0.9245, 1.02933, 0.77832, 1.20562, 0.9245, 0.8916,
 39671              0.98986, 0.86621, 0.89453, 0.79004, 0.94152, 1.77256, 0.94152,
 39672              0.85284, 0.97801, 0.89552, 0.91133, 0.89552, 0.91133, 1.91729,
 39673              0.89552, 1.17889, 1.13254, 1.16359, 0.92098, 0.85284, 0.68787,
 39674              0.71353, 0.84737, 0.90747, 1.0088, 1.0044, 0.87683, 1, 1.09091, 1,
 39675              0.92229, 0.739, 1.15642, 0.92098, 0.76288, 0.80504, 0.80972,
 39676              0.75859, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.76318,
 39677              0.72346, 0.73206, 0.73206, 0.73206, 0.73206, 0.90685, 0.90685,
 39678              0.90685, 0.90685, 0.86477, 0.89249, 0.84118, 0.84118, 0.84118,
 39679              0.84118, 0.84118, 0.85284, 0.84557, 0.88844, 0.88844, 0.88844,
 39680              0.88844, 0.7306, 0.77452, 0.86331, 0.9245, 0.9245, 0.9245, 0.9245,
 39681              0.9245, 0.9245, 0.84843, 0.83203, 0.85865, 0.85865, 0.85865,
 39682              0.85865, 0.82601, 0.82601, 0.82601, 0.82601, 0.94469, 0.9245,
 39683              0.92274, 0.92274, 0.92274, 0.92274, 0.92274, 0.90747, 0.86651,
 39684              0.9245, 0.9245, 0.9245, 0.9245, 0.89453, 0.9245, 0.89453, 0.8675,
 39685              0.9245, 0.8675, 0.9245, 0.8675, 0.9245, 0.72346, 0.83203, 0.72346,
 39686              0.83203, 0.72346, 0.83203, 0.72346, 0.83203, 0.85193, 0.8875,
 39687              0.86477, 0.99034, 0.73206, 0.85865, 0.73206, 0.85865, 0.73206,
 39688              0.85865, 0.73206, 0.85865, 0.73206, 0.85865, 0.81105, 0.9245,
 39689              0.81105, 0.9245, 0.81105, 0.9245, 1, 1, 0.86275, 0.9245, 0.90872,
 39690              0.93591, 0.90685, 0.82601, 0.90685, 0.82601, 0.90685, 0.82601,
 39691              0.90685, 1.03297, 0.90685, 0.82601, 0.77896, 1.05611, 0.6377,
 39692              1.07692, 1, 1, 0.90918, 0.75593, 1.03297, 1, 1, 0.76032, 0.9375,
 39693              0.98156, 0.93407, 0.77261, 1.11429, 0.89249, 0.9245, 1, 1, 0.89249,
 39694              0.9245, 0.92534, 0.86698, 0.9245, 0.84118, 0.92274, 0.84118,
 39695              0.92274, 0.84118, 0.92274, 0.8667, 0.86291, 0.75186, 1.02933, 1, 1,
 39696              0.75186, 1.02933, 0.67789, 0.77832, 0.67789, 0.77832, 0.67789,
 39697              0.77832, 0.67789, 0.77832, 1, 1, 0.79776, 0.97655, 0.79776, 1.23023,
 39698              0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245,
 39699              0.88844, 0.9245, 0.88844, 0.9245, 0.94309, 0.98986, 0.7306, 0.89453,
 39700              0.7306, 0.76659, 0.79004, 0.76659, 0.79004, 0.76659, 0.79004,
 39701              1.09231, 0.54873, 0.8675, 0.9245, 0.76318, 0.84843, 0.84557,
 39702              0.86651, 1, 1, 0.79776, 1.20562, 1.18622, 1.18622, 1, 1.1437,
 39703              0.67009, 0.96334, 0.93695, 1.35191, 1.40909, 0.95161, 1.48387,
 39704              0.8675, 0.90861, 0.6192, 0.7363, 0.64824, 0.82411, 0.56321, 0.85696,
 39705              1.23516, 0.8675, 0.81552, 0.7286, 0.84134, 0.73206, 0.76659,
 39706              0.86275, 0.84369, 0.90685, 0.77892, 0.85871, 1.02638, 0.89249,
 39707              0.75828, 0.84118, 0.85984, 0.77452, 0.76466, 0.79776, 0.7306,
 39708              0.90782, 0.77818, 0.903, 0.87291, 0.90685, 0.7306, 0.99058, 1.03667,
 39709              0.94635, 1.23516, 0.9849, 0.99058, 0.92393, 0.8916, 0.942, 1.03667,
 39710              0.75026, 0.94635, 1.0297, 1.23516, 0.90918, 0.94048, 0.98217,
 39711              0.89746, 0.84153, 0.92274, 0.82507, 0.88832, 0.84438, 0.88178,
 39712              1.03525, 0.9849, 1.00225, 0.78086, 0.97248, 0.89404, 1.23516,
 39713              0.9849, 0.92274, 0.9849, 0.89404, 0.73206, 1, 1, 1, 1, 1, 1, 1, 1,
 39714              1, 1, 1, 1, 0.89693, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39715              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39716              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39717              1, 1, 1, 1, 0.85865, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90933, 1,
 39718              1, 1, 1, 1, 1, 0.94309, 0.98986, 0.94309, 0.98986, 0.94309, 0.98986,
 39719              0.7306, 0.89453, 1, 1, 0.89552, 0.90527, 1, 0.90186, 1.12308,
 39720              1.12308, 1.12308, 1.12308, 1.2566, 1.2566, 1.2566, 0.89552, 0.89552,
 39721              1.42259, 0.68994, 1.03809, 1, 1, 1.0176, 1.0176, 1.11523, 1.4956,
 39722              2.01462, 0.97858, 0.82616, 0.91133, 0.83437, 0.91133, 1, 1, 1,
 39723              0.70508, 1, 1.23108, 0.79801, 0.84426, 0.84426, 0.774, 0.90572,
 39724              1.81055, 0.90749, 1.81055, 1.28809, 1.55469, 0.94434, 1.07806, 1,
 39725              0.97094, 0.7589, 0.85284, 0.90747, 1.19658, 0.69825, 0.97622,
 39726              1.33512, 0.90747, 0.90747, 0.85284, 0.90747, 0.90747, 1.44947,
 39727              0.85284, 0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572,
 39728              0.70572, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39729              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39730              1, 0.99862, 0.99862, 1, 1, 1, 1, 1, 1.0336, 0.91027, 1, 1, 1,
 39731              0.99862, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05859, 1.05859, 1, 1,
 39732              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39733            ];
 39734            t.CalibriItalicMetrics = { lineHeight: 1.2207, lineGap: 0.2207 };
 39735            t.CalibriRegularFactors = [
 39736              1.3877, 1, 1, 1, 1.17223, 1.1293, 0.89552, 0.91133, 0.80395,
 39737              1.02269, 1.15601, 0.91056, 0.91056, 1.2798, 0.85284, 0.89807, 1,
 39738              0.90861, 1.39016, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133,
 39739              0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.96309, 0.96309,
 39740              0.85284, 0.85284, 0.85284, 0.83319, 0.88071, 0.8675, 0.81552,
 39741              0.73834, 0.85193, 0.73206, 0.7522, 0.81105, 0.86275, 0.90685,
 39742              0.6377, 0.77892, 0.75593, 1.02638, 0.89385, 0.85122, 0.77452,
 39743              0.86503, 0.75186, 0.68887, 0.79776, 0.88844, 0.85066, 0.94258,
 39744              0.77818, 0.7306, 0.76659, 1.10369, 1.39016, 1.10369, 1.06139,
 39745              0.89552, 0.8739, 0.86128, 0.94469, 0.8457, 0.94469, 0.89464,
 39746              1.09842, 0.84636, 0.94469, 1.03297, 1.07692, 0.90918, 1.03297,
 39747              0.95897, 0.94469, 0.9482, 0.94469, 0.94469, 1.04692, 0.78223,
 39748              1.20562, 0.94469, 0.90332, 0.98986, 0.86621, 0.90527, 0.79004,
 39749              0.94152, 1.77256, 0.94152, 0.85284, 0.97801, 0.89552, 0.91133,
 39750              0.89552, 0.91133, 1.91729, 0.89552, 1.17889, 1.13254, 1.08707,
 39751              0.92098, 0.85284, 0.68787, 0.71353, 0.84737, 0.90747, 1.0088,
 39752              1.0044, 0.87683, 1, 1.09091, 1, 0.92229, 0.739, 1.15642, 0.92098,
 39753              0.76288, 0.80504, 0.80972, 0.75859, 0.8675, 0.8675, 0.8675, 0.8675,
 39754              0.8675, 0.8675, 0.76318, 0.73834, 0.73206, 0.73206, 0.73206,
 39755              0.73206, 0.90685, 0.90685, 0.90685, 0.90685, 0.86477, 0.89385,
 39756              0.85122, 0.85122, 0.85122, 0.85122, 0.85122, 0.85284, 0.85311,
 39757              0.88844, 0.88844, 0.88844, 0.88844, 0.7306, 0.77452, 0.86331,
 39758              0.86128, 0.86128, 0.86128, 0.86128, 0.86128, 0.86128, 0.8693,
 39759              0.8457, 0.89464, 0.89464, 0.89464, 0.89464, 0.82601, 0.82601,
 39760              0.82601, 0.82601, 0.94469, 0.94469, 0.9482, 0.9482, 0.9482, 0.9482,
 39761              0.9482, 0.90747, 0.86651, 0.94469, 0.94469, 0.94469, 0.94469,
 39762              0.90527, 0.94469, 0.90527, 0.8675, 0.86128, 0.8675, 0.86128, 0.8675,
 39763              0.86128, 0.73834, 0.8457, 0.73834, 0.8457, 0.73834, 0.8457, 0.73834,
 39764              0.8457, 0.85193, 0.92454, 0.86477, 0.9921, 0.73206, 0.89464,
 39765              0.73206, 0.89464, 0.73206, 0.89464, 0.73206, 0.89464, 0.73206,
 39766              0.89464, 0.81105, 0.84636, 0.81105, 0.84636, 0.81105, 0.84636, 1, 1,
 39767              0.86275, 0.94469, 0.90872, 0.95786, 0.90685, 0.82601, 0.90685,
 39768              0.82601, 0.90685, 0.82601, 0.90685, 1.03297, 0.90685, 0.82601,
 39769              0.77741, 1.05611, 0.6377, 1.07692, 1, 1, 0.90918, 0.75593, 1.03297,
 39770              1, 1, 0.76032, 0.90452, 0.98156, 1.11842, 0.77261, 1.11429, 0.89385,
 39771              0.94469, 1, 1, 0.89385, 0.94469, 0.95877, 0.86901, 0.94469, 0.85122,
 39772              0.9482, 0.85122, 0.9482, 0.85122, 0.9482, 0.8667, 0.90016, 0.75186,
 39773              1.04692, 1, 1, 0.75186, 1.04692, 0.68887, 0.78223, 0.68887, 0.78223,
 39774              0.68887, 0.78223, 0.68887, 0.78223, 1, 1, 0.79776, 0.92188, 0.79776,
 39775              1.23023, 0.88844, 0.94469, 0.88844, 0.94469, 0.88844, 0.94469,
 39776              0.88844, 0.94469, 0.88844, 0.94469, 0.88844, 0.94469, 0.94258,
 39777              0.98986, 0.7306, 0.90527, 0.7306, 0.76659, 0.79004, 0.76659,
 39778              0.79004, 0.76659, 0.79004, 1.09231, 0.54873, 0.8675, 0.86128,
 39779              0.76318, 0.8693, 0.85311, 0.86651, 1, 1, 0.79776, 1.20562, 1.18622,
 39780              1.18622, 1, 1.1437, 0.67742, 0.96334, 0.93695, 1.35191, 1.40909,
 39781              0.95161, 1.48387, 0.86686, 0.90861, 0.62267, 0.74359, 0.65649,
 39782              0.85498, 0.56963, 0.88254, 1.23516, 0.8675, 0.81552, 0.75443,
 39783              0.84503, 0.73206, 0.76659, 0.86275, 0.85122, 0.90685, 0.77892,
 39784              0.85746, 1.02638, 0.89385, 0.75657, 0.85122, 0.86275, 0.77452,
 39785              0.74171, 0.79776, 0.7306, 0.95165, 0.77818, 0.89772, 0.88831,
 39786              0.90685, 0.7306, 0.98142, 1.02191, 0.96576, 1.23516, 0.99018,
 39787              0.98142, 0.9236, 0.89258, 0.94035, 1.02191, 0.78848, 0.96576,
 39788              0.9561, 1.23516, 0.90918, 0.92578, 0.95424, 0.89746, 0.83969,
 39789              0.9482, 0.80113, 0.89442, 0.85208, 0.86155, 0.98022, 0.99018,
 39790              1.00452, 0.81209, 0.99247, 0.89181, 1.23516, 0.99018, 0.9482,
 39791              0.99018, 0.89181, 0.73206, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39792              0.88844, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39793              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39794              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39795              0.89464, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.96766, 1, 1, 1, 1, 1,
 39796              1, 0.94258, 0.98986, 0.94258, 0.98986, 0.94258, 0.98986, 0.7306,
 39797              0.90527, 1, 1, 0.89552, 0.90527, 1, 0.90186, 1.12308, 1.12308,
 39798              1.12308, 1.12308, 1.2566, 1.2566, 1.2566, 0.89552, 0.89552, 1.42259,
 39799              0.69043, 1.03809, 1, 1, 1.0176, 1.0176, 1.11523, 1.4956, 2.01462,
 39800              0.99331, 0.82616, 0.91133, 0.84286, 0.91133, 1, 1, 1, 0.70508, 1,
 39801              1.23108, 0.79801, 0.84426, 0.84426, 0.774, 0.90527, 1.81055,
 39802              0.90527, 1.81055, 1.28809, 1.55469, 0.94434, 1.07806, 1, 0.97094,
 39803              0.7589, 0.85284, 0.90747, 1.19658, 0.69825, 0.97622, 1.33512,
 39804              0.90747, 0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284,
 39805              0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 1,
 39806              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39807              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99862,
 39808              0.99862, 1, 1, 1, 1, 1, 1.0336, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1,
 39809              1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05859, 1.05859, 1, 1, 1, 1.07185,
 39810              0.99413, 0.96334, 1.08065, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39811            ];
 39812            t.CalibriRegularMetrics = { lineHeight: 1.2207, lineGap: 0.2207 };
 39813          },
 39814          (e, t) => {
 39815            Object.defineProperty(t, "__esModule", { value: !0 });
 39816            t.HelveticaRegularMetrics =
 39817              t.HelveticaRegularFactors =
 39818              t.HelveticaItalicMetrics =
 39819              t.HelveticaItalicFactors =
 39820              t.HelveticaBoldMetrics =
 39821              t.HelveticaBoldItalicMetrics =
 39822              t.HelveticaBoldItalicFactors =
 39823              t.HelveticaBoldFactors =
 39824                void 0;
 39825            t.HelveticaBoldFactors = [
 39826              0.76116, 1, 1, 1.0006, 0.99998, 0.99974, 0.99973, 0.99973, 0.99982,
 39827              0.99977, 1.00087, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006,
 39828              0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973,
 39829              0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1,
 39830              1.00003, 1.00003, 1.00003, 1.00026, 0.9999, 0.99977, 0.99977,
 39831              0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006,
 39832              0.99973, 0.99977, 1.00026, 0.99999, 0.99977, 1.00022, 1.00001,
 39833              1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016,
 39834              1.00001, 1.00001, 1.00026, 0.99998, 1.0006, 0.99998, 1.00003,
 39835              0.99973, 0.99998, 0.99973, 1.00026, 0.99973, 1.00026, 0.99973,
 39836              0.99998, 1.00026, 1.00026, 1.0006, 1.0006, 0.99973, 1.0006, 0.99982,
 39837              1.00026, 1.00026, 1.00026, 1.00026, 0.99959, 0.99973, 0.99998,
 39838              1.00026, 0.99973, 1.00022, 0.99973, 0.99973, 1, 0.99959, 1.00077,
 39839              0.99959, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, 0.99973,
 39840              1.00077, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, 1.00003,
 39841              1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, 0.99973,
 39842              1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002,
 39843              1.00026, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1,
 39844              0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006,
 39845              1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022,
 39846              1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977,
 39847              1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973,
 39848              0.99973, 0.99973, 0.99982, 0.99973, 0.99973, 0.99973, 0.99973,
 39849              0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.00026, 1.00026, 1.00026,
 39850              1.00026, 1.00026, 1.00026, 1.00026, 1.06409, 1.00026, 1.00026,
 39851              1.00026, 1.00026, 1.00026, 0.99973, 1.00026, 0.99973, 0.99977,
 39852              0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973,
 39853              0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977,
 39854              1.03374, 0.99977, 1.00026, 1.00001, 0.99973, 1.00001, 0.99973,
 39855              1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00022,
 39856              1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026,
 39857              0.99977, 1.00026, 0.99977, 1.00026, 1.0006, 1.0006, 1.0006, 1.0006,
 39858              1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.00042, 0.99973,
 39859              0.99973, 1.0006, 0.99977, 0.99973, 0.99973, 1.00026, 1.0006,
 39860              1.00026, 1.0006, 1.00026, 1.03828, 1.00026, 0.99999, 1.00026,
 39861              1.0006, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026,
 39862              0.9993, 0.9998, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026,
 39863              1.00022, 1.00026, 1, 1.00016, 0.99977, 0.99959, 0.99977, 0.99959,
 39864              0.99977, 0.99959, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001,
 39865              0.99973, 1.00001, 0.99973, 1.00026, 0.99998, 1.00026, 0.8121,
 39866              1.00026, 0.99998, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977,
 39867              1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026,
 39868              1.00016, 1.00022, 1.00001, 0.99973, 1.00001, 1.00026, 1, 1.00026, 1,
 39869              1.00026, 1, 1.0006, 0.99973, 0.99977, 0.99973, 1, 0.99982, 1.00022,
 39870              1.00026, 1.00001, 0.99973, 1.00026, 0.99998, 0.99998, 0.99998,
 39871              0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998,
 39872              0.99998, 1.00034, 0.99977, 1, 0.99997, 1.00026, 1.00078, 1.00036,
 39873              0.99973, 1.00013, 1.0006, 0.99977, 0.99977, 0.99988, 0.85148,
 39874              1.00001, 1.00026, 0.99977, 1.00022, 1.0006, 0.99977, 1.00001,
 39875              0.99999, 0.99977, 1.00069, 1.00022, 0.99977, 1.00001, 0.99984,
 39876              1.00026, 1.00001, 1.00024, 1.00001, 0.9999, 1, 1.0006, 1.00001,
 39877              1.00041, 0.99962, 1.00026, 1.0006, 0.99995, 1.00041, 0.99942,
 39878              0.99973, 0.99927, 1.00082, 0.99902, 1.00026, 1.00087, 1.0006,
 39879              1.00069, 0.99973, 0.99867, 0.99973, 0.9993, 1.00026, 1.00049,
 39880              1.00056, 1, 0.99988, 0.99935, 0.99995, 0.99954, 1.00055, 0.99945,
 39881              1.00032, 1.0006, 0.99995, 1.00026, 0.99995, 1.00032, 1.00001,
 39882              1.00008, 0.99971, 1.00019, 0.9994, 1.00001, 1.0006, 1.00044,
 39883              0.99973, 1.00023, 1.00047, 1, 0.99942, 0.99561, 0.99989, 1.00035,
 39884              0.99977, 1.00035, 0.99977, 1.00019, 0.99944, 1.00001, 1.00021,
 39885              0.99926, 1.00035, 1.00035, 0.99942, 1.00048, 0.99999, 0.99977,
 39886              1.00022, 1.00035, 1.00001, 0.99977, 1.00026, 0.99989, 1.00057,
 39887              1.00001, 0.99936, 1.00052, 1.00012, 0.99996, 1.00043, 1, 1.00035,
 39888              0.9994, 0.99976, 1.00035, 0.99973, 1.00052, 1.00041, 1.00119,
 39889              1.00037, 0.99973, 1.00002, 0.99986, 1.00041, 1.00041, 0.99902,
 39890              0.9996, 1.00034, 0.99999, 1.00026, 0.99999, 1.00026, 0.99973,
 39891              1.00052, 0.99973, 1, 0.99973, 1.00041, 1.00075, 0.9994, 1.0003,
 39892              0.99999, 1, 1.00041, 0.99955, 1, 0.99915, 0.99973, 0.99973, 1.00026,
 39893              1.00119, 0.99955, 0.99973, 1.0006, 0.99911, 1.0006, 1.00026,
 39894              0.99972, 1.00026, 0.99902, 1.00041, 0.99973, 0.99999, 1, 1, 1.00038,
 39895              1.0005, 1.00016, 1.00022, 1.00016, 1.00022, 1.00016, 1.00022,
 39896              1.00001, 0.99973, 1, 1, 0.99973, 1, 1, 0.99955, 1.0006, 1.0006,
 39897              1.0006, 1.0006, 1, 1, 1, 0.99973, 0.99973, 0.99972, 1, 1, 1.00106,
 39898              0.99999, 0.99998, 0.99998, 0.99999, 0.99998, 1.66475, 1, 0.99973,
 39899              0.99973, 1.00023, 0.99973, 0.99971, 1.00047, 1.00023, 1, 0.99991,
 39900              0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1, 1, 1, 1, 1, 1, 1,
 39901              0.99972, 1, 1.20985, 1.39713, 1.00003, 1.00031, 1.00015, 1, 0.99561,
 39902              1.00027, 1.00031, 1.00031, 0.99915, 1.00031, 1.00031, 0.99999,
 39903              1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144,
 39904              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 39905              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 39906              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 39907              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 39908              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 39909              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579,
 39910              1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026,
 39911              1.00026, 0.99972, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1,
 39912              0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1,
 39913              1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998, 1, 1, 1, 1, 1, 1,
 39914              1, 1, 1, 1, 1,
 39915            ];
 39916            t.HelveticaBoldMetrics = { lineHeight: 1.2, lineGap: 0.2 };
 39917            t.HelveticaBoldItalicFactors = [
 39918              0.76116, 1, 1, 1.0006, 0.99998, 0.99974, 0.99973, 0.99973, 0.99982,
 39919              0.99977, 1.00087, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006,
 39920              0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973,
 39921              0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1,
 39922              1.00003, 1.00003, 1.00003, 1.00026, 0.9999, 0.99977, 0.99977,
 39923              0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006,
 39924              0.99973, 0.99977, 1.00026, 0.99999, 0.99977, 1.00022, 1.00001,
 39925              1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016,
 39926              1.00001, 1.00001, 1.00026, 0.99998, 1.0006, 0.99998, 1.00003,
 39927              0.99973, 0.99998, 0.99973, 1.00026, 0.99973, 1.00026, 0.99973,
 39928              0.99998, 1.00026, 1.00026, 1.0006, 1.0006, 0.99973, 1.0006, 0.99982,
 39929              1.00026, 1.00026, 1.00026, 1.00026, 0.99959, 0.99973, 0.99998,
 39930              1.00026, 0.99973, 1.00022, 0.99973, 0.99973, 1, 0.99959, 1.00077,
 39931              0.99959, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, 0.99973,
 39932              1.00077, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, 1.00003,
 39933              1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, 0.99973,
 39934              1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002,
 39935              1.00026, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1,
 39936              0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006,
 39937              1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022,
 39938              1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977,
 39939              1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973,
 39940              0.99973, 0.99973, 0.99982, 0.99973, 0.99973, 0.99973, 0.99973,
 39941              0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.00026, 1.00026, 1.00026,
 39942              1.00026, 1.00026, 1.00026, 1.00026, 1.06409, 1.00026, 1.00026,
 39943              1.00026, 1.00026, 1.00026, 0.99973, 1.00026, 0.99973, 0.99977,
 39944              0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973,
 39945              0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977,
 39946              1.0044, 0.99977, 1.00026, 1.00001, 0.99973, 1.00001, 0.99973,
 39947              1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00022,
 39948              1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026,
 39949              0.99977, 1.00026, 0.99977, 1.00026, 1.0006, 1.0006, 1.0006, 1.0006,
 39950              1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99971, 0.99973,
 39951              0.99973, 1.0006, 0.99977, 0.99973, 0.99973, 1.00026, 1.0006,
 39952              1.00026, 1.0006, 1.00026, 1.01011, 1.00026, 0.99999, 1.00026,
 39953              1.0006, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026,
 39954              0.9993, 0.9998, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026,
 39955              1.00022, 1.00026, 1, 1.00016, 0.99977, 0.99959, 0.99977, 0.99959,
 39956              0.99977, 0.99959, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001,
 39957              0.99973, 1.00001, 0.99973, 1.00026, 0.99998, 1.00026, 0.8121,
 39958              1.00026, 0.99998, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977,
 39959              1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026,
 39960              1.00016, 1.00022, 1.00001, 0.99973, 1.00001, 1.00026, 1, 1.00026, 1,
 39961              1.00026, 1, 1.0006, 0.99973, 0.99977, 0.99973, 1, 0.99982, 1.00022,
 39962              1.00026, 1.00001, 0.99973, 1.00026, 0.99998, 0.99998, 0.99998,
 39963              0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998,
 39964              0.99998, 0.99998, 0.99977, 1, 1, 1.00026, 0.99969, 0.99972, 0.99981,
 39965              0.9998, 1.0006, 0.99977, 0.99977, 1.00022, 0.91155, 1.00001,
 39966              1.00026, 0.99977, 1.00022, 1.0006, 0.99977, 1.00001, 0.99999,
 39967              0.99977, 0.99966, 1.00022, 1.00032, 1.00001, 0.99944, 1.00026,
 39968              1.00001, 0.99968, 1.00001, 1.00047, 1, 1.0006, 1.00001, 0.99981,
 39969              1.00101, 1.00026, 1.0006, 0.99948, 0.99981, 1.00064, 0.99973,
 39970              0.99942, 1.00101, 1.00061, 1.00026, 1.00069, 1.0006, 1.00014,
 39971              0.99973, 1.01322, 0.99973, 1.00065, 1.00026, 1.00012, 0.99923, 1,
 39972              1.00064, 1.00076, 0.99948, 1.00055, 1.00063, 1.00007, 0.99943,
 39973              1.0006, 0.99948, 1.00026, 0.99948, 0.99943, 1.00001, 1.00001,
 39974              1.00029, 1.00038, 1.00035, 1.00001, 1.0006, 1.0006, 0.99973,
 39975              0.99978, 1.00001, 1.00057, 0.99989, 0.99967, 0.99964, 0.99967,
 39976              0.99977, 0.99999, 0.99977, 1.00038, 0.99977, 1.00001, 0.99973,
 39977              1.00066, 0.99967, 0.99967, 1.00041, 0.99998, 0.99999, 0.99977,
 39978              1.00022, 0.99967, 1.00001, 0.99977, 1.00026, 0.99964, 1.00031,
 39979              1.00001, 0.99999, 0.99999, 1, 1.00023, 1, 1, 0.99999, 1.00035,
 39980              1.00001, 0.99999, 0.99973, 0.99977, 0.99999, 1.00058, 0.99973,
 39981              0.99973, 0.99955, 0.9995, 1.00026, 1.00026, 1.00032, 0.99989,
 39982              1.00034, 0.99999, 1.00026, 1.00026, 1.00026, 0.99973, 0.45998,
 39983              0.99973, 1.00026, 0.99973, 1.00001, 0.99999, 0.99982, 0.99994,
 39984              0.99996, 1, 1.00042, 1.00044, 1.00029, 1.00023, 0.99973, 0.99973,
 39985              1.00026, 0.99949, 1.00002, 0.99973, 1.0006, 1.0006, 1.0006, 0.99975,
 39986              1.00026, 1.00026, 1.00032, 0.98685, 0.99973, 1.00026, 1, 1, 0.99966,
 39987              1.00044, 1.00016, 1.00022, 1.00016, 1.00022, 1.00016, 1.00022,
 39988              1.00001, 0.99973, 1, 1, 0.99973, 1, 1, 0.99955, 1.0006, 1.0006,
 39989              1.0006, 1.0006, 1, 1, 1, 0.99973, 0.99973, 0.99972, 1, 1, 1.00106,
 39990              0.99999, 0.99998, 0.99998, 0.99999, 0.99998, 1.66475, 1, 0.99973,
 39991              0.99973, 1, 0.99973, 0.99971, 0.99978, 1, 1, 0.99991, 0.99984,
 39992              1.00002, 1.00002, 1.00002, 1.00002, 1.00098, 1, 1, 1, 1.00049, 1, 1,
 39993              0.99972, 1, 1.20985, 1.39713, 1.00003, 1.00031, 1.00015, 1, 0.99561,
 39994              1.00027, 1.00031, 1.00031, 0.99915, 1.00031, 1.00031, 0.99999,
 39995              1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144,
 39996              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 39997              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 39998              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 39999              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40000              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40001              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579,
 40002              1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026,
 40003              1.00026, 0.99972, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1,
 40004              0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1,
 40005              1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998, 1, 1, 1, 1, 1, 1,
 40006              1, 1, 1, 1, 1,
 40007            ];
 40008            t.HelveticaBoldItalicMetrics = { lineHeight: 1.35, lineGap: 0.2 };
 40009            t.HelveticaItalicFactors = [
 40010              0.76116, 1, 1, 1.0006, 1.0006, 1.00006, 0.99973, 0.99973, 0.99982,
 40011              1.00001, 1.00043, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006,
 40012              0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973,
 40013              0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1,
 40014              1.00003, 1.00003, 1.00003, 0.99973, 0.99987, 1.00001, 1.00001,
 40015              0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, 1,
 40016              1.00001, 0.99973, 0.99999, 0.99977, 1.00022, 1.00001, 1.00022,
 40017              0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001,
 40018              1.00001, 1.00026, 1.0006, 1.0006, 1.0006, 0.99949, 0.99973, 0.99998,
 40019              0.99973, 0.99973, 1, 0.99973, 0.99973, 1.0006, 0.99973, 0.99973,
 40020              0.99924, 0.99924, 1, 0.99924, 0.99999, 0.99973, 0.99973, 0.99973,
 40021              0.99973, 0.99998, 1, 1.0006, 0.99973, 1, 0.99977, 1, 1, 1, 1.00005,
 40022              1.0009, 1.00005, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973,
 40023              0.99973, 1.0009, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973,
 40024              1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1,
 40025              0.9998, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002,
 40026              1.00002, 1.00026, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001,
 40027              1.00001, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006,
 40028              1.0006, 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022,
 40029              1.00022, 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977,
 40030              0.99977, 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973,
 40031              0.99973, 0.99973, 0.99973, 0.99982, 1, 0.99973, 0.99973, 0.99973,
 40032              0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973,
 40033              0.99973, 0.99973, 0.99973, 0.99973, 1.06409, 1.00026, 0.99973,
 40034              0.99973, 0.99973, 0.99973, 1, 0.99973, 1, 1.00001, 0.99973, 1.00001,
 40035              0.99973, 1.00001, 0.99973, 0.99977, 1, 0.99977, 1, 0.99977, 1,
 40036              0.99977, 1, 0.99977, 1.0288, 0.99977, 0.99973, 1.00001, 0.99973,
 40037              1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001,
 40038              0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973,
 40039              1.00022, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.0006,
 40040              1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99924, 1.0006,
 40041              1.0006, 0.99946, 1.00034, 1, 0.99924, 1.00001, 1, 1, 0.99973,
 40042              0.99924, 0.99973, 0.99924, 0.99973, 1.06311, 0.99973, 1.00024,
 40043              0.99973, 0.99924, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977,
 40044              0.99973, 1.00041, 0.9998, 0.99973, 1.00022, 0.99973, 1.00022,
 40045              0.99973, 1.00022, 0.99973, 1, 1.00016, 0.99977, 0.99998, 0.99977,
 40046              0.99998, 0.99977, 0.99998, 1.00001, 1, 1.00001, 1, 1.00001, 1,
 40047              1.00001, 1, 1.00026, 1.0006, 1.00026, 0.89547, 1.00026, 1.0006,
 40048              0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977,
 40049              0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.00016, 0.99977,
 40050              1.00001, 1, 1.00001, 1.00026, 1, 1.00026, 1, 1.00026, 1, 0.99924,
 40051              0.99973, 1.00001, 0.99973, 1, 0.99982, 1.00022, 1.00026, 1.00001, 1,
 40052              1.00026, 1.0006, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998,
 40053              0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 1.00001, 1,
 40054              1.00054, 0.99977, 1.00084, 1.00007, 0.99973, 1.00013, 0.99924,
 40055              1.00001, 1.00001, 0.99945, 0.91221, 1.00001, 1.00026, 0.99977,
 40056              1.00022, 1.0006, 1.00001, 1.00001, 0.99999, 0.99977, 0.99933,
 40057              1.00022, 1.00054, 1.00001, 1.00065, 1.00026, 1.00001, 1.0001,
 40058              1.00001, 1.00052, 1, 1.0006, 1.00001, 0.99945, 0.99897, 0.99968,
 40059              0.99924, 1.00036, 0.99945, 0.99949, 1, 1.0006, 0.99897, 0.99918,
 40060              0.99968, 0.99911, 0.99924, 1, 0.99962, 1.01487, 1, 1.0005, 0.99973,
 40061              1.00012, 1.00043, 1, 0.99995, 0.99994, 1.00036, 0.99947, 1.00019,
 40062              1.00063, 1.00025, 0.99924, 1.00036, 0.99973, 1.00036, 1.00025,
 40063              1.00001, 1.00001, 1.00027, 1.0001, 1.00068, 1.00001, 1.0006, 1.0006,
 40064              1, 1.00008, 0.99957, 0.99972, 0.9994, 0.99954, 0.99975, 1.00051,
 40065              1.00001, 1.00019, 1.00001, 1.0001, 0.99986, 1.00001, 1.00001,
 40066              1.00038, 0.99954, 0.99954, 0.9994, 1.00066, 0.99999, 0.99977,
 40067              1.00022, 1.00054, 1.00001, 0.99977, 1.00026, 0.99975, 1.0001,
 40068              1.00001, 0.99993, 0.9995, 0.99955, 1.00016, 0.99978, 0.99974,
 40069              1.00019, 1.00022, 0.99955, 1.00053, 0.99973, 1.00089, 1.00005,
 40070              0.99967, 1.00048, 0.99973, 1.00002, 1.00034, 0.99973, 0.99973,
 40071              0.99964, 1.00006, 1.00066, 0.99947, 0.99973, 0.98894, 0.99973, 1,
 40072              0.44898, 1, 0.99946, 1, 1.00039, 1.00082, 0.99991, 0.99991, 0.99985,
 40073              1.00022, 1.00023, 1.00061, 1.00006, 0.99966, 0.99973, 0.99973,
 40074              0.99973, 1.00019, 1.0008, 1, 0.99924, 0.99924, 0.99924, 0.99983,
 40075              1.00044, 0.99973, 0.99964, 0.98332, 1, 0.99973, 1, 1, 0.99962,
 40076              0.99895, 1.00016, 0.99977, 1.00016, 0.99977, 1.00016, 0.99977,
 40077              1.00001, 1, 1, 1, 0.99973, 1, 1, 0.99955, 0.99924, 0.99924, 0.99924,
 40078              0.99924, 0.99998, 0.99998, 0.99998, 0.99973, 0.99973, 0.99972, 1, 1,
 40079              1.00267, 0.99999, 0.99998, 0.99998, 1, 0.99998, 1.66475, 1, 0.99973,
 40080              0.99973, 1.00023, 0.99973, 1.00423, 0.99925, 0.99999, 1, 0.99991,
 40081              0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1.00049, 1, 1.00245, 1,
 40082              1, 1, 1, 0.96329, 1, 1.20985, 1.39713, 1.00003, 0.8254, 1.00015, 1,
 40083              1.00035, 1.00027, 1.00031, 1.00031, 1.00003, 1.00031, 1.00031,
 40084              0.99999, 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144,
 40085              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40086              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40087              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40088              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40089              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40090              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579,
 40091              1.40579, 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026,
 40092              1.00026, 1.00026, 0.95317, 0.99999, 0.99999, 0.99999, 0.99999,
 40093              1.40483, 1, 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042,
 40094              0.9995, 1, 1, 1, 1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998,
 40095              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40096            ];
 40097            t.HelveticaItalicMetrics = { lineHeight: 1.35, lineGap: 0.2 };
 40098            t.HelveticaRegularFactors = [
 40099              0.76116, 1, 1, 1.0006, 1.0006, 1.00006, 0.99973, 0.99973, 0.99982,
 40100              1.00001, 1.00043, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006,
 40101              0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973,
 40102              0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1,
 40103              1.00003, 1.00003, 1.00003, 0.99973, 0.99987, 1.00001, 1.00001,
 40104              0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, 1,
 40105              1.00001, 0.99973, 0.99999, 0.99977, 1.00022, 1.00001, 1.00022,
 40106              0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001,
 40107              1.00001, 1.00026, 1.0006, 1.0006, 1.0006, 0.99949, 0.99973, 0.99998,
 40108              0.99973, 0.99973, 1, 0.99973, 0.99973, 1.0006, 0.99973, 0.99973,
 40109              0.99924, 0.99924, 1, 0.99924, 0.99999, 0.99973, 0.99973, 0.99973,
 40110              0.99973, 0.99998, 1, 1.0006, 0.99973, 1, 0.99977, 1, 1, 1, 1.00005,
 40111              1.0009, 1.00005, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973,
 40112              0.99973, 1.0009, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973,
 40113              1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1,
 40114              0.9998, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002,
 40115              1.00002, 1.00026, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001,
 40116              1.00001, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006,
 40117              1.0006, 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022,
 40118              1.00022, 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977,
 40119              0.99977, 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973,
 40120              0.99973, 0.99973, 0.99973, 0.99982, 1, 0.99973, 0.99973, 0.99973,
 40121              0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973,
 40122              0.99973, 0.99973, 0.99973, 0.99973, 1.06409, 1.00026, 0.99973,
 40123              0.99973, 0.99973, 0.99973, 1, 0.99973, 1, 1.00001, 0.99973, 1.00001,
 40124              0.99973, 1.00001, 0.99973, 0.99977, 1, 0.99977, 1, 0.99977, 1,
 40125              0.99977, 1, 0.99977, 1.04596, 0.99977, 0.99973, 1.00001, 0.99973,
 40126              1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001,
 40127              0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973,
 40128              1.00022, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.0006,
 40129              1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99924, 1.0006,
 40130              1.0006, 1.00019, 1.00034, 1, 0.99924, 1.00001, 1, 1, 0.99973,
 40131              0.99924, 0.99973, 0.99924, 0.99973, 1.02572, 0.99973, 1.00005,
 40132              0.99973, 0.99924, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977,
 40133              0.99973, 0.99999, 0.9998, 0.99973, 1.00022, 0.99973, 1.00022,
 40134              0.99973, 1.00022, 0.99973, 1, 1.00016, 0.99977, 0.99998, 0.99977,
 40135              0.99998, 0.99977, 0.99998, 1.00001, 1, 1.00001, 1, 1.00001, 1,
 40136              1.00001, 1, 1.00026, 1.0006, 1.00026, 0.84533, 1.00026, 1.0006,
 40137              0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977,
 40138              0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.00016, 0.99977,
 40139              1.00001, 1, 1.00001, 1.00026, 1, 1.00026, 1, 1.00026, 1, 0.99924,
 40140              0.99973, 1.00001, 0.99973, 1, 0.99982, 1.00022, 1.00026, 1.00001, 1,
 40141              1.00026, 1.0006, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998,
 40142              0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99928, 1,
 40143              0.99977, 1.00013, 1.00055, 0.99947, 0.99945, 0.99941, 0.99924,
 40144              1.00001, 1.00001, 1.0004, 0.91621, 1.00001, 1.00026, 0.99977,
 40145              1.00022, 1.0006, 1.00001, 1.00005, 0.99999, 0.99977, 1.00015,
 40146              1.00022, 0.99977, 1.00001, 0.99973, 1.00026, 1.00001, 1.00019,
 40147              1.00001, 0.99946, 1, 1.0006, 1.00001, 0.99978, 1.00045, 0.99973,
 40148              0.99924, 1.00023, 0.99978, 0.99966, 1, 1.00065, 1.00045, 1.00019,
 40149              0.99973, 0.99973, 0.99924, 1, 1, 0.96499, 1, 1.00055, 0.99973,
 40150              1.00008, 1.00027, 1, 0.9997, 0.99995, 1.00023, 0.99933, 1.00019,
 40151              1.00015, 1.00031, 0.99924, 1.00023, 0.99973, 1.00023, 1.00031,
 40152              1.00001, 0.99928, 1.00029, 1.00092, 1.00035, 1.00001, 1.0006,
 40153              1.0006, 1, 0.99988, 0.99975, 1, 1.00082, 0.99561, 0.9996, 1.00035,
 40154              1.00001, 0.99962, 1.00001, 1.00092, 0.99964, 1.00001, 0.99963,
 40155              0.99999, 1.00035, 1.00035, 1.00082, 0.99962, 0.99999, 0.99977,
 40156              1.00022, 1.00035, 1.00001, 0.99977, 1.00026, 0.9996, 0.99967,
 40157              1.00001, 1.00034, 1.00074, 1.00054, 1.00053, 1.00063, 0.99971,
 40158              0.99962, 1.00035, 0.99975, 0.99977, 0.99973, 1.00043, 0.99953,
 40159              1.0007, 0.99915, 0.99973, 1.00008, 0.99892, 1.00073, 1.00073,
 40160              1.00114, 0.99915, 1.00073, 0.99955, 0.99973, 1.00092, 0.99973, 1,
 40161              0.99998, 1, 1.0003, 1, 1.00043, 1.00001, 0.99969, 1.0003, 1,
 40162              1.00035, 1.00001, 0.9995, 1, 1.00092, 0.99973, 0.99973, 0.99973,
 40163              1.0007, 0.9995, 1, 0.99924, 1.0006, 0.99924, 0.99972, 1.00062,
 40164              0.99973, 1.00114, 1.00073, 1, 0.99955, 1, 1, 1.00047, 0.99968,
 40165              1.00016, 0.99977, 1.00016, 0.99977, 1.00016, 0.99977, 1.00001, 1, 1,
 40166              1, 0.99973, 1, 1, 0.99955, 0.99924, 0.99924, 0.99924, 0.99924,
 40167              0.99998, 0.99998, 0.99998, 0.99973, 0.99973, 0.99972, 1, 1, 1.00267,
 40168              0.99999, 0.99998, 0.99998, 1, 0.99998, 1.66475, 1, 0.99973, 0.99973,
 40169              1.00023, 0.99973, 0.99971, 0.99925, 1.00023, 1, 0.99991, 0.99984,
 40170              1.00002, 1.00002, 1.00002, 1.00002, 1, 1, 1, 1, 1, 1, 1, 0.96329, 1,
 40171              1.20985, 1.39713, 1.00003, 0.8254, 1.00015, 1, 1.00035, 1.00027,
 40172              1.00031, 1.00031, 0.99915, 1.00031, 1.00031, 0.99999, 1.00003,
 40173              0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144,
 40174              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40175              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40176              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40177              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40178              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40179              1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579, 1.36625,
 40180              0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026, 1.00026,
 40181              0.95317, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1, 0.99977,
 40182              1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1, 1, 1, 1,
 40183              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40184            ];
 40185            t.HelveticaRegularMetrics = { lineHeight: 1.2, lineGap: 0.2 };
 40186          },
 40187          (e, t) => {
 40188            Object.defineProperty(t, "__esModule", { value: !0 });
 40189            t.LiberationSansRegularWidths =
 40190              t.LiberationSansRegularMapping =
 40191              t.LiberationSansItalicWidths =
 40192              t.LiberationSansItalicMapping =
 40193              t.LiberationSansBoldWidths =
 40194              t.LiberationSansBoldMapping =
 40195              t.LiberationSansBoldItalicWidths =
 40196              t.LiberationSansBoldItalicMapping =
 40197                void 0;
 40198            t.LiberationSansBoldWidths = [
 40199              365, 0, 333, 278, 333, 474, 556, 556, 889, 722, 238, 333, 333, 389,
 40200              584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556,
 40201              556, 556, 333, 333, 584, 584, 584, 611, 975, 722, 722, 722, 722,
 40202              667, 611, 778, 722, 278, 556, 722, 611, 833, 722, 778, 667, 778,
 40203              722, 667, 611, 722, 667, 944, 667, 667, 611, 333, 278, 333, 584,
 40204              556, 333, 556, 611, 556, 611, 556, 333, 611, 611, 278, 278, 556,
 40205              278, 889, 611, 611, 611, 611, 389, 556, 333, 611, 556, 778, 556,
 40206              556, 500, 389, 280, 389, 584, 333, 556, 556, 556, 556, 280, 556,
 40207              333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576,
 40208              556, 278, 333, 333, 365, 556, 834, 834, 834, 611, 722, 722, 722,
 40209              722, 722, 722, 1e3, 722, 667, 667, 667, 667, 278, 278, 278, 278,
 40210              722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722,
 40211              667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 556, 556, 556,
 40212              556, 556, 278, 278, 278, 278, 611, 611, 611, 611, 611, 611, 611,
 40213              549, 611, 611, 611, 611, 611, 556, 611, 556, 722, 556, 722, 556,
 40214              722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 719, 722,
 40215              611, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 611,
 40216              778, 611, 778, 611, 778, 611, 722, 611, 722, 611, 278, 278, 278,
 40217              278, 278, 278, 278, 278, 278, 278, 785, 556, 556, 278, 722, 556,
 40218              556, 611, 278, 611, 278, 611, 385, 611, 479, 611, 278, 722, 611,
 40219              722, 611, 722, 611, 708, 723, 611, 778, 611, 778, 611, 778, 611,
 40220              1e3, 944, 722, 389, 722, 389, 722, 389, 667, 556, 667, 556, 667,
 40221              556, 667, 556, 611, 333, 611, 479, 611, 333, 722, 611, 722, 611,
 40222              722, 611, 722, 611, 722, 611, 722, 611, 944, 778, 667, 556, 667,
 40223              611, 500, 611, 500, 611, 500, 278, 556, 722, 556, 1e3, 889, 778,
 40224              611, 667, 556, 611, 333, 333, 333, 333, 333, 333, 333, 333, 333,
 40225              333, 333, 465, 722, 333, 853, 906, 474, 825, 927, 838, 278, 722,
 40226              722, 601, 719, 667, 611, 722, 778, 278, 722, 667, 833, 722, 644,
 40227              778, 722, 667, 600, 611, 667, 821, 667, 809, 802, 278, 667, 615,
 40228              451, 611, 278, 582, 615, 610, 556, 606, 475, 460, 611, 541, 278,
 40229              558, 556, 612, 556, 445, 611, 766, 619, 520, 684, 446, 582, 715,
 40230              576, 753, 845, 278, 582, 611, 582, 845, 667, 669, 885, 567, 711,
 40231              667, 278, 276, 556, 1094, 1062, 875, 610, 722, 622, 719, 722, 719,
 40232              722, 567, 712, 667, 904, 626, 719, 719, 610, 702, 833, 722, 778,
 40233              719, 667, 722, 611, 622, 854, 667, 730, 703, 1005, 1019, 870, 979,
 40234              719, 711, 1031, 719, 556, 618, 615, 417, 635, 556, 709, 497, 615,
 40235              615, 500, 635, 740, 604, 611, 604, 611, 556, 490, 556, 875, 556,
 40236              615, 581, 833, 844, 729, 854, 615, 552, 854, 583, 556, 556, 611,
 40237              417, 552, 556, 278, 281, 278, 969, 906, 611, 500, 615, 556, 604,
 40238              778, 611, 487, 447, 944, 778, 944, 778, 944, 778, 667, 556, 333,
 40239              333, 556, 1e3, 1e3, 552, 278, 278, 278, 278, 500, 500, 500, 556,
 40240              556, 350, 1e3, 1e3, 240, 479, 333, 333, 604, 333, 167, 396, 556,
 40241              556, 1094, 556, 885, 489, 1115, 1e3, 768, 600, 834, 834, 834, 834,
 40242              1e3, 500, 1e3, 500, 1e3, 500, 500, 494, 612, 823, 713, 584, 549,
 40243              713, 979, 722, 274, 549, 549, 583, 549, 549, 604, 584, 604, 604,
 40244              708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40245              708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40246              708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40247              708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354,
 40248              1e3, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052,
 40249              917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 611, 611, 333,
 40250              333, 333, 333, 333, 333, 333, 333, 222, 222, 333, 333, 333, 333,
 40251              333, 333, 333, 333,
 40252            ];
 40253            t.LiberationSansBoldMapping = [
 40254              -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
 40255              46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
 40256              63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
 40257              80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
 40258              97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
 40259              111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
 40260              124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
 40261              171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
 40262              185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
 40263              198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
 40264              211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
 40265              224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
 40266              237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
 40267              250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
 40268              263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
 40269              276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
 40270              289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
 40271              302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
 40272              315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
 40273              328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
 40274              341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
 40275              354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
 40276              367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
 40277              380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537,
 40278              538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901,
 40279              902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916,
 40280              917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929,
 40281              931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943,
 40282              944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956,
 40283              957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969,
 40284              970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030,
 40285              1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041,
 40286              1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052,
 40287              1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063,
 40288              1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074,
 40289              1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085,
 40290              1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096,
 40291              1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107,
 40292              1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118,
 40293              1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813,
 40294              7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218,
 40295              8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243,
 40296              8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453,
 40297              8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593,
 40298              8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730,
 40299              8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976,
 40300              8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516,
 40301              9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560,
 40302              9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571,
 40303              9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604,
 40304              9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644,
 40305              9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786,
 40306              9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836,
 40307              61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
 40308              -1, -1, -1, -1, -1,
 40309            ];
 40310            t.LiberationSansBoldItalicWidths = [
 40311              365, 0, 333, 278, 333, 474, 556, 556, 889, 722, 238, 333, 333, 389,
 40312              584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556,
 40313              556, 556, 333, 333, 584, 584, 584, 611, 975, 722, 722, 722, 722,
 40314              667, 611, 778, 722, 278, 556, 722, 611, 833, 722, 778, 667, 778,
 40315              722, 667, 611, 722, 667, 944, 667, 667, 611, 333, 278, 333, 584,
 40316              556, 333, 556, 611, 556, 611, 556, 333, 611, 611, 278, 278, 556,
 40317              278, 889, 611, 611, 611, 611, 389, 556, 333, 611, 556, 778, 556,
 40318              556, 500, 389, 280, 389, 584, 333, 556, 556, 556, 556, 280, 556,
 40319              333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576,
 40320              556, 278, 333, 333, 365, 556, 834, 834, 834, 611, 722, 722, 722,
 40321              722, 722, 722, 1e3, 722, 667, 667, 667, 667, 278, 278, 278, 278,
 40322              722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722,
 40323              667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 556, 556, 556,
 40324              556, 556, 278, 278, 278, 278, 611, 611, 611, 611, 611, 611, 611,
 40325              549, 611, 611, 611, 611, 611, 556, 611, 556, 722, 556, 722, 556,
 40326              722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 740, 722,
 40327              611, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 611,
 40328              778, 611, 778, 611, 778, 611, 722, 611, 722, 611, 278, 278, 278,
 40329              278, 278, 278, 278, 278, 278, 278, 782, 556, 556, 278, 722, 556,
 40330              556, 611, 278, 611, 278, 611, 396, 611, 479, 611, 278, 722, 611,
 40331              722, 611, 722, 611, 708, 723, 611, 778, 611, 778, 611, 778, 611,
 40332              1e3, 944, 722, 389, 722, 389, 722, 389, 667, 556, 667, 556, 667,
 40333              556, 667, 556, 611, 333, 611, 479, 611, 333, 722, 611, 722, 611,
 40334              722, 611, 722, 611, 722, 611, 722, 611, 944, 778, 667, 556, 667,
 40335              611, 500, 611, 500, 611, 500, 278, 556, 722, 556, 1e3, 889, 778,
 40336              611, 667, 556, 611, 333, 333, 333, 333, 333, 333, 333, 333, 333,
 40337              333, 333, 333, 722, 333, 854, 906, 473, 844, 930, 847, 278, 722,
 40338              722, 610, 671, 667, 611, 722, 778, 278, 722, 667, 833, 722, 657,
 40339              778, 718, 667, 590, 611, 667, 822, 667, 829, 781, 278, 667, 620,
 40340              479, 611, 278, 591, 620, 621, 556, 610, 479, 492, 611, 558, 278,
 40341              566, 556, 603, 556, 450, 611, 712, 605, 532, 664, 409, 591, 704,
 40342              578, 773, 834, 278, 591, 611, 591, 834, 667, 667, 886, 614, 719,
 40343              667, 278, 278, 556, 1094, 1042, 854, 622, 719, 677, 719, 722, 708,
 40344              722, 614, 722, 667, 927, 643, 719, 719, 615, 687, 833, 722, 778,
 40345              719, 667, 722, 611, 677, 781, 667, 729, 708, 979, 989, 854, 1e3,
 40346              708, 719, 1042, 729, 556, 619, 604, 534, 618, 556, 736, 510, 611,
 40347              611, 507, 622, 740, 604, 611, 611, 611, 556, 889, 556, 885, 556,
 40348              646, 583, 889, 935, 707, 854, 594, 552, 865, 589, 556, 556, 611,
 40349              469, 563, 556, 278, 278, 278, 969, 906, 611, 507, 619, 556, 611,
 40350              778, 611, 575, 467, 944, 778, 944, 778, 944, 778, 667, 556, 333,
 40351              333, 556, 1e3, 1e3, 552, 278, 278, 278, 278, 500, 500, 500, 556,
 40352              556, 350, 1e3, 1e3, 240, 479, 333, 333, 604, 333, 167, 396, 556,
 40353              556, 1104, 556, 885, 516, 1146, 1e3, 768, 600, 834, 834, 834, 834,
 40354              999, 500, 1e3, 500, 1e3, 500, 500, 494, 612, 823, 713, 584, 549,
 40355              713, 979, 722, 274, 549, 549, 583, 549, 549, 604, 584, 604, 604,
 40356              708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40357              708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40358              708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40359              708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354,
 40360              1e3, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052,
 40361              917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 611, 611, 333,
 40362              333, 333, 333, 333, 333, 333, 333, 222, 222, 333, 333, 333, 333,
 40363              333, 333, 333, 333,
 40364            ];
 40365            t.LiberationSansBoldItalicMapping = [
 40366              -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
 40367              46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
 40368              63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
 40369              80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
 40370              97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
 40371              111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
 40372              124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
 40373              171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
 40374              185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
 40375              198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
 40376              211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
 40377              224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
 40378              237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
 40379              250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
 40380              263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
 40381              276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
 40382              289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
 40383              302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
 40384              315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
 40385              328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
 40386              341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
 40387              354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
 40388              367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
 40389              380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537,
 40390              538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901,
 40391              902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916,
 40392              917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929,
 40393              931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943,
 40394              944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956,
 40395              957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969,
 40396              970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030,
 40397              1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041,
 40398              1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052,
 40399              1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063,
 40400              1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074,
 40401              1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085,
 40402              1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096,
 40403              1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107,
 40404              1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118,
 40405              1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813,
 40406              7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218,
 40407              8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243,
 40408              8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453,
 40409              8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593,
 40410              8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730,
 40411              8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976,
 40412              8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516,
 40413              9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560,
 40414              9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571,
 40415              9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604,
 40416              9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644,
 40417              9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786,
 40418              9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836,
 40419              61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
 40420              -1, -1, -1, -1, -1,
 40421            ];
 40422            t.LiberationSansItalicWidths = [
 40423              365, 0, 333, 278, 278, 355, 556, 556, 889, 667, 191, 333, 333, 389,
 40424              584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556,
 40425              556, 556, 278, 278, 584, 584, 584, 556, 1015, 667, 667, 722, 722,
 40426              667, 611, 778, 722, 278, 500, 667, 556, 833, 722, 778, 667, 778,
 40427              722, 667, 611, 722, 667, 944, 667, 667, 611, 278, 278, 278, 469,
 40428              556, 333, 556, 556, 500, 556, 556, 278, 556, 556, 222, 222, 500,
 40429              222, 833, 556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500,
 40430              500, 500, 334, 260, 334, 584, 333, 556, 556, 556, 556, 260, 556,
 40431              333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576,
 40432              537, 278, 333, 333, 365, 556, 834, 834, 834, 611, 667, 667, 667,
 40433              667, 667, 667, 1e3, 722, 667, 667, 667, 667, 278, 278, 278, 278,
 40434              722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722,
 40435              667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 500, 556, 556,
 40436              556, 556, 278, 278, 278, 278, 556, 556, 556, 556, 556, 556, 556,
 40437              549, 611, 556, 556, 556, 556, 500, 556, 500, 667, 556, 667, 556,
 40438              667, 556, 722, 500, 722, 500, 722, 500, 722, 500, 722, 625, 722,
 40439              556, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 556,
 40440              778, 556, 778, 556, 778, 556, 722, 556, 722, 556, 278, 278, 278,
 40441              278, 278, 278, 278, 222, 278, 278, 733, 444, 500, 222, 667, 500,
 40442              500, 556, 222, 556, 222, 556, 281, 556, 400, 556, 222, 722, 556,
 40443              722, 556, 722, 556, 615, 723, 556, 778, 556, 778, 556, 778, 556,
 40444              1e3, 944, 722, 333, 722, 333, 722, 333, 667, 500, 667, 500, 667,
 40445              500, 667, 500, 611, 278, 611, 354, 611, 278, 722, 556, 722, 556,
 40446              722, 556, 722, 556, 722, 556, 722, 556, 944, 722, 667, 500, 667,
 40447              611, 500, 611, 500, 611, 500, 222, 556, 667, 556, 1e3, 889, 778,
 40448              611, 667, 500, 611, 278, 333, 333, 333, 333, 333, 333, 333, 333,
 40449              333, 333, 333, 667, 278, 789, 846, 389, 794, 865, 775, 222, 667,
 40450              667, 570, 671, 667, 611, 722, 778, 278, 667, 667, 833, 722, 648,
 40451              778, 725, 667, 600, 611, 667, 837, 667, 831, 761, 278, 667, 570,
 40452              439, 555, 222, 550, 570, 571, 500, 556, 439, 463, 555, 542, 222,
 40453              500, 492, 548, 500, 447, 556, 670, 573, 486, 603, 374, 550, 652,
 40454              546, 728, 779, 222, 550, 556, 550, 779, 667, 667, 843, 544, 708,
 40455              667, 278, 278, 500, 1066, 982, 844, 589, 715, 639, 724, 667, 651,
 40456              667, 544, 704, 667, 917, 614, 715, 715, 589, 686, 833, 722, 778,
 40457              725, 667, 722, 611, 639, 795, 667, 727, 673, 920, 923, 805, 886,
 40458              651, 694, 1022, 682, 556, 562, 522, 493, 553, 556, 688, 465, 556,
 40459              556, 472, 564, 686, 550, 556, 556, 556, 500, 833, 500, 835, 500,
 40460              572, 518, 830, 851, 621, 736, 526, 492, 752, 534, 556, 556, 556,
 40461              378, 496, 500, 222, 222, 222, 910, 828, 556, 472, 565, 500, 556,
 40462              778, 556, 492, 339, 944, 722, 944, 722, 944, 722, 667, 500, 333,
 40463              333, 556, 1e3, 1e3, 552, 222, 222, 222, 222, 333, 333, 333, 556,
 40464              556, 350, 1e3, 1e3, 188, 354, 333, 333, 500, 333, 167, 365, 556,
 40465              556, 1094, 556, 885, 323, 1083, 1e3, 768, 600, 834, 834, 834, 834,
 40466              1e3, 500, 998, 500, 1e3, 500, 500, 494, 612, 823, 713, 584, 549,
 40467              713, 979, 719, 274, 549, 549, 584, 549, 549, 604, 584, 604, 604,
 40468              708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40469              708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40470              708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40471              708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354,
 40472              1e3, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052,
 40473              917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 500, 500, 333,
 40474              333, 333, 333, 333, 333, 333, 333, 222, 222, 294, 294, 324, 324,
 40475              316, 328, 398, 285,
 40476            ];
 40477            t.LiberationSansItalicMapping = [
 40478              -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
 40479              46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
 40480              63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
 40481              80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
 40482              97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
 40483              111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
 40484              124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
 40485              171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
 40486              185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
 40487              198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
 40488              211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
 40489              224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
 40490              237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
 40491              250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
 40492              263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
 40493              276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
 40494              289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
 40495              302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
 40496              315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
 40497              328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
 40498              341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
 40499              354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
 40500              367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
 40501              380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537,
 40502              538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901,
 40503              902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916,
 40504              917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929,
 40505              931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943,
 40506              944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956,
 40507              957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969,
 40508              970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030,
 40509              1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041,
 40510              1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052,
 40511              1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063,
 40512              1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074,
 40513              1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085,
 40514              1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096,
 40515              1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107,
 40516              1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118,
 40517              1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813,
 40518              7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218,
 40519              8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243,
 40520              8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453,
 40521              8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593,
 40522              8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730,
 40523              8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976,
 40524              8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516,
 40525              9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560,
 40526              9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571,
 40527              9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604,
 40528              9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644,
 40529              9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786,
 40530              9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836,
 40531              61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
 40532              -1, -1, -1, -1, -1,
 40533            ];
 40534            t.LiberationSansRegularWidths = [
 40535              365, 0, 333, 278, 278, 355, 556, 556, 889, 667, 191, 333, 333, 389,
 40536              584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556,
 40537              556, 556, 278, 278, 584, 584, 584, 556, 1015, 667, 667, 722, 722,
 40538              667, 611, 778, 722, 278, 500, 667, 556, 833, 722, 778, 667, 778,
 40539              722, 667, 611, 722, 667, 944, 667, 667, 611, 278, 278, 278, 469,
 40540              556, 333, 556, 556, 500, 556, 556, 278, 556, 556, 222, 222, 500,
 40541              222, 833, 556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500,
 40542              500, 500, 334, 260, 334, 584, 333, 556, 556, 556, 556, 260, 556,
 40543              333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576,
 40544              537, 278, 333, 333, 365, 556, 834, 834, 834, 611, 667, 667, 667,
 40545              667, 667, 667, 1e3, 722, 667, 667, 667, 667, 278, 278, 278, 278,
 40546              722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722,
 40547              667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 500, 556, 556,
 40548              556, 556, 278, 278, 278, 278, 556, 556, 556, 556, 556, 556, 556,
 40549              549, 611, 556, 556, 556, 556, 500, 556, 500, 667, 556, 667, 556,
 40550              667, 556, 722, 500, 722, 500, 722, 500, 722, 500, 722, 615, 722,
 40551              556, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 556,
 40552              778, 556, 778, 556, 778, 556, 722, 556, 722, 556, 278, 278, 278,
 40553              278, 278, 278, 278, 222, 278, 278, 735, 444, 500, 222, 667, 500,
 40554              500, 556, 222, 556, 222, 556, 292, 556, 334, 556, 222, 722, 556,
 40555              722, 556, 722, 556, 604, 723, 556, 778, 556, 778, 556, 778, 556,
 40556              1e3, 944, 722, 333, 722, 333, 722, 333, 667, 500, 667, 500, 667,
 40557              500, 667, 500, 611, 278, 611, 375, 611, 278, 722, 556, 722, 556,
 40558              722, 556, 722, 556, 722, 556, 722, 556, 944, 722, 667, 500, 667,
 40559              611, 500, 611, 500, 611, 500, 222, 556, 667, 556, 1e3, 889, 778,
 40560              611, 667, 500, 611, 278, 333, 333, 333, 333, 333, 333, 333, 333,
 40561              333, 333, 333, 667, 278, 784, 838, 384, 774, 855, 752, 222, 667,
 40562              667, 551, 668, 667, 611, 722, 778, 278, 667, 668, 833, 722, 650,
 40563              778, 722, 667, 618, 611, 667, 798, 667, 835, 748, 278, 667, 578,
 40564              446, 556, 222, 547, 578, 575, 500, 557, 446, 441, 556, 556, 222,
 40565              500, 500, 576, 500, 448, 556, 690, 569, 482, 617, 395, 547, 648,
 40566              525, 713, 781, 222, 547, 556, 547, 781, 667, 667, 865, 542, 719,
 40567              667, 278, 278, 500, 1057, 1010, 854, 583, 722, 635, 719, 667, 656,
 40568              667, 542, 677, 667, 923, 604, 719, 719, 583, 656, 833, 722, 778,
 40569              719, 667, 722, 611, 635, 760, 667, 740, 667, 917, 938, 792, 885,
 40570              656, 719, 1010, 722, 556, 573, 531, 365, 583, 556, 669, 458, 559,
 40571              559, 438, 583, 688, 552, 556, 542, 556, 500, 458, 500, 823, 500,
 40572              573, 521, 802, 823, 625, 719, 521, 510, 750, 542, 556, 556, 556,
 40573              365, 510, 500, 222, 278, 222, 906, 812, 556, 438, 559, 500, 552,
 40574              778, 556, 489, 411, 944, 722, 944, 722, 944, 722, 667, 500, 333,
 40575              333, 556, 1e3, 1e3, 552, 222, 222, 222, 222, 333, 333, 333, 556,
 40576              556, 350, 1e3, 1e3, 188, 354, 333, 333, 500, 333, 167, 365, 556,
 40577              556, 1094, 556, 885, 323, 1073, 1e3, 768, 600, 834, 834, 834, 834,
 40578              1e3, 500, 1e3, 500, 1e3, 500, 500, 494, 612, 823, 713, 584, 549,
 40579              713, 979, 719, 274, 549, 549, 583, 549, 549, 604, 584, 604, 604,
 40580              708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40581              708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40582              708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40583              708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354,
 40584              1e3, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052,
 40585              917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 500, 500, 333,
 40586              333, 333, 333, 333, 333, 333, 333, 222, 222, 294, 294, 324, 324,
 40587              316, 328, 398, 285,
 40588            ];
 40589            t.LiberationSansRegularMapping = [
 40590              -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
 40591              46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
 40592              63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
 40593              80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
 40594              97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
 40595              111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
 40596              124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
 40597              171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
 40598              185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
 40599              198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
 40600              211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
 40601              224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
 40602              237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
 40603              250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
 40604              263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
 40605              276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
 40606              289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
 40607              302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
 40608              315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
 40609              328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
 40610              341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
 40611              354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
 40612              367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
 40613              380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537,
 40614              538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901,
 40615              902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916,
 40616              917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929,
 40617              931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943,
 40618              944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956,
 40619              957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969,
 40620              970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030,
 40621              1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041,
 40622              1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052,
 40623              1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063,
 40624              1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074,
 40625              1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085,
 40626              1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096,
 40627              1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107,
 40628              1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118,
 40629              1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813,
 40630              7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218,
 40631              8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243,
 40632              8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453,
 40633              8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593,
 40634              8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730,
 40635              8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976,
 40636              8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516,
 40637              9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560,
 40638              9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571,
 40639              9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604,
 40640              9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644,
 40641              9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786,
 40642              9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836,
 40643              61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
 40644              -1, -1, -1, -1, -1,
 40645            ];
 40646          },
 40647          (e, t) => {
 40648            Object.defineProperty(t, "__esModule", { value: !0 });
 40649            t.MyriadProRegularMetrics =
 40650              t.MyriadProRegularFactors =
 40651              t.MyriadProItalicMetrics =
 40652              t.MyriadProItalicFactors =
 40653              t.MyriadProBoldMetrics =
 40654              t.MyriadProBoldItalicMetrics =
 40655              t.MyriadProBoldItalicFactors =
 40656              t.MyriadProBoldFactors =
 40657                void 0;
 40658            t.MyriadProBoldFactors = [
 40659              1.36898, 1, 1, 0.72706, 0.80479, 0.83734, 0.98894, 0.99793, 0.9897,
 40660              0.93884, 0.86209, 0.94292, 0.94292, 1.16661, 1.02058, 0.93582,
 40661              0.96694, 0.93582, 1.19137, 0.99793, 0.99793, 0.99793, 0.99793,
 40662              0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.78076,
 40663              0.78076, 1.02058, 1.02058, 1.02058, 0.72851, 0.78966, 0.90838,
 40664              0.83637, 0.82391, 0.96376, 0.80061, 0.86275, 0.8768, 0.95407,
 40665              1.0258, 0.73901, 0.85022, 0.83655, 1.0156, 0.95546, 0.92179,
 40666              0.87107, 0.92179, 0.82114, 0.8096, 0.89713, 0.94438, 0.95353,
 40667              0.94083, 0.91905, 0.90406, 0.9446, 0.94292, 1.18777, 0.94292,
 40668              1.02058, 0.89903, 0.90088, 0.94938, 0.97898, 0.81093, 0.97571,
 40669              0.94938, 1.024, 0.9577, 0.95933, 0.98621, 1.0474, 0.97455, 0.98981,
 40670              0.9672, 0.95933, 0.9446, 0.97898, 0.97407, 0.97646, 0.78036,
 40671              1.10208, 0.95442, 0.95298, 0.97579, 0.9332, 0.94039, 0.938, 0.80687,
 40672              1.01149, 0.80687, 1.02058, 0.80479, 0.99793, 0.99793, 0.99793,
 40673              0.99793, 1.01149, 1.00872, 0.90088, 0.91882, 1.0213, 0.8361,
 40674              1.02058, 0.62295, 0.54324, 0.89022, 1.08595, 1, 1, 0.90088, 1,
 40675              0.97455, 0.93582, 0.90088, 1, 1.05686, 0.8361, 0.99642, 0.99642,
 40676              0.99642, 0.72851, 0.90838, 0.90838, 0.90838, 0.90838, 0.90838,
 40677              0.90838, 0.868, 0.82391, 0.80061, 0.80061, 0.80061, 0.80061, 1.0258,
 40678              1.0258, 1.0258, 1.0258, 0.97484, 0.95546, 0.92179, 0.92179, 0.92179,
 40679              0.92179, 0.92179, 1.02058, 0.92179, 0.94438, 0.94438, 0.94438,
 40680              0.94438, 0.90406, 0.86958, 0.98225, 0.94938, 0.94938, 0.94938,
 40681              0.94938, 0.94938, 0.94938, 0.9031, 0.81093, 0.94938, 0.94938,
 40682              0.94938, 0.94938, 0.98621, 0.98621, 0.98621, 0.98621, 0.93969,
 40683              0.95933, 0.9446, 0.9446, 0.9446, 0.9446, 0.9446, 1.08595, 0.9446,
 40684              0.95442, 0.95442, 0.95442, 0.95442, 0.94039, 0.97898, 0.94039,
 40685              0.90838, 0.94938, 0.90838, 0.94938, 0.90838, 0.94938, 0.82391,
 40686              0.81093, 0.82391, 0.81093, 0.82391, 0.81093, 0.82391, 0.81093,
 40687              0.96376, 0.84313, 0.97484, 0.97571, 0.80061, 0.94938, 0.80061,
 40688              0.94938, 0.80061, 0.94938, 0.80061, 0.94938, 0.80061, 0.94938,
 40689              0.8768, 0.9577, 0.8768, 0.9577, 0.8768, 0.9577, 1, 1, 0.95407,
 40690              0.95933, 0.97069, 0.95933, 1.0258, 0.98621, 1.0258, 0.98621, 1.0258,
 40691              0.98621, 1.0258, 0.98621, 1.0258, 0.98621, 0.887, 1.01591, 0.73901,
 40692              1.0474, 1, 1, 0.97455, 0.83655, 0.98981, 1, 1, 0.83655, 0.73977,
 40693              0.83655, 0.73903, 0.84638, 1.033, 0.95546, 0.95933, 1, 1, 0.95546,
 40694              0.95933, 0.8271, 0.95417, 0.95933, 0.92179, 0.9446, 0.92179, 0.9446,
 40695              0.92179, 0.9446, 0.936, 0.91964, 0.82114, 0.97646, 1, 1, 0.82114,
 40696              0.97646, 0.8096, 0.78036, 0.8096, 0.78036, 1, 1, 0.8096, 0.78036, 1,
 40697              1, 0.89713, 0.77452, 0.89713, 1.10208, 0.94438, 0.95442, 0.94438,
 40698              0.95442, 0.94438, 0.95442, 0.94438, 0.95442, 0.94438, 0.95442,
 40699              0.94438, 0.95442, 0.94083, 0.97579, 0.90406, 0.94039, 0.90406,
 40700              0.9446, 0.938, 0.9446, 0.938, 0.9446, 0.938, 1, 0.99793, 0.90838,
 40701              0.94938, 0.868, 0.9031, 0.92179, 0.9446, 1, 1, 0.89713, 1.10208,
 40702              0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088,
 40703              0.90088, 0.90088, 0.90989, 0.9358, 0.91945, 0.83181, 0.75261,
 40704              0.87992, 0.82976, 0.96034, 0.83689, 0.97268, 1.0078, 0.90838,
 40705              0.83637, 0.8019, 0.90157, 0.80061, 0.9446, 0.95407, 0.92436, 1.0258,
 40706              0.85022, 0.97153, 1.0156, 0.95546, 0.89192, 0.92179, 0.92361,
 40707              0.87107, 0.96318, 0.89713, 0.93704, 0.95638, 0.91905, 0.91709,
 40708              0.92796, 1.0258, 0.93704, 0.94836, 1.0373, 0.95933, 1.0078, 0.95871,
 40709              0.94836, 0.96174, 0.92601, 0.9498, 0.98607, 0.95776, 0.95933,
 40710              1.05453, 1.0078, 0.98275, 0.9314, 0.95617, 0.91701, 1.05993, 0.9446,
 40711              0.78367, 0.9553, 1, 0.86832, 1.0128, 0.95871, 0.99394, 0.87548,
 40712              0.96361, 0.86774, 1.0078, 0.95871, 0.9446, 0.95871, 0.86774, 1, 1,
 40713              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40714              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40715              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40716              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40717              1, 1, 1, 1, 1, 1, 0.94083, 0.97579, 0.94083, 0.97579, 0.94083,
 40718              0.97579, 0.90406, 0.94039, 0.96694, 1, 0.89903, 1, 1, 1, 0.93582,
 40719              0.93582, 0.93582, 1, 0.908, 0.908, 0.918, 0.94219, 0.94219, 0.96544,
 40720              1, 1.285, 1, 1, 0.81079, 0.81079, 1, 1, 0.74854, 1, 1, 1, 1,
 40721              0.99793, 1, 1, 1, 0.65, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40722              1.17173, 1, 0.80535, 0.76169, 1.02058, 1.0732, 1.05486, 1, 1,
 40723              1.30692, 1.08595, 1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1,
 40724              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40725              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40726              1, 1, 1, 1, 1, 1, 1, 1, 1.16161, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40727              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40728              1, 1,
 40729            ];
 40730            t.MyriadProBoldMetrics = { lineHeight: 1.2, lineGap: 0.2 };
 40731            t.MyriadProBoldItalicFactors = [
 40732              1.36898, 1, 1, 0.66227, 0.80779, 0.81625, 0.97276, 0.97276, 0.97733,
 40733              0.92222, 0.83266, 0.94292, 0.94292, 1.16148, 1.02058, 0.93582,
 40734              0.96694, 0.93582, 1.17337, 0.97276, 0.97276, 0.97276, 0.97276,
 40735              0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.78076,
 40736              0.78076, 1.02058, 1.02058, 1.02058, 0.71541, 0.76813, 0.85576,
 40737              0.80591, 0.80729, 0.94299, 0.77512, 0.83655, 0.86523, 0.92222,
 40738              0.98621, 0.71743, 0.81698, 0.79726, 0.98558, 0.92222, 0.90637,
 40739              0.83809, 0.90637, 0.80729, 0.76463, 0.86275, 0.90699, 0.91605,
 40740              0.9154, 0.85308, 0.85458, 0.90531, 0.94292, 1.21296, 0.94292,
 40741              1.02058, 0.89903, 1.18616, 0.99613, 0.91677, 0.78216, 0.91677,
 40742              0.90083, 0.98796, 0.9135, 0.92168, 0.95381, 0.98981, 0.95298,
 40743              0.95381, 0.93459, 0.92168, 0.91513, 0.92004, 0.91677, 0.95077,
 40744              0.748, 1.04502, 0.91677, 0.92061, 0.94236, 0.89544, 0.89364, 0.9,
 40745              0.80687, 0.8578, 0.80687, 1.02058, 0.80779, 0.97276, 0.97276,
 40746              0.97276, 0.97276, 0.8578, 0.99973, 1.18616, 0.91339, 1.08074,
 40747              0.82891, 1.02058, 0.55509, 0.71526, 0.89022, 1.08595, 1, 1, 1.18616,
 40748              1, 0.96736, 0.93582, 1.18616, 1, 1.04864, 0.82711, 0.99043, 0.99043,
 40749              0.99043, 0.71541, 0.85576, 0.85576, 0.85576, 0.85576, 0.85576,
 40750              0.85576, 0.845, 0.80729, 0.77512, 0.77512, 0.77512, 0.77512,
 40751              0.98621, 0.98621, 0.98621, 0.98621, 0.95961, 0.92222, 0.90637,
 40752              0.90637, 0.90637, 0.90637, 0.90637, 1.02058, 0.90251, 0.90699,
 40753              0.90699, 0.90699, 0.90699, 0.85458, 0.83659, 0.94951, 0.99613,
 40754              0.99613, 0.99613, 0.99613, 0.99613, 0.99613, 0.85811, 0.78216,
 40755              0.90083, 0.90083, 0.90083, 0.90083, 0.95381, 0.95381, 0.95381,
 40756              0.95381, 0.9135, 0.92168, 0.91513, 0.91513, 0.91513, 0.91513,
 40757              0.91513, 1.08595, 0.91677, 0.91677, 0.91677, 0.91677, 0.91677,
 40758              0.89364, 0.92332, 0.89364, 0.85576, 0.99613, 0.85576, 0.99613,
 40759              0.85576, 0.99613, 0.80729, 0.78216, 0.80729, 0.78216, 0.80729,
 40760              0.78216, 0.80729, 0.78216, 0.94299, 0.76783, 0.95961, 0.91677,
 40761              0.77512, 0.90083, 0.77512, 0.90083, 0.77512, 0.90083, 0.77512,
 40762              0.90083, 0.77512, 0.90083, 0.86523, 0.9135, 0.86523, 0.9135,
 40763              0.86523, 0.9135, 1, 1, 0.92222, 0.92168, 0.92222, 0.92168, 0.98621,
 40764              0.95381, 0.98621, 0.95381, 0.98621, 0.95381, 0.98621, 0.95381,
 40765              0.98621, 0.95381, 0.86036, 0.97096, 0.71743, 0.98981, 1, 1, 0.95298,
 40766              0.79726, 0.95381, 1, 1, 0.79726, 0.6894, 0.79726, 0.74321, 0.81691,
 40767              1.0006, 0.92222, 0.92168, 1, 1, 0.92222, 0.92168, 0.79464, 0.92098,
 40768              0.92168, 0.90637, 0.91513, 0.90637, 0.91513, 0.90637, 0.91513,
 40769              0.909, 0.87514, 0.80729, 0.95077, 1, 1, 0.80729, 0.95077, 0.76463,
 40770              0.748, 0.76463, 0.748, 1, 1, 0.76463, 0.748, 1, 1, 0.86275, 0.72651,
 40771              0.86275, 1.04502, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699,
 40772              0.91677, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699, 0.91677,
 40773              0.9154, 0.94236, 0.85458, 0.89364, 0.85458, 0.90531, 0.9, 0.90531,
 40774              0.9, 0.90531, 0.9, 1, 0.97276, 0.85576, 0.99613, 0.845, 0.85811,
 40775              0.90251, 0.91677, 1, 1, 0.86275, 1.04502, 1.18616, 1.18616, 1.18616,
 40776              1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.00899,
 40777              1.30628, 0.85576, 0.80178, 0.66862, 0.7927, 0.69323, 0.88127,
 40778              0.72459, 0.89711, 0.95381, 0.85576, 0.80591, 0.7805, 0.94729,
 40779              0.77512, 0.90531, 0.92222, 0.90637, 0.98621, 0.81698, 0.92655,
 40780              0.98558, 0.92222, 0.85359, 0.90637, 0.90976, 0.83809, 0.94523,
 40781              0.86275, 0.83509, 0.93157, 0.85308, 0.83392, 0.92346, 0.98621,
 40782              0.83509, 0.92886, 0.91324, 0.92168, 0.95381, 0.90646, 0.92886,
 40783              0.90557, 0.86847, 0.90276, 0.91324, 0.86842, 0.92168, 0.99531,
 40784              0.95381, 0.9224, 0.85408, 0.92699, 0.86847, 1.0051, 0.91513,
 40785              0.80487, 0.93481, 1, 0.88159, 1.05214, 0.90646, 0.97355, 0.81539,
 40786              0.89398, 0.85923, 0.95381, 0.90646, 0.91513, 0.90646, 0.85923, 1, 1,
 40787              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40788              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40789              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40790              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40791              1, 1, 1, 1, 1, 1, 0.9154, 0.94236, 0.9154, 0.94236, 0.9154, 0.94236,
 40792              0.85458, 0.89364, 0.96694, 1, 0.89903, 1, 1, 1, 0.91782, 0.91782,
 40793              0.91782, 1, 0.896, 0.896, 0.896, 0.9332, 0.9332, 0.95973, 1, 1.26,
 40794              1, 1, 0.80479, 0.80178, 1, 1, 0.85633, 1, 1, 1, 1, 0.97276, 1, 1, 1,
 40795              0.698, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.14542, 1,
 40796              0.79199, 0.78694, 1.02058, 1.03493, 1.05486, 1, 1, 1.23026, 1.08595,
 40797              1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40798              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40799              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40800              1, 1, 1.20006, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40801              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40802            ];
 40803            t.MyriadProBoldItalicMetrics = { lineHeight: 1.2, lineGap: 0.2 };
 40804            t.MyriadProItalicFactors = [
 40805              1.36898, 1, 1, 0.65507, 0.84943, 0.85639, 0.88465, 0.88465, 0.86936,
 40806              0.88307, 0.86948, 0.85283, 0.85283, 1.06383, 1.02058, 0.75945,
 40807              0.9219, 0.75945, 1.17337, 0.88465, 0.88465, 0.88465, 0.88465,
 40808              0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.75945,
 40809              0.75945, 1.02058, 1.02058, 1.02058, 0.69046, 0.70926, 0.85158,
 40810              0.77812, 0.76852, 0.89591, 0.70466, 0.76125, 0.80094, 0.86822,
 40811              0.83864, 0.728, 0.77212, 0.79475, 0.93637, 0.87514, 0.8588, 0.76013,
 40812              0.8588, 0.72421, 0.69866, 0.77598, 0.85991, 0.80811, 0.87832,
 40813              0.78112, 0.77512, 0.8562, 1.0222, 1.18417, 1.0222, 1.27014, 0.89903,
 40814              1.15012, 0.93859, 0.94399, 0.846, 0.94399, 0.81453, 1.0186, 0.94219,
 40815              0.96017, 1.03075, 1.02175, 0.912, 1.03075, 0.96998, 0.96017,
 40816              0.93859, 0.94399, 0.94399, 0.95493, 0.746, 1.12658, 0.94578, 0.91,
 40817              0.979, 0.882, 0.882, 0.83, 0.85034, 0.83537, 0.85034, 1.02058,
 40818              0.70869, 0.88465, 0.88465, 0.88465, 0.88465, 0.83537, 0.90083,
 40819              1.15012, 0.9161, 0.94565, 0.73541, 1.02058, 0.53609, 0.69353,
 40820              0.79519, 1.08595, 1, 1, 1.15012, 1, 0.91974, 0.75945, 1.15012, 1,
 40821              0.9446, 0.73361, 0.9005, 0.9005, 0.9005, 0.62864, 0.85158, 0.85158,
 40822              0.85158, 0.85158, 0.85158, 0.85158, 0.773, 0.76852, 0.70466,
 40823              0.70466, 0.70466, 0.70466, 0.83864, 0.83864, 0.83864, 0.83864,
 40824              0.90561, 0.87514, 0.8588, 0.8588, 0.8588, 0.8588, 0.8588, 1.02058,
 40825              0.85751, 0.85991, 0.85991, 0.85991, 0.85991, 0.77512, 0.76013,
 40826              0.88075, 0.93859, 0.93859, 0.93859, 0.93859, 0.93859, 0.93859,
 40827              0.8075, 0.846, 0.81453, 0.81453, 0.81453, 0.81453, 0.82424, 0.82424,
 40828              0.82424, 0.82424, 0.9278, 0.96017, 0.93859, 0.93859, 0.93859,
 40829              0.93859, 0.93859, 1.08595, 0.8562, 0.94578, 0.94578, 0.94578,
 40830              0.94578, 0.882, 0.94578, 0.882, 0.85158, 0.93859, 0.85158, 0.93859,
 40831              0.85158, 0.93859, 0.76852, 0.846, 0.76852, 0.846, 0.76852, 0.846,
 40832              0.76852, 0.846, 0.89591, 0.8544, 0.90561, 0.94399, 0.70466, 0.81453,
 40833              0.70466, 0.81453, 0.70466, 0.81453, 0.70466, 0.81453, 0.70466,
 40834              0.81453, 0.80094, 0.94219, 0.80094, 0.94219, 0.80094, 0.94219, 1, 1,
 40835              0.86822, 0.96017, 0.86822, 0.96017, 0.83864, 0.82424, 0.83864,
 40836              0.82424, 0.83864, 0.82424, 0.83864, 1.03075, 0.83864, 0.82424,
 40837              0.81402, 1.02738, 0.728, 1.02175, 1, 1, 0.912, 0.79475, 1.03075, 1,
 40838              1, 0.79475, 0.83911, 0.79475, 0.66266, 0.80553, 1.06676, 0.87514,
 40839              0.96017, 1, 1, 0.87514, 0.96017, 0.86865, 0.87396, 0.96017, 0.8588,
 40840              0.93859, 0.8588, 0.93859, 0.8588, 0.93859, 0.867, 0.84759, 0.72421,
 40841              0.95493, 1, 1, 0.72421, 0.95493, 0.69866, 0.746, 0.69866, 0.746, 1,
 40842              1, 0.69866, 0.746, 1, 1, 0.77598, 0.88417, 0.77598, 1.12658,
 40843              0.85991, 0.94578, 0.85991, 0.94578, 0.85991, 0.94578, 0.85991,
 40844              0.94578, 0.85991, 0.94578, 0.85991, 0.94578, 0.87832, 0.979,
 40845              0.77512, 0.882, 0.77512, 0.8562, 0.83, 0.8562, 0.83, 0.8562, 0.83,
 40846              1, 0.88465, 0.85158, 0.93859, 0.773, 0.8075, 0.85751, 0.8562, 1, 1,
 40847              0.77598, 1.12658, 1.15012, 1.15012, 1.15012, 1.15012, 1.15012,
 40848              1.15313, 1.15012, 1.15012, 1.15012, 1.08106, 1.03901, 0.85158,
 40849              0.77025, 0.62264, 0.7646, 0.65351, 0.86026, 0.69461, 0.89947,
 40850              1.03075, 0.85158, 0.77812, 0.76449, 0.88836, 0.70466, 0.8562,
 40851              0.86822, 0.8588, 0.83864, 0.77212, 0.85308, 0.93637, 0.87514,
 40852              0.82352, 0.8588, 0.85701, 0.76013, 0.89058, 0.77598, 0.8156,
 40853              0.82565, 0.78112, 0.77899, 0.89386, 0.83864, 0.8156, 0.9486,
 40854              0.92388, 0.96186, 1.03075, 0.91123, 0.9486, 0.93298, 0.878, 0.93942,
 40855              0.92388, 0.84596, 0.96186, 0.95119, 1.03075, 0.922, 0.88787,
 40856              0.95829, 0.88, 0.93559, 0.93859, 0.78815, 0.93758, 1, 0.89217,
 40857              1.03737, 0.91123, 0.93969, 0.77487, 0.85769, 0.86799, 1.03075,
 40858              0.91123, 0.93859, 0.91123, 0.86799, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40859              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40860              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40861              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40862              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.87832,
 40863              0.979, 0.87832, 0.979, 0.87832, 0.979, 0.77512, 0.882, 0.9219, 1,
 40864              0.89903, 1, 1, 1, 0.87321, 0.87321, 0.87321, 1, 1.027, 1.027, 1.027,
 40865              0.86847, 0.86847, 0.79121, 1, 1.124, 1, 1, 0.73572, 0.73572, 1, 1,
 40866              0.85034, 1, 1, 1, 1, 0.88465, 1, 1, 1, 0.669, 1, 1.36145, 1, 1, 1,
 40867              1, 1, 1, 1, 1, 1, 1, 1, 1.04828, 1, 0.74948, 0.75187, 1.02058,
 40868              0.98391, 1.02119, 1, 1, 1.06233, 1.08595, 1.08595, 1, 1.08595,
 40869              1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40870              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40871              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05233, 1, 1,
 40872              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40873              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40874            ];
 40875            t.MyriadProItalicMetrics = { lineHeight: 1.2, lineGap: 0.2 };
 40876            t.MyriadProRegularFactors = [
 40877              1.36898, 1, 1, 0.76305, 0.82784, 0.94935, 0.89364, 0.92241, 0.89073,
 40878              0.90706, 0.98472, 0.85283, 0.85283, 1.0664, 1.02058, 0.74505,
 40879              0.9219, 0.74505, 1.23456, 0.92241, 0.92241, 0.92241, 0.92241,
 40880              0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.74505,
 40881              0.74505, 1.02058, 1.02058, 1.02058, 0.73002, 0.72601, 0.91755,
 40882              0.8126, 0.80314, 0.92222, 0.73764, 0.79726, 0.83051, 0.90284,
 40883              0.86023, 0.74, 0.8126, 0.84869, 0.96518, 0.91115, 0.8858, 0.79761,
 40884              0.8858, 0.74498, 0.73914, 0.81363, 0.89591, 0.83659, 0.89633,
 40885              0.85608, 0.8111, 0.90531, 1.0222, 1.22736, 1.0222, 1.27014, 0.89903,
 40886              0.90088, 0.86667, 1.0231, 0.896, 1.01411, 0.90083, 1.05099, 1.00512,
 40887              0.99793, 1.05326, 1.09377, 0.938, 1.06226, 1.00119, 0.99793,
 40888              0.98714, 1.0231, 1.01231, 0.98196, 0.792, 1.19137, 0.99074, 0.962,
 40889              1.01915, 0.926, 0.942, 0.856, 0.85034, 0.92006, 0.85034, 1.02058,
 40890              0.69067, 0.92241, 0.92241, 0.92241, 0.92241, 0.92006, 0.9332,
 40891              0.90088, 0.91882, 0.93484, 0.75339, 1.02058, 0.56866, 0.54324,
 40892              0.79519, 1.08595, 1, 1, 0.90088, 1, 0.95325, 0.74505, 0.90088, 1,
 40893              0.97198, 0.75339, 0.91009, 0.91009, 0.91009, 0.66466, 0.91755,
 40894              0.91755, 0.91755, 0.91755, 0.91755, 0.91755, 0.788, 0.80314,
 40895              0.73764, 0.73764, 0.73764, 0.73764, 0.86023, 0.86023, 0.86023,
 40896              0.86023, 0.92915, 0.91115, 0.8858, 0.8858, 0.8858, 0.8858, 0.8858,
 40897              1.02058, 0.8858, 0.89591, 0.89591, 0.89591, 0.89591, 0.8111,
 40898              0.79611, 0.89713, 0.86667, 0.86667, 0.86667, 0.86667, 0.86667,
 40899              0.86667, 0.86936, 0.896, 0.90083, 0.90083, 0.90083, 0.90083,
 40900              0.84224, 0.84224, 0.84224, 0.84224, 0.97276, 0.99793, 0.98714,
 40901              0.98714, 0.98714, 0.98714, 0.98714, 1.08595, 0.89876, 0.99074,
 40902              0.99074, 0.99074, 0.99074, 0.942, 1.0231, 0.942, 0.91755, 0.86667,
 40903              0.91755, 0.86667, 0.91755, 0.86667, 0.80314, 0.896, 0.80314, 0.896,
 40904              0.80314, 0.896, 0.80314, 0.896, 0.92222, 0.93372, 0.92915, 1.01411,
 40905              0.73764, 0.90083, 0.73764, 0.90083, 0.73764, 0.90083, 0.73764,
 40906              0.90083, 0.73764, 0.90083, 0.83051, 1.00512, 0.83051, 1.00512,
 40907              0.83051, 1.00512, 1, 1, 0.90284, 0.99793, 0.90976, 0.99793, 0.86023,
 40908              0.84224, 0.86023, 0.84224, 0.86023, 0.84224, 0.86023, 1.05326,
 40909              0.86023, 0.84224, 0.82873, 1.07469, 0.74, 1.09377, 1, 1, 0.938,
 40910              0.84869, 1.06226, 1, 1, 0.84869, 0.83704, 0.84869, 0.81441, 0.85588,
 40911              1.08927, 0.91115, 0.99793, 1, 1, 0.91115, 0.99793, 0.91887, 0.90991,
 40912              0.99793, 0.8858, 0.98714, 0.8858, 0.98714, 0.8858, 0.98714, 0.894,
 40913              0.91434, 0.74498, 0.98196, 1, 1, 0.74498, 0.98196, 0.73914, 0.792,
 40914              0.73914, 0.792, 1, 1, 0.73914, 0.792, 1, 1, 0.81363, 0.904, 0.81363,
 40915              1.19137, 0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074,
 40916              0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074, 0.89633,
 40917              1.01915, 0.8111, 0.942, 0.8111, 0.90531, 0.856, 0.90531, 0.856,
 40918              0.90531, 0.856, 1, 0.92241, 0.91755, 0.86667, 0.788, 0.86936,
 40919              0.8858, 0.89876, 1, 1, 0.81363, 1.19137, 0.90088, 0.90088, 0.90088,
 40920              0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90388,
 40921              1.03901, 0.92138, 0.78105, 0.7154, 0.86169, 0.80513, 0.94007,
 40922              0.82528, 0.98612, 1.06226, 0.91755, 0.8126, 0.81884, 0.92819,
 40923              0.73764, 0.90531, 0.90284, 0.8858, 0.86023, 0.8126, 0.91172,
 40924              0.96518, 0.91115, 0.83089, 0.8858, 0.87791, 0.79761, 0.89297,
 40925              0.81363, 0.88157, 0.89992, 0.85608, 0.81992, 0.94307, 0.86023,
 40926              0.88157, 0.95308, 0.98699, 0.99793, 1.06226, 0.95817, 0.95308,
 40927              0.97358, 0.928, 0.98088, 0.98699, 0.92761, 0.99793, 0.96017,
 40928              1.06226, 0.986, 0.944, 0.95978, 0.938, 0.96705, 0.98714, 0.80442,
 40929              0.98972, 1, 0.89762, 1.04552, 0.95817, 0.99007, 0.87064, 0.91879,
 40930              0.88888, 1.06226, 0.95817, 0.98714, 0.95817, 0.88888, 1, 1, 1, 1, 1,
 40931              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40932              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40933              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40934              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40935              1, 1, 1, 0.89633, 1.01915, 0.89633, 1.01915, 0.89633, 1.01915,
 40936              0.8111, 0.942, 0.9219, 1, 0.89903, 1, 1, 1, 0.93173, 0.93173,
 40937              0.93173, 1, 1.06304, 1.06304, 1.06904, 0.89903, 0.89903, 0.80549, 1,
 40938              1.156, 1, 1, 0.76575, 0.76575, 1, 1, 0.72458, 1, 1, 1, 1, 0.92241,
 40939              1, 1, 1, 0.619, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40940              1.07257, 1, 0.74705, 0.71119, 1.02058, 1.024, 1.02119, 1, 1, 1.1536,
 40941              1.08595, 1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40942              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40943              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40944              1, 1, 1, 1, 1, 1.05638, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40945              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40946            ];
 40947            t.MyriadProRegularMetrics = { lineHeight: 1.2, lineGap: 0.2 };
 40948          },
 40949          (e, t) => {
 40950            Object.defineProperty(t, "__esModule", { value: !0 });
 40951            t.SegoeuiRegularMetrics =
 40952              t.SegoeuiRegularFactors =
 40953              t.SegoeuiItalicMetrics =
 40954              t.SegoeuiItalicFactors =
 40955              t.SegoeuiBoldMetrics =
 40956              t.SegoeuiBoldItalicMetrics =
 40957              t.SegoeuiBoldItalicFactors =
 40958              t.SegoeuiBoldFactors =
 40959                void 0;
 40960            t.SegoeuiBoldFactors = [
 40961              1.76738, 1, 1, 0.99297, 0.9824, 1.04016, 1.06497, 1.03424, 0.97529,
 40962              1.17647, 1.23203, 1.1085, 1.1085, 1.16939, 1.2107, 0.9754, 1.21408,
 40963              0.9754, 1.59578, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424,
 40964              1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 0.81378, 0.81378,
 40965              1.2107, 1.2107, 1.2107, 0.71703, 0.97847, 0.97363, 0.88776, 0.8641,
 40966              1.02096, 0.79795, 0.85132, 0.914, 1.06085, 1.1406, 0.8007, 0.89858,
 40967              0.83693, 1.14889, 1.09398, 0.97489, 0.92094, 0.97489, 0.90399,
 40968              0.84041, 0.95923, 1.00135, 1, 1.06467, 0.98243, 0.90996, 0.99361,
 40969              1.1085, 1.56942, 1.1085, 1.2107, 0.74627, 0.94282, 0.96752, 1.01519,
 40970              0.86304, 1.01359, 0.97278, 1.15103, 1.01359, 0.98561, 1.02285,
 40971              1.02285, 1.00527, 1.02285, 1.0302, 0.99041, 1.0008, 1.01519,
 40972              1.01359, 1.02258, 0.79104, 1.16862, 0.99041, 0.97454, 1.02511,
 40973              0.99298, 0.96752, 0.95801, 0.94856, 1.16579, 0.94856, 1.2107,
 40974              0.9824, 1.03424, 1.03424, 1, 1.03424, 1.16579, 0.8727, 1.3871,
 40975              1.18622, 1.10818, 1.04478, 1.2107, 1.18622, 0.75155, 0.94994,
 40976              1.28826, 1.21408, 1.21408, 0.91056, 1, 0.91572, 0.9754, 0.64663,
 40977              1.18328, 1.24866, 1.04478, 1.14169, 1.15749, 1.17389, 0.71703,
 40978              0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.93506,
 40979              0.8641, 0.79795, 0.79795, 0.79795, 0.79795, 1.1406, 1.1406, 1.1406,
 40980              1.1406, 1.02096, 1.09398, 0.97426, 0.97426, 0.97426, 0.97426,
 40981              0.97426, 1.2107, 0.97489, 1.00135, 1.00135, 1.00135, 1.00135,
 40982              0.90996, 0.92094, 1.02798, 0.96752, 0.96752, 0.96752, 0.96752,
 40983              0.96752, 0.96752, 0.93136, 0.86304, 0.97278, 0.97278, 0.97278,
 40984              0.97278, 1.02285, 1.02285, 1.02285, 1.02285, 0.97122, 0.99041, 1, 1,
 40985              1, 1, 1, 1.28826, 1.0008, 0.99041, 0.99041, 0.99041, 0.99041,
 40986              0.96752, 1.01519, 0.96752, 0.97363, 0.96752, 0.97363, 0.96752,
 40987              0.97363, 0.96752, 0.8641, 0.86304, 0.8641, 0.86304, 0.8641, 0.86304,
 40988              0.8641, 0.86304, 1.02096, 1.03057, 1.02096, 1.03517, 0.79795,
 40989              0.97278, 0.79795, 0.97278, 0.79795, 0.97278, 0.79795, 0.97278,
 40990              0.79795, 0.97278, 0.914, 1.01359, 0.914, 1.01359, 0.914, 1.01359, 1,
 40991              1, 1.06085, 0.98561, 1.06085, 1.00879, 1.1406, 1.02285, 1.1406,
 40992              1.02285, 1.1406, 1.02285, 1.1406, 1.02285, 1.1406, 1.02285, 0.97138,
 40993              1.08692, 0.8007, 1.02285, 1, 1, 1.00527, 0.83693, 1.02285, 1, 1,
 40994              0.83693, 0.9455, 0.83693, 0.90418, 0.83693, 1.13005, 1.09398,
 40995              0.99041, 1, 1, 1.09398, 0.99041, 0.96692, 1.09251, 0.99041, 0.97489,
 40996              1.0008, 0.97489, 1.0008, 0.97489, 1.0008, 0.93994, 0.97931, 0.90399,
 40997              1.02258, 1, 1, 0.90399, 1.02258, 0.84041, 0.79104, 0.84041, 0.79104,
 40998              0.84041, 0.79104, 0.84041, 0.79104, 1, 1, 0.95923, 1.07034, 0.95923,
 40999              1.16862, 1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041,
 41000              1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041, 1.06467,
 41001              1.02511, 0.90996, 0.96752, 0.90996, 0.99361, 0.95801, 0.99361,
 41002              0.95801, 0.99361, 0.95801, 1.07733, 1.03424, 0.97363, 0.96752,
 41003              0.93506, 0.93136, 0.97489, 1.0008, 1, 1, 0.95923, 1.16862, 1.15103,
 41004              1.15103, 1.01173, 1.03959, 0.75953, 0.81378, 0.79912, 1.15103,
 41005              1.21994, 0.95161, 0.87815, 1.01149, 0.81525, 0.7676, 0.98167,
 41006              1.01134, 1.02546, 0.84097, 1.03089, 1.18102, 0.97363, 0.88776,
 41007              0.85134, 0.97826, 0.79795, 0.99361, 1.06085, 0.97489, 1.1406,
 41008              0.89858, 1.0388, 1.14889, 1.09398, 0.86039, 0.97489, 1.0595,
 41009              0.92094, 0.94793, 0.95923, 0.90996, 0.99346, 0.98243, 1.02112,
 41010              0.95493, 1.1406, 0.90996, 1.03574, 1.02597, 1.0008, 1.18102,
 41011              1.06628, 1.03574, 1.0192, 1.01932, 1.00886, 0.97531, 1.0106, 1.0008,
 41012              1.13189, 1.18102, 1.02277, 0.98683, 1.0016, 0.99561, 1.07237,
 41013              1.0008, 0.90434, 0.99921, 0.93803, 0.8965, 1.23085, 1.06628,
 41014              1.04983, 0.96268, 1.0499, 0.98439, 1.18102, 1.06628, 1.0008,
 41015              1.06628, 0.98439, 0.79795, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41016              1.09466, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41017              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41018              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41019              0.97278, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.02065, 1, 1, 1, 1, 1,
 41020              1, 1.06467, 1.02511, 1.06467, 1.02511, 1.06467, 1.02511, 0.90996,
 41021              0.96752, 1, 1.21408, 0.89903, 1, 1, 0.75155, 1.04394, 1.04394,
 41022              1.04394, 1.04394, 0.98633, 0.98633, 0.98633, 0.73047, 0.73047,
 41023              1.20642, 0.91211, 1.25635, 1.222, 1.02956, 1.03372, 1.03372,
 41024              0.96039, 1.24633, 1, 1.12454, 0.93503, 1.03424, 1.19687, 1.03424, 1,
 41025              1, 1, 0.771, 1, 1, 1.15749, 1.15749, 1.15749, 1.10948, 0.86279,
 41026              0.94434, 0.86279, 0.94434, 0.86182, 1, 1, 1.16897, 1, 0.96085,
 41027              0.90137, 1.2107, 1.18416, 1.13973, 0.69825, 0.9716, 2.10339,
 41028              1.29004, 1.29004, 1.21172, 1.29004, 1.29004, 1, 1, 1, 1, 1, 1, 1, 1,
 41029              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41030              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41031              1.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025,
 41032              1.18874, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1,
 41033              1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.09193, 1.09193, 1, 1,
 41034              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41035            ];
 41036            t.SegoeuiBoldMetrics = { lineHeight: 1.33008, lineGap: 0 };
 41037            t.SegoeuiBoldItalicFactors = [
 41038              1.76738, 1, 1, 0.98946, 1.03959, 1.04016, 1.02809, 1.036, 0.97639,
 41039              1.10953, 1.23203, 1.11144, 1.11144, 1.16939, 1.21237, 0.9754,
 41040              1.21261, 0.9754, 1.59754, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036,
 41041              1.036, 1.036, 1.036, 1.036, 0.81378, 0.81378, 1.21237, 1.21237,
 41042              1.21237, 0.73541, 0.97847, 0.97363, 0.89723, 0.87897, 1.0426,
 41043              0.79429, 0.85292, 0.91149, 1.05815, 1.1406, 0.79631, 0.90128,
 41044              0.83853, 1.04396, 1.10615, 0.97552, 0.94436, 0.97552, 0.88641,
 41045              0.80527, 0.96083, 1.00135, 1, 1.06777, 0.9817, 0.91142, 0.99361,
 41046              1.11144, 1.57293, 1.11144, 1.21237, 0.74627, 1.31818, 1.06585,
 41047              0.97042, 0.83055, 0.97042, 0.93503, 1.1261, 0.97042, 0.97922,
 41048              1.14236, 0.94552, 1.01054, 1.14236, 1.02471, 0.97922, 0.94165,
 41049              0.97042, 0.97042, 1.0276, 0.78929, 1.1261, 0.97922, 0.95874,
 41050              1.02197, 0.98507, 0.96752, 0.97168, 0.95107, 1.16579, 0.95107,
 41051              1.21237, 1.03959, 1.036, 1.036, 1, 1.036, 1.16579, 0.87357, 1.31818,
 41052              1.18754, 1.26781, 1.05356, 1.21237, 1.18622, 0.79487, 0.94994,
 41053              1.29004, 1.24047, 1.24047, 1.31818, 1, 0.91484, 0.9754, 1.31818,
 41054              1.1349, 1.24866, 1.05356, 1.13934, 1.15574, 1.17389, 0.73541,
 41055              0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.94385,
 41056              0.87897, 0.79429, 0.79429, 0.79429, 0.79429, 1.1406, 1.1406, 1.1406,
 41057              1.1406, 1.0426, 1.10615, 0.97552, 0.97552, 0.97552, 0.97552,
 41058              0.97552, 1.21237, 0.97552, 1.00135, 1.00135, 1.00135, 1.00135,
 41059              0.91142, 0.94436, 0.98721, 1.06585, 1.06585, 1.06585, 1.06585,
 41060              1.06585, 1.06585, 0.96705, 0.83055, 0.93503, 0.93503, 0.93503,
 41061              0.93503, 1.14236, 1.14236, 1.14236, 1.14236, 0.93125, 0.97922,
 41062              0.94165, 0.94165, 0.94165, 0.94165, 0.94165, 1.29004, 0.94165,
 41063              0.97922, 0.97922, 0.97922, 0.97922, 0.96752, 0.97042, 0.96752,
 41064              0.97363, 1.06585, 0.97363, 1.06585, 0.97363, 1.06585, 0.87897,
 41065              0.83055, 0.87897, 0.83055, 0.87897, 0.83055, 0.87897, 0.83055,
 41066              1.0426, 1.0033, 1.0426, 0.97042, 0.79429, 0.93503, 0.79429, 0.93503,
 41067              0.79429, 0.93503, 0.79429, 0.93503, 0.79429, 0.93503, 0.91149,
 41068              0.97042, 0.91149, 0.97042, 0.91149, 0.97042, 1, 1, 1.05815, 0.97922,
 41069              1.05815, 0.97922, 1.1406, 1.14236, 1.1406, 1.14236, 1.1406, 1.14236,
 41070              1.1406, 1.14236, 1.1406, 1.14236, 0.97441, 1.04302, 0.79631,
 41071              1.01582, 1, 1, 1.01054, 0.83853, 1.14236, 1, 1, 0.83853, 1.09125,
 41072              0.83853, 0.90418, 0.83853, 1.19508, 1.10615, 0.97922, 1, 1, 1.10615,
 41073              0.97922, 1.01034, 1.10466, 0.97922, 0.97552, 0.94165, 0.97552,
 41074              0.94165, 0.97552, 0.94165, 0.91602, 0.91981, 0.88641, 1.0276, 1, 1,
 41075              0.88641, 1.0276, 0.80527, 0.78929, 0.80527, 0.78929, 0.80527,
 41076              0.78929, 0.80527, 0.78929, 1, 1, 0.96083, 1.05403, 0.95923, 1.16862,
 41077              1.00135, 0.97922, 1.00135, 0.97922, 1.00135, 0.97922, 1.00135,
 41078              0.97922, 1.00135, 0.97922, 1.00135, 0.97922, 1.06777, 1.02197,
 41079              0.91142, 0.96752, 0.91142, 0.99361, 0.97168, 0.99361, 0.97168,
 41080              0.99361, 0.97168, 1.23199, 1.036, 0.97363, 1.06585, 0.94385,
 41081              0.96705, 0.97552, 0.94165, 1, 1, 0.96083, 1.1261, 1.31818, 1.31818,
 41082              1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818,
 41083              0.95161, 1.27126, 1.00811, 0.83284, 0.77702, 0.99137, 0.95253,
 41084              1.0347, 0.86142, 1.07205, 1.14236, 0.97363, 0.89723, 0.86869,
 41085              1.09818, 0.79429, 0.99361, 1.05815, 0.97552, 1.1406, 0.90128,
 41086              1.06662, 1.04396, 1.10615, 0.84918, 0.97552, 1.04694, 0.94436,
 41087              0.98015, 0.96083, 0.91142, 1.00356, 0.9817, 1.01945, 0.98999,
 41088              1.1406, 0.91142, 1.04961, 0.9898, 1.00639, 1.14236, 1.07514,
 41089              1.04961, 0.99607, 1.02897, 1.008, 0.9898, 0.95134, 1.00639, 1.11121,
 41090              1.14236, 1.00518, 0.97981, 1.02186, 1, 1.08578, 0.94165, 0.99314,
 41091              0.98387, 0.93028, 0.93377, 1.35125, 1.07514, 1.10687, 0.93491,
 41092              1.04232, 1.00351, 1.14236, 1.07514, 0.94165, 1.07514, 1.00351,
 41093              0.79429, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.09097, 1, 1, 1, 1, 1,
 41094              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41095              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41096              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.93503, 1, 1, 1, 1, 1,
 41097              1, 1, 1, 1, 1, 1, 1, 0.96609, 1, 1, 1, 1, 1, 1, 1.06777, 1.02197,
 41098              1.06777, 1.02197, 1.06777, 1.02197, 0.91142, 0.96752, 1, 1.21261,
 41099              0.89903, 1, 1, 0.75155, 1.04745, 1.04745, 1.04745, 1.04394, 0.98633,
 41100              0.98633, 0.98633, 0.72959, 0.72959, 1.20502, 0.91406, 1.26514,
 41101              1.222, 1.02956, 1.03372, 1.03372, 0.96039, 1.24633, 1, 1.09125,
 41102              0.93327, 1.03336, 1.16541, 1.036, 1, 1, 1, 0.771, 1, 1, 1.15574,
 41103              1.15574, 1.15574, 1.15574, 0.86364, 0.94434, 0.86279, 0.94434,
 41104              0.86224, 1, 1, 1.16798, 1, 0.96085, 0.90068, 1.21237, 1.18416,
 41105              1.13904, 0.69825, 0.9716, 2.10339, 1.29004, 1.29004, 1.21339,
 41106              1.29004, 1.29004, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41107              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41108              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.42603, 1, 0.99862, 0.99862, 1,
 41109              0.87025, 0.87025, 0.87025, 0.87025, 1.18775, 1.42603, 1, 1.42603,
 41110              1.42603, 0.99862, 1, 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163,
 41111              1, 1, 1, 1.13269, 1.13269, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41112              1, 1, 1, 1,
 41113            ];
 41114            t.SegoeuiBoldItalicMetrics = { lineHeight: 1.33008, lineGap: 0 };
 41115            t.SegoeuiItalicFactors = [
 41116              1.76738, 1, 1, 0.98946, 1.14763, 1.05365, 1.06234, 0.96927, 0.92586,
 41117              1.15373, 1.18414, 0.91349, 0.91349, 1.07403, 1.17308, 0.78383,
 41118              1.20088, 0.78383, 1.42531, 0.96927, 0.96927, 0.96927, 0.96927,
 41119              0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.78383,
 41120              0.78383, 1.17308, 1.17308, 1.17308, 0.77349, 0.94565, 0.94729,
 41121              0.85944, 0.88506, 0.9858, 0.74817, 0.80016, 0.88449, 0.98039,
 41122              0.95782, 0.69238, 0.89898, 0.83231, 0.98183, 1.03989, 0.96924,
 41123              0.86237, 0.96924, 0.80595, 0.74524, 0.86091, 0.95402, 0.94143,
 41124              0.98448, 0.8858, 0.83089, 0.93285, 1.0949, 1.39016, 1.0949, 1.45994,
 41125              0.74627, 1.04839, 0.97454, 0.97454, 0.87207, 0.97454, 0.87533,
 41126              1.06151, 0.97454, 1.00176, 1.16484, 1.08132, 0.98047, 1.16484,
 41127              1.02989, 1.01054, 0.96225, 0.97454, 0.97454, 1.06598, 0.79004,
 41128              1.16344, 1.00351, 0.94629, 0.9973, 0.91016, 0.96777, 0.9043,
 41129              0.91082, 0.92481, 0.91082, 1.17308, 0.95748, 0.96927, 0.96927, 1,
 41130              0.96927, 0.92481, 0.80597, 1.04839, 1.23393, 1.1781, 0.9245,
 41131              1.17308, 1.20808, 0.63218, 0.94261, 1.24822, 1.09971, 1.09971,
 41132              1.04839, 1, 0.85273, 0.78032, 1.04839, 1.09971, 1.22326, 0.9245,
 41133              1.09836, 1.13525, 1.15222, 0.70424, 0.94729, 0.94729, 0.94729,
 41134              0.94729, 0.94729, 0.94729, 0.85498, 0.88506, 0.74817, 0.74817,
 41135              0.74817, 0.74817, 0.95782, 0.95782, 0.95782, 0.95782, 0.9858,
 41136              1.03989, 0.96924, 0.96924, 0.96924, 0.96924, 0.96924, 1.17308,
 41137              0.96924, 0.95402, 0.95402, 0.95402, 0.95402, 0.83089, 0.86237,
 41138              0.88409, 0.97454, 0.97454, 0.97454, 0.97454, 0.97454, 0.97454,
 41139              0.92916, 0.87207, 0.87533, 0.87533, 0.87533, 0.87533, 0.93146,
 41140              0.93146, 0.93146, 0.93146, 0.93854, 1.01054, 0.96225, 0.96225,
 41141              0.96225, 0.96225, 0.96225, 1.24822, 0.8761, 1.00351, 1.00351,
 41142              1.00351, 1.00351, 0.96777, 0.97454, 0.96777, 0.94729, 0.97454,
 41143              0.94729, 0.97454, 0.94729, 0.97454, 0.88506, 0.87207, 0.88506,
 41144              0.87207, 0.88506, 0.87207, 0.88506, 0.87207, 0.9858, 0.95391,
 41145              0.9858, 0.97454, 0.74817, 0.87533, 0.74817, 0.87533, 0.74817,
 41146              0.87533, 0.74817, 0.87533, 0.74817, 0.87533, 0.88449, 0.97454,
 41147              0.88449, 0.97454, 0.88449, 0.97454, 1, 1, 0.98039, 1.00176, 0.98039,
 41148              1.00176, 0.95782, 0.93146, 0.95782, 0.93146, 0.95782, 0.93146,
 41149              0.95782, 1.16484, 0.95782, 0.93146, 0.84421, 1.12761, 0.69238,
 41150              1.08132, 1, 1, 0.98047, 0.83231, 1.16484, 1, 1, 0.84723, 1.04861,
 41151              0.84723, 0.78755, 0.83231, 1.23736, 1.03989, 1.01054, 1, 1, 1.03989,
 41152              1.01054, 0.9857, 1.03849, 1.01054, 0.96924, 0.96225, 0.96924,
 41153              0.96225, 0.96924, 0.96225, 0.92383, 0.90171, 0.80595, 1.06598, 1, 1,
 41154              0.80595, 1.06598, 0.74524, 0.79004, 0.74524, 0.79004, 0.74524,
 41155              0.79004, 0.74524, 0.79004, 1, 1, 0.86091, 1.02759, 0.85771, 1.16344,
 41156              0.95402, 1.00351, 0.95402, 1.00351, 0.95402, 1.00351, 0.95402,
 41157              1.00351, 0.95402, 1.00351, 0.95402, 1.00351, 0.98448, 0.9973,
 41158              0.83089, 0.96777, 0.83089, 0.93285, 0.9043, 0.93285, 0.9043,
 41159              0.93285, 0.9043, 1.31868, 0.96927, 0.94729, 0.97454, 0.85498,
 41160              0.92916, 0.96924, 0.8761, 1, 1, 0.86091, 1.16344, 1.04839, 1.04839,
 41161              1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839,
 41162              0.81965, 0.81965, 0.94729, 0.78032, 0.71022, 0.90883, 0.84171,
 41163              0.99877, 0.77596, 1.05734, 1.2, 0.94729, 0.85944, 0.82791, 0.9607,
 41164              0.74817, 0.93285, 0.98039, 0.96924, 0.95782, 0.89898, 0.98316,
 41165              0.98183, 1.03989, 0.78614, 0.96924, 0.97642, 0.86237, 0.86075,
 41166              0.86091, 0.83089, 0.90082, 0.8858, 0.97296, 1.01284, 0.95782,
 41167              0.83089, 1.0976, 1.04, 1.03342, 1.2, 1.0675, 1.0976, 0.98205,
 41168              1.03809, 1.05097, 1.04, 0.95364, 1.03342, 1.05401, 1.2, 1.02148,
 41169              1.0119, 1.04724, 1.0127, 1.02732, 0.96225, 0.8965, 0.97783, 0.93574,
 41170              0.94818, 1.30679, 1.0675, 1.11826, 0.99821, 1.0557, 1.0326, 1.2,
 41171              1.0675, 0.96225, 1.0675, 1.0326, 0.74817, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41172              1, 1, 1, 1.03754, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41173              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41174              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41175              1, 1, 1, 0.87533, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.98705, 1, 1,
 41176              1, 1, 1, 1, 0.98448, 0.9973, 0.98448, 0.9973, 0.98448, 0.9973,
 41177              0.83089, 0.96777, 1, 1.20088, 0.89903, 1, 1, 0.75155, 0.94945,
 41178              0.94945, 0.94945, 0.94945, 1.12317, 1.12317, 1.12317, 0.67603,
 41179              0.67603, 1.15621, 0.73584, 1.21191, 1.22135, 1.06483, 0.94868,
 41180              0.94868, 0.95996, 1.24633, 1, 1.07497, 0.87709, 0.96927, 1.01473,
 41181              0.96927, 1, 1, 1, 0.77295, 1, 1, 1.09836, 1.09836, 1.09836, 1.01522,
 41182              0.86321, 0.94434, 0.8649, 0.94434, 0.86182, 1, 1, 1.083, 1, 0.91578,
 41183              0.86438, 1.17308, 1.18416, 1.14589, 0.69825, 0.97622, 1.96791,
 41184              1.24822, 1.24822, 1.17308, 1.24822, 1.24822, 1, 1, 1, 1, 1, 1, 1, 1,
 41185              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41186              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41187              1.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025,
 41188              1.17984, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1,
 41189              1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.10742, 1.10742, 1, 1,
 41190              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41191            ];
 41192            t.SegoeuiItalicMetrics = { lineHeight: 1.33008, lineGap: 0 };
 41193            t.SegoeuiRegularFactors = [
 41194              1.76738, 1, 1, 0.98594, 1.02285, 1.10454, 1.06234, 0.96927, 0.92037,
 41195              1.19985, 1.2046, 0.90616, 0.90616, 1.07152, 1.1714, 0.78032,
 41196              1.20088, 0.78032, 1.40246, 0.96927, 0.96927, 0.96927, 0.96927,
 41197              0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.78032,
 41198              0.78032, 1.1714, 1.1714, 1.1714, 0.80597, 0.94084, 0.96706, 0.85944,
 41199              0.85734, 0.97093, 0.75842, 0.79936, 0.88198, 0.9831, 0.95782,
 41200              0.71387, 0.86969, 0.84636, 1.07796, 1.03584, 0.96924, 0.83968,
 41201              0.96924, 0.82826, 0.79649, 0.85771, 0.95132, 0.93119, 0.98965,
 41202              0.88433, 0.8287, 0.93365, 1.08612, 1.3638, 1.08612, 1.45786,
 41203              0.74627, 0.80499, 0.91484, 1.05707, 0.92383, 1.05882, 0.9403,
 41204              1.12654, 1.05882, 1.01756, 1.09011, 1.09011, 0.99414, 1.09011,
 41205              1.034, 1.01756, 1.05356, 1.05707, 1.05882, 1.04399, 0.84863,
 41206              1.21968, 1.01756, 0.95801, 1.00068, 0.91797, 0.96777, 0.9043,
 41207              0.90351, 0.92105, 0.90351, 1.1714, 0.85337, 0.96927, 0.96927,
 41208              0.99912, 0.96927, 0.92105, 0.80597, 1.2434, 1.20808, 1.05937,
 41209              0.90957, 1.1714, 1.20808, 0.75155, 0.94261, 1.24644, 1.09971,
 41210              1.09971, 0.84751, 1, 0.85273, 0.78032, 0.61584, 1.05425, 1.17914,
 41211              0.90957, 1.08665, 1.11593, 1.14169, 0.73381, 0.96706, 0.96706,
 41212              0.96706, 0.96706, 0.96706, 0.96706, 0.86035, 0.85734, 0.75842,
 41213              0.75842, 0.75842, 0.75842, 0.95782, 0.95782, 0.95782, 0.95782,
 41214              0.97093, 1.03584, 0.96924, 0.96924, 0.96924, 0.96924, 0.96924,
 41215              1.1714, 0.96924, 0.95132, 0.95132, 0.95132, 0.95132, 0.8287,
 41216              0.83968, 0.89049, 0.91484, 0.91484, 0.91484, 0.91484, 0.91484,
 41217              0.91484, 0.93575, 0.92383, 0.9403, 0.9403, 0.9403, 0.9403, 0.8717,
 41218              0.8717, 0.8717, 0.8717, 1.00527, 1.01756, 1.05356, 1.05356, 1.05356,
 41219              1.05356, 1.05356, 1.24644, 0.95923, 1.01756, 1.01756, 1.01756,
 41220              1.01756, 0.96777, 1.05707, 0.96777, 0.96706, 0.91484, 0.96706,
 41221              0.91484, 0.96706, 0.91484, 0.85734, 0.92383, 0.85734, 0.92383,
 41222              0.85734, 0.92383, 0.85734, 0.92383, 0.97093, 1.0969, 0.97093,
 41223              1.05882, 0.75842, 0.9403, 0.75842, 0.9403, 0.75842, 0.9403, 0.75842,
 41224              0.9403, 0.75842, 0.9403, 0.88198, 1.05882, 0.88198, 1.05882,
 41225              0.88198, 1.05882, 1, 1, 0.9831, 1.01756, 0.9831, 1.01756, 0.95782,
 41226              0.8717, 0.95782, 0.8717, 0.95782, 0.8717, 0.95782, 1.09011, 0.95782,
 41227              0.8717, 0.84784, 1.11551, 0.71387, 1.09011, 1, 1, 0.99414, 0.84636,
 41228              1.09011, 1, 1, 0.84636, 1.0536, 0.84636, 0.94298, 0.84636, 1.23297,
 41229              1.03584, 1.01756, 1, 1, 1.03584, 1.01756, 1.00323, 1.03444, 1.01756,
 41230              0.96924, 1.05356, 0.96924, 1.05356, 0.96924, 1.05356, 0.93066,
 41231              0.98293, 0.82826, 1.04399, 1, 1, 0.82826, 1.04399, 0.79649, 0.84863,
 41232              0.79649, 0.84863, 0.79649, 0.84863, 0.79649, 0.84863, 1, 1, 0.85771,
 41233              1.17318, 0.85771, 1.21968, 0.95132, 1.01756, 0.95132, 1.01756,
 41234              0.95132, 1.01756, 0.95132, 1.01756, 0.95132, 1.01756, 0.95132,
 41235              1.01756, 0.98965, 1.00068, 0.8287, 0.96777, 0.8287, 0.93365, 0.9043,
 41236              0.93365, 0.9043, 0.93365, 0.9043, 1.08571, 0.96927, 0.96706,
 41237              0.91484, 0.86035, 0.93575, 0.96924, 0.95923, 1, 1, 0.85771, 1.21968,
 41238              1.11437, 1.11437, 0.93109, 0.91202, 0.60411, 0.84164, 0.55572,
 41239              1.01173, 0.97361, 0.81818, 0.81818, 0.96635, 0.78032, 0.72727,
 41240              0.92366, 0.98601, 1.03405, 0.77968, 1.09799, 1.2, 0.96706, 0.85944,
 41241              0.85638, 0.96491, 0.75842, 0.93365, 0.9831, 0.96924, 0.95782,
 41242              0.86969, 0.94152, 1.07796, 1.03584, 0.78437, 0.96924, 0.98715,
 41243              0.83968, 0.83491, 0.85771, 0.8287, 0.94492, 0.88433, 0.9287, 1.0098,
 41244              0.95782, 0.8287, 1.0625, 0.98248, 1.03424, 1.2, 1.01071, 1.0625,
 41245              0.95246, 1.03809, 1.04912, 0.98248, 1.00221, 1.03424, 1.05443, 1.2,
 41246              1.04785, 0.99609, 1.00169, 1.05176, 0.99346, 1.05356, 0.9087,
 41247              1.03004, 0.95542, 0.93117, 1.23362, 1.01071, 1.07831, 1.02512,
 41248              1.05205, 1.03502, 1.2, 1.01071, 1.05356, 1.01071, 1.03502, 0.75842,
 41249              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.03719, 1, 1, 1, 1, 1, 1, 1, 1,
 41250              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41251              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41252              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.9403, 1, 1, 1, 1, 1, 1, 1, 1,
 41253              1, 1, 1, 1, 1.04021, 1, 1, 1, 1, 1, 1, 0.98965, 1.00068, 0.98965,
 41254              1.00068, 0.98965, 1.00068, 0.8287, 0.96777, 1, 1.20088, 0.89903, 1,
 41255              1, 0.75155, 1.03077, 1.03077, 1.03077, 1.03077, 1.13196, 1.13196,
 41256              1.13196, 0.67428, 0.67428, 1.16039, 0.73291, 1.20996, 1.22135,
 41257              1.06483, 0.94868, 0.94868, 0.95996, 1.24633, 1, 1.07497, 0.87796,
 41258              0.96927, 1.01518, 0.96927, 1, 1, 1, 0.77295, 1, 1, 1.10539, 1.10539,
 41259              1.11358, 1.06967, 0.86279, 0.94434, 0.86279, 0.94434, 0.86182, 1, 1,
 41260              1.083, 1, 0.91578, 0.86507, 1.1714, 1.18416, 1.14589, 0.69825,
 41261              0.97622, 1.9697, 1.24822, 1.24822, 1.17238, 1.24822, 1.24822, 1, 1,
 41262              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41263              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41264              1, 1, 1, 1, 1.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025,
 41265              0.87025, 0.87025, 1.18083, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1,
 41266              1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.10938,
 41267              1.10938, 1, 1, 1, 1.05425, 1.09971, 1.09971, 1.09971, 1, 1, 1, 1, 1,
 41268              1, 1, 1, 1, 1, 1,
 41269            ];
 41270            t.SegoeuiRegularMetrics = { lineHeight: 1.33008, lineGap: 0 };
 41271          },
 41272          (e, t, a) => {
 41273            Object.defineProperty(t, "__esModule", { value: !0 });
 41274            t.PostScriptEvaluator =
 41275              t.PostScriptCompiler =
 41276              t.PDFFunctionFactory =
 41277                void 0;
 41278            t.isPDFFunction = function isPDFFunction(e) {
 41279              let t;
 41280              if (e instanceof r.Dict) t = e;
 41281              else {
 41282                if (!(e instanceof s.BaseStream)) return !1;
 41283                t = e.dict;
 41284              }
 41285              return t.has("FunctionType");
 41286            };
 41287            var r = a(4),
 41288              n = a(2),
 41289              i = a(58),
 41290              s = a(5),
 41291              o = a(59);
 41292            t.PDFFunctionFactory = class PDFFunctionFactory {
 41293              constructor({ xref: e, isEvalSupported: t = !0 }) {
 41294                this.xref = e;
 41295                this.isEvalSupported = !1 !== t;
 41296              }
 41297              create(e) {
 41298                const t = this.getCached(e);
 41299                if (t) return t;
 41300                const a = PDFFunction.parse({
 41301                  xref: this.xref,
 41302                  isEvalSupported: this.isEvalSupported,
 41303                  fn: e instanceof r.Ref ? this.xref.fetch(e) : e,
 41304                });
 41305                this._cache(e, a);
 41306                return a;
 41307              }
 41308              createFromArray(e) {
 41309                const t = this.getCached(e);
 41310                if (t) return t;
 41311                const a = PDFFunction.parseArray({
 41312                  xref: this.xref,
 41313                  isEvalSupported: this.isEvalSupported,
 41314                  fnObj: e instanceof r.Ref ? this.xref.fetch(e) : e,
 41315                });
 41316                this._cache(e, a);
 41317                return a;
 41318              }
 41319              getCached(e) {
 41320                let t;
 41321                e instanceof r.Ref
 41322                  ? (t = e)
 41323                  : e instanceof r.Dict
 41324                    ? (t = e.objId)
 41325                    : e instanceof s.BaseStream && (t = e.dict?.objId);
 41326                if (t) {
 41327                  const e = this._localFunctionCache.getByRef(t);
 41328                  if (e) return e;
 41329                }
 41330                return null;
 41331              }
 41332              _cache(e, t) {
 41333                if (!t)
 41334                  throw new Error(
 41335                    'PDFFunctionFactory._cache - expected "parsedFunction" argument.',
 41336                  );
 41337                let a;
 41338                e instanceof r.Ref
 41339                  ? (a = e)
 41340                  : e instanceof r.Dict
 41341                    ? (a = e.objId)
 41342                    : e instanceof s.BaseStream && (a = e.dict?.objId);
 41343                a && this._localFunctionCache.set(null, a, t);
 41344              }
 41345              get _localFunctionCache() {
 41346                return (0, n.shadow)(
 41347                  this,
 41348                  "_localFunctionCache",
 41349                  new o.LocalFunctionCache(),
 41350                );
 41351              }
 41352            };
 41353            function toNumberArray(e) {
 41354              if (!Array.isArray(e)) return null;
 41355              const t = e.length;
 41356              for (let a = 0; a < t; a++)
 41357                if ("number" != typeof e[a]) {
 41358                  const a = new Array(t);
 41359                  for (let r = 0; r < t; r++) a[r] = +e[r];
 41360                  return a;
 41361                }
 41362              return e;
 41363            }
 41364            class PDFFunction {
 41365              static getSampleArray(e, t, a, r) {
 41366                let n,
 41367                  i,
 41368                  s = 1;
 41369                for (n = 0, i = e.length; n < i; n++) s *= e[n];
 41370                s *= t;
 41371                const o = new Array(s);
 41372                let c = 0,
 41373                  l = 0;
 41374                const h = 1 / (2 ** a - 1),
 41375                  u = r.getBytes((s * a + 7) / 8);
 41376                let d = 0;
 41377                for (n = 0; n < s; n++) {
 41378                  for (; c < a; ) {
 41379                    l <<= 8;
 41380                    l |= u[d++];
 41381                    c += 8;
 41382                  }
 41383                  c -= a;
 41384                  o[n] = (l >> c) * h;
 41385                  l &= (1 << c) - 1;
 41386                }
 41387                return o;
 41388              }
 41389              static parse({ xref: e, isEvalSupported: t, fn: a }) {
 41390                const r = a.dict || a;
 41391                switch (r.get("FunctionType")) {
 41392                  case 0:
 41393                    return this.constructSampled({
 41394                      xref: e,
 41395                      isEvalSupported: t,
 41396                      fn: a,
 41397                      dict: r,
 41398                    });
 41399                  case 1:
 41400                    break;
 41401                  case 2:
 41402                    return this.constructInterpolated({
 41403                      xref: e,
 41404                      isEvalSupported: t,
 41405                      dict: r,
 41406                    });
 41407                  case 3:
 41408                    return this.constructStiched({
 41409                      xref: e,
 41410                      isEvalSupported: t,
 41411                      dict: r,
 41412                    });
 41413                  case 4:
 41414                    return this.constructPostScript({
 41415                      xref: e,
 41416                      isEvalSupported: t,
 41417                      fn: a,
 41418                      dict: r,
 41419                    });
 41420                }
 41421                throw new n.FormatError("Unknown type of function");
 41422              }
 41423              static parseArray({ xref: e, isEvalSupported: t, fnObj: a }) {
 41424                if (!Array.isArray(a))
 41425                  return this.parse({ xref: e, isEvalSupported: t, fn: a });
 41426                const r = [];
 41427                for (const n of a)
 41428                  r.push(
 41429                    this.parse({
 41430                      xref: e,
 41431                      isEvalSupported: t,
 41432                      fn: e.fetchIfRef(n),
 41433                    }),
 41434                  );
 41435                return function (e, t, a, n) {
 41436                  for (let i = 0, s = r.length; i < s; i++) r[i](e, t, a, n + i);
 41437                };
 41438              }
 41439              static constructSampled({
 41440                xref: e,
 41441                isEvalSupported: t,
 41442                fn: a,
 41443                dict: r,
 41444              }) {
 41445                function toMultiArray(e) {
 41446                  const t = e.length,
 41447                    a = [];
 41448                  let r = 0;
 41449                  for (let n = 0; n < t; n += 2) a[r++] = [e[n], e[n + 1]];
 41450                  return a;
 41451                }
 41452                function interpolate(e, t, a, r, n) {
 41453                  return r + ((n - r) / (a - t)) * (e - t);
 41454                }
 41455                let i = toNumberArray(r.getArray("Domain")),
 41456                  s = toNumberArray(r.getArray("Range"));
 41457                if (!i || !s) throw new n.FormatError("No domain or range");
 41458                const o = i.length / 2,
 41459                  c = s.length / 2;
 41460                i = toMultiArray(i);
 41461                s = toMultiArray(s);
 41462                const l = toNumberArray(r.getArray("Size")),
 41463                  h = r.get("BitsPerSample"),
 41464                  u = r.get("Order") || 1;
 41465                1 !== u &&
 41466                  (0, n.info)("No support for cubic spline interpolation: " + u);
 41467                let d = toNumberArray(r.getArray("Encode"));
 41468                if (d) d = toMultiArray(d);
 41469                else {
 41470                  d = [];
 41471                  for (let e = 0; e < o; ++e) d.push([0, l[e] - 1]);
 41472                }
 41473                let f = toNumberArray(r.getArray("Decode"));
 41474                f = f ? toMultiArray(f) : s;
 41475                const g = this.getSampleArray(l, c, h, a);
 41476                return function constructSampledFn(e, t, a, r) {
 41477                  const n = 1 << o,
 41478                    h = new Float64Array(n),
 41479                    u = new Uint32Array(n);
 41480                  let p, m;
 41481                  for (m = 0; m < n; m++) h[m] = 1;
 41482                  let b = c,
 41483                    y = 1;
 41484                  for (p = 0; p < o; ++p) {
 41485                    const a = i[p][0],
 41486                      r = i[p][1];
 41487                    let s = interpolate(
 41488                      Math.min(Math.max(e[t + p], a), r),
 41489                      a,
 41490                      r,
 41491                      d[p][0],
 41492                      d[p][1],
 41493                    );
 41494                    const o = l[p];
 41495                    s = Math.min(Math.max(s, 0), o - 1);
 41496                    const c = s < o - 1 ? Math.floor(s) : s - 1,
 41497                      f = c + 1 - s,
 41498                      g = s - c,
 41499                      w = c * b,
 41500                      S = w + b;
 41501                    for (m = 0; m < n; m++)
 41502                      if (m & y) {
 41503                        h[m] *= g;
 41504                        u[m] += S;
 41505                      } else {
 41506                        h[m] *= f;
 41507                        u[m] += w;
 41508                      }
 41509                    b *= o;
 41510                    y <<= 1;
 41511                  }
 41512                  for (m = 0; m < c; ++m) {
 41513                    let e = 0;
 41514                    for (p = 0; p < n; p++) e += g[u[p] + m] * h[p];
 41515                    e = interpolate(e, 0, 1, f[m][0], f[m][1]);
 41516                    a[r + m] = Math.min(Math.max(e, s[m][0]), s[m][1]);
 41517                  }
 41518                };
 41519              }
 41520              static constructInterpolated({
 41521                xref: e,
 41522                isEvalSupported: t,
 41523                dict: a,
 41524              }) {
 41525                const r = toNumberArray(a.getArray("C0")) || [0],
 41526                  n = toNumberArray(a.getArray("C1")) || [1],
 41527                  i = a.get("N"),
 41528                  s = [];
 41529                for (let e = 0, t = r.length; e < t; ++e) s.push(n[e] - r[e]);
 41530                const o = s.length;
 41531                return function constructInterpolatedFn(e, t, a, n) {
 41532                  const c = 1 === i ? e[t] : e[t] ** i;
 41533                  for (let e = 0; e < o; ++e) a[n + e] = r[e] + c * s[e];
 41534                };
 41535              }
 41536              static constructStiched({ xref: e, isEvalSupported: t, dict: a }) {
 41537                const r = toNumberArray(a.getArray("Domain"));
 41538                if (!r) throw new n.FormatError("No domain");
 41539                if (1 !== r.length / 2)
 41540                  throw new n.FormatError("Bad domain for stiched function");
 41541                const i = [];
 41542                for (const r of a.get("Functions"))
 41543                  i.push(
 41544                    this.parse({
 41545                      xref: e,
 41546                      isEvalSupported: t,
 41547                      fn: e.fetchIfRef(r),
 41548                    }),
 41549                  );
 41550                const s = toNumberArray(a.getArray("Bounds")),
 41551                  o = toNumberArray(a.getArray("Encode")),
 41552                  c = new Float32Array(1);
 41553                return function constructStichedFn(e, t, a, n) {
 41554                  const l = (function constructStichedFromIRClip(e, t, a) {
 41555                      e > a ? (e = a) : e < t && (e = t);
 41556                      return e;
 41557                    })(e[t], r[0], r[1]),
 41558                    h = s.length;
 41559                  let u;
 41560                  for (u = 0; u < h && !(l < s[u]); ++u);
 41561                  let d = r[0];
 41562                  u > 0 && (d = s[u - 1]);
 41563                  let f = r[1];
 41564                  u < s.length && (f = s[u]);
 41565                  const g = o[2 * u],
 41566                    p = o[2 * u + 1];
 41567                  c[0] = d === f ? g : g + ((l - d) * (p - g)) / (f - d);
 41568                  i[u](c, 0, a, n);
 41569                };
 41570              }
 41571              static constructPostScript({
 41572                xref: e,
 41573                isEvalSupported: t,
 41574                fn: a,
 41575                dict: r,
 41576              }) {
 41577                const s = toNumberArray(r.getArray("Domain")),
 41578                  o = toNumberArray(r.getArray("Range"));
 41579                if (!s) throw new n.FormatError("No domain.");
 41580                if (!o) throw new n.FormatError("No range.");
 41581                const c = new i.PostScriptLexer(a),
 41582                  l = new i.PostScriptParser(c).parse();
 41583                if (t && n.FeatureTest.isEvalSupported) {
 41584                  const e = new PostScriptCompiler().compile(l, s, o);
 41585                  if (e)
 41586                    return new Function(
 41587                      "src",
 41588                      "srcOffset",
 41589                      "dest",
 41590                      "destOffset",
 41591                      e,
 41592                    );
 41593                }
 41594                (0, n.info)("Unable to compile PS function");
 41595                const h = o.length >> 1,
 41596                  u = s.length >> 1,
 41597                  d = new PostScriptEvaluator(l),
 41598                  f = Object.create(null);
 41599                let g = 8192;
 41600                const p = new Float32Array(u);
 41601                return function constructPostScriptFn(e, t, a, r) {
 41602                  let n,
 41603                    i,
 41604                    s = "";
 41605                  const c = p;
 41606                  for (n = 0; n < u; n++) {
 41607                    i = e[t + n];
 41608                    c[n] = i;
 41609                    s += i + "_";
 41610                  }
 41611                  const l = f[s];
 41612                  if (void 0 !== l) {
 41613                    a.set(l, r);
 41614                    return;
 41615                  }
 41616                  const m = new Float32Array(h),
 41617                    b = d.execute(c),
 41618                    y = b.length - h;
 41619                  for (n = 0; n < h; n++) {
 41620                    i = b[y + n];
 41621                    let e = o[2 * n];
 41622                    if (i < e) i = e;
 41623                    else {
 41624                      e = o[2 * n + 1];
 41625                      i > e && (i = e);
 41626                    }
 41627                    m[n] = i;
 41628                  }
 41629                  if (g > 0) {
 41630                    g--;
 41631                    f[s] = m;
 41632                  }
 41633                  a.set(m, r);
 41634                };
 41635              }
 41636            }
 41637            class PostScriptStack {
 41638              static MAX_STACK_SIZE = 100;
 41639              constructor(e) {
 41640                this.stack = e ? Array.from(e) : [];
 41641              }
 41642              push(e) {
 41643                if (this.stack.length >= PostScriptStack.MAX_STACK_SIZE)
 41644                  throw new Error("PostScript function stack overflow.");
 41645                this.stack.push(e);
 41646              }
 41647              pop() {
 41648                if (this.stack.length <= 0)
 41649                  throw new Error("PostScript function stack underflow.");
 41650                return this.stack.pop();
 41651              }
 41652              copy(e) {
 41653                if (this.stack.length + e >= PostScriptStack.MAX_STACK_SIZE)
 41654                  throw new Error("PostScript function stack overflow.");
 41655                const t = this.stack;
 41656                for (let a = t.length - e, r = e - 1; r >= 0; r--, a++)
 41657                  t.push(t[a]);
 41658              }
 41659              index(e) {
 41660                this.push(this.stack[this.stack.length - e - 1]);
 41661              }
 41662              roll(e, t) {
 41663                const a = this.stack,
 41664                  r = a.length - e,
 41665                  n = a.length - 1,
 41666                  i = r + (t - Math.floor(t / e) * e);
 41667                for (let e = r, t = n; e < t; e++, t--) {
 41668                  const r = a[e];
 41669                  a[e] = a[t];
 41670                  a[t] = r;
 41671                }
 41672                for (let e = r, t = i - 1; e < t; e++, t--) {
 41673                  const r = a[e];
 41674                  a[e] = a[t];
 41675                  a[t] = r;
 41676                }
 41677                for (let e = i, t = n; e < t; e++, t--) {
 41678                  const r = a[e];
 41679                  a[e] = a[t];
 41680                  a[t] = r;
 41681                }
 41682              }
 41683            }
 41684            class PostScriptEvaluator {
 41685              constructor(e) {
 41686                this.operators = e;
 41687              }
 41688              execute(e) {
 41689                const t = new PostScriptStack(e);
 41690                let a = 0;
 41691                const r = this.operators,
 41692                  i = r.length;
 41693                let s, o, c;
 41694                for (; a < i; ) {
 41695                  s = r[a++];
 41696                  if ("number" != typeof s)
 41697                    switch (s) {
 41698                      case "jz":
 41699                        c = t.pop();
 41700                        o = t.pop();
 41701                        o || (a = c);
 41702                        break;
 41703                      case "j":
 41704                        o = t.pop();
 41705                        a = o;
 41706                        break;
 41707                      case "abs":
 41708                        o = t.pop();
 41709                        t.push(Math.abs(o));
 41710                        break;
 41711                      case "add":
 41712                        c = t.pop();
 41713                        o = t.pop();
 41714                        t.push(o + c);
 41715                        break;
 41716                      case "and":
 41717                        c = t.pop();
 41718                        o = t.pop();
 41719                        "boolean" == typeof o && "boolean" == typeof c
 41720                          ? t.push(o && c)
 41721                          : t.push(o & c);
 41722                        break;
 41723                      case "atan":
 41724                        c = t.pop();
 41725                        o = t.pop();
 41726                        o = (Math.atan2(o, c) / Math.PI) * 180;
 41727                        o < 0 && (o += 360);
 41728                        t.push(o);
 41729                        break;
 41730                      case "bitshift":
 41731                        c = t.pop();
 41732                        o = t.pop();
 41733                        o > 0 ? t.push(o << c) : t.push(o >> c);
 41734                        break;
 41735                      case "ceiling":
 41736                        o = t.pop();
 41737                        t.push(Math.ceil(o));
 41738                        break;
 41739                      case "copy":
 41740                        o = t.pop();
 41741                        t.copy(o);
 41742                        break;
 41743                      case "cos":
 41744                        o = t.pop();
 41745                        t.push(Math.cos(((o % 360) / 180) * Math.PI));
 41746                        break;
 41747                      case "cvi":
 41748                        o = 0 | t.pop();
 41749                        t.push(o);
 41750                        break;
 41751                      case "cvr":
 41752                        break;
 41753                      case "div":
 41754                        c = t.pop();
 41755                        o = t.pop();
 41756                        t.push(o / c);
 41757                        break;
 41758                      case "dup":
 41759                        t.copy(1);
 41760                        break;
 41761                      case "eq":
 41762                        c = t.pop();
 41763                        o = t.pop();
 41764                        t.push(o === c);
 41765                        break;
 41766                      case "exch":
 41767                        t.roll(2, 1);
 41768                        break;
 41769                      case "exp":
 41770                        c = t.pop();
 41771                        o = t.pop();
 41772                        t.push(o ** c);
 41773                        break;
 41774                      case "false":
 41775                        t.push(!1);
 41776                        break;
 41777                      case "floor":
 41778                        o = t.pop();
 41779                        t.push(Math.floor(o));
 41780                        break;
 41781                      case "ge":
 41782                        c = t.pop();
 41783                        o = t.pop();
 41784                        t.push(o >= c);
 41785                        break;
 41786                      case "gt":
 41787                        c = t.pop();
 41788                        o = t.pop();
 41789                        t.push(o > c);
 41790                        break;
 41791                      case "idiv":
 41792                        c = t.pop();
 41793                        o = t.pop();
 41794                        t.push((o / c) | 0);
 41795                        break;
 41796                      case "index":
 41797                        o = t.pop();
 41798                        t.index(o);
 41799                        break;
 41800                      case "le":
 41801                        c = t.pop();
 41802                        o = t.pop();
 41803                        t.push(o <= c);
 41804                        break;
 41805                      case "ln":
 41806                        o = t.pop();
 41807                        t.push(Math.log(o));
 41808                        break;
 41809                      case "log":
 41810                        o = t.pop();
 41811                        t.push(Math.log10(o));
 41812                        break;
 41813                      case "lt":
 41814                        c = t.pop();
 41815                        o = t.pop();
 41816                        t.push(o < c);
 41817                        break;
 41818                      case "mod":
 41819                        c = t.pop();
 41820                        o = t.pop();
 41821                        t.push(o % c);
 41822                        break;
 41823                      case "mul":
 41824                        c = t.pop();
 41825                        o = t.pop();
 41826                        t.push(o * c);
 41827                        break;
 41828                      case "ne":
 41829                        c = t.pop();
 41830                        o = t.pop();
 41831                        t.push(o !== c);
 41832                        break;
 41833                      case "neg":
 41834                        o = t.pop();
 41835                        t.push(-o);
 41836                        break;
 41837                      case "not":
 41838                        o = t.pop();
 41839                        "boolean" == typeof o ? t.push(!o) : t.push(~o);
 41840                        break;
 41841                      case "or":
 41842                        c = t.pop();
 41843                        o = t.pop();
 41844                        "boolean" == typeof o && "boolean" == typeof c
 41845                          ? t.push(o || c)
 41846                          : t.push(o | c);
 41847                        break;
 41848                      case "pop":
 41849                        t.pop();
 41850                        break;
 41851                      case "roll":
 41852                        c = t.pop();
 41853                        o = t.pop();
 41854                        t.roll(o, c);
 41855                        break;
 41856                      case "round":
 41857                        o = t.pop();
 41858                        t.push(Math.round(o));
 41859                        break;
 41860                      case "sin":
 41861                        o = t.pop();
 41862                        t.push(Math.sin(((o % 360) / 180) * Math.PI));
 41863                        break;
 41864                      case "sqrt":
 41865                        o = t.pop();
 41866                        t.push(Math.sqrt(o));
 41867                        break;
 41868                      case "sub":
 41869                        c = t.pop();
 41870                        o = t.pop();
 41871                        t.push(o - c);
 41872                        break;
 41873                      case "true":
 41874                        t.push(!0);
 41875                        break;
 41876                      case "truncate":
 41877                        o = t.pop();
 41878                        o = o < 0 ? Math.ceil(o) : Math.floor(o);
 41879                        t.push(o);
 41880                        break;
 41881                      case "xor":
 41882                        c = t.pop();
 41883                        o = t.pop();
 41884                        "boolean" == typeof o && "boolean" == typeof c
 41885                          ? t.push(o !== c)
 41886                          : t.push(o ^ c);
 41887                        break;
 41888                      default:
 41889                        throw new n.FormatError(`Unknown operator ${s}`);
 41890                    }
 41891                  else t.push(s);
 41892                }
 41893                return t.stack;
 41894              }
 41895            }
 41896            t.PostScriptEvaluator = PostScriptEvaluator;
 41897            class AstNode {
 41898              constructor(e) {
 41899                this.type = e;
 41900              }
 41901              visit(e) {
 41902                (0, n.unreachable)("abstract method");
 41903              }
 41904            }
 41905            class AstArgument extends AstNode {
 41906              constructor(e, t, a) {
 41907                super("args");
 41908                this.index = e;
 41909                this.min = t;
 41910                this.max = a;
 41911              }
 41912              visit(e) {
 41913                e.visitArgument(this);
 41914              }
 41915            }
 41916            class AstLiteral extends AstNode {
 41917              constructor(e) {
 41918                super("literal");
 41919                this.number = e;
 41920                this.min = e;
 41921                this.max = e;
 41922              }
 41923              visit(e) {
 41924                e.visitLiteral(this);
 41925              }
 41926            }
 41927            class AstBinaryOperation extends AstNode {
 41928              constructor(e, t, a, r, n) {
 41929                super("binary");
 41930                this.op = e;
 41931                this.arg1 = t;
 41932                this.arg2 = a;
 41933                this.min = r;
 41934                this.max = n;
 41935              }
 41936              visit(e) {
 41937                e.visitBinaryOperation(this);
 41938              }
 41939            }
 41940            class AstMin extends AstNode {
 41941              constructor(e, t) {
 41942                super("max");
 41943                this.arg = e;
 41944                this.min = e.min;
 41945                this.max = t;
 41946              }
 41947              visit(e) {
 41948                e.visitMin(this);
 41949              }
 41950            }
 41951            class AstVariable extends AstNode {
 41952              constructor(e, t, a) {
 41953                super("var");
 41954                this.index = e;
 41955                this.min = t;
 41956                this.max = a;
 41957              }
 41958              visit(e) {
 41959                e.visitVariable(this);
 41960              }
 41961            }
 41962            class AstVariableDefinition extends AstNode {
 41963              constructor(e, t) {
 41964                super("definition");
 41965                this.variable = e;
 41966                this.arg = t;
 41967              }
 41968              visit(e) {
 41969                e.visitVariableDefinition(this);
 41970              }
 41971            }
 41972            class ExpressionBuilderVisitor {
 41973              constructor() {
 41974                this.parts = [];
 41975              }
 41976              visitArgument(e) {
 41977                this.parts.push(
 41978                  "Math.max(",
 41979                  e.min,
 41980                  ", Math.min(",
 41981                  e.max,
 41982                  ", src[srcOffset + ",
 41983                  e.index,
 41984                  "]))",
 41985                );
 41986              }
 41987              visitVariable(e) {
 41988                this.parts.push("v", e.index);
 41989              }
 41990              visitLiteral(e) {
 41991                this.parts.push(e.number);
 41992              }
 41993              visitBinaryOperation(e) {
 41994                this.parts.push("(");
 41995                e.arg1.visit(this);
 41996                this.parts.push(" ", e.op, " ");
 41997                e.arg2.visit(this);
 41998                this.parts.push(")");
 41999              }
 42000              visitVariableDefinition(e) {
 42001                this.parts.push("var ");
 42002                e.variable.visit(this);
 42003                this.parts.push(" = ");
 42004                e.arg.visit(this);
 42005                this.parts.push(";");
 42006              }
 42007              visitMin(e) {
 42008                this.parts.push("Math.min(");
 42009                e.arg.visit(this);
 42010                this.parts.push(", ", e.max, ")");
 42011              }
 42012              toString() {
 42013                return this.parts.join("");
 42014              }
 42015            }
 42016            function buildAddOperation(e, t) {
 42017              return "literal" === t.type && 0 === t.number
 42018                ? e
 42019                : "literal" === e.type && 0 === e.number
 42020                  ? t
 42021                  : "literal" === t.type && "literal" === e.type
 42022                    ? new AstLiteral(e.number + t.number)
 42023                    : new AstBinaryOperation(
 42024                        "+",
 42025                        e,
 42026                        t,
 42027                        e.min + t.min,
 42028                        e.max + t.max,
 42029                      );
 42030            }
 42031            function buildMulOperation(e, t) {
 42032              if ("literal" === t.type) {
 42033                if (0 === t.number) return new AstLiteral(0);
 42034                if (1 === t.number) return e;
 42035                if ("literal" === e.type)
 42036                  return new AstLiteral(e.number * t.number);
 42037              }
 42038              if ("literal" === e.type) {
 42039                if (0 === e.number) return new AstLiteral(0);
 42040                if (1 === e.number) return t;
 42041              }
 42042              const a = Math.min(
 42043                  e.min * t.min,
 42044                  e.min * t.max,
 42045                  e.max * t.min,
 42046                  e.max * t.max,
 42047                ),
 42048                r = Math.max(
 42049                  e.min * t.min,
 42050                  e.min * t.max,
 42051                  e.max * t.min,
 42052                  e.max * t.max,
 42053                );
 42054              return new AstBinaryOperation("*", e, t, a, r);
 42055            }
 42056            function buildSubOperation(e, t) {
 42057              if ("literal" === t.type) {
 42058                if (0 === t.number) return e;
 42059                if ("literal" === e.type)
 42060                  return new AstLiteral(e.number - t.number);
 42061              }
 42062              return "binary" === t.type &&
 42063                "-" === t.op &&
 42064                "literal" === e.type &&
 42065                1 === e.number &&
 42066                "literal" === t.arg1.type &&
 42067                1 === t.arg1.number
 42068                ? t.arg2
 42069                : new AstBinaryOperation("-", e, t, e.min - t.max, e.max - t.min);
 42070            }
 42071            function buildMinOperation(e, t) {
 42072              return e.min >= t
 42073                ? new AstLiteral(t)
 42074                : e.max <= t
 42075                  ? e
 42076                  : new AstMin(e, t);
 42077            }
 42078            class PostScriptCompiler {
 42079              compile(e, t, a) {
 42080                const r = [],
 42081                  n = [],
 42082                  i = t.length >> 1,
 42083                  s = a.length >> 1;
 42084                let o,
 42085                  c,
 42086                  l,
 42087                  h,
 42088                  u,
 42089                  d,
 42090                  f,
 42091                  g,
 42092                  p = 0;
 42093                for (let e = 0; e < i; e++)
 42094                  r.push(new AstArgument(e, t[2 * e], t[2 * e + 1]));
 42095                for (let t = 0, a = e.length; t < a; t++) {
 42096                  g = e[t];
 42097                  if ("number" != typeof g)
 42098                    switch (g) {
 42099                      case "add":
 42100                        if (r.length < 2) return null;
 42101                        h = r.pop();
 42102                        l = r.pop();
 42103                        r.push(buildAddOperation(l, h));
 42104                        break;
 42105                      case "cvr":
 42106                        if (r.length < 1) return null;
 42107                        break;
 42108                      case "mul":
 42109                        if (r.length < 2) return null;
 42110                        h = r.pop();
 42111                        l = r.pop();
 42112                        r.push(buildMulOperation(l, h));
 42113                        break;
 42114                      case "sub":
 42115                        if (r.length < 2) return null;
 42116                        h = r.pop();
 42117                        l = r.pop();
 42118                        r.push(buildSubOperation(l, h));
 42119                        break;
 42120                      case "exch":
 42121                        if (r.length < 2) return null;
 42122                        u = r.pop();
 42123                        d = r.pop();
 42124                        r.push(u, d);
 42125                        break;
 42126                      case "pop":
 42127                        if (r.length < 1) return null;
 42128                        r.pop();
 42129                        break;
 42130                      case "index":
 42131                        if (r.length < 1) return null;
 42132                        l = r.pop();
 42133                        if ("literal" !== l.type) return null;
 42134                        o = l.number;
 42135                        if (o < 0 || !Number.isInteger(o) || r.length < o)
 42136                          return null;
 42137                        u = r[r.length - o - 1];
 42138                        if ("literal" === u.type || "var" === u.type) {
 42139                          r.push(u);
 42140                          break;
 42141                        }
 42142                        f = new AstVariable(p++, u.min, u.max);
 42143                        r[r.length - o - 1] = f;
 42144                        r.push(f);
 42145                        n.push(new AstVariableDefinition(f, u));
 42146                        break;
 42147                      case "dup":
 42148                        if (r.length < 1) return null;
 42149                        if (
 42150                          "number" == typeof e[t + 1] &&
 42151                          "gt" === e[t + 2] &&
 42152                          e[t + 3] === t + 7 &&
 42153                          "jz" === e[t + 4] &&
 42154                          "pop" === e[t + 5] &&
 42155                          e[t + 6] === e[t + 1]
 42156                        ) {
 42157                          l = r.pop();
 42158                          r.push(buildMinOperation(l, e[t + 1]));
 42159                          t += 6;
 42160                          break;
 42161                        }
 42162                        u = r.at(-1);
 42163                        if ("literal" === u.type || "var" === u.type) {
 42164                          r.push(u);
 42165                          break;
 42166                        }
 42167                        f = new AstVariable(p++, u.min, u.max);
 42168                        r[r.length - 1] = f;
 42169                        r.push(f);
 42170                        n.push(new AstVariableDefinition(f, u));
 42171                        break;
 42172                      case "roll":
 42173                        if (r.length < 2) return null;
 42174                        h = r.pop();
 42175                        l = r.pop();
 42176                        if ("literal" !== h.type || "literal" !== l.type)
 42177                          return null;
 42178                        c = h.number;
 42179                        o = l.number;
 42180                        if (
 42181                          o <= 0 ||
 42182                          !Number.isInteger(o) ||
 42183                          !Number.isInteger(c) ||
 42184                          r.length < o
 42185                        )
 42186                          return null;
 42187                        c = ((c % o) + o) % o;
 42188                        if (0 === c) break;
 42189                        r.push(...r.splice(r.length - o, o - c));
 42190                        break;
 42191                      default:
 42192                        return null;
 42193                    }
 42194                  else r.push(new AstLiteral(g));
 42195                }
 42196                if (r.length !== s) return null;
 42197                const m = [];
 42198                for (const e of n) {
 42199                  const t = new ExpressionBuilderVisitor();
 42200                  e.visit(t);
 42201                  m.push(t.toString());
 42202                }
 42203                for (let e = 0, t = r.length; e < t; e++) {
 42204                  const t = r[e],
 42205                    n = new ExpressionBuilderVisitor();
 42206                  t.visit(n);
 42207                  const i = a[2 * e],
 42208                    s = a[2 * e + 1],
 42209                    o = [n.toString()];
 42210                  if (i > t.min) {
 42211                    o.unshift("Math.max(", i, ", ");
 42212                    o.push(")");
 42213                  }
 42214                  if (s < t.max) {
 42215                    o.unshift("Math.min(", s, ", ");
 42216                    o.push(")");
 42217                  }
 42218                  o.unshift("dest[destOffset + ", e, "] = ");
 42219                  o.push(";");
 42220                  m.push(o.join(""));
 42221                }
 42222                return m.join("\n");
 42223              }
 42224            }
 42225            t.PostScriptCompiler = PostScriptCompiler;
 42226          },
 42227          (e, t, a) => {
 42228            Object.defineProperty(t, "__esModule", { value: !0 });
 42229            t.PostScriptParser = t.PostScriptLexer = void 0;
 42230            var r = a(2),
 42231              n = a(4),
 42232              i = a(3);
 42233            t.PostScriptParser = class PostScriptParser {
 42234              constructor(e) {
 42235                this.lexer = e;
 42236                this.operators = [];
 42237                this.token = null;
 42238                this.prev = null;
 42239              }
 42240              nextToken() {
 42241                this.prev = this.token;
 42242                this.token = this.lexer.getToken();
 42243              }
 42244              accept(e) {
 42245                if (this.token.type === e) {
 42246                  this.nextToken();
 42247                  return !0;
 42248                }
 42249                return !1;
 42250              }
 42251              expect(e) {
 42252                if (this.accept(e)) return !0;
 42253                throw new r.FormatError(
 42254                  `Unexpected symbol: found ${this.token.type} expected ${e}.`,
 42255                );
 42256              }
 42257              parse() {
 42258                this.nextToken();
 42259                this.expect(s.LBRACE);
 42260                this.parseBlock();
 42261                this.expect(s.RBRACE);
 42262                return this.operators;
 42263              }
 42264              parseBlock() {
 42265                for (;;)
 42266                  if (this.accept(s.NUMBER)) this.operators.push(this.prev.value);
 42267                  else if (this.accept(s.OPERATOR))
 42268                    this.operators.push(this.prev.value);
 42269                  else {
 42270                    if (!this.accept(s.LBRACE)) return;
 42271                    this.parseCondition();
 42272                  }
 42273              }
 42274              parseCondition() {
 42275                const e = this.operators.length;
 42276                this.operators.push(null, null);
 42277                this.parseBlock();
 42278                this.expect(s.RBRACE);
 42279                if (this.accept(s.IF)) {
 42280                  this.operators[e] = this.operators.length;
 42281                  this.operators[e + 1] = "jz";
 42282                } else {
 42283                  if (!this.accept(s.LBRACE))
 42284                    throw new r.FormatError(
 42285                      "PS Function: error parsing conditional.",
 42286                    );
 42287                  {
 42288                    const t = this.operators.length;
 42289                    this.operators.push(null, null);
 42290                    const a = this.operators.length;
 42291                    this.parseBlock();
 42292                    this.expect(s.RBRACE);
 42293                    this.expect(s.IFELSE);
 42294                    this.operators[t] = this.operators.length;
 42295                    this.operators[t + 1] = "j";
 42296                    this.operators[e] = a;
 42297                    this.operators[e + 1] = "jz";
 42298                  }
 42299                }
 42300              }
 42301            };
 42302            const s = {
 42303              LBRACE: 0,
 42304              RBRACE: 1,
 42305              NUMBER: 2,
 42306              OPERATOR: 3,
 42307              IF: 4,
 42308              IFELSE: 5,
 42309            };
 42310            class PostScriptToken {
 42311              static get opCache() {
 42312                return (0, r.shadow)(this, "opCache", Object.create(null));
 42313              }
 42314              constructor(e, t) {
 42315                this.type = e;
 42316                this.value = t;
 42317              }
 42318              static getOperator(e) {
 42319                return (PostScriptToken.opCache[e] ||= new PostScriptToken(
 42320                  s.OPERATOR,
 42321                  e,
 42322                ));
 42323              }
 42324              static get LBRACE() {
 42325                return (0, r.shadow)(
 42326                  this,
 42327                  "LBRACE",
 42328                  new PostScriptToken(s.LBRACE, "{"),
 42329                );
 42330              }
 42331              static get RBRACE() {
 42332                return (0, r.shadow)(
 42333                  this,
 42334                  "RBRACE",
 42335                  new PostScriptToken(s.RBRACE, "}"),
 42336                );
 42337              }
 42338              static get IF() {
 42339                return (0, r.shadow)(this, "IF", new PostScriptToken(s.IF, "IF"));
 42340              }
 42341              static get IFELSE() {
 42342                return (0, r.shadow)(
 42343                  this,
 42344                  "IFELSE",
 42345                  new PostScriptToken(s.IFELSE, "IFELSE"),
 42346                );
 42347              }
 42348            }
 42349            t.PostScriptLexer = class PostScriptLexer {
 42350              constructor(e) {
 42351                this.stream = e;
 42352                this.nextChar();
 42353                this.strBuf = [];
 42354              }
 42355              nextChar() {
 42356                return (this.currentChar = this.stream.getByte());
 42357              }
 42358              getToken() {
 42359                let e = !1,
 42360                  t = this.currentChar;
 42361                for (;;) {
 42362                  if (t < 0) return n.EOF;
 42363                  if (e) (10 !== t && 13 !== t) || (e = !1);
 42364                  else if (37 === t) e = !0;
 42365                  else if (!(0, i.isWhiteSpace)(t)) break;
 42366                  t = this.nextChar();
 42367                }
 42368                switch (0 | t) {
 42369                  case 48:
 42370                  case 49:
 42371                  case 50:
 42372                  case 51:
 42373                  case 52:
 42374                  case 53:
 42375                  case 54:
 42376                  case 55:
 42377                  case 56:
 42378                  case 57:
 42379                  case 43:
 42380                  case 45:
 42381                  case 46:
 42382                    return new PostScriptToken(s.NUMBER, this.getNumber());
 42383                  case 123:
 42384                    this.nextChar();
 42385                    return PostScriptToken.LBRACE;
 42386                  case 125:
 42387                    this.nextChar();
 42388                    return PostScriptToken.RBRACE;
 42389                }
 42390                const a = this.strBuf;
 42391                a.length = 0;
 42392                a[0] = String.fromCharCode(t);
 42393                for (
 42394                  ;
 42395                  (t = this.nextChar()) >= 0 &&
 42396                  ((t >= 65 && t <= 90) || (t >= 97 && t <= 122));
 42397  
 42398                )
 42399                  a.push(String.fromCharCode(t));
 42400                const r = a.join("");
 42401                switch (r.toLowerCase()) {
 42402                  case "if":
 42403                    return PostScriptToken.IF;
 42404                  case "ifelse":
 42405                    return PostScriptToken.IFELSE;
 42406                  default:
 42407                    return PostScriptToken.getOperator(r);
 42408                }
 42409              }
 42410              getNumber() {
 42411                let e = this.currentChar;
 42412                const t = this.strBuf;
 42413                t.length = 0;
 42414                t[0] = String.fromCharCode(e);
 42415                for (
 42416                  ;
 42417                  (e = this.nextChar()) >= 0 &&
 42418                  ((e >= 48 && e <= 57) || 45 === e || 46 === e);
 42419  
 42420                )
 42421                  t.push(String.fromCharCode(e));
 42422                const a = parseFloat(t.join(""));
 42423                if (isNaN(a))
 42424                  throw new r.FormatError(`Invalid floating point number: ${a}`);
 42425                return a;
 42426              }
 42427            };
 42428          },
 42429          (e, t, a) => {
 42430            Object.defineProperty(t, "__esModule", { value: !0 });
 42431            t.RegionalImageCache =
 42432              t.LocalTilingPatternCache =
 42433              t.LocalImageCache =
 42434              t.LocalGStateCache =
 42435              t.LocalFunctionCache =
 42436              t.LocalColorSpaceCache =
 42437              t.GlobalImageCache =
 42438                void 0;
 42439            var r = a(2),
 42440              n = a(4);
 42441            class BaseLocalCache {
 42442              constructor(e) {
 42443                this.constructor === BaseLocalCache &&
 42444                  (0, r.unreachable)("Cannot initialize BaseLocalCache.");
 42445                this._onlyRefs = !0 === e?.onlyRefs;
 42446                if (!this._onlyRefs) {
 42447                  this._nameRefMap = new Map();
 42448                  this._imageMap = new Map();
 42449                }
 42450                this._imageCache = new n.RefSetCache();
 42451              }
 42452              getByName(e) {
 42453                this._onlyRefs &&
 42454                  (0, r.unreachable)("Should not call `getByName` method.");
 42455                const t = this._nameRefMap.get(e);
 42456                return t ? this.getByRef(t) : this._imageMap.get(e) || null;
 42457              }
 42458              getByRef(e) {
 42459                return this._imageCache.get(e) || null;
 42460              }
 42461              set(e, t, a) {
 42462                (0, r.unreachable)("Abstract method `set` called.");
 42463              }
 42464            }
 42465            t.LocalImageCache = class LocalImageCache extends BaseLocalCache {
 42466              set(e, t = null, a) {
 42467                if ("string" != typeof e)
 42468                  throw new Error(
 42469                    'LocalImageCache.set - expected "name" argument.',
 42470                  );
 42471                if (t) {
 42472                  if (this._imageCache.has(t)) return;
 42473                  this._nameRefMap.set(e, t);
 42474                  this._imageCache.put(t, a);
 42475                } else this._imageMap.has(e) || this._imageMap.set(e, a);
 42476              }
 42477            };
 42478            t.LocalColorSpaceCache = class LocalColorSpaceCache extends (
 42479              BaseLocalCache
 42480            ) {
 42481              set(e = null, t = null, a) {
 42482                if ("string" != typeof e && !t)
 42483                  throw new Error(
 42484                    'LocalColorSpaceCache.set - expected "name" and/or "ref" argument.',
 42485                  );
 42486                if (t) {
 42487                  if (this._imageCache.has(t)) return;
 42488                  null !== e && this._nameRefMap.set(e, t);
 42489                  this._imageCache.put(t, a);
 42490                } else this._imageMap.has(e) || this._imageMap.set(e, a);
 42491              }
 42492            };
 42493            t.LocalFunctionCache = class LocalFunctionCache extends (
 42494              BaseLocalCache
 42495            ) {
 42496              constructor(e) {
 42497                super({ onlyRefs: !0 });
 42498              }
 42499              set(e = null, t, a) {
 42500                if (!t)
 42501                  throw new Error(
 42502                    'LocalFunctionCache.set - expected "ref" argument.',
 42503                  );
 42504                this._imageCache.has(t) || this._imageCache.put(t, a);
 42505              }
 42506            };
 42507            t.LocalGStateCache = class LocalGStateCache extends BaseLocalCache {
 42508              set(e, t = null, a) {
 42509                if ("string" != typeof e)
 42510                  throw new Error(
 42511                    'LocalGStateCache.set - expected "name" argument.',
 42512                  );
 42513                if (t) {
 42514                  if (this._imageCache.has(t)) return;
 42515                  this._nameRefMap.set(e, t);
 42516                  this._imageCache.put(t, a);
 42517                } else this._imageMap.has(e) || this._imageMap.set(e, a);
 42518              }
 42519            };
 42520            t.LocalTilingPatternCache = class LocalTilingPatternCache extends (
 42521              BaseLocalCache
 42522            ) {
 42523              constructor(e) {
 42524                super({ onlyRefs: !0 });
 42525              }
 42526              set(e = null, t, a) {
 42527                if (!t)
 42528                  throw new Error(
 42529                    'LocalTilingPatternCache.set - expected "ref" argument.',
 42530                  );
 42531                this._imageCache.has(t) || this._imageCache.put(t, a);
 42532              }
 42533            };
 42534            t.RegionalImageCache = class RegionalImageCache extends (
 42535              BaseLocalCache
 42536            ) {
 42537              constructor(e) {
 42538                super({ onlyRefs: !0 });
 42539              }
 42540              set(e = null, t, a) {
 42541                if (!t)
 42542                  throw new Error(
 42543                    'RegionalImageCache.set - expected "ref" argument.',
 42544                  );
 42545                this._imageCache.has(t) || this._imageCache.put(t, a);
 42546              }
 42547            };
 42548            class GlobalImageCache {
 42549              static NUM_PAGES_THRESHOLD = 2;
 42550              static MIN_IMAGES_TO_CACHE = 10;
 42551              static MAX_BYTE_SIZE = 5 * r.MAX_IMAGE_SIZE_TO_CACHE;
 42552              constructor() {
 42553                this._refCache = new n.RefSetCache();
 42554                this._imageCache = new n.RefSetCache();
 42555              }
 42556              get _byteSize() {
 42557                let e = 0;
 42558                for (const t of this._imageCache) e += t.byteSize;
 42559                return e;
 42560              }
 42561              get _cacheLimitReached() {
 42562                return (
 42563                  !(
 42564                    this._imageCache.size < GlobalImageCache.MIN_IMAGES_TO_CACHE
 42565                  ) && !(this._byteSize < GlobalImageCache.MAX_BYTE_SIZE)
 42566                );
 42567              }
 42568              shouldCache(e, t) {
 42569                let a = this._refCache.get(e);
 42570                if (!a) {
 42571                  a = new Set();
 42572                  this._refCache.put(e, a);
 42573                }
 42574                a.add(t);
 42575                return (
 42576                  !(a.size < GlobalImageCache.NUM_PAGES_THRESHOLD) &&
 42577                  !(!this._imageCache.has(e) && this._cacheLimitReached)
 42578                );
 42579              }
 42580              addByteSize(e, t) {
 42581                const a = this._imageCache.get(e);
 42582                a && (a.byteSize || (a.byteSize = t));
 42583              }
 42584              getData(e, t) {
 42585                const a = this._refCache.get(e);
 42586                if (!a) return null;
 42587                if (a.size < GlobalImageCache.NUM_PAGES_THRESHOLD) return null;
 42588                const r = this._imageCache.get(e);
 42589                if (!r) return null;
 42590                a.add(t);
 42591                return r;
 42592              }
 42593              setData(e, t) {
 42594                if (!this._refCache.has(e))
 42595                  throw new Error(
 42596                    'GlobalImageCache.setData - expected "shouldCache" to have been called.',
 42597                  );
 42598                this._imageCache.has(e) ||
 42599                  (this._cacheLimitReached
 42600                    ? (0, r.warn)(
 42601                        "GlobalImageCache.setData - cache limit reached.",
 42602                      )
 42603                    : this._imageCache.put(e, t));
 42604              }
 42605              clear(e = !1) {
 42606                e || this._refCache.clear();
 42607                this._imageCache.clear();
 42608              }
 42609            }
 42610            t.GlobalImageCache = GlobalImageCache;
 42611          },
 42612          (e, t, a) => {
 42613            Object.defineProperty(t, "__esModule", { value: !0 });
 42614            t.bidi = function bidi(e, t = -1, a = !1) {
 42615              let c = !0;
 42616              const l = e.length;
 42617              if (0 === l || a) return createBidiText(e, c, a);
 42618              s.length = l;
 42619              o.length = l;
 42620              let h,
 42621                u,
 42622                d = 0;
 42623              for (h = 0; h < l; ++h) {
 42624                s[h] = e.charAt(h);
 42625                const t = e.charCodeAt(h);
 42626                let a = "L";
 42627                if (t <= 255) a = n[t];
 42628                else if (1424 <= t && t <= 1524) a = "R";
 42629                else if (1536 <= t && t <= 1791) {
 42630                  a = i[255 & t];
 42631                  a ||
 42632                    (0, r.warn)(
 42633                      "Bidi: invalid Unicode character " + t.toString(16),
 42634                    );
 42635                } else
 42636                  ((1792 <= t && t <= 2220) ||
 42637                    (64336 <= t && t <= 65023) ||
 42638                    (65136 <= t && t <= 65279)) &&
 42639                    (a = "AL");
 42640                ("R" !== a && "AL" !== a && "AN" !== a) || d++;
 42641                o[h] = a;
 42642              }
 42643              if (0 === d) {
 42644                c = !0;
 42645                return createBidiText(e, c);
 42646              }
 42647              if (-1 === t)
 42648                if (d / l < 0.3 && l > 4) {
 42649                  c = !0;
 42650                  t = 0;
 42651                } else {
 42652                  c = !1;
 42653                  t = 1;
 42654                }
 42655              const f = [];
 42656              for (h = 0; h < l; ++h) f[h] = t;
 42657              const g = isOdd(t) ? "R" : "L",
 42658                p = g,
 42659                m = p;
 42660              let b,
 42661                y = p;
 42662              for (h = 0; h < l; ++h) "NSM" === o[h] ? (o[h] = y) : (y = o[h]);
 42663              y = p;
 42664              for (h = 0; h < l; ++h) {
 42665                b = o[h];
 42666                "EN" === b
 42667                  ? (o[h] = "AL" === y ? "AN" : "EN")
 42668                  : ("R" !== b && "L" !== b && "AL" !== b) || (y = b);
 42669              }
 42670              for (h = 0; h < l; ++h) {
 42671                b = o[h];
 42672                "AL" === b && (o[h] = "R");
 42673              }
 42674              for (h = 1; h < l - 1; ++h) {
 42675                "ES" === o[h] &&
 42676                  "EN" === o[h - 1] &&
 42677                  "EN" === o[h + 1] &&
 42678                  (o[h] = "EN");
 42679                "CS" !== o[h] ||
 42680                  ("EN" !== o[h - 1] && "AN" !== o[h - 1]) ||
 42681                  o[h + 1] !== o[h - 1] ||
 42682                  (o[h] = o[h - 1]);
 42683              }
 42684              for (h = 0; h < l; ++h)
 42685                if ("EN" === o[h]) {
 42686                  for (let e = h - 1; e >= 0 && "ET" === o[e]; --e) o[e] = "EN";
 42687                  for (let e = h + 1; e < l && "ET" === o[e]; ++e) o[e] = "EN";
 42688                }
 42689              for (h = 0; h < l; ++h) {
 42690                b = o[h];
 42691                ("WS" !== b && "ES" !== b && "ET" !== b && "CS" !== b) ||
 42692                  (o[h] = "ON");
 42693              }
 42694              y = p;
 42695              for (h = 0; h < l; ++h) {
 42696                b = o[h];
 42697                "EN" === b
 42698                  ? (o[h] = "L" === y ? "L" : "EN")
 42699                  : ("R" !== b && "L" !== b) || (y = b);
 42700              }
 42701              for (h = 0; h < l; ++h)
 42702                if ("ON" === o[h]) {
 42703                  const e = findUnequal(o, h + 1, "ON");
 42704                  let t = p;
 42705                  h > 0 && (t = o[h - 1]);
 42706                  let a = m;
 42707                  e + 1 < l && (a = o[e + 1]);
 42708                  "L" !== t && (t = "R");
 42709                  "L" !== a && (a = "R");
 42710                  t === a && setValues(o, h, e, t);
 42711                  h = e - 1;
 42712                }
 42713              for (h = 0; h < l; ++h) "ON" === o[h] && (o[h] = g);
 42714              for (h = 0; h < l; ++h) {
 42715                b = o[h];
 42716                isEven(f[h])
 42717                  ? "R" === b
 42718                    ? (f[h] += 1)
 42719                    : ("AN" !== b && "EN" !== b) || (f[h] += 2)
 42720                  : ("L" !== b && "AN" !== b && "EN" !== b) || (f[h] += 1);
 42721              }
 42722              let w,
 42723                S = -1,
 42724                x = 99;
 42725              for (h = 0, u = f.length; h < u; ++h) {
 42726                w = f[h];
 42727                S < w && (S = w);
 42728                x > w && isOdd(w) && (x = w);
 42729              }
 42730              for (w = S; w >= x; --w) {
 42731                let e = -1;
 42732                for (h = 0, u = f.length; h < u; ++h)
 42733                  if (f[h] < w) {
 42734                    if (e >= 0) {
 42735                      reverseValues(s, e, h);
 42736                      e = -1;
 42737                    }
 42738                  } else e < 0 && (e = h);
 42739                e >= 0 && reverseValues(s, e, f.length);
 42740              }
 42741              for (h = 0, u = s.length; h < u; ++h) {
 42742                const e = s[h];
 42743                ("<" !== e && ">" !== e) || (s[h] = "");
 42744              }
 42745              return createBidiText(s.join(""), c);
 42746            };
 42747            var r = a(2);
 42748            const n = [
 42749                "BN",
 42750                "BN",
 42751                "BN",
 42752                "BN",
 42753                "BN",
 42754                "BN",
 42755                "BN",
 42756                "BN",
 42757                "BN",
 42758                "S",
 42759                "B",
 42760                "S",
 42761                "WS",
 42762                "B",
 42763                "BN",
 42764                "BN",
 42765                "BN",
 42766                "BN",
 42767                "BN",
 42768                "BN",
 42769                "BN",
 42770                "BN",
 42771                "BN",
 42772                "BN",
 42773                "BN",
 42774                "BN",
 42775                "BN",
 42776                "BN",
 42777                "B",
 42778                "B",
 42779                "B",
 42780                "S",
 42781                "WS",
 42782                "ON",
 42783                "ON",
 42784                "ET",
 42785                "ET",
 42786                "ET",
 42787                "ON",
 42788                "ON",
 42789                "ON",
 42790                "ON",
 42791                "ON",
 42792                "ES",
 42793                "CS",
 42794                "ES",
 42795                "CS",
 42796                "CS",
 42797                "EN",
 42798                "EN",
 42799                "EN",
 42800                "EN",
 42801                "EN",
 42802                "EN",
 42803                "EN",
 42804                "EN",
 42805                "EN",
 42806                "EN",
 42807                "CS",
 42808                "ON",
 42809                "ON",
 42810                "ON",
 42811                "ON",
 42812                "ON",
 42813                "ON",
 42814                "L",
 42815                "L",
 42816                "L",
 42817                "L",
 42818                "L",
 42819                "L",
 42820                "L",
 42821                "L",
 42822                "L",
 42823                "L",
 42824                "L",
 42825                "L",
 42826                "L",
 42827                "L",
 42828                "L",
 42829                "L",
 42830                "L",
 42831                "L",
 42832                "L",
 42833                "L",
 42834                "L",
 42835                "L",
 42836                "L",
 42837                "L",
 42838                "L",
 42839                "L",
 42840                "ON",
 42841                "ON",
 42842                "ON",
 42843                "ON",
 42844                "ON",
 42845                "ON",
 42846                "L",
 42847                "L",
 42848                "L",
 42849                "L",
 42850                "L",
 42851                "L",
 42852                "L",
 42853                "L",
 42854                "L",
 42855                "L",
 42856                "L",
 42857                "L",
 42858                "L",
 42859                "L",
 42860                "L",
 42861                "L",
 42862                "L",
 42863                "L",
 42864                "L",
 42865                "L",
 42866                "L",
 42867                "L",
 42868                "L",
 42869                "L",
 42870                "L",
 42871                "L",
 42872                "ON",
 42873                "ON",
 42874                "ON",
 42875                "ON",
 42876                "BN",
 42877                "BN",
 42878                "BN",
 42879                "BN",
 42880                "BN",
 42881                "BN",
 42882                "B",
 42883                "BN",
 42884                "BN",
 42885                "BN",
 42886                "BN",
 42887                "BN",
 42888                "BN",
 42889                "BN",
 42890                "BN",
 42891                "BN",
 42892                "BN",
 42893                "BN",
 42894                "BN",
 42895                "BN",
 42896                "BN",
 42897                "BN",
 42898                "BN",
 42899                "BN",
 42900                "BN",
 42901                "BN",
 42902                "BN",
 42903                "BN",
 42904                "BN",
 42905                "BN",
 42906                "BN",
 42907                "BN",
 42908                "BN",
 42909                "CS",
 42910                "ON",
 42911                "ET",
 42912                "ET",
 42913                "ET",
 42914                "ET",
 42915                "ON",
 42916                "ON",
 42917                "ON",
 42918                "ON",
 42919                "L",
 42920                "ON",
 42921                "ON",
 42922                "BN",
 42923                "ON",
 42924                "ON",
 42925                "ET",
 42926                "ET",
 42927                "EN",
 42928                "EN",
 42929                "ON",
 42930                "L",
 42931                "ON",
 42932                "ON",
 42933                "ON",
 42934                "EN",
 42935                "L",
 42936                "ON",
 42937                "ON",
 42938                "ON",
 42939                "ON",
 42940                "ON",
 42941                "L",
 42942                "L",
 42943                "L",
 42944                "L",
 42945                "L",
 42946                "L",
 42947                "L",
 42948                "L",
 42949                "L",
 42950                "L",
 42951                "L",
 42952                "L",
 42953                "L",
 42954                "L",
 42955                "L",
 42956                "L",
 42957                "L",
 42958                "L",
 42959                "L",
 42960                "L",
 42961                "L",
 42962                "L",
 42963                "L",
 42964                "ON",
 42965                "L",
 42966                "L",
 42967                "L",
 42968                "L",
 42969                "L",
 42970                "L",
 42971                "L",
 42972                "L",
 42973                "L",
 42974                "L",
 42975                "L",
 42976                "L",
 42977                "L",
 42978                "L",
 42979                "L",
 42980                "L",
 42981                "L",
 42982                "L",
 42983                "L",
 42984                "L",
 42985                "L",
 42986                "L",
 42987                "L",
 42988                "L",
 42989                "L",
 42990                "L",
 42991                "L",
 42992                "L",
 42993                "L",
 42994                "L",
 42995                "L",
 42996                "ON",
 42997                "L",
 42998                "L",
 42999                "L",
 43000                "L",
 43001                "L",
 43002                "L",
 43003                "L",
 43004                "L",
 43005              ],
 43006              i = [
 43007                "AN",
 43008                "AN",
 43009                "AN",
 43010                "AN",
 43011                "AN",
 43012                "AN",
 43013                "ON",
 43014                "ON",
 43015                "AL",
 43016                "ET",
 43017                "ET",
 43018                "AL",
 43019                "CS",
 43020                "AL",
 43021                "ON",
 43022                "ON",
 43023                "NSM",
 43024                "NSM",
 43025                "NSM",
 43026                "NSM",
 43027                "NSM",
 43028                "NSM",
 43029                "NSM",
 43030                "NSM",
 43031                "NSM",
 43032                "NSM",
 43033                "NSM",
 43034                "AL",
 43035                "AL",
 43036                "",
 43037                "AL",
 43038                "AL",
 43039                "AL",
 43040                "AL",
 43041                "AL",
 43042                "AL",
 43043                "AL",
 43044                "AL",
 43045                "AL",
 43046                "AL",
 43047                "AL",
 43048                "AL",
 43049                "AL",
 43050                "AL",
 43051                "AL",
 43052                "AL",
 43053                "AL",
 43054                "AL",
 43055                "AL",
 43056                "AL",
 43057                "AL",
 43058                "AL",
 43059                "AL",
 43060                "AL",
 43061                "AL",
 43062                "AL",
 43063                "AL",
 43064                "AL",
 43065                "AL",
 43066                "AL",
 43067                "AL",
 43068                "AL",
 43069                "AL",
 43070                "AL",
 43071                "AL",
 43072                "AL",
 43073                "AL",
 43074                "AL",
 43075                "AL",
 43076                "AL",
 43077                "AL",
 43078                "AL",
 43079                "AL",
 43080                "AL",
 43081                "AL",
 43082                "NSM",
 43083                "NSM",
 43084                "NSM",
 43085                "NSM",
 43086                "NSM",
 43087                "NSM",
 43088                "NSM",
 43089                "NSM",
 43090                "NSM",
 43091                "NSM",
 43092                "NSM",
 43093                "NSM",
 43094                "NSM",
 43095                "NSM",
 43096                "NSM",
 43097                "NSM",
 43098                "NSM",
 43099                "NSM",
 43100                "NSM",
 43101                "NSM",
 43102                "NSM",
 43103                "AN",
 43104                "AN",
 43105                "AN",
 43106                "AN",
 43107                "AN",
 43108                "AN",
 43109                "AN",
 43110                "AN",
 43111                "AN",
 43112                "AN",
 43113                "ET",
 43114                "AN",
 43115                "AN",
 43116                "AL",
 43117                "AL",
 43118                "AL",
 43119                "NSM",
 43120                "AL",
 43121                "AL",
 43122                "AL",
 43123                "AL",
 43124                "AL",
 43125                "AL",
 43126                "AL",
 43127                "AL",
 43128                "AL",
 43129                "AL",
 43130                "AL",
 43131                "AL",
 43132                "AL",
 43133                "AL",
 43134                "AL",
 43135                "AL",
 43136                "AL",
 43137                "AL",
 43138                "AL",
 43139                "AL",
 43140                "AL",
 43141                "AL",
 43142                "AL",
 43143                "AL",
 43144                "AL",
 43145                "AL",
 43146                "AL",
 43147                "AL",
 43148                "AL",
 43149                "AL",
 43150                "AL",
 43151                "AL",
 43152                "AL",
 43153                "AL",
 43154                "AL",
 43155                "AL",
 43156                "AL",
 43157                "AL",
 43158                "AL",
 43159                "AL",
 43160                "AL",
 43161                "AL",
 43162                "AL",
 43163                "AL",
 43164                "AL",
 43165                "AL",
 43166                "AL",
 43167                "AL",
 43168                "AL",
 43169                "AL",
 43170                "AL",
 43171                "AL",
 43172                "AL",
 43173                "AL",
 43174                "AL",
 43175                "AL",
 43176                "AL",
 43177                "AL",
 43178                "AL",
 43179                "AL",
 43180                "AL",
 43181                "AL",
 43182                "AL",
 43183                "AL",
 43184                "AL",
 43185                "AL",
 43186                "AL",
 43187                "AL",
 43188                "AL",
 43189                "AL",
 43190                "AL",
 43191                "AL",
 43192                "AL",
 43193                "AL",
 43194                "AL",
 43195                "AL",
 43196                "AL",
 43197                "AL",
 43198                "AL",
 43199                "AL",
 43200                "AL",
 43201                "AL",
 43202                "AL",
 43203                "AL",
 43204                "AL",
 43205                "AL",
 43206                "AL",
 43207                "AL",
 43208                "AL",
 43209                "AL",
 43210                "AL",
 43211                "AL",
 43212                "AL",
 43213                "AL",
 43214                "AL",
 43215                "AL",
 43216                "AL",
 43217                "AL",
 43218                "AL",
 43219                "AL",
 43220                "AL",
 43221                "NSM",
 43222                "NSM",
 43223                "NSM",
 43224                "NSM",
 43225                "NSM",
 43226                "NSM",
 43227                "NSM",
 43228                "AN",
 43229                "ON",
 43230                "NSM",
 43231                "NSM",
 43232                "NSM",
 43233                "NSM",
 43234                "NSM",
 43235                "NSM",
 43236                "AL",
 43237                "AL",
 43238                "NSM",
 43239                "NSM",
 43240                "ON",
 43241                "NSM",
 43242                "NSM",
 43243                "NSM",
 43244                "NSM",
 43245                "AL",
 43246                "AL",
 43247                "EN",
 43248                "EN",
 43249                "EN",
 43250                "EN",
 43251                "EN",
 43252                "EN",
 43253                "EN",
 43254                "EN",
 43255                "EN",
 43256                "EN",
 43257                "AL",
 43258                "AL",
 43259                "AL",
 43260                "AL",
 43261                "AL",
 43262                "AL",
 43263              ];
 43264            function isOdd(e) {
 43265              return 0 != (1 & e);
 43266            }
 43267            function isEven(e) {
 43268              return 0 == (1 & e);
 43269            }
 43270            function findUnequal(e, t, a) {
 43271              let r, n;
 43272              for (r = t, n = e.length; r < n; ++r) if (e[r] !== a) return r;
 43273              return r;
 43274            }
 43275            function setValues(e, t, a, r) {
 43276              for (let n = t; n < a; ++n) e[n] = r;
 43277            }
 43278            function reverseValues(e, t, a) {
 43279              for (let r = t, n = a - 1; r < n; ++r, --n) {
 43280                const t = e[r];
 43281                e[r] = e[n];
 43282                e[n] = t;
 43283              }
 43284            }
 43285            function createBidiText(e, t, a = !1) {
 43286              let r = "ltr";
 43287              a ? (r = "ttb") : t || (r = "rtl");
 43288              return { str: e, dir: r };
 43289            }
 43290            const s = [],
 43291              o = [];
 43292          },
 43293          (e, t, a) => {
 43294            Object.defineProperty(t, "__esModule", { value: !0 });
 43295            t.getFontSubstitution = function getFontSubstitution(e, t, a, u, d) {
 43296              const f = (u = (0, r.normalizeFontName)(u));
 43297              let g = e.get(f);
 43298              if (g) return g;
 43299              let p = l.get(u);
 43300              if (!p)
 43301                for (const [e, t] of h)
 43302                  if (u.startsWith(e)) {
 43303                    u = `${t}${u.substring(e.length)}`;
 43304                    p = l.get(u);
 43305                    break;
 43306                  }
 43307              let m = !1;
 43308              if (!p) {
 43309                p = l.get(d);
 43310                m = !0;
 43311              }
 43312              const b = `${t.getDocId()}_s${t.createFontId()}`;
 43313              if (!p) {
 43314                if (!(0, n.validateFontName)(u)) {
 43315                  e.set(f, null);
 43316                  return null;
 43317                }
 43318                const t = /bold/gi.test(u),
 43319                  a = /oblique|italic/gi.test(u);
 43320                g = {
 43321                  css: b,
 43322                  guessFallback: !0,
 43323                  loadedName: b,
 43324                  baseFontName: u,
 43325                  src: `local(${u})`,
 43326                  style: (t && a && c) || (t && s) || (a && o) || i,
 43327                };
 43328                e.set(f, g);
 43329                return g;
 43330              }
 43331              const y = [];
 43332              m && (0, n.validateFontName)(u) && y.push(`local(${u})`);
 43333              const { style: w, ultimate: S } = generateFont(p, y, a),
 43334                x = null === S;
 43335              g = {
 43336                css: `${b}${x ? "" : `,${S}`}`,
 43337                guessFallback: x,
 43338                loadedName: b,
 43339                baseFontName: u,
 43340                src: y.join(","),
 43341                style: w,
 43342              };
 43343              e.set(f, g);
 43344              return g;
 43345            };
 43346            var r = a(38),
 43347              n = a(3);
 43348            const i = { style: "normal", weight: "normal" },
 43349              s = { style: "normal", weight: "bold" },
 43350              o = { style: "italic", weight: "normal" },
 43351              c = { style: "italic", weight: "bold" },
 43352              l = new Map([
 43353                [
 43354                  "Times-Roman",
 43355                  {
 43356                    local: [
 43357                      "Times New Roman",
 43358                      "Times-Roman",
 43359                      "Times",
 43360                      "Liberation Serif",
 43361                      "Nimbus Roman",
 43362                      "Nimbus Roman L",
 43363                      "Tinos",
 43364                      "Thorndale",
 43365                      "TeX Gyre Termes",
 43366                      "FreeSerif",
 43367                      "DejaVu Serif",
 43368                      "Bitstream Vera Serif",
 43369                      "Ubuntu",
 43370                    ],
 43371                    style: i,
 43372                    ultimate: "serif",
 43373                  },
 43374                ],
 43375                [
 43376                  "Times-Bold",
 43377                  { alias: "Times-Roman", style: s, ultimate: "serif" },
 43378                ],
 43379                [
 43380                  "Times-Italic",
 43381                  { alias: "Times-Roman", style: o, ultimate: "serif" },
 43382                ],
 43383                [
 43384                  "Times-BoldItalic",
 43385                  { alias: "Times-Roman", style: c, ultimate: "serif" },
 43386                ],
 43387                [
 43388                  "Helvetica",
 43389                  {
 43390                    local: [
 43391                      "Helvetica",
 43392                      "Helvetica Neue",
 43393                      "Arial",
 43394                      "Arial Nova",
 43395                      "Liberation Sans",
 43396                      "Arimo",
 43397                      "Nimbus Sans",
 43398                      "Nimbus Sans L",
 43399                      "A030",
 43400                      "TeX Gyre Heros",
 43401                      "FreeSans",
 43402                      "DejaVu Sans",
 43403                      "Albany",
 43404                      "Bitstream Vera Sans",
 43405                      "Arial Unicode MS",
 43406                      "Microsoft Sans Serif",
 43407                      "Apple Symbols",
 43408                      "Cantarell",
 43409                    ],
 43410                    path: "LiberationSans-Regular.ttf",
 43411                    style: i,
 43412                    ultimate: "sans-serif",
 43413                  },
 43414                ],
 43415                [
 43416                  "Helvetica-Bold",
 43417                  {
 43418                    alias: "Helvetica",
 43419                    path: "LiberationSans-Bold.ttf",
 43420                    style: s,
 43421                    ultimate: "sans-serif",
 43422                  },
 43423                ],
 43424                [
 43425                  "Helvetica-Oblique",
 43426                  {
 43427                    alias: "Helvetica",
 43428                    path: "LiberationSans-Italic.ttf",
 43429                    style: o,
 43430                    ultimate: "sans-serif",
 43431                  },
 43432                ],
 43433                [
 43434                  "Helvetica-BoldOblique",
 43435                  {
 43436                    alias: "Helvetica",
 43437                    path: "LiberationSans-BoldItalic.ttf",
 43438                    style: c,
 43439                    ultimate: "sans-serif",
 43440                  },
 43441                ],
 43442                [
 43443                  "Courier",
 43444                  {
 43445                    local: [
 43446                      "Courier",
 43447                      "Courier New",
 43448                      "Liberation Mono",
 43449                      "Nimbus Mono",
 43450                      "Nimbus Mono L",
 43451                      "Cousine",
 43452                      "Cumberland",
 43453                      "TeX Gyre Cursor",
 43454                      "FreeMono",
 43455                    ],
 43456                    style: i,
 43457                    ultimate: "monospace",
 43458                  },
 43459                ],
 43460                [
 43461                  "Courier-Bold",
 43462                  { alias: "Courier", style: s, ultimate: "monospace" },
 43463                ],
 43464                [
 43465                  "Courier-Oblique",
 43466                  { alias: "Courier", style: o, ultimate: "monospace" },
 43467                ],
 43468                [
 43469                  "Courier-BoldOblique",
 43470                  { alias: "Courier", style: c, ultimate: "monospace" },
 43471                ],
 43472                [
 43473                  "ArialBlack",
 43474                  {
 43475                    local: ["Arial Black"],
 43476                    style: { style: "normal", weight: "900" },
 43477                    fallback: "Helvetica-Bold",
 43478                  },
 43479                ],
 43480                ["ArialBlack-Bold", { alias: "ArialBlack" }],
 43481                [
 43482                  "ArialBlack-Italic",
 43483                  {
 43484                    alias: "ArialBlack",
 43485                    style: { style: "italic", weight: "900" },
 43486                    fallback: "Helvetica-BoldOblique",
 43487                  },
 43488                ],
 43489                ["ArialBlack-BoldItalic", { alias: "ArialBlack-Italic" }],
 43490                [
 43491                  "ArialNarrow",
 43492                  {
 43493                    local: [
 43494                      "Arial Narrow",
 43495                      "Liberation Sans Narrow",
 43496                      "Helvetica Condensed",
 43497                      "Nimbus Sans Narrow",
 43498                      "TeX Gyre Heros Cn",
 43499                    ],
 43500                    style: i,
 43501                    fallback: "Helvetica",
 43502                  },
 43503                ],
 43504                [
 43505                  "ArialNarrow-Bold",
 43506                  { alias: "ArialNarrow", style: s, fallback: "Helvetica-Bold" },
 43507                ],
 43508                [
 43509                  "ArialNarrow-Italic",
 43510                  {
 43511                    alias: "ArialNarrow",
 43512                    style: o,
 43513                    fallback: "Helvetica-Oblique",
 43514                  },
 43515                ],
 43516                [
 43517                  "ArialNarrow-BoldItalic",
 43518                  {
 43519                    alias: "ArialNarrow",
 43520                    style: c,
 43521                    fallback: "Helvetica-BoldOblique",
 43522                  },
 43523                ],
 43524                [
 43525                  "Calibri",
 43526                  {
 43527                    local: ["Calibri", "Carlito"],
 43528                    style: i,
 43529                    fallback: "Helvetica",
 43530                  },
 43531                ],
 43532                [
 43533                  "Calibri-Bold",
 43534                  { alias: "Calibri", style: s, fallback: "Helvetica-Bold" },
 43535                ],
 43536                [
 43537                  "Calibri-Italic",
 43538                  { alias: "Calibri", style: o, fallback: "Helvetica-Oblique" },
 43539                ],
 43540                [
 43541                  "Calibri-BoldItalic",
 43542                  {
 43543                    alias: "Calibri",
 43544                    style: c,
 43545                    fallback: "Helvetica-BoldOblique",
 43546                  },
 43547                ],
 43548                ["Wingdings", { local: ["Wingdings", "URW Dingbats"], style: i }],
 43549                ["Wingdings-Regular", { alias: "Wingdings" }],
 43550                ["Wingdings-Bold", { alias: "Wingdings" }],
 43551              ]),
 43552              h = new Map([["Arial-Black", "ArialBlack"]]);
 43553            function generateFont(
 43554              { alias: e, local: t, path: a, fallback: r, style: n, ultimate: i },
 43555              h,
 43556              u,
 43557              d = !0,
 43558              f = !0,
 43559              g = "",
 43560            ) {
 43561              const p = { style: null, ultimate: null };
 43562              if (t) {
 43563                const e = g ? ` ${g}` : "";
 43564                for (const a of t) h.push(`local(${a}${e})`);
 43565              }
 43566              if (e) {
 43567                const t = l.get(e),
 43568                  i =
 43569                    g ||
 43570                    (function getStyleToAppend(e) {
 43571                      switch (e) {
 43572                        case s:
 43573                          return "Bold";
 43574                        case o:
 43575                          return "Italic";
 43576                        case c:
 43577                          return "Bold Italic";
 43578                        default:
 43579                          if ("bold" === e?.weight) return "Bold";
 43580                          if ("italic" === e?.style) return "Italic";
 43581                      }
 43582                      return "";
 43583                    })(n);
 43584                Object.assign(p, generateFont(t, h, u, d && !r, f && !a, i));
 43585              }
 43586              n && (p.style = n);
 43587              i && (p.ultimate = i);
 43588              if (d && r) {
 43589                const e = l.get(r),
 43590                  { ultimate: t } = generateFont(e, h, u, d, f && !a, g);
 43591                p.ultimate ||= t;
 43592              }
 43593              f && a && u && h.push(`url(${u}${a})`);
 43594              return p;
 43595            }
 43596          },
 43597          (e, t, a) => {
 43598            Object.defineProperty(t, "__esModule", { value: !0 });
 43599            t.ImageResizer = void 0;
 43600            var r = a(2);
 43601            class ImageResizer {
 43602              constructor(e, t) {
 43603                this._imgData = e;
 43604                this._isMask = t;
 43605              }
 43606              static needsToBeResized(e, t) {
 43607                if (e <= this._goodSquareLength && t <= this._goodSquareLength)
 43608                  return !1;
 43609                const { MAX_DIM: a } = this;
 43610                if (e > a || t > a) return !0;
 43611                const r = e * t;
 43612                if (this._hasMaxArea) return r > this.MAX_AREA;
 43613                if (r < this._goodSquareLength ** 2) return !1;
 43614                if (this._areGoodDims(e, t)) {
 43615                  this._goodSquareLength = Math.max(
 43616                    this._goodSquareLength,
 43617                    Math.floor(Math.sqrt(e * t)),
 43618                  );
 43619                  return !1;
 43620                }
 43621                this._goodSquareLength = this._guessMax(
 43622                  this._goodSquareLength,
 43623                  a,
 43624                  128,
 43625                  0,
 43626                );
 43627                return r > (this.MAX_AREA = this._goodSquareLength ** 2);
 43628              }
 43629              static get MAX_DIM() {
 43630                return (0, r.shadow)(
 43631                  this,
 43632                  "MAX_DIM",
 43633                  this._guessMax(2048, 65537, 0, 1),
 43634                );
 43635              }
 43636              static get MAX_AREA() {
 43637                this._hasMaxArea = !0;
 43638                return (0, r.shadow)(
 43639                  this,
 43640                  "MAX_AREA",
 43641                  this._guessMax(
 43642                    ImageResizer._goodSquareLength,
 43643                    this.MAX_DIM,
 43644                    128,
 43645                    0,
 43646                  ) ** 2,
 43647                );
 43648              }
 43649              static set MAX_AREA(e) {
 43650                if (e >= 0) {
 43651                  this._hasMaxArea = !0;
 43652                  (0, r.shadow)(this, "MAX_AREA", e);
 43653                }
 43654              }
 43655              static setMaxArea(e) {
 43656                this._hasMaxArea || (this.MAX_AREA = e >> 2);
 43657              }
 43658              static _areGoodDims(e, t) {
 43659                try {
 43660                  const a = new OffscreenCanvas(e, t),
 43661                    r = a.getContext("2d");
 43662                  r.fillRect(0, 0, 1, 1);
 43663                  const n = r.getImageData(0, 0, 1, 1).data[3];
 43664                  a.width = a.height = 1;
 43665                  return 0 !== n;
 43666                } catch {
 43667                  return !1;
 43668                }
 43669              }
 43670              static _guessMax(e, t, a, r) {
 43671                for (; e + a + 1 < t; ) {
 43672                  const a = Math.floor((e + t) / 2),
 43673                    n = r || a;
 43674                  this._areGoodDims(a, n) ? (e = a) : (t = a);
 43675                }
 43676                return e;
 43677              }
 43678              static async createImage(e, t = !1) {
 43679                return new ImageResizer(e, t)._createImage();
 43680              }
 43681              async _createImage() {
 43682                const e = this._encodeBMP(),
 43683                  t = new Blob([e.buffer], { type: "image/bmp" }),
 43684                  a = createImageBitmap(t),
 43685                  { MAX_AREA: r, MAX_DIM: n } = ImageResizer,
 43686                  { _imgData: i } = this,
 43687                  { width: s, height: o } = i,
 43688                  c = Math.max(s / n, o / n, Math.sqrt((s * o) / r)),
 43689                  l = Math.max(c, 2),
 43690                  h = Math.round(10 * (c + 1.25)) / 10 / l,
 43691                  u = Math.floor(Math.log2(h)),
 43692                  d = new Array(u + 2).fill(2);
 43693                d[0] = l;
 43694                d.splice(-1, 1, h / (1 << u));
 43695                let f = s,
 43696                  g = o,
 43697                  p = await a;
 43698                for (const e of d) {
 43699                  const t = f,
 43700                    a = g;
 43701                  f = Math.floor(f / e) - 1;
 43702                  g = Math.floor(g / e) - 1;
 43703                  const r = new OffscreenCanvas(f, g);
 43704                  r.getContext("2d").drawImage(p, 0, 0, t, a, 0, 0, f, g);
 43705                  p = r.transferToImageBitmap();
 43706                }
 43707                i.data = null;
 43708                i.bitmap = p;
 43709                i.width = f;
 43710                i.height = g;
 43711                return i;
 43712              }
 43713              _encodeBMP() {
 43714                const { width: e, height: t, kind: a } = this._imgData;
 43715                let n,
 43716                  i = this._imgData.data,
 43717                  s = new Uint8Array(0),
 43718                  o = s,
 43719                  c = 0;
 43720                switch (a) {
 43721                  case r.ImageKind.GRAYSCALE_1BPP: {
 43722                    n = 1;
 43723                    s = new Uint8Array(
 43724                      this._isMask
 43725                        ? [255, 255, 255, 255, 0, 0, 0, 0]
 43726                        : [0, 0, 0, 0, 255, 255, 255, 255],
 43727                    );
 43728                    const a = (e + 7) >> 3,
 43729                      r = (a + 3) & -4;
 43730                    if (a !== r) {
 43731                      const e = new Uint8Array(r * t);
 43732                      let n = 0;
 43733                      for (let s = 0, o = t * a; s < o; s += a, n += r)
 43734                        e.set(i.subarray(s, s + a), n);
 43735                      i = e;
 43736                    }
 43737                    break;
 43738                  }
 43739                  case r.ImageKind.RGB_24BPP:
 43740                    n = 24;
 43741                    if (3 & e) {
 43742                      const a = 3 * e,
 43743                        r = (a + 3) & -4,
 43744                        n = r - a,
 43745                        s = new Uint8Array(r * t);
 43746                      let o = 0;
 43747                      for (let e = 0, r = t * a; e < r; e += a) {
 43748                        const t = i.subarray(e, e + a);
 43749                        for (let e = 0; e < a; e += 3) {
 43750                          s[o++] = t[e + 2];
 43751                          s[o++] = t[e + 1];
 43752                          s[o++] = t[e];
 43753                        }
 43754                        o += n;
 43755                      }
 43756                      i = s;
 43757                    } else
 43758                      for (let e = 0, t = i.length; e < t; e += 3) {
 43759                        const t = i[e];
 43760                        i[e] = i[e + 2];
 43761                        i[e + 2] = t;
 43762                      }
 43763                    break;
 43764                  case r.ImageKind.RGBA_32BPP:
 43765                    n = 32;
 43766                    c = 3;
 43767                    o = new Uint8Array(68);
 43768                    const a = new DataView(o.buffer);
 43769                    if (r.FeatureTest.isLittleEndian) {
 43770                      a.setUint32(0, 255, !0);
 43771                      a.setUint32(4, 65280, !0);
 43772                      a.setUint32(8, 16711680, !0);
 43773                      a.setUint32(12, 4278190080, !0);
 43774                    } else {
 43775                      a.setUint32(0, 4278190080, !0);
 43776                      a.setUint32(4, 16711680, !0);
 43777                      a.setUint32(8, 65280, !0);
 43778                      a.setUint32(12, 255, !0);
 43779                    }
 43780                    break;
 43781                  default:
 43782                    throw new Error("invalid format");
 43783                }
 43784                let l = 0;
 43785                const h = 40 + o.length,
 43786                  u = 14 + h + s.length + i.length,
 43787                  d = new Uint8Array(u),
 43788                  f = new DataView(d.buffer);
 43789                f.setUint16(l, 19778, !0);
 43790                l += 2;
 43791                f.setUint32(l, u, !0);
 43792                l += 4;
 43793                f.setUint32(l, 0, !0);
 43794                l += 4;
 43795                f.setUint32(l, 14 + h + s.length, !0);
 43796                l += 4;
 43797                f.setUint32(l, h, !0);
 43798                l += 4;
 43799                f.setInt32(l, e, !0);
 43800                l += 4;
 43801                f.setInt32(l, -t, !0);
 43802                l += 4;
 43803                f.setUint16(l, 1, !0);
 43804                l += 2;
 43805                f.setUint16(l, n, !0);
 43806                l += 2;
 43807                f.setUint32(l, c, !0);
 43808                l += 4;
 43809                f.setUint32(l, 0, !0);
 43810                l += 4;
 43811                f.setInt32(l, 0, !0);
 43812                l += 4;
 43813                f.setInt32(l, 0, !0);
 43814                l += 4;
 43815                f.setUint32(l, s.length / 4, !0);
 43816                l += 4;
 43817                f.setUint32(l, 0, !0);
 43818                l += 4;
 43819                d.set(o, l);
 43820                l += o.length;
 43821                d.set(s, l);
 43822                l += s.length;
 43823                d.set(i, l);
 43824                return d;
 43825              }
 43826            }
 43827            t.ImageResizer = ImageResizer;
 43828            ImageResizer._goodSquareLength = 2048;
 43829          },
 43830          (e, t, a) => {
 43831            Object.defineProperty(t, "__esModule", { value: !0 });
 43832            t.MurmurHash3_64 = void 0;
 43833            var r = a(2);
 43834            const n = 3285377520,
 43835              i = 4294901760,
 43836              s = 65535;
 43837            t.MurmurHash3_64 = class MurmurHash3_64 {
 43838              constructor(e) {
 43839                this.h1 = e ? 4294967295 & e : n;
 43840                this.h2 = e ? 4294967295 & e : n;
 43841              }
 43842              update(e) {
 43843                let t, a;
 43844                if ("string" == typeof e) {
 43845                  t = new Uint8Array(2 * e.length);
 43846                  a = 0;
 43847                  for (let r = 0, n = e.length; r < n; r++) {
 43848                    const n = e.charCodeAt(r);
 43849                    if (n <= 255) t[a++] = n;
 43850                    else {
 43851                      t[a++] = n >>> 8;
 43852                      t[a++] = 255 & n;
 43853                    }
 43854                  }
 43855                } else {
 43856                  if (!(0, r.isArrayBuffer)(e))
 43857                    throw new Error(
 43858                      "Wrong data format in MurmurHash3_64_update. Input must be a string or array.",
 43859                    );
 43860                  t = e.slice();
 43861                  a = t.byteLength;
 43862                }
 43863                const n = a >> 2,
 43864                  o = a - 4 * n,
 43865                  c = new Uint32Array(t.buffer, 0, n);
 43866                let l = 0,
 43867                  h = 0,
 43868                  u = this.h1,
 43869                  d = this.h2;
 43870                const f = 3432918353,
 43871                  g = 461845907,
 43872                  p = 11601,
 43873                  m = 13715;
 43874                for (let e = 0; e < n; e++)
 43875                  if (1 & e) {
 43876                    l = c[e];
 43877                    l = ((l * f) & i) | ((l * p) & s);
 43878                    l = (l << 15) | (l >>> 17);
 43879                    l = ((l * g) & i) | ((l * m) & s);
 43880                    u ^= l;
 43881                    u = (u << 13) | (u >>> 19);
 43882                    u = 5 * u + 3864292196;
 43883                  } else {
 43884                    h = c[e];
 43885                    h = ((h * f) & i) | ((h * p) & s);
 43886                    h = (h << 15) | (h >>> 17);
 43887                    h = ((h * g) & i) | ((h * m) & s);
 43888                    d ^= h;
 43889                    d = (d << 13) | (d >>> 19);
 43890                    d = 5 * d + 3864292196;
 43891                  }
 43892                l = 0;
 43893                switch (o) {
 43894                  case 3:
 43895                    l ^= t[4 * n + 2] << 16;
 43896                  case 2:
 43897                    l ^= t[4 * n + 1] << 8;
 43898                  case 1:
 43899                    l ^= t[4 * n];
 43900                    l = ((l * f) & i) | ((l * p) & s);
 43901                    l = (l << 15) | (l >>> 17);
 43902                    l = ((l * g) & i) | ((l * m) & s);
 43903                    1 & n ? (u ^= l) : (d ^= l);
 43904                }
 43905                this.h1 = u;
 43906                this.h2 = d;
 43907              }
 43908              hexdigest() {
 43909                let e = this.h1,
 43910                  t = this.h2;
 43911                e ^= t >>> 1;
 43912                e = ((3981806797 * e) & i) | ((36045 * e) & s);
 43913                t =
 43914                  ((4283543511 * t) & i) |
 43915                  (((2950163797 * ((t << 16) | (e >>> 16))) & i) >>> 16);
 43916                e ^= t >>> 1;
 43917                e = ((444984403 * e) & i) | ((60499 * e) & s);
 43918                t =
 43919                  ((3301882366 * t) & i) |
 43920                  (((3120437893 * ((t << 16) | (e >>> 16))) & i) >>> 16);
 43921                e ^= t >>> 1;
 43922                return (
 43923                  (e >>> 0).toString(16).padStart(8, "0") +
 43924                  (t >>> 0).toString(16).padStart(8, "0")
 43925                );
 43926              }
 43927            };
 43928          },
 43929          (e, t, a) => {
 43930            Object.defineProperty(t, "__esModule", { value: !0 });
 43931            t.OperatorList = void 0;
 43932            var r = a(2);
 43933            function addState(e, t, a, r, n) {
 43934              let i = e;
 43935              for (let e = 0, a = t.length - 1; e < a; e++) {
 43936                const a = t[e];
 43937                i = i[a] ||= [];
 43938              }
 43939              i[t.at(-1)] = { checkFn: a, iterateFn: r, processFn: n };
 43940            }
 43941            const n = [];
 43942            addState(
 43943              n,
 43944              [
 43945                r.OPS.save,
 43946                r.OPS.transform,
 43947                r.OPS.paintInlineImageXObject,
 43948                r.OPS.restore,
 43949              ],
 43950              null,
 43951              function iterateInlineImageGroup(e, t) {
 43952                const a = e.fnArray,
 43953                  n = (t - (e.iCurr - 3)) % 4;
 43954                switch (n) {
 43955                  case 0:
 43956                    return a[t] === r.OPS.save;
 43957                  case 1:
 43958                    return a[t] === r.OPS.transform;
 43959                  case 2:
 43960                    return a[t] === r.OPS.paintInlineImageXObject;
 43961                  case 3:
 43962                    return a[t] === r.OPS.restore;
 43963                }
 43964                throw new Error(`iterateInlineImageGroup - invalid pos: ${n}`);
 43965              },
 43966              function foundInlineImageGroup(e, t) {
 43967                const a = e.fnArray,
 43968                  n = e.argsArray,
 43969                  i = e.iCurr,
 43970                  s = i - 3,
 43971                  o = i - 2,
 43972                  c = i - 1,
 43973                  l = Math.min(Math.floor((t - s) / 4), 200);
 43974                if (l < 10) return t - ((t - s) % 4);
 43975                let h = 0;
 43976                const u = [];
 43977                let d = 0,
 43978                  f = 1,
 43979                  g = 1;
 43980                for (let e = 0; e < l; e++) {
 43981                  const t = n[o + (e << 2)],
 43982                    a = n[c + (e << 2)][0];
 43983                  if (f + a.width > 1e3) {
 43984                    h = Math.max(h, f);
 43985                    g += d + 2;
 43986                    f = 0;
 43987                    d = 0;
 43988                  }
 43989                  u.push({ transform: t, x: f, y: g, w: a.width, h: a.height });
 43990                  f += a.width + 2;
 43991                  d = Math.max(d, a.height);
 43992                }
 43993                const p = Math.max(h, f) + 1,
 43994                  m = g + d + 1,
 43995                  b = new Uint8Array(p * m * 4),
 43996                  y = p << 2;
 43997                for (let e = 0; e < l; e++) {
 43998                  const t = n[c + (e << 2)][0].data,
 43999                    a = u[e].w << 2;
 44000                  let r = 0,
 44001                    i = (u[e].x + u[e].y * p) << 2;
 44002                  b.set(t.subarray(0, a), i - y);
 44003                  for (let n = 0, s = u[e].h; n < s; n++) {
 44004                    b.set(t.subarray(r, r + a), i);
 44005                    r += a;
 44006                    i += y;
 44007                  }
 44008                  b.set(t.subarray(r - a, r), i);
 44009                  for (; i >= 0; ) {
 44010                    t[i - 4] = t[i];
 44011                    t[i - 3] = t[i + 1];
 44012                    t[i - 2] = t[i + 2];
 44013                    t[i - 1] = t[i + 3];
 44014                    t[i + a] = t[i + a - 4];
 44015                    t[i + a + 1] = t[i + a - 3];
 44016                    t[i + a + 2] = t[i + a - 2];
 44017                    t[i + a + 3] = t[i + a - 1];
 44018                    i -= y;
 44019                  }
 44020                }
 44021                const w = { width: p, height: m };
 44022                if (e.isOffscreenCanvasSupported) {
 44023                  const e = new OffscreenCanvas(p, m);
 44024                  e.getContext("2d").putImageData(
 44025                    new ImageData(new Uint8ClampedArray(b.buffer), p, m),
 44026                    0,
 44027                    0,
 44028                  );
 44029                  w.bitmap = e.transferToImageBitmap();
 44030                  w.data = null;
 44031                } else {
 44032                  w.kind = r.ImageKind.RGBA_32BPP;
 44033                  w.data = b;
 44034                }
 44035                a.splice(s, 4 * l, r.OPS.paintInlineImageXObjectGroup);
 44036                n.splice(s, 4 * l, [w, u]);
 44037                return s + 1;
 44038              },
 44039            );
 44040            addState(
 44041              n,
 44042              [
 44043                r.OPS.save,
 44044                r.OPS.transform,
 44045                r.OPS.paintImageMaskXObject,
 44046                r.OPS.restore,
 44047              ],
 44048              null,
 44049              function iterateImageMaskGroup(e, t) {
 44050                const a = e.fnArray,
 44051                  n = (t - (e.iCurr - 3)) % 4;
 44052                switch (n) {
 44053                  case 0:
 44054                    return a[t] === r.OPS.save;
 44055                  case 1:
 44056                    return a[t] === r.OPS.transform;
 44057                  case 2:
 44058                    return a[t] === r.OPS.paintImageMaskXObject;
 44059                  case 3:
 44060                    return a[t] === r.OPS.restore;
 44061                }
 44062                throw new Error(`iterateImageMaskGroup - invalid pos: ${n}`);
 44063              },
 44064              function foundImageMaskGroup(e, t) {
 44065                const a = e.fnArray,
 44066                  n = e.argsArray,
 44067                  i = e.iCurr,
 44068                  s = i - 3,
 44069                  o = i - 2,
 44070                  c = i - 1;
 44071                let l = Math.floor((t - s) / 4);
 44072                if (l < 10) return t - ((t - s) % 4);
 44073                let h,
 44074                  u,
 44075                  d = !1;
 44076                const f = n[c][0],
 44077                  g = n[o][0],
 44078                  p = n[o][1],
 44079                  m = n[o][2],
 44080                  b = n[o][3];
 44081                if (p === m) {
 44082                  d = !0;
 44083                  h = o + 4;
 44084                  let e = c + 4;
 44085                  for (let t = 1; t < l; t++, h += 4, e += 4) {
 44086                    u = n[h];
 44087                    if (
 44088                      n[e][0] !== f ||
 44089                      u[0] !== g ||
 44090                      u[1] !== p ||
 44091                      u[2] !== m ||
 44092                      u[3] !== b
 44093                    ) {
 44094                      t < 10 ? (d = !1) : (l = t);
 44095                      break;
 44096                    }
 44097                  }
 44098                }
 44099                if (d) {
 44100                  l = Math.min(l, 1e3);
 44101                  const e = new Float32Array(2 * l);
 44102                  h = o;
 44103                  for (let t = 0; t < l; t++, h += 4) {
 44104                    u = n[h];
 44105                    e[t << 1] = u[4];
 44106                    e[1 + (t << 1)] = u[5];
 44107                  }
 44108                  a.splice(s, 4 * l, r.OPS.paintImageMaskXObjectRepeat);
 44109                  n.splice(s, 4 * l, [f, g, p, m, b, e]);
 44110                } else {
 44111                  l = Math.min(l, 100);
 44112                  const e = [];
 44113                  for (let t = 0; t < l; t++) {
 44114                    u = n[o + (t << 2)];
 44115                    const a = n[c + (t << 2)][0];
 44116                    e.push({
 44117                      data: a.data,
 44118                      width: a.width,
 44119                      height: a.height,
 44120                      interpolate: a.interpolate,
 44121                      count: a.count,
 44122                      transform: u,
 44123                    });
 44124                  }
 44125                  a.splice(s, 4 * l, r.OPS.paintImageMaskXObjectGroup);
 44126                  n.splice(s, 4 * l, [e]);
 44127                }
 44128                return s + 1;
 44129              },
 44130            );
 44131            addState(
 44132              n,
 44133              [
 44134                r.OPS.save,
 44135                r.OPS.transform,
 44136                r.OPS.paintImageXObject,
 44137                r.OPS.restore,
 44138              ],
 44139              function (e) {
 44140                const t = e.argsArray,
 44141                  a = e.iCurr - 2;
 44142                return 0 === t[a][1] && 0 === t[a][2];
 44143              },
 44144              function iterateImageGroup(e, t) {
 44145                const a = e.fnArray,
 44146                  n = e.argsArray,
 44147                  i = (t - (e.iCurr - 3)) % 4;
 44148                switch (i) {
 44149                  case 0:
 44150                    return a[t] === r.OPS.save;
 44151                  case 1:
 44152                    if (a[t] !== r.OPS.transform) return !1;
 44153                    const i = e.iCurr - 2,
 44154                      s = n[i][0],
 44155                      o = n[i][3];
 44156                    return (
 44157                      n[t][0] === s &&
 44158                      0 === n[t][1] &&
 44159                      0 === n[t][2] &&
 44160                      n[t][3] === o
 44161                    );
 44162                  case 2:
 44163                    if (a[t] !== r.OPS.paintImageXObject) return !1;
 44164                    const c = n[e.iCurr - 1][0];
 44165                    return n[t][0] === c;
 44166                  case 3:
 44167                    return a[t] === r.OPS.restore;
 44168                }
 44169                throw new Error(`iterateImageGroup - invalid pos: ${i}`);
 44170              },
 44171              function (e, t) {
 44172                const a = e.fnArray,
 44173                  n = e.argsArray,
 44174                  i = e.iCurr,
 44175                  s = i - 3,
 44176                  o = i - 2,
 44177                  c = n[i - 1][0],
 44178                  l = n[o][0],
 44179                  h = n[o][3],
 44180                  u = Math.min(Math.floor((t - s) / 4), 1e3);
 44181                if (u < 3) return t - ((t - s) % 4);
 44182                const d = new Float32Array(2 * u);
 44183                let f = o;
 44184                for (let e = 0; e < u; e++, f += 4) {
 44185                  const t = n[f];
 44186                  d[e << 1] = t[4];
 44187                  d[1 + (e << 1)] = t[5];
 44188                }
 44189                const g = [c, l, h, d];
 44190                a.splice(s, 4 * u, r.OPS.paintImageXObjectRepeat);
 44191                n.splice(s, 4 * u, g);
 44192                return s + 1;
 44193              },
 44194            );
 44195            addState(
 44196              n,
 44197              [
 44198                r.OPS.beginText,
 44199                r.OPS.setFont,
 44200                r.OPS.setTextMatrix,
 44201                r.OPS.showText,
 44202                r.OPS.endText,
 44203              ],
 44204              null,
 44205              function iterateShowTextGroup(e, t) {
 44206                const a = e.fnArray,
 44207                  n = e.argsArray,
 44208                  i = (t - (e.iCurr - 4)) % 5;
 44209                switch (i) {
 44210                  case 0:
 44211                    return a[t] === r.OPS.beginText;
 44212                  case 1:
 44213                    return a[t] === r.OPS.setFont;
 44214                  case 2:
 44215                    return a[t] === r.OPS.setTextMatrix;
 44216                  case 3:
 44217                    if (a[t] !== r.OPS.showText) return !1;
 44218                    const i = e.iCurr - 3,
 44219                      s = n[i][0],
 44220                      o = n[i][1];
 44221                    return n[t][0] === s && n[t][1] === o;
 44222                  case 4:
 44223                    return a[t] === r.OPS.endText;
 44224                }
 44225                throw new Error(`iterateShowTextGroup - invalid pos: ${i}`);
 44226              },
 44227              function (e, t) {
 44228                const a = e.fnArray,
 44229                  r = e.argsArray,
 44230                  n = e.iCurr,
 44231                  i = n - 4,
 44232                  s = n - 3,
 44233                  o = n - 2,
 44234                  c = n - 1,
 44235                  l = n,
 44236                  h = r[s][0],
 44237                  u = r[s][1];
 44238                let d = Math.min(Math.floor((t - i) / 5), 1e3);
 44239                if (d < 3) return t - ((t - i) % 5);
 44240                let f = i;
 44241                if (
 44242                  i >= 4 &&
 44243                  a[i - 4] === a[s] &&
 44244                  a[i - 3] === a[o] &&
 44245                  a[i - 2] === a[c] &&
 44246                  a[i - 1] === a[l] &&
 44247                  r[i - 4][0] === h &&
 44248                  r[i - 4][1] === u
 44249                ) {
 44250                  d++;
 44251                  f -= 5;
 44252                }
 44253                let g = f + 4;
 44254                for (let e = 1; e < d; e++) {
 44255                  a.splice(g, 3);
 44256                  r.splice(g, 3);
 44257                  g += 2;
 44258                }
 44259                return g + 1;
 44260              },
 44261            );
 44262            class NullOptimizer {
 44263              constructor(e) {
 44264                this.queue = e;
 44265              }
 44266              _optimize() {}
 44267              push(e, t) {
 44268                this.queue.fnArray.push(e);
 44269                this.queue.argsArray.push(t);
 44270                this._optimize();
 44271              }
 44272              flush() {}
 44273              reset() {}
 44274            }
 44275            class QueueOptimizer extends NullOptimizer {
 44276              constructor(e) {
 44277                super(e);
 44278                this.state = null;
 44279                this.context = {
 44280                  iCurr: 0,
 44281                  fnArray: e.fnArray,
 44282                  argsArray: e.argsArray,
 44283                  isOffscreenCanvasSupported: !1,
 44284                };
 44285                this.match = null;
 44286                this.lastProcessed = 0;
 44287              }
 44288              set isOffscreenCanvasSupported(e) {
 44289                this.context.isOffscreenCanvasSupported = e;
 44290              }
 44291              _optimize() {
 44292                const e = this.queue.fnArray;
 44293                let t = this.lastProcessed,
 44294                  a = e.length,
 44295                  r = this.state,
 44296                  i = this.match;
 44297                if (!r && !i && t + 1 === a && !n[e[t]]) {
 44298                  this.lastProcessed = a;
 44299                  return;
 44300                }
 44301                const s = this.context;
 44302                for (; t < a; ) {
 44303                  if (i) {
 44304                    if ((0, i.iterateFn)(s, t)) {
 44305                      t++;
 44306                      continue;
 44307                    }
 44308                    t = (0, i.processFn)(s, t + 1);
 44309                    a = e.length;
 44310                    i = null;
 44311                    r = null;
 44312                    if (t >= a) break;
 44313                  }
 44314                  r = (r || n)[e[t]];
 44315                  if (r && !Array.isArray(r)) {
 44316                    s.iCurr = t;
 44317                    t++;
 44318                    if (!r.checkFn || (0, r.checkFn)(s)) {
 44319                      i = r;
 44320                      r = null;
 44321                    } else r = null;
 44322                  } else t++;
 44323                }
 44324                this.state = r;
 44325                this.match = i;
 44326                this.lastProcessed = t;
 44327              }
 44328              flush() {
 44329                for (; this.match; ) {
 44330                  const e = this.queue.fnArray.length;
 44331                  this.lastProcessed = (0, this.match.processFn)(this.context, e);
 44332                  this.match = null;
 44333                  this.state = null;
 44334                  this._optimize();
 44335                }
 44336              }
 44337              reset() {
 44338                this.state = null;
 44339                this.match = null;
 44340                this.lastProcessed = 0;
 44341              }
 44342            }
 44343            class OperatorList {
 44344              static CHUNK_SIZE = 1e3;
 44345              static CHUNK_SIZE_ABOUT = this.CHUNK_SIZE - 5;
 44346              constructor(e = 0, t) {
 44347                this._streamSink = t;
 44348                this.fnArray = [];
 44349                this.argsArray = [];
 44350                this.optimizer =
 44351                  !t || e & r.RenderingIntentFlag.OPLIST
 44352                    ? new NullOptimizer(this)
 44353                    : new QueueOptimizer(this);
 44354                this.dependencies = new Set();
 44355                this._totalLength = 0;
 44356                this.weight = 0;
 44357                this._resolved = t ? null : Promise.resolve();
 44358              }
 44359              set isOffscreenCanvasSupported(e) {
 44360                this.optimizer.isOffscreenCanvasSupported = e;
 44361              }
 44362              get length() {
 44363                return this.argsArray.length;
 44364              }
 44365              get ready() {
 44366                return this._resolved || this._streamSink.ready;
 44367              }
 44368              get totalLength() {
 44369                return this._totalLength + this.length;
 44370              }
 44371              addOp(e, t) {
 44372                this.optimizer.push(e, t);
 44373                this.weight++;
 44374                this._streamSink &&
 44375                  (this.weight >= OperatorList.CHUNK_SIZE ||
 44376                    (this.weight >= OperatorList.CHUNK_SIZE_ABOUT &&
 44377                      (e === r.OPS.restore || e === r.OPS.endText))) &&
 44378                  this.flush();
 44379              }
 44380              addImageOps(e, t, a) {
 44381                void 0 !== a &&
 44382                  this.addOp(r.OPS.beginMarkedContentProps, ["OC", a]);
 44383                this.addOp(e, t);
 44384                void 0 !== a && this.addOp(r.OPS.endMarkedContent, []);
 44385              }
 44386              addDependency(e) {
 44387                if (!this.dependencies.has(e)) {
 44388                  this.dependencies.add(e);
 44389                  this.addOp(r.OPS.dependency, [e]);
 44390                }
 44391              }
 44392              addDependencies(e) {
 44393                for (const t of e) this.addDependency(t);
 44394              }
 44395              addOpList(e) {
 44396                if (e instanceof OperatorList) {
 44397                  for (const t of e.dependencies) this.dependencies.add(t);
 44398                  for (let t = 0, a = e.length; t < a; t++)
 44399                    this.addOp(e.fnArray[t], e.argsArray[t]);
 44400                } else
 44401                  (0, r.warn)('addOpList - ignoring invalid "opList" parameter.');
 44402              }
 44403              getIR() {
 44404                return {
 44405                  fnArray: this.fnArray,
 44406                  argsArray: this.argsArray,
 44407                  length: this.length,
 44408                };
 44409              }
 44410              get _transfers() {
 44411                const e = [],
 44412                  { fnArray: t, argsArray: a, length: n } = this;
 44413                for (let i = 0; i < n; i++)
 44414                  switch (t[i]) {
 44415                    case r.OPS.paintInlineImageXObject:
 44416                    case r.OPS.paintInlineImageXObjectGroup:
 44417                    case r.OPS.paintImageMaskXObject:
 44418                      const t = a[i][0];
 44419                      !t.cached &&
 44420                        t.data?.buffer instanceof ArrayBuffer &&
 44421                        e.push(t.data.buffer);
 44422                  }
 44423                return e;
 44424              }
 44425              flush(e = !1, t = null) {
 44426                this.optimizer.flush();
 44427                const a = this.length;
 44428                this._totalLength += a;
 44429                this._streamSink.enqueue(
 44430                  {
 44431                    fnArray: this.fnArray,
 44432                    argsArray: this.argsArray,
 44433                    lastChunk: e,
 44434                    separateAnnots: t,
 44435                    length: a,
 44436                  },
 44437                  1,
 44438                  this._transfers,
 44439                );
 44440                this.dependencies.clear();
 44441                this.fnArray.length = 0;
 44442                this.argsArray.length = 0;
 44443                this.weight = 0;
 44444                this.optimizer.reset();
 44445              }
 44446            }
 44447            t.OperatorList = OperatorList;
 44448          },
 44449          (e, t, a) => {
 44450            Object.defineProperty(t, "__esModule", { value: !0 });
 44451            t.PDFImage = void 0;
 44452            var r = a(2),
 44453              n = a(28),
 44454              i = a(5),
 44455              s = a(12),
 44456              o = a(18),
 44457              c = a(62),
 44458              l = a(26),
 44459              h = a(30),
 44460              u = a(4);
 44461            function decodeAndClamp(e, t, a, r) {
 44462              (e = t + e * a) < 0 ? (e = 0) : e > r && (e = r);
 44463              return e;
 44464            }
 44465            function resizeImageMask(e, t, a, r, n, i) {
 44466              const s = n * i;
 44467              let o;
 44468              o =
 44469                t <= 8
 44470                  ? new Uint8Array(s)
 44471                  : t <= 16
 44472                    ? new Uint16Array(s)
 44473                    : new Uint32Array(s);
 44474              const c = a / n,
 44475                l = r / i;
 44476              let h,
 44477                u,
 44478                d,
 44479                f,
 44480                g = 0;
 44481              const p = new Uint16Array(n),
 44482                m = a;
 44483              for (h = 0; h < n; h++) p[h] = Math.floor(h * c);
 44484              for (h = 0; h < i; h++) {
 44485                d = Math.floor(h * l) * m;
 44486                for (u = 0; u < n; u++) {
 44487                  f = d + p[u];
 44488                  o[g++] = e[f];
 44489                }
 44490              }
 44491              return o;
 44492            }
 44493            class PDFImage {
 44494              constructor({
 44495                xref: e,
 44496                res: t,
 44497                image: a,
 44498                isInline: n = !1,
 44499                smask: o = null,
 44500                mask: c = null,
 44501                isMask: l = !1,
 44502                pdfFunctionFactory: d,
 44503                localColorSpaceCache: f,
 44504              }) {
 44505                this.image = a;
 44506                const g = a.dict,
 44507                  p = g.get("F", "Filter");
 44508                let m;
 44509                if (p instanceof u.Name) m = p.name;
 44510                else if (Array.isArray(p)) {
 44511                  const t = e.fetchIfRef(p[0]);
 44512                  t instanceof u.Name && (m = t.name);
 44513                }
 44514                switch (m) {
 44515                  case "JPXDecode":
 44516                    const e = new h.JpxImage();
 44517                    e.parseImageProperties(a.stream);
 44518                    a.stream.reset();
 44519                    a.width = e.width;
 44520                    a.height = e.height;
 44521                    a.bitsPerComponent = e.bitsPerComponent;
 44522                    a.numComps = e.componentsCount;
 44523                    break;
 44524                  case "JBIG2Decode":
 44525                    a.bitsPerComponent = 1;
 44526                    a.numComps = 1;
 44527                }
 44528                let b = g.get("W", "Width"),
 44529                  y = g.get("H", "Height");
 44530                if (
 44531                  Number.isInteger(a.width) &&
 44532                  a.width > 0 &&
 44533                  Number.isInteger(a.height) &&
 44534                  a.height > 0 &&
 44535                  (a.width !== b || a.height !== y)
 44536                ) {
 44537                  (0, r.warn)(
 44538                    "PDFImage - using the Width/Height of the image data, rather than the image dictionary.",
 44539                  );
 44540                  b = a.width;
 44541                  y = a.height;
 44542                }
 44543                if (b < 1 || y < 1)
 44544                  throw new r.FormatError(
 44545                    `Invalid image width: ${b} or height: ${y}`,
 44546                  );
 44547                this.width = b;
 44548                this.height = y;
 44549                this.interpolate = g.get("I", "Interpolate");
 44550                this.imageMask = g.get("IM", "ImageMask") || !1;
 44551                this.matte = g.get("Matte") || !1;
 44552                let w = a.bitsPerComponent;
 44553                if (!w) {
 44554                  w = g.get("BPC", "BitsPerComponent");
 44555                  if (!w) {
 44556                    if (!this.imageMask)
 44557                      throw new r.FormatError(
 44558                        `Bits per component missing in image: ${this.imageMask}`,
 44559                      );
 44560                    w = 1;
 44561                  }
 44562                }
 44563                this.bpc = w;
 44564                if (!this.imageMask) {
 44565                  let i = g.getRaw("CS") || g.getRaw("ColorSpace");
 44566                  if (!i) {
 44567                    (0, r.info)("JPX images (which do not require color spaces)");
 44568                    switch (a.numComps) {
 44569                      case 1:
 44570                        i = u.Name.get("DeviceGray");
 44571                        break;
 44572                      case 3:
 44573                        i = u.Name.get("DeviceRGB");
 44574                        break;
 44575                      case 4:
 44576                        i = u.Name.get("DeviceCMYK");
 44577                        break;
 44578                      default:
 44579                        throw new Error(
 44580                          `JPX images with ${a.numComps} color components not supported.`,
 44581                        );
 44582                    }
 44583                  }
 44584                  this.colorSpace = s.ColorSpace.parse({
 44585                    cs: i,
 44586                    xref: e,
 44587                    resources: n ? t : null,
 44588                    pdfFunctionFactory: d,
 44589                    localColorSpaceCache: f,
 44590                  });
 44591                  this.numComps = this.colorSpace.numComps;
 44592                }
 44593                this.decode = g.getArray("D", "Decode");
 44594                this.needsDecode = !1;
 44595                if (
 44596                  this.decode &&
 44597                  ((this.colorSpace &&
 44598                    !this.colorSpace.isDefaultDecode(this.decode, w)) ||
 44599                    (l && !s.ColorSpace.isDefaultDecode(this.decode, 1)))
 44600                ) {
 44601                  this.needsDecode = !0;
 44602                  const e = (1 << w) - 1;
 44603                  this.decodeCoefficients = [];
 44604                  this.decodeAddends = [];
 44605                  const t = "Indexed" === this.colorSpace?.name;
 44606                  for (let a = 0, r = 0; a < this.decode.length; a += 2, ++r) {
 44607                    const n = this.decode[a],
 44608                      i = this.decode[a + 1];
 44609                    this.decodeCoefficients[r] = t ? (i - n) / e : i - n;
 44610                    this.decodeAddends[r] = t ? n : e * n;
 44611                  }
 44612                }
 44613                if (o)
 44614                  this.smask = new PDFImage({
 44615                    xref: e,
 44616                    res: t,
 44617                    image: o,
 44618                    isInline: n,
 44619                    pdfFunctionFactory: d,
 44620                    localColorSpaceCache: f,
 44621                  });
 44622                else if (c)
 44623                  if (c instanceof i.BaseStream) {
 44624                    c.dict.get("IM", "ImageMask")
 44625                      ? (this.mask = new PDFImage({
 44626                          xref: e,
 44627                          res: t,
 44628                          image: c,
 44629                          isInline: n,
 44630                          isMask: !0,
 44631                          pdfFunctionFactory: d,
 44632                          localColorSpaceCache: f,
 44633                        }))
 44634                      : (0, r.warn)(
 44635                          "Ignoring /Mask in image without /ImageMask.",
 44636                        );
 44637                  } else this.mask = c;
 44638              }
 44639              static async buildImage({
 44640                xref: e,
 44641                res: t,
 44642                image: a,
 44643                isInline: n = !1,
 44644                pdfFunctionFactory: s,
 44645                localColorSpaceCache: o,
 44646              }) {
 44647                const c = a;
 44648                let l = null,
 44649                  h = null;
 44650                const u = a.dict.get("SMask"),
 44651                  d = a.dict.get("Mask");
 44652                u
 44653                  ? u instanceof i.BaseStream
 44654                    ? (l = u)
 44655                    : (0, r.warn)("Unsupported /SMask format.")
 44656                  : d &&
 44657                    (d instanceof i.BaseStream || Array.isArray(d)
 44658                      ? (h = d)
 44659                      : (0, r.warn)("Unsupported /Mask format."));
 44660                return new PDFImage({
 44661                  xref: e,
 44662                  res: t,
 44663                  image: c,
 44664                  isInline: n,
 44665                  smask: l,
 44666                  mask: h,
 44667                  pdfFunctionFactory: s,
 44668                  localColorSpaceCache: o,
 44669                });
 44670              }
 44671              static createRawMask({
 44672                imgArray: e,
 44673                width: t,
 44674                height: a,
 44675                imageIsFromDecodeStream: r,
 44676                inverseDecode: n,
 44677                interpolate: i,
 44678              }) {
 44679                const s = ((t + 7) >> 3) * a,
 44680                  o = e.byteLength;
 44681                let c, l;
 44682                if (!r || (n && !(s === o)))
 44683                  if (n) {
 44684                    c = new Uint8Array(s);
 44685                    c.set(e);
 44686                    c.fill(255, o);
 44687                  } else c = new Uint8Array(e);
 44688                else c = e;
 44689                if (n) for (l = 0; l < o; l++) c[l] ^= 255;
 44690                return { data: c, width: t, height: a, interpolate: i };
 44691              }
 44692              static async createMask({
 44693                imgArray: e,
 44694                width: t,
 44695                height: a,
 44696                imageIsFromDecodeStream: i,
 44697                inverseDecode: s,
 44698                interpolate: o,
 44699                isOffscreenCanvasSupported: l = !1,
 44700              }) {
 44701                const h =
 44702                  1 === t && 1 === a && s === (0 === e.length || !!(128 & e[0]));
 44703                if (h) return { isSingleOpaquePixel: h };
 44704                if (l) {
 44705                  if (c.ImageResizer.needsToBeResized(t, a)) {
 44706                    const i = new Uint8ClampedArray(t * a * 4);
 44707                    (0, n.convertBlackAndWhiteToRGBA)({
 44708                      src: e,
 44709                      dest: i,
 44710                      width: t,
 44711                      height: a,
 44712                      nonBlackColor: 0,
 44713                      inverseDecode: s,
 44714                    });
 44715                    return c.ImageResizer.createImage({
 44716                      kind: r.ImageKind.RGBA_32BPP,
 44717                      data: i,
 44718                      width: t,
 44719                      height: a,
 44720                      interpolate: o,
 44721                    });
 44722                  }
 44723                  const i = new OffscreenCanvas(t, a),
 44724                    l = i.getContext("2d"),
 44725                    h = l.createImageData(t, a);
 44726                  (0, n.convertBlackAndWhiteToRGBA)({
 44727                    src: e,
 44728                    dest: h.data,
 44729                    width: t,
 44730                    height: a,
 44731                    nonBlackColor: 0,
 44732                    inverseDecode: s,
 44733                  });
 44734                  l.putImageData(h, 0, 0);
 44735                  return {
 44736                    data: null,
 44737                    width: t,
 44738                    height: a,
 44739                    interpolate: o,
 44740                    bitmap: i.transferToImageBitmap(),
 44741                  };
 44742                }
 44743                return this.createRawMask({
 44744                  imgArray: e,
 44745                  width: t,
 44746                  height: a,
 44747                  inverseDecode: s,
 44748                  imageIsFromDecodeStream: i,
 44749                  interpolate: o,
 44750                });
 44751              }
 44752              get drawWidth() {
 44753                return Math.max(
 44754                  this.width,
 44755                  this.smask?.width || 0,
 44756                  this.mask?.width || 0,
 44757                );
 44758              }
 44759              get drawHeight() {
 44760                return Math.max(
 44761                  this.height,
 44762                  this.smask?.height || 0,
 44763                  this.mask?.height || 0,
 44764                );
 44765              }
 44766              decodeBuffer(e) {
 44767                const t = this.bpc,
 44768                  a = this.numComps,
 44769                  r = this.decodeAddends,
 44770                  n = this.decodeCoefficients,
 44771                  i = (1 << t) - 1;
 44772                let s, o;
 44773                if (1 === t) {
 44774                  for (s = 0, o = e.length; s < o; s++) e[s] = +!e[s];
 44775                  return;
 44776                }
 44777                let c = 0;
 44778                for (s = 0, o = this.width * this.height; s < o; s++)
 44779                  for (let t = 0; t < a; t++) {
 44780                    e[c] = decodeAndClamp(e[c], r[t], n[t], i);
 44781                    c++;
 44782                  }
 44783              }
 44784              getComponents(e) {
 44785                const t = this.bpc;
 44786                if (8 === t) return e;
 44787                const a = this.width,
 44788                  r = this.height,
 44789                  n = this.numComps,
 44790                  i = a * r * n;
 44791                let s,
 44792                  o = 0;
 44793                s =
 44794                  t <= 8
 44795                    ? new Uint8Array(i)
 44796                    : t <= 16
 44797                      ? new Uint16Array(i)
 44798                      : new Uint32Array(i);
 44799                const c = a * n,
 44800                  l = (1 << t) - 1;
 44801                let h,
 44802                  u,
 44803                  d = 0;
 44804                if (1 === t) {
 44805                  let t, a, n;
 44806                  for (let i = 0; i < r; i++) {
 44807                    a = d + (-8 & c);
 44808                    n = d + c;
 44809                    for (; d < a; ) {
 44810                      u = e[o++];
 44811                      s[d] = (u >> 7) & 1;
 44812                      s[d + 1] = (u >> 6) & 1;
 44813                      s[d + 2] = (u >> 5) & 1;
 44814                      s[d + 3] = (u >> 4) & 1;
 44815                      s[d + 4] = (u >> 3) & 1;
 44816                      s[d + 5] = (u >> 2) & 1;
 44817                      s[d + 6] = (u >> 1) & 1;
 44818                      s[d + 7] = 1 & u;
 44819                      d += 8;
 44820                    }
 44821                    if (d < n) {
 44822                      u = e[o++];
 44823                      t = 128;
 44824                      for (; d < n; ) {
 44825                        s[d++] = +!!(u & t);
 44826                        t >>= 1;
 44827                      }
 44828                    }
 44829                  }
 44830                } else {
 44831                  let a = 0;
 44832                  u = 0;
 44833                  for (d = 0, h = i; d < h; ++d) {
 44834                    if (d % c == 0) {
 44835                      u = 0;
 44836                      a = 0;
 44837                    }
 44838                    for (; a < t; ) {
 44839                      u = (u << 8) | e[o++];
 44840                      a += 8;
 44841                    }
 44842                    const r = a - t;
 44843                    let n = u >> r;
 44844                    n < 0 ? (n = 0) : n > l && (n = l);
 44845                    s[d] = n;
 44846                    u &= (1 << r) - 1;
 44847                    a = r;
 44848                  }
 44849                }
 44850                return s;
 44851              }
 44852              fillOpacity(e, t, a, n, i) {
 44853                const s = this.smask,
 44854                  o = this.mask;
 44855                let c, l, h, u, d, f;
 44856                if (s) {
 44857                  l = s.width;
 44858                  h = s.height;
 44859                  c = new Uint8ClampedArray(l * h);
 44860                  s.fillGrayBuffer(c);
 44861                  (l === t && h === a) ||
 44862                    (c = resizeImageMask(c, s.bpc, l, h, t, a));
 44863                } else if (o)
 44864                  if (o instanceof PDFImage) {
 44865                    l = o.width;
 44866                    h = o.height;
 44867                    c = new Uint8ClampedArray(l * h);
 44868                    o.numComps = 1;
 44869                    o.fillGrayBuffer(c);
 44870                    for (u = 0, d = l * h; u < d; ++u) c[u] = 255 - c[u];
 44871                    (l === t && h === a) ||
 44872                      (c = resizeImageMask(c, o.bpc, l, h, t, a));
 44873                  } else {
 44874                    if (!Array.isArray(o))
 44875                      throw new r.FormatError("Unknown mask format.");
 44876                    {
 44877                      c = new Uint8ClampedArray(t * a);
 44878                      const e = this.numComps;
 44879                      for (u = 0, d = t * a; u < d; ++u) {
 44880                        let t = 0;
 44881                        const a = u * e;
 44882                        for (f = 0; f < e; ++f) {
 44883                          const e = i[a + f],
 44884                            r = 2 * f;
 44885                          if (e < o[r] || e > o[r + 1]) {
 44886                            t = 255;
 44887                            break;
 44888                          }
 44889                        }
 44890                        c[u] = t;
 44891                      }
 44892                    }
 44893                  }
 44894                if (c)
 44895                  for (u = 0, f = 3, d = t * n; u < d; ++u, f += 4) e[f] = c[u];
 44896                else for (u = 0, f = 3, d = t * n; u < d; ++u, f += 4) e[f] = 255;
 44897              }
 44898              undoPreblend(e, t, a) {
 44899                const r = this.smask?.matte;
 44900                if (!r) return;
 44901                const n = this.colorSpace.getRgb(r, 0),
 44902                  i = n[0],
 44903                  s = n[1],
 44904                  o = n[2],
 44905                  c = t * a * 4;
 44906                for (let t = 0; t < c; t += 4) {
 44907                  const a = e[t + 3];
 44908                  if (0 === a) {
 44909                    e[t] = 255;
 44910                    e[t + 1] = 255;
 44911                    e[t + 2] = 255;
 44912                    continue;
 44913                  }
 44914                  const r = 255 / a;
 44915                  e[t] = (e[t] - i) * r + i;
 44916                  e[t + 1] = (e[t + 1] - s) * r + s;
 44917                  e[t + 2] = (e[t + 2] - o) * r + o;
 44918                }
 44919              }
 44920              async createImageData(e = !1, t = !1) {
 44921                const a = this.drawWidth,
 44922                  n = this.drawHeight,
 44923                  i = {
 44924                    width: a,
 44925                    height: n,
 44926                    interpolate: this.interpolate,
 44927                    kind: 0,
 44928                    data: null,
 44929                  },
 44930                  s = this.numComps,
 44931                  o = this.width,
 44932                  h = this.height,
 44933                  u = this.bpc,
 44934                  d = (o * s * u + 7) >> 3,
 44935                  f = t && c.ImageResizer.needsToBeResized(a, n);
 44936                if (!e) {
 44937                  let e;
 44938                  "DeviceGray" === this.colorSpace.name && 1 === u
 44939                    ? (e = r.ImageKind.GRAYSCALE_1BPP)
 44940                    : "DeviceRGB" !== this.colorSpace.name ||
 44941                      8 !== u ||
 44942                      this.needsDecode ||
 44943                      (e = r.ImageKind.RGB_24BPP);
 44944                  if (e && !this.smask && !this.mask && a === o && n === h) {
 44945                    const s = this.getImageBytes(h * d, {});
 44946                    if (t)
 44947                      return f
 44948                        ? c.ImageResizer.createImage(
 44949                            {
 44950                              data: s,
 44951                              kind: e,
 44952                              width: a,
 44953                              height: n,
 44954                              interpolate: this.interpolate,
 44955                            },
 44956                            this.needsDecode,
 44957                          )
 44958                        : this.createBitmap(e, o, h, s);
 44959                    i.kind = e;
 44960                    i.data = s;
 44961                    if (this.needsDecode) {
 44962                      (0, r.assert)(
 44963                        e === r.ImageKind.GRAYSCALE_1BPP,
 44964                        "PDFImage.createImageData: The image must be grayscale.",
 44965                      );
 44966                      const t = i.data;
 44967                      for (let e = 0, a = t.length; e < a; e++) t[e] ^= 255;
 44968                    }
 44969                    return i;
 44970                  }
 44971                  if (
 44972                    this.image instanceof l.JpegStream &&
 44973                    !this.smask &&
 44974                    !this.mask &&
 44975                    !this.needsDecode
 44976                  ) {
 44977                    let e = h * d;
 44978                    if (t && !f) {
 44979                      let t = !1;
 44980                      switch (this.colorSpace.name) {
 44981                        case "DeviceGray":
 44982                          e *= 4;
 44983                          t = !0;
 44984                          break;
 44985                        case "DeviceRGB":
 44986                          e = (e / 3) * 4;
 44987                          t = !0;
 44988                          break;
 44989                        case "DeviceCMYK":
 44990                          t = !0;
 44991                      }
 44992                      if (t) {
 44993                        const t = this.getImageBytes(e, {
 44994                          drawWidth: a,
 44995                          drawHeight: n,
 44996                          forceRGBA: !0,
 44997                        });
 44998                        return this.createBitmap(r.ImageKind.RGBA_32BPP, a, n, t);
 44999                      }
 45000                    } else
 45001                      switch (this.colorSpace.name) {
 45002                        case "DeviceGray":
 45003                          e *= 3;
 45004                        case "DeviceRGB":
 45005                        case "DeviceCMYK":
 45006                          i.kind = r.ImageKind.RGB_24BPP;
 45007                          i.data = this.getImageBytes(e, {
 45008                            drawWidth: a,
 45009                            drawHeight: n,
 45010                            forceRGB: !0,
 45011                          });
 45012                          return f ? c.ImageResizer.createImage(i) : i;
 45013                      }
 45014                  }
 45015                }
 45016                const g = this.getImageBytes(h * d, { internal: !0 }),
 45017                  p = 0 | (((g.length / d) * n) / h),
 45018                  m = this.getComponents(g);
 45019                let b, y, w, S, x, C;
 45020                if (t && !f) {
 45021                  w = new OffscreenCanvas(a, n);
 45022                  S = w.getContext("2d");
 45023                  x = S.createImageData(a, n);
 45024                  C = x.data;
 45025                }
 45026                i.kind = r.ImageKind.RGBA_32BPP;
 45027                if (e || this.smask || this.mask) {
 45028                  (t && !f) || (C = new Uint8ClampedArray(a * n * 4));
 45029                  b = 1;
 45030                  y = !0;
 45031                  this.fillOpacity(C, a, n, p, m);
 45032                } else {
 45033                  if (!t || f) {
 45034                    i.kind = r.ImageKind.RGB_24BPP;
 45035                    C = new Uint8ClampedArray(a * n * 3);
 45036                    b = 0;
 45037                  } else {
 45038                    new Uint32Array(C.buffer).fill(
 45039                      r.FeatureTest.isLittleEndian ? 4278190080 : 255,
 45040                    );
 45041                    b = 1;
 45042                  }
 45043                  y = !1;
 45044                }
 45045                this.needsDecode && this.decodeBuffer(m);
 45046                this.colorSpace.fillRgb(C, o, h, a, n, p, u, m, b);
 45047                y && this.undoPreblend(C, a, p);
 45048                if (t && !f) {
 45049                  S.putImageData(x, 0, 0);
 45050                  return {
 45051                    data: null,
 45052                    width: a,
 45053                    height: n,
 45054                    bitmap: w.transferToImageBitmap(),
 45055                    interpolate: this.interpolate,
 45056                  };
 45057                }
 45058                i.data = C;
 45059                return f ? c.ImageResizer.createImage(i) : i;
 45060              }
 45061              fillGrayBuffer(e) {
 45062                const t = this.numComps;
 45063                if (1 !== t)
 45064                  throw new r.FormatError(
 45065                    `Reading gray scale from a color image: ${t}`,
 45066                  );
 45067                const a = this.width,
 45068                  n = this.height,
 45069                  i = this.bpc,
 45070                  s = (a * t * i + 7) >> 3,
 45071                  o = this.getImageBytes(n * s, { internal: !0 }),
 45072                  c = this.getComponents(o);
 45073                let l, h;
 45074                if (1 === i) {
 45075                  h = a * n;
 45076                  if (this.needsDecode)
 45077                    for (l = 0; l < h; ++l) e[l] = (c[l] - 1) & 255;
 45078                  else for (l = 0; l < h; ++l) e[l] = 255 & -c[l];
 45079                  return;
 45080                }
 45081                this.needsDecode && this.decodeBuffer(c);
 45082                h = a * n;
 45083                const u = 255 / ((1 << i) - 1);
 45084                for (l = 0; l < h; ++l) e[l] = u * c[l];
 45085              }
 45086              createBitmap(e, t, a, i) {
 45087                const s = new OffscreenCanvas(t, a),
 45088                  o = s.getContext("2d");
 45089                let c;
 45090                if (e === r.ImageKind.RGBA_32BPP) c = new ImageData(i, t, a);
 45091                else {
 45092                  c = o.createImageData(t, a);
 45093                  (0, n.convertToRGBA)({
 45094                    kind: e,
 45095                    src: i,
 45096                    dest: new Uint32Array(c.data.buffer),
 45097                    width: t,
 45098                    height: a,
 45099                    inverseDecode: this.needsDecode,
 45100                  });
 45101                }
 45102                o.putImageData(c, 0, 0);
 45103                return {
 45104                  data: null,
 45105                  width: t,
 45106                  height: a,
 45107                  bitmap: s.transferToImageBitmap(),
 45108                  interpolate: this.interpolate,
 45109                };
 45110              }
 45111              getImageBytes(
 45112                e,
 45113                {
 45114                  drawWidth: t,
 45115                  drawHeight: a,
 45116                  forceRGBA: n = !1,
 45117                  forceRGB: i = !1,
 45118                  internal: s = !1,
 45119                },
 45120              ) {
 45121                this.image.reset();
 45122                this.image.drawWidth = t || this.width;
 45123                this.image.drawHeight = a || this.height;
 45124                this.image.forceRGBA = !!n;
 45125                this.image.forceRGB = !!i;
 45126                const c = this.image.getBytes(e);
 45127                if (s || this.image instanceof o.DecodeStream) return c;
 45128                (0, r.assert)(
 45129                  c instanceof Uint8Array,
 45130                  'PDFImage.getImageBytes: Unsupported "imageBytes" type.',
 45131                );
 45132                return new Uint8Array(c);
 45133              }
 45134            }
 45135            t.PDFImage = PDFImage;
 45136          },
 45137          (e, t, a) => {
 45138            Object.defineProperty(t, "__esModule", { value: !0 });
 45139            t.Catalog = void 0;
 45140            var r = a(3),
 45141              n = a(2),
 45142              i = a(4),
 45143              s = a(67),
 45144              o = a(5),
 45145              c = a(68),
 45146              l = a(12),
 45147              h = a(69),
 45148              u = a(59),
 45149              d = a(70),
 45150              f = a(72);
 45151            function fetchDestination(e) {
 45152              e instanceof i.Dict && (e = e.get("D"));
 45153              return Array.isArray(e) ? e : null;
 45154            }
 45155            class Catalog {
 45156              constructor(e, t) {
 45157                this.pdfManager = e;
 45158                this.xref = t;
 45159                this._catDict = t.getCatalogObj();
 45160                if (!(this._catDict instanceof i.Dict))
 45161                  throw new n.FormatError("Catalog object is not a dictionary.");
 45162                this.toplevelPagesDict;
 45163                this._actualNumPages = null;
 45164                this.fontCache = new i.RefSetCache();
 45165                this.builtInCMapCache = new Map();
 45166                this.standardFontDataCache = new Map();
 45167                this.globalImageCache = new u.GlobalImageCache();
 45168                this.pageKidsCountCache = new i.RefSetCache();
 45169                this.pageIndexCache = new i.RefSetCache();
 45170                this.nonBlendModesSet = new i.RefSet();
 45171                this.systemFontCache = new Map();
 45172              }
 45173              cloneDict() {
 45174                return this._catDict.clone();
 45175              }
 45176              get version() {
 45177                const e = this._catDict.get("Version");
 45178                if (e instanceof i.Name) {
 45179                  if (r.PDF_VERSION_REGEXP.test(e.name))
 45180                    return (0, n.shadow)(this, "version", e.name);
 45181                  (0, n.warn)(`Invalid PDF catalog version: ${e.name}`);
 45182                }
 45183                return (0, n.shadow)(this, "version", null);
 45184              }
 45185              get lang() {
 45186                const e = this._catDict.get("Lang");
 45187                return (0, n.shadow)(
 45188                  this,
 45189                  "lang",
 45190                  "string" == typeof e ? (0, n.stringToPDFString)(e) : null,
 45191                );
 45192              }
 45193              get needsRendering() {
 45194                const e = this._catDict.get("NeedsRendering");
 45195                return (0, n.shadow)(
 45196                  this,
 45197                  "needsRendering",
 45198                  "boolean" == typeof e && e,
 45199                );
 45200              }
 45201              get collection() {
 45202                let e = null;
 45203                try {
 45204                  const t = this._catDict.get("Collection");
 45205                  t instanceof i.Dict && t.size > 0 && (e = t);
 45206                } catch (e) {
 45207                  if (e instanceof r.MissingDataException) throw e;
 45208                  (0, n.info)(
 45209                    "Cannot fetch Collection entry; assuming no collection is present.",
 45210                  );
 45211                }
 45212                return (0, n.shadow)(this, "collection", e);
 45213              }
 45214              get acroForm() {
 45215                let e = null;
 45216                try {
 45217                  const t = this._catDict.get("AcroForm");
 45218                  t instanceof i.Dict && t.size > 0 && (e = t);
 45219                } catch (e) {
 45220                  if (e instanceof r.MissingDataException) throw e;
 45221                  (0, n.info)(
 45222                    "Cannot fetch AcroForm entry; assuming no forms are present.",
 45223                  );
 45224                }
 45225                return (0, n.shadow)(this, "acroForm", e);
 45226              }
 45227              get acroFormRef() {
 45228                const e = this._catDict.getRaw("AcroForm");
 45229                return (0, n.shadow)(
 45230                  this,
 45231                  "acroFormRef",
 45232                  e instanceof i.Ref ? e : null,
 45233                );
 45234              }
 45235              get metadata() {
 45236                const e = this._catDict.getRaw("Metadata");
 45237                if (!(e instanceof i.Ref))
 45238                  return (0, n.shadow)(this, "metadata", null);
 45239                let t = null;
 45240                try {
 45241                  const a = this.xref.fetch(
 45242                    e,
 45243                    !this.xref.encrypt?.encryptMetadata,
 45244                  );
 45245                  if (a instanceof o.BaseStream && a.dict instanceof i.Dict) {
 45246                    const e = a.dict.get("Type"),
 45247                      r = a.dict.get("Subtype");
 45248                    if ((0, i.isName)(e, "Metadata") && (0, i.isName)(r, "XML")) {
 45249                      const e = (0, n.stringToUTF8String)(a.getString());
 45250                      e && (t = new d.MetadataParser(e).serializable);
 45251                    }
 45252                  }
 45253                } catch (e) {
 45254                  if (e instanceof r.MissingDataException) throw e;
 45255                  (0, n.info)(`Skipping invalid Metadata: "${e}".`);
 45256                }
 45257                return (0, n.shadow)(this, "metadata", t);
 45258              }
 45259              get markInfo() {
 45260                let e = null;
 45261                try {
 45262                  e = this._readMarkInfo();
 45263                } catch (e) {
 45264                  if (e instanceof r.MissingDataException) throw e;
 45265                  (0, n.warn)("Unable to read mark info.");
 45266                }
 45267                return (0, n.shadow)(this, "markInfo", e);
 45268              }
 45269              _readMarkInfo() {
 45270                const e = this._catDict.get("MarkInfo");
 45271                if (!(e instanceof i.Dict)) return null;
 45272                const t = { Marked: !1, UserProperties: !1, Suspects: !1 };
 45273                for (const a in t) {
 45274                  const r = e.get(a);
 45275                  "boolean" == typeof r && (t[a] = r);
 45276                }
 45277                return t;
 45278              }
 45279              get structTreeRoot() {
 45280                let e = null;
 45281                try {
 45282                  e = this._readStructTreeRoot();
 45283                } catch (e) {
 45284                  if (e instanceof r.MissingDataException) throw e;
 45285                  (0, n.warn)("Unable read to structTreeRoot info.");
 45286                }
 45287                return (0, n.shadow)(this, "structTreeRoot", e);
 45288              }
 45289              _readStructTreeRoot() {
 45290                const e = this._catDict.getRaw("StructTreeRoot"),
 45291                  t = this.xref.fetchIfRef(e);
 45292                if (!(t instanceof i.Dict)) return null;
 45293                const a = new f.StructTreeRoot(t, e);
 45294                a.init();
 45295                return a;
 45296              }
 45297              get toplevelPagesDict() {
 45298                const e = this._catDict.get("Pages");
 45299                if (!(e instanceof i.Dict))
 45300                  throw new n.FormatError("Invalid top-level pages dictionary.");
 45301                return (0, n.shadow)(this, "toplevelPagesDict", e);
 45302              }
 45303              get documentOutline() {
 45304                let e = null;
 45305                try {
 45306                  e = this._readDocumentOutline();
 45307                } catch (e) {
 45308                  if (e instanceof r.MissingDataException) throw e;
 45309                  (0, n.warn)("Unable to read document outline.");
 45310                }
 45311                return (0, n.shadow)(this, "documentOutline", e);
 45312              }
 45313              _readDocumentOutline() {
 45314                let e = this._catDict.get("Outlines");
 45315                if (!(e instanceof i.Dict)) return null;
 45316                e = e.getRaw("First");
 45317                if (!(e instanceof i.Ref)) return null;
 45318                const t = { items: [] },
 45319                  a = [{ obj: e, parent: t }],
 45320                  r = new i.RefSet();
 45321                r.put(e);
 45322                const s = this.xref,
 45323                  o = new Uint8ClampedArray(3);
 45324                for (; a.length > 0; ) {
 45325                  const t = a.shift(),
 45326                    c = s.fetchIfRef(t.obj);
 45327                  if (null === c) continue;
 45328                  if (!c.has("Title"))
 45329                    throw new n.FormatError("Invalid outline item encountered.");
 45330                  const h = { url: null, dest: null, action: null };
 45331                  Catalog.parseDestDictionary({
 45332                    destDict: c,
 45333                    resultObj: h,
 45334                    docBaseUrl: this.baseUrl,
 45335                    docAttachments: this.attachments,
 45336                  });
 45337                  const u = c.get("Title"),
 45338                    d = c.get("F") || 0,
 45339                    f = c.getArray("C"),
 45340                    g = c.get("Count");
 45341                  let p = o;
 45342                  !Array.isArray(f) ||
 45343                    3 !== f.length ||
 45344                    (0 === f[0] && 0 === f[1] && 0 === f[2]) ||
 45345                    (p = l.ColorSpace.singletons.rgb.getRgb(f, 0));
 45346                  const m = {
 45347                    action: h.action,
 45348                    attachment: h.attachment,
 45349                    dest: h.dest,
 45350                    url: h.url,
 45351                    unsafeUrl: h.unsafeUrl,
 45352                    newWindow: h.newWindow,
 45353                    setOCGState: h.setOCGState,
 45354                    title: (0, n.stringToPDFString)(u),
 45355                    color: p,
 45356                    count: Number.isInteger(g) ? g : void 0,
 45357                    bold: !!(2 & d),
 45358                    italic: !!(1 & d),
 45359                    items: [],
 45360                  };
 45361                  t.parent.items.push(m);
 45362                  e = c.getRaw("First");
 45363                  if (e instanceof i.Ref && !r.has(e)) {
 45364                    a.push({ obj: e, parent: m });
 45365                    r.put(e);
 45366                  }
 45367                  e = c.getRaw("Next");
 45368                  if (e instanceof i.Ref && !r.has(e)) {
 45369                    a.push({ obj: e, parent: t.parent });
 45370                    r.put(e);
 45371                  }
 45372                }
 45373                return t.items.length > 0 ? t.items : null;
 45374              }
 45375              get permissions() {
 45376                let e = null;
 45377                try {
 45378                  e = this._readPermissions();
 45379                } catch (e) {
 45380                  if (e instanceof r.MissingDataException) throw e;
 45381                  (0, n.warn)("Unable to read permissions.");
 45382                }
 45383                return (0, n.shadow)(this, "permissions", e);
 45384              }
 45385              _readPermissions() {
 45386                const e = this.xref.trailer.get("Encrypt");
 45387                if (!(e instanceof i.Dict)) return null;
 45388                let t = e.get("P");
 45389                if ("number" != typeof t) return null;
 45390                t += 2 ** 32;
 45391                const a = [];
 45392                for (const e in n.PermissionFlag) {
 45393                  const r = n.PermissionFlag[e];
 45394                  t & r && a.push(r);
 45395                }
 45396                return a;
 45397              }
 45398              get optionalContentConfig() {
 45399                let e = null;
 45400                try {
 45401                  const t = this._catDict.get("OCProperties");
 45402                  if (!t)
 45403                    return (0, n.shadow)(this, "optionalContentConfig", null);
 45404                  const a = t.get("D");
 45405                  if (!a)
 45406                    return (0, n.shadow)(this, "optionalContentConfig", null);
 45407                  const r = t.get("OCGs");
 45408                  if (!Array.isArray(r))
 45409                    return (0, n.shadow)(this, "optionalContentConfig", null);
 45410                  const s = [],
 45411                    o = [];
 45412                  for (const e of r) {
 45413                    if (!(e instanceof i.Ref)) continue;
 45414                    o.push(e);
 45415                    const t = this.xref.fetchIfRef(e);
 45416                    s.push({
 45417                      id: e.toString(),
 45418                      name:
 45419                        "string" == typeof t.get("Name")
 45420                          ? (0, n.stringToPDFString)(t.get("Name"))
 45421                          : null,
 45422                      intent:
 45423                        "string" == typeof t.get("Intent")
 45424                          ? (0, n.stringToPDFString)(t.get("Intent"))
 45425                          : null,
 45426                    });
 45427                  }
 45428                  e = this._readOptionalContentConfig(a, o);
 45429                  e.groups = s;
 45430                } catch (e) {
 45431                  if (e instanceof r.MissingDataException) throw e;
 45432                  (0, n.warn)(`Unable to read optional content config: ${e}`);
 45433                }
 45434                return (0, n.shadow)(this, "optionalContentConfig", e);
 45435              }
 45436              _readOptionalContentConfig(e, t) {
 45437                function parseOnOff(e) {
 45438                  const a = [];
 45439                  if (Array.isArray(e))
 45440                    for (const r of e)
 45441                      r instanceof i.Ref && t.includes(r) && a.push(r.toString());
 45442                  return a;
 45443                }
 45444                function parseOrder(e, a = 0) {
 45445                  if (!Array.isArray(e)) return null;
 45446                  const n = [];
 45447                  for (const s of e) {
 45448                    if (s instanceof i.Ref && t.includes(s)) {
 45449                      r.put(s);
 45450                      n.push(s.toString());
 45451                      continue;
 45452                    }
 45453                    const e = parseNestedOrder(s, a);
 45454                    e && n.push(e);
 45455                  }
 45456                  if (a > 0) return n;
 45457                  const s = [];
 45458                  for (const e of t) r.has(e) || s.push(e.toString());
 45459                  s.length && n.push({ name: null, order: s });
 45460                  return n;
 45461                }
 45462                function parseNestedOrder(e, t) {
 45463                  if (++t > s) {
 45464                    (0, n.warn)("parseNestedOrder - reached MAX_NESTED_LEVELS.");
 45465                    return null;
 45466                  }
 45467                  const r = a.fetchIfRef(e);
 45468                  if (!Array.isArray(r)) return null;
 45469                  const i = a.fetchIfRef(r[0]);
 45470                  if ("string" != typeof i) return null;
 45471                  const o = parseOrder(r.slice(1), t);
 45472                  return o && o.length
 45473                    ? { name: (0, n.stringToPDFString)(i), order: o }
 45474                    : null;
 45475                }
 45476                const a = this.xref,
 45477                  r = new i.RefSet(),
 45478                  s = 10;
 45479                return {
 45480                  name:
 45481                    "string" == typeof e.get("Name")
 45482                      ? (0, n.stringToPDFString)(e.get("Name"))
 45483                      : null,
 45484                  creator:
 45485                    "string" == typeof e.get("Creator")
 45486                      ? (0, n.stringToPDFString)(e.get("Creator"))
 45487                      : null,
 45488                  baseState:
 45489                    e.get("BaseState") instanceof i.Name
 45490                      ? e.get("BaseState").name
 45491                      : null,
 45492                  on: parseOnOff(e.get("ON")),
 45493                  off: parseOnOff(e.get("OFF")),
 45494                  order: parseOrder(e.get("Order")),
 45495                  groups: null,
 45496                };
 45497              }
 45498              setActualNumPages(e = null) {
 45499                this._actualNumPages = e;
 45500              }
 45501              get hasActualNumPages() {
 45502                return null !== this._actualNumPages;
 45503              }
 45504              get _pagesCount() {
 45505                const e = this.toplevelPagesDict.get("Count");
 45506                if (!Number.isInteger(e))
 45507                  throw new n.FormatError(
 45508                    "Page count in top-level pages dictionary is not an integer.",
 45509                  );
 45510                return (0, n.shadow)(this, "_pagesCount", e);
 45511              }
 45512              get numPages() {
 45513                return this.hasActualNumPages
 45514                  ? this._actualNumPages
 45515                  : this._pagesCount;
 45516              }
 45517              get destinations() {
 45518                const e = this._readDests(),
 45519                  t = Object.create(null);
 45520                if (e instanceof s.NameTree)
 45521                  for (const [a, r] of e.getAll()) {
 45522                    const e = fetchDestination(r);
 45523                    e && (t[(0, n.stringToPDFString)(a)] = e);
 45524                  }
 45525                else
 45526                  e instanceof i.Dict &&
 45527                    e.forEach(function (e, a) {
 45528                      const r = fetchDestination(a);
 45529                      r && (t[e] = r);
 45530                    });
 45531                return (0, n.shadow)(this, "destinations", t);
 45532              }
 45533              getDestination(e) {
 45534                const t = this._readDests();
 45535                if (t instanceof s.NameTree) {
 45536                  const a = fetchDestination(t.get(e));
 45537                  if (a) return a;
 45538                  const r = this.destinations[e];
 45539                  if (r) {
 45540                    (0, n.warn)(
 45541                      `Found "${e}" at an incorrect position in the NameTree.`,
 45542                    );
 45543                    return r;
 45544                  }
 45545                } else if (t instanceof i.Dict) {
 45546                  const a = fetchDestination(t.get(e));
 45547                  if (a) return a;
 45548                }
 45549                return null;
 45550              }
 45551              _readDests() {
 45552                const e = this._catDict.get("Names");
 45553                return e?.has("Dests")
 45554                  ? new s.NameTree(e.getRaw("Dests"), this.xref)
 45555                  : this._catDict.has("Dests")
 45556                    ? this._catDict.get("Dests")
 45557                    : void 0;
 45558              }
 45559              get pageLabels() {
 45560                let e = null;
 45561                try {
 45562                  e = this._readPageLabels();
 45563                } catch (e) {
 45564                  if (e instanceof r.MissingDataException) throw e;
 45565                  (0, n.warn)("Unable to read page labels.");
 45566                }
 45567                return (0, n.shadow)(this, "pageLabels", e);
 45568              }
 45569              _readPageLabels() {
 45570                const e = this._catDict.getRaw("PageLabels");
 45571                if (!e) return null;
 45572                const t = new Array(this.numPages);
 45573                let a = null,
 45574                  o = "";
 45575                const c = new s.NumberTree(e, this.xref).getAll();
 45576                let l = "",
 45577                  h = 1;
 45578                for (let e = 0, s = this.numPages; e < s; e++) {
 45579                  const s = c.get(e);
 45580                  if (void 0 !== s) {
 45581                    if (!(s instanceof i.Dict))
 45582                      throw new n.FormatError("PageLabel is not a dictionary.");
 45583                    if (
 45584                      s.has("Type") &&
 45585                      !(0, i.isName)(s.get("Type"), "PageLabel")
 45586                    )
 45587                      throw new n.FormatError(
 45588                        "Invalid type in PageLabel dictionary.",
 45589                      );
 45590                    if (s.has("S")) {
 45591                      const e = s.get("S");
 45592                      if (!(e instanceof i.Name))
 45593                        throw new n.FormatError(
 45594                          "Invalid style in PageLabel dictionary.",
 45595                        );
 45596                      a = e.name;
 45597                    } else a = null;
 45598                    if (s.has("P")) {
 45599                      const e = s.get("P");
 45600                      if ("string" != typeof e)
 45601                        throw new n.FormatError(
 45602                          "Invalid prefix in PageLabel dictionary.",
 45603                        );
 45604                      o = (0, n.stringToPDFString)(e);
 45605                    } else o = "";
 45606                    if (s.has("St")) {
 45607                      const e = s.get("St");
 45608                      if (!(Number.isInteger(e) && e >= 1))
 45609                        throw new n.FormatError(
 45610                          "Invalid start in PageLabel dictionary.",
 45611                        );
 45612                      h = e;
 45613                    } else h = 1;
 45614                  }
 45615                  switch (a) {
 45616                    case "D":
 45617                      l = h;
 45618                      break;
 45619                    case "R":
 45620                    case "r":
 45621                      l = (0, r.toRomanNumerals)(h, "r" === a);
 45622                      break;
 45623                    case "A":
 45624                    case "a":
 45625                      const e = 26,
 45626                        t = "a" === a ? 97 : 65,
 45627                        i = h - 1;
 45628                      l = String.fromCharCode(t + (i % e)).repeat(
 45629                        Math.floor(i / e) + 1,
 45630                      );
 45631                      break;
 45632                    default:
 45633                      if (a)
 45634                        throw new n.FormatError(
 45635                          `Invalid style "${a}" in PageLabel dictionary.`,
 45636                        );
 45637                      l = "";
 45638                  }
 45639                  t[e] = o + l;
 45640                  h++;
 45641                }
 45642                return t;
 45643              }
 45644              get pageLayout() {
 45645                const e = this._catDict.get("PageLayout");
 45646                let t = "";
 45647                if (e instanceof i.Name)
 45648                  switch (e.name) {
 45649                    case "SinglePage":
 45650                    case "OneColumn":
 45651                    case "TwoColumnLeft":
 45652                    case "TwoColumnRight":
 45653                    case "TwoPageLeft":
 45654                    case "TwoPageRight":
 45655                      t = e.name;
 45656                  }
 45657                return (0, n.shadow)(this, "pageLayout", t);
 45658              }
 45659              get pageMode() {
 45660                const e = this._catDict.get("PageMode");
 45661                let t = "UseNone";
 45662                if (e instanceof i.Name)
 45663                  switch (e.name) {
 45664                    case "UseNone":
 45665                    case "UseOutlines":
 45666                    case "UseThumbs":
 45667                    case "FullScreen":
 45668                    case "UseOC":
 45669                    case "UseAttachments":
 45670                      t = e.name;
 45671                  }
 45672                return (0, n.shadow)(this, "pageMode", t);
 45673              }
 45674              get viewerPreferences() {
 45675                const e = this._catDict.get("ViewerPreferences");
 45676                if (!(e instanceof i.Dict))
 45677                  return (0, n.shadow)(this, "viewerPreferences", null);
 45678                let t = null;
 45679                for (const a of e.getKeys()) {
 45680                  const r = e.get(a);
 45681                  let s;
 45682                  switch (a) {
 45683                    case "HideToolbar":
 45684                    case "HideMenubar":
 45685                    case "HideWindowUI":
 45686                    case "FitWindow":
 45687                    case "CenterWindow":
 45688                    case "DisplayDocTitle":
 45689                    case "PickTrayByPDFSize":
 45690                      "boolean" == typeof r && (s = r);
 45691                      break;
 45692                    case "NonFullScreenPageMode":
 45693                      if (r instanceof i.Name)
 45694                        switch (r.name) {
 45695                          case "UseNone":
 45696                          case "UseOutlines":
 45697                          case "UseThumbs":
 45698                          case "UseOC":
 45699                            s = r.name;
 45700                            break;
 45701                          default:
 45702                            s = "UseNone";
 45703                        }
 45704                      break;
 45705                    case "Direction":
 45706                      if (r instanceof i.Name)
 45707                        switch (r.name) {
 45708                          case "L2R":
 45709                          case "R2L":
 45710                            s = r.name;
 45711                            break;
 45712                          default:
 45713                            s = "L2R";
 45714                        }
 45715                      break;
 45716                    case "ViewArea":
 45717                    case "ViewClip":
 45718                    case "PrintArea":
 45719                    case "PrintClip":
 45720                      if (r instanceof i.Name)
 45721                        switch (r.name) {
 45722                          case "MediaBox":
 45723                          case "CropBox":
 45724                          case "BleedBox":
 45725                          case "TrimBox":
 45726                          case "ArtBox":
 45727                            s = r.name;
 45728                            break;
 45729                          default:
 45730                            s = "CropBox";
 45731                        }
 45732                      break;
 45733                    case "PrintScaling":
 45734                      if (r instanceof i.Name)
 45735                        switch (r.name) {
 45736                          case "None":
 45737                          case "AppDefault":
 45738                            s = r.name;
 45739                            break;
 45740                          default:
 45741                            s = "AppDefault";
 45742                        }
 45743                      break;
 45744                    case "Duplex":
 45745                      if (r instanceof i.Name)
 45746                        switch (r.name) {
 45747                          case "Simplex":
 45748                          case "DuplexFlipShortEdge":
 45749                          case "DuplexFlipLongEdge":
 45750                            s = r.name;
 45751                            break;
 45752                          default:
 45753                            s = "None";
 45754                        }
 45755                      break;
 45756                    case "PrintPageRange":
 45757                      if (Array.isArray(r) && r.length % 2 == 0) {
 45758                        r.every(
 45759                          (e, t, a) =>
 45760                            Number.isInteger(e) &&
 45761                            e > 0 &&
 45762                            (0 === t || e >= a[t - 1]) &&
 45763                            e <= this.numPages,
 45764                        ) && (s = r);
 45765                      }
 45766                      break;
 45767                    case "NumCopies":
 45768                      Number.isInteger(r) && r > 0 && (s = r);
 45769                      break;
 45770                    default:
 45771                      (0, n.warn)(
 45772                        `Ignoring non-standard key in ViewerPreferences: ${a}.`,
 45773                      );
 45774                      continue;
 45775                  }
 45776                  if (void 0 !== s) {
 45777                    t || (t = Object.create(null));
 45778                    t[a] = s;
 45779                  } else
 45780                    (0, n.warn)(
 45781                      `Bad value, for key "${a}", in ViewerPreferences: ${r}.`,
 45782                    );
 45783                }
 45784                return (0, n.shadow)(this, "viewerPreferences", t);
 45785              }
 45786              get openAction() {
 45787                const e = this._catDict.get("OpenAction"),
 45788                  t = Object.create(null);
 45789                if (e instanceof i.Dict) {
 45790                  const a = new i.Dict(this.xref);
 45791                  a.set("A", e);
 45792                  const r = { url: null, dest: null, action: null };
 45793                  Catalog.parseDestDictionary({ destDict: a, resultObj: r });
 45794                  Array.isArray(r.dest)
 45795                    ? (t.dest = r.dest)
 45796                    : r.action && (t.action = r.action);
 45797                } else Array.isArray(e) && (t.dest = e);
 45798                return (0, n.shadow)(
 45799                  this,
 45800                  "openAction",
 45801                  (0, n.objectSize)(t) > 0 ? t : null,
 45802                );
 45803              }
 45804              get attachments() {
 45805                const e = this._catDict.get("Names");
 45806                let t = null;
 45807                if (e instanceof i.Dict && e.has("EmbeddedFiles")) {
 45808                  const a = new s.NameTree(e.getRaw("EmbeddedFiles"), this.xref);
 45809                  for (const [e, r] of a.getAll()) {
 45810                    const a = new h.FileSpec(r, this.xref);
 45811                    t || (t = Object.create(null));
 45812                    t[(0, n.stringToPDFString)(e)] = a.serializable;
 45813                  }
 45814                }
 45815                return (0, n.shadow)(this, "attachments", t);
 45816              }
 45817              get xfaImages() {
 45818                const e = this._catDict.get("Names");
 45819                let t = null;
 45820                if (e instanceof i.Dict && e.has("XFAImages")) {
 45821                  const a = new s.NameTree(e.getRaw("XFAImages"), this.xref);
 45822                  for (const [e, r] of a.getAll()) {
 45823                    t || (t = new i.Dict(this.xref));
 45824                    t.set((0, n.stringToPDFString)(e), r);
 45825                  }
 45826                }
 45827                return (0, n.shadow)(this, "xfaImages", t);
 45828              }
 45829              _collectJavaScript() {
 45830                const e = this._catDict.get("Names");
 45831                let t = null;
 45832                function appendIfJavaScriptDict(e, a) {
 45833                  if (!(a instanceof i.Dict)) return;
 45834                  if (!(0, i.isName)(a.get("S"), "JavaScript")) return;
 45835                  let r = a.get("JS");
 45836                  if (r instanceof o.BaseStream) r = r.getString();
 45837                  else if ("string" != typeof r) return;
 45838                  r = (0, n.stringToPDFString)(r).replaceAll("\0", "");
 45839                  r && (t ||= new Map()).set(e, r);
 45840                }
 45841                if (e instanceof i.Dict && e.has("JavaScript")) {
 45842                  const t = new s.NameTree(e.getRaw("JavaScript"), this.xref);
 45843                  for (const [e, a] of t.getAll())
 45844                    appendIfJavaScriptDict((0, n.stringToPDFString)(e), a);
 45845                }
 45846                const a = this._catDict.get("OpenAction");
 45847                a && appendIfJavaScriptDict("OpenAction", a);
 45848                return t;
 45849              }
 45850              get jsActions() {
 45851                const e = this._collectJavaScript();
 45852                let t = (0, r.collectActions)(
 45853                  this.xref,
 45854                  this._catDict,
 45855                  n.DocumentActionEventType,
 45856                );
 45857                if (e) {
 45858                  t ||= Object.create(null);
 45859                  for (const [a, r] of e) a in t ? t[a].push(r) : (t[a] = [r]);
 45860                }
 45861                return (0, n.shadow)(this, "jsActions", t);
 45862              }
 45863              async fontFallback(e, t) {
 45864                const a = await Promise.all(this.fontCache);
 45865                for (const r of a)
 45866                  if (r.loadedName === e) {
 45867                    r.fallback(t);
 45868                    return;
 45869                  }
 45870              }
 45871              async cleanup(e = !1) {
 45872                (0, c.clearGlobalCaches)();
 45873                this.globalImageCache.clear(e);
 45874                this.pageKidsCountCache.clear();
 45875                this.pageIndexCache.clear();
 45876                this.nonBlendModesSet.clear();
 45877                const t = await Promise.all(this.fontCache);
 45878                for (const { dict: e } of t) delete e.cacheKey;
 45879                this.fontCache.clear();
 45880                this.builtInCMapCache.clear();
 45881                this.standardFontDataCache.clear();
 45882                this.systemFontCache.clear();
 45883              }
 45884              async getPageDict(e) {
 45885                const t = [this.toplevelPagesDict],
 45886                  a = new i.RefSet(),
 45887                  r = this._catDict.getRaw("Pages");
 45888                r instanceof i.Ref && a.put(r);
 45889                const s = this.xref,
 45890                  o = this.pageKidsCountCache,
 45891                  c = this.pageIndexCache;
 45892                let l = 0;
 45893                for (; t.length; ) {
 45894                  const r = t.pop();
 45895                  if (r instanceof i.Ref) {
 45896                    const h = o.get(r);
 45897                    if (h >= 0 && l + h <= e) {
 45898                      l += h;
 45899                      continue;
 45900                    }
 45901                    if (a.has(r))
 45902                      throw new n.FormatError(
 45903                        "Pages tree contains circular reference.",
 45904                      );
 45905                    a.put(r);
 45906                    const u = await s.fetchAsync(r);
 45907                    if (u instanceof i.Dict) {
 45908                      let t = u.getRaw("Type");
 45909                      t instanceof i.Ref && (t = await s.fetchAsync(t));
 45910                      if ((0, i.isName)(t, "Page") || !u.has("Kids")) {
 45911                        o.has(r) || o.put(r, 1);
 45912                        c.has(r) || c.put(r, l);
 45913                        if (l === e) return [u, r];
 45914                        l++;
 45915                        continue;
 45916                      }
 45917                    }
 45918                    t.push(u);
 45919                    continue;
 45920                  }
 45921                  if (!(r instanceof i.Dict))
 45922                    throw new n.FormatError(
 45923                      "Page dictionary kid reference points to wrong type of object.",
 45924                    );
 45925                  const { objId: h } = r;
 45926                  let u = r.getRaw("Count");
 45927                  u instanceof i.Ref && (u = await s.fetchAsync(u));
 45928                  if (Number.isInteger(u) && u >= 0) {
 45929                    h && !o.has(h) && o.put(h, u);
 45930                    if (l + u <= e) {
 45931                      l += u;
 45932                      continue;
 45933                    }
 45934                  }
 45935                  let d = r.getRaw("Kids");
 45936                  d instanceof i.Ref && (d = await s.fetchAsync(d));
 45937                  if (!Array.isArray(d)) {
 45938                    let t = r.getRaw("Type");
 45939                    t instanceof i.Ref && (t = await s.fetchAsync(t));
 45940                    if ((0, i.isName)(t, "Page") || !r.has("Kids")) {
 45941                      if (l === e) return [r, null];
 45942                      l++;
 45943                      continue;
 45944                    }
 45945                    throw new n.FormatError(
 45946                      "Page dictionary kids object is not an array.",
 45947                    );
 45948                  }
 45949                  for (let e = d.length - 1; e >= 0; e--) t.push(d[e]);
 45950                }
 45951                throw new Error(`Page index ${e} not found.`);
 45952              }
 45953              async getAllPageDicts(e = !1) {
 45954                const { ignoreErrors: t } = this.pdfManager.evaluatorOptions,
 45955                  a = [{ currentNode: this.toplevelPagesDict, posInKids: 0 }],
 45956                  s = new i.RefSet(),
 45957                  o = this._catDict.getRaw("Pages");
 45958                o instanceof i.Ref && s.put(o);
 45959                const c = new Map(),
 45960                  l = this.xref,
 45961                  h = this.pageIndexCache;
 45962                let u = 0;
 45963                function addPageDict(e, t) {
 45964                  t && !h.has(t) && h.put(t, u);
 45965                  c.set(u++, [e, t]);
 45966                }
 45967                function addPageError(a) {
 45968                  if (a instanceof r.XRefEntryException && !e) throw a;
 45969                  if (e && t && 0 === u) {
 45970                    (0, n.warn)(
 45971                      `getAllPageDicts - Skipping invalid first page: "${a}".`,
 45972                    );
 45973                    a = i.Dict.empty;
 45974                  }
 45975                  c.set(u++, [a, null]);
 45976                }
 45977                for (; a.length > 0; ) {
 45978                  const e = a.at(-1),
 45979                    { currentNode: t, posInKids: r } = e;
 45980                  let o = t.getRaw("Kids");
 45981                  if (o instanceof i.Ref)
 45982                    try {
 45983                      o = await l.fetchAsync(o);
 45984                    } catch (e) {
 45985                      addPageError(e);
 45986                      break;
 45987                    }
 45988                  if (!Array.isArray(o)) {
 45989                    addPageError(
 45990                      new n.FormatError(
 45991                        "Page dictionary kids object is not an array.",
 45992                      ),
 45993                    );
 45994                    break;
 45995                  }
 45996                  if (r >= o.length) {
 45997                    a.pop();
 45998                    continue;
 45999                  }
 46000                  const c = o[r];
 46001                  let h;
 46002                  if (c instanceof i.Ref) {
 46003                    if (s.has(c)) {
 46004                      addPageError(
 46005                        new n.FormatError(
 46006                          "Pages tree contains circular reference.",
 46007                        ),
 46008                      );
 46009                      break;
 46010                    }
 46011                    s.put(c);
 46012                    try {
 46013                      h = await l.fetchAsync(c);
 46014                    } catch (e) {
 46015                      addPageError(e);
 46016                      break;
 46017                    }
 46018                  } else h = c;
 46019                  if (!(h instanceof i.Dict)) {
 46020                    addPageError(
 46021                      new n.FormatError(
 46022                        "Page dictionary kid reference points to wrong type of object.",
 46023                      ),
 46024                    );
 46025                    break;
 46026                  }
 46027                  let u = h.getRaw("Type");
 46028                  if (u instanceof i.Ref)
 46029                    try {
 46030                      u = await l.fetchAsync(u);
 46031                    } catch (e) {
 46032                      addPageError(e);
 46033                      break;
 46034                    }
 46035                  (0, i.isName)(u, "Page") || !h.has("Kids")
 46036                    ? addPageDict(h, c instanceof i.Ref ? c : null)
 46037                    : a.push({ currentNode: h, posInKids: 0 });
 46038                  e.posInKids++;
 46039                }
 46040                return c;
 46041              }
 46042              getPageIndex(e) {
 46043                const t = this.pageIndexCache.get(e);
 46044                if (void 0 !== t) return Promise.resolve(t);
 46045                const a = this.xref;
 46046                let r = 0;
 46047                const next = (t) =>
 46048                  (function pagesBeforeRef(t) {
 46049                    let r,
 46050                      s = 0;
 46051                    return a
 46052                      .fetchAsync(t)
 46053                      .then(function (a) {
 46054                        if (
 46055                          (0, i.isRefsEqual)(t, e) &&
 46056                          !(0, i.isDict)(a, "Page") &&
 46057                          !(
 46058                            a instanceof i.Dict &&
 46059                            !a.has("Type") &&
 46060                            a.has("Contents")
 46061                          )
 46062                        )
 46063                          throw new n.FormatError(
 46064                            "The reference does not point to a /Page dictionary.",
 46065                          );
 46066                        if (!a) return null;
 46067                        if (!(a instanceof i.Dict))
 46068                          throw new n.FormatError("Node must be a dictionary.");
 46069                        r = a.getRaw("Parent");
 46070                        return a.getAsync("Parent");
 46071                      })
 46072                      .then(function (e) {
 46073                        if (!e) return null;
 46074                        if (!(e instanceof i.Dict))
 46075                          throw new n.FormatError("Parent must be a dictionary.");
 46076                        return e.getAsync("Kids");
 46077                      })
 46078                      .then(function (e) {
 46079                        if (!e) return null;
 46080                        const o = [];
 46081                        let c = !1;
 46082                        for (const r of e) {
 46083                          if (!(r instanceof i.Ref))
 46084                            throw new n.FormatError("Kid must be a reference.");
 46085                          if ((0, i.isRefsEqual)(r, t)) {
 46086                            c = !0;
 46087                            break;
 46088                          }
 46089                          o.push(
 46090                            a.fetchAsync(r).then(function (e) {
 46091                              if (!(e instanceof i.Dict))
 46092                                throw new n.FormatError(
 46093                                  "Kid node must be a dictionary.",
 46094                                );
 46095                              e.has("Count") ? (s += e.get("Count")) : s++;
 46096                            }),
 46097                          );
 46098                        }
 46099                        if (!c)
 46100                          throw new n.FormatError(
 46101                            "Kid reference not found in parent's kids.",
 46102                          );
 46103                        return Promise.all(o).then(function () {
 46104                          return [s, r];
 46105                        });
 46106                      });
 46107                  })(t).then((t) => {
 46108                    if (!t) {
 46109                      this.pageIndexCache.put(e, r);
 46110                      return r;
 46111                    }
 46112                    const [a, n] = t;
 46113                    r += a;
 46114                    return next(n);
 46115                  });
 46116                return next(e);
 46117              }
 46118              get baseUrl() {
 46119                const e = this._catDict.get("URI");
 46120                if (e instanceof i.Dict) {
 46121                  const t = e.get("Base");
 46122                  if ("string" == typeof t) {
 46123                    const e = (0, n.createValidAbsoluteUrl)(t, null, {
 46124                      tryConvertEncoding: !0,
 46125                    });
 46126                    if (e) return (0, n.shadow)(this, "baseUrl", e.href);
 46127                  }
 46128                }
 46129                return (0, n.shadow)(this, "baseUrl", this.pdfManager.docBaseUrl);
 46130              }
 46131              static parseDestDictionary({
 46132                destDict: e,
 46133                resultObj: t,
 46134                docBaseUrl: a = null,
 46135                docAttachments: s = null,
 46136              }) {
 46137                if (!(e instanceof i.Dict)) {
 46138                  (0, n.warn)(
 46139                    "parseDestDictionary: `destDict` must be a dictionary.",
 46140                  );
 46141                  return;
 46142                }
 46143                let c,
 46144                  l,
 46145                  h = e.get("A");
 46146                if (!(h instanceof i.Dict))
 46147                  if (e.has("Dest")) h = e.get("Dest");
 46148                  else {
 46149                    h = e.get("AA");
 46150                    h instanceof i.Dict &&
 46151                      (h.has("D")
 46152                        ? (h = h.get("D"))
 46153                        : h.has("U") && (h = h.get("U")));
 46154                  }
 46155                if (h instanceof i.Dict) {
 46156                  const e = h.get("S");
 46157                  if (!(e instanceof i.Name)) {
 46158                    (0, n.warn)(
 46159                      "parseDestDictionary: Invalid type in Action dictionary.",
 46160                    );
 46161                    return;
 46162                  }
 46163                  const a = e.name;
 46164                  switch (a) {
 46165                    case "ResetForm":
 46166                      const e = h.get("Flags"),
 46167                        u = 0 == (1 & ("number" == typeof e ? e : 0)),
 46168                        d = [],
 46169                        f = [];
 46170                      for (const e of h.get("Fields") || [])
 46171                        e instanceof i.Ref
 46172                          ? f.push(e.toString())
 46173                          : "string" == typeof e &&
 46174                            d.push((0, n.stringToPDFString)(e));
 46175                      t.resetForm = { fields: d, refs: f, include: u };
 46176                      break;
 46177                    case "URI":
 46178                      c = h.get("URI");
 46179                      c instanceof i.Name && (c = "/" + c.name);
 46180                      break;
 46181                    case "GoTo":
 46182                      l = h.get("D");
 46183                      break;
 46184                    case "Launch":
 46185                    case "GoToR":
 46186                      const g = h.get("F");
 46187                      g instanceof i.Dict
 46188                        ? (c = g.get("F") || null)
 46189                        : "string" == typeof g && (c = g);
 46190                      let p = h.get("D");
 46191                      if (p) {
 46192                        p instanceof i.Name && (p = p.name);
 46193                        if ("string" == typeof c) {
 46194                          const e = c.split("#")[0];
 46195                          "string" == typeof p
 46196                            ? (c = e + "#" + p)
 46197                            : Array.isArray(p) &&
 46198                              (c = e + "#" + JSON.stringify(p));
 46199                        }
 46200                      }
 46201                      const m = h.get("NewWindow");
 46202                      "boolean" == typeof m && (t.newWindow = m);
 46203                      break;
 46204                    case "GoToE":
 46205                      const b = h.get("T");
 46206                      let y;
 46207                      if (s && b instanceof i.Dict) {
 46208                        const e = b.get("R"),
 46209                          t = b.get("N");
 46210                        (0, i.isName)(e, "C") &&
 46211                          "string" == typeof t &&
 46212                          (y = s[(0, n.stringToPDFString)(t)]);
 46213                      }
 46214                      y
 46215                        ? (t.attachment = y)
 46216                        : (0, n.warn)(
 46217                            'parseDestDictionary - unimplemented "GoToE" action.',
 46218                          );
 46219                      break;
 46220                    case "Named":
 46221                      const w = h.get("N");
 46222                      w instanceof i.Name && (t.action = w.name);
 46223                      break;
 46224                    case "SetOCGState":
 46225                      const S = h.get("State"),
 46226                        x = h.get("PreserveRB");
 46227                      if (!Array.isArray(S) || 0 === S.length) break;
 46228                      const C = [];
 46229                      for (const e of S)
 46230                        if (e instanceof i.Name)
 46231                          switch (e.name) {
 46232                            case "ON":
 46233                            case "OFF":
 46234                            case "Toggle":
 46235                              C.push(e.name);
 46236                          }
 46237                        else e instanceof i.Ref && C.push(e.toString());
 46238                      if (C.length !== S.length) break;
 46239                      t.setOCGState = {
 46240                        state: C,
 46241                        preserveRB: "boolean" != typeof x || x,
 46242                      };
 46243                      break;
 46244                    case "JavaScript":
 46245                      const k = h.get("JS");
 46246                      let v;
 46247                      k instanceof o.BaseStream
 46248                        ? (v = k.getString())
 46249                        : "string" == typeof k && (v = k);
 46250                      const F =
 46251                        v && (0, r.recoverJsURL)((0, n.stringToPDFString)(v));
 46252                      if (F) {
 46253                        c = F.url;
 46254                        t.newWindow = F.newWindow;
 46255                        break;
 46256                      }
 46257                    default:
 46258                      if ("JavaScript" === a || "SubmitForm" === a) break;
 46259                      (0, n.warn)(
 46260                        `parseDestDictionary - unsupported action: "${a}".`,
 46261                      );
 46262                  }
 46263                } else e.has("Dest") && (l = e.get("Dest"));
 46264                if ("string" == typeof c) {
 46265                  const e = (0, n.createValidAbsoluteUrl)(c, a, {
 46266                    addDefaultProtocol: !0,
 46267                    tryConvertEncoding: !0,
 46268                  });
 46269                  e && (t.url = e.href);
 46270                  t.unsafeUrl = c;
 46271                }
 46272                if (l) {
 46273                  l instanceof i.Name && (l = l.name);
 46274                  "string" == typeof l
 46275                    ? (t.dest = (0, n.stringToPDFString)(l))
 46276                    : Array.isArray(l) && (t.dest = l);
 46277                }
 46278              }
 46279            }
 46280            t.Catalog = Catalog;
 46281          },
 46282          (e, t, a) => {
 46283            Object.defineProperty(t, "__esModule", { value: !0 });
 46284            t.NumberTree = t.NameTree = void 0;
 46285            var r = a(4),
 46286              n = a(2);
 46287            class NameOrNumberTree {
 46288              constructor(e, t, a) {
 46289                this.constructor === NameOrNumberTree &&
 46290                  (0, n.unreachable)("Cannot initialize NameOrNumberTree.");
 46291                this.root = e;
 46292                this.xref = t;
 46293                this._type = a;
 46294              }
 46295              getAll() {
 46296                const e = new Map();
 46297                if (!this.root) return e;
 46298                const t = this.xref,
 46299                  a = new r.RefSet();
 46300                a.put(this.root);
 46301                const i = [this.root];
 46302                for (; i.length > 0; ) {
 46303                  const s = t.fetchIfRef(i.shift());
 46304                  if (!(s instanceof r.Dict)) continue;
 46305                  if (s.has("Kids")) {
 46306                    const e = s.get("Kids");
 46307                    if (!Array.isArray(e)) continue;
 46308                    for (const t of e) {
 46309                      if (a.has(t))
 46310                        throw new n.FormatError(
 46311                          `Duplicate entry in "${this._type}" tree.`,
 46312                        );
 46313                      i.push(t);
 46314                      a.put(t);
 46315                    }
 46316                    continue;
 46317                  }
 46318                  const o = s.get(this._type);
 46319                  if (Array.isArray(o))
 46320                    for (let a = 0, r = o.length; a < r; a += 2)
 46321                      e.set(t.fetchIfRef(o[a]), t.fetchIfRef(o[a + 1]));
 46322                }
 46323                return e;
 46324              }
 46325              get(e) {
 46326                if (!this.root) return null;
 46327                const t = this.xref;
 46328                let a = t.fetchIfRef(this.root),
 46329                  r = 0;
 46330                for (; a.has("Kids"); ) {
 46331                  if (++r > 10) {
 46332                    (0, n.warn)(
 46333                      `Search depth limit reached for "${this._type}" tree.`,
 46334                    );
 46335                    return null;
 46336                  }
 46337                  const i = a.get("Kids");
 46338                  if (!Array.isArray(i)) return null;
 46339                  let s = 0,
 46340                    o = i.length - 1;
 46341                  for (; s <= o; ) {
 46342                    const r = (s + o) >> 1,
 46343                      n = t.fetchIfRef(i[r]),
 46344                      c = n.get("Limits");
 46345                    if (e < t.fetchIfRef(c[0])) o = r - 1;
 46346                    else {
 46347                      if (!(e > t.fetchIfRef(c[1]))) {
 46348                        a = n;
 46349                        break;
 46350                      }
 46351                      s = r + 1;
 46352                    }
 46353                  }
 46354                  if (s > o) return null;
 46355                }
 46356                const i = a.get(this._type);
 46357                if (Array.isArray(i)) {
 46358                  let a = 0,
 46359                    r = i.length - 2;
 46360                  for (; a <= r; ) {
 46361                    const n = (a + r) >> 1,
 46362                      s = n + (1 & n),
 46363                      o = t.fetchIfRef(i[s]);
 46364                    if (e < o) r = s - 2;
 46365                    else {
 46366                      if (!(e > o)) return t.fetchIfRef(i[s + 1]);
 46367                      a = s + 2;
 46368                    }
 46369                  }
 46370                }
 46371                return null;
 46372              }
 46373            }
 46374            t.NameTree = class NameTree extends NameOrNumberTree {
 46375              constructor(e, t) {
 46376                super(e, t, "Names");
 46377              }
 46378            };
 46379            t.NumberTree = class NumberTree extends NameOrNumberTree {
 46380              constructor(e, t) {
 46381                super(e, t, "Nums");
 46382              }
 46383            };
 46384          },
 46385          (e, t, a) => {
 46386            Object.defineProperty(t, "__esModule", { value: !0 });
 46387            t.clearGlobalCaches = function clearGlobalCaches() {
 46388              (0, r.clearPatternCaches)();
 46389              (0, n.clearPrimitiveCaches)();
 46390              (0, i.clearUnicodeCaches)();
 46391            };
 46392            var r = a(50),
 46393              n = a(4),
 46394              i = a(40);
 46395          },
 46396          (e, t, a) => {
 46397            Object.defineProperty(t, "__esModule", { value: !0 });
 46398            t.FileSpec = void 0;
 46399            var r = a(2),
 46400              n = a(5),
 46401              i = a(4);
 46402            function pickPlatformItem(e) {
 46403              return e.has("UF")
 46404                ? e.get("UF")
 46405                : e.has("F")
 46406                  ? e.get("F")
 46407                  : e.has("Unix")
 46408                    ? e.get("Unix")
 46409                    : e.has("Mac")
 46410                      ? e.get("Mac")
 46411                      : e.has("DOS")
 46412                        ? e.get("DOS")
 46413                        : null;
 46414            }
 46415            t.FileSpec = class FileSpec {
 46416              constructor(e, t) {
 46417                if (e instanceof i.Dict) {
 46418                  this.xref = t;
 46419                  this.root = e;
 46420                  e.has("FS") && (this.fs = e.get("FS"));
 46421                  this.description = e.has("Desc")
 46422                    ? (0, r.stringToPDFString)(e.get("Desc"))
 46423                    : "";
 46424                  e.has("RF") &&
 46425                    (0, r.warn)("Related file specifications are not supported");
 46426                  this.contentAvailable = !0;
 46427                  if (!e.has("EF")) {
 46428                    this.contentAvailable = !1;
 46429                    (0, r.warn)(
 46430                      "Non-embedded file specifications are not supported",
 46431                    );
 46432                  }
 46433                }
 46434              }
 46435              get filename() {
 46436                if (!this._filename && this.root) {
 46437                  const e = pickPlatformItem(this.root) || "unnamed";
 46438                  this._filename = (0, r.stringToPDFString)(e)
 46439                    .replaceAll("\\\\", "\\")
 46440                    .replaceAll("\\/", "/")
 46441                    .replaceAll("\\", "/");
 46442                }
 46443                return this._filename;
 46444              }
 46445              get content() {
 46446                if (!this.contentAvailable) return null;
 46447                !this.contentRef &&
 46448                  this.root &&
 46449                  (this.contentRef = pickPlatformItem(this.root.get("EF")));
 46450                let e = null;
 46451                if (this.contentRef) {
 46452                  const t = this.xref.fetchIfRef(this.contentRef);
 46453                  t instanceof n.BaseStream
 46454                    ? (e = t.getBytes())
 46455                    : (0, r.warn)(
 46456                        "Embedded file specification points to non-existing/invalid content",
 46457                      );
 46458                } else
 46459                  (0, r.warn)(
 46460                    "Embedded file specification does not have a content",
 46461                  );
 46462                return e;
 46463              }
 46464              get serializable() {
 46465                return { filename: this.filename, content: this.content };
 46466              }
 46467            };
 46468          },
 46469          (e, t, a) => {
 46470            Object.defineProperty(t, "__esModule", { value: !0 });
 46471            t.MetadataParser = void 0;
 46472            var r = a(71);
 46473            t.MetadataParser = class MetadataParser {
 46474              constructor(e) {
 46475                e = this._repair(e);
 46476                const t = new r.SimpleXMLParser({
 46477                  lowerCaseName: !0,
 46478                }).parseFromString(e);
 46479                this._metadataMap = new Map();
 46480                this._data = e;
 46481                t && this._parse(t);
 46482              }
 46483              _repair(e) {
 46484                return e
 46485                  .replace(/^[^<]+/, "")
 46486                  .replaceAll(/>\\376\\377([^<]+)/g, function (e, t) {
 46487                    const a = t
 46488                        .replaceAll(
 46489                          /\\([0-3])([0-7])([0-7])/g,
 46490                          function (e, t, a, r) {
 46491                            return String.fromCharCode(64 * t + 8 * a + 1 * r);
 46492                          },
 46493                        )
 46494                        .replaceAll(/&(amp|apos|gt|lt|quot);/g, function (e, t) {
 46495                          switch (t) {
 46496                            case "amp":
 46497                              return "&";
 46498                            case "apos":
 46499                              return "'";
 46500                            case "gt":
 46501                              return ">";
 46502                            case "lt":
 46503                              return "<";
 46504                            case "quot":
 46505                              return '"';
 46506                          }
 46507                          throw new Error(`_repair: ${t} isn't defined.`);
 46508                        }),
 46509                      r = [">"];
 46510                    for (let e = 0, t = a.length; e < t; e += 2) {
 46511                      const t = 256 * a.charCodeAt(e) + a.charCodeAt(e + 1);
 46512                      t >= 32 && t < 127 && 60 !== t && 62 !== t && 38 !== t
 46513                        ? r.push(String.fromCharCode(t))
 46514                        : r.push(
 46515                            "&#x" + (65536 + t).toString(16).substring(1) + ";",
 46516                          );
 46517                    }
 46518                    return r.join("");
 46519                  });
 46520              }
 46521              _getSequence(e) {
 46522                const t = e.nodeName;
 46523                return "rdf:bag" !== t && "rdf:seq" !== t && "rdf:alt" !== t
 46524                  ? null
 46525                  : e.childNodes.filter((e) => "rdf:li" === e.nodeName);
 46526              }
 46527              _parseArray(e) {
 46528                if (!e.hasChildNodes()) return;
 46529                const [t] = e.childNodes,
 46530                  a = this._getSequence(t) || [];
 46531                this._metadataMap.set(
 46532                  e.nodeName,
 46533                  a.map((e) => e.textContent.trim()),
 46534                );
 46535              }
 46536              _parse(e) {
 46537                let t = e.documentElement;
 46538                if ("rdf:rdf" !== t.nodeName) {
 46539                  t = t.firstChild;
 46540                  for (; t && "rdf:rdf" !== t.nodeName; ) t = t.nextSibling;
 46541                }
 46542                if (t && "rdf:rdf" === t.nodeName && t.hasChildNodes())
 46543                  for (const e of t.childNodes)
 46544                    if ("rdf:description" === e.nodeName)
 46545                      for (const t of e.childNodes) {
 46546                        const e = t.nodeName;
 46547                        switch (e) {
 46548                          case "#text":
 46549                            continue;
 46550                          case "dc:creator":
 46551                          case "dc:subject":
 46552                            this._parseArray(t);
 46553                            continue;
 46554                        }
 46555                        this._metadataMap.set(e, t.textContent.trim());
 46556                      }
 46557              }
 46558              get serializable() {
 46559                return { parsedData: this._metadataMap, rawData: this._data };
 46560              }
 46561            };
 46562          },
 46563          (e, t, a) => {
 46564            Object.defineProperty(t, "__esModule", { value: !0 });
 46565            t.XMLParserErrorCode =
 46566              t.XMLParserBase =
 46567              t.SimpleXMLParser =
 46568              t.SimpleDOMNode =
 46569                void 0;
 46570            var r = a(3);
 46571            const n = {
 46572              NoError: 0,
 46573              EndOfDocument: -1,
 46574              UnterminatedCdat: -2,
 46575              UnterminatedXmlDeclaration: -3,
 46576              UnterminatedDoctypeDeclaration: -4,
 46577              UnterminatedComment: -5,
 46578              MalformedElement: -6,
 46579              OutOfMemory: -7,
 46580              UnterminatedAttributeValue: -8,
 46581              UnterminatedElement: -9,
 46582              ElementNeverBegun: -10,
 46583            };
 46584            t.XMLParserErrorCode = n;
 46585            function isWhitespace(e, t) {
 46586              const a = e[t];
 46587              return " " === a || "\n" === a || "\r" === a || "\t" === a;
 46588            }
 46589            class XMLParserBase {
 46590              _resolveEntities(e) {
 46591                return e.replaceAll(/&([^;]+);/g, (e, t) => {
 46592                  if ("#x" === t.substring(0, 2))
 46593                    return String.fromCodePoint(parseInt(t.substring(2), 16));
 46594                  if ("#" === t.substring(0, 1))
 46595                    return String.fromCodePoint(parseInt(t.substring(1), 10));
 46596                  switch (t) {
 46597                    case "lt":
 46598                      return "<";
 46599                    case "gt":
 46600                      return ">";
 46601                    case "amp":
 46602                      return "&";
 46603                    case "quot":
 46604                      return '"';
 46605                    case "apos":
 46606                      return "'";
 46607                  }
 46608                  return this.onResolveEntity(t);
 46609                });
 46610              }
 46611              _parseContent(e, t) {
 46612                const a = [];
 46613                let r = t;
 46614                function skipWs() {
 46615                  for (; r < e.length && isWhitespace(e, r); ) ++r;
 46616                }
 46617                for (
 46618                  ;
 46619                  r < e.length &&
 46620                  !isWhitespace(e, r) &&
 46621                  ">" !== e[r] &&
 46622                  "/" !== e[r];
 46623  
 46624                )
 46625                  ++r;
 46626                const n = e.substring(t, r);
 46627                skipWs();
 46628                for (
 46629                  ;
 46630                  r < e.length && ">" !== e[r] && "/" !== e[r] && "?" !== e[r];
 46631  
 46632                ) {
 46633                  skipWs();
 46634                  let t = "",
 46635                    n = "";
 46636                  for (; r < e.length && !isWhitespace(e, r) && "=" !== e[r]; ) {
 46637                    t += e[r];
 46638                    ++r;
 46639                  }
 46640                  skipWs();
 46641                  if ("=" !== e[r]) return null;
 46642                  ++r;
 46643                  skipWs();
 46644                  const i = e[r];
 46645                  if ('"' !== i && "'" !== i) return null;
 46646                  const s = e.indexOf(i, ++r);
 46647                  if (s < 0) return null;
 46648                  n = e.substring(r, s);
 46649                  a.push({ name: t, value: this._resolveEntities(n) });
 46650                  r = s + 1;
 46651                  skipWs();
 46652                }
 46653                return { name: n, attributes: a, parsed: r - t };
 46654              }
 46655              _parseProcessingInstruction(e, t) {
 46656                let a = t;
 46657                for (
 46658                  ;
 46659                  a < e.length &&
 46660                  !isWhitespace(e, a) &&
 46661                  ">" !== e[a] &&
 46662                  "?" !== e[a] &&
 46663                  "/" !== e[a];
 46664  
 46665                )
 46666                  ++a;
 46667                const r = e.substring(t, a);
 46668                !(function skipWs() {
 46669                  for (; a < e.length && isWhitespace(e, a); ) ++a;
 46670                })();
 46671                const n = a;
 46672                for (; a < e.length && ("?" !== e[a] || ">" !== e[a + 1]); ) ++a;
 46673                return { name: r, value: e.substring(n, a), parsed: a - t };
 46674              }
 46675              parseXml(e) {
 46676                let t = 0;
 46677                for (; t < e.length; ) {
 46678                  let a = t;
 46679                  if ("<" === e[t]) {
 46680                    ++a;
 46681                    let t;
 46682                    switch (e[a]) {
 46683                      case "/":
 46684                        ++a;
 46685                        t = e.indexOf(">", a);
 46686                        if (t < 0) {
 46687                          this.onError(n.UnterminatedElement);
 46688                          return;
 46689                        }
 46690                        this.onEndElement(e.substring(a, t));
 46691                        a = t + 1;
 46692                        break;
 46693                      case "?":
 46694                        ++a;
 46695                        const r = this._parseProcessingInstruction(e, a);
 46696                        if (
 46697                          "?>" !== e.substring(a + r.parsed, a + r.parsed + 2)
 46698                        ) {
 46699                          this.onError(n.UnterminatedXmlDeclaration);
 46700                          return;
 46701                        }
 46702                        this.onPi(r.name, r.value);
 46703                        a += r.parsed + 2;
 46704                        break;
 46705                      case "!":
 46706                        if ("--" === e.substring(a + 1, a + 3)) {
 46707                          t = e.indexOf("--\x3e", a + 3);
 46708                          if (t < 0) {
 46709                            this.onError(n.UnterminatedComment);
 46710                            return;
 46711                          }
 46712                          this.onComment(e.substring(a + 3, t));
 46713                          a = t + 3;
 46714                        } else if ("[CDATA[" === e.substring(a + 1, a + 8)) {
 46715                          t = e.indexOf("]]>", a + 8);
 46716                          if (t < 0) {
 46717                            this.onError(n.UnterminatedCdat);
 46718                            return;
 46719                          }
 46720                          this.onCdata(e.substring(a + 8, t));
 46721                          a = t + 3;
 46722                        } else {
 46723                          if ("DOCTYPE" !== e.substring(a + 1, a + 8)) {
 46724                            this.onError(n.MalformedElement);
 46725                            return;
 46726                          }
 46727                          {
 46728                            const r = e.indexOf("[", a + 8);
 46729                            let i = !1;
 46730                            t = e.indexOf(">", a + 8);
 46731                            if (t < 0) {
 46732                              this.onError(n.UnterminatedDoctypeDeclaration);
 46733                              return;
 46734                            }
 46735                            if (r > 0 && t > r) {
 46736                              t = e.indexOf("]>", a + 8);
 46737                              if (t < 0) {
 46738                                this.onError(n.UnterminatedDoctypeDeclaration);
 46739                                return;
 46740                              }
 46741                              i = !0;
 46742                            }
 46743                            const s = e.substring(a + 8, t + (i ? 1 : 0));
 46744                            this.onDoctype(s);
 46745                            a = t + (i ? 2 : 1);
 46746                          }
 46747                        }
 46748                        break;
 46749                      default:
 46750                        const i = this._parseContent(e, a);
 46751                        if (null === i) {
 46752                          this.onError(n.MalformedElement);
 46753                          return;
 46754                        }
 46755                        let s = !1;
 46756                        if ("/>" === e.substring(a + i.parsed, a + i.parsed + 2))
 46757                          s = !0;
 46758                        else if (
 46759                          ">" !== e.substring(a + i.parsed, a + i.parsed + 1)
 46760                        ) {
 46761                          this.onError(n.UnterminatedElement);
 46762                          return;
 46763                        }
 46764                        this.onBeginElement(i.name, i.attributes, s);
 46765                        a += i.parsed + (s ? 2 : 1);
 46766                    }
 46767                  } else {
 46768                    for (; a < e.length && "<" !== e[a]; ) a++;
 46769                    const r = e.substring(t, a);
 46770                    this.onText(this._resolveEntities(r));
 46771                  }
 46772                  t = a;
 46773                }
 46774              }
 46775              onResolveEntity(e) {
 46776                return `&${e};`;
 46777              }
 46778              onPi(e, t) {}
 46779              onComment(e) {}
 46780              onCdata(e) {}
 46781              onDoctype(e) {}
 46782              onText(e) {}
 46783              onBeginElement(e, t, a) {}
 46784              onEndElement(e) {}
 46785              onError(e) {}
 46786            }
 46787            t.XMLParserBase = XMLParserBase;
 46788            class SimpleDOMNode {
 46789              constructor(e, t) {
 46790                this.nodeName = e;
 46791                this.nodeValue = t;
 46792                Object.defineProperty(this, "parentNode", {
 46793                  value: null,
 46794                  writable: !0,
 46795                });
 46796              }
 46797              get firstChild() {
 46798                return this.childNodes?.[0];
 46799              }
 46800              get nextSibling() {
 46801                const e = this.parentNode.childNodes;
 46802                if (!e) return;
 46803                const t = e.indexOf(this);
 46804                return -1 !== t ? e[t + 1] : void 0;
 46805              }
 46806              get textContent() {
 46807                return this.childNodes
 46808                  ? this.childNodes
 46809                      .map(function (e) {
 46810                        return e.textContent;
 46811                      })
 46812                      .join("")
 46813                  : this.nodeValue || "";
 46814              }
 46815              get children() {
 46816                return this.childNodes || [];
 46817              }
 46818              hasChildNodes() {
 46819                return this.childNodes?.length > 0;
 46820              }
 46821              searchNode(e, t) {
 46822                if (t >= e.length) return this;
 46823                const a = e[t];
 46824                if (a.name.startsWith("#") && t < e.length - 1)
 46825                  return this.searchNode(e, t + 1);
 46826                const r = [];
 46827                let n = this;
 46828                for (;;) {
 46829                  if (a.name === n.nodeName) {
 46830                    if (0 !== a.pos) {
 46831                      if (0 === r.length) return null;
 46832                      {
 46833                        const [i] = r.pop();
 46834                        let s = 0;
 46835                        for (const r of i.childNodes)
 46836                          if (a.name === r.nodeName) {
 46837                            if (s === a.pos) return r.searchNode(e, t + 1);
 46838                            s++;
 46839                          }
 46840                        return n.searchNode(e, t + 1);
 46841                      }
 46842                    }
 46843                    {
 46844                      const a = n.searchNode(e, t + 1);
 46845                      if (null !== a) return a;
 46846                    }
 46847                  }
 46848                  if (n.childNodes?.length > 0) {
 46849                    r.push([n, 0]);
 46850                    n = n.childNodes[0];
 46851                  } else {
 46852                    if (0 === r.length) return null;
 46853                    for (; 0 !== r.length; ) {
 46854                      const [e, t] = r.pop(),
 46855                        a = t + 1;
 46856                      if (a < e.childNodes.length) {
 46857                        r.push([e, a]);
 46858                        n = e.childNodes[a];
 46859                        break;
 46860                      }
 46861                    }
 46862                    if (0 === r.length) return null;
 46863                  }
 46864                }
 46865              }
 46866              dump(e) {
 46867                if ("#text" !== this.nodeName) {
 46868                  e.push(`<${this.nodeName}`);
 46869                  if (this.attributes)
 46870                    for (const t of this.attributes)
 46871                      e.push(` ${t.name}="${(0, r.encodeToXmlString)(t.value)}"`);
 46872                  if (this.hasChildNodes()) {
 46873                    e.push(">");
 46874                    for (const t of this.childNodes) t.dump(e);
 46875                    e.push(`</${this.nodeName}>`);
 46876                  } else
 46877                    this.nodeValue
 46878                      ? e.push(
 46879                          `>${(0, r.encodeToXmlString)(this.nodeValue)}</${this.nodeName}>`,
 46880                        )
 46881                      : e.push("/>");
 46882                } else e.push((0, r.encodeToXmlString)(this.nodeValue));
 46883              }
 46884            }
 46885            t.SimpleDOMNode = SimpleDOMNode;
 46886            t.SimpleXMLParser = class SimpleXMLParser extends XMLParserBase {
 46887              constructor({ hasAttributes: e = !1, lowerCaseName: t = !1 }) {
 46888                super();
 46889                this._currentFragment = null;
 46890                this._stack = null;
 46891                this._errorCode = n.NoError;
 46892                this._hasAttributes = e;
 46893                this._lowerCaseName = t;
 46894              }
 46895              parseFromString(e) {
 46896                this._currentFragment = [];
 46897                this._stack = [];
 46898                this._errorCode = n.NoError;
 46899                this.parseXml(e);
 46900                if (this._errorCode !== n.NoError) return;
 46901                const [t] = this._currentFragment;
 46902                return t ? { documentElement: t } : void 0;
 46903              }
 46904              onText(e) {
 46905                if (
 46906                  (function isWhitespaceString(e) {
 46907                    for (let t = 0, a = e.length; t < a; t++)
 46908                      if (!isWhitespace(e, t)) return !1;
 46909                    return !0;
 46910                  })(e)
 46911                )
 46912                  return;
 46913                const t = new SimpleDOMNode("#text", e);
 46914                this._currentFragment.push(t);
 46915              }
 46916              onCdata(e) {
 46917                const t = new SimpleDOMNode("#text", e);
 46918                this._currentFragment.push(t);
 46919              }
 46920              onBeginElement(e, t, a) {
 46921                this._lowerCaseName && (e = e.toLowerCase());
 46922                const r = new SimpleDOMNode(e);
 46923                r.childNodes = [];
 46924                this._hasAttributes && (r.attributes = t);
 46925                this._currentFragment.push(r);
 46926                if (!a) {
 46927                  this._stack.push(this._currentFragment);
 46928                  this._currentFragment = r.childNodes;
 46929                }
 46930              }
 46931              onEndElement(e) {
 46932                this._currentFragment = this._stack.pop() || [];
 46933                const t = this._currentFragment.at(-1);
 46934                if (!t) return null;
 46935                for (const e of t.childNodes) e.parentNode = t;
 46936                return t;
 46937              }
 46938              onError(e) {
 46939                this._errorCode = e;
 46940              }
 46941            };
 46942          },
 46943          (e, t, a) => {
 46944            Object.defineProperty(t, "__esModule", { value: !0 });
 46945            t.StructTreeRoot = t.StructTreePage = void 0;
 46946            var r = a(2),
 46947              n = a(4),
 46948              i = a(67),
 46949              s = a(73);
 46950            const o = 1,
 46951              c = 2,
 46952              l = 3,
 46953              h = 4,
 46954              u = 5;
 46955            class StructTreeRoot {
 46956              constructor(e, t) {
 46957                this.dict = e;
 46958                this.ref = t instanceof n.Ref ? t : null;
 46959                this.roleMap = new Map();
 46960                this.structParentIds = null;
 46961              }
 46962              init() {
 46963                this.readRoleMap();
 46964              }
 46965              #C(e, t, a) {
 46966                if (!(e instanceof n.Ref) || t < 0) return;
 46967                this.structParentIds ||= new n.RefSetCache();
 46968                let r = this.structParentIds.get(e);
 46969                if (!r) {
 46970                  r = [];
 46971                  this.structParentIds.put(e, r);
 46972                }
 46973                r.push([t, a]);
 46974              }
 46975              addAnnotationIdToPage(e, t) {
 46976                this.#C(e, t, h);
 46977              }
 46978              readRoleMap() {
 46979                const e = this.dict.get("RoleMap");
 46980                e instanceof n.Dict &&
 46981                  e.forEach((e, t) => {
 46982                    t instanceof n.Name && this.roleMap.set(e, t.name);
 46983                  });
 46984              }
 46985              static async canCreateStructureTree({
 46986                catalogRef: e,
 46987                pdfManager: t,
 46988                newAnnotationsByPage: a,
 46989              }) {
 46990                if (!(e instanceof n.Ref)) {
 46991                  (0, r.warn)(
 46992                    "Cannot save the struct tree: no catalog reference.",
 46993                  );
 46994                  return !1;
 46995                }
 46996                let i = 0,
 46997                  s = !0;
 46998                for (const [e, o] of a) {
 46999                  const { ref: a } = await t.getPage(e);
 47000                  if (!(a instanceof n.Ref)) {
 47001                    (0, r.warn)(
 47002                      `Cannot save the struct tree: page ${e} has no ref.`,
 47003                    );
 47004                    s = !0;
 47005                    break;
 47006                  }
 47007                  for (const e of o)
 47008                    if (e.accessibilityData?.type) {
 47009                      e.parentTreeId = i++;
 47010                      s = !1;
 47011                    }
 47012                }
 47013                if (s) {
 47014                  for (const e of a.values())
 47015                    for (const t of e) delete t.parentTreeId;
 47016                  return !1;
 47017                }
 47018                return !0;
 47019              }
 47020              static async createStructureTree({
 47021                newAnnotationsByPage: e,
 47022                xref: t,
 47023                catalogRef: a,
 47024                pdfManager: r,
 47025                newRefs: i,
 47026              }) {
 47027                const o = r.catalog.cloneDict(),
 47028                  c = t.getNewTemporaryRef();
 47029                o.set("StructTreeRoot", c);
 47030                const l = [];
 47031                await (0, s.writeObject)(a, o, l, t);
 47032                i.push({ ref: a, data: l.join("") });
 47033                const h = new n.Dict(t);
 47034                h.set("Type", n.Name.get("StructTreeRoot"));
 47035                const u = t.getNewTemporaryRef();
 47036                h.set("ParentTree", u);
 47037                const d = [];
 47038                h.set("K", d);
 47039                const f = new n.Dict(t),
 47040                  g = [];
 47041                f.set("Nums", g);
 47042                const p = await this.#k({
 47043                  newAnnotationsByPage: e,
 47044                  structTreeRootRef: c,
 47045                  kids: d,
 47046                  nums: g,
 47047                  xref: t,
 47048                  pdfManager: r,
 47049                  newRefs: i,
 47050                  buffer: l,
 47051                });
 47052                h.set("ParentTreeNextKey", p);
 47053                l.length = 0;
 47054                await (0, s.writeObject)(u, f, l, t);
 47055                i.push({ ref: u, data: l.join("") });
 47056                l.length = 0;
 47057                await (0, s.writeObject)(c, h, l, t);
 47058                i.push({ ref: c, data: l.join("") });
 47059              }
 47060              async canUpdateStructTree({
 47061                pdfManager: e,
 47062                newAnnotationsByPage: t,
 47063              }) {
 47064                if (!this.ref) {
 47065                  (0, r.warn)(
 47066                    "Cannot update the struct tree: no root reference.",
 47067                  );
 47068                  return !1;
 47069                }
 47070                let a = this.dict.get("ParentTreeNextKey");
 47071                if (!Number.isInteger(a) || a < 0) {
 47072                  (0, r.warn)("Cannot update the struct tree: invalid next key.");
 47073                  return !1;
 47074                }
 47075                const i = this.dict.get("ParentTree");
 47076                if (!(i instanceof n.Dict)) {
 47077                  (0, r.warn)(
 47078                    "Cannot update the struct tree: ParentTree isn't a dict.",
 47079                  );
 47080                  return !1;
 47081                }
 47082                const s = i.get("Nums");
 47083                if (!Array.isArray(s)) {
 47084                  (0, r.warn)(
 47085                    "Cannot update the struct tree: nums isn't an array.",
 47086                  );
 47087                  return !1;
 47088                }
 47089                const { numPages: o } = e.catalog;
 47090                for (const a of t.keys()) {
 47091                  const { pageDict: t, ref: i } = await e.getPage(a);
 47092                  if (!(i instanceof n.Ref)) {
 47093                    (0, r.warn)(
 47094                      `Cannot save the struct tree: page ${a} has no ref.`,
 47095                    );
 47096                    return !1;
 47097                  }
 47098                  const s = t.get("StructParents");
 47099                  if (!Number.isInteger(s) || s < 0 || s >= o) {
 47100                    (0, r.warn)(
 47101                      `Cannot save the struct tree: page ${a} has no id.`,
 47102                    );
 47103                    return !1;
 47104                  }
 47105                }
 47106                let c = !0;
 47107                for (const [r, n] of t) {
 47108                  const { pageDict: t } = await e.getPage(r);
 47109                  StructTreeRoot.#v({
 47110                    elements: n,
 47111                    xref: this.dict.xref,
 47112                    pageDict: t,
 47113                    parentTree: i,
 47114                  });
 47115                  for (const e of n)
 47116                    if (e.accessibilityData?.type) {
 47117                      e.parentTreeId = a++;
 47118                      c = !1;
 47119                    }
 47120                }
 47121                if (c) {
 47122                  for (const e of t.values())
 47123                    for (const t of e) {
 47124                      delete t.parentTreeId;
 47125                      delete t.structTreeParent;
 47126                    }
 47127                  return !1;
 47128                }
 47129                return !0;
 47130              }
 47131              async updateStructureTree({
 47132                newAnnotationsByPage: e,
 47133                pdfManager: t,
 47134                newRefs: a,
 47135              }) {
 47136                const r = this.dict.xref,
 47137                  i = this.dict.clone(),
 47138                  o = this.ref;
 47139                let c,
 47140                  l = i.getRaw("ParentTree");
 47141                if (l instanceof n.Ref) c = r.fetch(l);
 47142                else {
 47143                  c = l;
 47144                  l = r.getNewTemporaryRef();
 47145                  i.set("ParentTree", l);
 47146                }
 47147                c = c.clone();
 47148                let h = c.getRaw("Nums"),
 47149                  u = null;
 47150                if (h instanceof n.Ref) {
 47151                  u = h;
 47152                  h = r.fetch(u);
 47153                }
 47154                h = h.slice();
 47155                u || c.set("Nums", h);
 47156                let d = i.getRaw("K"),
 47157                  f = null;
 47158                if (d instanceof n.Ref) {
 47159                  f = d;
 47160                  d = r.fetch(f);
 47161                } else {
 47162                  f = r.getNewTemporaryRef();
 47163                  i.set("K", f);
 47164                }
 47165                d = Array.isArray(d) ? d.slice() : [d];
 47166                const g = [],
 47167                  p = await StructTreeRoot.#k({
 47168                    newAnnotationsByPage: e,
 47169                    structTreeRootRef: o,
 47170                    kids: d,
 47171                    nums: h,
 47172                    xref: r,
 47173                    pdfManager: t,
 47174                    newRefs: a,
 47175                    buffer: g,
 47176                  });
 47177                i.set("ParentTreeNextKey", p);
 47178                g.length = 0;
 47179                await (0, s.writeObject)(f, d, g, r);
 47180                a.push({ ref: f, data: g.join("") });
 47181                if (u) {
 47182                  g.length = 0;
 47183                  await (0, s.writeObject)(u, h, g, r);
 47184                  a.push({ ref: u, data: g.join("") });
 47185                }
 47186                g.length = 0;
 47187                await (0, s.writeObject)(l, c, g, r);
 47188                a.push({ ref: l, data: g.join("") });
 47189                g.length = 0;
 47190                await (0, s.writeObject)(o, i, g, r);
 47191                a.push({ ref: o, data: g.join("") });
 47192              }
 47193              static async #k({
 47194                newAnnotationsByPage: e,
 47195                structTreeRootRef: t,
 47196                kids: a,
 47197                nums: r,
 47198                xref: i,
 47199                pdfManager: o,
 47200                newRefs: c,
 47201                buffer: l,
 47202              }) {
 47203                const h = n.Name.get("OBJR");
 47204                let u = -1 / 0;
 47205                for (const [d, f] of e) {
 47206                  const { ref: e } = await o.getPage(d);
 47207                  for (const {
 47208                    accessibilityData: {
 47209                      type: o,
 47210                      title: d,
 47211                      lang: g,
 47212                      alt: p,
 47213                      expanded: m,
 47214                      actualText: b,
 47215                    },
 47216                    ref: y,
 47217                    parentTreeId: w,
 47218                    structTreeParent: S,
 47219                  } of f) {
 47220                    u = Math.max(u, w);
 47221                    const f = i.getNewTemporaryRef(),
 47222                      x = new n.Dict(i);
 47223                    x.set("S", n.Name.get(o));
 47224                    d && x.set("T", d);
 47225                    g && x.set("Lang", g);
 47226                    p && x.set("Alt", p);
 47227                    m && x.set("E", m);
 47228                    b && x.set("ActualText", b);
 47229                    S
 47230                      ? await this.#F({
 47231                          structTreeParent: S,
 47232                          tagDict: x,
 47233                          newTagRef: f,
 47234                          fallbackRef: t,
 47235                          xref: i,
 47236                          newRefs: c,
 47237                          buffer: l,
 47238                        })
 47239                      : x.set("P", t);
 47240                    const C = new n.Dict(i);
 47241                    x.set("K", C);
 47242                    C.set("Type", h);
 47243                    C.set("Pg", e);
 47244                    C.set("Obj", y);
 47245                    l.length = 0;
 47246                    await (0, s.writeObject)(f, x, l, i);
 47247                    c.push({ ref: f, data: l.join("") });
 47248                    r.push(w, f);
 47249                    a.push(f);
 47250                  }
 47251                }
 47252                return u + 1;
 47253              }
 47254              static #v({ elements: e, xref: t, pageDict: a, parentTree: r }) {
 47255                const s = new Map();
 47256                for (const t of e)
 47257                  if (t.structTreeParentId) {
 47258                    const e = parseInt(t.structTreeParentId.split("_mc")[1], 10);
 47259                    s.set(e, t);
 47260                  }
 47261                const o = a.get("StructParents"),
 47262                  c = new i.NumberTree(r, t).get(o);
 47263                if (!Array.isArray(c)) return;
 47264                const updateElement = (e, a, r) => {
 47265                  const i = s.get(e);
 47266                  if (i) {
 47267                    const e = a.getRaw("P"),
 47268                      s = t.fetchIfRef(e);
 47269                    e instanceof n.Ref &&
 47270                      s instanceof n.Dict &&
 47271                      (i.structTreeParent = { ref: r, dict: a });
 47272                    return !0;
 47273                  }
 47274                  return !1;
 47275                };
 47276                for (const e of c) {
 47277                  if (!(e instanceof n.Ref)) continue;
 47278                  const a = t.fetch(e),
 47279                    r = a.get("K");
 47280                  if (Number.isInteger(r)) updateElement(r, a, e);
 47281                  else if (Array.isArray(r))
 47282                    for (let n of r) {
 47283                      n = t.fetchIfRef(n);
 47284                      if (Number.isInteger(n) && updateElement(n, a, e)) break;
 47285                    }
 47286                }
 47287              }
 47288              static async #F({
 47289                structTreeParent: { ref: e, dict: t },
 47290                tagDict: a,
 47291                newTagRef: i,
 47292                fallbackRef: o,
 47293                xref: c,
 47294                newRefs: l,
 47295                buffer: h,
 47296              }) {
 47297                const u = t.getRaw("P");
 47298                let d = c.fetchIfRef(u);
 47299                a.set("P", u);
 47300                let f,
 47301                  g = !1,
 47302                  p = d.getRaw("K");
 47303                if (p instanceof n.Ref) f = c.fetch(p);
 47304                else {
 47305                  f = p;
 47306                  p = c.getNewTemporaryRef();
 47307                  d = d.clone();
 47308                  d.set("K", p);
 47309                  g = !0;
 47310                }
 47311                if (Array.isArray(f)) {
 47312                  const t = f.indexOf(e);
 47313                  if (!(t >= 0)) {
 47314                    (0, r.warn)(
 47315                      "Cannot update the struct tree: parent kid not found.",
 47316                    );
 47317                    a.set("P", o);
 47318                    return;
 47319                  }
 47320                  f = f.slice();
 47321                  f.splice(t + 1, 0, i);
 47322                } else if (f instanceof n.Dict) {
 47323                  f = [p, i];
 47324                  p = c.getNewTemporaryRef();
 47325                  d.set("K", p);
 47326                  g = !0;
 47327                }
 47328                h.length = 0;
 47329                await (0, s.writeObject)(p, f, h, c);
 47330                l.push({ ref: p, data: h.join("") });
 47331                if (g) {
 47332                  h.length = 0;
 47333                  await (0, s.writeObject)(u, d, h, c);
 47334                  l.push({ ref: u, data: h.join("") });
 47335                }
 47336              }
 47337            }
 47338            t.StructTreeRoot = StructTreeRoot;
 47339            class StructElementNode {
 47340              constructor(e, t) {
 47341                this.tree = e;
 47342                this.dict = t;
 47343                this.kids = [];
 47344                this.parseKids();
 47345              }
 47346              get role() {
 47347                const e = this.dict.get("S"),
 47348                  t = e instanceof n.Name ? e.name : "",
 47349                  { root: a } = this.tree;
 47350                return a.roleMap.has(t) ? a.roleMap.get(t) : t;
 47351              }
 47352              parseKids() {
 47353                let e = null;
 47354                const t = this.dict.getRaw("Pg");
 47355                t instanceof n.Ref && (e = t.toString());
 47356                const a = this.dict.get("K");
 47357                if (Array.isArray(a))
 47358                  for (const t of a) {
 47359                    const a = this.parseKid(e, t);
 47360                    a && this.kids.push(a);
 47361                  }
 47362                else {
 47363                  const t = this.parseKid(e, a);
 47364                  t && this.kids.push(t);
 47365                }
 47366              }
 47367              parseKid(e, t) {
 47368                if (Number.isInteger(t))
 47369                  return this.tree.pageDict.objId !== e
 47370                    ? null
 47371                    : new StructElement({ type: o, mcid: t, pageObjId: e });
 47372                let a = null;
 47373                t instanceof n.Ref
 47374                  ? (a = this.dict.xref.fetch(t))
 47375                  : t instanceof n.Dict && (a = t);
 47376                if (!a) return null;
 47377                const r = a.getRaw("Pg");
 47378                r instanceof n.Ref && (e = r.toString());
 47379                const i =
 47380                  a.get("Type") instanceof n.Name ? a.get("Type").name : null;
 47381                if ("MCR" === i) {
 47382                  if (this.tree.pageDict.objId !== e) return null;
 47383                  const t = a.getRaw("Stm");
 47384                  return new StructElement({
 47385                    type: c,
 47386                    refObjId: t instanceof n.Ref ? t.toString() : null,
 47387                    pageObjId: e,
 47388                    mcid: a.get("MCID"),
 47389                  });
 47390                }
 47391                if ("OBJR" === i) {
 47392                  if (this.tree.pageDict.objId !== e) return null;
 47393                  const t = a.getRaw("Obj");
 47394                  return new StructElement({
 47395                    type: l,
 47396                    refObjId: t instanceof n.Ref ? t.toString() : null,
 47397                    pageObjId: e,
 47398                  });
 47399                }
 47400                return new StructElement({ type: u, dict: a });
 47401              }
 47402            }
 47403            class StructElement {
 47404              constructor({
 47405                type: e,
 47406                dict: t = null,
 47407                mcid: a = null,
 47408                pageObjId: r = null,
 47409                refObjId: n = null,
 47410              }) {
 47411                this.type = e;
 47412                this.dict = t;
 47413                this.mcid = a;
 47414                this.pageObjId = r;
 47415                this.refObjId = n;
 47416                this.parentNode = null;
 47417              }
 47418            }
 47419            t.StructTreePage = class StructTreePage {
 47420              constructor(e, t) {
 47421                this.root = e;
 47422                this.rootDict = e ? e.dict : null;
 47423                this.pageDict = t;
 47424                this.nodes = [];
 47425              }
 47426              parse(e) {
 47427                if (!this.root || !this.rootDict) return;
 47428                const t = this.rootDict.get("ParentTree");
 47429                if (!t) return;
 47430                const a = this.pageDict.get("StructParents"),
 47431                  r = e instanceof n.Ref && this.root.structParentIds?.get(e);
 47432                if (!Number.isInteger(a) && !r) return;
 47433                const s = new Map(),
 47434                  o = new i.NumberTree(t, this.rootDict.xref);
 47435                if (Number.isInteger(a)) {
 47436                  const e = o.get(a);
 47437                  if (Array.isArray(e))
 47438                    for (const t of e)
 47439                      t instanceof n.Ref &&
 47440                        this.addNode(this.rootDict.xref.fetch(t), s);
 47441                }
 47442                if (r)
 47443                  for (const [e, t] of r) {
 47444                    const a = o.get(e);
 47445                    if (a) {
 47446                      const e = this.addNode(this.rootDict.xref.fetchIfRef(a), s);
 47447                      1 === e?.kids?.length &&
 47448                        e.kids[0].type === l &&
 47449                        (e.kids[0].type = t);
 47450                    }
 47451                  }
 47452              }
 47453              addNode(e, t, a = 0) {
 47454                if (a > 40) {
 47455                  (0, r.warn)("StructTree MAX_DEPTH reached.");
 47456                  return null;
 47457                }
 47458                if (t.has(e)) return t.get(e);
 47459                const i = new StructElementNode(this, e);
 47460                t.set(e, i);
 47461                const s = e.get("P");
 47462                if (!s || (0, n.isName)(s.get("Type"), "StructTreeRoot")) {
 47463                  this.addTopLevelNode(e, i) || t.delete(e);
 47464                  return i;
 47465                }
 47466                const o = this.addNode(s, t, a + 1);
 47467                if (!o) return i;
 47468                let c = !1;
 47469                for (const t of o.kids)
 47470                  if (t.type === u && t.dict === e) {
 47471                    t.parentNode = i;
 47472                    c = !0;
 47473                  }
 47474                c || t.delete(e);
 47475                return i;
 47476              }
 47477              addTopLevelNode(e, t) {
 47478                const a = this.rootDict.get("K");
 47479                if (!a) return !1;
 47480                if (a instanceof n.Dict) {
 47481                  if (a.objId !== e.objId) return !1;
 47482                  this.nodes[0] = t;
 47483                  return !0;
 47484                }
 47485                if (!Array.isArray(a)) return !0;
 47486                let r = !1;
 47487                for (let n = 0; n < a.length; n++) {
 47488                  const i = a[n];
 47489                  if (i?.toString() === e.objId) {
 47490                    this.nodes[n] = t;
 47491                    r = !0;
 47492                  }
 47493                }
 47494                return r;
 47495              }
 47496              get serializable() {
 47497                function nodeToSerializable(e, t, a = 0) {
 47498                  if (a > 40) {
 47499                    (0, r.warn)("StructTree too deep to be fully serialized.");
 47500                    return;
 47501                  }
 47502                  const n = Object.create(null);
 47503                  n.role = e.role;
 47504                  n.children = [];
 47505                  t.children.push(n);
 47506                  const i = e.dict.get("Alt");
 47507                  "string" == typeof i && (n.alt = (0, r.stringToPDFString)(i));
 47508                  const s = e.dict.get("Lang");
 47509                  "string" == typeof s && (n.lang = (0, r.stringToPDFString)(s));
 47510                  for (const t of e.kids) {
 47511                    const e = t.type === u ? t.parentNode : null;
 47512                    e
 47513                      ? nodeToSerializable(e, n, a + 1)
 47514                      : t.type === o || t.type === c
 47515                        ? n.children.push({
 47516                            type: "content",
 47517                            id: `p${t.pageObjId}_mc${t.mcid}`,
 47518                          })
 47519                        : t.type === l
 47520                          ? n.children.push({ type: "object", id: t.refObjId })
 47521                          : t.type === h &&
 47522                            n.children.push({
 47523                              type: "annotation",
 47524                              id: `${r.AnnotationPrefix}${t.refObjId}`,
 47525                            });
 47526                  }
 47527                }
 47528                const e = Object.create(null);
 47529                e.children = [];
 47530                e.role = "Root";
 47531                for (const t of this.nodes) t && nodeToSerializable(t, e);
 47532                return e;
 47533              }
 47534            };
 47535          },
 47536          (e, t, a) => {
 47537            Object.defineProperty(t, "__esModule", { value: !0 });
 47538            t.incrementalUpdate = async function incrementalUpdate({
 47539              originalData: e,
 47540              xrefInfo: t,
 47541              newRefs: a,
 47542              xref: o = null,
 47543              hasXfa: l = !1,
 47544              xfaDatasetsRef: h = null,
 47545              hasXfaDatasetsEntry: u = !1,
 47546              needAppearances: d,
 47547              acroFormRef: f = null,
 47548              acroForm: g = null,
 47549              xfaData: p = null,
 47550            }) {
 47551              await (async function updateAcroform({
 47552                xref: e,
 47553                acroForm: t,
 47554                acroFormRef: a,
 47555                hasXfa: n,
 47556                hasXfaDatasetsEntry: i,
 47557                xfaDatasetsRef: s,
 47558                needAppearances: o,
 47559                newRefs: c,
 47560              }) {
 47561                !n || i || s || (0, r.warn)("XFA - Cannot save it");
 47562                if (!o && (!n || !s || i)) return;
 47563                const l = t.clone();
 47564                if (n && !i) {
 47565                  const e = t.get("XFA").slice();
 47566                  e.splice(2, 0, "datasets");
 47567                  e.splice(3, 0, s);
 47568                  l.set("XFA", e);
 47569                }
 47570                o && l.set("NeedAppearances", !0);
 47571                const h = [];
 47572                await writeObject(a, l, h, e);
 47573                c.push({ ref: a, data: h.join("") });
 47574              })({
 47575                xref: o,
 47576                acroForm: g,
 47577                acroFormRef: f,
 47578                hasXfa: l,
 47579                hasXfaDatasetsEntry: u,
 47580                xfaDatasetsRef: h,
 47581                needAppearances: d,
 47582                newRefs: a,
 47583              });
 47584              l &&
 47585                (function updateXFA({
 47586                  xfaData: e,
 47587                  xfaDatasetsRef: t,
 47588                  newRefs: a,
 47589                  xref: n,
 47590                }) {
 47591                  if (null === e) {
 47592                    e = (function writeXFADataForAcroform(e, t) {
 47593                      const a = new s.SimpleXMLParser({
 47594                        hasAttributes: !0,
 47595                      }).parseFromString(e);
 47596                      for (const { xfa: e } of t) {
 47597                        if (!e) continue;
 47598                        const { path: t, value: n } = e;
 47599                        if (!t) continue;
 47600                        const o = (0, i.parseXFAPath)(t);
 47601                        let c = a.documentElement.searchNode(o, 0);
 47602                        !c &&
 47603                          o.length > 1 &&
 47604                          (c = a.documentElement.searchNode([o.at(-1)], 0));
 47605                        c
 47606                          ? (c.childNodes = Array.isArray(n)
 47607                              ? n.map((e) => new s.SimpleDOMNode("value", e))
 47608                              : [new s.SimpleDOMNode("#text", n)])
 47609                          : (0, r.warn)(`Node not found for path: ${t}`);
 47610                      }
 47611                      const n = [];
 47612                      a.documentElement.dump(n);
 47613                      return n.join("");
 47614                    })(n.fetchIfRef(t).getString(), a);
 47615                  }
 47616                  const o = n.encrypt;
 47617                  if (o) {
 47618                    e = o.createCipherTransform(t.num, t.gen).encryptString(e);
 47619                  }
 47620                  const c =
 47621                    `${t.num} ${t.gen} obj\n<< /Type /EmbeddedFile /Length ${e.length}>>\nstream\n` +
 47622                    e +
 47623                    "\nendstream\nendobj\n";
 47624                  a.push({ ref: t, data: c });
 47625                })({ xfaData: p, xfaDatasetsRef: h, newRefs: a, xref: o });
 47626              const m = new n.Dict(null),
 47627                b = t.newRef;
 47628              let y, w;
 47629              const S = e.at(-1);
 47630              if (10 === S || 13 === S) {
 47631                y = [];
 47632                w = e.length;
 47633              } else {
 47634                y = ["\n"];
 47635                w = e.length + 1;
 47636              }
 47637              m.set("Size", b.num + 1);
 47638              m.set("Prev", t.startXRef);
 47639              m.set("Type", n.Name.get("XRef"));
 47640              null !== t.rootRef && m.set("Root", t.rootRef);
 47641              null !== t.infoRef && m.set("Info", t.infoRef);
 47642              null !== t.encryptRef && m.set("Encrypt", t.encryptRef);
 47643              a.push({ ref: b, data: "" });
 47644              a = a.sort((e, t) => e.ref.num - t.ref.num);
 47645              const x = [[0, 1, 65535]],
 47646                C = [0, 1];
 47647              let k = 0;
 47648              for (const { ref: e, data: t } of a) {
 47649                k = Math.max(k, w);
 47650                x.push([1, w, Math.min(e.gen, 65535)]);
 47651                w += t.length;
 47652                C.push(e.num, 1);
 47653                y.push(t);
 47654              }
 47655              m.set("Index", C);
 47656              if (Array.isArray(t.fileIds) && t.fileIds.length > 0) {
 47657                const e = (function computeMD5(e, t) {
 47658                  const a = Math.floor(Date.now() / 1e3),
 47659                    n = t.filename || "",
 47660                    i = [a.toString(), n, e.toString()];
 47661                  let s = i.reduce((e, t) => e + t.length, 0);
 47662                  for (const e of Object.values(t.info)) {
 47663                    i.push(e);
 47664                    s += e.length;
 47665                  }
 47666                  const o = new Uint8Array(s);
 47667                  let l = 0;
 47668                  for (const e of i) {
 47669                    writeString(e, l, o);
 47670                    l += e.length;
 47671                  }
 47672                  return (0, r.bytesToString)((0, c.calculateMD5)(o));
 47673                })(w, t);
 47674                m.set("ID", [t.fileIds[0], e]);
 47675              }
 47676              const v = [1, Math.ceil(Math.log2(k) / 8), 2],
 47677                F = (v[0] + v[1] + v[2]) * x.length;
 47678              m.set("W", v);
 47679              m.set("Length", F);
 47680              y.push(`${b.num} ${b.gen} obj\n`);
 47681              await writeDict(m, y, null);
 47682              y.push(" stream\n");
 47683              const O = y.reduce((e, t) => e + t.length, 0),
 47684                T = `\nendstream\nendobj\nstartxref\n${w}\n%%EOF\n`,
 47685                M = new Uint8Array(e.length + O + F + T.length);
 47686              M.set(e);
 47687              let D = e.length;
 47688              for (const e of y) {
 47689                writeString(e, D, M);
 47690                D += e.length;
 47691              }
 47692              for (const [e, t, a] of x) {
 47693                D = writeInt(e, v[0], D, M);
 47694                D = writeInt(t, v[1], D, M);
 47695                D = writeInt(a, v[2], D, M);
 47696              }
 47697              writeString(T, D, M);
 47698              return M;
 47699            };
 47700            t.writeDict = writeDict;
 47701            t.writeObject = writeObject;
 47702            var r = a(2),
 47703              n = a(4),
 47704              i = a(3),
 47705              s = a(71),
 47706              o = a(5),
 47707              c = a(74);
 47708            async function writeObject(e, t, a, { encrypt: r = null }) {
 47709              const i = r?.createCipherTransform(e.num, e.gen);
 47710              a.push(`${e.num} ${e.gen} obj\n`);
 47711              t instanceof n.Dict
 47712                ? await writeDict(t, a, i)
 47713                : t instanceof o.BaseStream
 47714                  ? await writeStream(t, a, i)
 47715                  : Array.isArray(t) && (await writeArray(t, a, i));
 47716              a.push("\nendobj\n");
 47717            }
 47718            async function writeDict(e, t, a) {
 47719              t.push("<<");
 47720              for (const r of e.getKeys()) {
 47721                t.push(` /${(0, i.escapePDFName)(r)} `);
 47722                await writeValue(e.getRaw(r), t, a);
 47723              }
 47724              t.push(">>");
 47725            }
 47726            async function writeStream(e, t, a) {
 47727              let i = e.getString();
 47728              const { dict: s } = e,
 47729                [o, c] = await Promise.all([
 47730                  s.getAsync("Filter"),
 47731                  s.getAsync("DecodeParms"),
 47732                ]),
 47733                l = Array.isArray(o) ? await s.xref.fetchIfRefAsync(o[0]) : o,
 47734                h = (0, n.isName)(l, "FlateDecode");
 47735              if (
 47736                "undefined" != typeof CompressionStream &&
 47737                (i.length >= 256 || h)
 47738              )
 47739                try {
 47740                  const e = (0, r.stringToBytes)(i),
 47741                    t = new CompressionStream("deflate"),
 47742                    a = t.writable.getWriter();
 47743                  a.write(e);
 47744                  a.close();
 47745                  const l = await new Response(t.readable).arrayBuffer();
 47746                  i = (0, r.bytesToString)(new Uint8Array(l));
 47747                  let u, d;
 47748                  if (o) {
 47749                    if (!h) {
 47750                      u = Array.isArray(o)
 47751                        ? [n.Name.get("FlateDecode"), ...o]
 47752                        : [n.Name.get("FlateDecode"), o];
 47753                      c && (d = Array.isArray(c) ? [null, ...c] : [null, c]);
 47754                    }
 47755                  } else u = n.Name.get("FlateDecode");
 47756                  u && s.set("Filter", u);
 47757                  d && s.set("DecodeParms", d);
 47758                } catch (e) {
 47759                  (0, r.info)(`writeStream - cannot compress data: "${e}".`);
 47760                }
 47761              a && (i = a.encryptString(i));
 47762              s.set("Length", i.length);
 47763              await writeDict(s, t, a);
 47764              t.push(" stream\n", i, "\nendstream");
 47765            }
 47766            async function writeArray(e, t, a) {
 47767              t.push("[");
 47768              let r = !0;
 47769              for (const n of e) {
 47770                r ? (r = !1) : t.push(" ");
 47771                await writeValue(n, t, a);
 47772              }
 47773              t.push("]");
 47774            }
 47775            async function writeValue(e, t, a) {
 47776              if (e instanceof n.Name) t.push(`/${(0, i.escapePDFName)(e.name)}`);
 47777              else if (e instanceof n.Ref) t.push(`${e.num} ${e.gen} R`);
 47778              else if (Array.isArray(e)) await writeArray(e, t, a);
 47779              else if ("string" == typeof e) {
 47780                a && (e = a.encryptString(e));
 47781                t.push(`(${(0, i.escapeString)(e)})`);
 47782              } else
 47783                "number" == typeof e
 47784                  ? t.push((0, i.numberToString)(e))
 47785                  : "boolean" == typeof e
 47786                    ? t.push(e.toString())
 47787                    : e instanceof n.Dict
 47788                      ? await writeDict(e, t, a)
 47789                      : e instanceof o.BaseStream
 47790                        ? await writeStream(e, t, a)
 47791                        : null === e
 47792                          ? t.push("null")
 47793                          : (0, r.warn)(
 47794                              `Unhandled value in writer: ${typeof e}, please file a bug.`,
 47795                            );
 47796            }
 47797            function writeInt(e, t, a, r) {
 47798              for (let n = t + a - 1; n > a - 1; n--) {
 47799                r[n] = 255 & e;
 47800                e >>= 8;
 47801              }
 47802              return a + t;
 47803            }
 47804            function writeString(e, t, a) {
 47805              for (let r = 0, n = e.length; r < n; r++)
 47806                a[t + r] = 255 & e.charCodeAt(r);
 47807            }
 47808          },
 47809          (e, t, a) => {
 47810            Object.defineProperty(t, "__esModule", { value: !0 });
 47811            t.calculateSHA256 =
 47812              t.calculateMD5 =
 47813              t.PDF20 =
 47814              t.PDF17 =
 47815              t.CipherTransformFactory =
 47816              t.ARCFourCipher =
 47817              t.AES256Cipher =
 47818              t.AES128Cipher =
 47819                void 0;
 47820            t.calculateSHA384 = calculateSHA384;
 47821            t.calculateSHA512 = void 0;
 47822            var r = a(2),
 47823              n = a(4),
 47824              i = a(75);
 47825            class ARCFourCipher {
 47826              constructor(e) {
 47827                this.a = 0;
 47828                this.b = 0;
 47829                const t = new Uint8Array(256),
 47830                  a = e.length;
 47831                for (let e = 0; e < 256; ++e) t[e] = e;
 47832                for (let r = 0, n = 0; r < 256; ++r) {
 47833                  const i = t[r];
 47834                  n = (n + i + e[r % a]) & 255;
 47835                  t[r] = t[n];
 47836                  t[n] = i;
 47837                }
 47838                this.s = t;
 47839              }
 47840              encryptBlock(e) {
 47841                let t = this.a,
 47842                  a = this.b;
 47843                const r = this.s,
 47844                  n = e.length,
 47845                  i = new Uint8Array(n);
 47846                for (let s = 0; s < n; ++s) {
 47847                  t = (t + 1) & 255;
 47848                  const n = r[t];
 47849                  a = (a + n) & 255;
 47850                  const o = r[a];
 47851                  r[t] = o;
 47852                  r[a] = n;
 47853                  i[s] = e[s] ^ r[(n + o) & 255];
 47854                }
 47855                this.a = t;
 47856                this.b = a;
 47857                return i;
 47858              }
 47859              decryptBlock(e) {
 47860                return this.encryptBlock(e);
 47861              }
 47862              encrypt(e) {
 47863                return this.encryptBlock(e);
 47864              }
 47865            }
 47866            t.ARCFourCipher = ARCFourCipher;
 47867            const s = (function calculateMD5Closure() {
 47868              const e = new Uint8Array([
 47869                  7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 5,
 47870                  9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 4, 11, 16,
 47871                  23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 6, 10, 15, 21,
 47872                  6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21,
 47873                ]),
 47874                t = new Int32Array([
 47875                  -680876936, -389564586, 606105819, -1044525330, -176418897,
 47876                  1200080426, -1473231341, -45705983, 1770035416, -1958414417,
 47877                  -42063, -1990404162, 1804603682, -40341101, -1502002290,
 47878                  1236535329, -165796510, -1069501632, 643717713, -373897302,
 47879                  -701558691, 38016083, -660478335, -405537848, 568446438,
 47880                  -1019803690, -187363961, 1163531501, -1444681467, -51403784,
 47881                  1735328473, -1926607734, -378558, -2022574463, 1839030562,
 47882                  -35309556, -1530992060, 1272893353, -155497632, -1094730640,
 47883                  681279174, -358537222, -722521979, 76029189, -640364487,
 47884                  -421815835, 530742520, -995338651, -198630844, 1126891415,
 47885                  -1416354905, -57434055, 1700485571, -1894986606, -1051523,
 47886                  -2054922799, 1873313359, -30611744, -1560198380, 1309151649,
 47887                  -145523070, -1120210379, 718787259, -343485551,
 47888                ]);
 47889              return function hash(a, r, n) {
 47890                let i = 1732584193,
 47891                  s = -271733879,
 47892                  o = -1732584194,
 47893                  c = 271733878;
 47894                const l = (n + 72) & -64,
 47895                  h = new Uint8Array(l);
 47896                let u, d;
 47897                for (u = 0; u < n; ++u) h[u] = a[r++];
 47898                h[u++] = 128;
 47899                const f = l - 8;
 47900                for (; u < f; ) h[u++] = 0;
 47901                h[u++] = (n << 3) & 255;
 47902                h[u++] = (n >> 5) & 255;
 47903                h[u++] = (n >> 13) & 255;
 47904                h[u++] = (n >> 21) & 255;
 47905                h[u++] = (n >>> 29) & 255;
 47906                h[u++] = 0;
 47907                h[u++] = 0;
 47908                h[u++] = 0;
 47909                const g = new Int32Array(16);
 47910                for (u = 0; u < l; ) {
 47911                  for (d = 0; d < 16; ++d, u += 4)
 47912                    g[d] =
 47913                      h[u] |
 47914                      (h[u + 1] << 8) |
 47915                      (h[u + 2] << 16) |
 47916                      (h[u + 3] << 24);
 47917                  let a,
 47918                    r,
 47919                    n = i,
 47920                    l = s,
 47921                    f = o,
 47922                    p = c;
 47923                  for (d = 0; d < 64; ++d) {
 47924                    if (d < 16) {
 47925                      a = (l & f) | (~l & p);
 47926                      r = d;
 47927                    } else if (d < 32) {
 47928                      a = (p & l) | (~p & f);
 47929                      r = (5 * d + 1) & 15;
 47930                    } else if (d < 48) {
 47931                      a = l ^ f ^ p;
 47932                      r = (3 * d + 5) & 15;
 47933                    } else {
 47934                      a = f ^ (l | ~p);
 47935                      r = (7 * d) & 15;
 47936                    }
 47937                    const i = p,
 47938                      s = (n + a + t[d] + g[r]) | 0,
 47939                      o = e[d];
 47940                    p = f;
 47941                    f = l;
 47942                    l = (l + ((s << o) | (s >>> (32 - o)))) | 0;
 47943                    n = i;
 47944                  }
 47945                  i = (i + n) | 0;
 47946                  s = (s + l) | 0;
 47947                  o = (o + f) | 0;
 47948                  c = (c + p) | 0;
 47949                }
 47950                return new Uint8Array([
 47951                  255 & i,
 47952                  (i >> 8) & 255,
 47953                  (i >> 16) & 255,
 47954                  (i >>> 24) & 255,
 47955                  255 & s,
 47956                  (s >> 8) & 255,
 47957                  (s >> 16) & 255,
 47958                  (s >>> 24) & 255,
 47959                  255 & o,
 47960                  (o >> 8) & 255,
 47961                  (o >> 16) & 255,
 47962                  (o >>> 24) & 255,
 47963                  255 & c,
 47964                  (c >> 8) & 255,
 47965                  (c >> 16) & 255,
 47966                  (c >>> 24) & 255,
 47967                ]);
 47968              };
 47969            })();
 47970            t.calculateMD5 = s;
 47971            class Word64 {
 47972              constructor(e, t) {
 47973                this.high = 0 | e;
 47974                this.low = 0 | t;
 47975              }
 47976              and(e) {
 47977                this.high &= e.high;
 47978                this.low &= e.low;
 47979              }
 47980              xor(e) {
 47981                this.high ^= e.high;
 47982                this.low ^= e.low;
 47983              }
 47984              or(e) {
 47985                this.high |= e.high;
 47986                this.low |= e.low;
 47987              }
 47988              shiftRight(e) {
 47989                if (e >= 32) {
 47990                  this.low = (this.high >>> (e - 32)) | 0;
 47991                  this.high = 0;
 47992                } else {
 47993                  this.low = (this.low >>> e) | (this.high << (32 - e));
 47994                  this.high = (this.high >>> e) | 0;
 47995                }
 47996              }
 47997              shiftLeft(e) {
 47998                if (e >= 32) {
 47999                  this.high = this.low << (e - 32);
 48000                  this.low = 0;
 48001                } else {
 48002                  this.high = (this.high << e) | (this.low >>> (32 - e));
 48003                  this.low <<= e;
 48004                }
 48005              }
 48006              rotateRight(e) {
 48007                let t, a;
 48008                if (32 & e) {
 48009                  a = this.low;
 48010                  t = this.high;
 48011                } else {
 48012                  t = this.low;
 48013                  a = this.high;
 48014                }
 48015                e &= 31;
 48016                this.low = (t >>> e) | (a << (32 - e));
 48017                this.high = (a >>> e) | (t << (32 - e));
 48018              }
 48019              not() {
 48020                this.high = ~this.high;
 48021                this.low = ~this.low;
 48022              }
 48023              add(e) {
 48024                const t = (this.low >>> 0) + (e.low >>> 0);
 48025                let a = (this.high >>> 0) + (e.high >>> 0);
 48026                t > 4294967295 && (a += 1);
 48027                this.low = 0 | t;
 48028                this.high = 0 | a;
 48029              }
 48030              copyTo(e, t) {
 48031                e[t] = (this.high >>> 24) & 255;
 48032                e[t + 1] = (this.high >> 16) & 255;
 48033                e[t + 2] = (this.high >> 8) & 255;
 48034                e[t + 3] = 255 & this.high;
 48035                e[t + 4] = (this.low >>> 24) & 255;
 48036                e[t + 5] = (this.low >> 16) & 255;
 48037                e[t + 6] = (this.low >> 8) & 255;
 48038                e[t + 7] = 255 & this.low;
 48039              }
 48040              assign(e) {
 48041                this.high = e.high;
 48042                this.low = e.low;
 48043              }
 48044            }
 48045            const o = (function calculateSHA256Closure() {
 48046              function rotr(e, t) {
 48047                return (e >>> t) | (e << (32 - t));
 48048              }
 48049              function ch(e, t, a) {
 48050                return (e & t) ^ (~e & a);
 48051              }
 48052              function maj(e, t, a) {
 48053                return (e & t) ^ (e & a) ^ (t & a);
 48054              }
 48055              function sigma(e) {
 48056                return rotr(e, 2) ^ rotr(e, 13) ^ rotr(e, 22);
 48057              }
 48058              function sigmaPrime(e) {
 48059                return rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25);
 48060              }
 48061              function littleSigma(e) {
 48062                return rotr(e, 7) ^ rotr(e, 18) ^ (e >>> 3);
 48063              }
 48064              const e = [
 48065                1116352408, 1899447441, 3049323471, 3921009573, 961987163,
 48066                1508970993, 2453635748, 2870763221, 3624381080, 310598401,
 48067                607225278, 1426881987, 1925078388, 2162078206, 2614888103,
 48068                3248222580, 3835390401, 4022224774, 264347078, 604807628,
 48069                770255983, 1249150122, 1555081692, 1996064986, 2554220882,
 48070                2821834349, 2952996808, 3210313671, 3336571891, 3584528711,
 48071                113926993, 338241895, 666307205, 773529912, 1294757372,
 48072                1396182291, 1695183700, 1986661051, 2177026350, 2456956037,
 48073                2730485921, 2820302411, 3259730800, 3345764771, 3516065817,
 48074                3600352804, 4094571909, 275423344, 430227734, 506948616,
 48075                659060556, 883997877, 958139571, 1322822218, 1537002063,
 48076                1747873779, 1955562222, 2024104815, 2227730452, 2361852424,
 48077                2428436474, 2756734187, 3204031479, 3329325298,
 48078              ];
 48079              return function hash(t, a, r) {
 48080                let n = 1779033703,
 48081                  i = 3144134277,
 48082                  s = 1013904242,
 48083                  o = 2773480762,
 48084                  c = 1359893119,
 48085                  l = 2600822924,
 48086                  h = 528734635,
 48087                  u = 1541459225;
 48088                const d = 64 * Math.ceil((r + 9) / 64),
 48089                  f = new Uint8Array(d);
 48090                let g, p;
 48091                for (g = 0; g < r; ++g) f[g] = t[a++];
 48092                f[g++] = 128;
 48093                const m = d - 8;
 48094                for (; g < m; ) f[g++] = 0;
 48095                f[g++] = 0;
 48096                f[g++] = 0;
 48097                f[g++] = 0;
 48098                f[g++] = (r >>> 29) & 255;
 48099                f[g++] = (r >> 21) & 255;
 48100                f[g++] = (r >> 13) & 255;
 48101                f[g++] = (r >> 5) & 255;
 48102                f[g++] = (r << 3) & 255;
 48103                const b = new Uint32Array(64);
 48104                for (g = 0; g < d; ) {
 48105                  for (p = 0; p < 16; ++p) {
 48106                    b[p] =
 48107                      (f[g] << 24) |
 48108                      (f[g + 1] << 16) |
 48109                      (f[g + 2] << 8) |
 48110                      f[g + 3];
 48111                    g += 4;
 48112                  }
 48113                  for (p = 16; p < 64; ++p)
 48114                    b[p] =
 48115                      ((rotr((y = b[p - 2]), 17) ^ rotr(y, 19) ^ (y >>> 10)) +
 48116                        b[p - 7] +
 48117                        littleSigma(b[p - 15]) +
 48118                        b[p - 16]) |
 48119                      0;
 48120                  let t,
 48121                    a,
 48122                    r = n,
 48123                    d = i,
 48124                    m = s,
 48125                    w = o,
 48126                    S = c,
 48127                    x = l,
 48128                    C = h,
 48129                    k = u;
 48130                  for (p = 0; p < 64; ++p) {
 48131                    t = k + sigmaPrime(S) + ch(S, x, C) + e[p] + b[p];
 48132                    a = sigma(r) + maj(r, d, m);
 48133                    k = C;
 48134                    C = x;
 48135                    x = S;
 48136                    S = (w + t) | 0;
 48137                    w = m;
 48138                    m = d;
 48139                    d = r;
 48140                    r = (t + a) | 0;
 48141                  }
 48142                  n = (n + r) | 0;
 48143                  i = (i + d) | 0;
 48144                  s = (s + m) | 0;
 48145                  o = (o + w) | 0;
 48146                  c = (c + S) | 0;
 48147                  l = (l + x) | 0;
 48148                  h = (h + C) | 0;
 48149                  u = (u + k) | 0;
 48150                }
 48151                var y;
 48152                return new Uint8Array([
 48153                  (n >> 24) & 255,
 48154                  (n >> 16) & 255,
 48155                  (n >> 8) & 255,
 48156                  255 & n,
 48157                  (i >> 24) & 255,
 48158                  (i >> 16) & 255,
 48159                  (i >> 8) & 255,
 48160                  255 & i,
 48161                  (s >> 24) & 255,
 48162                  (s >> 16) & 255,
 48163                  (s >> 8) & 255,
 48164                  255 & s,
 48165                  (o >> 24) & 255,
 48166                  (o >> 16) & 255,
 48167                  (o >> 8) & 255,
 48168                  255 & o,
 48169                  (c >> 24) & 255,
 48170                  (c >> 16) & 255,
 48171                  (c >> 8) & 255,
 48172                  255 & c,
 48173                  (l >> 24) & 255,
 48174                  (l >> 16) & 255,
 48175                  (l >> 8) & 255,
 48176                  255 & l,
 48177                  (h >> 24) & 255,
 48178                  (h >> 16) & 255,
 48179                  (h >> 8) & 255,
 48180                  255 & h,
 48181                  (u >> 24) & 255,
 48182                  (u >> 16) & 255,
 48183                  (u >> 8) & 255,
 48184                  255 & u,
 48185                ]);
 48186              };
 48187            })();
 48188            t.calculateSHA256 = o;
 48189            const c = (function calculateSHA512Closure() {
 48190              function ch(e, t, a, r, n) {
 48191                e.assign(t);
 48192                e.and(a);
 48193                n.assign(t);
 48194                n.not();
 48195                n.and(r);
 48196                e.xor(n);
 48197              }
 48198              function maj(e, t, a, r, n) {
 48199                e.assign(t);
 48200                e.and(a);
 48201                n.assign(t);
 48202                n.and(r);
 48203                e.xor(n);
 48204                n.assign(a);
 48205                n.and(r);
 48206                e.xor(n);
 48207              }
 48208              function sigma(e, t, a) {
 48209                e.assign(t);
 48210                e.rotateRight(28);
 48211                a.assign(t);
 48212                a.rotateRight(34);
 48213                e.xor(a);
 48214                a.assign(t);
 48215                a.rotateRight(39);
 48216                e.xor(a);
 48217              }
 48218              function sigmaPrime(e, t, a) {
 48219                e.assign(t);
 48220                e.rotateRight(14);
 48221                a.assign(t);
 48222                a.rotateRight(18);
 48223                e.xor(a);
 48224                a.assign(t);
 48225                a.rotateRight(41);
 48226                e.xor(a);
 48227              }
 48228              function littleSigma(e, t, a) {
 48229                e.assign(t);
 48230                e.rotateRight(1);
 48231                a.assign(t);
 48232                a.rotateRight(8);
 48233                e.xor(a);
 48234                a.assign(t);
 48235                a.shiftRight(7);
 48236                e.xor(a);
 48237              }
 48238              function littleSigmaPrime(e, t, a) {
 48239                e.assign(t);
 48240                e.rotateRight(19);
 48241                a.assign(t);
 48242                a.rotateRight(61);
 48243                e.xor(a);
 48244                a.assign(t);
 48245                a.shiftRight(6);
 48246                e.xor(a);
 48247              }
 48248              const e = [
 48249                new Word64(1116352408, 3609767458),
 48250                new Word64(1899447441, 602891725),
 48251                new Word64(3049323471, 3964484399),
 48252                new Word64(3921009573, 2173295548),
 48253                new Word64(961987163, 4081628472),
 48254                new Word64(1508970993, 3053834265),
 48255                new Word64(2453635748, 2937671579),
 48256                new Word64(2870763221, 3664609560),
 48257                new Word64(3624381080, 2734883394),
 48258                new Word64(310598401, 1164996542),
 48259                new Word64(607225278, 1323610764),
 48260                new Word64(1426881987, 3590304994),
 48261                new Word64(1925078388, 4068182383),
 48262                new Word64(2162078206, 991336113),
 48263                new Word64(2614888103, 633803317),
 48264                new Word64(3248222580, 3479774868),
 48265                new Word64(3835390401, 2666613458),
 48266                new Word64(4022224774, 944711139),
 48267                new Word64(264347078, 2341262773),
 48268                new Word64(604807628, 2007800933),
 48269                new Word64(770255983, 1495990901),
 48270                new Word64(1249150122, 1856431235),
 48271                new Word64(1555081692, 3175218132),
 48272                new Word64(1996064986, 2198950837),
 48273                new Word64(2554220882, 3999719339),
 48274                new Word64(2821834349, 766784016),
 48275                new Word64(2952996808, 2566594879),
 48276                new Word64(3210313671, 3203337956),
 48277                new Word64(3336571891, 1034457026),
 48278                new Word64(3584528711, 2466948901),
 48279                new Word64(113926993, 3758326383),
 48280                new Word64(338241895, 168717936),
 48281                new Word64(666307205, 1188179964),
 48282                new Word64(773529912, 1546045734),
 48283                new Word64(1294757372, 1522805485),
 48284                new Word64(1396182291, 2643833823),
 48285                new Word64(1695183700, 2343527390),
 48286                new Word64(1986661051, 1014477480),
 48287                new Word64(2177026350, 1206759142),
 48288                new Word64(2456956037, 344077627),
 48289                new Word64(2730485921, 1290863460),
 48290                new Word64(2820302411, 3158454273),
 48291                new Word64(3259730800, 3505952657),
 48292                new Word64(3345764771, 106217008),
 48293                new Word64(3516065817, 3606008344),
 48294                new Word64(3600352804, 1432725776),
 48295                new Word64(4094571909, 1467031594),
 48296                new Word64(275423344, 851169720),
 48297                new Word64(430227734, 3100823752),
 48298                new Word64(506948616, 1363258195),
 48299                new Word64(659060556, 3750685593),
 48300                new Word64(883997877, 3785050280),
 48301                new Word64(958139571, 3318307427),
 48302                new Word64(1322822218, 3812723403),
 48303                new Word64(1537002063, 2003034995),
 48304                new Word64(1747873779, 3602036899),
 48305                new Word64(1955562222, 1575990012),
 48306                new Word64(2024104815, 1125592928),
 48307                new Word64(2227730452, 2716904306),
 48308                new Word64(2361852424, 442776044),
 48309                new Word64(2428436474, 593698344),
 48310                new Word64(2756734187, 3733110249),
 48311                new Word64(3204031479, 2999351573),
 48312                new Word64(3329325298, 3815920427),
 48313                new Word64(3391569614, 3928383900),
 48314                new Word64(3515267271, 566280711),
 48315                new Word64(3940187606, 3454069534),
 48316                new Word64(4118630271, 4000239992),
 48317                new Word64(116418474, 1914138554),
 48318                new Word64(174292421, 2731055270),
 48319                new Word64(289380356, 3203993006),
 48320                new Word64(460393269, 320620315),
 48321                new Word64(685471733, 587496836),
 48322                new Word64(852142971, 1086792851),
 48323                new Word64(1017036298, 365543100),
 48324                new Word64(1126000580, 2618297676),
 48325                new Word64(1288033470, 3409855158),
 48326                new Word64(1501505948, 4234509866),
 48327                new Word64(1607167915, 987167468),
 48328                new Word64(1816402316, 1246189591),
 48329              ];
 48330              return function hash(t, a, r, n = !1) {
 48331                let i, s, o, c, l, h, u, d;
 48332                if (n) {
 48333                  i = new Word64(3418070365, 3238371032);
 48334                  s = new Word64(1654270250, 914150663);
 48335                  o = new Word64(2438529370, 812702999);
 48336                  c = new Word64(355462360, 4144912697);
 48337                  l = new Word64(1731405415, 4290775857);
 48338                  h = new Word64(2394180231, 1750603025);
 48339                  u = new Word64(3675008525, 1694076839);
 48340                  d = new Word64(1203062813, 3204075428);
 48341                } else {
 48342                  i = new Word64(1779033703, 4089235720);
 48343                  s = new Word64(3144134277, 2227873595);
 48344                  o = new Word64(1013904242, 4271175723);
 48345                  c = new Word64(2773480762, 1595750129);
 48346                  l = new Word64(1359893119, 2917565137);
 48347                  h = new Word64(2600822924, 725511199);
 48348                  u = new Word64(528734635, 4215389547);
 48349                  d = new Word64(1541459225, 327033209);
 48350                }
 48351                const f = 128 * Math.ceil((r + 17) / 128),
 48352                  g = new Uint8Array(f);
 48353                let p, m;
 48354                for (p = 0; p < r; ++p) g[p] = t[a++];
 48355                g[p++] = 128;
 48356                const b = f - 16;
 48357                for (; p < b; ) g[p++] = 0;
 48358                g[p++] = 0;
 48359                g[p++] = 0;
 48360                g[p++] = 0;
 48361                g[p++] = 0;
 48362                g[p++] = 0;
 48363                g[p++] = 0;
 48364                g[p++] = 0;
 48365                g[p++] = 0;
 48366                g[p++] = 0;
 48367                g[p++] = 0;
 48368                g[p++] = 0;
 48369                g[p++] = (r >>> 29) & 255;
 48370                g[p++] = (r >> 21) & 255;
 48371                g[p++] = (r >> 13) & 255;
 48372                g[p++] = (r >> 5) & 255;
 48373                g[p++] = (r << 3) & 255;
 48374                const y = new Array(80);
 48375                for (p = 0; p < 80; p++) y[p] = new Word64(0, 0);
 48376                let w = new Word64(0, 0),
 48377                  S = new Word64(0, 0),
 48378                  x = new Word64(0, 0),
 48379                  C = new Word64(0, 0),
 48380                  k = new Word64(0, 0),
 48381                  v = new Word64(0, 0),
 48382                  F = new Word64(0, 0),
 48383                  O = new Word64(0, 0);
 48384                const T = new Word64(0, 0),
 48385                  M = new Word64(0, 0),
 48386                  D = new Word64(0, 0),
 48387                  E = new Word64(0, 0);
 48388                let N, R;
 48389                for (p = 0; p < f; ) {
 48390                  for (m = 0; m < 16; ++m) {
 48391                    y[m].high =
 48392                      (g[p] << 24) |
 48393                      (g[p + 1] << 16) |
 48394                      (g[p + 2] << 8) |
 48395                      g[p + 3];
 48396                    y[m].low =
 48397                      (g[p + 4] << 24) |
 48398                      (g[p + 5] << 16) |
 48399                      (g[p + 6] << 8) |
 48400                      g[p + 7];
 48401                    p += 8;
 48402                  }
 48403                  for (m = 16; m < 80; ++m) {
 48404                    N = y[m];
 48405                    littleSigmaPrime(N, y[m - 2], E);
 48406                    N.add(y[m - 7]);
 48407                    littleSigma(D, y[m - 15], E);
 48408                    N.add(D);
 48409                    N.add(y[m - 16]);
 48410                  }
 48411                  w.assign(i);
 48412                  S.assign(s);
 48413                  x.assign(o);
 48414                  C.assign(c);
 48415                  k.assign(l);
 48416                  v.assign(h);
 48417                  F.assign(u);
 48418                  O.assign(d);
 48419                  for (m = 0; m < 80; ++m) {
 48420                    T.assign(O);
 48421                    sigmaPrime(D, k, E);
 48422                    T.add(D);
 48423                    ch(D, k, v, F, E);
 48424                    T.add(D);
 48425                    T.add(e[m]);
 48426                    T.add(y[m]);
 48427                    sigma(M, w, E);
 48428                    maj(D, w, S, x, E);
 48429                    M.add(D);
 48430                    N = O;
 48431                    O = F;
 48432                    F = v;
 48433                    v = k;
 48434                    C.add(T);
 48435                    k = C;
 48436                    C = x;
 48437                    x = S;
 48438                    S = w;
 48439                    N.assign(T);
 48440                    N.add(M);
 48441                    w = N;
 48442                  }
 48443                  i.add(w);
 48444                  s.add(S);
 48445                  o.add(x);
 48446                  c.add(C);
 48447                  l.add(k);
 48448                  h.add(v);
 48449                  u.add(F);
 48450                  d.add(O);
 48451                }
 48452                if (n) {
 48453                  R = new Uint8Array(48);
 48454                  i.copyTo(R, 0);
 48455                  s.copyTo(R, 8);
 48456                  o.copyTo(R, 16);
 48457                  c.copyTo(R, 24);
 48458                  l.copyTo(R, 32);
 48459                  h.copyTo(R, 40);
 48460                } else {
 48461                  R = new Uint8Array(64);
 48462                  i.copyTo(R, 0);
 48463                  s.copyTo(R, 8);
 48464                  o.copyTo(R, 16);
 48465                  c.copyTo(R, 24);
 48466                  l.copyTo(R, 32);
 48467                  h.copyTo(R, 40);
 48468                  u.copyTo(R, 48);
 48469                  d.copyTo(R, 56);
 48470                }
 48471                return R;
 48472              };
 48473            })();
 48474            t.calculateSHA512 = c;
 48475            function calculateSHA384(e, t, a) {
 48476              return c(e, t, a, !0);
 48477            }
 48478            class NullCipher {
 48479              decryptBlock(e) {
 48480                return e;
 48481              }
 48482              encrypt(e) {
 48483                return e;
 48484              }
 48485            }
 48486            class AESBaseCipher {
 48487              constructor() {
 48488                this.constructor === AESBaseCipher &&
 48489                  (0, r.unreachable)("Cannot initialize AESBaseCipher.");
 48490                this._s = new Uint8Array([
 48491                  99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215,
 48492                  171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162,
 48493                  175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204,
 48494                  52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150,
 48495                  5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27,
 48496                  110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0,
 48497                  237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208,
 48498                  239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159,
 48499                  168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16,
 48500                  255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126,
 48501                  61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70,
 48502                  238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92,
 48503                  194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141,
 48504                  213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37,
 48505                  46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138,
 48506                  112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193,
 48507                  29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135,
 48508                  233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65,
 48509                  153, 45, 15, 176, 84, 187, 22,
 48510                ]);
 48511                this._inv_s = new Uint8Array([
 48512                  82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243,
 48513                  215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68,
 48514                  196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76,
 48515                  149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178,
 48516                  118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134,
 48517                  104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112,
 48518                  72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132,
 48519                  144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179,
 48520                  69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1,
 48521                  19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207,
 48522                  206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133,
 48523                  226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41,
 48524                  197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75,
 48525                  198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31,
 48526                  221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236,
 48527                  95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147,
 48528                  201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235,
 48529                  187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38,
 48530                  225, 105, 20, 99, 85, 33, 12, 125,
 48531                ]);
 48532                this._mix = new Uint32Array([
 48533                  0, 235474187, 470948374, 303765277, 941896748, 908933415,
 48534                  607530554, 708780849, 1883793496, 2118214995, 1817866830,
 48535                  1649639237, 1215061108, 1181045119, 1417561698, 1517767529,
 48536                  3767586992, 4003061179, 4236429990, 4069246893, 3635733660,
 48537                  3602770327, 3299278474, 3400528769, 2430122216, 2664543715,
 48538                  2362090238, 2193862645, 2835123396, 2801107407, 3035535058,
 48539                  3135740889, 3678124923, 3576870512, 3341394285, 3374361702,
 48540                  3810496343, 3977675356, 4279080257, 4043610186, 2876494627,
 48541                  2776292904, 3076639029, 3110650942, 2472011535, 2640243204,
 48542                  2403728665, 2169303058, 1001089995, 899835584, 666464733,
 48543                  699432150, 59727847, 226906860, 530400753, 294930682,
 48544                  1273168787, 1172967064, 1475418501, 1509430414, 1942435775,
 48545                  2110667444, 1876241833, 1641816226, 2910219766, 2743034109,
 48546                  2976151520, 3211623147, 2505202138, 2606453969, 2302690252,
 48547                  2269728455, 3711829422, 3543599269, 3240894392, 3475313331,
 48548                  3843699074, 3943906441, 4178062228, 4144047775, 1306967366,
 48549                  1139781709, 1374988112, 1610459739, 1975683434, 2076935265,
 48550                  1775276924, 1742315127, 1034867998, 866637845, 566021896,
 48551                  800440835, 92987698, 193195065, 429456164, 395441711,
 48552                  1984812685, 2017778566, 1784663195, 1683407248, 1315562145,
 48553                  1080094634, 1383856311, 1551037884, 101039829, 135050206,
 48554                  437757123, 337553864, 1042385657, 807962610, 573804783,
 48555                  742039012, 2531067453, 2564033334, 2328828971, 2227573024,
 48556                  2935566865, 2700099354, 3001755655, 3168937228, 3868552805,
 48557                  3902563182, 4203181171, 4102977912, 3736164937, 3501741890,
 48558                  3265478751, 3433712980, 1106041591, 1340463100, 1576976609,
 48559                  1408749034, 2043211483, 2009195472, 1708848333, 1809054150,
 48560                  832877231, 1068351396, 766945465, 599762354, 159417987,
 48561                  126454664, 361929877, 463180190, 2709260871, 2943682380,
 48562                  3178106961, 3009879386, 2572697195, 2538681184, 2236228733,
 48563                  2336434550, 3509871135, 3745345300, 3441850377, 3274667266,
 48564                  3910161971, 3877198648, 4110568485, 4211818798, 2597806476,
 48565                  2497604743, 2261089178, 2295101073, 2733856160, 2902087851,
 48566                  3202437046, 2968011453, 3936291284, 3835036895, 4136440770,
 48567                  4169408201, 3535486456, 3702665459, 3467192302, 3231722213,
 48568                  2051518780, 1951317047, 1716890410, 1750902305, 1113818384,
 48569                  1282050075, 1584504582, 1350078989, 168810852, 67556463,
 48570                  371049330, 404016761, 841739592, 1008918595, 775550814,
 48571                  540080725, 3969562369, 3801332234, 4035489047, 4269907996,
 48572                  3569255213, 3669462566, 3366754619, 3332740144, 2631065433,
 48573                  2463879762, 2160117071, 2395588676, 2767645557, 2868897406,
 48574                  3102011747, 3069049960, 202008497, 33778362, 270040487,
 48575                  504459436, 875451293, 975658646, 675039627, 641025152,
 48576                  2084704233, 1917518562, 1615861247, 1851332852, 1147550661,
 48577                  1248802510, 1484005843, 1451044056, 933301370, 967311729,
 48578                  733156972, 632953703, 260388950, 25965917, 328671808, 496906059,
 48579                  1206477858, 1239443753, 1543208500, 1441952575, 2144161806,
 48580                  1908694277, 1675577880, 1842759443, 3610369226, 3644379585,
 48581                  3408119516, 3307916247, 4011190502, 3776767469, 4077384432,
 48582                  4245618683, 2809771154, 2842737049, 3144396420, 3043140495,
 48583                  2673705150, 2438237621, 2203032232, 2370213795,
 48584                ]);
 48585                this._mixCol = new Uint8Array(256);
 48586                for (let e = 0; e < 256; e++)
 48587                  this._mixCol[e] = e < 128 ? e << 1 : (e << 1) ^ 27;
 48588                this.buffer = new Uint8Array(16);
 48589                this.bufferPosition = 0;
 48590              }
 48591              _expandKey(e) {
 48592                (0, r.unreachable)("Cannot call `_expandKey` on the base class");
 48593              }
 48594              _decrypt(e, t) {
 48595                let a, r, n;
 48596                const i = new Uint8Array(16);
 48597                i.set(e);
 48598                for (let e = 0, a = this._keySize; e < 16; ++e, ++a) i[e] ^= t[a];
 48599                for (let e = this._cyclesOfRepetition - 1; e >= 1; --e) {
 48600                  a = i[13];
 48601                  i[13] = i[9];
 48602                  i[9] = i[5];
 48603                  i[5] = i[1];
 48604                  i[1] = a;
 48605                  a = i[14];
 48606                  r = i[10];
 48607                  i[14] = i[6];
 48608                  i[10] = i[2];
 48609                  i[6] = a;
 48610                  i[2] = r;
 48611                  a = i[15];
 48612                  r = i[11];
 48613                  n = i[7];
 48614                  i[15] = i[3];
 48615                  i[11] = a;
 48616                  i[7] = r;
 48617                  i[3] = n;
 48618                  for (let e = 0; e < 16; ++e) i[e] = this._inv_s[i[e]];
 48619                  for (let a = 0, r = 16 * e; a < 16; ++a, ++r) i[a] ^= t[r];
 48620                  for (let e = 0; e < 16; e += 4) {
 48621                    const t = this._mix[i[e]],
 48622                      r = this._mix[i[e + 1]],
 48623                      n = this._mix[i[e + 2]],
 48624                      s = this._mix[i[e + 3]];
 48625                    a =
 48626                      t ^
 48627                      (r >>> 8) ^
 48628                      (r << 24) ^
 48629                      (n >>> 16) ^
 48630                      (n << 16) ^
 48631                      (s >>> 24) ^
 48632                      (s << 8);
 48633                    i[e] = (a >>> 24) & 255;
 48634                    i[e + 1] = (a >> 16) & 255;
 48635                    i[e + 2] = (a >> 8) & 255;
 48636                    i[e + 3] = 255 & a;
 48637                  }
 48638                }
 48639                a = i[13];
 48640                i[13] = i[9];
 48641                i[9] = i[5];
 48642                i[5] = i[1];
 48643                i[1] = a;
 48644                a = i[14];
 48645                r = i[10];
 48646                i[14] = i[6];
 48647                i[10] = i[2];
 48648                i[6] = a;
 48649                i[2] = r;
 48650                a = i[15];
 48651                r = i[11];
 48652                n = i[7];
 48653                i[15] = i[3];
 48654                i[11] = a;
 48655                i[7] = r;
 48656                i[3] = n;
 48657                for (let e = 0; e < 16; ++e) {
 48658                  i[e] = this._inv_s[i[e]];
 48659                  i[e] ^= t[e];
 48660                }
 48661                return i;
 48662              }
 48663              _encrypt(e, t) {
 48664                const a = this._s;
 48665                let r, n, i;
 48666                const s = new Uint8Array(16);
 48667                s.set(e);
 48668                for (let e = 0; e < 16; ++e) s[e] ^= t[e];
 48669                for (let e = 1; e < this._cyclesOfRepetition; e++) {
 48670                  for (let e = 0; e < 16; ++e) s[e] = a[s[e]];
 48671                  i = s[1];
 48672                  s[1] = s[5];
 48673                  s[5] = s[9];
 48674                  s[9] = s[13];
 48675                  s[13] = i;
 48676                  i = s[2];
 48677                  n = s[6];
 48678                  s[2] = s[10];
 48679                  s[6] = s[14];
 48680                  s[10] = i;
 48681                  s[14] = n;
 48682                  i = s[3];
 48683                  n = s[7];
 48684                  r = s[11];
 48685                  s[3] = s[15];
 48686                  s[7] = i;
 48687                  s[11] = n;
 48688                  s[15] = r;
 48689                  for (let e = 0; e < 16; e += 4) {
 48690                    const t = s[e + 0],
 48691                      a = s[e + 1],
 48692                      n = s[e + 2],
 48693                      i = s[e + 3];
 48694                    r = t ^ a ^ n ^ i;
 48695                    s[e + 0] ^= r ^ this._mixCol[t ^ a];
 48696                    s[e + 1] ^= r ^ this._mixCol[a ^ n];
 48697                    s[e + 2] ^= r ^ this._mixCol[n ^ i];
 48698                    s[e + 3] ^= r ^ this._mixCol[i ^ t];
 48699                  }
 48700                  for (let a = 0, r = 16 * e; a < 16; ++a, ++r) s[a] ^= t[r];
 48701                }
 48702                for (let e = 0; e < 16; ++e) s[e] = a[s[e]];
 48703                i = s[1];
 48704                s[1] = s[5];
 48705                s[5] = s[9];
 48706                s[9] = s[13];
 48707                s[13] = i;
 48708                i = s[2];
 48709                n = s[6];
 48710                s[2] = s[10];
 48711                s[6] = s[14];
 48712                s[10] = i;
 48713                s[14] = n;
 48714                i = s[3];
 48715                n = s[7];
 48716                r = s[11];
 48717                s[3] = s[15];
 48718                s[7] = i;
 48719                s[11] = n;
 48720                s[15] = r;
 48721                for (let e = 0, a = this._keySize; e < 16; ++e, ++a) s[e] ^= t[a];
 48722                return s;
 48723              }
 48724              _decryptBlock2(e, t) {
 48725                const a = e.length;
 48726                let r = this.buffer,
 48727                  n = this.bufferPosition;
 48728                const i = [];
 48729                let s = this.iv;
 48730                for (let t = 0; t < a; ++t) {
 48731                  r[n] = e[t];
 48732                  ++n;
 48733                  if (n < 16) continue;
 48734                  const a = this._decrypt(r, this._key);
 48735                  for (let e = 0; e < 16; ++e) a[e] ^= s[e];
 48736                  s = r;
 48737                  i.push(a);
 48738                  r = new Uint8Array(16);
 48739                  n = 0;
 48740                }
 48741                this.buffer = r;
 48742                this.bufferLength = n;
 48743                this.iv = s;
 48744                if (0 === i.length) return new Uint8Array(0);
 48745                let o = 16 * i.length;
 48746                if (t) {
 48747                  const e = i.at(-1);
 48748                  let t = e[15];
 48749                  if (t <= 16) {
 48750                    for (let a = 15, r = 16 - t; a >= r; --a)
 48751                      if (e[a] !== t) {
 48752                        t = 0;
 48753                        break;
 48754                      }
 48755                    o -= t;
 48756                    i[i.length - 1] = e.subarray(0, 16 - t);
 48757                  }
 48758                }
 48759                const c = new Uint8Array(o);
 48760                for (let e = 0, t = 0, a = i.length; e < a; ++e, t += 16)
 48761                  c.set(i[e], t);
 48762                return c;
 48763              }
 48764              decryptBlock(e, t, a = null) {
 48765                const r = e.length,
 48766                  n = this.buffer;
 48767                let i = this.bufferPosition;
 48768                if (a) this.iv = a;
 48769                else {
 48770                  for (let t = 0; i < 16 && t < r; ++t, ++i) n[i] = e[t];
 48771                  if (i < 16) {
 48772                    this.bufferLength = i;
 48773                    return new Uint8Array(0);
 48774                  }
 48775                  this.iv = n;
 48776                  e = e.subarray(16);
 48777                }
 48778                this.buffer = new Uint8Array(16);
 48779                this.bufferLength = 0;
 48780                this.decryptBlock = this._decryptBlock2;
 48781                return this.decryptBlock(e, t);
 48782              }
 48783              encrypt(e, t) {
 48784                const a = e.length;
 48785                let r = this.buffer,
 48786                  n = this.bufferPosition;
 48787                const i = [];
 48788                t || (t = new Uint8Array(16));
 48789                for (let s = 0; s < a; ++s) {
 48790                  r[n] = e[s];
 48791                  ++n;
 48792                  if (n < 16) continue;
 48793                  for (let e = 0; e < 16; ++e) r[e] ^= t[e];
 48794                  const a = this._encrypt(r, this._key);
 48795                  t = a;
 48796                  i.push(a);
 48797                  r = new Uint8Array(16);
 48798                  n = 0;
 48799                }
 48800                this.buffer = r;
 48801                this.bufferLength = n;
 48802                this.iv = t;
 48803                if (0 === i.length) return new Uint8Array(0);
 48804                const s = 16 * i.length,
 48805                  o = new Uint8Array(s);
 48806                for (let e = 0, t = 0, a = i.length; e < a; ++e, t += 16)
 48807                  o.set(i[e], t);
 48808                return o;
 48809              }
 48810            }
 48811            class AES128Cipher extends AESBaseCipher {
 48812              constructor(e) {
 48813                super();
 48814                this._cyclesOfRepetition = 10;
 48815                this._keySize = 160;
 48816                this._rcon = new Uint8Array([
 48817                  141, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77,
 48818                  154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250,
 48819                  239, 197, 145, 57, 114, 228, 211, 189, 97, 194, 159, 37, 74,
 48820                  148, 51, 102, 204, 131, 29, 58, 116, 232, 203, 141, 1, 2, 4, 8,
 48821                  16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188,
 48822                  99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145, 57,
 48823                  114, 228, 211, 189, 97, 194, 159, 37, 74, 148, 51, 102, 204,
 48824                  131, 29, 58, 116, 232, 203, 141, 1, 2, 4, 8, 16, 32, 64, 128,
 48825                  27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53,
 48826                  106, 212, 179, 125, 250, 239, 197, 145, 57, 114, 228, 211, 189,
 48827                  97, 194, 159, 37, 74, 148, 51, 102, 204, 131, 29, 58, 116, 232,
 48828                  203, 141, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171,
 48829                  77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250,
 48830                  239, 197, 145, 57, 114, 228, 211, 189, 97, 194, 159, 37, 74,
 48831                  148, 51, 102, 204, 131, 29, 58, 116, 232, 203, 141, 1, 2, 4, 8,
 48832                  16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188,
 48833                  99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145, 57,
 48834                  114, 228, 211, 189, 97, 194, 159, 37, 74, 148, 51, 102, 204,
 48835                  131, 29, 58, 116, 232, 203, 141,
 48836                ]);
 48837                this._key = this._expandKey(e);
 48838              }
 48839              _expandKey(e) {
 48840                const t = this._s,
 48841                  a = this._rcon,
 48842                  r = new Uint8Array(176);
 48843                r.set(e);
 48844                for (let e = 16, n = 1; e < 176; ++n) {
 48845                  let i = r[e - 3],
 48846                    s = r[e - 2],
 48847                    o = r[e - 1],
 48848                    c = r[e - 4];
 48849                  i = t[i];
 48850                  s = t[s];
 48851                  o = t[o];
 48852                  c = t[c];
 48853                  i ^= a[n];
 48854                  for (let t = 0; t < 4; ++t) {
 48855                    r[e] = i ^= r[e - 16];
 48856                    e++;
 48857                    r[e] = s ^= r[e - 16];
 48858                    e++;
 48859                    r[e] = o ^= r[e - 16];
 48860                    e++;
 48861                    r[e] = c ^= r[e - 16];
 48862                    e++;
 48863                  }
 48864                }
 48865                return r;
 48866              }
 48867            }
 48868            t.AES128Cipher = AES128Cipher;
 48869            class AES256Cipher extends AESBaseCipher {
 48870              constructor(e) {
 48871                super();
 48872                this._cyclesOfRepetition = 14;
 48873                this._keySize = 224;
 48874                this._key = this._expandKey(e);
 48875              }
 48876              _expandKey(e) {
 48877                const t = this._s,
 48878                  a = new Uint8Array(240);
 48879                a.set(e);
 48880                let r,
 48881                  n,
 48882                  i,
 48883                  s,
 48884                  o = 1;
 48885                for (let e = 32, c = 1; e < 240; ++c) {
 48886                  if (e % 32 == 16) {
 48887                    r = t[r];
 48888                    n = t[n];
 48889                    i = t[i];
 48890                    s = t[s];
 48891                  } else if (e % 32 == 0) {
 48892                    r = a[e - 3];
 48893                    n = a[e - 2];
 48894                    i = a[e - 1];
 48895                    s = a[e - 4];
 48896                    r = t[r];
 48897                    n = t[n];
 48898                    i = t[i];
 48899                    s = t[s];
 48900                    r ^= o;
 48901                    (o <<= 1) >= 256 && (o = 255 & (27 ^ o));
 48902                  }
 48903                  for (let t = 0; t < 4; ++t) {
 48904                    a[e] = r ^= a[e - 32];
 48905                    e++;
 48906                    a[e] = n ^= a[e - 32];
 48907                    e++;
 48908                    a[e] = i ^= a[e - 32];
 48909                    e++;
 48910                    a[e] = s ^= a[e - 32];
 48911                    e++;
 48912                  }
 48913                }
 48914                return a;
 48915              }
 48916            }
 48917            t.AES256Cipher = AES256Cipher;
 48918            class PDF17 {
 48919              checkOwnerPassword(e, t, a, n) {
 48920                const i = new Uint8Array(e.length + 56);
 48921                i.set(e, 0);
 48922                i.set(t, e.length);
 48923                i.set(a, e.length + t.length);
 48924                const s = o(i, 0, i.length);
 48925                return (0, r.isArrayEqual)(s, n);
 48926              }
 48927              checkUserPassword(e, t, a) {
 48928                const n = new Uint8Array(e.length + 8);
 48929                n.set(e, 0);
 48930                n.set(t, e.length);
 48931                const i = o(n, 0, n.length);
 48932                return (0, r.isArrayEqual)(i, a);
 48933              }
 48934              getOwnerKey(e, t, a, r) {
 48935                const n = new Uint8Array(e.length + 56);
 48936                n.set(e, 0);
 48937                n.set(t, e.length);
 48938                n.set(a, e.length + t.length);
 48939                const i = o(n, 0, n.length);
 48940                return new AES256Cipher(i).decryptBlock(
 48941                  r,
 48942                  !1,
 48943                  new Uint8Array(16),
 48944                );
 48945              }
 48946              getUserKey(e, t, a) {
 48947                const r = new Uint8Array(e.length + 8);
 48948                r.set(e, 0);
 48949                r.set(t, e.length);
 48950                const n = o(r, 0, r.length);
 48951                return new AES256Cipher(n).decryptBlock(
 48952                  a,
 48953                  !1,
 48954                  new Uint8Array(16),
 48955                );
 48956              }
 48957            }
 48958            t.PDF17 = PDF17;
 48959            class PDF20 {
 48960              _hash(e, t, a) {
 48961                let r = o(t, 0, t.length).subarray(0, 32),
 48962                  n = [0],
 48963                  i = 0;
 48964                for (; i < 64 || n.at(-1) > i - 32; ) {
 48965                  const t = e.length + r.length + a.length,
 48966                    s = new Uint8Array(t);
 48967                  let l = 0;
 48968                  s.set(e, l);
 48969                  l += e.length;
 48970                  s.set(r, l);
 48971                  l += r.length;
 48972                  s.set(a, l);
 48973                  const h = new Uint8Array(64 * t);
 48974                  for (let e = 0, a = 0; e < 64; e++, a += t) h.set(s, a);
 48975                  n = new AES128Cipher(r.subarray(0, 16)).encrypt(
 48976                    h,
 48977                    r.subarray(16, 32),
 48978                  );
 48979                  const u = n.slice(0, 16).reduce((e, t) => e + t, 0) % 3;
 48980                  0 === u
 48981                    ? (r = o(n, 0, n.length))
 48982                    : 1 === u
 48983                      ? (r = calculateSHA384(n, 0, n.length))
 48984                      : 2 === u && (r = c(n, 0, n.length));
 48985                  i++;
 48986                }
 48987                return r.subarray(0, 32);
 48988              }
 48989              checkOwnerPassword(e, t, a, n) {
 48990                const i = new Uint8Array(e.length + 56);
 48991                i.set(e, 0);
 48992                i.set(t, e.length);
 48993                i.set(a, e.length + t.length);
 48994                const s = this._hash(e, i, a);
 48995                return (0, r.isArrayEqual)(s, n);
 48996              }
 48997              checkUserPassword(e, t, a) {
 48998                const n = new Uint8Array(e.length + 8);
 48999                n.set(e, 0);
 49000                n.set(t, e.length);
 49001                const i = this._hash(e, n, []);
 49002                return (0, r.isArrayEqual)(i, a);
 49003              }
 49004              getOwnerKey(e, t, a, r) {
 49005                const n = new Uint8Array(e.length + 56);
 49006                n.set(e, 0);
 49007                n.set(t, e.length);
 49008                n.set(a, e.length + t.length);
 49009                const i = this._hash(e, n, a);
 49010                return new AES256Cipher(i).decryptBlock(
 49011                  r,
 49012                  !1,
 49013                  new Uint8Array(16),
 49014                );
 49015              }
 49016              getUserKey(e, t, a) {
 49017                const r = new Uint8Array(e.length + 8);
 49018                r.set(e, 0);
 49019                r.set(t, e.length);
 49020                const n = this._hash(e, r, []);
 49021                return new AES256Cipher(n).decryptBlock(
 49022                  a,
 49023                  !1,
 49024                  new Uint8Array(16),
 49025                );
 49026              }
 49027            }
 49028            t.PDF20 = PDF20;
 49029            class CipherTransform {
 49030              constructor(e, t) {
 49031                this.StringCipherConstructor = e;
 49032                this.StreamCipherConstructor = t;
 49033              }
 49034              createStream(e, t) {
 49035                const a = new this.StreamCipherConstructor();
 49036                return new i.DecryptStream(
 49037                  e,
 49038                  t,
 49039                  function cipherTransformDecryptStream(e, t) {
 49040                    return a.decryptBlock(e, t);
 49041                  },
 49042                );
 49043              }
 49044              decryptString(e) {
 49045                const t = new this.StringCipherConstructor();
 49046                let a = (0, r.stringToBytes)(e);
 49047                a = t.decryptBlock(a, !0);
 49048                return (0, r.bytesToString)(a);
 49049              }
 49050              encryptString(e) {
 49051                const t = new this.StringCipherConstructor();
 49052                if (t instanceof AESBaseCipher) {
 49053                  const a = 16 - (e.length % 16);
 49054                  e += String.fromCharCode(a).repeat(a);
 49055                  const n = new Uint8Array(16);
 49056                  if ("undefined" != typeof crypto) crypto.getRandomValues(n);
 49057                  else
 49058                    for (let e = 0; e < 16; e++)
 49059                      n[e] = Math.floor(256 * Math.random());
 49060                  let i = (0, r.stringToBytes)(e);
 49061                  i = t.encrypt(i, n);
 49062                  const s = new Uint8Array(16 + i.length);
 49063                  s.set(n);
 49064                  s.set(i, 16);
 49065                  return (0, r.bytesToString)(s);
 49066                }
 49067                let a = (0, r.stringToBytes)(e);
 49068                a = t.encrypt(a);
 49069                return (0, r.bytesToString)(a);
 49070              }
 49071            }
 49072            class CipherTransformFactory {
 49073              static #O = new Uint8Array([
 49074                40, 191, 78, 94, 78, 117, 138, 65, 100, 0, 78, 86, 255, 250, 1, 8,
 49075                46, 46, 0, 182, 208, 104, 62, 128, 47, 12, 169, 254, 100, 83, 105,
 49076                122,
 49077              ]);
 49078              #I(e, t, a, r, n, i, s, o, c, l, h, u) {
 49079                if (t) {
 49080                  const e = Math.min(127, t.length);
 49081                  t = t.subarray(0, e);
 49082                } else t = [];
 49083                const d = 6 === e ? new PDF20() : new PDF17();
 49084                return d.checkUserPassword(t, o, s)
 49085                  ? d.getUserKey(t, c, h)
 49086                  : t.length && d.checkOwnerPassword(t, r, i, a)
 49087                    ? d.getOwnerKey(t, n, i, l)
 49088                    : null;
 49089              }
 49090              #T(e, t, a, r, n, i, o, c) {
 49091                const l = 40 + a.length + e.length,
 49092                  h = new Uint8Array(l);
 49093                let u,
 49094                  d,
 49095                  f = 0;
 49096                if (t) {
 49097                  d = Math.min(32, t.length);
 49098                  for (; f < d; ++f) h[f] = t[f];
 49099                }
 49100                u = 0;
 49101                for (; f < 32; ) h[f++] = CipherTransformFactory.#O[u++];
 49102                for (u = 0, d = a.length; u < d; ++u) h[f++] = a[u];
 49103                h[f++] = 255 & n;
 49104                h[f++] = (n >> 8) & 255;
 49105                h[f++] = (n >> 16) & 255;
 49106                h[f++] = (n >>> 24) & 255;
 49107                for (u = 0, d = e.length; u < d; ++u) h[f++] = e[u];
 49108                if (i >= 4 && !c) {
 49109                  h[f++] = 255;
 49110                  h[f++] = 255;
 49111                  h[f++] = 255;
 49112                  h[f++] = 255;
 49113                }
 49114                let g = s(h, 0, f);
 49115                const p = o >> 3;
 49116                if (i >= 3) for (u = 0; u < 50; ++u) g = s(g, 0, p);
 49117                const m = g.subarray(0, p);
 49118                let b, y;
 49119                if (i >= 3) {
 49120                  for (f = 0; f < 32; ++f) h[f] = CipherTransformFactory.#O[f];
 49121                  for (u = 0, d = e.length; u < d; ++u) h[f++] = e[u];
 49122                  b = new ARCFourCipher(m);
 49123                  y = b.encryptBlock(s(h, 0, f));
 49124                  d = m.length;
 49125                  const t = new Uint8Array(d);
 49126                  for (u = 1; u <= 19; ++u) {
 49127                    for (let e = 0; e < d; ++e) t[e] = m[e] ^ u;
 49128                    b = new ARCFourCipher(t);
 49129                    y = b.encryptBlock(y);
 49130                  }
 49131                  for (u = 0, d = y.length; u < d; ++u)
 49132                    if (r[u] !== y[u]) return null;
 49133                } else {
 49134                  b = new ARCFourCipher(m);
 49135                  y = b.encryptBlock(CipherTransformFactory.#O);
 49136                  for (u = 0, d = y.length; u < d; ++u)
 49137                    if (r[u] !== y[u]) return null;
 49138                }
 49139                return m;
 49140              }
 49141              #M(e, t, a, r) {
 49142                const n = new Uint8Array(32);
 49143                let i = 0;
 49144                const o = Math.min(32, e.length);
 49145                for (; i < o; ++i) n[i] = e[i];
 49146                let c = 0;
 49147                for (; i < 32; ) n[i++] = CipherTransformFactory.#O[c++];
 49148                let l = s(n, 0, i);
 49149                const h = r >> 3;
 49150                if (a >= 3) for (c = 0; c < 50; ++c) l = s(l, 0, l.length);
 49151                let u, d;
 49152                if (a >= 3) {
 49153                  d = t;
 49154                  const e = new Uint8Array(h);
 49155                  for (c = 19; c >= 0; c--) {
 49156                    for (let t = 0; t < h; ++t) e[t] = l[t] ^ c;
 49157                    u = new ARCFourCipher(e);
 49158                    d = u.encryptBlock(d);
 49159                  }
 49160                } else {
 49161                  u = new ARCFourCipher(l.subarray(0, h));
 49162                  d = u.encryptBlock(t);
 49163                }
 49164                return d;
 49165              }
 49166              #P(e, t, a, r = !1) {
 49167                const n = new Uint8Array(a.length + 9),
 49168                  i = a.length;
 49169                let o;
 49170                for (o = 0; o < i; ++o) n[o] = a[o];
 49171                n[o++] = 255 & e;
 49172                n[o++] = (e >> 8) & 255;
 49173                n[o++] = (e >> 16) & 255;
 49174                n[o++] = 255 & t;
 49175                n[o++] = (t >> 8) & 255;
 49176                if (r) {
 49177                  n[o++] = 115;
 49178                  n[o++] = 65;
 49179                  n[o++] = 108;
 49180                  n[o++] = 84;
 49181                }
 49182                return s(n, 0, o).subarray(0, Math.min(a.length + 5, 16));
 49183              }
 49184              #D(e, t, a, i, s) {
 49185                if (!(t instanceof n.Name))
 49186                  throw new r.FormatError("Invalid crypt filter name.");
 49187                const o = this,
 49188                  c = e.get(t.name),
 49189                  l = c?.get("CFM");
 49190                if (!l || "None" === l.name)
 49191                  return function () {
 49192                    return new NullCipher();
 49193                  };
 49194                if ("V2" === l.name)
 49195                  return function () {
 49196                    return new ARCFourCipher(o.#P(a, i, s, !1));
 49197                  };
 49198                if ("AESV2" === l.name)
 49199                  return function () {
 49200                    return new AES128Cipher(o.#P(a, i, s, !0));
 49201                  };
 49202                if ("AESV3" === l.name)
 49203                  return function () {
 49204                    return new AES256Cipher(s);
 49205                  };
 49206                throw new r.FormatError("Unknown crypto method");
 49207              }
 49208              constructor(e, t, a) {
 49209                const i = e.get("Filter");
 49210                if (!(0, n.isName)(i, "Standard"))
 49211                  throw new r.FormatError("unknown encryption method");
 49212                this.filterName = i.name;
 49213                this.dict = e;
 49214                const s = e.get("V");
 49215                if (
 49216                  !Number.isInteger(s) ||
 49217                  (1 !== s && 2 !== s && 4 !== s && 5 !== s)
 49218                )
 49219                  throw new r.FormatError("unsupported encryption algorithm");
 49220                this.algorithm = s;
 49221                let o = e.get("Length");
 49222                if (!o)
 49223                  if (s <= 3) o = 40;
 49224                  else {
 49225                    const t = e.get("CF"),
 49226                      a = e.get("StmF");
 49227                    if (t instanceof n.Dict && a instanceof n.Name) {
 49228                      t.suppressEncryption = !0;
 49229                      const e = t.get(a.name);
 49230                      o = e?.get("Length") || 128;
 49231                      o < 40 && (o <<= 3);
 49232                    }
 49233                  }
 49234                if (!Number.isInteger(o) || o < 40 || o % 8 != 0)
 49235                  throw new r.FormatError("invalid key length");
 49236                const c = (0, r.stringToBytes)(e.get("O")),
 49237                  l = (0, r.stringToBytes)(e.get("U")),
 49238                  h = c.subarray(0, 32),
 49239                  u = l.subarray(0, 32),
 49240                  d = e.get("P"),
 49241                  f = e.get("R"),
 49242                  g = (4 === s || 5 === s) && !1 !== e.get("EncryptMetadata");
 49243                this.encryptMetadata = g;
 49244                const p = (0, r.stringToBytes)(t);
 49245                let m, b;
 49246                if (a) {
 49247                  if (6 === f)
 49248                    try {
 49249                      a = (0, r.utf8StringToString)(a);
 49250                    } catch {
 49251                      (0, r.warn)(
 49252                        "CipherTransformFactory: Unable to convert UTF8 encoded password.",
 49253                      );
 49254                    }
 49255                  m = (0, r.stringToBytes)(a);
 49256                }
 49257                if (5 !== s) b = this.#T(p, m, h, u, d, f, o, g);
 49258                else {
 49259                  const t = c.subarray(32, 40),
 49260                    a = c.subarray(40, 48),
 49261                    n = l.subarray(0, 48),
 49262                    i = l.subarray(32, 40),
 49263                    s = l.subarray(40, 48),
 49264                    o = (0, r.stringToBytes)(e.get("OE")),
 49265                    d = (0, r.stringToBytes)(e.get("UE")),
 49266                    g = (0, r.stringToBytes)(e.get("Perms"));
 49267                  b = this.#I(f, m, h, t, a, n, u, i, s, o, d, g);
 49268                }
 49269                if (!b && !a)
 49270                  throw new r.PasswordException(
 49271                    "No password given",
 49272                    r.PasswordResponses.NEED_PASSWORD,
 49273                  );
 49274                if (!b && a) {
 49275                  const e = this.#M(m, h, f, o);
 49276                  b = this.#T(p, e, h, u, d, f, o, g);
 49277                }
 49278                if (!b)
 49279                  throw new r.PasswordException(
 49280                    "Incorrect Password",
 49281                    r.PasswordResponses.INCORRECT_PASSWORD,
 49282                  );
 49283                this.encryptionKey = b;
 49284                if (s >= 4) {
 49285                  const t = e.get("CF");
 49286                  t instanceof n.Dict && (t.suppressEncryption = !0);
 49287                  this.cf = t;
 49288                  this.stmf = e.get("StmF") || n.Name.get("Identity");
 49289                  this.strf = e.get("StrF") || n.Name.get("Identity");
 49290                  this.eff = e.get("EFF") || this.stmf;
 49291                }
 49292              }
 49293              createCipherTransform(e, t) {
 49294                if (4 === this.algorithm || 5 === this.algorithm)
 49295                  return new CipherTransform(
 49296                    this.#D(this.cf, this.strf, e, t, this.encryptionKey),
 49297                    this.#D(this.cf, this.stmf, e, t, this.encryptionKey),
 49298                  );
 49299                const a = this.#P(e, t, this.encryptionKey, !1),
 49300                  cipherConstructor = function () {
 49301                    return new ARCFourCipher(a);
 49302                  };
 49303                return new CipherTransform(cipherConstructor, cipherConstructor);
 49304              }
 49305            }
 49306            t.CipherTransformFactory = CipherTransformFactory;
 49307          },
 49308          (e, t, a) => {
 49309            Object.defineProperty(t, "__esModule", { value: !0 });
 49310            t.DecryptStream = void 0;
 49311            var r = a(18);
 49312            class DecryptStream extends r.DecodeStream {
 49313              constructor(e, t, a) {
 49314                super(t);
 49315                this.str = e;
 49316                this.dict = e.dict;
 49317                this.decrypt = a;
 49318                this.nextChunk = null;
 49319                this.initialized = !1;
 49320              }
 49321              readBlock() {
 49322                let e;
 49323                if (this.initialized) e = this.nextChunk;
 49324                else {
 49325                  e = this.str.getBytes(512);
 49326                  this.initialized = !0;
 49327                }
 49328                if (!e || 0 === e.length) {
 49329                  this.eof = !0;
 49330                  return;
 49331                }
 49332                this.nextChunk = this.str.getBytes(512);
 49333                const t = this.nextChunk?.length > 0;
 49334                e = (0, this.decrypt)(e, !t);
 49335                const a = this.bufferLength,
 49336                  r = a + e.length;
 49337                this.ensureBuffer(r).set(e, a);
 49338                this.bufferLength = r;
 49339              }
 49340            }
 49341            t.DecryptStream = DecryptStream;
 49342          },
 49343          (e, t, a) => {
 49344            Object.defineProperty(t, "__esModule", { value: !0 });
 49345            t.ObjectLoader = void 0;
 49346            var r = a(4),
 49347              n = a(5),
 49348              i = a(3),
 49349              s = a(2);
 49350            function addChildren(e, t) {
 49351              if (e instanceof r.Dict) e = e.getRawValues();
 49352              else if (e instanceof n.BaseStream) e = e.dict.getRawValues();
 49353              else if (!Array.isArray(e)) return;
 49354              for (const i of e)
 49355                ((a = i) instanceof r.Ref ||
 49356                  a instanceof r.Dict ||
 49357                  a instanceof n.BaseStream ||
 49358                  Array.isArray(a)) &&
 49359                  t.push(i);
 49360              var a;
 49361            }
 49362            t.ObjectLoader = class ObjectLoader {
 49363              constructor(e, t, a) {
 49364                this.dict = e;
 49365                this.keys = t;
 49366                this.xref = a;
 49367                this.refSet = null;
 49368              }
 49369              async load() {
 49370                if (this.xref.stream.isDataLoaded) return;
 49371                const { keys: e, dict: t } = this;
 49372                this.refSet = new r.RefSet();
 49373                const a = [];
 49374                for (const r of e) {
 49375                  const e = t.getRaw(r);
 49376                  void 0 !== e && a.push(e);
 49377                }
 49378                return this._walk(a);
 49379              }
 49380              async _walk(e) {
 49381                const t = [],
 49382                  a = [];
 49383                for (; e.length; ) {
 49384                  let o = e.pop();
 49385                  if (o instanceof r.Ref) {
 49386                    if (this.refSet.has(o)) continue;
 49387                    try {
 49388                      this.refSet.put(o);
 49389                      o = this.xref.fetch(o);
 49390                    } catch (e) {
 49391                      if (!(e instanceof i.MissingDataException)) {
 49392                        (0, s.warn)(
 49393                          `ObjectLoader._walk - requesting all data: "${e}".`,
 49394                        );
 49395                        this.refSet = null;
 49396                        const { manager: t } = this.xref.stream;
 49397                        return t.requestAllChunks();
 49398                      }
 49399                      t.push(o);
 49400                      a.push({ begin: e.begin, end: e.end });
 49401                    }
 49402                  }
 49403                  if (o instanceof n.BaseStream) {
 49404                    const e = o.getBaseStreams();
 49405                    if (e) {
 49406                      let r = !1;
 49407                      for (const t of e)
 49408                        if (!t.isDataLoaded) {
 49409                          r = !0;
 49410                          a.push({ begin: t.start, end: t.end });
 49411                        }
 49412                      r && t.push(o);
 49413                    }
 49414                  }
 49415                  addChildren(o, e);
 49416                }
 49417                if (a.length) {
 49418                  await this.xref.stream.manager.requestRanges(a);
 49419                  for (const e of t) e instanceof r.Ref && this.refSet.remove(e);
 49420                  return this._walk(t);
 49421                }
 49422                this.refSet = null;
 49423              }
 49424            };
 49425          },
 49426          (e, t, a) => {
 49427            Object.defineProperty(t, "__esModule", { value: !0 });
 49428            t.XFAFactory = void 0;
 49429            var r = a(78),
 49430              n = a(79),
 49431              i = a(89),
 49432              s = a(85),
 49433              o = a(84),
 49434              c = a(2),
 49435              l = a(90),
 49436              h = a(100);
 49437            class XFAFactory {
 49438              constructor(e) {
 49439                try {
 49440                  this.root = new l.XFAParser().parse(
 49441                    XFAFactory._createDocument(e),
 49442                  );
 49443                  const t = new n.Binder(this.root);
 49444                  this.form = t.bind();
 49445                  this.dataHandler = new i.DataHandler(this.root, t.getData());
 49446                  this.form[r.$globalData].template = this.form;
 49447                } catch (e) {
 49448                  (0, c.warn)(
 49449                    `XFA - an error occurred during parsing and binding: ${e}`,
 49450                  );
 49451                }
 49452              }
 49453              isValid() {
 49454                return this.root && this.form;
 49455              }
 49456              _createPagesHelper() {
 49457                const e = this.form[r.$toPages]();
 49458                return new Promise((t, a) => {
 49459                  const nextIteration = () => {
 49460                    try {
 49461                      const a = e.next();
 49462                      a.done ? t(a.value) : setTimeout(nextIteration, 0);
 49463                    } catch (e) {
 49464                      a(e);
 49465                    }
 49466                  };
 49467                  setTimeout(nextIteration, 0);
 49468                });
 49469              }
 49470              async _createPages() {
 49471                try {
 49472                  this.pages = await this._createPagesHelper();
 49473                  this.dims = this.pages.children.map((e) => {
 49474                    const { width: t, height: a } = e.attributes.style;
 49475                    return [0, 0, parseInt(t), parseInt(a)];
 49476                  });
 49477                } catch (e) {
 49478                  (0, c.warn)(`XFA - an error occurred during layout: ${e}`);
 49479                }
 49480              }
 49481              getBoundingBox(e) {
 49482                return this.dims[e];
 49483              }
 49484              async getNumPages() {
 49485                this.pages || (await this._createPages());
 49486                return this.dims.length;
 49487              }
 49488              setImages(e) {
 49489                this.form[r.$globalData].images = e;
 49490              }
 49491              setFonts(e) {
 49492                this.form[r.$globalData].fontFinder = new s.FontFinder(e);
 49493                const t = [];
 49494                for (let e of this.form[r.$globalData].usedTypefaces) {
 49495                  e = (0, o.stripQuotes)(e);
 49496                  this.form[r.$globalData].fontFinder.find(e) || t.push(e);
 49497                }
 49498                return t.length > 0 ? t : null;
 49499              }
 49500              appendFonts(e, t) {
 49501                this.form[r.$globalData].fontFinder.add(e, t);
 49502              }
 49503              async getPages() {
 49504                this.pages || (await this._createPages());
 49505                const e = this.pages;
 49506                this.pages = null;
 49507                return e;
 49508              }
 49509              serializeData(e) {
 49510                return this.dataHandler.serialize(e);
 49511              }
 49512              static _createDocument(e) {
 49513                return e["/xdp:xdp"] ? Object.values(e).join("") : e["xdp:xdp"];
 49514              }
 49515              static getRichTextAsHtml(e) {
 49516                if (!e || "string" != typeof e) return null;
 49517                try {
 49518                  let t = new l.XFAParser(h.XhtmlNamespace, !0).parse(e);
 49519                  if (!["body", "xhtml"].includes(t[r.$nodeName])) {
 49520                    const e = h.XhtmlNamespace.body({});
 49521                    e[r.$appendChild](t);
 49522                    t = e;
 49523                  }
 49524                  const a = t[r.$toHTML]();
 49525                  if (!a.success) return null;
 49526                  const { html: n } = a,
 49527                    { attributes: i } = n;
 49528                  if (i) {
 49529                    i.class &&
 49530                      (i.class = i.class.filter((e) => !e.startsWith("xfa")));
 49531                    i.dir = "auto";
 49532                  }
 49533                  return { html: n, str: t[r.$text]() };
 49534                } catch (e) {
 49535                  (0, c.warn)(
 49536                    `XFA - an error occurred during parsing of rich text: ${e}`,
 49537                  );
 49538                }
 49539                return null;
 49540              }
 49541            }
 49542            t.XFAFactory = XFAFactory;
 49543          },
 49544          (e, t) => {
 49545            Object.defineProperty(t, "__esModule", { value: !0 });
 49546            t.$uid =
 49547              t.$toStyle =
 49548              t.$toString =
 49549              t.$toPages =
 49550              t.$toHTML =
 49551              t.$text =
 49552              t.$tabIndex =
 49553              t.$setValue =
 49554              t.$setSetAttributes =
 49555              t.$setId =
 49556              t.$searchNode =
 49557              t.$root =
 49558              t.$resolvePrototypes =
 49559              t.$removeChild =
 49560              t.$pushPara =
 49561              t.$pushGlyphs =
 49562              t.$popPara =
 49563              t.$onText =
 49564              t.$onChildCheck =
 49565              t.$onChild =
 49566              t.$nsAttributes =
 49567              t.$nodeName =
 49568              t.$namespaceId =
 49569              t.$lastAttribute =
 49570              t.$isUsable =
 49571              t.$isTransparent =
 49572              t.$isThereMoreWidth =
 49573              t.$isSplittable =
 49574              t.$isNsAgnostic =
 49575              t.$isDescendent =
 49576              t.$isDataValue =
 49577              t.$isCDATAXml =
 49578              t.$isBindable =
 49579              t.$insertAt =
 49580              t.$indexOf =
 49581              t.$ids =
 49582              t.$hasSettableValue =
 49583              t.$globalData =
 49584              t.$getTemplateRoot =
 49585              t.$getSubformParent =
 49586              t.$getRealChildrenByNameIt =
 49587              t.$getParent =
 49588              t.$getNextPage =
 49589              t.$getExtra =
 49590              t.$getDataValue =
 49591              t.$getContainedChildren =
 49592              t.$getChildrenByNameIt =
 49593              t.$getChildrenByName =
 49594              t.$getChildrenByClass =
 49595              t.$getChildren =
 49596              t.$getAvailableSpace =
 49597              t.$getAttributes =
 49598              t.$getAttributeIt =
 49599              t.$flushHTML =
 49600              t.$finalize =
 49601              t.$extra =
 49602              t.$dump =
 49603              t.$data =
 49604              t.$content =
 49605              t.$consumed =
 49606              t.$clone =
 49607              t.$cleanup =
 49608              t.$cleanPage =
 49609              t.$clean =
 49610              t.$childrenToHTML =
 49611              t.$appendChild =
 49612              t.$addHTML =
 49613              t.$acceptWhitespace =
 49614                void 0;
 49615            const a = Symbol();
 49616            t.$acceptWhitespace = a;
 49617            const r = Symbol();
 49618            t.$addHTML = r;
 49619            const n = Symbol();
 49620            t.$appendChild = n;
 49621            const i = Symbol();
 49622            t.$childrenToHTML = i;
 49623            const s = Symbol();
 49624            t.$clean = s;
 49625            const o = Symbol();
 49626            t.$cleanPage = o;
 49627            const c = Symbol();
 49628            t.$cleanup = c;
 49629            const l = Symbol();
 49630            t.$clone = l;
 49631            const h = Symbol();
 49632            t.$consumed = h;
 49633            const u = Symbol("content");
 49634            t.$content = u;
 49635            const d = Symbol("data");
 49636            t.$data = d;
 49637            const f = Symbol();
 49638            t.$dump = f;
 49639            const g = Symbol("extra");
 49640            t.$extra = g;
 49641            const p = Symbol();
 49642            t.$finalize = p;
 49643            const m = Symbol();
 49644            t.$flushHTML = m;
 49645            const b = Symbol();
 49646            t.$getAttributeIt = b;
 49647            const y = Symbol();
 49648            t.$getAttributes = y;
 49649            const w = Symbol();
 49650            t.$getAvailableSpace = w;
 49651            const S = Symbol();
 49652            t.$getChildrenByClass = S;
 49653            const x = Symbol();
 49654            t.$getChildrenByName = x;
 49655            const C = Symbol();
 49656            t.$getChildrenByNameIt = C;
 49657            const k = Symbol();
 49658            t.$getDataValue = k;
 49659            const v = Symbol();
 49660            t.$getExtra = v;
 49661            const F = Symbol();
 49662            t.$getRealChildrenByNameIt = F;
 49663            const O = Symbol();
 49664            t.$getChildren = O;
 49665            const T = Symbol();
 49666            t.$getContainedChildren = T;
 49667            const M = Symbol();
 49668            t.$getNextPage = M;
 49669            const D = Symbol();
 49670            t.$getSubformParent = D;
 49671            const E = Symbol();
 49672            t.$getParent = E;
 49673            const N = Symbol();
 49674            t.$getTemplateRoot = N;
 49675            const R = Symbol();
 49676            t.$globalData = R;
 49677            const L = Symbol();
 49678            t.$hasSettableValue = L;
 49679            const $ = Symbol();
 49680            t.$ids = $;
 49681            const _ = Symbol();
 49682            t.$indexOf = _;
 49683            const j = Symbol();
 49684            t.$insertAt = j;
 49685            const U = Symbol();
 49686            t.$isCDATAXml = U;
 49687            const X = Symbol();
 49688            t.$isBindable = X;
 49689            const H = Symbol();
 49690            t.$isDataValue = H;
 49691            const q = Symbol();
 49692            t.$isDescendent = q;
 49693            const z = Symbol();
 49694            t.$isNsAgnostic = z;
 49695            const W = Symbol();
 49696            t.$isSplittable = W;
 49697            const G = Symbol();
 49698            t.$isThereMoreWidth = G;
 49699            const V = Symbol();
 49700            t.$isTransparent = V;
 49701            const K = Symbol();
 49702            t.$isUsable = K;
 49703            const J = Symbol();
 49704            t.$lastAttribute = J;
 49705            const Y = Symbol("namespaceId");
 49706            t.$namespaceId = Y;
 49707            const Z = Symbol("nodeName");
 49708            t.$nodeName = Z;
 49709            const Q = Symbol();
 49710            t.$nsAttributes = Q;
 49711            const ee = Symbol();
 49712            t.$onChild = ee;
 49713            const te = Symbol();
 49714            t.$onChildCheck = te;
 49715            const ae = Symbol();
 49716            t.$onText = ae;
 49717            const re = Symbol();
 49718            t.$pushGlyphs = re;
 49719            const ne = Symbol();
 49720            t.$popPara = ne;
 49721            const ie = Symbol();
 49722            t.$pushPara = ie;
 49723            const se = Symbol();
 49724            t.$removeChild = se;
 49725            const oe = Symbol("root");
 49726            t.$root = oe;
 49727            const ce = Symbol();
 49728            t.$resolvePrototypes = ce;
 49729            const le = Symbol();
 49730            t.$searchNode = le;
 49731            const he = Symbol();
 49732            t.$setId = he;
 49733            const ue = Symbol();
 49734            t.$setSetAttributes = ue;
 49735            const de = Symbol();
 49736            t.$setValue = de;
 49737            const fe = Symbol();
 49738            t.$tabIndex = fe;
 49739            const ge = Symbol();
 49740            t.$text = ge;
 49741            const pe = Symbol();
 49742            t.$toPages = pe;
 49743            const me = Symbol();
 49744            t.$toHTML = me;
 49745            const be = Symbol();
 49746            t.$toString = be;
 49747            const ye = Symbol();
 49748            t.$toStyle = ye;
 49749            const we = Symbol("uid");
 49750            t.$uid = we;
 49751          },
 49752          (e, t, a) => {
 49753            Object.defineProperty(t, "__esModule", { value: !0 });
 49754            t.Binder = void 0;
 49755            var r = a(78),
 49756              n = a(80),
 49757              i = a(88),
 49758              s = a(87),
 49759              o = a(81),
 49760              c = a(2);
 49761            const l = o.NamespaceIds.datasets.id;
 49762            function createText(e) {
 49763              const t = new n.Text({});
 49764              t[r.$content] = e;
 49765              return t;
 49766            }
 49767            t.Binder = class Binder {
 49768              constructor(e) {
 49769                this.root = e;
 49770                this.datasets = e.datasets;
 49771                this.data =
 49772                  e.datasets?.data ||
 49773                  new s.XmlObject(o.NamespaceIds.datasets.id, "data");
 49774                this.emptyMerge = 0 === this.data[r.$getChildren]().length;
 49775                this.root.form = this.form = e.template[r.$clone]();
 49776              }
 49777              _isConsumeData() {
 49778                return !this.emptyMerge && this._mergeMode;
 49779              }
 49780              _isMatchTemplate() {
 49781                return !this._isConsumeData();
 49782              }
 49783              bind() {
 49784                this._bindElement(this.form, this.data);
 49785                return this.form;
 49786              }
 49787              getData() {
 49788                return this.data;
 49789              }
 49790              _bindValue(e, t, a) {
 49791                e[r.$data] = t;
 49792                if (e[r.$hasSettableValue]())
 49793                  if (t[r.$isDataValue]()) {
 49794                    const a = t[r.$getDataValue]();
 49795                    e[r.$setValue](createText(a));
 49796                  } else if (
 49797                    e instanceof n.Field &&
 49798                    "multiSelect" === e.ui?.choiceList?.open
 49799                  ) {
 49800                    const a = t[r.$getChildren]()
 49801                      .map((e) => e[r.$content].trim())
 49802                      .join("\n");
 49803                    e[r.$setValue](createText(a));
 49804                  } else
 49805                    this._isConsumeData() &&
 49806                      (0, c.warn)("XFA - Nodes haven't the same type.");
 49807                else
 49808                  !t[r.$isDataValue]() || this._isMatchTemplate()
 49809                    ? this._bindElement(e, t)
 49810                    : (0, c.warn)("XFA - Nodes haven't the same type.");
 49811              }
 49812              _findDataByNameToConsume(e, t, a, n) {
 49813                if (!e) return null;
 49814                let i, s;
 49815                for (let n = 0; n < 3; n++) {
 49816                  i = a[r.$getRealChildrenByNameIt](e, !1, !0);
 49817                  for (;;) {
 49818                    s = i.next().value;
 49819                    if (!s) break;
 49820                    if (t === s[r.$isDataValue]()) return s;
 49821                  }
 49822                  if (
 49823                    a[r.$namespaceId] === o.NamespaceIds.datasets.id &&
 49824                    "data" === a[r.$nodeName]
 49825                  )
 49826                    break;
 49827                  a = a[r.$getParent]();
 49828                }
 49829                if (!n) return null;
 49830                i = this.data[r.$getRealChildrenByNameIt](e, !0, !1);
 49831                s = i.next().value;
 49832                if (s) return s;
 49833                i = this.data[r.$getAttributeIt](e, !0);
 49834                s = i.next().value;
 49835                return s?.[r.$isDataValue]() ? s : null;
 49836              }
 49837              _setProperties(e, t) {
 49838                if (e.hasOwnProperty("setProperty"))
 49839                  for (const { ref: a, target: o, connection: l } of e.setProperty
 49840                    .children) {
 49841                    if (l) continue;
 49842                    if (!a) continue;
 49843                    const h = (0, i.searchNode)(this.root, t, a, !1, !1);
 49844                    if (!h) {
 49845                      (0, c.warn)(`XFA - Invalid reference: ${a}.`);
 49846                      continue;
 49847                    }
 49848                    const [u] = h;
 49849                    if (!u[r.$isDescendent](this.data)) {
 49850                      (0, c.warn)("XFA - Invalid node: must be a data node.");
 49851                      continue;
 49852                    }
 49853                    const d = (0, i.searchNode)(this.root, e, o, !1, !1);
 49854                    if (!d) {
 49855                      (0, c.warn)(`XFA - Invalid target: ${o}.`);
 49856                      continue;
 49857                    }
 49858                    const [f] = d;
 49859                    if (!f[r.$isDescendent](e)) {
 49860                      (0, c.warn)(
 49861                        "XFA - Invalid target: must be a property or subproperty.",
 49862                      );
 49863                      continue;
 49864                    }
 49865                    const g = f[r.$getParent]();
 49866                    if (
 49867                      f instanceof n.SetProperty ||
 49868                      g instanceof n.SetProperty
 49869                    ) {
 49870                      (0, c.warn)(
 49871                        "XFA - Invalid target: cannot be a setProperty or one of its properties.",
 49872                      );
 49873                      continue;
 49874                    }
 49875                    if (f instanceof n.BindItems || g instanceof n.BindItems) {
 49876                      (0, c.warn)(
 49877                        "XFA - Invalid target: cannot be a bindItems or one of its properties.",
 49878                      );
 49879                      continue;
 49880                    }
 49881                    const p = u[r.$text](),
 49882                      m = f[r.$nodeName];
 49883                    if (f instanceof s.XFAAttribute) {
 49884                      const e = Object.create(null);
 49885                      e[m] = p;
 49886                      const t = Reflect.construct(
 49887                        Object.getPrototypeOf(g).constructor,
 49888                        [e],
 49889                      );
 49890                      g[m] = t[m];
 49891                    } else if (f.hasOwnProperty(r.$content)) {
 49892                      f[r.$data] = u;
 49893                      f[r.$content] = p;
 49894                      f[r.$finalize]();
 49895                    } else
 49896                      (0, c.warn)("XFA - Invalid node to use in setProperty");
 49897                  }
 49898              }
 49899              _bindItems(e, t) {
 49900                if (
 49901                  !e.hasOwnProperty("items") ||
 49902                  !e.hasOwnProperty("bindItems") ||
 49903                  e.bindItems.isEmpty()
 49904                )
 49905                  return;
 49906                for (const t of e.items.children) e[r.$removeChild](t);
 49907                e.items.clear();
 49908                const a = new n.Items({}),
 49909                  s = new n.Items({});
 49910                e[r.$appendChild](a);
 49911                e.items.push(a);
 49912                e[r.$appendChild](s);
 49913                e.items.push(s);
 49914                for (const {
 49915                  ref: n,
 49916                  labelRef: o,
 49917                  valueRef: l,
 49918                  connection: h,
 49919                } of e.bindItems.children) {
 49920                  if (h) continue;
 49921                  if (!n) continue;
 49922                  const e = (0, i.searchNode)(this.root, t, n, !1, !1);
 49923                  if (e)
 49924                    for (const t of e) {
 49925                      if (!t[r.$isDescendent](this.datasets)) {
 49926                        (0, c.warn)(
 49927                          `XFA - Invalid ref (${n}): must be a datasets child.`,
 49928                        );
 49929                        continue;
 49930                      }
 49931                      const e = (0, i.searchNode)(this.root, t, o, !0, !1);
 49932                      if (!e) {
 49933                        (0, c.warn)(`XFA - Invalid label: ${o}.`);
 49934                        continue;
 49935                      }
 49936                      const [h] = e;
 49937                      if (!h[r.$isDescendent](this.datasets)) {
 49938                        (0, c.warn)(
 49939                          "XFA - Invalid label: must be a datasets child.",
 49940                        );
 49941                        continue;
 49942                      }
 49943                      const u = (0, i.searchNode)(this.root, t, l, !0, !1);
 49944                      if (!u) {
 49945                        (0, c.warn)(`XFA - Invalid value: ${l}.`);
 49946                        continue;
 49947                      }
 49948                      const [d] = u;
 49949                      if (!d[r.$isDescendent](this.datasets)) {
 49950                        (0, c.warn)(
 49951                          "XFA - Invalid value: must be a datasets child.",
 49952                        );
 49953                        continue;
 49954                      }
 49955                      const f = createText(h[r.$text]()),
 49956                        g = createText(d[r.$text]());
 49957                      a[r.$appendChild](f);
 49958                      a.text.push(f);
 49959                      s[r.$appendChild](g);
 49960                      s.text.push(g);
 49961                    }
 49962                  else (0, c.warn)(`XFA - Invalid reference: ${n}.`);
 49963                }
 49964              }
 49965              _bindOccurrences(e, t, a) {
 49966                let n;
 49967                if (t.length > 1) {
 49968                  n = e[r.$clone]();
 49969                  n[r.$removeChild](n.occur);
 49970                  n.occur = null;
 49971                }
 49972                this._bindValue(e, t[0], a);
 49973                this._setProperties(e, t[0]);
 49974                this._bindItems(e, t[0]);
 49975                if (1 === t.length) return;
 49976                const i = e[r.$getParent](),
 49977                  s = e[r.$nodeName],
 49978                  o = i[r.$indexOf](e);
 49979                for (let e = 1, c = t.length; e < c; e++) {
 49980                  const c = t[e],
 49981                    l = n[r.$clone]();
 49982                  i[s].push(l);
 49983                  i[r.$insertAt](o + e, l);
 49984                  this._bindValue(l, c, a);
 49985                  this._setProperties(l, c);
 49986                  this._bindItems(l, c);
 49987                }
 49988              }
 49989              _createOccurrences(e) {
 49990                if (!this.emptyMerge) return;
 49991                const { occur: t } = e;
 49992                if (!t || t.initial <= 1) return;
 49993                const a = e[r.$getParent](),
 49994                  n = e[r.$nodeName];
 49995                if (!(a[n] instanceof s.XFAObjectArray)) return;
 49996                let i;
 49997                i = e.name
 49998                  ? a[n].children.filter((t) => t.name === e.name).length
 49999                  : a[n].children.length;
 50000                const o = a[r.$indexOf](e) + 1,
 50001                  c = t.initial - i;
 50002                if (c) {
 50003                  const t = e[r.$clone]();
 50004                  t[r.$removeChild](t.occur);
 50005                  t.occur = null;
 50006                  a[n].push(t);
 50007                  a[r.$insertAt](o, t);
 50008                  for (let e = 1; e < c; e++) {
 50009                    const i = t[r.$clone]();
 50010                    a[n].push(i);
 50011                    a[r.$insertAt](o + e, i);
 50012                  }
 50013                }
 50014              }
 50015              _getOccurInfo(e) {
 50016                const { name: t, occur: a } = e;
 50017                if (!a || !t) return [1, 1];
 50018                const r = -1 === a.max ? 1 / 0 : a.max;
 50019                return [a.min, r];
 50020              }
 50021              _setAndBind(e, t) {
 50022                this._setProperties(e, t);
 50023                this._bindItems(e, t);
 50024                this._bindElement(e, t);
 50025              }
 50026              _bindElement(e, t) {
 50027                const a = [];
 50028                this._createOccurrences(e);
 50029                for (const n of e[r.$getChildren]()) {
 50030                  if (n[r.$data]) continue;
 50031                  if (
 50032                    void 0 === this._mergeMode &&
 50033                    "subform" === n[r.$nodeName]
 50034                  ) {
 50035                    this._mergeMode = "consumeData" === n.mergeMode;
 50036                    const e = t[r.$getChildren]();
 50037                    if (e.length > 0) this._bindOccurrences(n, [e[0]], null);
 50038                    else if (this.emptyMerge) {
 50039                      const e = t[r.$namespaceId] === l ? -1 : t[r.$namespaceId],
 50040                        a = (n[r.$data] = new s.XmlObject(e, n.name || "root"));
 50041                      t[r.$appendChild](a);
 50042                      this._bindElement(n, a);
 50043                    }
 50044                    continue;
 50045                  }
 50046                  if (!n[r.$isBindable]()) continue;
 50047                  let e = !1,
 50048                    o = null,
 50049                    h = null,
 50050                    u = null;
 50051                  if (n.bind) {
 50052                    switch (n.bind.match) {
 50053                      case "none":
 50054                        this._setAndBind(n, t);
 50055                        continue;
 50056                      case "global":
 50057                        e = !0;
 50058                        break;
 50059                      case "dataRef":
 50060                        if (!n.bind.ref) {
 50061                          (0, c.warn)(
 50062                            `XFA - ref is empty in node ${n[r.$nodeName]}.`,
 50063                          );
 50064                          this._setAndBind(n, t);
 50065                          continue;
 50066                        }
 50067                        h = n.bind.ref;
 50068                    }
 50069                    n.bind.picture && (o = n.bind.picture[r.$content]);
 50070                  }
 50071                  const [d, f] = this._getOccurInfo(n);
 50072                  if (h) {
 50073                    u = (0, i.searchNode)(this.root, t, h, !0, !1);
 50074                    if (null === u) {
 50075                      u = (0, i.createDataNode)(this.data, t, h);
 50076                      if (!u) continue;
 50077                      this._isConsumeData() && (u[r.$consumed] = !0);
 50078                      this._setAndBind(n, u);
 50079                      continue;
 50080                    }
 50081                    this._isConsumeData() &&
 50082                      (u = u.filter((e) => !e[r.$consumed]));
 50083                    u.length > f
 50084                      ? (u = u.slice(0, f))
 50085                      : 0 === u.length && (u = null);
 50086                    u &&
 50087                      this._isConsumeData() &&
 50088                      u.forEach((e) => {
 50089                        e[r.$consumed] = !0;
 50090                      });
 50091                  } else {
 50092                    if (!n.name) {
 50093                      this._setAndBind(n, t);
 50094                      continue;
 50095                    }
 50096                    if (this._isConsumeData()) {
 50097                      const a = [];
 50098                      for (; a.length < f; ) {
 50099                        const i = this._findDataByNameToConsume(
 50100                          n.name,
 50101                          n[r.$hasSettableValue](),
 50102                          t,
 50103                          e,
 50104                        );
 50105                        if (!i) break;
 50106                        i[r.$consumed] = !0;
 50107                        a.push(i);
 50108                      }
 50109                      u = a.length > 0 ? a : null;
 50110                    } else {
 50111                      u = t[r.$getRealChildrenByNameIt](
 50112                        n.name,
 50113                        !1,
 50114                        this.emptyMerge,
 50115                      ).next().value;
 50116                      if (!u) {
 50117                        if (0 === d) {
 50118                          a.push(n);
 50119                          continue;
 50120                        }
 50121                        const e =
 50122                          t[r.$namespaceId] === l ? -1 : t[r.$namespaceId];
 50123                        u = n[r.$data] = new s.XmlObject(e, n.name);
 50124                        this.emptyMerge && (u[r.$consumed] = !0);
 50125                        t[r.$appendChild](u);
 50126                        this._setAndBind(n, u);
 50127                        continue;
 50128                      }
 50129                      this.emptyMerge && (u[r.$consumed] = !0);
 50130                      u = [u];
 50131                    }
 50132                  }
 50133                  u
 50134                    ? this._bindOccurrences(n, u, o)
 50135                    : d > 0
 50136                      ? this._setAndBind(n, t)
 50137                      : a.push(n);
 50138                }
 50139                a.forEach((e) => e[r.$getParent]()[r.$removeChild](e));
 50140              }
 50141            };
 50142          },
 50143          (e, t, a) => {
 50144            Object.defineProperty(t, "__esModule", { value: !0 });
 50145            t.Value =
 50146              t.Text =
 50147              t.TemplateNamespace =
 50148              t.Template =
 50149              t.SetProperty =
 50150              t.Items =
 50151              t.Field =
 50152              t.BindItems =
 50153                void 0;
 50154            var r = a(78),
 50155              n = a(81),
 50156              i = a(82),
 50157              s = a(83),
 50158              o = a(87),
 50159              c = a(84),
 50160              l = a(2),
 50161              h = a(85),
 50162              u = a(3),
 50163              d = a(88);
 50164            const f = n.NamespaceIds.template.id,
 50165              g = "http://www.w3.org/2000/svg",
 50166              p = /^H(\d+)$/,
 50167              m = new Set([
 50168                "image/gif",
 50169                "image/jpeg",
 50170                "image/jpg",
 50171                "image/pjpeg",
 50172                "image/png",
 50173                "image/apng",
 50174                "image/x-png",
 50175                "image/bmp",
 50176                "image/x-ms-bmp",
 50177                "image/tiff",
 50178                "image/tif",
 50179                "application/octet-stream",
 50180              ]),
 50181              b = [
 50182                [[66, 77], "image/bmp"],
 50183                [[255, 216, 255], "image/jpeg"],
 50184                [[73, 73, 42, 0], "image/tiff"],
 50185                [[77, 77, 0, 42], "image/tiff"],
 50186                [[71, 73, 70, 56, 57, 97], "image/gif"],
 50187                [[137, 80, 78, 71, 13, 10, 26, 10], "image/png"],
 50188              ];
 50189            function getBorderDims(e) {
 50190              if (!e || !e.border) return { w: 0, h: 0 };
 50191              const t = e.border[r.$getExtra]();
 50192              return t
 50193                ? {
 50194                    w: t.widths[0] + t.widths[2] + t.insets[0] + t.insets[2],
 50195                    h: t.widths[1] + t.widths[3] + t.insets[1] + t.insets[3],
 50196                  }
 50197                : { w: 0, h: 0 };
 50198            }
 50199            function hasMargin(e) {
 50200              return (
 50201                e.margin &&
 50202                (e.margin.topInset ||
 50203                  e.margin.rightInset ||
 50204                  e.margin.bottomInset ||
 50205                  e.margin.leftInset)
 50206              );
 50207            }
 50208            function _setValue(e, t) {
 50209              if (!e.value) {
 50210                const t = new Value({});
 50211                e[r.$appendChild](t);
 50212                e.value = t;
 50213              }
 50214              e.value[r.$setValue](t);
 50215            }
 50216            function* getContainedChildren(e) {
 50217              for (const t of e[r.$getChildren]())
 50218                t instanceof SubformSet
 50219                  ? yield* t[r.$getContainedChildren]()
 50220                  : yield t;
 50221            }
 50222            function isRequired(e) {
 50223              return "error" === e.validate?.nullTest;
 50224            }
 50225            function setTabIndex(e) {
 50226              for (; e; ) {
 50227                if (!e.traversal) {
 50228                  e[r.$tabIndex] = e[r.$getParent]()[r.$tabIndex];
 50229                  return;
 50230                }
 50231                if (e[r.$tabIndex]) return;
 50232                let t = null;
 50233                for (const a of e.traversal[r.$getChildren]())
 50234                  if ("next" === a.operation) {
 50235                    t = a;
 50236                    break;
 50237                  }
 50238                if (!t || !t.ref) {
 50239                  e[r.$tabIndex] = e[r.$getParent]()[r.$tabIndex];
 50240                  return;
 50241                }
 50242                const a = e[r.$getTemplateRoot]();
 50243                e[r.$tabIndex] = ++a[r.$tabIndex];
 50244                const n = a[r.$searchNode](t.ref, e);
 50245                if (!n) return;
 50246                e = n[0];
 50247              }
 50248            }
 50249            function applyAssist(e, t) {
 50250              const a = e.assist;
 50251              if (a) {
 50252                const e = a[r.$toHTML]();
 50253                e && (t.title = e);
 50254                const n = a.role.match(p);
 50255                if (n) {
 50256                  const e = "heading",
 50257                    a = n[1];
 50258                  t.role = e;
 50259                  t["aria-level"] = a;
 50260                }
 50261              }
 50262              if ("table" === e.layout) t.role = "table";
 50263              else if ("row" === e.layout) t.role = "row";
 50264              else {
 50265                const a = e[r.$getParent]();
 50266                "row" === a.layout &&
 50267                  (t.role = "TH" === a.assist?.role ? "columnheader" : "cell");
 50268              }
 50269            }
 50270            function ariaLabel(e) {
 50271              if (!e.assist) return null;
 50272              const t = e.assist;
 50273              return t.speak && "" !== t.speak[r.$content]
 50274                ? t.speak[r.$content]
 50275                : t.toolTip
 50276                  ? t.toolTip[r.$content]
 50277                  : null;
 50278            }
 50279            function valueToHtml(e) {
 50280              return c.HTMLResult.success({
 50281                name: "div",
 50282                attributes: { class: ["xfaRich"], style: Object.create(null) },
 50283                children: [
 50284                  {
 50285                    name: "span",
 50286                    attributes: { style: Object.create(null) },
 50287                    value: e,
 50288                  },
 50289                ],
 50290              });
 50291            }
 50292            function setFirstUnsplittable(e) {
 50293              const t = e[r.$getTemplateRoot]();
 50294              if (null === t[r.$extra].firstUnsplittable) {
 50295                t[r.$extra].firstUnsplittable = e;
 50296                t[r.$extra].noLayoutFailure = !0;
 50297              }
 50298            }
 50299            function unsetFirstUnsplittable(e) {
 50300              const t = e[r.$getTemplateRoot]();
 50301              t[r.$extra].firstUnsplittable === e &&
 50302                (t[r.$extra].noLayoutFailure = !1);
 50303            }
 50304            function handleBreak(e) {
 50305              if (e[r.$extra]) return !1;
 50306              e[r.$extra] = Object.create(null);
 50307              if ("auto" === e.targetType) return !1;
 50308              const t = e[r.$getTemplateRoot]();
 50309              let a = null;
 50310              if (e.target) {
 50311                a = t[r.$searchNode](e.target, e[r.$getParent]());
 50312                if (!a) return !1;
 50313                a = a[0];
 50314              }
 50315              const { currentPageArea: n, currentContentArea: i } = t[r.$extra];
 50316              if ("pageArea" === e.targetType) {
 50317                a instanceof PageArea || (a = null);
 50318                if (e.startNew) {
 50319                  e[r.$extra].target = a || n;
 50320                  return !0;
 50321                }
 50322                if (a && a !== n) {
 50323                  e[r.$extra].target = a;
 50324                  return !0;
 50325                }
 50326                return !1;
 50327              }
 50328              a instanceof ContentArea || (a = null);
 50329              const s = a && a[r.$getParent]();
 50330              let o,
 50331                c = s;
 50332              if (e.startNew)
 50333                if (a) {
 50334                  const e = s.contentArea.children,
 50335                    t = e.indexOf(i),
 50336                    r = e.indexOf(a);
 50337                  -1 !== t && t < r && (c = null);
 50338                  o = r - 1;
 50339                } else o = n.contentArea.children.indexOf(i);
 50340              else {
 50341                if (!a || a === i) return !1;
 50342                o = s.contentArea.children.indexOf(a) - 1;
 50343                c = s === n ? null : s;
 50344              }
 50345              e[r.$extra].target = c;
 50346              e[r.$extra].index = o;
 50347              return !0;
 50348            }
 50349            function handleOverflow(e, t, a) {
 50350              const n = e[r.$getTemplateRoot](),
 50351                i = n[r.$extra].noLayoutFailure,
 50352                s = t[r.$getSubformParent];
 50353              t[r.$getSubformParent] = () => e;
 50354              n[r.$extra].noLayoutFailure = !0;
 50355              const o = t[r.$toHTML](a);
 50356              e[r.$addHTML](o.html, o.bbox);
 50357              n[r.$extra].noLayoutFailure = i;
 50358              t[r.$getSubformParent] = s;
 50359            }
 50360            class AppearanceFilter extends o.StringObject {
 50361              constructor(e) {
 50362                super(f, "appearanceFilter");
 50363                this.id = e.id || "";
 50364                this.type = (0, c.getStringOption)(e.type, [
 50365                  "optional",
 50366                  "required",
 50367                ]);
 50368                this.use = e.use || "";
 50369                this.usehref = e.usehref || "";
 50370              }
 50371            }
 50372            class Arc extends o.XFAObject {
 50373              constructor(e) {
 50374                super(f, "arc", !0);
 50375                this.circular = (0, c.getInteger)({
 50376                  data: e.circular,
 50377                  defaultValue: 0,
 50378                  validate: (e) => 1 === e,
 50379                });
 50380                this.hand = (0, c.getStringOption)(e.hand, [
 50381                  "even",
 50382                  "left",
 50383                  "right",
 50384                ]);
 50385                this.id = e.id || "";
 50386                this.startAngle = (0, c.getFloat)({
 50387                  data: e.startAngle,
 50388                  defaultValue: 0,
 50389                  validate: (e) => !0,
 50390                });
 50391                this.sweepAngle = (0, c.getFloat)({
 50392                  data: e.sweepAngle,
 50393                  defaultValue: 360,
 50394                  validate: (e) => !0,
 50395                });
 50396                this.use = e.use || "";
 50397                this.usehref = e.usehref || "";
 50398                this.edge = null;
 50399                this.fill = null;
 50400              }
 50401              [r.$toHTML]() {
 50402                const e = this.edge || new Edge({}),
 50403                  t = e[r.$toStyle](),
 50404                  a = Object.create(null);
 50405                "visible" === this.fill?.presence
 50406                  ? Object.assign(a, this.fill[r.$toStyle]())
 50407                  : (a.fill = "transparent");
 50408                a.strokeWidth = (0, s.measureToString)(
 50409                  "visible" === e.presence ? e.thickness : 0,
 50410                );
 50411                a.stroke = t.color;
 50412                let n;
 50413                const i = {
 50414                  xmlns: g,
 50415                  style: { width: "100%", height: "100%", overflow: "visible" },
 50416                };
 50417                if (360 === this.sweepAngle)
 50418                  n = {
 50419                    name: "ellipse",
 50420                    attributes: {
 50421                      xmlns: g,
 50422                      cx: "50%",
 50423                      cy: "50%",
 50424                      rx: "50%",
 50425                      ry: "50%",
 50426                      style: a,
 50427                    },
 50428                  };
 50429                else {
 50430                  const e = (this.startAngle * Math.PI) / 180,
 50431                    t = (this.sweepAngle * Math.PI) / 180,
 50432                    r = this.sweepAngle > 180 ? 1 : 0,
 50433                    [s, o, c, l] = [
 50434                      50 * (1 + Math.cos(e)),
 50435                      50 * (1 - Math.sin(e)),
 50436                      50 * (1 + Math.cos(e + t)),
 50437                      50 * (1 - Math.sin(e + t)),
 50438                    ];
 50439                  n = {
 50440                    name: "path",
 50441                    attributes: {
 50442                      xmlns: g,
 50443                      d: `M ${s} ${o} A 50 50 0 ${r} 0 ${c} ${l}`,
 50444                      vectorEffect: "non-scaling-stroke",
 50445                      style: a,
 50446                    },
 50447                  };
 50448                  Object.assign(i, {
 50449                    viewBox: "0 0 100 100",
 50450                    preserveAspectRatio: "none",
 50451                  });
 50452                }
 50453                const o = { name: "svg", children: [n], attributes: i };
 50454                if (hasMargin(this[r.$getParent]()[r.$getParent]()))
 50455                  return c.HTMLResult.success({
 50456                    name: "div",
 50457                    attributes: {
 50458                      style: { display: "inline", width: "100%", height: "100%" },
 50459                    },
 50460                    children: [o],
 50461                  });
 50462                o.attributes.style.position = "absolute";
 50463                return c.HTMLResult.success(o);
 50464              }
 50465            }
 50466            class Area extends o.XFAObject {
 50467              constructor(e) {
 50468                super(f, "area", !0);
 50469                this.colSpan = (0, c.getInteger)({
 50470                  data: e.colSpan,
 50471                  defaultValue: 1,
 50472                  validate: (e) => e >= 1 || -1 === e,
 50473                });
 50474                this.id = e.id || "";
 50475                this.name = e.name || "";
 50476                this.relevant = (0, c.getRelevant)(e.relevant);
 50477                this.use = e.use || "";
 50478                this.usehref = e.usehref || "";
 50479                this.x = (0, c.getMeasurement)(e.x, "0pt");
 50480                this.y = (0, c.getMeasurement)(e.y, "0pt");
 50481                this.desc = null;
 50482                this.extras = null;
 50483                this.area = new o.XFAObjectArray();
 50484                this.draw = new o.XFAObjectArray();
 50485                this.exObject = new o.XFAObjectArray();
 50486                this.exclGroup = new o.XFAObjectArray();
 50487                this.field = new o.XFAObjectArray();
 50488                this.subform = new o.XFAObjectArray();
 50489                this.subformSet = new o.XFAObjectArray();
 50490              }
 50491              *[r.$getContainedChildren]() {
 50492                yield* getContainedChildren(this);
 50493              }
 50494              [r.$isTransparent]() {
 50495                return !0;
 50496              }
 50497              [r.$isBindable]() {
 50498                return !0;
 50499              }
 50500              [r.$addHTML](e, t) {
 50501                const [a, n, i, s] = t;
 50502                this[r.$extra].width = Math.max(this[r.$extra].width, a + i);
 50503                this[r.$extra].height = Math.max(this[r.$extra].height, n + s);
 50504                this[r.$extra].children.push(e);
 50505              }
 50506              [r.$getAvailableSpace]() {
 50507                return this[r.$extra].availableSpace;
 50508              }
 50509              [r.$toHTML](e) {
 50510                const t = (0, s.toStyle)(this, "position"),
 50511                  a = { style: t, id: this[r.$uid], class: ["xfaArea"] };
 50512                (0, s.isPrintOnly)(this) && a.class.push("xfaPrintOnly");
 50513                this.name && (a.xfaName = this.name);
 50514                const n = [];
 50515                this[r.$extra] = {
 50516                  children: n,
 50517                  width: 0,
 50518                  height: 0,
 50519                  availableSpace: e,
 50520                };
 50521                const i = this[r.$childrenToHTML]({
 50522                  filter: new Set([
 50523                    "area",
 50524                    "draw",
 50525                    "field",
 50526                    "exclGroup",
 50527                    "subform",
 50528                    "subformSet",
 50529                  ]),
 50530                  include: !0,
 50531                });
 50532                if (!i.success) {
 50533                  if (i.isBreak()) return i;
 50534                  delete this[r.$extra];
 50535                  return c.HTMLResult.FAILURE;
 50536                }
 50537                t.width = (0, s.measureToString)(this[r.$extra].width);
 50538                t.height = (0, s.measureToString)(this[r.$extra].height);
 50539                const o = { name: "div", attributes: a, children: n },
 50540                  l = [
 50541                    this.x,
 50542                    this.y,
 50543                    this[r.$extra].width,
 50544                    this[r.$extra].height,
 50545                  ];
 50546                delete this[r.$extra];
 50547                return c.HTMLResult.success(o, l);
 50548              }
 50549            }
 50550            class Assist extends o.XFAObject {
 50551              constructor(e) {
 50552                super(f, "assist", !0);
 50553                this.id = e.id || "";
 50554                this.role = e.role || "";
 50555                this.use = e.use || "";
 50556                this.usehref = e.usehref || "";
 50557                this.speak = null;
 50558                this.toolTip = null;
 50559              }
 50560              [r.$toHTML]() {
 50561                return this.toolTip?.[r.$content] || null;
 50562              }
 50563            }
 50564            class Barcode extends o.XFAObject {
 50565              constructor(e) {
 50566                super(f, "barcode", !0);
 50567                this.charEncoding = (0, c.getKeyword)({
 50568                  data: e.charEncoding ? e.charEncoding.toLowerCase() : "",
 50569                  defaultValue: "",
 50570                  validate: (e) =>
 50571                    [
 50572                      "utf-8",
 50573                      "big-five",
 50574                      "fontspecific",
 50575                      "gbk",
 50576                      "gb-18030",
 50577                      "gb-2312",
 50578                      "ksc-5601",
 50579                      "none",
 50580                      "shift-jis",
 50581                      "ucs-2",
 50582                      "utf-16",
 50583                    ].includes(e) || e.match(/iso-8859-\d{2}/),
 50584                });
 50585                this.checksum = (0, c.getStringOption)(e.checksum, [
 50586                  "none",
 50587                  "1mod10",
 50588                  "1mod10_1mod11",
 50589                  "2mod10",
 50590                  "auto",
 50591                ]);
 50592                this.dataColumnCount = (0, c.getInteger)({
 50593                  data: e.dataColumnCount,
 50594                  defaultValue: -1,
 50595                  validate: (e) => e >= 0,
 50596                });
 50597                this.dataLength = (0, c.getInteger)({
 50598                  data: e.dataLength,
 50599                  defaultValue: -1,
 50600                  validate: (e) => e >= 0,
 50601                });
 50602                this.dataPrep = (0, c.getStringOption)(e.dataPrep, [
 50603                  "none",
 50604                  "flateCompress",
 50605                ]);
 50606                this.dataRowCount = (0, c.getInteger)({
 50607                  data: e.dataRowCount,
 50608                  defaultValue: -1,
 50609                  validate: (e) => e >= 0,
 50610                });
 50611                this.endChar = e.endChar || "";
 50612                this.errorCorrectionLevel = (0, c.getInteger)({
 50613                  data: e.errorCorrectionLevel,
 50614                  defaultValue: -1,
 50615                  validate: (e) => e >= 0 && e <= 8,
 50616                });
 50617                this.id = e.id || "";
 50618                this.moduleHeight = (0, c.getMeasurement)(e.moduleHeight, "5mm");
 50619                this.moduleWidth = (0, c.getMeasurement)(e.moduleWidth, "0.25mm");
 50620                this.printCheckDigit = (0, c.getInteger)({
 50621                  data: e.printCheckDigit,
 50622                  defaultValue: 0,
 50623                  validate: (e) => 1 === e,
 50624                });
 50625                this.rowColumnRatio = (0, c.getRatio)(e.rowColumnRatio);
 50626                this.startChar = e.startChar || "";
 50627                this.textLocation = (0, c.getStringOption)(e.textLocation, [
 50628                  "below",
 50629                  "above",
 50630                  "aboveEmbedded",
 50631                  "belowEmbedded",
 50632                  "none",
 50633                ]);
 50634                this.truncate = (0, c.getInteger)({
 50635                  data: e.truncate,
 50636                  defaultValue: 0,
 50637                  validate: (e) => 1 === e,
 50638                });
 50639                this.type = (0, c.getStringOption)(
 50640                  e.type ? e.type.toLowerCase() : "",
 50641                  [
 50642                    "aztec",
 50643                    "codabar",
 50644                    "code2of5industrial",
 50645                    "code2of5interleaved",
 50646                    "code2of5matrix",
 50647                    "code2of5standard",
 50648                    "code3of9",
 50649                    "code3of9extended",
 50650                    "code11",
 50651                    "code49",
 50652                    "code93",
 50653                    "code128",
 50654                    "code128a",
 50655                    "code128b",
 50656                    "code128c",
 50657                    "code128sscc",
 50658                    "datamatrix",
 50659                    "ean8",
 50660                    "ean8add2",
 50661                    "ean8add5",
 50662                    "ean13",
 50663                    "ean13add2",
 50664                    "ean13add5",
 50665                    "ean13pwcd",
 50666                    "fim",
 50667                    "logmars",
 50668                    "maxicode",
 50669                    "msi",
 50670                    "pdf417",
 50671                    "pdf417macro",
 50672                    "plessey",
 50673                    "postauscust2",
 50674                    "postauscust3",
 50675                    "postausreplypaid",
 50676                    "postausstandard",
 50677                    "postukrm4scc",
 50678                    "postusdpbc",
 50679                    "postusimb",
 50680                    "postusstandard",
 50681                    "postus5zip",
 50682                    "qrcode",
 50683                    "rfid",
 50684                    "rss14",
 50685                    "rss14expanded",
 50686                    "rss14limited",
 50687                    "rss14stacked",
 50688                    "rss14stackedomni",
 50689                    "rss14truncated",
 50690                    "telepen",
 50691                    "ucc128",
 50692                    "ucc128random",
 50693                    "ucc128sscc",
 50694                    "upca",
 50695                    "upcaadd2",
 50696                    "upcaadd5",
 50697                    "upcapwcd",
 50698                    "upce",
 50699                    "upceadd2",
 50700                    "upceadd5",
 50701                    "upcean2",
 50702                    "upcean5",
 50703                    "upsmaxicode",
 50704                  ],
 50705                );
 50706                this.upsMode = (0, c.getStringOption)(e.upsMode, [
 50707                  "usCarrier",
 50708                  "internationalCarrier",
 50709                  "secureSymbol",
 50710                  "standardSymbol",
 50711                ]);
 50712                this.use = e.use || "";
 50713                this.usehref = e.usehref || "";
 50714                this.wideNarrowRatio = (0, c.getRatio)(e.wideNarrowRatio);
 50715                this.encrypt = null;
 50716                this.extras = null;
 50717              }
 50718            }
 50719            class Bind extends o.XFAObject {
 50720              constructor(e) {
 50721                super(f, "bind", !0);
 50722                this.match = (0, c.getStringOption)(e.match, [
 50723                  "once",
 50724                  "dataRef",
 50725                  "global",
 50726                  "none",
 50727                ]);
 50728                this.ref = e.ref || "";
 50729                this.picture = null;
 50730              }
 50731            }
 50732            class BindItems extends o.XFAObject {
 50733              constructor(e) {
 50734                super(f, "bindItems");
 50735                this.connection = e.connection || "";
 50736                this.labelRef = e.labelRef || "";
 50737                this.ref = e.ref || "";
 50738                this.valueRef = e.valueRef || "";
 50739              }
 50740            }
 50741            t.BindItems = BindItems;
 50742            class Bookend extends o.XFAObject {
 50743              constructor(e) {
 50744                super(f, "bookend");
 50745                this.id = e.id || "";
 50746                this.leader = e.leader || "";
 50747                this.trailer = e.trailer || "";
 50748                this.use = e.use || "";
 50749                this.usehref = e.usehref || "";
 50750              }
 50751            }
 50752            class BooleanElement extends o.Option01 {
 50753              constructor(e) {
 50754                super(f, "boolean");
 50755                this.id = e.id || "";
 50756                this.name = e.name || "";
 50757                this.use = e.use || "";
 50758                this.usehref = e.usehref || "";
 50759              }
 50760              [r.$toHTML](e) {
 50761                return valueToHtml(1 === this[r.$content] ? "1" : "0");
 50762              }
 50763            }
 50764            class Border extends o.XFAObject {
 50765              constructor(e) {
 50766                super(f, "border", !0);
 50767                this.break = (0, c.getStringOption)(e.break, ["close", "open"]);
 50768                this.hand = (0, c.getStringOption)(e.hand, [
 50769                  "even",
 50770                  "left",
 50771                  "right",
 50772                ]);
 50773                this.id = e.id || "";
 50774                this.presence = (0, c.getStringOption)(e.presence, [
 50775                  "visible",
 50776                  "hidden",
 50777                  "inactive",
 50778                  "invisible",
 50779                ]);
 50780                this.relevant = (0, c.getRelevant)(e.relevant);
 50781                this.use = e.use || "";
 50782                this.usehref = e.usehref || "";
 50783                this.corner = new o.XFAObjectArray(4);
 50784                this.edge = new o.XFAObjectArray(4);
 50785                this.extras = null;
 50786                this.fill = null;
 50787                this.margin = null;
 50788              }
 50789              [r.$getExtra]() {
 50790                if (!this[r.$extra]) {
 50791                  const e = this.edge.children.slice();
 50792                  if (e.length < 4) {
 50793                    const t = e.at(-1) || new Edge({});
 50794                    for (let a = e.length; a < 4; a++) e.push(t);
 50795                  }
 50796                  const t = e.map((e) => e.thickness),
 50797                    a = [0, 0, 0, 0];
 50798                  if (this.margin) {
 50799                    a[0] = this.margin.topInset;
 50800                    a[1] = this.margin.rightInset;
 50801                    a[2] = this.margin.bottomInset;
 50802                    a[3] = this.margin.leftInset;
 50803                  }
 50804                  this[r.$extra] = { widths: t, insets: a, edges: e };
 50805                }
 50806                return this[r.$extra];
 50807              }
 50808              [r.$toStyle]() {
 50809                const { edges: e } = this[r.$getExtra](),
 50810                  t = e.map((e) => {
 50811                    const t = e[r.$toStyle]();
 50812                    t.color ||= "#000000";
 50813                    return t;
 50814                  }),
 50815                  a = Object.create(null);
 50816                this.margin && Object.assign(a, this.margin[r.$toStyle]());
 50817                "visible" === this.fill?.presence &&
 50818                  Object.assign(a, this.fill[r.$toStyle]());
 50819                if (this.corner.children.some((e) => 0 !== e.radius)) {
 50820                  const e = this.corner.children.map((e) => e[r.$toStyle]());
 50821                  if (2 === e.length || 3 === e.length) {
 50822                    const t = e.at(-1);
 50823                    for (let a = e.length; a < 4; a++) e.push(t);
 50824                  }
 50825                  a.borderRadius = e.map((e) => e.radius).join(" ");
 50826                }
 50827                switch (this.presence) {
 50828                  case "invisible":
 50829                  case "hidden":
 50830                    a.borderStyle = "";
 50831                    break;
 50832                  case "inactive":
 50833                    a.borderStyle = "none";
 50834                    break;
 50835                  default:
 50836                    a.borderStyle = t.map((e) => e.style).join(" ");
 50837                }
 50838                a.borderWidth = t.map((e) => e.width).join(" ");
 50839                a.borderColor = t.map((e) => e.color).join(" ");
 50840                return a;
 50841              }
 50842            }
 50843            class Break extends o.XFAObject {
 50844              constructor(e) {
 50845                super(f, "break", !0);
 50846                this.after = (0, c.getStringOption)(e.after, [
 50847                  "auto",
 50848                  "contentArea",
 50849                  "pageArea",
 50850                  "pageEven",
 50851                  "pageOdd",
 50852                ]);
 50853                this.afterTarget = e.afterTarget || "";
 50854                this.before = (0, c.getStringOption)(e.before, [
 50855                  "auto",
 50856                  "contentArea",
 50857                  "pageArea",
 50858                  "pageEven",
 50859                  "pageOdd",
 50860                ]);
 50861                this.beforeTarget = e.beforeTarget || "";
 50862                this.bookendLeader = e.bookendLeader || "";
 50863                this.bookendTrailer = e.bookendTrailer || "";
 50864                this.id = e.id || "";
 50865                this.overflowLeader = e.overflowLeader || "";
 50866                this.overflowTarget = e.overflowTarget || "";
 50867                this.overflowTrailer = e.overflowTrailer || "";
 50868                this.startNew = (0, c.getInteger)({
 50869                  data: e.startNew,
 50870                  defaultValue: 0,
 50871                  validate: (e) => 1 === e,
 50872                });
 50873                this.use = e.use || "";
 50874                this.usehref = e.usehref || "";
 50875                this.extras = null;
 50876              }
 50877            }
 50878            class BreakAfter extends o.XFAObject {
 50879              constructor(e) {
 50880                super(f, "breakAfter", !0);
 50881                this.id = e.id || "";
 50882                this.leader = e.leader || "";
 50883                this.startNew = (0, c.getInteger)({
 50884                  data: e.startNew,
 50885                  defaultValue: 0,
 50886                  validate: (e) => 1 === e,
 50887                });
 50888                this.target = e.target || "";
 50889                this.targetType = (0, c.getStringOption)(e.targetType, [
 50890                  "auto",
 50891                  "contentArea",
 50892                  "pageArea",
 50893                ]);
 50894                this.trailer = e.trailer || "";
 50895                this.use = e.use || "";
 50896                this.usehref = e.usehref || "";
 50897                this.script = null;
 50898              }
 50899            }
 50900            class BreakBefore extends o.XFAObject {
 50901              constructor(e) {
 50902                super(f, "breakBefore", !0);
 50903                this.id = e.id || "";
 50904                this.leader = e.leader || "";
 50905                this.startNew = (0, c.getInteger)({
 50906                  data: e.startNew,
 50907                  defaultValue: 0,
 50908                  validate: (e) => 1 === e,
 50909                });
 50910                this.target = e.target || "";
 50911                this.targetType = (0, c.getStringOption)(e.targetType, [
 50912                  "auto",
 50913                  "contentArea",
 50914                  "pageArea",
 50915                ]);
 50916                this.trailer = e.trailer || "";
 50917                this.use = e.use || "";
 50918                this.usehref = e.usehref || "";
 50919                this.script = null;
 50920              }
 50921              [r.$toHTML](e) {
 50922                this[r.$extra] = {};
 50923                return c.HTMLResult.FAILURE;
 50924              }
 50925            }
 50926            class Button extends o.XFAObject {
 50927              constructor(e) {
 50928                super(f, "button", !0);
 50929                this.highlight = (0, c.getStringOption)(e.highlight, [
 50930                  "inverted",
 50931                  "none",
 50932                  "outline",
 50933                  "push",
 50934                ]);
 50935                this.id = e.id || "";
 50936                this.use = e.use || "";
 50937                this.usehref = e.usehref || "";
 50938                this.extras = null;
 50939              }
 50940              [r.$toHTML](e) {
 50941                const t = this[r.$getParent]()[r.$getParent](),
 50942                  a = {
 50943                    name: "button",
 50944                    attributes: {
 50945                      id: this[r.$uid],
 50946                      class: ["xfaButton"],
 50947                      style: {},
 50948                    },
 50949                    children: [],
 50950                  };
 50951                for (const e of t.event.children) {
 50952                  if ("click" !== e.activity || !e.script) continue;
 50953                  const t = (0, u.recoverJsURL)(e.script[r.$content]);
 50954                  if (!t) continue;
 50955                  const n = (0, s.fixURL)(t.url);
 50956                  n &&
 50957                    a.children.push({
 50958                      name: "a",
 50959                      attributes: {
 50960                        id: "link" + this[r.$uid],
 50961                        href: n,
 50962                        newWindow: t.newWindow,
 50963                        class: ["xfaLink"],
 50964                        style: {},
 50965                      },
 50966                      children: [],
 50967                    });
 50968                }
 50969                return c.HTMLResult.success(a);
 50970              }
 50971            }
 50972            class Calculate extends o.XFAObject {
 50973              constructor(e) {
 50974                super(f, "calculate", !0);
 50975                this.id = e.id || "";
 50976                this.override = (0, c.getStringOption)(e.override, [
 50977                  "disabled",
 50978                  "error",
 50979                  "ignore",
 50980                  "warning",
 50981                ]);
 50982                this.use = e.use || "";
 50983                this.usehref = e.usehref || "";
 50984                this.extras = null;
 50985                this.message = null;
 50986                this.script = null;
 50987              }
 50988            }
 50989            class Caption extends o.XFAObject {
 50990              constructor(e) {
 50991                super(f, "caption", !0);
 50992                this.id = e.id || "";
 50993                this.placement = (0, c.getStringOption)(e.placement, [
 50994                  "left",
 50995                  "bottom",
 50996                  "inline",
 50997                  "right",
 50998                  "top",
 50999                ]);
 51000                this.presence = (0, c.getStringOption)(e.presence, [
 51001                  "visible",
 51002                  "hidden",
 51003                  "inactive",
 51004                  "invisible",
 51005                ]);
 51006                this.reserve = Math.ceil((0, c.getMeasurement)(e.reserve));
 51007                this.use = e.use || "";
 51008                this.usehref = e.usehref || "";
 51009                this.extras = null;
 51010                this.font = null;
 51011                this.margin = null;
 51012                this.para = null;
 51013                this.value = null;
 51014              }
 51015              [r.$setValue](e) {
 51016                _setValue(this, e);
 51017              }
 51018              [r.$getExtra](e) {
 51019                if (!this[r.$extra]) {
 51020                  let { width: t, height: a } = e;
 51021                  switch (this.placement) {
 51022                    case "left":
 51023                    case "right":
 51024                    case "inline":
 51025                      t = this.reserve <= 0 ? t : this.reserve;
 51026                      break;
 51027                    case "top":
 51028                    case "bottom":
 51029                      a = this.reserve <= 0 ? a : this.reserve;
 51030                  }
 51031                  this[r.$extra] = (0, s.layoutNode)(this, {
 51032                    width: t,
 51033                    height: a,
 51034                  });
 51035                }
 51036                return this[r.$extra];
 51037              }
 51038              [r.$toHTML](e) {
 51039                if (!this.value) return c.HTMLResult.EMPTY;
 51040                this[r.$pushPara]();
 51041                const t = this.value[r.$toHTML](e).html;
 51042                if (!t) {
 51043                  this[r.$popPara]();
 51044                  return c.HTMLResult.EMPTY;
 51045                }
 51046                const a = this.reserve;
 51047                if (this.reserve <= 0) {
 51048                  const { w: t, h: a } = this[r.$getExtra](e);
 51049                  switch (this.placement) {
 51050                    case "left":
 51051                    case "right":
 51052                    case "inline":
 51053                      this.reserve = t;
 51054                      break;
 51055                    case "top":
 51056                    case "bottom":
 51057                      this.reserve = a;
 51058                  }
 51059                }
 51060                const n = [];
 51061                "string" == typeof t
 51062                  ? n.push({ name: "#text", value: t })
 51063                  : n.push(t);
 51064                const i = (0, s.toStyle)(this, "font", "margin", "visibility");
 51065                switch (this.placement) {
 51066                  case "left":
 51067                  case "right":
 51068                    this.reserve > 0 &&
 51069                      (i.width = (0, s.measureToString)(this.reserve));
 51070                    break;
 51071                  case "top":
 51072                  case "bottom":
 51073                    this.reserve > 0 &&
 51074                      (i.height = (0, s.measureToString)(this.reserve));
 51075                }
 51076                (0, s.setPara)(this, null, t);
 51077                this[r.$popPara]();
 51078                this.reserve = a;
 51079                return c.HTMLResult.success({
 51080                  name: "div",
 51081                  attributes: { style: i, class: ["xfaCaption"] },
 51082                  children: n,
 51083                });
 51084              }
 51085            }
 51086            class Certificate extends o.StringObject {
 51087              constructor(e) {
 51088                super(f, "certificate");
 51089                this.id = e.id || "";
 51090                this.name = e.name || "";
 51091                this.use = e.use || "";
 51092                this.usehref = e.usehref || "";
 51093              }
 51094            }
 51095            class Certificates extends o.XFAObject {
 51096              constructor(e) {
 51097                super(f, "certificates", !0);
 51098                this.credentialServerPolicy = (0, c.getStringOption)(
 51099                  e.credentialServerPolicy,
 51100                  ["optional", "required"],
 51101                );
 51102                this.id = e.id || "";
 51103                this.url = e.url || "";
 51104                this.urlPolicy = e.urlPolicy || "";
 51105                this.use = e.use || "";
 51106                this.usehref = e.usehref || "";
 51107                this.encryption = null;
 51108                this.issuers = null;
 51109                this.keyUsage = null;
 51110                this.oids = null;
 51111                this.signing = null;
 51112                this.subjectDNs = null;
 51113              }
 51114            }
 51115            class CheckButton extends o.XFAObject {
 51116              constructor(e) {
 51117                super(f, "checkButton", !0);
 51118                this.id = e.id || "";
 51119                this.mark = (0, c.getStringOption)(e.mark, [
 51120                  "default",
 51121                  "check",
 51122                  "circle",
 51123                  "cross",
 51124                  "diamond",
 51125                  "square",
 51126                  "star",
 51127                ]);
 51128                this.shape = (0, c.getStringOption)(e.shape, ["square", "round"]);
 51129                this.size = (0, c.getMeasurement)(e.size, "10pt");
 51130                this.use = e.use || "";
 51131                this.usehref = e.usehref || "";
 51132                this.border = null;
 51133                this.extras = null;
 51134                this.margin = null;
 51135              }
 51136              [r.$toHTML](e) {
 51137                const t = (0, s.toStyle)("margin"),
 51138                  a = (0, s.measureToString)(this.size);
 51139                t.width = t.height = a;
 51140                let n, i, o;
 51141                const l = this[r.$getParent]()[r.$getParent](),
 51142                  h =
 51143                    (l.items.children.length &&
 51144                      l.items.children[0][r.$toHTML]().html) ||
 51145                    [],
 51146                  u = {
 51147                    on: (void 0 !== h[0] ? h[0] : "on").toString(),
 51148                    off: (void 0 !== h[1] ? h[1] : "off").toString(),
 51149                  },
 51150                  d = (l.value?.[r.$text]() || "off") === u.on || void 0,
 51151                  f = l[r.$getSubformParent](),
 51152                  g = l[r.$uid];
 51153                let p;
 51154                if (f instanceof ExclGroup) {
 51155                  o = f[r.$uid];
 51156                  n = "radio";
 51157                  i = "xfaRadio";
 51158                  p = f[r.$data]?.[r.$uid] || f[r.$uid];
 51159                } else {
 51160                  n = "checkbox";
 51161                  i = "xfaCheckbox";
 51162                  p = l[r.$data]?.[r.$uid] || l[r.$uid];
 51163                }
 51164                const m = {
 51165                  name: "input",
 51166                  attributes: {
 51167                    class: [i],
 51168                    style: t,
 51169                    fieldId: g,
 51170                    dataId: p,
 51171                    type: n,
 51172                    checked: d,
 51173                    xfaOn: u.on,
 51174                    xfaOff: u.off,
 51175                    "aria-label": ariaLabel(l),
 51176                    "aria-required": !1,
 51177                  },
 51178                };
 51179                o && (m.attributes.name = o);
 51180                if (isRequired(l)) {
 51181                  m.attributes["aria-required"] = !0;
 51182                  m.attributes.required = !0;
 51183                }
 51184                return c.HTMLResult.success({
 51185                  name: "label",
 51186                  attributes: { class: ["xfaLabel"] },
 51187                  children: [m],
 51188                });
 51189              }
 51190            }
 51191            class ChoiceList extends o.XFAObject {
 51192              constructor(e) {
 51193                super(f, "choiceList", !0);
 51194                this.commitOn = (0, c.getStringOption)(e.commitOn, [
 51195                  "select",
 51196                  "exit",
 51197                ]);
 51198                this.id = e.id || "";
 51199                this.open = (0, c.getStringOption)(e.open, [
 51200                  "userControl",
 51201                  "always",
 51202                  "multiSelect",
 51203                  "onEntry",
 51204                ]);
 51205                this.textEntry = (0, c.getInteger)({
 51206                  data: e.textEntry,
 51207                  defaultValue: 0,
 51208                  validate: (e) => 1 === e,
 51209                });
 51210                this.use = e.use || "";
 51211                this.usehref = e.usehref || "";
 51212                this.border = null;
 51213                this.extras = null;
 51214                this.margin = null;
 51215              }
 51216              [r.$toHTML](e) {
 51217                const t = (0, s.toStyle)(this, "border", "margin"),
 51218                  a = this[r.$getParent]()[r.$getParent](),
 51219                  n = {
 51220                    fontSize: `calc(${a.font?.size || 10}px * var(--scale-factor))`,
 51221                  },
 51222                  i = [];
 51223                if (a.items.children.length > 0) {
 51224                  const e = a.items;
 51225                  let t = 0,
 51226                    s = 0;
 51227                  if (2 === e.children.length) {
 51228                    t = e.children[0].save;
 51229                    s = 1 - t;
 51230                  }
 51231                  const o = e.children[t][r.$toHTML]().html,
 51232                    c = e.children[s][r.$toHTML]().html;
 51233                  let l = !1;
 51234                  const h = a.value?.[r.$text]() || "";
 51235                  for (let e = 0, t = o.length; e < t; e++) {
 51236                    const t = {
 51237                      name: "option",
 51238                      attributes: { value: c[e] || o[e], style: n },
 51239                      value: o[e],
 51240                    };
 51241                    c[e] === h && (t.attributes.selected = l = !0);
 51242                    i.push(t);
 51243                  }
 51244                  l ||
 51245                    i.splice(0, 0, {
 51246                      name: "option",
 51247                      attributes: { hidden: !0, selected: !0 },
 51248                      value: " ",
 51249                    });
 51250                }
 51251                const o = {
 51252                  class: ["xfaSelect"],
 51253                  fieldId: a[r.$uid],
 51254                  dataId: a[r.$data]?.[r.$uid] || a[r.$uid],
 51255                  style: t,
 51256                  "aria-label": ariaLabel(a),
 51257                  "aria-required": !1,
 51258                };
 51259                if (isRequired(a)) {
 51260                  o["aria-required"] = !0;
 51261                  o.required = !0;
 51262                }
 51263                "multiSelect" === this.open && (o.multiple = !0);
 51264                return c.HTMLResult.success({
 51265                  name: "label",
 51266                  attributes: { class: ["xfaLabel"] },
 51267                  children: [{ name: "select", children: i, attributes: o }],
 51268                });
 51269              }
 51270            }
 51271            class Color extends o.XFAObject {
 51272              constructor(e) {
 51273                super(f, "color", !0);
 51274                this.cSpace = (0, c.getStringOption)(e.cSpace, ["SRGB"]);
 51275                this.id = e.id || "";
 51276                this.use = e.use || "";
 51277                this.usehref = e.usehref || "";
 51278                this.value = e.value ? (0, c.getColor)(e.value) : "";
 51279                this.extras = null;
 51280              }
 51281              [r.$hasSettableValue]() {
 51282                return !1;
 51283              }
 51284              [r.$toStyle]() {
 51285                return this.value
 51286                  ? l.Util.makeHexColor(this.value.r, this.value.g, this.value.b)
 51287                  : null;
 51288              }
 51289            }
 51290            class Comb extends o.XFAObject {
 51291              constructor(e) {
 51292                super(f, "comb");
 51293                this.id = e.id || "";
 51294                this.numberOfCells = (0, c.getInteger)({
 51295                  data: e.numberOfCells,
 51296                  defaultValue: 0,
 51297                  validate: (e) => e >= 0,
 51298                });
 51299                this.use = e.use || "";
 51300                this.usehref = e.usehref || "";
 51301              }
 51302            }
 51303            class Connect extends o.XFAObject {
 51304              constructor(e) {
 51305                super(f, "connect", !0);
 51306                this.connection = e.connection || "";
 51307                this.id = e.id || "";
 51308                this.ref = e.ref || "";
 51309                this.usage = (0, c.getStringOption)(e.usage, [
 51310                  "exportAndImport",
 51311                  "exportOnly",
 51312                  "importOnly",
 51313                ]);
 51314                this.use = e.use || "";
 51315                this.usehref = e.usehref || "";
 51316                this.picture = null;
 51317              }
 51318            }
 51319            class ContentArea extends o.XFAObject {
 51320              constructor(e) {
 51321                super(f, "contentArea", !0);
 51322                this.h = (0, c.getMeasurement)(e.h);
 51323                this.id = e.id || "";
 51324                this.name = e.name || "";
 51325                this.relevant = (0, c.getRelevant)(e.relevant);
 51326                this.use = e.use || "";
 51327                this.usehref = e.usehref || "";
 51328                this.w = (0, c.getMeasurement)(e.w);
 51329                this.x = (0, c.getMeasurement)(e.x, "0pt");
 51330                this.y = (0, c.getMeasurement)(e.y, "0pt");
 51331                this.desc = null;
 51332                this.extras = null;
 51333              }
 51334              [r.$toHTML](e) {
 51335                const t = {
 51336                    left: (0, s.measureToString)(this.x),
 51337                    top: (0, s.measureToString)(this.y),
 51338                    width: (0, s.measureToString)(this.w),
 51339                    height: (0, s.measureToString)(this.h),
 51340                  },
 51341                  a = ["xfaContentarea"];
 51342                (0, s.isPrintOnly)(this) && a.push("xfaPrintOnly");
 51343                return c.HTMLResult.success({
 51344                  name: "div",
 51345                  children: [],
 51346                  attributes: { style: t, class: a, id: this[r.$uid] },
 51347                });
 51348              }
 51349            }
 51350            class Corner extends o.XFAObject {
 51351              constructor(e) {
 51352                super(f, "corner", !0);
 51353                this.id = e.id || "";
 51354                this.inverted = (0, c.getInteger)({
 51355                  data: e.inverted,
 51356                  defaultValue: 0,
 51357                  validate: (e) => 1 === e,
 51358                });
 51359                this.join = (0, c.getStringOption)(e.join, ["square", "round"]);
 51360                this.presence = (0, c.getStringOption)(e.presence, [
 51361                  "visible",
 51362                  "hidden",
 51363                  "inactive",
 51364                  "invisible",
 51365                ]);
 51366                this.radius = (0, c.getMeasurement)(e.radius);
 51367                this.stroke = (0, c.getStringOption)(e.stroke, [
 51368                  "solid",
 51369                  "dashDot",
 51370                  "dashDotDot",
 51371                  "dashed",
 51372                  "dotted",
 51373                  "embossed",
 51374                  "etched",
 51375                  "lowered",
 51376                  "raised",
 51377                ]);
 51378                this.thickness = (0, c.getMeasurement)(e.thickness, "0.5pt");
 51379                this.use = e.use || "";
 51380                this.usehref = e.usehref || "";
 51381                this.color = null;
 51382                this.extras = null;
 51383              }
 51384              [r.$toStyle]() {
 51385                const e = (0, s.toStyle)(this, "visibility");
 51386                e.radius = (0, s.measureToString)(
 51387                  "square" === this.join ? 0 : this.radius,
 51388                );
 51389                return e;
 51390              }
 51391            }
 51392            class DateElement extends o.ContentObject {
 51393              constructor(e) {
 51394                super(f, "date");
 51395                this.id = e.id || "";
 51396                this.name = e.name || "";
 51397                this.use = e.use || "";
 51398                this.usehref = e.usehref || "";
 51399              }
 51400              [r.$finalize]() {
 51401                const e = this[r.$content].trim();
 51402                this[r.$content] = e ? new Date(e) : null;
 51403              }
 51404              [r.$toHTML](e) {
 51405                return valueToHtml(
 51406                  this[r.$content] ? this[r.$content].toString() : "",
 51407                );
 51408              }
 51409            }
 51410            class DateTime extends o.ContentObject {
 51411              constructor(e) {
 51412                super(f, "dateTime");
 51413                this.id = e.id || "";
 51414                this.name = e.name || "";
 51415                this.use = e.use || "";
 51416                this.usehref = e.usehref || "";
 51417              }
 51418              [r.$finalize]() {
 51419                const e = this[r.$content].trim();
 51420                this[r.$content] = e ? new Date(e) : null;
 51421              }
 51422              [r.$toHTML](e) {
 51423                return valueToHtml(
 51424                  this[r.$content] ? this[r.$content].toString() : "",
 51425                );
 51426              }
 51427            }
 51428            class DateTimeEdit extends o.XFAObject {
 51429              constructor(e) {
 51430                super(f, "dateTimeEdit", !0);
 51431                this.hScrollPolicy = (0, c.getStringOption)(e.hScrollPolicy, [
 51432                  "auto",
 51433                  "off",
 51434                  "on",
 51435                ]);
 51436                this.id = e.id || "";
 51437                this.picker = (0, c.getStringOption)(e.picker, ["host", "none"]);
 51438                this.use = e.use || "";
 51439                this.usehref = e.usehref || "";
 51440                this.border = null;
 51441                this.comb = null;
 51442                this.extras = null;
 51443                this.margin = null;
 51444              }
 51445              [r.$toHTML](e) {
 51446                const t = (0, s.toStyle)(this, "border", "font", "margin"),
 51447                  a = this[r.$getParent]()[r.$getParent](),
 51448                  n = {
 51449                    name: "input",
 51450                    attributes: {
 51451                      type: "text",
 51452                      fieldId: a[r.$uid],
 51453                      dataId: a[r.$data]?.[r.$uid] || a[r.$uid],
 51454                      class: ["xfaTextfield"],
 51455                      style: t,
 51456                      "aria-label": ariaLabel(a),
 51457                      "aria-required": !1,
 51458                    },
 51459                  };
 51460                if (isRequired(a)) {
 51461                  n.attributes["aria-required"] = !0;
 51462                  n.attributes.required = !0;
 51463                }
 51464                return c.HTMLResult.success({
 51465                  name: "label",
 51466                  attributes: { class: ["xfaLabel"] },
 51467                  children: [n],
 51468                });
 51469              }
 51470            }
 51471            class Decimal extends o.ContentObject {
 51472              constructor(e) {
 51473                super(f, "decimal");
 51474                this.fracDigits = (0, c.getInteger)({
 51475                  data: e.fracDigits,
 51476                  defaultValue: 2,
 51477                  validate: (e) => !0,
 51478                });
 51479                this.id = e.id || "";
 51480                this.leadDigits = (0, c.getInteger)({
 51481                  data: e.leadDigits,
 51482                  defaultValue: -1,
 51483                  validate: (e) => !0,
 51484                });
 51485                this.name = e.name || "";
 51486                this.use = e.use || "";
 51487                this.usehref = e.usehref || "";
 51488              }
 51489              [r.$finalize]() {
 51490                const e = parseFloat(this[r.$content].trim());
 51491                this[r.$content] = isNaN(e) ? null : e;
 51492              }
 51493              [r.$toHTML](e) {
 51494                return valueToHtml(
 51495                  null !== this[r.$content] ? this[r.$content].toString() : "",
 51496                );
 51497              }
 51498            }
 51499            class DefaultUi extends o.XFAObject {
 51500              constructor(e) {
 51501                super(f, "defaultUi", !0);
 51502                this.id = e.id || "";
 51503                this.use = e.use || "";
 51504                this.usehref = e.usehref || "";
 51505                this.extras = null;
 51506              }
 51507            }
 51508            class Desc extends o.XFAObject {
 51509              constructor(e) {
 51510                super(f, "desc", !0);
 51511                this.id = e.id || "";
 51512                this.use = e.use || "";
 51513                this.usehref = e.usehref || "";
 51514                this.boolean = new o.XFAObjectArray();
 51515                this.date = new o.XFAObjectArray();
 51516                this.dateTime = new o.XFAObjectArray();
 51517                this.decimal = new o.XFAObjectArray();
 51518                this.exData = new o.XFAObjectArray();
 51519                this.float = new o.XFAObjectArray();
 51520                this.image = new o.XFAObjectArray();
 51521                this.integer = new o.XFAObjectArray();
 51522                this.text = new o.XFAObjectArray();
 51523                this.time = new o.XFAObjectArray();
 51524              }
 51525            }
 51526            class DigestMethod extends o.OptionObject {
 51527              constructor(e) {
 51528                super(f, "digestMethod", [
 51529                  "",
 51530                  "SHA1",
 51531                  "SHA256",
 51532                  "SHA512",
 51533                  "RIPEMD160",
 51534                ]);
 51535                this.id = e.id || "";
 51536                this.use = e.use || "";
 51537                this.usehref = e.usehref || "";
 51538              }
 51539            }
 51540            class DigestMethods extends o.XFAObject {
 51541              constructor(e) {
 51542                super(f, "digestMethods", !0);
 51543                this.id = e.id || "";
 51544                this.type = (0, c.getStringOption)(e.type, [
 51545                  "optional",
 51546                  "required",
 51547                ]);
 51548                this.use = e.use || "";
 51549                this.usehref = e.usehref || "";
 51550                this.digestMethod = new o.XFAObjectArray();
 51551              }
 51552            }
 51553            class Draw extends o.XFAObject {
 51554              constructor(e) {
 51555                super(f, "draw", !0);
 51556                this.anchorType = (0, c.getStringOption)(e.anchorType, [
 51557                  "topLeft",
 51558                  "bottomCenter",
 51559                  "bottomLeft",
 51560                  "bottomRight",
 51561                  "middleCenter",
 51562                  "middleLeft",
 51563                  "middleRight",
 51564                  "topCenter",
 51565                  "topRight",
 51566                ]);
 51567                this.colSpan = (0, c.getInteger)({
 51568                  data: e.colSpan,
 51569                  defaultValue: 1,
 51570                  validate: (e) => e >= 1 || -1 === e,
 51571                });
 51572                this.h = e.h ? (0, c.getMeasurement)(e.h) : "";
 51573                this.hAlign = (0, c.getStringOption)(e.hAlign, [
 51574                  "left",
 51575                  "center",
 51576                  "justify",
 51577                  "justifyAll",
 51578                  "radix",
 51579                  "right",
 51580                ]);
 51581                this.id = e.id || "";
 51582                this.locale = e.locale || "";
 51583                this.maxH = (0, c.getMeasurement)(e.maxH, "0pt");
 51584                this.maxW = (0, c.getMeasurement)(e.maxW, "0pt");
 51585                this.minH = (0, c.getMeasurement)(e.minH, "0pt");
 51586                this.minW = (0, c.getMeasurement)(e.minW, "0pt");
 51587                this.name = e.name || "";
 51588                this.presence = (0, c.getStringOption)(e.presence, [
 51589                  "visible",
 51590                  "hidden",
 51591                  "inactive",
 51592                  "invisible",
 51593                ]);
 51594                this.relevant = (0, c.getRelevant)(e.relevant);
 51595                this.rotate = (0, c.getInteger)({
 51596                  data: e.rotate,
 51597                  defaultValue: 0,
 51598                  validate: (e) => e % 90 == 0,
 51599                });
 51600                this.use = e.use || "";
 51601                this.usehref = e.usehref || "";
 51602                this.w = e.w ? (0, c.getMeasurement)(e.w) : "";
 51603                this.x = (0, c.getMeasurement)(e.x, "0pt");
 51604                this.y = (0, c.getMeasurement)(e.y, "0pt");
 51605                this.assist = null;
 51606                this.border = null;
 51607                this.caption = null;
 51608                this.desc = null;
 51609                this.extras = null;
 51610                this.font = null;
 51611                this.keep = null;
 51612                this.margin = null;
 51613                this.para = null;
 51614                this.traversal = null;
 51615                this.ui = null;
 51616                this.value = null;
 51617                this.setProperty = new o.XFAObjectArray();
 51618              }
 51619              [r.$setValue](e) {
 51620                _setValue(this, e);
 51621              }
 51622              [r.$toHTML](e) {
 51623                setTabIndex(this);
 51624                if ("hidden" === this.presence || "inactive" === this.presence)
 51625                  return c.HTMLResult.EMPTY;
 51626                (0, s.fixDimensions)(this);
 51627                this[r.$pushPara]();
 51628                const t = this.w,
 51629                  a = this.h,
 51630                  { w: n, h: o, isBroken: l } = (0, s.layoutNode)(this, e);
 51631                if (n && "" === this.w) {
 51632                  if (l && this[r.$getSubformParent]()[r.$isThereMoreWidth]()) {
 51633                    this[r.$popPara]();
 51634                    return c.HTMLResult.FAILURE;
 51635                  }
 51636                  this.w = n;
 51637                }
 51638                o && "" === this.h && (this.h = o);
 51639                setFirstUnsplittable(this);
 51640                if (!(0, i.checkDimensions)(this, e)) {
 51641                  this.w = t;
 51642                  this.h = a;
 51643                  this[r.$popPara]();
 51644                  return c.HTMLResult.FAILURE;
 51645                }
 51646                unsetFirstUnsplittable(this);
 51647                const h = (0, s.toStyle)(
 51648                  this,
 51649                  "font",
 51650                  "hAlign",
 51651                  "dimensions",
 51652                  "position",
 51653                  "presence",
 51654                  "rotate",
 51655                  "anchorType",
 51656                  "border",
 51657                  "margin",
 51658                );
 51659                (0, s.setMinMaxDimensions)(this, h);
 51660                if (h.margin) {
 51661                  h.padding = h.margin;
 51662                  delete h.margin;
 51663                }
 51664                const u = ["xfaDraw"];
 51665                this.font && u.push("xfaFont");
 51666                (0, s.isPrintOnly)(this) && u.push("xfaPrintOnly");
 51667                const d = { style: h, id: this[r.$uid], class: u };
 51668                this.name && (d.xfaName = this.name);
 51669                const f = { name: "div", attributes: d, children: [] };
 51670                applyAssist(this, d);
 51671                const g = (0, s.computeBbox)(this, f, e),
 51672                  p = this.value ? this.value[r.$toHTML](e).html : null;
 51673                if (null === p) {
 51674                  this.w = t;
 51675                  this.h = a;
 51676                  this[r.$popPara]();
 51677                  return c.HTMLResult.success((0, s.createWrapper)(this, f), g);
 51678                }
 51679                f.children.push(p);
 51680                (0, s.setPara)(this, h, p);
 51681                this.w = t;
 51682                this.h = a;
 51683                this[r.$popPara]();
 51684                return c.HTMLResult.success((0, s.createWrapper)(this, f), g);
 51685              }
 51686            }
 51687            class Edge extends o.XFAObject {
 51688              constructor(e) {
 51689                super(f, "edge", !0);
 51690                this.cap = (0, c.getStringOption)(e.cap, [
 51691                  "square",
 51692                  "butt",
 51693                  "round",
 51694                ]);
 51695                this.id = e.id || "";
 51696                this.presence = (0, c.getStringOption)(e.presence, [
 51697                  "visible",
 51698                  "hidden",
 51699                  "inactive",
 51700                  "invisible",
 51701                ]);
 51702                this.stroke = (0, c.getStringOption)(e.stroke, [
 51703                  "solid",
 51704                  "dashDot",
 51705                  "dashDotDot",
 51706                  "dashed",
 51707                  "dotted",
 51708                  "embossed",
 51709                  "etched",
 51710                  "lowered",
 51711                  "raised",
 51712                ]);
 51713                this.thickness = (0, c.getMeasurement)(e.thickness, "0.5pt");
 51714                this.use = e.use || "";
 51715                this.usehref = e.usehref || "";
 51716                this.color = null;
 51717                this.extras = null;
 51718              }
 51719              [r.$toStyle]() {
 51720                const e = (0, s.toStyle)(this, "visibility");
 51721                Object.assign(e, {
 51722                  linecap: this.cap,
 51723                  width: (0, s.measureToString)(this.thickness),
 51724                  color: this.color ? this.color[r.$toStyle]() : "#000000",
 51725                  style: "",
 51726                });
 51727                if ("visible" !== this.presence) e.style = "none";
 51728                else
 51729                  switch (this.stroke) {
 51730                    case "solid":
 51731                      e.style = "solid";
 51732                      break;
 51733                    case "dashDot":
 51734                    case "dashDotDot":
 51735                    case "dashed":
 51736                      e.style = "dashed";
 51737                      break;
 51738                    case "dotted":
 51739                      e.style = "dotted";
 51740                      break;
 51741                    case "embossed":
 51742                      e.style = "ridge";
 51743                      break;
 51744                    case "etched":
 51745                      e.style = "groove";
 51746                      break;
 51747                    case "lowered":
 51748                      e.style = "inset";
 51749                      break;
 51750                    case "raised":
 51751                      e.style = "outset";
 51752                  }
 51753                return e;
 51754              }
 51755            }
 51756            class Encoding extends o.OptionObject {
 51757              constructor(e) {
 51758                super(f, "encoding", [
 51759                  "adbe.x509.rsa_sha1",
 51760                  "adbe.pkcs7.detached",
 51761                  "adbe.pkcs7.sha1",
 51762                ]);
 51763                this.id = e.id || "";
 51764                this.use = e.use || "";
 51765                this.usehref = e.usehref || "";
 51766              }
 51767            }
 51768            class Encodings extends o.XFAObject {
 51769              constructor(e) {
 51770                super(f, "encodings", !0);
 51771                this.id = e.id || "";
 51772                this.type = (0, c.getStringOption)(e.type, [
 51773                  "optional",
 51774                  "required",
 51775                ]);
 51776                this.use = e.use || "";
 51777                this.usehref = e.usehref || "";
 51778                this.encoding = new o.XFAObjectArray();
 51779              }
 51780            }
 51781            class Encrypt extends o.XFAObject {
 51782              constructor(e) {
 51783                super(f, "encrypt", !0);
 51784                this.id = e.id || "";
 51785                this.use = e.use || "";
 51786                this.usehref = e.usehref || "";
 51787                this.certificate = null;
 51788              }
 51789            }
 51790            class EncryptData extends o.XFAObject {
 51791              constructor(e) {
 51792                super(f, "encryptData", !0);
 51793                this.id = e.id || "";
 51794                this.operation = (0, c.getStringOption)(e.operation, [
 51795                  "encrypt",
 51796                  "decrypt",
 51797                ]);
 51798                this.target = e.target || "";
 51799                this.use = e.use || "";
 51800                this.usehref = e.usehref || "";
 51801                this.filter = null;
 51802                this.manifest = null;
 51803              }
 51804            }
 51805            class Encryption extends o.XFAObject {
 51806              constructor(e) {
 51807                super(f, "encryption", !0);
 51808                this.id = e.id || "";
 51809                this.type = (0, c.getStringOption)(e.type, [
 51810                  "optional",
 51811                  "required",
 51812                ]);
 51813                this.use = e.use || "";
 51814                this.usehref = e.usehref || "";
 51815                this.certificate = new o.XFAObjectArray();
 51816              }
 51817            }
 51818            class EncryptionMethod extends o.OptionObject {
 51819              constructor(e) {
 51820                super(f, "encryptionMethod", [
 51821                  "",
 51822                  "AES256-CBC",
 51823                  "TRIPLEDES-CBC",
 51824                  "AES128-CBC",
 51825                  "AES192-CBC",
 51826                ]);
 51827                this.id = e.id || "";
 51828                this.use = e.use || "";
 51829                this.usehref = e.usehref || "";
 51830              }
 51831            }
 51832            class EncryptionMethods extends o.XFAObject {
 51833              constructor(e) {
 51834                super(f, "encryptionMethods", !0);
 51835                this.id = e.id || "";
 51836                this.type = (0, c.getStringOption)(e.type, [
 51837                  "optional",
 51838                  "required",
 51839                ]);
 51840                this.use = e.use || "";
 51841                this.usehref = e.usehref || "";
 51842                this.encryptionMethod = new o.XFAObjectArray();
 51843              }
 51844            }
 51845            class Event extends o.XFAObject {
 51846              constructor(e) {
 51847                super(f, "event", !0);
 51848                this.activity = (0, c.getStringOption)(e.activity, [
 51849                  "click",
 51850                  "change",
 51851                  "docClose",
 51852                  "docReady",
 51853                  "enter",
 51854                  "exit",
 51855                  "full",
 51856                  "indexChange",
 51857                  "initialize",
 51858                  "mouseDown",
 51859                  "mouseEnter",
 51860                  "mouseExit",
 51861                  "mouseUp",
 51862                  "postExecute",
 51863                  "postOpen",
 51864                  "postPrint",
 51865                  "postSave",
 51866                  "postSign",
 51867                  "postSubmit",
 51868                  "preExecute",
 51869                  "preOpen",
 51870                  "prePrint",
 51871                  "preSave",
 51872                  "preSign",
 51873                  "preSubmit",
 51874                  "ready",
 51875                  "validationState",
 51876                ]);
 51877                this.id = e.id || "";
 51878                this.listen = (0, c.getStringOption)(e.listen, [
 51879                  "refOnly",
 51880                  "refAndDescendents",
 51881                ]);
 51882                this.name = e.name || "";
 51883                this.ref = e.ref || "";
 51884                this.use = e.use || "";
 51885                this.usehref = e.usehref || "";
 51886                this.extras = null;
 51887                this.encryptData = null;
 51888                this.execute = null;
 51889                this.script = null;
 51890                this.signData = null;
 51891                this.submit = null;
 51892              }
 51893            }
 51894            class ExData extends o.ContentObject {
 51895              constructor(e) {
 51896                super(f, "exData");
 51897                this.contentType = e.contentType || "";
 51898                this.href = e.href || "";
 51899                this.id = e.id || "";
 51900                this.maxLength = (0, c.getInteger)({
 51901                  data: e.maxLength,
 51902                  defaultValue: -1,
 51903                  validate: (e) => e >= -1,
 51904                });
 51905                this.name = e.name || "";
 51906                this.rid = e.rid || "";
 51907                this.transferEncoding = (0, c.getStringOption)(
 51908                  e.transferEncoding,
 51909                  ["none", "base64", "package"],
 51910                );
 51911                this.use = e.use || "";
 51912                this.usehref = e.usehref || "";
 51913              }
 51914              [r.$isCDATAXml]() {
 51915                return "text/html" === this.contentType;
 51916              }
 51917              [r.$onChild](e) {
 51918                if (
 51919                  "text/html" === this.contentType &&
 51920                  e[r.$namespaceId] === n.NamespaceIds.xhtml.id
 51921                ) {
 51922                  this[r.$content] = e;
 51923                  return !0;
 51924                }
 51925                if ("text/xml" === this.contentType) {
 51926                  this[r.$content] = e;
 51927                  return !0;
 51928                }
 51929                return !1;
 51930              }
 51931              [r.$toHTML](e) {
 51932                return "text/html" === this.contentType && this[r.$content]
 51933                  ? this[r.$content][r.$toHTML](e)
 51934                  : c.HTMLResult.EMPTY;
 51935              }
 51936            }
 51937            class ExObject extends o.XFAObject {
 51938              constructor(e) {
 51939                super(f, "exObject", !0);
 51940                this.archive = e.archive || "";
 51941                this.classId = e.classId || "";
 51942                this.codeBase = e.codeBase || "";
 51943                this.codeType = e.codeType || "";
 51944                this.id = e.id || "";
 51945                this.name = e.name || "";
 51946                this.use = e.use || "";
 51947                this.usehref = e.usehref || "";
 51948                this.extras = null;
 51949                this.boolean = new o.XFAObjectArray();
 51950                this.date = new o.XFAObjectArray();
 51951                this.dateTime = new o.XFAObjectArray();
 51952                this.decimal = new o.XFAObjectArray();
 51953                this.exData = new o.XFAObjectArray();
 51954                this.exObject = new o.XFAObjectArray();
 51955                this.float = new o.XFAObjectArray();
 51956                this.image = new o.XFAObjectArray();
 51957                this.integer = new o.XFAObjectArray();
 51958                this.text = new o.XFAObjectArray();
 51959                this.time = new o.XFAObjectArray();
 51960              }
 51961            }
 51962            class ExclGroup extends o.XFAObject {
 51963              constructor(e) {
 51964                super(f, "exclGroup", !0);
 51965                this.access = (0, c.getStringOption)(e.access, [
 51966                  "open",
 51967                  "nonInteractive",
 51968                  "protected",
 51969                  "readOnly",
 51970                ]);
 51971                this.accessKey = e.accessKey || "";
 51972                this.anchorType = (0, c.getStringOption)(e.anchorType, [
 51973                  "topLeft",
 51974                  "bottomCenter",
 51975                  "bottomLeft",
 51976                  "bottomRight",
 51977                  "middleCenter",
 51978                  "middleLeft",
 51979                  "middleRight",
 51980                  "topCenter",
 51981                  "topRight",
 51982                ]);
 51983                this.colSpan = (0, c.getInteger)({
 51984                  data: e.colSpan,
 51985                  defaultValue: 1,
 51986                  validate: (e) => e >= 1 || -1 === e,
 51987                });
 51988                this.h = e.h ? (0, c.getMeasurement)(e.h) : "";
 51989                this.hAlign = (0, c.getStringOption)(e.hAlign, [
 51990                  "left",
 51991                  "center",
 51992                  "justify",
 51993                  "justifyAll",
 51994                  "radix",
 51995                  "right",
 51996                ]);
 51997                this.id = e.id || "";
 51998                this.layout = (0, c.getStringOption)(e.layout, [
 51999                  "position",
 52000                  "lr-tb",
 52001                  "rl-row",
 52002                  "rl-tb",
 52003                  "row",
 52004                  "table",
 52005                  "tb",
 52006                ]);
 52007                this.maxH = (0, c.getMeasurement)(e.maxH, "0pt");
 52008                this.maxW = (0, c.getMeasurement)(e.maxW, "0pt");
 52009                this.minH = (0, c.getMeasurement)(e.minH, "0pt");
 52010                this.minW = (0, c.getMeasurement)(e.minW, "0pt");
 52011                this.name = e.name || "";
 52012                this.presence = (0, c.getStringOption)(e.presence, [
 52013                  "visible",
 52014                  "hidden",
 52015                  "inactive",
 52016                  "invisible",
 52017                ]);
 52018                this.relevant = (0, c.getRelevant)(e.relevant);
 52019                this.use = e.use || "";
 52020                this.usehref = e.usehref || "";
 52021                this.w = e.w ? (0, c.getMeasurement)(e.w) : "";
 52022                this.x = (0, c.getMeasurement)(e.x, "0pt");
 52023                this.y = (0, c.getMeasurement)(e.y, "0pt");
 52024                this.assist = null;
 52025                this.bind = null;
 52026                this.border = null;
 52027                this.calculate = null;
 52028                this.caption = null;
 52029                this.desc = null;
 52030                this.extras = null;
 52031                this.margin = null;
 52032                this.para = null;
 52033                this.traversal = null;
 52034                this.validate = null;
 52035                this.connect = new o.XFAObjectArray();
 52036                this.event = new o.XFAObjectArray();
 52037                this.field = new o.XFAObjectArray();
 52038                this.setProperty = new o.XFAObjectArray();
 52039              }
 52040              [r.$isBindable]() {
 52041                return !0;
 52042              }
 52043              [r.$hasSettableValue]() {
 52044                return !0;
 52045              }
 52046              [r.$setValue](e) {
 52047                for (const t of this.field.children) {
 52048                  if (!t.value) {
 52049                    const e = new Value({});
 52050                    t[r.$appendChild](e);
 52051                    t.value = e;
 52052                  }
 52053                  t.value[r.$setValue](e);
 52054                }
 52055              }
 52056              [r.$isThereMoreWidth]() {
 52057                return (
 52058                  (this.layout.endsWith("-tb") &&
 52059                    0 === this[r.$extra].attempt &&
 52060                    this[r.$extra].numberInLine > 0) ||
 52061                  this[r.$getParent]()[r.$isThereMoreWidth]()
 52062                );
 52063              }
 52064              [r.$isSplittable]() {
 52065                const e = this[r.$getSubformParent]();
 52066                if (!e[r.$isSplittable]()) return !1;
 52067                if (void 0 !== this[r.$extra]._isSplittable)
 52068                  return this[r.$extra]._isSplittable;
 52069                if ("position" === this.layout || this.layout.includes("row")) {
 52070                  this[r.$extra]._isSplittable = !1;
 52071                  return !1;
 52072                }
 52073                if (e.layout?.endsWith("-tb") && 0 !== e[r.$extra].numberInLine)
 52074                  return !1;
 52075                this[r.$extra]._isSplittable = !0;
 52076                return !0;
 52077              }
 52078              [r.$flushHTML]() {
 52079                return (0, i.flushHTML)(this);
 52080              }
 52081              [r.$addHTML](e, t) {
 52082                (0, i.addHTML)(this, e, t);
 52083              }
 52084              [r.$getAvailableSpace]() {
 52085                return (0, i.getAvailableSpace)(this);
 52086              }
 52087              [r.$toHTML](e) {
 52088                setTabIndex(this);
 52089                if (
 52090                  "hidden" === this.presence ||
 52091                  "inactive" === this.presence ||
 52092                  0 === this.h ||
 52093                  0 === this.w
 52094                )
 52095                  return c.HTMLResult.EMPTY;
 52096                (0, s.fixDimensions)(this);
 52097                const t = [],
 52098                  a = { id: this[r.$uid], class: [] };
 52099                (0, s.setAccess)(this, a.class);
 52100                this[r.$extra] || (this[r.$extra] = Object.create(null));
 52101                Object.assign(this[r.$extra], {
 52102                  children: t,
 52103                  attributes: a,
 52104                  attempt: 0,
 52105                  line: null,
 52106                  numberInLine: 0,
 52107                  availableSpace: {
 52108                    width: Math.min(this.w || 1 / 0, e.width),
 52109                    height: Math.min(this.h || 1 / 0, e.height),
 52110                  },
 52111                  width: 0,
 52112                  height: 0,
 52113                  prevHeight: 0,
 52114                  currentWidth: 0,
 52115                });
 52116                const n = this[r.$isSplittable]();
 52117                n || setFirstUnsplittable(this);
 52118                if (!(0, i.checkDimensions)(this, e)) return c.HTMLResult.FAILURE;
 52119                const o = new Set(["field"]);
 52120                if (this.layout.includes("row")) {
 52121                  const e = this[r.$getSubformParent]().columnWidths;
 52122                  if (Array.isArray(e) && e.length > 0) {
 52123                    this[r.$extra].columnWidths = e;
 52124                    this[r.$extra].currentColumn = 0;
 52125                  }
 52126                }
 52127                const l = (0, s.toStyle)(
 52128                    this,
 52129                    "anchorType",
 52130                    "dimensions",
 52131                    "position",
 52132                    "presence",
 52133                    "border",
 52134                    "margin",
 52135                    "hAlign",
 52136                  ),
 52137                  h = ["xfaExclgroup"],
 52138                  u = (0, s.layoutClass)(this);
 52139                u && h.push(u);
 52140                (0, s.isPrintOnly)(this) && h.push("xfaPrintOnly");
 52141                a.style = l;
 52142                a.class = h;
 52143                this.name && (a.xfaName = this.name);
 52144                this[r.$pushPara]();
 52145                const d = "lr-tb" === this.layout || "rl-tb" === this.layout,
 52146                  f = d ? 2 : 1;
 52147                for (; this[r.$extra].attempt < f; this[r.$extra].attempt++) {
 52148                  d &&
 52149                    1 === this[r.$extra].attempt &&
 52150                    (this[r.$extra].numberInLine = 0);
 52151                  const e = this[r.$childrenToHTML]({ filter: o, include: !0 });
 52152                  if (e.success) break;
 52153                  if (e.isBreak()) {
 52154                    this[r.$popPara]();
 52155                    return e;
 52156                  }
 52157                  if (
 52158                    d &&
 52159                    0 === this[r.$extra].attempt &&
 52160                    0 === this[r.$extra].numberInLine &&
 52161                    !this[r.$getTemplateRoot]()[r.$extra].noLayoutFailure
 52162                  ) {
 52163                    this[r.$extra].attempt = f;
 52164                    break;
 52165                  }
 52166                }
 52167                this[r.$popPara]();
 52168                n || unsetFirstUnsplittable(this);
 52169                if (this[r.$extra].attempt === f) {
 52170                  n || delete this[r.$extra];
 52171                  return c.HTMLResult.FAILURE;
 52172                }
 52173                let g = 0,
 52174                  p = 0;
 52175                if (this.margin) {
 52176                  g = this.margin.leftInset + this.margin.rightInset;
 52177                  p = this.margin.topInset + this.margin.bottomInset;
 52178                }
 52179                const m = Math.max(this[r.$extra].width + g, this.w || 0),
 52180                  b = Math.max(this[r.$extra].height + p, this.h || 0),
 52181                  y = [this.x, this.y, m, b];
 52182                "" === this.w && (l.width = (0, s.measureToString)(m));
 52183                "" === this.h && (l.height = (0, s.measureToString)(b));
 52184                const w = { name: "div", attributes: a, children: t };
 52185                applyAssist(this, a);
 52186                delete this[r.$extra];
 52187                return c.HTMLResult.success((0, s.createWrapper)(this, w), y);
 52188              }
 52189            }
 52190            class Execute extends o.XFAObject {
 52191              constructor(e) {
 52192                super(f, "execute");
 52193                this.connection = e.connection || "";
 52194                this.executeType = (0, c.getStringOption)(e.executeType, [
 52195                  "import",
 52196                  "remerge",
 52197                ]);
 52198                this.id = e.id || "";
 52199                this.runAt = (0, c.getStringOption)(e.runAt, [
 52200                  "client",
 52201                  "both",
 52202                  "server",
 52203                ]);
 52204                this.use = e.use || "";
 52205                this.usehref = e.usehref || "";
 52206              }
 52207            }
 52208            class Extras extends o.XFAObject {
 52209              constructor(e) {
 52210                super(f, "extras", !0);
 52211                this.id = e.id || "";
 52212                this.name = e.name || "";
 52213                this.use = e.use || "";
 52214                this.usehref = e.usehref || "";
 52215                this.boolean = new o.XFAObjectArray();
 52216                this.date = new o.XFAObjectArray();
 52217                this.dateTime = new o.XFAObjectArray();
 52218                this.decimal = new o.XFAObjectArray();
 52219                this.exData = new o.XFAObjectArray();
 52220                this.extras = new o.XFAObjectArray();
 52221                this.float = new o.XFAObjectArray();
 52222                this.image = new o.XFAObjectArray();
 52223                this.integer = new o.XFAObjectArray();
 52224                this.text = new o.XFAObjectArray();
 52225                this.time = new o.XFAObjectArray();
 52226              }
 52227            }
 52228            class Field extends o.XFAObject {
 52229              constructor(e) {
 52230                super(f, "field", !0);
 52231                this.access = (0, c.getStringOption)(e.access, [
 52232                  "open",
 52233                  "nonInteractive",
 52234                  "protected",
 52235                  "readOnly",
 52236                ]);
 52237                this.accessKey = e.accessKey || "";
 52238                this.anchorType = (0, c.getStringOption)(e.anchorType, [
 52239                  "topLeft",
 52240                  "bottomCenter",
 52241                  "bottomLeft",
 52242                  "bottomRight",
 52243                  "middleCenter",
 52244                  "middleLeft",
 52245                  "middleRight",
 52246                  "topCenter",
 52247                  "topRight",
 52248                ]);
 52249                this.colSpan = (0, c.getInteger)({
 52250                  data: e.colSpan,
 52251                  defaultValue: 1,
 52252                  validate: (e) => e >= 1 || -1 === e,
 52253                });
 52254                this.h = e.h ? (0, c.getMeasurement)(e.h) : "";
 52255                this.hAlign = (0, c.getStringOption)(e.hAlign, [
 52256                  "left",
 52257                  "center",
 52258                  "justify",
 52259                  "justifyAll",
 52260                  "radix",
 52261                  "right",
 52262                ]);
 52263                this.id = e.id || "";
 52264                this.locale = e.locale || "";
 52265                this.maxH = (0, c.getMeasurement)(e.maxH, "0pt");
 52266                this.maxW = (0, c.getMeasurement)(e.maxW, "0pt");
 52267                this.minH = (0, c.getMeasurement)(e.minH, "0pt");
 52268                this.minW = (0, c.getMeasurement)(e.minW, "0pt");
 52269                this.name = e.name || "";
 52270                this.presence = (0, c.getStringOption)(e.presence, [
 52271                  "visible",
 52272                  "hidden",
 52273                  "inactive",
 52274                  "invisible",
 52275                ]);
 52276                this.relevant = (0, c.getRelevant)(e.relevant);
 52277                this.rotate = (0, c.getInteger)({
 52278                  data: e.rotate,
 52279                  defaultValue: 0,
 52280                  validate: (e) => e % 90 == 0,
 52281                });
 52282                this.use = e.use || "";
 52283                this.usehref = e.usehref || "";
 52284                this.w = e.w ? (0, c.getMeasurement)(e.w) : "";
 52285                this.x = (0, c.getMeasurement)(e.x, "0pt");
 52286                this.y = (0, c.getMeasurement)(e.y, "0pt");
 52287                this.assist = null;
 52288                this.bind = null;
 52289                this.border = null;
 52290                this.calculate = null;
 52291                this.caption = null;
 52292                this.desc = null;
 52293                this.extras = null;
 52294                this.font = null;
 52295                this.format = null;
 52296                this.items = new o.XFAObjectArray(2);
 52297                this.keep = null;
 52298                this.margin = null;
 52299                this.para = null;
 52300                this.traversal = null;
 52301                this.ui = null;
 52302                this.validate = null;
 52303                this.value = null;
 52304                this.bindItems = new o.XFAObjectArray();
 52305                this.connect = new o.XFAObjectArray();
 52306                this.event = new o.XFAObjectArray();
 52307                this.setProperty = new o.XFAObjectArray();
 52308              }
 52309              [r.$isBindable]() {
 52310                return !0;
 52311              }
 52312              [r.$setValue](e) {
 52313                _setValue(this, e);
 52314              }
 52315              [r.$toHTML](e) {
 52316                setTabIndex(this);
 52317                if (!this.ui) {
 52318                  this.ui = new Ui({});
 52319                  this.ui[r.$globalData] = this[r.$globalData];
 52320                  this[r.$appendChild](this.ui);
 52321                  let e;
 52322                  switch (this.items.children.length) {
 52323                    case 0:
 52324                      e = new TextEdit({});
 52325                      this.ui.textEdit = e;
 52326                      break;
 52327                    case 1:
 52328                      e = new CheckButton({});
 52329                      this.ui.checkButton = e;
 52330                      break;
 52331                    case 2:
 52332                      e = new ChoiceList({});
 52333                      this.ui.choiceList = e;
 52334                  }
 52335                  this.ui[r.$appendChild](e);
 52336                }
 52337                if (
 52338                  !this.ui ||
 52339                  "hidden" === this.presence ||
 52340                  "inactive" === this.presence ||
 52341                  0 === this.h ||
 52342                  0 === this.w
 52343                )
 52344                  return c.HTMLResult.EMPTY;
 52345                this.caption && delete this.caption[r.$extra];
 52346                this[r.$pushPara]();
 52347                const t = this.caption ? this.caption[r.$toHTML](e).html : null,
 52348                  a = this.w,
 52349                  n = this.h;
 52350                let o = 0,
 52351                  l = 0;
 52352                if (this.margin) {
 52353                  o = this.margin.leftInset + this.margin.rightInset;
 52354                  l = this.margin.topInset + this.margin.bottomInset;
 52355                }
 52356                let u = null;
 52357                if ("" === this.w || "" === this.h) {
 52358                  let t = null,
 52359                    a = null,
 52360                    n = 0,
 52361                    i = 0;
 52362                  if (this.ui.checkButton) n = i = this.ui.checkButton.size;
 52363                  else {
 52364                    const { w: t, h: a } = (0, s.layoutNode)(this, e);
 52365                    if (null !== t) {
 52366                      n = t;
 52367                      i = a;
 52368                    } else i = (0, h.getMetrics)(this.font, !0).lineNoGap;
 52369                  }
 52370                  u = getBorderDims(this.ui[r.$getExtra]());
 52371                  n += u.w;
 52372                  i += u.h;
 52373                  if (this.caption) {
 52374                    const {
 52375                      w: s,
 52376                      h: o,
 52377                      isBroken: l,
 52378                    } = this.caption[r.$getExtra](e);
 52379                    if (l && this[r.$getSubformParent]()[r.$isThereMoreWidth]()) {
 52380                      this[r.$popPara]();
 52381                      return c.HTMLResult.FAILURE;
 52382                    }
 52383                    t = s;
 52384                    a = o;
 52385                    switch (this.caption.placement) {
 52386                      case "left":
 52387                      case "right":
 52388                      case "inline":
 52389                        t += n;
 52390                        break;
 52391                      case "top":
 52392                      case "bottom":
 52393                        a += i;
 52394                    }
 52395                  } else {
 52396                    t = n;
 52397                    a = i;
 52398                  }
 52399                  if (t && "" === this.w) {
 52400                    t += o;
 52401                    this.w = Math.min(
 52402                      this.maxW <= 0 ? 1 / 0 : this.maxW,
 52403                      this.minW + 1 < t ? t : this.minW,
 52404                    );
 52405                  }
 52406                  if (a && "" === this.h) {
 52407                    a += l;
 52408                    this.h = Math.min(
 52409                      this.maxH <= 0 ? 1 / 0 : this.maxH,
 52410                      this.minH + 1 < a ? a : this.minH,
 52411                    );
 52412                  }
 52413                }
 52414                this[r.$popPara]();
 52415                (0, s.fixDimensions)(this);
 52416                setFirstUnsplittable(this);
 52417                if (!(0, i.checkDimensions)(this, e)) {
 52418                  this.w = a;
 52419                  this.h = n;
 52420                  this[r.$popPara]();
 52421                  return c.HTMLResult.FAILURE;
 52422                }
 52423                unsetFirstUnsplittable(this);
 52424                const d = (0, s.toStyle)(
 52425                  this,
 52426                  "font",
 52427                  "dimensions",
 52428                  "position",
 52429                  "rotate",
 52430                  "anchorType",
 52431                  "presence",
 52432                  "margin",
 52433                  "hAlign",
 52434                );
 52435                (0, s.setMinMaxDimensions)(this, d);
 52436                const f = ["xfaField"];
 52437                this.font && f.push("xfaFont");
 52438                (0, s.isPrintOnly)(this) && f.push("xfaPrintOnly");
 52439                const g = { style: d, id: this[r.$uid], class: f };
 52440                if (d.margin) {
 52441                  d.padding = d.margin;
 52442                  delete d.margin;
 52443                }
 52444                (0, s.setAccess)(this, f);
 52445                this.name && (g.xfaName = this.name);
 52446                const p = [],
 52447                  m = { name: "div", attributes: g, children: p };
 52448                applyAssist(this, g);
 52449                const b = this.border ? this.border[r.$toStyle]() : null,
 52450                  y = (0, s.computeBbox)(this, m, e),
 52451                  w = this.ui[r.$toHTML]().html;
 52452                if (!w) {
 52453                  Object.assign(d, b);
 52454                  return c.HTMLResult.success((0, s.createWrapper)(this, m), y);
 52455                }
 52456                this[r.$tabIndex] &&
 52457                  (w.children?.[0]
 52458                    ? (w.children[0].attributes.tabindex = this[r.$tabIndex])
 52459                    : (w.attributes.tabindex = this[r.$tabIndex]));
 52460                w.attributes.style || (w.attributes.style = Object.create(null));
 52461                let S = null;
 52462                if (this.ui.button) {
 52463                  1 === w.children.length && ([S] = w.children.splice(0, 1));
 52464                  Object.assign(w.attributes.style, b);
 52465                } else Object.assign(d, b);
 52466                p.push(w);
 52467                if (this.value)
 52468                  if (this.ui.imageEdit)
 52469                    w.children.push(this.value[r.$toHTML]().html);
 52470                  else if (!this.ui.button) {
 52471                    let e = "";
 52472                    if (this.value.exData) e = this.value.exData[r.$text]();
 52473                    else if (this.value.text) e = this.value.text[r.$getExtra]();
 52474                    else {
 52475                      const t = this.value[r.$toHTML]().html;
 52476                      null !== t && (e = t.children[0].value);
 52477                    }
 52478                    this.ui.textEdit &&
 52479                      this.value.text?.maxChars &&
 52480                      (w.children[0].attributes.maxLength =
 52481                        this.value.text.maxChars);
 52482                    if (e) {
 52483                      if (this.ui.numericEdit) {
 52484                        e = parseFloat(e);
 52485                        e = isNaN(e) ? "" : e.toString();
 52486                      }
 52487                      "textarea" === w.children[0].name
 52488                        ? (w.children[0].attributes.textContent = e)
 52489                        : (w.children[0].attributes.value = e);
 52490                    }
 52491                  }
 52492                if (!this.ui.imageEdit && w.children?.[0] && this.h) {
 52493                  u = u || getBorderDims(this.ui[r.$getExtra]());
 52494                  let t = 0;
 52495                  if (
 52496                    this.caption &&
 52497                    ["top", "bottom"].includes(this.caption.placement)
 52498                  ) {
 52499                    t = this.caption.reserve;
 52500                    t <= 0 && (t = this.caption[r.$getExtra](e).h);
 52501                    const a = this.h - t - l - u.h;
 52502                    w.children[0].attributes.style.height = (0,
 52503                    s.measureToString)(a);
 52504                  } else w.children[0].attributes.style.height = "100%";
 52505                }
 52506                S && w.children.push(S);
 52507                if (!t) {
 52508                  w.attributes.class && w.attributes.class.push("xfaLeft");
 52509                  this.w = a;
 52510                  this.h = n;
 52511                  return c.HTMLResult.success((0, s.createWrapper)(this, m), y);
 52512                }
 52513                if (this.ui.button) {
 52514                  d.padding && delete d.padding;
 52515                  "div" === t.name && (t.name = "span");
 52516                  w.children.push(t);
 52517                  return c.HTMLResult.success(m, y);
 52518                }
 52519                this.ui.checkButton &&
 52520                  (t.attributes.class[0] = "xfaCaptionForCheckButton");
 52521                w.attributes.class || (w.attributes.class = []);
 52522                w.children.splice(0, 0, t);
 52523                switch (this.caption.placement) {
 52524                  case "left":
 52525                  case "inline":
 52526                    w.attributes.class.push("xfaLeft");
 52527                    break;
 52528                  case "right":
 52529                    w.attributes.class.push("xfaRight");
 52530                    break;
 52531                  case "top":
 52532                    w.attributes.class.push("xfaTop");
 52533                    break;
 52534                  case "bottom":
 52535                    w.attributes.class.push("xfaBottom");
 52536                }
 52537                this.w = a;
 52538                this.h = n;
 52539                return c.HTMLResult.success((0, s.createWrapper)(this, m), y);
 52540              }
 52541            }
 52542            t.Field = Field;
 52543            class Fill extends o.XFAObject {
 52544              constructor(e) {
 52545                super(f, "fill", !0);
 52546                this.id = e.id || "";
 52547                this.presence = (0, c.getStringOption)(e.presence, [
 52548                  "visible",
 52549                  "hidden",
 52550                  "inactive",
 52551                  "invisible",
 52552                ]);
 52553                this.use = e.use || "";
 52554                this.usehref = e.usehref || "";
 52555                this.color = null;
 52556                this.extras = null;
 52557                this.linear = null;
 52558                this.pattern = null;
 52559                this.radial = null;
 52560                this.solid = null;
 52561                this.stipple = null;
 52562              }
 52563              [r.$toStyle]() {
 52564                const e = this[r.$getParent](),
 52565                  t = e[r.$getParent]()[r.$getParent](),
 52566                  a = Object.create(null);
 52567                let n = "color",
 52568                  i = n;
 52569                if (e instanceof Border) {
 52570                  n = "background-color";
 52571                  i = "background";
 52572                  t instanceof Ui && (a.backgroundColor = "white");
 52573                }
 52574                if (e instanceof Rectangle || e instanceof Arc) {
 52575                  n = i = "fill";
 52576                  a.fill = "white";
 52577                }
 52578                for (const e of Object.getOwnPropertyNames(this)) {
 52579                  if ("extras" === e || "color" === e) continue;
 52580                  const t = this[e];
 52581                  if (!(t instanceof o.XFAObject)) continue;
 52582                  const s = t[r.$toStyle](this.color);
 52583                  s && (a[s.startsWith("#") ? n : i] = s);
 52584                  return a;
 52585                }
 52586                if (this.color?.value) {
 52587                  const e = this.color[r.$toStyle]();
 52588                  a[e.startsWith("#") ? n : i] = e;
 52589                }
 52590                return a;
 52591              }
 52592            }
 52593            class Filter extends o.XFAObject {
 52594              constructor(e) {
 52595                super(f, "filter", !0);
 52596                this.addRevocationInfo = (0, c.getStringOption)(
 52597                  e.addRevocationInfo,
 52598                  ["", "required", "optional", "none"],
 52599                );
 52600                this.id = e.id || "";
 52601                this.name = e.name || "";
 52602                this.use = e.use || "";
 52603                this.usehref = e.usehref || "";
 52604                this.version = (0, c.getInteger)({
 52605                  data: this.version,
 52606                  defaultValue: 5,
 52607                  validate: (e) => e >= 1 && e <= 5,
 52608                });
 52609                this.appearanceFilter = null;
 52610                this.certificates = null;
 52611                this.digestMethods = null;
 52612                this.encodings = null;
 52613                this.encryptionMethods = null;
 52614                this.handler = null;
 52615                this.lockDocument = null;
 52616                this.mdp = null;
 52617                this.reasons = null;
 52618                this.timeStamp = null;
 52619              }
 52620            }
 52621            class Float extends o.ContentObject {
 52622              constructor(e) {
 52623                super(f, "float");
 52624                this.id = e.id || "";
 52625                this.name = e.name || "";
 52626                this.use = e.use || "";
 52627                this.usehref = e.usehref || "";
 52628              }
 52629              [r.$finalize]() {
 52630                const e = parseFloat(this[r.$content].trim());
 52631                this[r.$content] = isNaN(e) ? null : e;
 52632              }
 52633              [r.$toHTML](e) {
 52634                return valueToHtml(
 52635                  null !== this[r.$content] ? this[r.$content].toString() : "",
 52636                );
 52637              }
 52638            }
 52639            class Font extends o.XFAObject {
 52640              constructor(e) {
 52641                super(f, "font", !0);
 52642                this.baselineShift = (0, c.getMeasurement)(e.baselineShift);
 52643                this.fontHorizontalScale = (0, c.getFloat)({
 52644                  data: e.fontHorizontalScale,
 52645                  defaultValue: 100,
 52646                  validate: (e) => e >= 0,
 52647                });
 52648                this.fontVerticalScale = (0, c.getFloat)({
 52649                  data: e.fontVerticalScale,
 52650                  defaultValue: 100,
 52651                  validate: (e) => e >= 0,
 52652                });
 52653                this.id = e.id || "";
 52654                this.kerningMode = (0, c.getStringOption)(e.kerningMode, [
 52655                  "none",
 52656                  "pair",
 52657                ]);
 52658                this.letterSpacing = (0, c.getMeasurement)(e.letterSpacing, "0");
 52659                this.lineThrough = (0, c.getInteger)({
 52660                  data: e.lineThrough,
 52661                  defaultValue: 0,
 52662                  validate: (e) => 1 === e || 2 === e,
 52663                });
 52664                this.lineThroughPeriod = (0, c.getStringOption)(
 52665                  e.lineThroughPeriod,
 52666                  ["all", "word"],
 52667                );
 52668                this.overline = (0, c.getInteger)({
 52669                  data: e.overline,
 52670                  defaultValue: 0,
 52671                  validate: (e) => 1 === e || 2 === e,
 52672                });
 52673                this.overlinePeriod = (0, c.getStringOption)(e.overlinePeriod, [
 52674                  "all",
 52675                  "word",
 52676                ]);
 52677                this.posture = (0, c.getStringOption)(e.posture, [
 52678                  "normal",
 52679                  "italic",
 52680                ]);
 52681                this.size = (0, c.getMeasurement)(e.size, "10pt");
 52682                this.typeface = e.typeface || "Courier";
 52683                this.underline = (0, c.getInteger)({
 52684                  data: e.underline,
 52685                  defaultValue: 0,
 52686                  validate: (e) => 1 === e || 2 === e,
 52687                });
 52688                this.underlinePeriod = (0, c.getStringOption)(e.underlinePeriod, [
 52689                  "all",
 52690                  "word",
 52691                ]);
 52692                this.use = e.use || "";
 52693                this.usehref = e.usehref || "";
 52694                this.weight = (0, c.getStringOption)(e.weight, [
 52695                  "normal",
 52696                  "bold",
 52697                ]);
 52698                this.extras = null;
 52699                this.fill = null;
 52700              }
 52701              [r.$clean](e) {
 52702                super[r.$clean](e);
 52703                this[r.$globalData].usedTypefaces.add(this.typeface);
 52704              }
 52705              [r.$toStyle]() {
 52706                const e = (0, s.toStyle)(this, "fill"),
 52707                  t = e.color;
 52708                if (t)
 52709                  if ("#000000" === t) delete e.color;
 52710                  else if (!t.startsWith("#")) {
 52711                    e.background = t;
 52712                    e.backgroundClip = "text";
 52713                    e.color = "transparent";
 52714                  }
 52715                this.baselineShift &&
 52716                  (e.verticalAlign = (0, s.measureToString)(this.baselineShift));
 52717                e.fontKerning = "none" === this.kerningMode ? "none" : "normal";
 52718                e.letterSpacing = (0, s.measureToString)(this.letterSpacing);
 52719                if (0 !== this.lineThrough) {
 52720                  e.textDecoration = "line-through";
 52721                  2 === this.lineThrough && (e.textDecorationStyle = "double");
 52722                }
 52723                if (0 !== this.overline) {
 52724                  e.textDecoration = "overline";
 52725                  2 === this.overline && (e.textDecorationStyle = "double");
 52726                }
 52727                e.fontStyle = this.posture;
 52728                e.fontSize = (0, s.measureToString)(0.99 * this.size);
 52729                (0, s.setFontFamily)(
 52730                  this,
 52731                  this,
 52732                  this[r.$globalData].fontFinder,
 52733                  e,
 52734                );
 52735                if (0 !== this.underline) {
 52736                  e.textDecoration = "underline";
 52737                  2 === this.underline && (e.textDecorationStyle = "double");
 52738                }
 52739                e.fontWeight = this.weight;
 52740                return e;
 52741              }
 52742            }
 52743            class Format extends o.XFAObject {
 52744              constructor(e) {
 52745                super(f, "format", !0);
 52746                this.id = e.id || "";
 52747                this.use = e.use || "";
 52748                this.usehref = e.usehref || "";
 52749                this.extras = null;
 52750                this.picture = null;
 52751              }
 52752            }
 52753            class Handler extends o.StringObject {
 52754              constructor(e) {
 52755                super(f, "handler");
 52756                this.id = e.id || "";
 52757                this.type = (0, c.getStringOption)(e.type, [
 52758                  "optional",
 52759                  "required",
 52760                ]);
 52761                this.use = e.use || "";
 52762                this.usehref = e.usehref || "";
 52763              }
 52764            }
 52765            class Hyphenation extends o.XFAObject {
 52766              constructor(e) {
 52767                super(f, "hyphenation");
 52768                this.excludeAllCaps = (0, c.getInteger)({
 52769                  data: e.excludeAllCaps,
 52770                  defaultValue: 0,
 52771                  validate: (e) => 1 === e,
 52772                });
 52773                this.excludeInitialCap = (0, c.getInteger)({
 52774                  data: e.excludeInitialCap,
 52775                  defaultValue: 0,
 52776                  validate: (e) => 1 === e,
 52777                });
 52778                this.hyphenate = (0, c.getInteger)({
 52779                  data: e.hyphenate,
 52780                  defaultValue: 0,
 52781                  validate: (e) => 1 === e,
 52782                });
 52783                this.id = e.id || "";
 52784                this.pushCharacterCount = (0, c.getInteger)({
 52785                  data: e.pushCharacterCount,
 52786                  defaultValue: 3,
 52787                  validate: (e) => e >= 0,
 52788                });
 52789                this.remainCharacterCount = (0, c.getInteger)({
 52790                  data: e.remainCharacterCount,
 52791                  defaultValue: 3,
 52792                  validate: (e) => e >= 0,
 52793                });
 52794                this.use = e.use || "";
 52795                this.usehref = e.usehref || "";
 52796                this.wordCharacterCount = (0, c.getInteger)({
 52797                  data: e.wordCharacterCount,
 52798                  defaultValue: 7,
 52799                  validate: (e) => e >= 0,
 52800                });
 52801              }
 52802            }
 52803            class Image extends o.StringObject {
 52804              constructor(e) {
 52805                super(f, "image");
 52806                this.aspect = (0, c.getStringOption)(e.aspect, [
 52807                  "fit",
 52808                  "actual",
 52809                  "height",
 52810                  "none",
 52811                  "width",
 52812                ]);
 52813                this.contentType = e.contentType || "";
 52814                this.href = e.href || "";
 52815                this.id = e.id || "";
 52816                this.name = e.name || "";
 52817                this.transferEncoding = (0, c.getStringOption)(
 52818                  e.transferEncoding,
 52819                  ["base64", "none", "package"],
 52820                );
 52821                this.use = e.use || "";
 52822                this.usehref = e.usehref || "";
 52823              }
 52824              [r.$toHTML]() {
 52825                if (this.contentType && !m.has(this.contentType.toLowerCase()))
 52826                  return c.HTMLResult.EMPTY;
 52827                let e =
 52828                  this[r.$globalData].images &&
 52829                  this[r.$globalData].images.get(this.href);
 52830                if (!e && (this.href || !this[r.$content]))
 52831                  return c.HTMLResult.EMPTY;
 52832                e ||
 52833                  "base64" !== this.transferEncoding ||
 52834                  (e = (0, l.stringToBytes)(atob(this[r.$content])));
 52835                if (!e) return c.HTMLResult.EMPTY;
 52836                if (!this.contentType) {
 52837                  for (const [t, a] of b)
 52838                    if (e.length > t.length && t.every((t, a) => t === e[a])) {
 52839                      this.contentType = a;
 52840                      break;
 52841                    }
 52842                  if (!this.contentType) return c.HTMLResult.EMPTY;
 52843                }
 52844                const t = new Blob([e], { type: this.contentType });
 52845                let a;
 52846                switch (this.aspect) {
 52847                  case "fit":
 52848                  case "actual":
 52849                    break;
 52850                  case "height":
 52851                    a = { height: "100%", objectFit: "fill" };
 52852                    break;
 52853                  case "none":
 52854                    a = { width: "100%", height: "100%", objectFit: "fill" };
 52855                    break;
 52856                  case "width":
 52857                    a = { width: "100%", objectFit: "fill" };
 52858                }
 52859                const n = this[r.$getParent]();
 52860                return c.HTMLResult.success({
 52861                  name: "img",
 52862                  attributes: {
 52863                    class: ["xfaImage"],
 52864                    style: a,
 52865                    src: URL.createObjectURL(t),
 52866                    alt: n ? ariaLabel(n[r.$getParent]()) : null,
 52867                  },
 52868                });
 52869              }
 52870            }
 52871            class ImageEdit extends o.XFAObject {
 52872              constructor(e) {
 52873                super(f, "imageEdit", !0);
 52874                this.data = (0, c.getStringOption)(e.data, ["link", "embed"]);
 52875                this.id = e.id || "";
 52876                this.use = e.use || "";
 52877                this.usehref = e.usehref || "";
 52878                this.border = null;
 52879                this.extras = null;
 52880                this.margin = null;
 52881              }
 52882              [r.$toHTML](e) {
 52883                return "embed" === this.data
 52884                  ? c.HTMLResult.success({
 52885                      name: "div",
 52886                      children: [],
 52887                      attributes: {},
 52888                    })
 52889                  : c.HTMLResult.EMPTY;
 52890              }
 52891            }
 52892            class Integer extends o.ContentObject {
 52893              constructor(e) {
 52894                super(f, "integer");
 52895                this.id = e.id || "";
 52896                this.name = e.name || "";
 52897                this.use = e.use || "";
 52898                this.usehref = e.usehref || "";
 52899              }
 52900              [r.$finalize]() {
 52901                const e = parseInt(this[r.$content].trim(), 10);
 52902                this[r.$content] = isNaN(e) ? null : e;
 52903              }
 52904              [r.$toHTML](e) {
 52905                return valueToHtml(
 52906                  null !== this[r.$content] ? this[r.$content].toString() : "",
 52907                );
 52908              }
 52909            }
 52910            class Issuers extends o.XFAObject {
 52911              constructor(e) {
 52912                super(f, "issuers", !0);
 52913                this.id = e.id || "";
 52914                this.type = (0, c.getStringOption)(e.type, [
 52915                  "optional",
 52916                  "required",
 52917                ]);
 52918                this.use = e.use || "";
 52919                this.usehref = e.usehref || "";
 52920                this.certificate = new o.XFAObjectArray();
 52921              }
 52922            }
 52923            class Items extends o.XFAObject {
 52924              constructor(e) {
 52925                super(f, "items", !0);
 52926                this.id = e.id || "";
 52927                this.name = e.name || "";
 52928                this.presence = (0, c.getStringOption)(e.presence, [
 52929                  "visible",
 52930                  "hidden",
 52931                  "inactive",
 52932                  "invisible",
 52933                ]);
 52934                this.ref = e.ref || "";
 52935                this.save = (0, c.getInteger)({
 52936                  data: e.save,
 52937                  defaultValue: 0,
 52938                  validate: (e) => 1 === e,
 52939                });
 52940                this.use = e.use || "";
 52941                this.usehref = e.usehref || "";
 52942                this.boolean = new o.XFAObjectArray();
 52943                this.date = new o.XFAObjectArray();
 52944                this.dateTime = new o.XFAObjectArray();
 52945                this.decimal = new o.XFAObjectArray();
 52946                this.exData = new o.XFAObjectArray();
 52947                this.float = new o.XFAObjectArray();
 52948                this.image = new o.XFAObjectArray();
 52949                this.integer = new o.XFAObjectArray();
 52950                this.text = new o.XFAObjectArray();
 52951                this.time = new o.XFAObjectArray();
 52952              }
 52953              [r.$toHTML]() {
 52954                const e = [];
 52955                for (const t of this[r.$getChildren]()) e.push(t[r.$text]());
 52956                return c.HTMLResult.success(e);
 52957              }
 52958            }
 52959            t.Items = Items;
 52960            class Keep extends o.XFAObject {
 52961              constructor(e) {
 52962                super(f, "keep", !0);
 52963                this.id = e.id || "";
 52964                const t = ["none", "contentArea", "pageArea"];
 52965                this.intact = (0, c.getStringOption)(e.intact, t);
 52966                this.next = (0, c.getStringOption)(e.next, t);
 52967                this.previous = (0, c.getStringOption)(e.previous, t);
 52968                this.use = e.use || "";
 52969                this.usehref = e.usehref || "";
 52970                this.extras = null;
 52971              }
 52972            }
 52973            class KeyUsage extends o.XFAObject {
 52974              constructor(e) {
 52975                super(f, "keyUsage");
 52976                const t = ["", "yes", "no"];
 52977                this.crlSign = (0, c.getStringOption)(e.crlSign, t);
 52978                this.dataEncipherment = (0, c.getStringOption)(
 52979                  e.dataEncipherment,
 52980                  t,
 52981                );
 52982                this.decipherOnly = (0, c.getStringOption)(e.decipherOnly, t);
 52983                this.digitalSignature = (0, c.getStringOption)(
 52984                  e.digitalSignature,
 52985                  t,
 52986                );
 52987                this.encipherOnly = (0, c.getStringOption)(e.encipherOnly, t);
 52988                this.id = e.id || "";
 52989                this.keyAgreement = (0, c.getStringOption)(e.keyAgreement, t);
 52990                this.keyCertSign = (0, c.getStringOption)(e.keyCertSign, t);
 52991                this.keyEncipherment = (0, c.getStringOption)(
 52992                  e.keyEncipherment,
 52993                  t,
 52994                );
 52995                this.nonRepudiation = (0, c.getStringOption)(e.nonRepudiation, t);
 52996                this.type = (0, c.getStringOption)(e.type, [
 52997                  "optional",
 52998                  "required",
 52999                ]);
 53000                this.use = e.use || "";
 53001                this.usehref = e.usehref || "";
 53002              }
 53003            }
 53004            class Line extends o.XFAObject {
 53005              constructor(e) {
 53006                super(f, "line", !0);
 53007                this.hand = (0, c.getStringOption)(e.hand, [
 53008                  "even",
 53009                  "left",
 53010                  "right",
 53011                ]);
 53012                this.id = e.id || "";
 53013                this.slope = (0, c.getStringOption)(e.slope, ["\\", "/"]);
 53014                this.use = e.use || "";
 53015                this.usehref = e.usehref || "";
 53016                this.edge = null;
 53017              }
 53018              [r.$toHTML]() {
 53019                const e = this[r.$getParent]()[r.$getParent](),
 53020                  t = this.edge || new Edge({}),
 53021                  a = t[r.$toStyle](),
 53022                  n = Object.create(null),
 53023                  i = "visible" === t.presence ? t.thickness : 0;
 53024                n.strokeWidth = (0, s.measureToString)(i);
 53025                n.stroke = a.color;
 53026                let o,
 53027                  l,
 53028                  h,
 53029                  u,
 53030                  d = "100%",
 53031                  f = "100%";
 53032                if (e.w <= i) {
 53033                  [o, l, h, u] = ["50%", 0, "50%", "100%"];
 53034                  d = n.strokeWidth;
 53035                } else if (e.h <= i) {
 53036                  [o, l, h, u] = [0, "50%", "100%", "50%"];
 53037                  f = n.strokeWidth;
 53038                } else
 53039                  "\\" === this.slope
 53040                    ? ([o, l, h, u] = [0, 0, "100%", "100%"])
 53041                    : ([o, l, h, u] = [0, "100%", "100%", 0]);
 53042                const p = {
 53043                  name: "svg",
 53044                  children: [
 53045                    {
 53046                      name: "line",
 53047                      attributes: {
 53048                        xmlns: g,
 53049                        x1: o,
 53050                        y1: l,
 53051                        x2: h,
 53052                        y2: u,
 53053                        style: n,
 53054                      },
 53055                    },
 53056                  ],
 53057                  attributes: {
 53058                    xmlns: g,
 53059                    width: d,
 53060                    height: f,
 53061                    style: { overflow: "visible" },
 53062                  },
 53063                };
 53064                if (hasMargin(e))
 53065                  return c.HTMLResult.success({
 53066                    name: "div",
 53067                    attributes: {
 53068                      style: { display: "inline", width: "100%", height: "100%" },
 53069                    },
 53070                    children: [p],
 53071                  });
 53072                p.attributes.style.position = "absolute";
 53073                return c.HTMLResult.success(p);
 53074              }
 53075            }
 53076            class Linear extends o.XFAObject {
 53077              constructor(e) {
 53078                super(f, "linear", !0);
 53079                this.id = e.id || "";
 53080                this.type = (0, c.getStringOption)(e.type, [
 53081                  "toRight",
 53082                  "toBottom",
 53083                  "toLeft",
 53084                  "toTop",
 53085                ]);
 53086                this.use = e.use || "";
 53087                this.usehref = e.usehref || "";
 53088                this.color = null;
 53089                this.extras = null;
 53090              }
 53091              [r.$toStyle](e) {
 53092                e = e ? e[r.$toStyle]() : "#FFFFFF";
 53093                return `linear-gradient(${this.type.replace(/([RBLT])/, " $1").toLowerCase()}, ${e}, ${this.color ? this.color[r.$toStyle]() : "#000000"})`;
 53094              }
 53095            }
 53096            class LockDocument extends o.ContentObject {
 53097              constructor(e) {
 53098                super(f, "lockDocument");
 53099                this.id = e.id || "";
 53100                this.type = (0, c.getStringOption)(e.type, [
 53101                  "optional",
 53102                  "required",
 53103                ]);
 53104                this.use = e.use || "";
 53105                this.usehref = e.usehref || "";
 53106              }
 53107              [r.$finalize]() {
 53108                this[r.$content] = (0, c.getStringOption)(this[r.$content], [
 53109                  "auto",
 53110                  "0",
 53111                  "1",
 53112                ]);
 53113              }
 53114            }
 53115            class Manifest extends o.XFAObject {
 53116              constructor(e) {
 53117                super(f, "manifest", !0);
 53118                this.action = (0, c.getStringOption)(e.action, [
 53119                  "include",
 53120                  "all",
 53121                  "exclude",
 53122                ]);
 53123                this.id = e.id || "";
 53124                this.name = e.name || "";
 53125                this.use = e.use || "";
 53126                this.usehref = e.usehref || "";
 53127                this.extras = null;
 53128                this.ref = new o.XFAObjectArray();
 53129              }
 53130            }
 53131            class Margin extends o.XFAObject {
 53132              constructor(e) {
 53133                super(f, "margin", !0);
 53134                this.bottomInset = (0, c.getMeasurement)(e.bottomInset, "0");
 53135                this.id = e.id || "";
 53136                this.leftInset = (0, c.getMeasurement)(e.leftInset, "0");
 53137                this.rightInset = (0, c.getMeasurement)(e.rightInset, "0");
 53138                this.topInset = (0, c.getMeasurement)(e.topInset, "0");
 53139                this.use = e.use || "";
 53140                this.usehref = e.usehref || "";
 53141                this.extras = null;
 53142              }
 53143              [r.$toStyle]() {
 53144                return {
 53145                  margin:
 53146                    (0, s.measureToString)(this.topInset) +
 53147                    " " +
 53148                    (0, s.measureToString)(this.rightInset) +
 53149                    " " +
 53150                    (0, s.measureToString)(this.bottomInset) +
 53151                    " " +
 53152                    (0, s.measureToString)(this.leftInset),
 53153                };
 53154              }
 53155            }
 53156            class Mdp extends o.XFAObject {
 53157              constructor(e) {
 53158                super(f, "mdp");
 53159                this.id = e.id || "";
 53160                this.permissions = (0, c.getInteger)({
 53161                  data: e.permissions,
 53162                  defaultValue: 2,
 53163                  validate: (e) => 1 === e || 3 === e,
 53164                });
 53165                this.signatureType = (0, c.getStringOption)(e.signatureType, [
 53166                  "filler",
 53167                  "author",
 53168                ]);
 53169                this.use = e.use || "";
 53170                this.usehref = e.usehref || "";
 53171              }
 53172            }
 53173            class Medium extends o.XFAObject {
 53174              constructor(e) {
 53175                super(f, "medium");
 53176                this.id = e.id || "";
 53177                this.imagingBBox = (0, c.getBBox)(e.imagingBBox);
 53178                this.long = (0, c.getMeasurement)(e.long);
 53179                this.orientation = (0, c.getStringOption)(e.orientation, [
 53180                  "portrait",
 53181                  "landscape",
 53182                ]);
 53183                this.short = (0, c.getMeasurement)(e.short);
 53184                this.stock = e.stock || "";
 53185                this.trayIn = (0, c.getStringOption)(e.trayIn, [
 53186                  "auto",
 53187                  "delegate",
 53188                  "pageFront",
 53189                ]);
 53190                this.trayOut = (0, c.getStringOption)(e.trayOut, [
 53191                  "auto",
 53192                  "delegate",
 53193                ]);
 53194                this.use = e.use || "";
 53195                this.usehref = e.usehref || "";
 53196              }
 53197            }
 53198            class Message extends o.XFAObject {
 53199              constructor(e) {
 53200                super(f, "message", !0);
 53201                this.id = e.id || "";
 53202                this.use = e.use || "";
 53203                this.usehref = e.usehref || "";
 53204                this.text = new o.XFAObjectArray();
 53205              }
 53206            }
 53207            class NumericEdit extends o.XFAObject {
 53208              constructor(e) {
 53209                super(f, "numericEdit", !0);
 53210                this.hScrollPolicy = (0, c.getStringOption)(e.hScrollPolicy, [
 53211                  "auto",
 53212                  "off",
 53213                  "on",
 53214                ]);
 53215                this.id = e.id || "";
 53216                this.use = e.use || "";
 53217                this.usehref = e.usehref || "";
 53218                this.border = null;
 53219                this.comb = null;
 53220                this.extras = null;
 53221                this.margin = null;
 53222              }
 53223              [r.$toHTML](e) {
 53224                const t = (0, s.toStyle)(this, "border", "font", "margin"),
 53225                  a = this[r.$getParent]()[r.$getParent](),
 53226                  n = {
 53227                    name: "input",
 53228                    attributes: {
 53229                      type: "text",
 53230                      fieldId: a[r.$uid],
 53231                      dataId: a[r.$data]?.[r.$uid] || a[r.$uid],
 53232                      class: ["xfaTextfield"],
 53233                      style: t,
 53234                      "aria-label": ariaLabel(a),
 53235                      "aria-required": !1,
 53236                    },
 53237                  };
 53238                if (isRequired(a)) {
 53239                  n.attributes["aria-required"] = !0;
 53240                  n.attributes.required = !0;
 53241                }
 53242                return c.HTMLResult.success({
 53243                  name: "label",
 53244                  attributes: { class: ["xfaLabel"] },
 53245                  children: [n],
 53246                });
 53247              }
 53248            }
 53249            class Occur extends o.XFAObject {
 53250              constructor(e) {
 53251                super(f, "occur", !0);
 53252                this.id = e.id || "";
 53253                this.initial =
 53254                  "" !== e.initial
 53255                    ? (0, c.getInteger)({
 53256                        data: e.initial,
 53257                        defaultValue: "",
 53258                        validate: (e) => !0,
 53259                      })
 53260                    : "";
 53261                this.max =
 53262                  "" !== e.max
 53263                    ? (0, c.getInteger)({
 53264                        data: e.max,
 53265                        defaultValue: 1,
 53266                        validate: (e) => !0,
 53267                      })
 53268                    : "";
 53269                this.min =
 53270                  "" !== e.min
 53271                    ? (0, c.getInteger)({
 53272                        data: e.min,
 53273                        defaultValue: 1,
 53274                        validate: (e) => !0,
 53275                      })
 53276                    : "";
 53277                this.use = e.use || "";
 53278                this.usehref = e.usehref || "";
 53279                this.extras = null;
 53280              }
 53281              [r.$clean]() {
 53282                const e = this[r.$getParent](),
 53283                  t = this.min;
 53284                "" === this.min &&
 53285                  (this.min =
 53286                    e instanceof PageArea || e instanceof PageSet ? 0 : 1);
 53287                "" === this.max &&
 53288                  (this.max =
 53289                    "" === t
 53290                      ? e instanceof PageArea || e instanceof PageSet
 53291                        ? -1
 53292                        : 1
 53293                      : this.min);
 53294                -1 !== this.max && this.max < this.min && (this.max = this.min);
 53295                "" === this.initial &&
 53296                  (this.initial = e instanceof Template ? 1 : this.min);
 53297              }
 53298            }
 53299            class Oid extends o.StringObject {
 53300              constructor(e) {
 53301                super(f, "oid");
 53302                this.id = e.id || "";
 53303                this.name = e.name || "";
 53304                this.use = e.use || "";
 53305                this.usehref = e.usehref || "";
 53306              }
 53307            }
 53308            class Oids extends o.XFAObject {
 53309              constructor(e) {
 53310                super(f, "oids", !0);
 53311                this.id = e.id || "";
 53312                this.type = (0, c.getStringOption)(e.type, [
 53313                  "optional",
 53314                  "required",
 53315                ]);
 53316                this.use = e.use || "";
 53317                this.usehref = e.usehref || "";
 53318                this.oid = new o.XFAObjectArray();
 53319              }
 53320            }
 53321            class Overflow extends o.XFAObject {
 53322              constructor(e) {
 53323                super(f, "overflow");
 53324                this.id = e.id || "";
 53325                this.leader = e.leader || "";
 53326                this.target = e.target || "";
 53327                this.trailer = e.trailer || "";
 53328                this.use = e.use || "";
 53329                this.usehref = e.usehref || "";
 53330              }
 53331              [r.$getExtra]() {
 53332                if (!this[r.$extra]) {
 53333                  const e = this[r.$getParent](),
 53334                    t = this[r.$getTemplateRoot](),
 53335                    a = t[r.$searchNode](this.target, e),
 53336                    n = t[r.$searchNode](this.leader, e),
 53337                    i = t[r.$searchNode](this.trailer, e);
 53338                  this[r.$extra] = {
 53339                    target: a?.[0] || null,
 53340                    leader: n?.[0] || null,
 53341                    trailer: i?.[0] || null,
 53342                    addLeader: !1,
 53343                    addTrailer: !1,
 53344                  };
 53345                }
 53346                return this[r.$extra];
 53347              }
 53348            }
 53349            class PageArea extends o.XFAObject {
 53350              constructor(e) {
 53351                super(f, "pageArea", !0);
 53352                this.blankOrNotBlank = (0, c.getStringOption)(e.blankOrNotBlank, [
 53353                  "any",
 53354                  "blank",
 53355                  "notBlank",
 53356                ]);
 53357                this.id = e.id || "";
 53358                this.initialNumber = (0, c.getInteger)({
 53359                  data: e.initialNumber,
 53360                  defaultValue: 1,
 53361                  validate: (e) => !0,
 53362                });
 53363                this.name = e.name || "";
 53364                this.numbered = (0, c.getInteger)({
 53365                  data: e.numbered,
 53366                  defaultValue: 1,
 53367                  validate: (e) => !0,
 53368                });
 53369                this.oddOrEven = (0, c.getStringOption)(e.oddOrEven, [
 53370                  "any",
 53371                  "even",
 53372                  "odd",
 53373                ]);
 53374                this.pagePosition = (0, c.getStringOption)(e.pagePosition, [
 53375                  "any",
 53376                  "first",
 53377                  "last",
 53378                  "only",
 53379                  "rest",
 53380                ]);
 53381                this.relevant = (0, c.getRelevant)(e.relevant);
 53382                this.use = e.use || "";
 53383                this.usehref = e.usehref || "";
 53384                this.desc = null;
 53385                this.extras = null;
 53386                this.medium = null;
 53387                this.occur = null;
 53388                this.area = new o.XFAObjectArray();
 53389                this.contentArea = new o.XFAObjectArray();
 53390                this.draw = new o.XFAObjectArray();
 53391                this.exclGroup = new o.XFAObjectArray();
 53392                this.field = new o.XFAObjectArray();
 53393                this.subform = new o.XFAObjectArray();
 53394              }
 53395              [r.$isUsable]() {
 53396                if (!this[r.$extra]) {
 53397                  this[r.$extra] = { numberOfUse: 0 };
 53398                  return !0;
 53399                }
 53400                return (
 53401                  !this.occur ||
 53402                  -1 === this.occur.max ||
 53403                  this[r.$extra].numberOfUse < this.occur.max
 53404                );
 53405              }
 53406              [r.$cleanPage]() {
 53407                delete this[r.$extra];
 53408              }
 53409              [r.$getNextPage]() {
 53410                this[r.$extra] || (this[r.$extra] = { numberOfUse: 0 });
 53411                const e = this[r.$getParent]();
 53412                if ("orderedOccurrence" === e.relation && this[r.$isUsable]()) {
 53413                  this[r.$extra].numberOfUse += 1;
 53414                  return this;
 53415                }
 53416                return e[r.$getNextPage]();
 53417              }
 53418              [r.$getAvailableSpace]() {
 53419                return this[r.$extra].space || { width: 0, height: 0 };
 53420              }
 53421              [r.$toHTML]() {
 53422                this[r.$extra] || (this[r.$extra] = { numberOfUse: 1 });
 53423                const e = [];
 53424                this[r.$extra].children = e;
 53425                const t = Object.create(null);
 53426                if (this.medium && this.medium.short && this.medium.long) {
 53427                  t.width = (0, s.measureToString)(this.medium.short);
 53428                  t.height = (0, s.measureToString)(this.medium.long);
 53429                  this[r.$extra].space = {
 53430                    width: this.medium.short,
 53431                    height: this.medium.long,
 53432                  };
 53433                  if ("landscape" === this.medium.orientation) {
 53434                    const e = t.width;
 53435                    t.width = t.height;
 53436                    t.height = e;
 53437                    this[r.$extra].space = {
 53438                      width: this.medium.long,
 53439                      height: this.medium.short,
 53440                    };
 53441                  }
 53442                } else
 53443                  (0, l.warn)(
 53444                    "XFA - No medium specified in pageArea: please file a bug.",
 53445                  );
 53446                this[r.$childrenToHTML]({
 53447                  filter: new Set(["area", "draw", "field", "subform"]),
 53448                  include: !0,
 53449                });
 53450                this[r.$childrenToHTML]({
 53451                  filter: new Set(["contentArea"]),
 53452                  include: !0,
 53453                });
 53454                return c.HTMLResult.success({
 53455                  name: "div",
 53456                  children: e,
 53457                  attributes: {
 53458                    class: ["xfaPage"],
 53459                    id: this[r.$uid],
 53460                    style: t,
 53461                    xfaName: this.name,
 53462                  },
 53463                });
 53464              }
 53465            }
 53466            class PageSet extends o.XFAObject {
 53467              constructor(e) {
 53468                super(f, "pageSet", !0);
 53469                this.duplexImposition = (0, c.getStringOption)(
 53470                  e.duplexImposition,
 53471                  ["longEdge", "shortEdge"],
 53472                );
 53473                this.id = e.id || "";
 53474                this.name = e.name || "";
 53475                this.relation = (0, c.getStringOption)(e.relation, [
 53476                  "orderedOccurrence",
 53477                  "duplexPaginated",
 53478                  "simplexPaginated",
 53479                ]);
 53480                this.relevant = (0, c.getRelevant)(e.relevant);
 53481                this.use = e.use || "";
 53482                this.usehref = e.usehref || "";
 53483                this.extras = null;
 53484                this.occur = null;
 53485                this.pageArea = new o.XFAObjectArray();
 53486                this.pageSet = new o.XFAObjectArray();
 53487              }
 53488              [r.$cleanPage]() {
 53489                for (const e of this.pageArea.children) e[r.$cleanPage]();
 53490                for (const e of this.pageSet.children) e[r.$cleanPage]();
 53491              }
 53492              [r.$isUsable]() {
 53493                return (
 53494                  !this.occur ||
 53495                  -1 === this.occur.max ||
 53496                  this[r.$extra].numberOfUse < this.occur.max
 53497                );
 53498              }
 53499              [r.$getNextPage]() {
 53500                this[r.$extra] ||
 53501                  (this[r.$extra] = {
 53502                    numberOfUse: 1,
 53503                    pageIndex: -1,
 53504                    pageSetIndex: -1,
 53505                  });
 53506                if ("orderedOccurrence" === this.relation) {
 53507                  if (
 53508                    this[r.$extra].pageIndex + 1 <
 53509                    this.pageArea.children.length
 53510                  ) {
 53511                    this[r.$extra].pageIndex += 1;
 53512                    return this.pageArea.children[this[r.$extra].pageIndex][
 53513                      r.$getNextPage
 53514                    ]();
 53515                  }
 53516                  if (
 53517                    this[r.$extra].pageSetIndex + 1 <
 53518                    this.pageSet.children.length
 53519                  ) {
 53520                    this[r.$extra].pageSetIndex += 1;
 53521                    return this.pageSet.children[this[r.$extra].pageSetIndex][
 53522                      r.$getNextPage
 53523                    ]();
 53524                  }
 53525                  if (this[r.$isUsable]()) {
 53526                    this[r.$extra].numberOfUse += 1;
 53527                    this[r.$extra].pageIndex = -1;
 53528                    this[r.$extra].pageSetIndex = -1;
 53529                    return this[r.$getNextPage]();
 53530                  }
 53531                  const e = this[r.$getParent]();
 53532                  if (e instanceof PageSet) return e[r.$getNextPage]();
 53533                  this[r.$cleanPage]();
 53534                  return this[r.$getNextPage]();
 53535                }
 53536                const e = this[r.$getTemplateRoot]()[r.$extra].pageNumber,
 53537                  t = e % 2 == 0 ? "even" : "odd",
 53538                  a = 0 === e ? "first" : "rest";
 53539                let n = this.pageArea.children.find(
 53540                  (e) => e.oddOrEven === t && e.pagePosition === a,
 53541                );
 53542                if (n) return n;
 53543                n = this.pageArea.children.find(
 53544                  (e) => "any" === e.oddOrEven && e.pagePosition === a,
 53545                );
 53546                if (n) return n;
 53547                n = this.pageArea.children.find(
 53548                  (e) => "any" === e.oddOrEven && "any" === e.pagePosition,
 53549                );
 53550                return n || this.pageArea.children[0];
 53551              }
 53552            }
 53553            class Para extends o.XFAObject {
 53554              constructor(e) {
 53555                super(f, "para", !0);
 53556                this.hAlign = (0, c.getStringOption)(e.hAlign, [
 53557                  "left",
 53558                  "center",
 53559                  "justify",
 53560                  "justifyAll",
 53561                  "radix",
 53562                  "right",
 53563                ]);
 53564                this.id = e.id || "";
 53565                this.lineHeight = e.lineHeight
 53566                  ? (0, c.getMeasurement)(e.lineHeight, "0pt")
 53567                  : "";
 53568                this.marginLeft = e.marginLeft
 53569                  ? (0, c.getMeasurement)(e.marginLeft, "0pt")
 53570                  : "";
 53571                this.marginRight = e.marginRight
 53572                  ? (0, c.getMeasurement)(e.marginRight, "0pt")
 53573                  : "";
 53574                this.orphans = (0, c.getInteger)({
 53575                  data: e.orphans,
 53576                  defaultValue: 0,
 53577                  validate: (e) => e >= 0,
 53578                });
 53579                this.preserve = e.preserve || "";
 53580                this.radixOffset = e.radixOffset
 53581                  ? (0, c.getMeasurement)(e.radixOffset, "0pt")
 53582                  : "";
 53583                this.spaceAbove = e.spaceAbove
 53584                  ? (0, c.getMeasurement)(e.spaceAbove, "0pt")
 53585                  : "";
 53586                this.spaceBelow = e.spaceBelow
 53587                  ? (0, c.getMeasurement)(e.spaceBelow, "0pt")
 53588                  : "";
 53589                this.tabDefault = e.tabDefault
 53590                  ? (0, c.getMeasurement)(this.tabDefault)
 53591                  : "";
 53592                this.tabStops = (e.tabStops || "")
 53593                  .trim()
 53594                  .split(/\s+/)
 53595                  .map((e, t) => (t % 2 == 1 ? (0, c.getMeasurement)(e) : e));
 53596                this.textIndent = e.textIndent
 53597                  ? (0, c.getMeasurement)(e.textIndent, "0pt")
 53598                  : "";
 53599                this.use = e.use || "";
 53600                this.usehref = e.usehref || "";
 53601                this.vAlign = (0, c.getStringOption)(e.vAlign, [
 53602                  "top",
 53603                  "bottom",
 53604                  "middle",
 53605                ]);
 53606                this.widows = (0, c.getInteger)({
 53607                  data: e.widows,
 53608                  defaultValue: 0,
 53609                  validate: (e) => e >= 0,
 53610                });
 53611                this.hyphenation = null;
 53612              }
 53613              [r.$toStyle]() {
 53614                const e = (0, s.toStyle)(this, "hAlign");
 53615                "" !== this.marginLeft &&
 53616                  (e.paddingLeft = (0, s.measureToString)(this.marginLeft));
 53617                "" !== this.marginRight &&
 53618                  (e.paddingight = (0, s.measureToString)(this.marginRight));
 53619                "" !== this.spaceAbove &&
 53620                  (e.paddingTop = (0, s.measureToString)(this.spaceAbove));
 53621                "" !== this.spaceBelow &&
 53622                  (e.paddingBottom = (0, s.measureToString)(this.spaceBelow));
 53623                if ("" !== this.textIndent) {
 53624                  e.textIndent = (0, s.measureToString)(this.textIndent);
 53625                  (0, s.fixTextIndent)(e);
 53626                }
 53627                this.lineHeight > 0 &&
 53628                  (e.lineHeight = (0, s.measureToString)(this.lineHeight));
 53629                "" !== this.tabDefault &&
 53630                  (e.tabSize = (0, s.measureToString)(this.tabDefault));
 53631                this.tabStops.length;
 53632                this.hyphenatation &&
 53633                  Object.assign(e, this.hyphenatation[r.$toStyle]());
 53634                return e;
 53635              }
 53636            }
 53637            class PasswordEdit extends o.XFAObject {
 53638              constructor(e) {
 53639                super(f, "passwordEdit", !0);
 53640                this.hScrollPolicy = (0, c.getStringOption)(e.hScrollPolicy, [
 53641                  "auto",
 53642                  "off",
 53643                  "on",
 53644                ]);
 53645                this.id = e.id || "";
 53646                this.passwordChar = e.passwordChar || "*";
 53647                this.use = e.use || "";
 53648                this.usehref = e.usehref || "";
 53649                this.border = null;
 53650                this.extras = null;
 53651                this.margin = null;
 53652              }
 53653            }
 53654            class Pattern extends o.XFAObject {
 53655              constructor(e) {
 53656                super(f, "pattern", !0);
 53657                this.id = e.id || "";
 53658                this.type = (0, c.getStringOption)(e.type, [
 53659                  "crossHatch",
 53660                  "crossDiagonal",
 53661                  "diagonalLeft",
 53662                  "diagonalRight",
 53663                  "horizontal",
 53664                  "vertical",
 53665                ]);
 53666                this.use = e.use || "";
 53667                this.usehref = e.usehref || "";
 53668                this.color = null;
 53669                this.extras = null;
 53670              }
 53671              [r.$toStyle](e) {
 53672                e = e ? e[r.$toStyle]() : "#FFFFFF";
 53673                const t = this.color ? this.color[r.$toStyle]() : "#000000",
 53674                  a = "repeating-linear-gradient",
 53675                  n = `${e},${e} 5px,${t} 5px,${t} 10px`;
 53676                switch (this.type) {
 53677                  case "crossHatch":
 53678                    return `${a}(to top,${n}) ${a}(to right,${n})`;
 53679                  case "crossDiagonal":
 53680                    return `${a}(45deg,${n}) ${a}(-45deg,${n})`;
 53681                  case "diagonalLeft":
 53682                    return `${a}(45deg,${n})`;
 53683                  case "diagonalRight":
 53684                    return `${a}(-45deg,${n})`;
 53685                  case "horizontal":
 53686                    return `${a}(to top,${n})`;
 53687                  case "vertical":
 53688                    return `${a}(to right,${n})`;
 53689                }
 53690                return "";
 53691              }
 53692            }
 53693            class Picture extends o.StringObject {
 53694              constructor(e) {
 53695                super(f, "picture");
 53696                this.id = e.id || "";
 53697                this.use = e.use || "";
 53698                this.usehref = e.usehref || "";
 53699              }
 53700            }
 53701            class Proto extends o.XFAObject {
 53702              constructor(e) {
 53703                super(f, "proto", !0);
 53704                this.appearanceFilter = new o.XFAObjectArray();
 53705                this.arc = new o.XFAObjectArray();
 53706                this.area = new o.XFAObjectArray();
 53707                this.assist = new o.XFAObjectArray();
 53708                this.barcode = new o.XFAObjectArray();
 53709                this.bindItems = new o.XFAObjectArray();
 53710                this.bookend = new o.XFAObjectArray();
 53711                this.boolean = new o.XFAObjectArray();
 53712                this.border = new o.XFAObjectArray();
 53713                this.break = new o.XFAObjectArray();
 53714                this.breakAfter = new o.XFAObjectArray();
 53715                this.breakBefore = new o.XFAObjectArray();
 53716                this.button = new o.XFAObjectArray();
 53717                this.calculate = new o.XFAObjectArray();
 53718                this.caption = new o.XFAObjectArray();
 53719                this.certificate = new o.XFAObjectArray();
 53720                this.certificates = new o.XFAObjectArray();
 53721                this.checkButton = new o.XFAObjectArray();
 53722                this.choiceList = new o.XFAObjectArray();
 53723                this.color = new o.XFAObjectArray();
 53724                this.comb = new o.XFAObjectArray();
 53725                this.connect = new o.XFAObjectArray();
 53726                this.contentArea = new o.XFAObjectArray();
 53727                this.corner = new o.XFAObjectArray();
 53728                this.date = new o.XFAObjectArray();
 53729                this.dateTime = new o.XFAObjectArray();
 53730                this.dateTimeEdit = new o.XFAObjectArray();
 53731                this.decimal = new o.XFAObjectArray();
 53732                this.defaultUi = new o.XFAObjectArray();
 53733                this.desc = new o.XFAObjectArray();
 53734                this.digestMethod = new o.XFAObjectArray();
 53735                this.digestMethods = new o.XFAObjectArray();
 53736                this.draw = new o.XFAObjectArray();
 53737                this.edge = new o.XFAObjectArray();
 53738                this.encoding = new o.XFAObjectArray();
 53739                this.encodings = new o.XFAObjectArray();
 53740                this.encrypt = new o.XFAObjectArray();
 53741                this.encryptData = new o.XFAObjectArray();
 53742                this.encryption = new o.XFAObjectArray();
 53743                this.encryptionMethod = new o.XFAObjectArray();
 53744                this.encryptionMethods = new o.XFAObjectArray();
 53745                this.event = new o.XFAObjectArray();
 53746                this.exData = new o.XFAObjectArray();
 53747                this.exObject = new o.XFAObjectArray();
 53748                this.exclGroup = new o.XFAObjectArray();
 53749                this.execute = new o.XFAObjectArray();
 53750                this.extras = new o.XFAObjectArray();
 53751                this.field = new o.XFAObjectArray();
 53752                this.fill = new o.XFAObjectArray();
 53753                this.filter = new o.XFAObjectArray();
 53754                this.float = new o.XFAObjectArray();
 53755                this.font = new o.XFAObjectArray();
 53756                this.format = new o.XFAObjectArray();
 53757                this.handler = new o.XFAObjectArray();
 53758                this.hyphenation = new o.XFAObjectArray();
 53759                this.image = new o.XFAObjectArray();
 53760                this.imageEdit = new o.XFAObjectArray();
 53761                this.integer = new o.XFAObjectArray();
 53762                this.issuers = new o.XFAObjectArray();
 53763                this.items = new o.XFAObjectArray();
 53764                this.keep = new o.XFAObjectArray();
 53765                this.keyUsage = new o.XFAObjectArray();
 53766                this.line = new o.XFAObjectArray();
 53767                this.linear = new o.XFAObjectArray();
 53768                this.lockDocument = new o.XFAObjectArray();
 53769                this.manifest = new o.XFAObjectArray();
 53770                this.margin = new o.XFAObjectArray();
 53771                this.mdp = new o.XFAObjectArray();
 53772                this.medium = new o.XFAObjectArray();
 53773                this.message = new o.XFAObjectArray();
 53774                this.numericEdit = new o.XFAObjectArray();
 53775                this.occur = new o.XFAObjectArray();
 53776                this.oid = new o.XFAObjectArray();
 53777                this.oids = new o.XFAObjectArray();
 53778                this.overflow = new o.XFAObjectArray();
 53779                this.pageArea = new o.XFAObjectArray();
 53780                this.pageSet = new o.XFAObjectArray();
 53781                this.para = new o.XFAObjectArray();
 53782                this.passwordEdit = new o.XFAObjectArray();
 53783                this.pattern = new o.XFAObjectArray();
 53784                this.picture = new o.XFAObjectArray();
 53785                this.radial = new o.XFAObjectArray();
 53786                this.reason = new o.XFAObjectArray();
 53787                this.reasons = new o.XFAObjectArray();
 53788                this.rectangle = new o.XFAObjectArray();
 53789                this.ref = new o.XFAObjectArray();
 53790                this.script = new o.XFAObjectArray();
 53791                this.setProperty = new o.XFAObjectArray();
 53792                this.signData = new o.XFAObjectArray();
 53793                this.signature = new o.XFAObjectArray();
 53794                this.signing = new o.XFAObjectArray();
 53795                this.solid = new o.XFAObjectArray();
 53796                this.speak = new o.XFAObjectArray();
 53797                this.stipple = new o.XFAObjectArray();
 53798                this.subform = new o.XFAObjectArray();
 53799                this.subformSet = new o.XFAObjectArray();
 53800                this.subjectDN = new o.XFAObjectArray();
 53801                this.subjectDNs = new o.XFAObjectArray();
 53802                this.submit = new o.XFAObjectArray();
 53803                this.text = new o.XFAObjectArray();
 53804                this.textEdit = new o.XFAObjectArray();
 53805                this.time = new o.XFAObjectArray();
 53806                this.timeStamp = new o.XFAObjectArray();
 53807                this.toolTip = new o.XFAObjectArray();
 53808                this.traversal = new o.XFAObjectArray();
 53809                this.traverse = new o.XFAObjectArray();
 53810                this.ui = new o.XFAObjectArray();
 53811                this.validate = new o.XFAObjectArray();
 53812                this.value = new o.XFAObjectArray();
 53813                this.variables = new o.XFAObjectArray();
 53814              }
 53815            }
 53816            class Radial extends o.XFAObject {
 53817              constructor(e) {
 53818                super(f, "radial", !0);
 53819                this.id = e.id || "";
 53820                this.type = (0, c.getStringOption)(e.type, [
 53821                  "toEdge",
 53822                  "toCenter",
 53823                ]);
 53824                this.use = e.use || "";
 53825                this.usehref = e.usehref || "";
 53826                this.color = null;
 53827                this.extras = null;
 53828              }
 53829              [r.$toStyle](e) {
 53830                e = e ? e[r.$toStyle]() : "#FFFFFF";
 53831                const t = this.color ? this.color[r.$toStyle]() : "#000000";
 53832                return `radial-gradient(circle at center, ${"toEdge" === this.type ? `${e},${t}` : `${t},${e}`})`;
 53833              }
 53834            }
 53835            class Reason extends o.StringObject {
 53836              constructor(e) {
 53837                super(f, "reason");
 53838                this.id = e.id || "";
 53839                this.name = e.name || "";
 53840                this.use = e.use || "";
 53841                this.usehref = e.usehref || "";
 53842              }
 53843            }
 53844            class Reasons extends o.XFAObject {
 53845              constructor(e) {
 53846                super(f, "reasons", !0);
 53847                this.id = e.id || "";
 53848                this.type = (0, c.getStringOption)(e.type, [
 53849                  "optional",
 53850                  "required",
 53851                ]);
 53852                this.use = e.use || "";
 53853                this.usehref = e.usehref || "";
 53854                this.reason = new o.XFAObjectArray();
 53855              }
 53856            }
 53857            class Rectangle extends o.XFAObject {
 53858              constructor(e) {
 53859                super(f, "rectangle", !0);
 53860                this.hand = (0, c.getStringOption)(e.hand, [
 53861                  "even",
 53862                  "left",
 53863                  "right",
 53864                ]);
 53865                this.id = e.id || "";
 53866                this.use = e.use || "";
 53867                this.usehref = e.usehref || "";
 53868                this.corner = new o.XFAObjectArray(4);
 53869                this.edge = new o.XFAObjectArray(4);
 53870                this.fill = null;
 53871              }
 53872              [r.$toHTML]() {
 53873                const e = this.edge.children.length
 53874                    ? this.edge.children[0]
 53875                    : new Edge({}),
 53876                  t = e[r.$toStyle](),
 53877                  a = Object.create(null);
 53878                "visible" === this.fill?.presence
 53879                  ? Object.assign(a, this.fill[r.$toStyle]())
 53880                  : (a.fill = "transparent");
 53881                a.strokeWidth = (0, s.measureToString)(
 53882                  "visible" === e.presence ? e.thickness : 0,
 53883                );
 53884                a.stroke = t.color;
 53885                const n = (
 53886                    this.corner.children.length
 53887                      ? this.corner.children[0]
 53888                      : new Corner({})
 53889                  )[r.$toStyle](),
 53890                  i = {
 53891                    name: "svg",
 53892                    children: [
 53893                      {
 53894                        name: "rect",
 53895                        attributes: {
 53896                          xmlns: g,
 53897                          width: "100%",
 53898                          height: "100%",
 53899                          x: 0,
 53900                          y: 0,
 53901                          rx: n.radius,
 53902                          ry: n.radius,
 53903                          style: a,
 53904                        },
 53905                      },
 53906                    ],
 53907                    attributes: {
 53908                      xmlns: g,
 53909                      style: { overflow: "visible" },
 53910                      width: "100%",
 53911                      height: "100%",
 53912                    },
 53913                  };
 53914                if (hasMargin(this[r.$getParent]()[r.$getParent]()))
 53915                  return c.HTMLResult.success({
 53916                    name: "div",
 53917                    attributes: {
 53918                      style: { display: "inline", width: "100%", height: "100%" },
 53919                    },
 53920                    children: [i],
 53921                  });
 53922                i.attributes.style.position = "absolute";
 53923                return c.HTMLResult.success(i);
 53924              }
 53925            }
 53926            class RefElement extends o.StringObject {
 53927              constructor(e) {
 53928                super(f, "ref");
 53929                this.id = e.id || "";
 53930                this.use = e.use || "";
 53931                this.usehref = e.usehref || "";
 53932              }
 53933            }
 53934            class Script extends o.StringObject {
 53935              constructor(e) {
 53936                super(f, "script");
 53937                this.binding = e.binding || "";
 53938                this.contentType = e.contentType || "";
 53939                this.id = e.id || "";
 53940                this.name = e.name || "";
 53941                this.runAt = (0, c.getStringOption)(e.runAt, [
 53942                  "client",
 53943                  "both",
 53944                  "server",
 53945                ]);
 53946                this.use = e.use || "";
 53947                this.usehref = e.usehref || "";
 53948              }
 53949            }
 53950            class SetProperty extends o.XFAObject {
 53951              constructor(e) {
 53952                super(f, "setProperty");
 53953                this.connection = e.connection || "";
 53954                this.ref = e.ref || "";
 53955                this.target = e.target || "";
 53956              }
 53957            }
 53958            t.SetProperty = SetProperty;
 53959            class SignData extends o.XFAObject {
 53960              constructor(e) {
 53961                super(f, "signData", !0);
 53962                this.id = e.id || "";
 53963                this.operation = (0, c.getStringOption)(e.operation, [
 53964                  "sign",
 53965                  "clear",
 53966                  "verify",
 53967                ]);
 53968                this.ref = e.ref || "";
 53969                this.target = e.target || "";
 53970                this.use = e.use || "";
 53971                this.usehref = e.usehref || "";
 53972                this.filter = null;
 53973                this.manifest = null;
 53974              }
 53975            }
 53976            class Signature extends o.XFAObject {
 53977              constructor(e) {
 53978                super(f, "signature", !0);
 53979                this.id = e.id || "";
 53980                this.type = (0, c.getStringOption)(e.type, ["PDF1.3", "PDF1.6"]);
 53981                this.use = e.use || "";
 53982                this.usehref = e.usehref || "";
 53983                this.border = null;
 53984                this.extras = null;
 53985                this.filter = null;
 53986                this.manifest = null;
 53987                this.margin = null;
 53988              }
 53989            }
 53990            class Signing extends o.XFAObject {
 53991              constructor(e) {
 53992                super(f, "signing", !0);
 53993                this.id = e.id || "";
 53994                this.type = (0, c.getStringOption)(e.type, [
 53995                  "optional",
 53996                  "required",
 53997                ]);
 53998                this.use = e.use || "";
 53999                this.usehref = e.usehref || "";
 54000                this.certificate = new o.XFAObjectArray();
 54001              }
 54002            }
 54003            class Solid extends o.XFAObject {
 54004              constructor(e) {
 54005                super(f, "solid", !0);
 54006                this.id = e.id || "";
 54007                this.use = e.use || "";
 54008                this.usehref = e.usehref || "";
 54009                this.extras = null;
 54010              }
 54011              [r.$toStyle](e) {
 54012                return e ? e[r.$toStyle]() : "#FFFFFF";
 54013              }
 54014            }
 54015            class Speak extends o.StringObject {
 54016              constructor(e) {
 54017                super(f, "speak");
 54018                this.disable = (0, c.getInteger)({
 54019                  data: e.disable,
 54020                  defaultValue: 0,
 54021                  validate: (e) => 1 === e,
 54022                });
 54023                this.id = e.id || "";
 54024                this.priority = (0, c.getStringOption)(e.priority, [
 54025                  "custom",
 54026                  "caption",
 54027                  "name",
 54028                  "toolTip",
 54029                ]);
 54030                this.rid = e.rid || "";
 54031                this.use = e.use || "";
 54032                this.usehref = e.usehref || "";
 54033              }
 54034            }
 54035            class Stipple extends o.XFAObject {
 54036              constructor(e) {
 54037                super(f, "stipple", !0);
 54038                this.id = e.id || "";
 54039                this.rate = (0, c.getInteger)({
 54040                  data: e.rate,
 54041                  defaultValue: 50,
 54042                  validate: (e) => e >= 0 && e <= 100,
 54043                });
 54044                this.use = e.use || "";
 54045                this.usehref = e.usehref || "";
 54046                this.color = null;
 54047                this.extras = null;
 54048              }
 54049              [r.$toStyle](e) {
 54050                const t = this.rate / 100;
 54051                return l.Util.makeHexColor(
 54052                  Math.round(e.value.r * (1 - t) + this.value.r * t),
 54053                  Math.round(e.value.g * (1 - t) + this.value.g * t),
 54054                  Math.round(e.value.b * (1 - t) + this.value.b * t),
 54055                );
 54056              }
 54057            }
 54058            class Subform extends o.XFAObject {
 54059              constructor(e) {
 54060                super(f, "subform", !0);
 54061                this.access = (0, c.getStringOption)(e.access, [
 54062                  "open",
 54063                  "nonInteractive",
 54064                  "protected",
 54065                  "readOnly",
 54066                ]);
 54067                this.allowMacro = (0, c.getInteger)({
 54068                  data: e.allowMacro,
 54069                  defaultValue: 0,
 54070                  validate: (e) => 1 === e,
 54071                });
 54072                this.anchorType = (0, c.getStringOption)(e.anchorType, [
 54073                  "topLeft",
 54074                  "bottomCenter",
 54075                  "bottomLeft",
 54076                  "bottomRight",
 54077                  "middleCenter",
 54078                  "middleLeft",
 54079                  "middleRight",
 54080                  "topCenter",
 54081                  "topRight",
 54082                ]);
 54083                this.colSpan = (0, c.getInteger)({
 54084                  data: e.colSpan,
 54085                  defaultValue: 1,
 54086                  validate: (e) => e >= 1 || -1 === e,
 54087                });
 54088                this.columnWidths = (e.columnWidths || "")
 54089                  .trim()
 54090                  .split(/\s+/)
 54091                  .map((e) => ("-1" === e ? -1 : (0, c.getMeasurement)(e)));
 54092                this.h = e.h ? (0, c.getMeasurement)(e.h) : "";
 54093                this.hAlign = (0, c.getStringOption)(e.hAlign, [
 54094                  "left",
 54095                  "center",
 54096                  "justify",
 54097                  "justifyAll",
 54098                  "radix",
 54099                  "right",
 54100                ]);
 54101                this.id = e.id || "";
 54102                this.layout = (0, c.getStringOption)(e.layout, [
 54103                  "position",
 54104                  "lr-tb",
 54105                  "rl-row",
 54106                  "rl-tb",
 54107                  "row",
 54108                  "table",
 54109                  "tb",
 54110                ]);
 54111                this.locale = e.locale || "";
 54112                this.maxH = (0, c.getMeasurement)(e.maxH, "0pt");
 54113                this.maxW = (0, c.getMeasurement)(e.maxW, "0pt");
 54114                this.mergeMode = (0, c.getStringOption)(e.mergeMode, [
 54115                  "consumeData",
 54116                  "matchTemplate",
 54117                ]);
 54118                this.minH = (0, c.getMeasurement)(e.minH, "0pt");
 54119                this.minW = (0, c.getMeasurement)(e.minW, "0pt");
 54120                this.name = e.name || "";
 54121                this.presence = (0, c.getStringOption)(e.presence, [
 54122                  "visible",
 54123                  "hidden",
 54124                  "inactive",
 54125                  "invisible",
 54126                ]);
 54127                this.relevant = (0, c.getRelevant)(e.relevant);
 54128                this.restoreState = (0, c.getStringOption)(e.restoreState, [
 54129                  "manual",
 54130                  "auto",
 54131                ]);
 54132                this.scope = (0, c.getStringOption)(e.scope, ["name", "none"]);
 54133                this.use = e.use || "";
 54134                this.usehref = e.usehref || "";
 54135                this.w = e.w ? (0, c.getMeasurement)(e.w) : "";
 54136                this.x = (0, c.getMeasurement)(e.x, "0pt");
 54137                this.y = (0, c.getMeasurement)(e.y, "0pt");
 54138                this.assist = null;
 54139                this.bind = null;
 54140                this.bookend = null;
 54141                this.border = null;
 54142                this.break = null;
 54143                this.calculate = null;
 54144                this.desc = null;
 54145                this.extras = null;
 54146                this.keep = null;
 54147                this.margin = null;
 54148                this.occur = null;
 54149                this.overflow = null;
 54150                this.pageSet = null;
 54151                this.para = null;
 54152                this.traversal = null;
 54153                this.validate = null;
 54154                this.variables = null;
 54155                this.area = new o.XFAObjectArray();
 54156                this.breakAfter = new o.XFAObjectArray();
 54157                this.breakBefore = new o.XFAObjectArray();
 54158                this.connect = new o.XFAObjectArray();
 54159                this.draw = new o.XFAObjectArray();
 54160                this.event = new o.XFAObjectArray();
 54161                this.exObject = new o.XFAObjectArray();
 54162                this.exclGroup = new o.XFAObjectArray();
 54163                this.field = new o.XFAObjectArray();
 54164                this.proto = new o.XFAObjectArray();
 54165                this.setProperty = new o.XFAObjectArray();
 54166                this.subform = new o.XFAObjectArray();
 54167                this.subformSet = new o.XFAObjectArray();
 54168              }
 54169              [r.$getSubformParent]() {
 54170                const e = this[r.$getParent]();
 54171                return e instanceof SubformSet ? e[r.$getSubformParent]() : e;
 54172              }
 54173              [r.$isBindable]() {
 54174                return !0;
 54175              }
 54176              [r.$isThereMoreWidth]() {
 54177                return (
 54178                  (this.layout.endsWith("-tb") &&
 54179                    0 === this[r.$extra].attempt &&
 54180                    this[r.$extra].numberInLine > 0) ||
 54181                  this[r.$getParent]()[r.$isThereMoreWidth]()
 54182                );
 54183              }
 54184              *[r.$getContainedChildren]() {
 54185                yield* getContainedChildren(this);
 54186              }
 54187              [r.$flushHTML]() {
 54188                return (0, i.flushHTML)(this);
 54189              }
 54190              [r.$addHTML](e, t) {
 54191                (0, i.addHTML)(this, e, t);
 54192              }
 54193              [r.$getAvailableSpace]() {
 54194                return (0, i.getAvailableSpace)(this);
 54195              }
 54196              [r.$isSplittable]() {
 54197                const e = this[r.$getSubformParent]();
 54198                if (!e[r.$isSplittable]()) return !1;
 54199                if (void 0 !== this[r.$extra]._isSplittable)
 54200                  return this[r.$extra]._isSplittable;
 54201                if ("position" === this.layout || this.layout.includes("row")) {
 54202                  this[r.$extra]._isSplittable = !1;
 54203                  return !1;
 54204                }
 54205                if (this.keep && "none" !== this.keep.intact) {
 54206                  this[r.$extra]._isSplittable = !1;
 54207                  return !1;
 54208                }
 54209                if (e.layout?.endsWith("-tb") && 0 !== e[r.$extra].numberInLine)
 54210                  return !1;
 54211                this[r.$extra]._isSplittable = !0;
 54212                return !0;
 54213              }
 54214              [r.$toHTML](e) {
 54215                setTabIndex(this);
 54216                if (this.break) {
 54217                  if (
 54218                    "auto" !== this.break.after ||
 54219                    "" !== this.break.afterTarget
 54220                  ) {
 54221                    const e = new BreakAfter({
 54222                      targetType: this.break.after,
 54223                      target: this.break.afterTarget,
 54224                      startNew: this.break.startNew.toString(),
 54225                    });
 54226                    e[r.$globalData] = this[r.$globalData];
 54227                    this[r.$appendChild](e);
 54228                    this.breakAfter.push(e);
 54229                  }
 54230                  if (
 54231                    "auto" !== this.break.before ||
 54232                    "" !== this.break.beforeTarget
 54233                  ) {
 54234                    const e = new BreakBefore({
 54235                      targetType: this.break.before,
 54236                      target: this.break.beforeTarget,
 54237                      startNew: this.break.startNew.toString(),
 54238                    });
 54239                    e[r.$globalData] = this[r.$globalData];
 54240                    this[r.$appendChild](e);
 54241                    this.breakBefore.push(e);
 54242                  }
 54243                  if ("" !== this.break.overflowTarget) {
 54244                    const e = new Overflow({
 54245                      target: this.break.overflowTarget,
 54246                      leader: this.break.overflowLeader,
 54247                      trailer: this.break.overflowTrailer,
 54248                    });
 54249                    e[r.$globalData] = this[r.$globalData];
 54250                    this[r.$appendChild](e);
 54251                    this.overflow.push(e);
 54252                  }
 54253                  this[r.$removeChild](this.break);
 54254                  this.break = null;
 54255                }
 54256                if ("hidden" === this.presence || "inactive" === this.presence)
 54257                  return c.HTMLResult.EMPTY;
 54258                (this.breakBefore.children.length > 1 ||
 54259                  this.breakAfter.children.length > 1) &&
 54260                  (0, l.warn)(
 54261                    "XFA - Several breakBefore or breakAfter in subforms: please file a bug.",
 54262                  );
 54263                if (this.breakBefore.children.length >= 1) {
 54264                  const e = this.breakBefore.children[0];
 54265                  if (handleBreak(e)) return c.HTMLResult.breakNode(e);
 54266                }
 54267                if (this[r.$extra]?.afterBreakAfter) return c.HTMLResult.EMPTY;
 54268                (0, s.fixDimensions)(this);
 54269                const t = [],
 54270                  a = { id: this[r.$uid], class: [] };
 54271                (0, s.setAccess)(this, a.class);
 54272                this[r.$extra] || (this[r.$extra] = Object.create(null));
 54273                Object.assign(this[r.$extra], {
 54274                  children: t,
 54275                  line: null,
 54276                  attributes: a,
 54277                  attempt: 0,
 54278                  numberInLine: 0,
 54279                  availableSpace: {
 54280                    width: Math.min(this.w || 1 / 0, e.width),
 54281                    height: Math.min(this.h || 1 / 0, e.height),
 54282                  },
 54283                  width: 0,
 54284                  height: 0,
 54285                  prevHeight: 0,
 54286                  currentWidth: 0,
 54287                });
 54288                const n = this[r.$getTemplateRoot](),
 54289                  o = n[r.$extra].noLayoutFailure,
 54290                  h = this[r.$isSplittable]();
 54291                h || setFirstUnsplittable(this);
 54292                if (!(0, i.checkDimensions)(this, e)) return c.HTMLResult.FAILURE;
 54293                const u = new Set([
 54294                  "area",
 54295                  "draw",
 54296                  "exclGroup",
 54297                  "field",
 54298                  "subform",
 54299                  "subformSet",
 54300                ]);
 54301                if (this.layout.includes("row")) {
 54302                  const e = this[r.$getSubformParent]().columnWidths;
 54303                  if (Array.isArray(e) && e.length > 0) {
 54304                    this[r.$extra].columnWidths = e;
 54305                    this[r.$extra].currentColumn = 0;
 54306                  }
 54307                }
 54308                const d = (0, s.toStyle)(
 54309                    this,
 54310                    "anchorType",
 54311                    "dimensions",
 54312                    "position",
 54313                    "presence",
 54314                    "border",
 54315                    "margin",
 54316                    "hAlign",
 54317                  ),
 54318                  f = ["xfaSubform"],
 54319                  g = (0, s.layoutClass)(this);
 54320                g && f.push(g);
 54321                a.style = d;
 54322                a.class = f;
 54323                this.name && (a.xfaName = this.name);
 54324                if (this.overflow) {
 54325                  const t = this.overflow[r.$getExtra]();
 54326                  if (t.addLeader) {
 54327                    t.addLeader = !1;
 54328                    handleOverflow(this, t.leader, e);
 54329                  }
 54330                }
 54331                this[r.$pushPara]();
 54332                const p = "lr-tb" === this.layout || "rl-tb" === this.layout,
 54333                  m = p ? 2 : 1;
 54334                for (; this[r.$extra].attempt < m; this[r.$extra].attempt++) {
 54335                  p &&
 54336                    1 === this[r.$extra].attempt &&
 54337                    (this[r.$extra].numberInLine = 0);
 54338                  const e = this[r.$childrenToHTML]({ filter: u, include: !0 });
 54339                  if (e.success) break;
 54340                  if (e.isBreak()) {
 54341                    this[r.$popPara]();
 54342                    return e;
 54343                  }
 54344                  if (
 54345                    p &&
 54346                    0 === this[r.$extra].attempt &&
 54347                    0 === this[r.$extra].numberInLine &&
 54348                    !n[r.$extra].noLayoutFailure
 54349                  ) {
 54350                    this[r.$extra].attempt = m;
 54351                    break;
 54352                  }
 54353                }
 54354                this[r.$popPara]();
 54355                h || unsetFirstUnsplittable(this);
 54356                n[r.$extra].noLayoutFailure = o;
 54357                if (this[r.$extra].attempt === m) {
 54358                  this.overflow &&
 54359                    (this[r.$getTemplateRoot]()[r.$extra].overflowNode =
 54360                      this.overflow);
 54361                  h || delete this[r.$extra];
 54362                  return c.HTMLResult.FAILURE;
 54363                }
 54364                if (this.overflow) {
 54365                  const t = this.overflow[r.$getExtra]();
 54366                  if (t.addTrailer) {
 54367                    t.addTrailer = !1;
 54368                    handleOverflow(this, t.trailer, e);
 54369                  }
 54370                }
 54371                let b = 0,
 54372                  y = 0;
 54373                if (this.margin) {
 54374                  b = this.margin.leftInset + this.margin.rightInset;
 54375                  y = this.margin.topInset + this.margin.bottomInset;
 54376                }
 54377                const w = Math.max(this[r.$extra].width + b, this.w || 0),
 54378                  S = Math.max(this[r.$extra].height + y, this.h || 0),
 54379                  x = [this.x, this.y, w, S];
 54380                "" === this.w && (d.width = (0, s.measureToString)(w));
 54381                "" === this.h && (d.height = (0, s.measureToString)(S));
 54382                if (("0px" === d.width || "0px" === d.height) && 0 === t.length)
 54383                  return c.HTMLResult.EMPTY;
 54384                const C = { name: "div", attributes: a, children: t };
 54385                applyAssist(this, a);
 54386                const k = c.HTMLResult.success((0, s.createWrapper)(this, C), x);
 54387                if (this.breakAfter.children.length >= 1) {
 54388                  const e = this.breakAfter.children[0];
 54389                  if (handleBreak(e)) {
 54390                    this[r.$extra].afterBreakAfter = k;
 54391                    return c.HTMLResult.breakNode(e);
 54392                  }
 54393                }
 54394                delete this[r.$extra];
 54395                return k;
 54396              }
 54397            }
 54398            class SubformSet extends o.XFAObject {
 54399              constructor(e) {
 54400                super(f, "subformSet", !0);
 54401                this.id = e.id || "";
 54402                this.name = e.name || "";
 54403                this.relation = (0, c.getStringOption)(e.relation, [
 54404                  "ordered",
 54405                  "choice",
 54406                  "unordered",
 54407                ]);
 54408                this.relevant = (0, c.getRelevant)(e.relevant);
 54409                this.use = e.use || "";
 54410                this.usehref = e.usehref || "";
 54411                this.bookend = null;
 54412                this.break = null;
 54413                this.desc = null;
 54414                this.extras = null;
 54415                this.occur = null;
 54416                this.overflow = null;
 54417                this.breakAfter = new o.XFAObjectArray();
 54418                this.breakBefore = new o.XFAObjectArray();
 54419                this.subform = new o.XFAObjectArray();
 54420                this.subformSet = new o.XFAObjectArray();
 54421              }
 54422              *[r.$getContainedChildren]() {
 54423                yield* getContainedChildren(this);
 54424              }
 54425              [r.$getSubformParent]() {
 54426                let e = this[r.$getParent]();
 54427                for (; !(e instanceof Subform); ) e = e[r.$getParent]();
 54428                return e;
 54429              }
 54430              [r.$isBindable]() {
 54431                return !0;
 54432              }
 54433            }
 54434            class SubjectDN extends o.ContentObject {
 54435              constructor(e) {
 54436                super(f, "subjectDN");
 54437                this.delimiter = e.delimiter || ",";
 54438                this.id = e.id || "";
 54439                this.name = e.name || "";
 54440                this.use = e.use || "";
 54441                this.usehref = e.usehref || "";
 54442              }
 54443              [r.$finalize]() {
 54444                this[r.$content] = new Map(
 54445                  this[r.$content].split(this.delimiter).map((e) => {
 54446                    (e = e.split("=", 2))[0] = e[0].trim();
 54447                    return e;
 54448                  }),
 54449                );
 54450              }
 54451            }
 54452            class SubjectDNs extends o.XFAObject {
 54453              constructor(e) {
 54454                super(f, "subjectDNs", !0);
 54455                this.id = e.id || "";
 54456                this.type = (0, c.getStringOption)(e.type, [
 54457                  "optional",
 54458                  "required",
 54459                ]);
 54460                this.use = e.use || "";
 54461                this.usehref = e.usehref || "";
 54462                this.subjectDN = new o.XFAObjectArray();
 54463              }
 54464            }
 54465            class Submit extends o.XFAObject {
 54466              constructor(e) {
 54467                super(f, "submit", !0);
 54468                this.embedPDF = (0, c.getInteger)({
 54469                  data: e.embedPDF,
 54470                  defaultValue: 0,
 54471                  validate: (e) => 1 === e,
 54472                });
 54473                this.format = (0, c.getStringOption)(e.format, [
 54474                  "xdp",
 54475                  "formdata",
 54476                  "pdf",
 54477                  "urlencoded",
 54478                  "xfd",
 54479                  "xml",
 54480                ]);
 54481                this.id = e.id || "";
 54482                this.target = e.target || "";
 54483                this.textEncoding = (0, c.getKeyword)({
 54484                  data: e.textEncoding ? e.textEncoding.toLowerCase() : "",
 54485                  defaultValue: "",
 54486                  validate: (e) =>
 54487                    [
 54488                      "utf-8",
 54489                      "big-five",
 54490                      "fontspecific",
 54491                      "gbk",
 54492                      "gb-18030",
 54493                      "gb-2312",
 54494                      "ksc-5601",
 54495                      "none",
 54496                      "shift-jis",
 54497                      "ucs-2",
 54498                      "utf-16",
 54499                    ].includes(e) || e.match(/iso-8859-\d{2}/),
 54500                });
 54501                this.use = e.use || "";
 54502                this.usehref = e.usehref || "";
 54503                this.xdpContent = e.xdpContent || "";
 54504                this.encrypt = null;
 54505                this.encryptData = new o.XFAObjectArray();
 54506                this.signData = new o.XFAObjectArray();
 54507              }
 54508            }
 54509            class Template extends o.XFAObject {
 54510              constructor(e) {
 54511                super(f, "template", !0);
 54512                this.baseProfile = (0, c.getStringOption)(e.baseProfile, [
 54513                  "full",
 54514                  "interactiveForms",
 54515                ]);
 54516                this.extras = null;
 54517                this.subform = new o.XFAObjectArray();
 54518              }
 54519              [r.$finalize]() {
 54520                0 === this.subform.children.length &&
 54521                  (0, l.warn)("XFA - No subforms in template node.");
 54522                this.subform.children.length >= 2 &&
 54523                  (0, l.warn)(
 54524                    "XFA - Several subforms in template node: please file a bug.",
 54525                  );
 54526                this[r.$tabIndex] = 5e3;
 54527              }
 54528              [r.$isSplittable]() {
 54529                return !0;
 54530              }
 54531              [r.$searchNode](e, t) {
 54532                return e.startsWith("#")
 54533                  ? [this[r.$ids].get(e.slice(1))]
 54534                  : (0, d.searchNode)(this, t, e, !0, !0);
 54535              }
 54536              *[r.$toPages]() {
 54537                if (!this.subform.children.length)
 54538                  return c.HTMLResult.success({ name: "div", children: [] });
 54539                this[r.$extra] = {
 54540                  overflowNode: null,
 54541                  firstUnsplittable: null,
 54542                  currentContentArea: null,
 54543                  currentPageArea: null,
 54544                  noLayoutFailure: !1,
 54545                  pageNumber: 1,
 54546                  pagePosition: "first",
 54547                  oddOrEven: "odd",
 54548                  blankOrNotBlank: "nonBlank",
 54549                  paraStack: [],
 54550                };
 54551                const e = this.subform.children[0];
 54552                e.pageSet[r.$cleanPage]();
 54553                const t = e.pageSet.pageArea.children,
 54554                  a = { name: "div", children: [] };
 54555                let n = null,
 54556                  i = null,
 54557                  s = null;
 54558                if (e.breakBefore.children.length >= 1) {
 54559                  i = e.breakBefore.children[0];
 54560                  s = i.target;
 54561                } else if (
 54562                  e.subform.children.length >= 1 &&
 54563                  e.subform.children[0].breakBefore.children.length >= 1
 54564                ) {
 54565                  i = e.subform.children[0].breakBefore.children[0];
 54566                  s = i.target;
 54567                } else if (e.break?.beforeTarget) {
 54568                  i = e.break;
 54569                  s = i.beforeTarget;
 54570                } else if (
 54571                  e.subform.children.length >= 1 &&
 54572                  e.subform.children[0].break?.beforeTarget
 54573                ) {
 54574                  i = e.subform.children[0].break;
 54575                  s = i.beforeTarget;
 54576                }
 54577                if (i) {
 54578                  const e = this[r.$searchNode](s, i[r.$getParent]());
 54579                  if (e instanceof PageArea) {
 54580                    n = e;
 54581                    i[r.$extra] = {};
 54582                  }
 54583                }
 54584                n || (n = t[0]);
 54585                n[r.$extra] = { numberOfUse: 1 };
 54586                const o = n[r.$getParent]();
 54587                o[r.$extra] = {
 54588                  numberOfUse: 1,
 54589                  pageIndex: o.pageArea.children.indexOf(n),
 54590                  pageSetIndex: 0,
 54591                };
 54592                let h,
 54593                  u = null,
 54594                  d = null,
 54595                  f = !0,
 54596                  g = 0,
 54597                  p = 0;
 54598                for (;;) {
 54599                  if (f) g = 0;
 54600                  else {
 54601                    a.children.pop();
 54602                    if (3 == ++g) {
 54603                      (0, l.warn)(
 54604                        "XFA - Something goes wrong: please file a bug.",
 54605                      );
 54606                      return a;
 54607                    }
 54608                  }
 54609                  h = null;
 54610                  this[r.$extra].currentPageArea = n;
 54611                  const t = n[r.$toHTML]().html;
 54612                  a.children.push(t);
 54613                  if (u) {
 54614                    this[r.$extra].noLayoutFailure = !0;
 54615                    t.children.push(u[r.$toHTML](n[r.$extra].space).html);
 54616                    u = null;
 54617                  }
 54618                  if (d) {
 54619                    this[r.$extra].noLayoutFailure = !0;
 54620                    t.children.push(d[r.$toHTML](n[r.$extra].space).html);
 54621                    d = null;
 54622                  }
 54623                  const i = n.contentArea.children,
 54624                    s = t.children.filter((e) =>
 54625                      e.attributes.class.includes("xfaContentarea"),
 54626                    );
 54627                  f = !1;
 54628                  this[r.$extra].firstUnsplittable = null;
 54629                  this[r.$extra].noLayoutFailure = !1;
 54630                  const flush = (t) => {
 54631                    const a = e[r.$flushHTML]();
 54632                    if (a) {
 54633                      f ||= a.children?.length > 0;
 54634                      s[t].children.push(a);
 54635                    }
 54636                  };
 54637                  for (let t = p, n = i.length; t < n; t++) {
 54638                    const n = (this[r.$extra].currentContentArea = i[t]),
 54639                      o = { width: n.w, height: n.h };
 54640                    p = 0;
 54641                    if (u) {
 54642                      s[t].children.push(u[r.$toHTML](o).html);
 54643                      u = null;
 54644                    }
 54645                    if (d) {
 54646                      s[t].children.push(d[r.$toHTML](o).html);
 54647                      d = null;
 54648                    }
 54649                    const c = e[r.$toHTML](o);
 54650                    if (c.success) {
 54651                      if (c.html) {
 54652                        f ||= c.html.children?.length > 0;
 54653                        s[t].children.push(c.html);
 54654                      } else !f && a.children.length > 1 && a.children.pop();
 54655                      return a;
 54656                    }
 54657                    if (c.isBreak()) {
 54658                      const e = c.breakNode;
 54659                      flush(t);
 54660                      if ("auto" === e.targetType) continue;
 54661                      if (e.leader) {
 54662                        u = this[r.$searchNode](e.leader, e[r.$getParent]());
 54663                        u = u ? u[0] : null;
 54664                      }
 54665                      if (e.trailer) {
 54666                        d = this[r.$searchNode](e.trailer, e[r.$getParent]());
 54667                        d = d ? d[0] : null;
 54668                      }
 54669                      if ("pageArea" === e.targetType) {
 54670                        h = e[r.$extra].target;
 54671                        t = 1 / 0;
 54672                      } else if (e[r.$extra].target) {
 54673                        h = e[r.$extra].target;
 54674                        p = e[r.$extra].index + 1;
 54675                        t = 1 / 0;
 54676                      } else t = e[r.$extra].index;
 54677                    } else if (this[r.$extra].overflowNode) {
 54678                      const e = this[r.$extra].overflowNode;
 54679                      this[r.$extra].overflowNode = null;
 54680                      const a = e[r.$getExtra](),
 54681                        n = a.target;
 54682                      a.addLeader = null !== a.leader;
 54683                      a.addTrailer = null !== a.trailer;
 54684                      flush(t);
 54685                      const s = t;
 54686                      t = 1 / 0;
 54687                      if (n instanceof PageArea) h = n;
 54688                      else if (n instanceof ContentArea) {
 54689                        const e = i.indexOf(n);
 54690                        if (-1 !== e) e > s ? (t = e - 1) : (p = e);
 54691                        else {
 54692                          h = n[r.$getParent]();
 54693                          p = h.contentArea.children.indexOf(n);
 54694                        }
 54695                      }
 54696                    } else flush(t);
 54697                  }
 54698                  this[r.$extra].pageNumber += 1;
 54699                  h &&
 54700                    (h[r.$isUsable]()
 54701                      ? (h[r.$extra].numberOfUse += 1)
 54702                      : (h = null));
 54703                  n = h || n[r.$getNextPage]();
 54704                  yield null;
 54705                }
 54706              }
 54707            }
 54708            t.Template = Template;
 54709            class Text extends o.ContentObject {
 54710              constructor(e) {
 54711                super(f, "text");
 54712                this.id = e.id || "";
 54713                this.maxChars = (0, c.getInteger)({
 54714                  data: e.maxChars,
 54715                  defaultValue: 0,
 54716                  validate: (e) => e >= 0,
 54717                });
 54718                this.name = e.name || "";
 54719                this.rid = e.rid || "";
 54720                this.use = e.use || "";
 54721                this.usehref = e.usehref || "";
 54722              }
 54723              [r.$acceptWhitespace]() {
 54724                return !0;
 54725              }
 54726              [r.$onChild](e) {
 54727                if (e[r.$namespaceId] === n.NamespaceIds.xhtml.id) {
 54728                  this[r.$content] = e;
 54729                  return !0;
 54730                }
 54731                (0, l.warn)(`XFA - Invalid content in Text: ${e[r.$nodeName]}.`);
 54732                return !1;
 54733              }
 54734              [r.$onText](e) {
 54735                this[r.$content] instanceof o.XFAObject || super[r.$onText](e);
 54736              }
 54737              [r.$finalize]() {
 54738                "string" == typeof this[r.$content] &&
 54739                  (this[r.$content] = this[r.$content].replaceAll("\r\n", "\n"));
 54740              }
 54741              [r.$getExtra]() {
 54742                return "string" == typeof this[r.$content]
 54743                  ? this[r.$content]
 54744                      .split(/[\u2029\u2028\n]/)
 54745                      .reduce((e, t) => {
 54746                        t && e.push(t);
 54747                        return e;
 54748                      }, [])
 54749                      .join("\n")
 54750                  : this[r.$content][r.$text]();
 54751              }
 54752              [r.$toHTML](e) {
 54753                if ("string" == typeof this[r.$content]) {
 54754                  const e = valueToHtml(this[r.$content]).html;
 54755                  if (this[r.$content].includes("\u2029")) {
 54756                    e.name = "div";
 54757                    e.children = [];
 54758                    this[r.$content]
 54759                      .split("\u2029")
 54760                      .map((e) =>
 54761                        e.split(/[\u2028\n]/).reduce((e, t) => {
 54762                          e.push({ name: "span", value: t }, { name: "br" });
 54763                          return e;
 54764                        }, []),
 54765                      )
 54766                      .forEach((t) => {
 54767                        e.children.push({ name: "p", children: t });
 54768                      });
 54769                  } else if (/[\u2028\n]/.test(this[r.$content])) {
 54770                    e.name = "div";
 54771                    e.children = [];
 54772                    this[r.$content].split(/[\u2028\n]/).forEach((t) => {
 54773                      e.children.push({ name: "span", value: t }, { name: "br" });
 54774                    });
 54775                  }
 54776                  return c.HTMLResult.success(e);
 54777                }
 54778                return this[r.$content][r.$toHTML](e);
 54779              }
 54780            }
 54781            t.Text = Text;
 54782            class TextEdit extends o.XFAObject {
 54783              constructor(e) {
 54784                super(f, "textEdit", !0);
 54785                this.allowRichText = (0, c.getInteger)({
 54786                  data: e.allowRichText,
 54787                  defaultValue: 0,
 54788                  validate: (e) => 1 === e,
 54789                });
 54790                this.hScrollPolicy = (0, c.getStringOption)(e.hScrollPolicy, [
 54791                  "auto",
 54792                  "off",
 54793                  "on",
 54794                ]);
 54795                this.id = e.id || "";
 54796                this.multiLine = (0, c.getInteger)({
 54797                  data: e.multiLine,
 54798                  defaultValue: "",
 54799                  validate: (e) => 0 === e || 1 === e,
 54800                });
 54801                this.use = e.use || "";
 54802                this.usehref = e.usehref || "";
 54803                this.vScrollPolicy = (0, c.getStringOption)(e.vScrollPolicy, [
 54804                  "auto",
 54805                  "off",
 54806                  "on",
 54807                ]);
 54808                this.border = null;
 54809                this.comb = null;
 54810                this.extras = null;
 54811                this.margin = null;
 54812              }
 54813              [r.$toHTML](e) {
 54814                const t = (0, s.toStyle)(this, "border", "font", "margin");
 54815                let a;
 54816                const n = this[r.$getParent]()[r.$getParent]();
 54817                "" === this.multiLine &&
 54818                  (this.multiLine = n instanceof Draw ? 1 : 0);
 54819                a =
 54820                  1 === this.multiLine
 54821                    ? {
 54822                        name: "textarea",
 54823                        attributes: {
 54824                          dataId: n[r.$data]?.[r.$uid] || n[r.$uid],
 54825                          fieldId: n[r.$uid],
 54826                          class: ["xfaTextfield"],
 54827                          style: t,
 54828                          "aria-label": ariaLabel(n),
 54829                          "aria-required": !1,
 54830                        },
 54831                      }
 54832                    : {
 54833                        name: "input",
 54834                        attributes: {
 54835                          type: "text",
 54836                          dataId: n[r.$data]?.[r.$uid] || n[r.$uid],
 54837                          fieldId: n[r.$uid],
 54838                          class: ["xfaTextfield"],
 54839                          style: t,
 54840                          "aria-label": ariaLabel(n),
 54841                          "aria-required": !1,
 54842                        },
 54843                      };
 54844                if (isRequired(n)) {
 54845                  a.attributes["aria-required"] = !0;
 54846                  a.attributes.required = !0;
 54847                }
 54848                return c.HTMLResult.success({
 54849                  name: "label",
 54850                  attributes: { class: ["xfaLabel"] },
 54851                  children: [a],
 54852                });
 54853              }
 54854            }
 54855            class Time extends o.StringObject {
 54856              constructor(e) {
 54857                super(f, "time");
 54858                this.id = e.id || "";
 54859                this.name = e.name || "";
 54860                this.use = e.use || "";
 54861                this.usehref = e.usehref || "";
 54862              }
 54863              [r.$finalize]() {
 54864                const e = this[r.$content].trim();
 54865                this[r.$content] = e ? new Date(e) : null;
 54866              }
 54867              [r.$toHTML](e) {
 54868                return valueToHtml(
 54869                  this[r.$content] ? this[r.$content].toString() : "",
 54870                );
 54871              }
 54872            }
 54873            class TimeStamp extends o.XFAObject {
 54874              constructor(e) {
 54875                super(f, "timeStamp");
 54876                this.id = e.id || "";
 54877                this.server = e.server || "";
 54878                this.type = (0, c.getStringOption)(e.type, [
 54879                  "optional",
 54880                  "required",
 54881                ]);
 54882                this.use = e.use || "";
 54883                this.usehref = e.usehref || "";
 54884              }
 54885            }
 54886            class ToolTip extends o.StringObject {
 54887              constructor(e) {
 54888                super(f, "toolTip");
 54889                this.id = e.id || "";
 54890                this.rid = e.rid || "";
 54891                this.use = e.use || "";
 54892                this.usehref = e.usehref || "";
 54893              }
 54894            }
 54895            class Traversal extends o.XFAObject {
 54896              constructor(e) {
 54897                super(f, "traversal", !0);
 54898                this.id = e.id || "";
 54899                this.use = e.use || "";
 54900                this.usehref = e.usehref || "";
 54901                this.extras = null;
 54902                this.traverse = new o.XFAObjectArray();
 54903              }
 54904            }
 54905            class Traverse extends o.XFAObject {
 54906              constructor(e) {
 54907                super(f, "traverse", !0);
 54908                this.id = e.id || "";
 54909                this.operation = (0, c.getStringOption)(e.operation, [
 54910                  "next",
 54911                  "back",
 54912                  "down",
 54913                  "first",
 54914                  "left",
 54915                  "right",
 54916                  "up",
 54917                ]);
 54918                this.ref = e.ref || "";
 54919                this.use = e.use || "";
 54920                this.usehref = e.usehref || "";
 54921                this.extras = null;
 54922                this.script = null;
 54923              }
 54924              get name() {
 54925                return this.operation;
 54926              }
 54927              [r.$isTransparent]() {
 54928                return !1;
 54929              }
 54930            }
 54931            class Ui extends o.XFAObject {
 54932              constructor(e) {
 54933                super(f, "ui", !0);
 54934                this.id = e.id || "";
 54935                this.use = e.use || "";
 54936                this.usehref = e.usehref || "";
 54937                this.extras = null;
 54938                this.picture = null;
 54939                this.barcode = null;
 54940                this.button = null;
 54941                this.checkButton = null;
 54942                this.choiceList = null;
 54943                this.dateTimeEdit = null;
 54944                this.defaultUi = null;
 54945                this.imageEdit = null;
 54946                this.numericEdit = null;
 54947                this.passwordEdit = null;
 54948                this.signature = null;
 54949                this.textEdit = null;
 54950              }
 54951              [r.$getExtra]() {
 54952                if (void 0 === this[r.$extra]) {
 54953                  for (const e of Object.getOwnPropertyNames(this)) {
 54954                    if ("extras" === e || "picture" === e) continue;
 54955                    const t = this[e];
 54956                    if (t instanceof o.XFAObject) {
 54957                      this[r.$extra] = t;
 54958                      return t;
 54959                    }
 54960                  }
 54961                  this[r.$extra] = null;
 54962                }
 54963                return this[r.$extra];
 54964              }
 54965              [r.$toHTML](e) {
 54966                const t = this[r.$getExtra]();
 54967                return t ? t[r.$toHTML](e) : c.HTMLResult.EMPTY;
 54968              }
 54969            }
 54970            class Validate extends o.XFAObject {
 54971              constructor(e) {
 54972                super(f, "validate", !0);
 54973                this.formatTest = (0, c.getStringOption)(e.formatTest, [
 54974                  "warning",
 54975                  "disabled",
 54976                  "error",
 54977                ]);
 54978                this.id = e.id || "";
 54979                this.nullTest = (0, c.getStringOption)(e.nullTest, [
 54980                  "disabled",
 54981                  "error",
 54982                  "warning",
 54983                ]);
 54984                this.scriptTest = (0, c.getStringOption)(e.scriptTest, [
 54985                  "error",
 54986                  "disabled",
 54987                  "warning",
 54988                ]);
 54989                this.use = e.use || "";
 54990                this.usehref = e.usehref || "";
 54991                this.extras = null;
 54992                this.message = null;
 54993                this.picture = null;
 54994                this.script = null;
 54995              }
 54996            }
 54997            class Value extends o.XFAObject {
 54998              constructor(e) {
 54999                super(f, "value", !0);
 55000                this.id = e.id || "";
 55001                this.override = (0, c.getInteger)({
 55002                  data: e.override,
 55003                  defaultValue: 0,
 55004                  validate: (e) => 1 === e,
 55005                });
 55006                this.relevant = (0, c.getRelevant)(e.relevant);
 55007                this.use = e.use || "";
 55008                this.usehref = e.usehref || "";
 55009                this.arc = null;
 55010                this.boolean = null;
 55011                this.date = null;
 55012                this.dateTime = null;
 55013                this.decimal = null;
 55014                this.exData = null;
 55015                this.float = null;
 55016                this.image = null;
 55017                this.integer = null;
 55018                this.line = null;
 55019                this.rectangle = null;
 55020                this.text = null;
 55021                this.time = null;
 55022              }
 55023              [r.$setValue](e) {
 55024                const t = this[r.$getParent]();
 55025                if (t instanceof Field && t.ui?.imageEdit) {
 55026                  if (!this.image) {
 55027                    this.image = new Image({});
 55028                    this[r.$appendChild](this.image);
 55029                  }
 55030                  this.image[r.$content] = e[r.$content];
 55031                  return;
 55032                }
 55033                const a = e[r.$nodeName];
 55034                if (null === this[a]) {
 55035                  for (const e of Object.getOwnPropertyNames(this)) {
 55036                    const t = this[e];
 55037                    if (t instanceof o.XFAObject) {
 55038                      this[e] = null;
 55039                      this[r.$removeChild](t);
 55040                    }
 55041                  }
 55042                  this[e[r.$nodeName]] = e;
 55043                  this[r.$appendChild](e);
 55044                } else this[a][r.$content] = e[r.$content];
 55045              }
 55046              [r.$text]() {
 55047                if (this.exData)
 55048                  return "string" == typeof this.exData[r.$content]
 55049                    ? this.exData[r.$content].trim()
 55050                    : this.exData[r.$content][r.$text]().trim();
 55051                for (const e of Object.getOwnPropertyNames(this)) {
 55052                  if ("image" === e) continue;
 55053                  const t = this[e];
 55054                  if (t instanceof o.XFAObject)
 55055                    return (t[r.$content] || "").toString().trim();
 55056                }
 55057                return null;
 55058              }
 55059              [r.$toHTML](e) {
 55060                for (const t of Object.getOwnPropertyNames(this)) {
 55061                  const a = this[t];
 55062                  if (a instanceof o.XFAObject) return a[r.$toHTML](e);
 55063                }
 55064                return c.HTMLResult.EMPTY;
 55065              }
 55066            }
 55067            t.Value = Value;
 55068            class Variables extends o.XFAObject {
 55069              constructor(e) {
 55070                super(f, "variables", !0);
 55071                this.id = e.id || "";
 55072                this.use = e.use || "";
 55073                this.usehref = e.usehref || "";
 55074                this.boolean = new o.XFAObjectArray();
 55075                this.date = new o.XFAObjectArray();
 55076                this.dateTime = new o.XFAObjectArray();
 55077                this.decimal = new o.XFAObjectArray();
 55078                this.exData = new o.XFAObjectArray();
 55079                this.float = new o.XFAObjectArray();
 55080                this.image = new o.XFAObjectArray();
 55081                this.integer = new o.XFAObjectArray();
 55082                this.manifest = new o.XFAObjectArray();
 55083                this.script = new o.XFAObjectArray();
 55084                this.text = new o.XFAObjectArray();
 55085                this.time = new o.XFAObjectArray();
 55086              }
 55087              [r.$isTransparent]() {
 55088                return !0;
 55089              }
 55090            }
 55091            class TemplateNamespace {
 55092              static [n.$buildXFAObject](e, t) {
 55093                if (TemplateNamespace.hasOwnProperty(e)) {
 55094                  const a = TemplateNamespace[e](t);
 55095                  a[r.$setSetAttributes](t);
 55096                  return a;
 55097                }
 55098              }
 55099              static appearanceFilter(e) {
 55100                return new AppearanceFilter(e);
 55101              }
 55102              static arc(e) {
 55103                return new Arc(e);
 55104              }
 55105              static area(e) {
 55106                return new Area(e);
 55107              }
 55108              static assist(e) {
 55109                return new Assist(e);
 55110              }
 55111              static barcode(e) {
 55112                return new Barcode(e);
 55113              }
 55114              static bind(e) {
 55115                return new Bind(e);
 55116              }
 55117              static bindItems(e) {
 55118                return new BindItems(e);
 55119              }
 55120              static bookend(e) {
 55121                return new Bookend(e);
 55122              }
 55123              static boolean(e) {
 55124                return new BooleanElement(e);
 55125              }
 55126              static border(e) {
 55127                return new Border(e);
 55128              }
 55129              static break(e) {
 55130                return new Break(e);
 55131              }
 55132              static breakAfter(e) {
 55133                return new BreakAfter(e);
 55134              }
 55135              static breakBefore(e) {
 55136                return new BreakBefore(e);
 55137              }
 55138              static button(e) {
 55139                return new Button(e);
 55140              }
 55141              static calculate(e) {
 55142                return new Calculate(e);
 55143              }
 55144              static caption(e) {
 55145                return new Caption(e);
 55146              }
 55147              static certificate(e) {
 55148                return new Certificate(e);
 55149              }
 55150              static certificates(e) {
 55151                return new Certificates(e);
 55152              }
 55153              static checkButton(e) {
 55154                return new CheckButton(e);
 55155              }
 55156              static choiceList(e) {
 55157                return new ChoiceList(e);
 55158              }
 55159              static color(e) {
 55160                return new Color(e);
 55161              }
 55162              static comb(e) {
 55163                return new Comb(e);
 55164              }
 55165              static connect(e) {
 55166                return new Connect(e);
 55167              }
 55168              static contentArea(e) {
 55169                return new ContentArea(e);
 55170              }
 55171              static corner(e) {
 55172                return new Corner(e);
 55173              }
 55174              static date(e) {
 55175                return new DateElement(e);
 55176              }
 55177              static dateTime(e) {
 55178                return new DateTime(e);
 55179              }
 55180              static dateTimeEdit(e) {
 55181                return new DateTimeEdit(e);
 55182              }
 55183              static decimal(e) {
 55184                return new Decimal(e);
 55185              }
 55186              static defaultUi(e) {
 55187                return new DefaultUi(e);
 55188              }
 55189              static desc(e) {
 55190                return new Desc(e);
 55191              }
 55192              static digestMethod(e) {
 55193                return new DigestMethod(e);
 55194              }
 55195              static digestMethods(e) {
 55196                return new DigestMethods(e);
 55197              }
 55198              static draw(e) {
 55199                return new Draw(e);
 55200              }
 55201              static edge(e) {
 55202                return new Edge(e);
 55203              }
 55204              static encoding(e) {
 55205                return new Encoding(e);
 55206              }
 55207              static encodings(e) {
 55208                return new Encodings(e);
 55209              }
 55210              static encrypt(e) {
 55211                return new Encrypt(e);
 55212              }
 55213              static encryptData(e) {
 55214                return new EncryptData(e);
 55215              }
 55216              static encryption(e) {
 55217                return new Encryption(e);
 55218              }
 55219              static encryptionMethod(e) {
 55220                return new EncryptionMethod(e);
 55221              }
 55222              static encryptionMethods(e) {
 55223                return new EncryptionMethods(e);
 55224              }
 55225              static event(e) {
 55226                return new Event(e);
 55227              }
 55228              static exData(e) {
 55229                return new ExData(e);
 55230              }
 55231              static exObject(e) {
 55232                return new ExObject(e);
 55233              }
 55234              static exclGroup(e) {
 55235                return new ExclGroup(e);
 55236              }
 55237              static execute(e) {
 55238                return new Execute(e);
 55239              }
 55240              static extras(e) {
 55241                return new Extras(e);
 55242              }
 55243              static field(e) {
 55244                return new Field(e);
 55245              }
 55246              static fill(e) {
 55247                return new Fill(e);
 55248              }
 55249              static filter(e) {
 55250                return new Filter(e);
 55251              }
 55252              static float(e) {
 55253                return new Float(e);
 55254              }
 55255              static font(e) {
 55256                return new Font(e);
 55257              }
 55258              static format(e) {
 55259                return new Format(e);
 55260              }
 55261              static handler(e) {
 55262                return new Handler(e);
 55263              }
 55264              static hyphenation(e) {
 55265                return new Hyphenation(e);
 55266              }
 55267              static image(e) {
 55268                return new Image(e);
 55269              }
 55270              static imageEdit(e) {
 55271                return new ImageEdit(e);
 55272              }
 55273              static integer(e) {
 55274                return new Integer(e);
 55275              }
 55276              static issuers(e) {
 55277                return new Issuers(e);
 55278              }
 55279              static items(e) {
 55280                return new Items(e);
 55281              }
 55282              static keep(e) {
 55283                return new Keep(e);
 55284              }
 55285              static keyUsage(e) {
 55286                return new KeyUsage(e);
 55287              }
 55288              static line(e) {
 55289                return new Line(e);
 55290              }
 55291              static linear(e) {
 55292                return new Linear(e);
 55293              }
 55294              static lockDocument(e) {
 55295                return new LockDocument(e);
 55296              }
 55297              static manifest(e) {
 55298                return new Manifest(e);
 55299              }
 55300              static margin(e) {
 55301                return new Margin(e);
 55302              }
 55303              static mdp(e) {
 55304                return new Mdp(e);
 55305              }
 55306              static medium(e) {
 55307                return new Medium(e);
 55308              }
 55309              static message(e) {
 55310                return new Message(e);
 55311              }
 55312              static numericEdit(e) {
 55313                return new NumericEdit(e);
 55314              }
 55315              static occur(e) {
 55316                return new Occur(e);
 55317              }
 55318              static oid(e) {
 55319                return new Oid(e);
 55320              }
 55321              static oids(e) {
 55322                return new Oids(e);
 55323              }
 55324              static overflow(e) {
 55325                return new Overflow(e);
 55326              }
 55327              static pageArea(e) {
 55328                return new PageArea(e);
 55329              }
 55330              static pageSet(e) {
 55331                return new PageSet(e);
 55332              }
 55333              static para(e) {
 55334                return new Para(e);
 55335              }
 55336              static passwordEdit(e) {
 55337                return new PasswordEdit(e);
 55338              }
 55339              static pattern(e) {
 55340                return new Pattern(e);
 55341              }
 55342              static picture(e) {
 55343                return new Picture(e);
 55344              }
 55345              static proto(e) {
 55346                return new Proto(e);
 55347              }
 55348              static radial(e) {
 55349                return new Radial(e);
 55350              }
 55351              static reason(e) {
 55352                return new Reason(e);
 55353              }
 55354              static reasons(e) {
 55355                return new Reasons(e);
 55356              }
 55357              static rectangle(e) {
 55358                return new Rectangle(e);
 55359              }
 55360              static ref(e) {
 55361                return new RefElement(e);
 55362              }
 55363              static script(e) {
 55364                return new Script(e);
 55365              }
 55366              static setProperty(e) {
 55367                return new SetProperty(e);
 55368              }
 55369              static signData(e) {
 55370                return new SignData(e);
 55371              }
 55372              static signature(e) {
 55373                return new Signature(e);
 55374              }
 55375              static signing(e) {
 55376                return new Signing(e);
 55377              }
 55378              static solid(e) {
 55379                return new Solid(e);
 55380              }
 55381              static speak(e) {
 55382                return new Speak(e);
 55383              }
 55384              static stipple(e) {
 55385                return new Stipple(e);
 55386              }
 55387              static subform(e) {
 55388                return new Subform(e);
 55389              }
 55390              static subformSet(e) {
 55391                return new SubformSet(e);
 55392              }
 55393              static subjectDN(e) {
 55394                return new SubjectDN(e);
 55395              }
 55396              static subjectDNs(e) {
 55397                return new SubjectDNs(e);
 55398              }
 55399              static submit(e) {
 55400                return new Submit(e);
 55401              }
 55402              static template(e) {
 55403                return new Template(e);
 55404              }
 55405              static text(e) {
 55406                return new Text(e);
 55407              }
 55408              static textEdit(e) {
 55409                return new TextEdit(e);
 55410              }
 55411              static time(e) {
 55412                return new Time(e);
 55413              }
 55414              static timeStamp(e) {
 55415                return new TimeStamp(e);
 55416              }
 55417              static toolTip(e) {
 55418                return new ToolTip(e);
 55419              }
 55420              static traversal(e) {
 55421                return new Traversal(e);
 55422              }
 55423              static traverse(e) {
 55424                return new Traverse(e);
 55425              }
 55426              static ui(e) {
 55427                return new Ui(e);
 55428              }
 55429              static validate(e) {
 55430                return new Validate(e);
 55431              }
 55432              static value(e) {
 55433                return new Value(e);
 55434              }
 55435              static variables(e) {
 55436                return new Variables(e);
 55437              }
 55438            }
 55439            t.TemplateNamespace = TemplateNamespace;
 55440          },
 55441          (e, t) => {
 55442            Object.defineProperty(t, "__esModule", { value: !0 });
 55443            t.NamespaceIds = t.$buildXFAObject = void 0;
 55444            const a = Symbol();
 55445            t.$buildXFAObject = a;
 55446            t.NamespaceIds = {
 55447              config: {
 55448                id: 0,
 55449                check: (e) => e.startsWith("http://www.xfa.org/schema/xci/"),
 55450              },
 55451              connectionSet: {
 55452                id: 1,
 55453                check: (e) =>
 55454                  e.startsWith("http://www.xfa.org/schema/xfa-connection-set/"),
 55455              },
 55456              datasets: {
 55457                id: 2,
 55458                check: (e) => e.startsWith("http://www.xfa.org/schema/xfa-data/"),
 55459              },
 55460              form: {
 55461                id: 3,
 55462                check: (e) => e.startsWith("http://www.xfa.org/schema/xfa-form/"),
 55463              },
 55464              localeSet: {
 55465                id: 4,
 55466                check: (e) =>
 55467                  e.startsWith("http://www.xfa.org/schema/xfa-locale-set/"),
 55468              },
 55469              pdf: { id: 5, check: (e) => "http://ns.adobe.com/xdp/pdf/" === e },
 55470              signature: {
 55471                id: 6,
 55472                check: (e) => "http://www.w3.org/2000/09/xmldsig#" === e,
 55473              },
 55474              sourceSet: {
 55475                id: 7,
 55476                check: (e) =>
 55477                  e.startsWith("http://www.xfa.org/schema/xfa-source-set/"),
 55478              },
 55479              stylesheet: {
 55480                id: 8,
 55481                check: (e) => "http://www.w3.org/1999/XSL/Transform" === e,
 55482              },
 55483              template: {
 55484                id: 9,
 55485                check: (e) =>
 55486                  e.startsWith("http://www.xfa.org/schema/xfa-template/"),
 55487              },
 55488              xdc: {
 55489                id: 10,
 55490                check: (e) => e.startsWith("http://www.xfa.org/schema/xdc/"),
 55491              },
 55492              xdp: { id: 11, check: (e) => "http://ns.adobe.com/xdp/" === e },
 55493              xfdf: { id: 12, check: (e) => "http://ns.adobe.com/xfdf/" === e },
 55494              xhtml: {
 55495                id: 13,
 55496                check: (e) => "http://www.w3.org/1999/xhtml" === e,
 55497              },
 55498              xmpmeta: {
 55499                id: 14,
 55500                check: (e) => "http://ns.adobe.com/xmpmeta/" === e,
 55501              },
 55502            };
 55503          },
 55504          (e, t, a) => {
 55505            Object.defineProperty(t, "__esModule", { value: !0 });
 55506            t.addHTML = function addHTML(e, t, a) {
 55507              const i = e[r.$extra],
 55508                s = i.availableSpace,
 55509                [o, c, l, h] = a;
 55510              switch (e.layout) {
 55511                case "position":
 55512                  i.width = Math.max(i.width, o + l);
 55513                  i.height = Math.max(i.height, c + h);
 55514                  i.children.push(t);
 55515                  break;
 55516                case "lr-tb":
 55517                case "rl-tb":
 55518                  if (!i.line || 1 === i.attempt) {
 55519                    i.line = createLine(e, []);
 55520                    i.children.push(i.line);
 55521                    i.numberInLine = 0;
 55522                  }
 55523                  i.numberInLine += 1;
 55524                  i.line.children.push(t);
 55525                  if (0 === i.attempt) {
 55526                    i.currentWidth += l;
 55527                    i.height = Math.max(i.height, i.prevHeight + h);
 55528                  } else {
 55529                    i.currentWidth = l;
 55530                    i.prevHeight = i.height;
 55531                    i.height += h;
 55532                    i.attempt = 0;
 55533                  }
 55534                  i.width = Math.max(i.width, i.currentWidth);
 55535                  break;
 55536                case "rl-row":
 55537                case "row": {
 55538                  i.children.push(t);
 55539                  i.width += l;
 55540                  i.height = Math.max(i.height, h);
 55541                  const e = (0, n.measureToString)(i.height);
 55542                  for (const t of i.children) t.attributes.style.height = e;
 55543                  break;
 55544                }
 55545                case "table":
 55546                case "tb":
 55547                  i.width = Math.min(s.width, Math.max(i.width, l));
 55548                  i.height += h;
 55549                  i.children.push(t);
 55550              }
 55551            };
 55552            t.checkDimensions = function checkDimensions(e, t) {
 55553              if (null === e[r.$getTemplateRoot]()[r.$extra].firstUnsplittable)
 55554                return !0;
 55555              if (0 === e.w || 0 === e.h) return !0;
 55556              const a = e[r.$getSubformParent](),
 55557                n = a[r.$extra]?.attempt || 0,
 55558                [, i, s, o] = (function getTransformedBBox(e) {
 55559                  let t,
 55560                    a,
 55561                    r = "" === e.w ? NaN : e.w,
 55562                    n = "" === e.h ? NaN : e.h,
 55563                    [i, s] = [0, 0];
 55564                  switch (e.anchorType || "") {
 55565                    case "bottomCenter":
 55566                      [i, s] = [r / 2, n];
 55567                      break;
 55568                    case "bottomLeft":
 55569                      [i, s] = [0, n];
 55570                      break;
 55571                    case "bottomRight":
 55572                      [i, s] = [r, n];
 55573                      break;
 55574                    case "middleCenter":
 55575                      [i, s] = [r / 2, n / 2];
 55576                      break;
 55577                    case "middleLeft":
 55578                      [i, s] = [0, n / 2];
 55579                      break;
 55580                    case "middleRight":
 55581                      [i, s] = [r, n / 2];
 55582                      break;
 55583                    case "topCenter":
 55584                      [i, s] = [r / 2, 0];
 55585                      break;
 55586                    case "topRight":
 55587                      [i, s] = [r, 0];
 55588                  }
 55589                  switch (e.rotate || 0) {
 55590                    case 0:
 55591                      [t, a] = [-i, -s];
 55592                      break;
 55593                    case 90:
 55594                      [t, a] = [-s, i];
 55595                      [r, n] = [n, -r];
 55596                      break;
 55597                    case 180:
 55598                      [t, a] = [i, s];
 55599                      [r, n] = [-r, -n];
 55600                      break;
 55601                    case 270:
 55602                      [t, a] = [s, -i];
 55603                      [r, n] = [-n, r];
 55604                  }
 55605                  return [
 55606                    e.x + t + Math.min(0, r),
 55607                    e.y + a + Math.min(0, n),
 55608                    Math.abs(r),
 55609                    Math.abs(n),
 55610                  ];
 55611                })(e);
 55612              switch (a.layout) {
 55613                case "lr-tb":
 55614                case "rl-tb":
 55615                  return 0 === n
 55616                    ? e[r.$getTemplateRoot]()[r.$extra].noLayoutFailure
 55617                      ? "" !== e.w
 55618                        ? Math.round(s - t.width) <= 2
 55619                        : t.width > 2
 55620                      : !("" !== e.h && Math.round(o - t.height) > 2) &&
 55621                        ("" !== e.w
 55622                          ? Math.round(s - t.width) <= 2 ||
 55623                            (0 === a[r.$extra].numberInLine && t.height > 2)
 55624                          : t.width > 2)
 55625                    : !!e[r.$getTemplateRoot]()[r.$extra].noLayoutFailure ||
 55626                        (!("" !== e.h && Math.round(o - t.height) > 2) &&
 55627                          ("" === e.w ||
 55628                            Math.round(s - t.width) <= 2 ||
 55629                            !a[r.$isThereMoreWidth]()) &&
 55630                          t.height > 2);
 55631                case "table":
 55632                case "tb":
 55633                  return (
 55634                    !!e[r.$getTemplateRoot]()[r.$extra].noLayoutFailure ||
 55635                    ("" === e.h || e[r.$isSplittable]()
 55636                      ? ("" === e.w ||
 55637                          Math.round(s - t.width) <= 2 ||
 55638                          !a[r.$isThereMoreWidth]()) &&
 55639                        t.height > 2
 55640                      : Math.round(o - t.height) <= 2)
 55641                  );
 55642                case "position":
 55643                  if (e[r.$getTemplateRoot]()[r.$extra].noLayoutFailure)
 55644                    return !0;
 55645                  if ("" === e.h || Math.round(o + i - t.height) <= 2) return !0;
 55646                  return (
 55647                    o + i > e[r.$getTemplateRoot]()[r.$extra].currentContentArea.h
 55648                  );
 55649                case "rl-row":
 55650                case "row":
 55651                  return (
 55652                    !!e[r.$getTemplateRoot]()[r.$extra].noLayoutFailure ||
 55653                    "" === e.h ||
 55654                    Math.round(o - t.height) <= 2
 55655                  );
 55656                default:
 55657                  return !0;
 55658              }
 55659            };
 55660            t.flushHTML = function flushHTML(e) {
 55661              if (!e[r.$extra]) return null;
 55662              const t = {
 55663                name: "div",
 55664                attributes: e[r.$extra].attributes,
 55665                children: e[r.$extra].children,
 55666              };
 55667              if (e[r.$extra].failingNode) {
 55668                const a = e[r.$extra].failingNode[r.$flushHTML]();
 55669                a &&
 55670                  (e.layout.endsWith("-tb")
 55671                    ? t.children.push(createLine(e, [a]))
 55672                    : t.children.push(a));
 55673              }
 55674              if (0 === t.children.length) return null;
 55675              return t;
 55676            };
 55677            t.getAvailableSpace = function getAvailableSpace(e) {
 55678              const t = e[r.$extra].availableSpace,
 55679                a = e.margin ? e.margin.topInset + e.margin.bottomInset : 0,
 55680                n = e.margin ? e.margin.leftInset + e.margin.rightInset : 0;
 55681              switch (e.layout) {
 55682                case "lr-tb":
 55683                case "rl-tb":
 55684                  return 0 === e[r.$extra].attempt
 55685                    ? {
 55686                        width: t.width - n - e[r.$extra].currentWidth,
 55687                        height: t.height - a - e[r.$extra].prevHeight,
 55688                      }
 55689                    : {
 55690                        width: t.width - n,
 55691                        height: t.height - a - e[r.$extra].height,
 55692                      };
 55693                case "rl-row":
 55694                case "row":
 55695                  return {
 55696                    width: e[r.$extra].columnWidths
 55697                      .slice(e[r.$extra].currentColumn)
 55698                      .reduce((e, t) => e + t),
 55699                    height: t.height - n,
 55700                  };
 55701                case "table":
 55702                case "tb":
 55703                  return {
 55704                    width: t.width - n,
 55705                    height: t.height - a - e[r.$extra].height,
 55706                  };
 55707                default:
 55708                  return t;
 55709              }
 55710            };
 55711            var r = a(78),
 55712              n = a(83);
 55713            function createLine(e, t) {
 55714              return {
 55715                name: "div",
 55716                attributes: { class: ["lr-tb" === e.layout ? "xfaLr" : "xfaRl"] },
 55717                children: t,
 55718              };
 55719            }
 55720          },
 55721          (e, t, a) => {
 55722            Object.defineProperty(t, "__esModule", { value: !0 });
 55723            t.computeBbox = function computeBbox(e, t, a) {
 55724              let n;
 55725              if ("" !== e.w && "" !== e.h) n = [e.x, e.y, e.w, e.h];
 55726              else {
 55727                if (!a) return null;
 55728                let i = e.w;
 55729                if ("" === i) {
 55730                  if (0 === e.maxW) {
 55731                    const t = e[r.$getSubformParent]();
 55732                    i = "position" === t.layout && "" !== t.w ? 0 : e.minW;
 55733                  } else i = Math.min(e.maxW, a.width);
 55734                  t.attributes.style.width = measureToString(i);
 55735                }
 55736                let s = e.h;
 55737                if ("" === s) {
 55738                  if (0 === e.maxH) {
 55739                    const t = e[r.$getSubformParent]();
 55740                    s = "position" === t.layout && "" !== t.h ? 0 : e.minH;
 55741                  } else s = Math.min(e.maxH, a.height);
 55742                  t.attributes.style.height = measureToString(s);
 55743                }
 55744                n = [e.x, e.y, i, s];
 55745              }
 55746              return n;
 55747            };
 55748            t.createWrapper = function createWrapper(e, t) {
 55749              const { attributes: a } = t,
 55750                { style: n } = a,
 55751                i = {
 55752                  name: "div",
 55753                  attributes: {
 55754                    class: ["xfaWrapper"],
 55755                    style: Object.create(null),
 55756                  },
 55757                  children: [],
 55758                };
 55759              a.class.push("xfaWrapped");
 55760              if (e.border) {
 55761                const { widths: a, insets: s } = e.border[r.$extra];
 55762                let o,
 55763                  c,
 55764                  l = s[0],
 55765                  h = s[3];
 55766                const u = s[0] + s[2],
 55767                  d = s[1] + s[3];
 55768                switch (e.border.hand) {
 55769                  case "even":
 55770                    l -= a[0] / 2;
 55771                    h -= a[3] / 2;
 55772                    o = `calc(100% + ${(a[1] + a[3]) / 2 - d}px)`;
 55773                    c = `calc(100% + ${(a[0] + a[2]) / 2 - u}px)`;
 55774                    break;
 55775                  case "left":
 55776                    l -= a[0];
 55777                    h -= a[3];
 55778                    o = `calc(100% + ${a[1] + a[3] - d}px)`;
 55779                    c = `calc(100% + ${a[0] + a[2] - u}px)`;
 55780                    break;
 55781                  case "right":
 55782                    o = d ? `calc(100% - ${d}px)` : "100%";
 55783                    c = u ? `calc(100% - ${u}px)` : "100%";
 55784                }
 55785                const f = ["xfaBorder"];
 55786                isPrintOnly(e.border) && f.push("xfaPrintOnly");
 55787                const g = {
 55788                  name: "div",
 55789                  attributes: {
 55790                    class: f,
 55791                    style: { top: `${l}px`, left: `${h}px`, width: o, height: c },
 55792                  },
 55793                  children: [],
 55794                };
 55795                for (const e of [
 55796                  "border",
 55797                  "borderWidth",
 55798                  "borderColor",
 55799                  "borderRadius",
 55800                  "borderStyle",
 55801                ])
 55802                  if (void 0 !== n[e]) {
 55803                    g.attributes.style[e] = n[e];
 55804                    delete n[e];
 55805                  }
 55806                i.children.push(g, t);
 55807              } else i.children.push(t);
 55808              for (const e of [
 55809                "background",
 55810                "backgroundClip",
 55811                "top",
 55812                "left",
 55813                "width",
 55814                "height",
 55815                "minWidth",
 55816                "minHeight",
 55817                "maxWidth",
 55818                "maxHeight",
 55819                "transform",
 55820                "transformOrigin",
 55821                "visibility",
 55822              ])
 55823                if (void 0 !== n[e]) {
 55824                  i.attributes.style[e] = n[e];
 55825                  delete n[e];
 55826                }
 55827              i.attributes.style.position =
 55828                "absolute" === n.position ? "absolute" : "relative";
 55829              delete n.position;
 55830              if (n.alignSelf) {
 55831                i.attributes.style.alignSelf = n.alignSelf;
 55832                delete n.alignSelf;
 55833              }
 55834              return i;
 55835            };
 55836            t.fixDimensions = function fixDimensions(e) {
 55837              const t = e[r.$getSubformParent]();
 55838              if (t.layout?.includes("row")) {
 55839                const a = t[r.$extra],
 55840                  n = e.colSpan;
 55841                let i;
 55842                i =
 55843                  -1 === n
 55844                    ? a.columnWidths
 55845                        .slice(a.currentColumn)
 55846                        .reduce((e, t) => e + t, 0)
 55847                    : a.columnWidths
 55848                        .slice(a.currentColumn, a.currentColumn + n)
 55849                        .reduce((e, t) => e + t, 0);
 55850                isNaN(i) || (e.w = i);
 55851              }
 55852              t.layout && "position" !== t.layout && (e.x = e.y = 0);
 55853              "table" === e.layout &&
 55854                "" === e.w &&
 55855                Array.isArray(e.columnWidths) &&
 55856                (e.w = e.columnWidths.reduce((e, t) => e + t, 0));
 55857            };
 55858            t.fixTextIndent = function fixTextIndent(e) {
 55859              const t = (0, i.getMeasurement)(e.textIndent, "0px");
 55860              if (t >= 0) return;
 55861              const a =
 55862                  "padding" +
 55863                  ("left" == ("right" === e.textAlign ? "right" : "left")
 55864                    ? "Left"
 55865                    : "Right"),
 55866                r = (0, i.getMeasurement)(e[a], "0px");
 55867              e[a] = r - t + "px";
 55868            };
 55869            t.fixURL = function fixURL(e) {
 55870              const t = (0, n.createValidAbsoluteUrl)(e, null, {
 55871                addDefaultProtocol: !0,
 55872                tryConvertEncoding: !0,
 55873              });
 55874              return t ? t.href : null;
 55875            };
 55876            t.isPrintOnly = isPrintOnly;
 55877            t.layoutClass = function layoutClass(e) {
 55878              switch (e.layout) {
 55879                case "position":
 55880                default:
 55881                  return "xfaPosition";
 55882                case "lr-tb":
 55883                  return "xfaLrTb";
 55884                case "rl-row":
 55885                  return "xfaRlRow";
 55886                case "rl-tb":
 55887                  return "xfaRlTb";
 55888                case "row":
 55889                  return "xfaRow";
 55890                case "table":
 55891                  return "xfaTable";
 55892                case "tb":
 55893                  return "xfaTb";
 55894              }
 55895            };
 55896            t.layoutNode = function layoutNode(e, t) {
 55897              let a = null,
 55898                n = null,
 55899                i = !1;
 55900              if ((!e.w || !e.h) && e.value) {
 55901                let s = 0,
 55902                  o = 0;
 55903                if (e.margin) {
 55904                  s = e.margin.leftInset + e.margin.rightInset;
 55905                  o = e.margin.topInset + e.margin.bottomInset;
 55906                }
 55907                let c = null,
 55908                  l = null;
 55909                if (e.para) {
 55910                  l = Object.create(null);
 55911                  c = "" === e.para.lineHeight ? null : e.para.lineHeight;
 55912                  l.top = "" === e.para.spaceAbove ? 0 : e.para.spaceAbove;
 55913                  l.bottom = "" === e.para.spaceBelow ? 0 : e.para.spaceBelow;
 55914                  l.left = "" === e.para.marginLeft ? 0 : e.para.marginLeft;
 55915                  l.right = "" === e.para.marginRight ? 0 : e.para.marginRight;
 55916                }
 55917                let h = e.font;
 55918                if (!h) {
 55919                  const t = e[r.$getTemplateRoot]();
 55920                  let a = e[r.$getParent]();
 55921                  for (; a && a !== t; ) {
 55922                    if (a.font) {
 55923                      h = a.font;
 55924                      break;
 55925                    }
 55926                    a = a[r.$getParent]();
 55927                  }
 55928                }
 55929                const u = (e.w || t.width) - s,
 55930                  d = e[r.$globalData].fontFinder;
 55931                if (
 55932                  e.value.exData &&
 55933                  e.value.exData[r.$content] &&
 55934                  "text/html" === e.value.exData.contentType
 55935                ) {
 55936                  const t = layoutText(e.value.exData[r.$content], h, l, c, d, u);
 55937                  n = t.width;
 55938                  a = t.height;
 55939                  i = t.isBroken;
 55940                } else {
 55941                  const t = e.value[r.$text]();
 55942                  if (t) {
 55943                    const e = layoutText(t, h, l, c, d, u);
 55944                    n = e.width;
 55945                    a = e.height;
 55946                    i = e.isBroken;
 55947                  }
 55948                }
 55949                null === n || e.w || (n += s);
 55950                null === a || e.h || (a += o);
 55951              }
 55952              return { w: n, h: a, isBroken: i };
 55953            };
 55954            t.measureToString = measureToString;
 55955            t.setAccess = function setAccess(e, t) {
 55956              switch (e.access) {
 55957                case "nonInteractive":
 55958                  t.push("xfaNonInteractive");
 55959                  break;
 55960                case "readOnly":
 55961                  t.push("xfaReadOnly");
 55962                  break;
 55963                case "protected":
 55964                  t.push("xfaDisabled");
 55965              }
 55966            };
 55967            t.setFontFamily = function setFontFamily(e, t, a, r) {
 55968              if (!a) {
 55969                delete r.fontFamily;
 55970                return;
 55971              }
 55972              const n = (0, i.stripQuotes)(e.typeface);
 55973              r.fontFamily = `"${n}"`;
 55974              const o = a.find(n);
 55975              if (o) {
 55976                const { fontFamily: a } = o.regular.cssFontInfo;
 55977                a !== n && (r.fontFamily = `"${a}"`);
 55978                const i = getCurrentPara(t);
 55979                if (i && "" !== i.lineHeight) return;
 55980                if (r.lineHeight) return;
 55981                const c = (0, s.selectFont)(e, o);
 55982                c && (r.lineHeight = Math.max(1.2, c.lineHeight));
 55983              }
 55984            };
 55985            t.setMinMaxDimensions = function setMinMaxDimensions(e, t) {
 55986              if ("position" === e[r.$getSubformParent]().layout) {
 55987                e.minW > 0 && (t.minWidth = measureToString(e.minW));
 55988                e.maxW > 0 && (t.maxWidth = measureToString(e.maxW));
 55989                e.minH > 0 && (t.minHeight = measureToString(e.minH));
 55990                e.maxH > 0 && (t.maxHeight = measureToString(e.maxH));
 55991              }
 55992            };
 55993            t.setPara = function setPara(e, t, a) {
 55994              if (a.attributes.class?.includes("xfaRich")) {
 55995                if (t) {
 55996                  "" === e.h && (t.height = "auto");
 55997                  "" === e.w && (t.width = "auto");
 55998                }
 55999                const n = getCurrentPara(e);
 56000                if (n) {
 56001                  const e = a.attributes.style;
 56002                  e.display = "flex";
 56003                  e.flexDirection = "column";
 56004                  switch (n.vAlign) {
 56005                    case "top":
 56006                      e.justifyContent = "start";
 56007                      break;
 56008                    case "bottom":
 56009                      e.justifyContent = "end";
 56010                      break;
 56011                    case "middle":
 56012                      e.justifyContent = "center";
 56013                  }
 56014                  const t = n[r.$toStyle]();
 56015                  for (const [a, r] of Object.entries(t)) a in e || (e[a] = r);
 56016                }
 56017              }
 56018            };
 56019            t.toStyle = function toStyle(e, ...t) {
 56020              const a = Object.create(null);
 56021              for (const i of t) {
 56022                const t = e[i];
 56023                if (null !== t)
 56024                  if (l.hasOwnProperty(i)) l[i](e, a);
 56025                  else if (t instanceof c.XFAObject) {
 56026                    const e = t[r.$toStyle]();
 56027                    e
 56028                      ? Object.assign(a, e)
 56029                      : (0, n.warn)(
 56030                          `(DEBUG) - XFA - style for ${i} not implemented yet`,
 56031                        );
 56032                  }
 56033              }
 56034              return a;
 56035            };
 56036            var r = a(78),
 56037              n = a(2),
 56038              i = a(84),
 56039              s = a(85),
 56040              o = a(86),
 56041              c = a(87);
 56042            function measureToString(e) {
 56043              return "string" == typeof e
 56044                ? "0px"
 56045                : Number.isInteger(e)
 56046                  ? `${e}px`
 56047                  : `${e.toFixed(2)}px`;
 56048            }
 56049            const l = {
 56050              anchorType(e, t) {
 56051                const a = e[r.$getSubformParent]();
 56052                if (a && (!a.layout || "position" === a.layout)) {
 56053                  "transform" in t || (t.transform = "");
 56054                  switch (e.anchorType) {
 56055                    case "bottomCenter":
 56056                      t.transform += "translate(-50%, -100%)";
 56057                      break;
 56058                    case "bottomLeft":
 56059                      t.transform += "translate(0,-100%)";
 56060                      break;
 56061                    case "bottomRight":
 56062                      t.transform += "translate(-100%,-100%)";
 56063                      break;
 56064                    case "middleCenter":
 56065                      t.transform += "translate(-50%,-50%)";
 56066                      break;
 56067                    case "middleLeft":
 56068                      t.transform += "translate(0,-50%)";
 56069                      break;
 56070                    case "middleRight":
 56071                      t.transform += "translate(-100%,-50%)";
 56072                      break;
 56073                    case "topCenter":
 56074                      t.transform += "translate(-50%,0)";
 56075                      break;
 56076                    case "topRight":
 56077                      t.transform += "translate(-100%,0)";
 56078                  }
 56079                }
 56080              },
 56081              dimensions(e, t) {
 56082                const a = e[r.$getSubformParent]();
 56083                let n = e.w;
 56084                const i = e.h;
 56085                if (a.layout?.includes("row")) {
 56086                  const t = a[r.$extra],
 56087                    i = e.colSpan;
 56088                  let s;
 56089                  if (-1 === i) {
 56090                    s = t.columnWidths
 56091                      .slice(t.currentColumn)
 56092                      .reduce((e, t) => e + t, 0);
 56093                    t.currentColumn = 0;
 56094                  } else {
 56095                    s = t.columnWidths
 56096                      .slice(t.currentColumn, t.currentColumn + i)
 56097                      .reduce((e, t) => e + t, 0);
 56098                    t.currentColumn =
 56099                      (t.currentColumn + e.colSpan) % t.columnWidths.length;
 56100                  }
 56101                  isNaN(s) || (n = e.w = s);
 56102                }
 56103                t.width = "" !== n ? measureToString(n) : "auto";
 56104                t.height = "" !== i ? measureToString(i) : "auto";
 56105              },
 56106              position(e, t) {
 56107                const a = e[r.$getSubformParent]();
 56108                if (!a?.layout || "position" === a.layout) {
 56109                  t.position = "absolute";
 56110                  t.left = measureToString(e.x);
 56111                  t.top = measureToString(e.y);
 56112                }
 56113              },
 56114              rotate(e, t) {
 56115                if (e.rotate) {
 56116                  "transform" in t || (t.transform = "");
 56117                  t.transform += `rotate(-${e.rotate}deg)`;
 56118                  t.transformOrigin = "top left";
 56119                }
 56120              },
 56121              presence(e, t) {
 56122                switch (e.presence) {
 56123                  case "invisible":
 56124                    t.visibility = "hidden";
 56125                    break;
 56126                  case "hidden":
 56127                  case "inactive":
 56128                    t.display = "none";
 56129                }
 56130              },
 56131              hAlign(e, t) {
 56132                if ("para" === e[r.$nodeName])
 56133                  switch (e.hAlign) {
 56134                    case "justifyAll":
 56135                      t.textAlign = "justify-all";
 56136                      break;
 56137                    case "radix":
 56138                      t.textAlign = "left";
 56139                      break;
 56140                    default:
 56141                      t.textAlign = e.hAlign;
 56142                  }
 56143                else
 56144                  switch (e.hAlign) {
 56145                    case "left":
 56146                      t.alignSelf = "start";
 56147                      break;
 56148                    case "center":
 56149                      t.alignSelf = "center";
 56150                      break;
 56151                    case "right":
 56152                      t.alignSelf = "end";
 56153                  }
 56154              },
 56155              margin(e, t) {
 56156                e.margin && (t.margin = e.margin[r.$toStyle]().margin);
 56157              },
 56158            };
 56159            function layoutText(e, t, a, n, i, s) {
 56160              const c = new o.TextMeasure(t, a, n, i);
 56161              "string" == typeof e ? c.addString(e) : e[r.$pushGlyphs](c);
 56162              return c.compute(s);
 56163            }
 56164            function isPrintOnly(e) {
 56165              return (
 56166                e.relevant.length > 0 &&
 56167                !e.relevant[0].excluded &&
 56168                "print" === e.relevant[0].viewname
 56169              );
 56170            }
 56171            function getCurrentPara(e) {
 56172              const t = e[r.$getTemplateRoot]()[r.$extra].paraStack;
 56173              return t.length ? t.at(-1) : null;
 56174            }
 56175          },
 56176          (e, t, a) => {
 56177            Object.defineProperty(t, "__esModule", { value: !0 });
 56178            t.HTMLResult = void 0;
 56179            t.getBBox = function getBBox(e) {
 56180              const t = -1;
 56181              if (!e) return { x: t, y: t, width: t, height: t };
 56182              const a = e
 56183                .trim()
 56184                .split(/\s*,\s*/)
 56185                .map((e) => getMeasurement(e, "-1"));
 56186              if (a.length < 4 || a[2] < 0 || a[3] < 0)
 56187                return { x: t, y: t, width: t, height: t };
 56188              const [r, n, i, s] = a;
 56189              return { x: r, y: n, width: i, height: s };
 56190            };
 56191            t.getColor = function getColor(e, t = [0, 0, 0]) {
 56192              let [a, r, n] = t;
 56193              if (!e) return { r: a, g: r, b: n };
 56194              const i = e
 56195                .trim()
 56196                .split(/\s*,\s*/)
 56197                .map((e) => Math.min(Math.max(0, parseInt(e.trim(), 10)), 255))
 56198                .map((e) => (isNaN(e) ? 0 : e));
 56199              if (i.length < 3) return { r: a, g: r, b: n };
 56200              [a, r, n] = i;
 56201              return { r: a, g: r, b: n };
 56202            };
 56203            t.getFloat = function getFloat({
 56204              data: e,
 56205              defaultValue: t,
 56206              validate: a,
 56207            }) {
 56208              if (!e) return t;
 56209              e = e.trim();
 56210              const r = parseFloat(e);
 56211              if (!isNaN(r) && a(r)) return r;
 56212              return t;
 56213            };
 56214            t.getInteger = function getInteger({
 56215              data: e,
 56216              defaultValue: t,
 56217              validate: a,
 56218            }) {
 56219              if (!e) return t;
 56220              e = e.trim();
 56221              const r = parseInt(e, 10);
 56222              if (!isNaN(r) && a(r)) return r;
 56223              return t;
 56224            };
 56225            t.getKeyword = getKeyword;
 56226            t.getMeasurement = getMeasurement;
 56227            t.getRatio = function getRatio(e) {
 56228              if (!e) return { num: 1, den: 1 };
 56229              const t = e
 56230                .trim()
 56231                .split(/\s*:\s*/)
 56232                .map((e) => parseFloat(e))
 56233                .filter((e) => !isNaN(e));
 56234              1 === t.length && t.push(1);
 56235              if (0 === t.length) return { num: 1, den: 1 };
 56236              const [a, r] = t;
 56237              return { num: a, den: r };
 56238            };
 56239            t.getRelevant = function getRelevant(e) {
 56240              if (!e) return [];
 56241              return e
 56242                .trim()
 56243                .split(/\s+/)
 56244                .map((e) => ({
 56245                  excluded: "-" === e[0],
 56246                  viewname: e.substring(1),
 56247                }));
 56248            };
 56249            t.getStringOption = function getStringOption(e, t) {
 56250              return getKeyword({
 56251                data: e,
 56252                defaultValue: t[0],
 56253                validate: (e) => t.includes(e),
 56254              });
 56255            };
 56256            t.stripQuotes = function stripQuotes(e) {
 56257              if (e.startsWith("'") || e.startsWith('"')) return e.slice(1, -1);
 56258              return e;
 56259            };
 56260            var r = a(2);
 56261            const n = {
 56262                pt: (e) => e,
 56263                cm: (e) => (e / 2.54) * 72,
 56264                mm: (e) => (e / 25.4) * 72,
 56265                in: (e) => 72 * e,
 56266                px: (e) => e,
 56267              },
 56268              i = /([+-]?\d+\.?\d*)(.*)/;
 56269            function getKeyword({ data: e, defaultValue: t, validate: a }) {
 56270              return e && a((e = e.trim())) ? e : t;
 56271            }
 56272            function getMeasurement(e, t = "0") {
 56273              t ||= "0";
 56274              if (!e) return getMeasurement(t);
 56275              const a = e.trim().match(i);
 56276              if (!a) return getMeasurement(t);
 56277              const [, r, s] = a,
 56278                o = parseFloat(r);
 56279              if (isNaN(o)) return getMeasurement(t);
 56280              if (0 === o) return 0;
 56281              const c = n[s];
 56282              return c ? c(o) : o;
 56283            }
 56284            class HTMLResult {
 56285              static get FAILURE() {
 56286                return (0, r.shadow)(
 56287                  this,
 56288                  "FAILURE",
 56289                  new HTMLResult(!1, null, null, null),
 56290                );
 56291              }
 56292              static get EMPTY() {
 56293                return (0, r.shadow)(
 56294                  this,
 56295                  "EMPTY",
 56296                  new HTMLResult(!0, null, null, null),
 56297                );
 56298              }
 56299              constructor(e, t, a, r) {
 56300                this.success = e;
 56301                this.html = t;
 56302                this.bbox = a;
 56303                this.breakNode = r;
 56304              }
 56305              isBreak() {
 56306                return !!this.breakNode;
 56307              }
 56308              static breakNode(e) {
 56309                return new HTMLResult(!1, null, null, e);
 56310              }
 56311              static success(e, t = null) {
 56312                return new HTMLResult(!0, e, t, null);
 56313              }
 56314            }
 56315            t.HTMLResult = HTMLResult;
 56316          },
 56317          (e, t, a) => {
 56318            Object.defineProperty(t, "__esModule", { value: !0 });
 56319            t.FontFinder = void 0;
 56320            t.getMetrics = function getMetrics(e, t = !1) {
 56321              let a = null;
 56322              if (e) {
 56323                const t = (0, n.stripQuotes)(e.typeface),
 56324                  i = e[r.$globalData].fontFinder.find(t);
 56325                a = selectFont(e, i);
 56326              }
 56327              if (!a) return { lineHeight: 12, lineGap: 2, lineNoGap: 10 };
 56328              const i = e.size || 10,
 56329                s = a.lineHeight ? Math.max(t ? 0 : 1.2, a.lineHeight) : 1.2,
 56330                o = void 0 === a.lineGap ? 0.2 : a.lineGap;
 56331              return {
 56332                lineHeight: s * i,
 56333                lineGap: o * i,
 56334                lineNoGap: Math.max(1, s - o) * i,
 56335              };
 56336            };
 56337            t.selectFont = selectFont;
 56338            var r = a(78),
 56339              n = a(84),
 56340              i = a(2);
 56341            t.FontFinder = class FontFinder {
 56342              constructor(e) {
 56343                this.fonts = new Map();
 56344                this.cache = new Map();
 56345                this.warned = new Set();
 56346                this.defaultFont = null;
 56347                this.add(e);
 56348              }
 56349              add(e, t = null) {
 56350                for (const t of e) this.addPdfFont(t);
 56351                for (const e of this.fonts.values())
 56352                  e.regular || (e.regular = e.italic || e.bold || e.bolditalic);
 56353                if (!t || 0 === t.size) return;
 56354                const a = this.fonts.get("PdfJS-Fallback-PdfJS-XFA");
 56355                for (const e of t) this.fonts.set(e, a);
 56356              }
 56357              addPdfFont(e) {
 56358                const t = e.cssFontInfo,
 56359                  a = t.fontFamily;
 56360                let r = this.fonts.get(a);
 56361                if (!r) {
 56362                  r = Object.create(null);
 56363                  this.fonts.set(a, r);
 56364                  this.defaultFont || (this.defaultFont = r);
 56365                }
 56366                let n = "";
 56367                const i = parseFloat(t.fontWeight);
 56368                0 !== parseFloat(t.italicAngle)
 56369                  ? (n = i >= 700 ? "bolditalic" : "italic")
 56370                  : i >= 700 && (n = "bold");
 56371                if (!n) {
 56372                  (e.name.includes("Bold") || e.psName?.includes("Bold")) &&
 56373                    (n = "bold");
 56374                  (e.name.includes("Italic") ||
 56375                    e.name.endsWith("It") ||
 56376                    e.psName?.includes("Italic") ||
 56377                    e.psName?.endsWith("It")) &&
 56378                    (n += "italic");
 56379                }
 56380                n || (n = "regular");
 56381                r[n] = e;
 56382              }
 56383              getDefault() {
 56384                return this.defaultFont;
 56385              }
 56386              find(e, t = !0) {
 56387                let a = this.fonts.get(e) || this.cache.get(e);
 56388                if (a) return a;
 56389                const r = /,|-|_| |bolditalic|bold|italic|regular|it/gi;
 56390                let n = e.replaceAll(r, "");
 56391                a = this.fonts.get(n);
 56392                if (a) {
 56393                  this.cache.set(e, a);
 56394                  return a;
 56395                }
 56396                n = n.toLowerCase();
 56397                const s = [];
 56398                for (const [e, t] of this.fonts.entries())
 56399                  e.replaceAll(r, "").toLowerCase().startsWith(n) && s.push(t);
 56400                if (0 === s.length)
 56401                  for (const [, e] of this.fonts.entries())
 56402                    e.regular.name
 56403                      ?.replaceAll(r, "")
 56404                      .toLowerCase()
 56405                      .startsWith(n) && s.push(e);
 56406                if (0 === s.length) {
 56407                  n = n.replaceAll(/psmt|mt/gi, "");
 56408                  for (const [e, t] of this.fonts.entries())
 56409                    e.replaceAll(r, "").toLowerCase().startsWith(n) && s.push(t);
 56410                }
 56411                if (0 === s.length)
 56412                  for (const e of this.fonts.values())
 56413                    e.regular.name
 56414                      ?.replaceAll(r, "")
 56415                      .toLowerCase()
 56416                      .startsWith(n) && s.push(e);
 56417                if (s.length >= 1) {
 56418                  1 !== s.length &&
 56419                    t &&
 56420                    (0, i.warn)(
 56421                      `XFA - Too many choices to guess the correct font: ${e}`,
 56422                    );
 56423                  this.cache.set(e, s[0]);
 56424                  return s[0];
 56425                }
 56426                if (t && !this.warned.has(e)) {
 56427                  this.warned.add(e);
 56428                  (0, i.warn)(`XFA - Cannot find the font: ${e}`);
 56429                }
 56430                return null;
 56431              }
 56432            };
 56433            function selectFont(e, t) {
 56434              return "italic" === e.posture
 56435                ? "bold" === e.weight
 56436                  ? t.bolditalic
 56437                  : t.italic
 56438                : "bold" === e.weight
 56439                  ? t.bold
 56440                  : t.regular;
 56441            }
 56442          },
 56443          (e, t, a) => {
 56444            Object.defineProperty(t, "__esModule", { value: !0 });
 56445            t.TextMeasure = void 0;
 56446            var r = a(85);
 56447            class FontInfo {
 56448              constructor(e, t, a, n) {
 56449                this.lineHeight = a;
 56450                this.paraMargin = t || { top: 0, bottom: 0, left: 0, right: 0 };
 56451                if (!e) {
 56452                  [this.pdfFont, this.xfaFont] = this.defaultFont(n);
 56453                  return;
 56454                }
 56455                this.xfaFont = {
 56456                  typeface: e.typeface,
 56457                  posture: e.posture,
 56458                  weight: e.weight,
 56459                  size: e.size,
 56460                  letterSpacing: e.letterSpacing,
 56461                };
 56462                const i = n.find(e.typeface);
 56463                if (i) {
 56464                  this.pdfFont = (0, r.selectFont)(e, i);
 56465                  this.pdfFont ||
 56466                    ([this.pdfFont, this.xfaFont] = this.defaultFont(n));
 56467                } else [this.pdfFont, this.xfaFont] = this.defaultFont(n);
 56468              }
 56469              defaultFont(e) {
 56470                const t =
 56471                  e.find("Helvetica", !1) ||
 56472                  e.find("Myriad Pro", !1) ||
 56473                  e.find("Arial", !1) ||
 56474                  e.getDefault();
 56475                if (t?.regular) {
 56476                  const e = t.regular;
 56477                  return [
 56478                    e,
 56479                    {
 56480                      typeface: e.cssFontInfo.fontFamily,
 56481                      posture: "normal",
 56482                      weight: "normal",
 56483                      size: 10,
 56484                      letterSpacing: 0,
 56485                    },
 56486                  ];
 56487                }
 56488                return [
 56489                  null,
 56490                  {
 56491                    typeface: "Courier",
 56492                    posture: "normal",
 56493                    weight: "normal",
 56494                    size: 10,
 56495                    letterSpacing: 0,
 56496                  },
 56497                ];
 56498              }
 56499            }
 56500            class FontSelector {
 56501              constructor(e, t, a, r) {
 56502                this.fontFinder = r;
 56503                this.stack = [new FontInfo(e, t, a, r)];
 56504              }
 56505              pushData(e, t, a) {
 56506                const r = this.stack.at(-1);
 56507                for (const t of [
 56508                  "typeface",
 56509                  "posture",
 56510                  "weight",
 56511                  "size",
 56512                  "letterSpacing",
 56513                ])
 56514                  e[t] || (e[t] = r.xfaFont[t]);
 56515                for (const e of ["top", "bottom", "left", "right"])
 56516                  isNaN(t[e]) && (t[e] = r.paraMargin[e]);
 56517                const n = new FontInfo(e, t, a || r.lineHeight, this.fontFinder);
 56518                n.pdfFont || (n.pdfFont = r.pdfFont);
 56519                this.stack.push(n);
 56520              }
 56521              popFont() {
 56522                this.stack.pop();
 56523              }
 56524              topFont() {
 56525                return this.stack.at(-1);
 56526              }
 56527            }
 56528            t.TextMeasure = class TextMeasure {
 56529              constructor(e, t, a, r) {
 56530                this.glyphs = [];
 56531                this.fontSelector = new FontSelector(e, t, a, r);
 56532                this.extraHeight = 0;
 56533              }
 56534              pushData(e, t, a) {
 56535                this.fontSelector.pushData(e, t, a);
 56536              }
 56537              popFont(e) {
 56538                return this.fontSelector.popFont();
 56539              }
 56540              addPara() {
 56541                const e = this.fontSelector.topFont();
 56542                this.extraHeight += e.paraMargin.top + e.paraMargin.bottom;
 56543              }
 56544              addString(e) {
 56545                if (!e) return;
 56546                const t = this.fontSelector.topFont(),
 56547                  a = t.xfaFont.size;
 56548                if (t.pdfFont) {
 56549                  const r = t.xfaFont.letterSpacing,
 56550                    n = t.pdfFont,
 56551                    i = n.lineHeight || 1.2,
 56552                    s = t.lineHeight || Math.max(1.2, i) * a,
 56553                    o = i - (void 0 === n.lineGap ? 0.2 : n.lineGap),
 56554                    c = Math.max(1, o) * a,
 56555                    l = a / 1e3,
 56556                    h = n.defaultWidth || n.charsToGlyphs(" ")[0].width;
 56557                  for (const t of e.split(/[\u2029\n]/)) {
 56558                    const e = n.encodeString(t).join(""),
 56559                      a = n.charsToGlyphs(e);
 56560                    for (const e of a) {
 56561                      const t = e.width || h;
 56562                      this.glyphs.push([t * l + r, s, c, e.unicode, !1]);
 56563                    }
 56564                    this.glyphs.push([0, 0, 0, "\n", !0]);
 56565                  }
 56566                  this.glyphs.pop();
 56567                } else {
 56568                  for (const t of e.split(/[\u2029\n]/)) {
 56569                    for (const e of t.split(""))
 56570                      this.glyphs.push([a, 1.2 * a, a, e, !1]);
 56571                    this.glyphs.push([0, 0, 0, "\n", !0]);
 56572                  }
 56573                  this.glyphs.pop();
 56574                }
 56575              }
 56576              compute(e) {
 56577                let t = -1,
 56578                  a = 0,
 56579                  r = 0,
 56580                  n = 0,
 56581                  i = 0,
 56582                  s = 0,
 56583                  o = !1,
 56584                  c = !0;
 56585                for (let l = 0, h = this.glyphs.length; l < h; l++) {
 56586                  const [h, u, d, f, g] = this.glyphs[l],
 56587                    p = " " === f,
 56588                    m = c ? d : u;
 56589                  if (g) {
 56590                    r = Math.max(r, i);
 56591                    i = 0;
 56592                    n += s;
 56593                    s = m;
 56594                    t = -1;
 56595                    a = 0;
 56596                    c = !1;
 56597                  } else if (p)
 56598                    if (i + h > e) {
 56599                      r = Math.max(r, i);
 56600                      i = 0;
 56601                      n += s;
 56602                      s = m;
 56603                      t = -1;
 56604                      a = 0;
 56605                      o = !0;
 56606                      c = !1;
 56607                    } else {
 56608                      s = Math.max(m, s);
 56609                      a = i;
 56610                      i += h;
 56611                      t = l;
 56612                    }
 56613                  else if (i + h > e) {
 56614                    n += s;
 56615                    s = m;
 56616                    if (-1 !== t) {
 56617                      l = t;
 56618                      r = Math.max(r, a);
 56619                      i = 0;
 56620                      t = -1;
 56621                      a = 0;
 56622                    } else {
 56623                      r = Math.max(r, i);
 56624                      i = h;
 56625                    }
 56626                    o = !0;
 56627                    c = !1;
 56628                  } else {
 56629                    i += h;
 56630                    s = Math.max(m, s);
 56631                  }
 56632                }
 56633                r = Math.max(r, i);
 56634                n += s + this.extraHeight;
 56635                return { width: 1.02 * r, height: n, isBroken: o };
 56636              }
 56637            };
 56638          },
 56639          (e, t, a) => {
 56640            Object.defineProperty(t, "__esModule", { value: !0 });
 56641            t.XmlObject =
 56642              t.XFAObjectArray =
 56643              t.XFAObject =
 56644              t.XFAAttribute =
 56645              t.StringObject =
 56646              t.OptionObject =
 56647              t.Option10 =
 56648              t.Option01 =
 56649              t.IntegerObject =
 56650              t.ContentObject =
 56651                void 0;
 56652            var r = a(78),
 56653              n = a(84),
 56654              i = a(2),
 56655              s = a(3),
 56656              o = a(81),
 56657              c = a(88);
 56658            const l = Symbol(),
 56659              h = Symbol(),
 56660              u = Symbol(),
 56661              d = Symbol("_children"),
 56662              f = Symbol(),
 56663              g = Symbol(),
 56664              p = Symbol(),
 56665              m = Symbol(),
 56666              b = Symbol(),
 56667              y = Symbol(),
 56668              w = Symbol(),
 56669              S = Symbol(),
 56670              x = Symbol(),
 56671              C = Symbol("parent"),
 56672              k = Symbol(),
 56673              v = Symbol(),
 56674              F = Symbol();
 56675            let O = 0;
 56676            const T = o.NamespaceIds.datasets.id;
 56677            class XFAObject {
 56678              constructor(e, t, a = !1) {
 56679                this[r.$namespaceId] = e;
 56680                this[r.$nodeName] = t;
 56681                this[w] = a;
 56682                this[C] = null;
 56683                this[d] = [];
 56684                this[r.$uid] = `${t}${O++}`;
 56685                this[r.$globalData] = null;
 56686              }
 56687              get isXFAObject() {
 56688                return !0;
 56689              }
 56690              get isXFAObjectArray() {
 56691                return !1;
 56692              }
 56693              createNodes(e) {
 56694                let t = this,
 56695                  a = null;
 56696                for (const { name: n, index: i } of e) {
 56697                  for (let e = 0, s = isFinite(i) ? i : 0; e <= s; e++) {
 56698                    const e = t[r.$namespaceId] === T ? -1 : t[r.$namespaceId];
 56699                    a = new XmlObject(e, n);
 56700                    t[r.$appendChild](a);
 56701                  }
 56702                  t = a;
 56703                }
 56704                return a;
 56705              }
 56706              [r.$onChild](e) {
 56707                if (!this[w] || !this[r.$onChildCheck](e)) return !1;
 56708                const t = e[r.$nodeName],
 56709                  a = this[t];
 56710                if (!(a instanceof XFAObjectArray)) {
 56711                  null !== a && this[r.$removeChild](a);
 56712                  this[t] = e;
 56713                  this[r.$appendChild](e);
 56714                  return !0;
 56715                }
 56716                if (a.push(e)) {
 56717                  this[r.$appendChild](e);
 56718                  return !0;
 56719                }
 56720                let n = "";
 56721                this.id
 56722                  ? (n = ` (id: ${this.id})`)
 56723                  : this.name && (n = ` (name: ${this.name} ${this.h.value})`);
 56724                (0, i.warn)(
 56725                  `XFA - node "${this[r.$nodeName]}"${n} has already enough "${t}"!`,
 56726                );
 56727                return !1;
 56728              }
 56729              [r.$onChildCheck](e) {
 56730                return (
 56731                  this.hasOwnProperty(e[r.$nodeName]) &&
 56732                  e[r.$namespaceId] === this[r.$namespaceId]
 56733                );
 56734              }
 56735              [r.$isNsAgnostic]() {
 56736                return !1;
 56737              }
 56738              [r.$acceptWhitespace]() {
 56739                return !1;
 56740              }
 56741              [r.$isCDATAXml]() {
 56742                return !1;
 56743              }
 56744              [r.$isBindable]() {
 56745                return !1;
 56746              }
 56747              [r.$popPara]() {
 56748                this.para && this[r.$getTemplateRoot]()[r.$extra].paraStack.pop();
 56749              }
 56750              [r.$pushPara]() {
 56751                this[r.$getTemplateRoot]()[r.$extra].paraStack.push(this.para);
 56752              }
 56753              [r.$setId](e) {
 56754                this.id &&
 56755                  this[r.$namespaceId] === o.NamespaceIds.template.id &&
 56756                  e.set(this.id, this);
 56757              }
 56758              [r.$getTemplateRoot]() {
 56759                return this[r.$globalData].template;
 56760              }
 56761              [r.$isSplittable]() {
 56762                return !1;
 56763              }
 56764              [r.$isThereMoreWidth]() {
 56765                return !1;
 56766              }
 56767              [r.$appendChild](e) {
 56768                e[C] = this;
 56769                this[d].push(e);
 56770                !e[r.$globalData] &&
 56771                  this[r.$globalData] &&
 56772                  (e[r.$globalData] = this[r.$globalData]);
 56773              }
 56774              [r.$removeChild](e) {
 56775                const t = this[d].indexOf(e);
 56776                this[d].splice(t, 1);
 56777              }
 56778              [r.$hasSettableValue]() {
 56779                return this.hasOwnProperty("value");
 56780              }
 56781              [r.$setValue](e) {}
 56782              [r.$onText](e) {}
 56783              [r.$finalize]() {}
 56784              [r.$clean](e) {
 56785                delete this[w];
 56786                if (this[r.$cleanup]) {
 56787                  e.clean(this[r.$cleanup]);
 56788                  delete this[r.$cleanup];
 56789                }
 56790              }
 56791              [r.$indexOf](e) {
 56792                return this[d].indexOf(e);
 56793              }
 56794              [r.$insertAt](e, t) {
 56795                t[C] = this;
 56796                this[d].splice(e, 0, t);
 56797                !t[r.$globalData] &&
 56798                  this[r.$globalData] &&
 56799                  (t[r.$globalData] = this[r.$globalData]);
 56800              }
 56801              [r.$isTransparent]() {
 56802                return !this.name;
 56803              }
 56804              [r.$lastAttribute]() {
 56805                return "";
 56806              }
 56807              [r.$text]() {
 56808                return 0 === this[d].length
 56809                  ? this[r.$content]
 56810                  : this[d].map((e) => e[r.$text]()).join("");
 56811              }
 56812              get [u]() {
 56813                const e = Object.getPrototypeOf(this);
 56814                if (!e._attributes) {
 56815                  const t = (e._attributes = new Set());
 56816                  for (const e of Object.getOwnPropertyNames(this)) {
 56817                    if (
 56818                      null === this[e] ||
 56819                      this[e] instanceof XFAObject ||
 56820                      this[e] instanceof XFAObjectArray
 56821                    )
 56822                      break;
 56823                    t.add(e);
 56824                  }
 56825                }
 56826                return (0, i.shadow)(this, u, e._attributes);
 56827              }
 56828              [r.$isDescendent](e) {
 56829                let t = this;
 56830                for (; t; ) {
 56831                  if (t === e) return !0;
 56832                  t = t[r.$getParent]();
 56833                }
 56834                return !1;
 56835              }
 56836              [r.$getParent]() {
 56837                return this[C];
 56838              }
 56839              [r.$getSubformParent]() {
 56840                return this[r.$getParent]();
 56841              }
 56842              [r.$getChildren](e = null) {
 56843                return e ? this[e] : this[d];
 56844              }
 56845              [r.$dump]() {
 56846                const e = Object.create(null);
 56847                this[r.$content] && (e.$content = this[r.$content]);
 56848                for (const t of Object.getOwnPropertyNames(this)) {
 56849                  const a = this[t];
 56850                  null !== a &&
 56851                    (a instanceof XFAObject
 56852                      ? (e[t] = a[r.$dump]())
 56853                      : a instanceof XFAObjectArray
 56854                        ? a.isEmpty() || (e[t] = a.dump())
 56855                        : (e[t] = a));
 56856                }
 56857                return e;
 56858              }
 56859              [r.$toStyle]() {
 56860                return null;
 56861              }
 56862              [r.$toHTML]() {
 56863                return n.HTMLResult.EMPTY;
 56864              }
 56865              *[r.$getContainedChildren]() {
 56866                for (const e of this[r.$getChildren]()) yield e;
 56867              }
 56868              *[m](e, t) {
 56869                for (const a of this[r.$getContainedChildren]())
 56870                  if (!e || t === e.has(a[r.$nodeName])) {
 56871                    const e = this[r.$getAvailableSpace](),
 56872                      t = a[r.$toHTML](e);
 56873                    t.success || (this[r.$extra].failingNode = a);
 56874                    yield t;
 56875                  }
 56876              }
 56877              [r.$flushHTML]() {
 56878                return null;
 56879              }
 56880              [r.$addHTML](e, t) {
 56881                this[r.$extra].children.push(e);
 56882              }
 56883              [r.$getAvailableSpace]() {}
 56884              [r.$childrenToHTML]({ filter: e = null, include: t = !0 }) {
 56885                if (this[r.$extra].generator) {
 56886                  const e = this[r.$getAvailableSpace](),
 56887                    t = this[r.$extra].failingNode[r.$toHTML](e);
 56888                  if (!t.success) return t;
 56889                  t.html && this[r.$addHTML](t.html, t.bbox);
 56890                  delete this[r.$extra].failingNode;
 56891                } else this[r.$extra].generator = this[m](e, t);
 56892                for (;;) {
 56893                  const e = this[r.$extra].generator.next();
 56894                  if (e.done) break;
 56895                  const t = e.value;
 56896                  if (!t.success) return t;
 56897                  t.html && this[r.$addHTML](t.html, t.bbox);
 56898                }
 56899                this[r.$extra].generator = null;
 56900                return n.HTMLResult.EMPTY;
 56901              }
 56902              [r.$setSetAttributes](e) {
 56903                this[v] = new Set(Object.keys(e));
 56904              }
 56905              [y](e) {
 56906                const t = this[u],
 56907                  a = this[v];
 56908                return [...e].filter((e) => t.has(e) && !a.has(e));
 56909              }
 56910              [r.$resolvePrototypes](e, t = new Set()) {
 56911                for (const a of this[d]) a[k](e, t);
 56912              }
 56913              [k](e, t) {
 56914                const a = this[b](e, t);
 56915                a ? this[l](a, e, t) : this[r.$resolvePrototypes](e, t);
 56916              }
 56917              [b](e, t) {
 56918                const { use: a, usehref: n } = this;
 56919                if (!a && !n) return null;
 56920                let s = null,
 56921                  o = null,
 56922                  h = null,
 56923                  u = a;
 56924                if (n) {
 56925                  u = n;
 56926                  n.startsWith("#som(") && n.endsWith(")")
 56927                    ? (o = n.slice(5, -1))
 56928                    : n.startsWith(".#som(") && n.endsWith(")")
 56929                      ? (o = n.slice(6, -1))
 56930                      : n.startsWith("#")
 56931                        ? (h = n.slice(1))
 56932                        : n.startsWith(".#") && (h = n.slice(2));
 56933                } else a.startsWith("#") ? (h = a.slice(1)) : (o = a);
 56934                this.use = this.usehref = "";
 56935                if (h) s = e.get(h);
 56936                else {
 56937                  s = (0, c.searchNode)(e.get(r.$root), this, o, !0, !1);
 56938                  s && (s = s[0]);
 56939                }
 56940                if (!s) {
 56941                  (0, i.warn)(`XFA - Invalid prototype reference: ${u}.`);
 56942                  return null;
 56943                }
 56944                if (s[r.$nodeName] !== this[r.$nodeName]) {
 56945                  (0, i.warn)(
 56946                    `XFA - Incompatible prototype: ${s[r.$nodeName]} !== ${this[r.$nodeName]}.`,
 56947                  );
 56948                  return null;
 56949                }
 56950                if (t.has(s)) {
 56951                  (0, i.warn)("XFA - Cycle detected in prototypes use.");
 56952                  return null;
 56953                }
 56954                t.add(s);
 56955                const d = s[b](e, t);
 56956                d && s[l](d, e, t);
 56957                s[r.$resolvePrototypes](e, t);
 56958                t.delete(s);
 56959                return s;
 56960              }
 56961              [l](e, t, a) {
 56962                if (a.has(e)) {
 56963                  (0, i.warn)("XFA - Cycle detected in prototypes use.");
 56964                  return;
 56965                }
 56966                !this[r.$content] &&
 56967                  e[r.$content] &&
 56968                  (this[r.$content] = e[r.$content]);
 56969                new Set(a).add(e);
 56970                for (const t of this[y](e[v])) {
 56971                  this[t] = e[t];
 56972                  this[v] && this[v].add(t);
 56973                }
 56974                for (const n of Object.getOwnPropertyNames(this)) {
 56975                  if (this[u].has(n)) continue;
 56976                  const i = this[n],
 56977                    s = e[n];
 56978                  if (i instanceof XFAObjectArray) {
 56979                    for (const e of i[d]) e[k](t, a);
 56980                    for (let n = i[d].length, o = s[d].length; n < o; n++) {
 56981                      const s = e[d][n][r.$clone]();
 56982                      if (!i.push(s)) break;
 56983                      s[C] = this;
 56984                      this[d].push(s);
 56985                      s[k](t, a);
 56986                    }
 56987                  } else if (null === i) {
 56988                    if (null !== s) {
 56989                      const e = s[r.$clone]();
 56990                      e[C] = this;
 56991                      this[n] = e;
 56992                      this[d].push(e);
 56993                      e[k](t, a);
 56994                    }
 56995                  } else {
 56996                    i[r.$resolvePrototypes](t, a);
 56997                    s && i[l](s, t, a);
 56998                  }
 56999                }
 57000              }
 57001              static [f](e) {
 57002                return Array.isArray(e)
 57003                  ? e.map((e) => XFAObject[f](e))
 57004                  : "object" == typeof e && null !== e
 57005                    ? Object.assign({}, e)
 57006                    : e;
 57007              }
 57008              [r.$clone]() {
 57009                const e = Object.create(Object.getPrototypeOf(this));
 57010                for (const t of Object.getOwnPropertySymbols(this))
 57011                  try {
 57012                    e[t] = this[t];
 57013                  } catch {
 57014                    (0, i.shadow)(e, t, this[t]);
 57015                  }
 57016                e[r.$uid] = `${e[r.$nodeName]}${O++}`;
 57017                e[d] = [];
 57018                for (const t of Object.getOwnPropertyNames(this)) {
 57019                  if (this[u].has(t)) {
 57020                    e[t] = XFAObject[f](this[t]);
 57021                    continue;
 57022                  }
 57023                  const a = this[t];
 57024                  e[t] =
 57025                    a instanceof XFAObjectArray ? new XFAObjectArray(a[S]) : null;
 57026                }
 57027                for (const t of this[d]) {
 57028                  const a = t[r.$nodeName],
 57029                    n = t[r.$clone]();
 57030                  e[d].push(n);
 57031                  n[C] = e;
 57032                  null === e[a] ? (e[a] = n) : e[a][d].push(n);
 57033                }
 57034                return e;
 57035              }
 57036              [r.$getChildren](e = null) {
 57037                return e ? this[d].filter((t) => t[r.$nodeName] === e) : this[d];
 57038              }
 57039              [r.$getChildrenByClass](e) {
 57040                return this[e];
 57041              }
 57042              [r.$getChildrenByName](e, t, a = !0) {
 57043                return Array.from(this[r.$getChildrenByNameIt](e, t, a));
 57044              }
 57045              *[r.$getChildrenByNameIt](e, t, a = !0) {
 57046                if ("parent" !== e) {
 57047                  for (const a of this[d]) {
 57048                    a[r.$nodeName] === e && (yield a);
 57049                    a.name === e && (yield a);
 57050                    (t || a[r.$isTransparent]()) &&
 57051                      (yield* a[r.$getChildrenByNameIt](e, t, !1));
 57052                  }
 57053                  a &&
 57054                    this[u].has(e) &&
 57055                    (yield new XFAAttribute(this, e, this[e]));
 57056                } else yield this[C];
 57057              }
 57058            }
 57059            t.XFAObject = XFAObject;
 57060            class XFAObjectArray {
 57061              constructor(e = 1 / 0) {
 57062                this[S] = e;
 57063                this[d] = [];
 57064              }
 57065              get isXFAObject() {
 57066                return !1;
 57067              }
 57068              get isXFAObjectArray() {
 57069                return !0;
 57070              }
 57071              push(e) {
 57072                if (this[d].length <= this[S]) {
 57073                  this[d].push(e);
 57074                  return !0;
 57075                }
 57076                (0, i.warn)(
 57077                  `XFA - node "${e[r.$nodeName]}" accepts no more than ${this[S]} children`,
 57078                );
 57079                return !1;
 57080              }
 57081              isEmpty() {
 57082                return 0 === this[d].length;
 57083              }
 57084              dump() {
 57085                return 1 === this[d].length
 57086                  ? this[d][0][r.$dump]()
 57087                  : this[d].map((e) => e[r.$dump]());
 57088              }
 57089              [r.$clone]() {
 57090                const e = new XFAObjectArray(this[S]);
 57091                e[d] = this[d].map((e) => e[r.$clone]());
 57092                return e;
 57093              }
 57094              get children() {
 57095                return this[d];
 57096              }
 57097              clear() {
 57098                this[d].length = 0;
 57099              }
 57100            }
 57101            t.XFAObjectArray = XFAObjectArray;
 57102            class XFAAttribute {
 57103              constructor(e, t, a) {
 57104                this[C] = e;
 57105                this[r.$nodeName] = t;
 57106                this[r.$content] = a;
 57107                this[r.$consumed] = !1;
 57108                this[r.$uid] = "attribute" + O++;
 57109              }
 57110              [r.$getParent]() {
 57111                return this[C];
 57112              }
 57113              [r.$isDataValue]() {
 57114                return !0;
 57115              }
 57116              [r.$getDataValue]() {
 57117                return this[r.$content].trim();
 57118              }
 57119              [r.$setValue](e) {
 57120                e = e.value || "";
 57121                this[r.$content] = e.toString();
 57122              }
 57123              [r.$text]() {
 57124                return this[r.$content];
 57125              }
 57126              [r.$isDescendent](e) {
 57127                return this[C] === e || this[C][r.$isDescendent](e);
 57128              }
 57129            }
 57130            t.XFAAttribute = XFAAttribute;
 57131            class XmlObject extends XFAObject {
 57132              constructor(e, t, a = {}) {
 57133                super(e, t);
 57134                this[r.$content] = "";
 57135                this[g] = null;
 57136                if ("#text" !== t) {
 57137                  const e = new Map();
 57138                  this[h] = e;
 57139                  for (const [t, r] of Object.entries(a))
 57140                    e.set(t, new XFAAttribute(this, t, r));
 57141                  if (a.hasOwnProperty(r.$nsAttributes)) {
 57142                    const e = a[r.$nsAttributes].xfa.dataNode;
 57143                    void 0 !== e &&
 57144                      ("dataGroup" === e
 57145                        ? (this[g] = !1)
 57146                        : "dataValue" === e && (this[g] = !0));
 57147                  }
 57148                }
 57149                this[r.$consumed] = !1;
 57150              }
 57151              [r.$toString](e) {
 57152                const t = this[r.$nodeName];
 57153                if ("#text" === t) {
 57154                  e.push((0, s.encodeToXmlString)(this[r.$content]));
 57155                  return;
 57156                }
 57157                const a = (0, i.utf8StringToString)(t),
 57158                  n = this[r.$namespaceId] === T ? "xfa:" : "";
 57159                e.push(`<${n}${a}`);
 57160                for (const [t, a] of this[h].entries()) {
 57161                  const n = (0, i.utf8StringToString)(t);
 57162                  e.push(` ${n}="${(0, s.encodeToXmlString)(a[r.$content])}"`);
 57163                }
 57164                null !== this[g] &&
 57165                  (this[g]
 57166                    ? e.push(' xfa:dataNode="dataValue"')
 57167                    : e.push(' xfa:dataNode="dataGroup"'));
 57168                if (this[r.$content] || 0 !== this[d].length) {
 57169                  e.push(">");
 57170                  if (this[r.$content])
 57171                    "string" == typeof this[r.$content]
 57172                      ? e.push((0, s.encodeToXmlString)(this[r.$content]))
 57173                      : this[r.$content][r.$toString](e);
 57174                  else for (const t of this[d]) t[r.$toString](e);
 57175                  e.push(`</${n}${a}>`);
 57176                } else e.push("/>");
 57177              }
 57178              [r.$onChild](e) {
 57179                if (this[r.$content]) {
 57180                  const e = new XmlObject(this[r.$namespaceId], "#text");
 57181                  this[r.$appendChild](e);
 57182                  e[r.$content] = this[r.$content];
 57183                  this[r.$content] = "";
 57184                }
 57185                this[r.$appendChild](e);
 57186                return !0;
 57187              }
 57188              [r.$onText](e) {
 57189                this[r.$content] += e;
 57190              }
 57191              [r.$finalize]() {
 57192                if (this[r.$content] && this[d].length > 0) {
 57193                  const e = new XmlObject(this[r.$namespaceId], "#text");
 57194                  this[r.$appendChild](e);
 57195                  e[r.$content] = this[r.$content];
 57196                  delete this[r.$content];
 57197                }
 57198              }
 57199              [r.$toHTML]() {
 57200                return "#text" === this[r.$nodeName]
 57201                  ? n.HTMLResult.success({
 57202                      name: "#text",
 57203                      value: this[r.$content],
 57204                    })
 57205                  : n.HTMLResult.EMPTY;
 57206              }
 57207              [r.$getChildren](e = null) {
 57208                return e ? this[d].filter((t) => t[r.$nodeName] === e) : this[d];
 57209              }
 57210              [r.$getAttributes]() {
 57211                return this[h];
 57212              }
 57213              [r.$getChildrenByClass](e) {
 57214                const t = this[h].get(e);
 57215                return void 0 !== t ? t : this[r.$getChildren](e);
 57216              }
 57217              *[r.$getChildrenByNameIt](e, t) {
 57218                const a = this[h].get(e);
 57219                a && (yield a);
 57220                for (const a of this[d]) {
 57221                  a[r.$nodeName] === e && (yield a);
 57222                  t && (yield* a[r.$getChildrenByNameIt](e, t));
 57223                }
 57224              }
 57225              *[r.$getAttributeIt](e, t) {
 57226                const a = this[h].get(e);
 57227                !a || (t && a[r.$consumed]) || (yield a);
 57228                for (const a of this[d]) yield* a[r.$getAttributeIt](e, t);
 57229              }
 57230              *[r.$getRealChildrenByNameIt](e, t, a) {
 57231                for (const n of this[d]) {
 57232                  n[r.$nodeName] !== e || (a && n[r.$consumed]) || (yield n);
 57233                  t && (yield* n[r.$getRealChildrenByNameIt](e, t, a));
 57234                }
 57235              }
 57236              [r.$isDataValue]() {
 57237                return null === this[g]
 57238                  ? 0 === this[d].length ||
 57239                      this[d][0][r.$namespaceId] === o.NamespaceIds.xhtml.id
 57240                  : this[g];
 57241              }
 57242              [r.$getDataValue]() {
 57243                return null === this[g]
 57244                  ? 0 === this[d].length
 57245                    ? this[r.$content].trim()
 57246                    : this[d][0][r.$namespaceId] === o.NamespaceIds.xhtml.id
 57247                      ? this[d][0][r.$text]().trim()
 57248                      : null
 57249                  : this[r.$content].trim();
 57250              }
 57251              [r.$setValue](e) {
 57252                e = e.value || "";
 57253                this[r.$content] = e.toString();
 57254              }
 57255              [r.$dump](e = !1) {
 57256                const t = Object.create(null);
 57257                e && (t.$ns = this[r.$namespaceId]);
 57258                this[r.$content] && (t.$content = this[r.$content]);
 57259                t.$name = this[r.$nodeName];
 57260                t.children = [];
 57261                for (const a of this[d]) t.children.push(a[r.$dump](e));
 57262                t.attributes = Object.create(null);
 57263                for (const [e, a] of this[h]) t.attributes[e] = a[r.$content];
 57264                return t;
 57265              }
 57266            }
 57267            t.XmlObject = XmlObject;
 57268            class ContentObject extends XFAObject {
 57269              constructor(e, t) {
 57270                super(e, t);
 57271                this[r.$content] = "";
 57272              }
 57273              [r.$onText](e) {
 57274                this[r.$content] += e;
 57275              }
 57276              [r.$finalize]() {}
 57277            }
 57278            t.ContentObject = ContentObject;
 57279            class OptionObject extends ContentObject {
 57280              constructor(e, t, a) {
 57281                super(e, t);
 57282                this[x] = a;
 57283              }
 57284              [r.$finalize]() {
 57285                this[r.$content] = (0, n.getKeyword)({
 57286                  data: this[r.$content],
 57287                  defaultValue: this[x][0],
 57288                  validate: (e) => this[x].includes(e),
 57289                });
 57290              }
 57291              [r.$clean](e) {
 57292                super[r.$clean](e);
 57293                delete this[x];
 57294              }
 57295            }
 57296            t.OptionObject = OptionObject;
 57297            class StringObject extends ContentObject {
 57298              [r.$finalize]() {
 57299                this[r.$content] = this[r.$content].trim();
 57300              }
 57301            }
 57302            t.StringObject = StringObject;
 57303            class IntegerObject extends ContentObject {
 57304              constructor(e, t, a, r) {
 57305                super(e, t);
 57306                this[p] = a;
 57307                this[F] = r;
 57308              }
 57309              [r.$finalize]() {
 57310                this[r.$content] = (0, n.getInteger)({
 57311                  data: this[r.$content],
 57312                  defaultValue: this[p],
 57313                  validate: this[F],
 57314                });
 57315              }
 57316              [r.$clean](e) {
 57317                super[r.$clean](e);
 57318                delete this[p];
 57319                delete this[F];
 57320              }
 57321            }
 57322            t.IntegerObject = IntegerObject;
 57323            t.Option01 = class Option01 extends IntegerObject {
 57324              constructor(e, t) {
 57325                super(e, t, 0, (e) => 1 === e);
 57326              }
 57327            };
 57328            t.Option10 = class Option10 extends IntegerObject {
 57329              constructor(e, t) {
 57330                super(e, t, 1, (e) => 0 === e);
 57331              }
 57332            };
 57333          },
 57334          (e, t, a) => {
 57335            Object.defineProperty(t, "__esModule", { value: !0 });
 57336            t.createDataNode = function createDataNode(e, t, a) {
 57337              const i = parseExpression(a);
 57338              if (!i) return null;
 57339              if (i.some((e) => e.operator === o.dotDot)) return null;
 57340              const s = c.get(i[0].name);
 57341              let l = 0;
 57342              if (s) {
 57343                e = s(e, t);
 57344                l = 1;
 57345              } else e = t || e;
 57346              for (let t = i.length; l < t; l++) {
 57347                const { name: t, operator: a, index: s } = i[l];
 57348                if (!isFinite(s)) {
 57349                  i[l].index = 0;
 57350                  return e.createNodes(i.slice(l));
 57351                }
 57352                let c;
 57353                switch (a) {
 57354                  case o.dot:
 57355                    c = e[r.$getChildrenByName](t, !1);
 57356                    break;
 57357                  case o.dotDot:
 57358                    c = e[r.$getChildrenByName](t, !0);
 57359                    break;
 57360                  case o.dotHash:
 57361                    c = e[r.$getChildrenByClass](t);
 57362                    c = c.isXFAObjectArray ? c.children : [c];
 57363                }
 57364                if (0 === c.length) return e.createNodes(i.slice(l));
 57365                if (!(s < c.length)) {
 57366                  i[l].index = s - c.length;
 57367                  return e.createNodes(i.slice(l));
 57368                }
 57369                {
 57370                  const t = c[s];
 57371                  if (!t.isXFAObject) {
 57372                    (0, n.warn)("XFA - Cannot create a node.");
 57373                    return null;
 57374                  }
 57375                  e = t;
 57376                }
 57377              }
 57378              return null;
 57379            };
 57380            t.searchNode = function searchNode(e, t, a, n = !0, i = !0) {
 57381              const s = parseExpression(a, n);
 57382              if (!s) return null;
 57383              const h = c.get(s[0].name);
 57384              let u,
 57385                d = 0;
 57386              if (h) {
 57387                u = !0;
 57388                e = [h(e, t)];
 57389                d = 1;
 57390              } else {
 57391                u = null === t;
 57392                e = [t || e];
 57393              }
 57394              for (let a = s.length; d < a; d++) {
 57395                const { name: a, cacheName: n, operator: c, index: h } = s[d],
 57396                  f = [];
 57397                for (const t of e) {
 57398                  if (!t.isXFAObject) continue;
 57399                  let e, s;
 57400                  if (i) {
 57401                    s = l.get(t);
 57402                    if (!s) {
 57403                      s = new Map();
 57404                      l.set(t, s);
 57405                    }
 57406                    e = s.get(n);
 57407                  }
 57408                  if (!e) {
 57409                    switch (c) {
 57410                      case o.dot:
 57411                        e = t[r.$getChildrenByName](a, !1);
 57412                        break;
 57413                      case o.dotDot:
 57414                        e = t[r.$getChildrenByName](a, !0);
 57415                        break;
 57416                      case o.dotHash:
 57417                        e = t[r.$getChildrenByClass](a);
 57418                        e = e.isXFAObjectArray ? e.children : [e];
 57419                    }
 57420                    i && s.set(n, e);
 57421                  }
 57422                  e.length > 0 && f.push(e);
 57423                }
 57424                if (0 !== f.length || u || 0 !== d)
 57425                  e = isFinite(h)
 57426                    ? f.filter((e) => h < e.length).map((e) => e[h])
 57427                    : f.flat();
 57428                else {
 57429                  const a = t[r.$getParent]();
 57430                  if (!(t = a)) return null;
 57431                  d = -1;
 57432                  e = [t];
 57433                }
 57434              }
 57435              if (0 === e.length) return null;
 57436              return e;
 57437            };
 57438            var r = a(78),
 57439              n = a(2);
 57440            const i = /^[^.[]+/,
 57441              s = /^[^\]]+/,
 57442              o = { dot: 0, dotDot: 1, dotHash: 2, dotBracket: 3, dotParen: 4 },
 57443              c = new Map([
 57444                ["$data", (e, t) => (e.datasets ? e.datasets.data : e)],
 57445                [
 57446                  "$record",
 57447                  (e, t) =>
 57448                    (e.datasets ? e.datasets.data : e)[r.$getChildren]()[0],
 57449                ],
 57450                ["$template", (e, t) => e.template],
 57451                ["$connectionSet", (e, t) => e.connectionSet],
 57452                ["$form", (e, t) => e.form],
 57453                ["$layout", (e, t) => e.layout],
 57454                ["$host", (e, t) => e.host],
 57455                ["$dataWindow", (e, t) => e.dataWindow],
 57456                ["$event", (e, t) => e.event],
 57457                ["!", (e, t) => e.datasets],
 57458                ["$xfa", (e, t) => e],
 57459                ["xfa", (e, t) => e],
 57460                ["$", (e, t) => t],
 57461              ]),
 57462              l = new WeakMap();
 57463            function parseExpression(e, t, a = !0) {
 57464              let r = e.match(i);
 57465              if (!r) return null;
 57466              let [c] = r;
 57467              const l = [
 57468                {
 57469                  name: c,
 57470                  cacheName: "." + c,
 57471                  index: 0,
 57472                  js: null,
 57473                  formCalc: null,
 57474                  operator: o.dot,
 57475                },
 57476              ];
 57477              let h = c.length;
 57478              for (; h < e.length; ) {
 57479                const d = h;
 57480                if ("[" === e.charAt(h++)) {
 57481                  r = e.slice(h).match(s);
 57482                  if (!r) {
 57483                    (0, n.warn)("XFA - Invalid index in SOM expression");
 57484                    return null;
 57485                  }
 57486                  l.at(-1).index =
 57487                    "*" === (u = (u = r[0]).trim())
 57488                      ? 1 / 0
 57489                      : parseInt(u, 10) || 0;
 57490                  h += r[0].length + 1;
 57491                  continue;
 57492                }
 57493                let f;
 57494                switch (e.charAt(h)) {
 57495                  case ".":
 57496                    if (!t) return null;
 57497                    h++;
 57498                    f = o.dotDot;
 57499                    break;
 57500                  case "#":
 57501                    h++;
 57502                    f = o.dotHash;
 57503                    break;
 57504                  case "[":
 57505                    if (a) {
 57506                      (0, n.warn)(
 57507                        "XFA - SOM expression contains a FormCalc subexpression which is not supported for now.",
 57508                      );
 57509                      return null;
 57510                    }
 57511                    f = o.dotBracket;
 57512                    break;
 57513                  case "(":
 57514                    if (a) {
 57515                      (0, n.warn)(
 57516                        "XFA - SOM expression contains a JavaScript subexpression which is not supported for now.",
 57517                      );
 57518                      return null;
 57519                    }
 57520                    f = o.dotParen;
 57521                    break;
 57522                  default:
 57523                    f = o.dot;
 57524                }
 57525                r = e.slice(h).match(i);
 57526                if (!r) break;
 57527                [c] = r;
 57528                h += c.length;
 57529                l.push({
 57530                  name: c,
 57531                  cacheName: e.slice(d, h),
 57532                  operator: f,
 57533                  index: 0,
 57534                  js: null,
 57535                  formCalc: null,
 57536                });
 57537              }
 57538              var u;
 57539              return l;
 57540            }
 57541          },
 57542          (e, t, a) => {
 57543            Object.defineProperty(t, "__esModule", { value: !0 });
 57544            t.DataHandler = void 0;
 57545            var r = a(78);
 57546            t.DataHandler = class DataHandler {
 57547              constructor(e, t) {
 57548                this.data = t;
 57549                this.dataset = e.datasets || null;
 57550              }
 57551              serialize(e) {
 57552                const t = [[-1, this.data[r.$getChildren]()]];
 57553                for (; t.length > 0; ) {
 57554                  const a = t.at(-1),
 57555                    [n, i] = a;
 57556                  if (n + 1 === i.length) {
 57557                    t.pop();
 57558                    continue;
 57559                  }
 57560                  const s = i[++a[0]],
 57561                    o = e.get(s[r.$uid]);
 57562                  if (o) s[r.$setValue](o);
 57563                  else {
 57564                    const t = s[r.$getAttributes]();
 57565                    for (const a of t.values()) {
 57566                      const t = e.get(a[r.$uid]);
 57567                      if (t) {
 57568                        a[r.$setValue](t);
 57569                        break;
 57570                      }
 57571                    }
 57572                  }
 57573                  const c = s[r.$getChildren]();
 57574                  c.length > 0 && t.push([-1, c]);
 57575                }
 57576                const a = [
 57577                  '<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">',
 57578                ];
 57579                if (this.dataset)
 57580                  for (const e of this.dataset[r.$getChildren]())
 57581                    "data" !== e[r.$nodeName] && e[r.$toString](a);
 57582                this.data[r.$toString](a);
 57583                a.push("</xfa:datasets>");
 57584                return a.join("");
 57585              }
 57586            };
 57587          },
 57588          (e, t, a) => {
 57589            Object.defineProperty(t, "__esModule", { value: !0 });
 57590            t.XFAParser = void 0;
 57591            var r = a(78),
 57592              n = a(71),
 57593              i = a(91),
 57594              s = a(2);
 57595            class XFAParser extends n.XMLParserBase {
 57596              constructor(e = null, t = !1) {
 57597                super();
 57598                this._builder = new i.Builder(e);
 57599                this._stack = [];
 57600                this._globalData = { usedTypefaces: new Set() };
 57601                this._ids = new Map();
 57602                this._current = this._builder.buildRoot(this._ids);
 57603                this._errorCode = n.XMLParserErrorCode.NoError;
 57604                this._whiteRegex = /^\s+$/;
 57605                this._nbsps = /\xa0+/g;
 57606                this._richText = t;
 57607              }
 57608              parse(e) {
 57609                this.parseXml(e);
 57610                if (this._errorCode === n.XMLParserErrorCode.NoError) {
 57611                  this._current[r.$finalize]();
 57612                  return this._current.element;
 57613                }
 57614              }
 57615              onText(e) {
 57616                e = e.replace(this._nbsps, (e) => e.slice(1) + " ");
 57617                this._richText || this._current[r.$acceptWhitespace]()
 57618                  ? this._current[r.$onText](e, this._richText)
 57619                  : this._whiteRegex.test(e) ||
 57620                    this._current[r.$onText](e.trim());
 57621              }
 57622              onCdata(e) {
 57623                this._current[r.$onText](e);
 57624              }
 57625              _mkAttributes(e, t) {
 57626                let a = null,
 57627                  n = null;
 57628                const i = Object.create({});
 57629                for (const { name: o, value: c } of e)
 57630                  if ("xmlns" === o)
 57631                    a
 57632                      ? (0, s.warn)(
 57633                          `XFA - multiple namespace definition in <${t}>`,
 57634                        )
 57635                      : (a = c);
 57636                  else if (o.startsWith("xmlns:")) {
 57637                    const e = o.substring(6);
 57638                    n || (n = []);
 57639                    n.push({ prefix: e, value: c });
 57640                  } else {
 57641                    const e = o.indexOf(":");
 57642                    if (-1 === e) i[o] = c;
 57643                    else {
 57644                      let t = i[r.$nsAttributes];
 57645                      t || (t = i[r.$nsAttributes] = Object.create(null));
 57646                      const [a, n] = [o.slice(0, e), o.slice(e + 1)];
 57647                      (t[a] ||= Object.create(null))[n] = c;
 57648                    }
 57649                  }
 57650                return [a, n, i];
 57651              }
 57652              _getNameAndPrefix(e, t) {
 57653                const a = e.indexOf(":");
 57654                return -1 === a
 57655                  ? [e, null]
 57656                  : [e.substring(a + 1), t ? "" : e.substring(0, a)];
 57657              }
 57658              onBeginElement(e, t, a) {
 57659                const [n, i, s] = this._mkAttributes(t, e),
 57660                  [o, c] = this._getNameAndPrefix(
 57661                    e,
 57662                    this._builder.isNsAgnostic(),
 57663                  ),
 57664                  l = this._builder.build({
 57665                    nsPrefix: c,
 57666                    name: o,
 57667                    attributes: s,
 57668                    namespace: n,
 57669                    prefixes: i,
 57670                  });
 57671                l[r.$globalData] = this._globalData;
 57672                if (a) {
 57673                  l[r.$finalize]();
 57674                  this._current[r.$onChild](l) && l[r.$setId](this._ids);
 57675                  l[r.$clean](this._builder);
 57676                } else {
 57677                  this._stack.push(this._current);
 57678                  this._current = l;
 57679                }
 57680              }
 57681              onEndElement(e) {
 57682                const t = this._current;
 57683                if (t[r.$isCDATAXml]() && "string" == typeof t[r.$content]) {
 57684                  const e = new XFAParser();
 57685                  e._globalData = this._globalData;
 57686                  const a = e.parse(t[r.$content]);
 57687                  t[r.$content] = null;
 57688                  t[r.$onChild](a);
 57689                }
 57690                t[r.$finalize]();
 57691                this._current = this._stack.pop();
 57692                this._current[r.$onChild](t) && t[r.$setId](this._ids);
 57693                t[r.$clean](this._builder);
 57694              }
 57695              onError(e) {
 57696                this._errorCode = e;
 57697              }
 57698            }
 57699            t.XFAParser = XFAParser;
 57700          },
 57701          (e, t, a) => {
 57702            Object.defineProperty(t, "__esModule", { value: !0 });
 57703            t.Builder = void 0;
 57704            var r = a(81),
 57705              n = a(78),
 57706              i = a(92),
 57707              s = a(80),
 57708              o = a(101),
 57709              c = a(2),
 57710              l = a(87);
 57711            class Root extends l.XFAObject {
 57712              constructor(e) {
 57713                super(-1, "root", Object.create(null));
 57714                this.element = null;
 57715                this[n.$ids] = e;
 57716              }
 57717              [n.$onChild](e) {
 57718                this.element = e;
 57719                return !0;
 57720              }
 57721              [n.$finalize]() {
 57722                super[n.$finalize]();
 57723                if (this.element.template instanceof s.Template) {
 57724                  this[n.$ids].set(n.$root, this.element);
 57725                  this.element.template[n.$resolvePrototypes](this[n.$ids]);
 57726                  this.element.template[n.$ids] = this[n.$ids];
 57727                }
 57728              }
 57729            }
 57730            class Empty extends l.XFAObject {
 57731              constructor() {
 57732                super(-1, "", Object.create(null));
 57733              }
 57734              [n.$onChild](e) {
 57735                return !1;
 57736              }
 57737            }
 57738            t.Builder = class Builder {
 57739              constructor(e = null) {
 57740                this._namespaceStack = [];
 57741                this._nsAgnosticLevel = 0;
 57742                this._namespacePrefixes = new Map();
 57743                this._namespaces = new Map();
 57744                this._nextNsId = Math.max(
 57745                  ...Object.values(r.NamespaceIds).map(({ id: e }) => e),
 57746                );
 57747                this._currentNamespace =
 57748                  e || new o.UnknownNamespace(++this._nextNsId);
 57749              }
 57750              buildRoot(e) {
 57751                return new Root(e);
 57752              }
 57753              build({
 57754                nsPrefix: e,
 57755                name: t,
 57756                attributes: a,
 57757                namespace: s,
 57758                prefixes: o,
 57759              }) {
 57760                const c = null !== s;
 57761                if (c) {
 57762                  this._namespaceStack.push(this._currentNamespace);
 57763                  this._currentNamespace = this._searchNamespace(s);
 57764                }
 57765                o && this._addNamespacePrefix(o);
 57766                if (a.hasOwnProperty(n.$nsAttributes)) {
 57767                  const e = i.NamespaceSetUp.datasets,
 57768                    t = a[n.$nsAttributes];
 57769                  let r = null;
 57770                  for (const [a, n] of Object.entries(t)) {
 57771                    if (this._getNamespaceToUse(a) === e) {
 57772                      r = { xfa: n };
 57773                      break;
 57774                    }
 57775                  }
 57776                  r ? (a[n.$nsAttributes] = r) : delete a[n.$nsAttributes];
 57777                }
 57778                const l = this._getNamespaceToUse(e),
 57779                  h = l?.[r.$buildXFAObject](t, a) || new Empty();
 57780                h[n.$isNsAgnostic]() && this._nsAgnosticLevel++;
 57781                (c || o || h[n.$isNsAgnostic]()) &&
 57782                  (h[n.$cleanup] = {
 57783                    hasNamespace: c,
 57784                    prefixes: o,
 57785                    nsAgnostic: h[n.$isNsAgnostic](),
 57786                  });
 57787                return h;
 57788              }
 57789              isNsAgnostic() {
 57790                return this._nsAgnosticLevel > 0;
 57791              }
 57792              _searchNamespace(e) {
 57793                let t = this._namespaces.get(e);
 57794                if (t) return t;
 57795                for (const [a, { check: n }] of Object.entries(r.NamespaceIds))
 57796                  if (n(e)) {
 57797                    t = i.NamespaceSetUp[a];
 57798                    if (t) {
 57799                      this._namespaces.set(e, t);
 57800                      return t;
 57801                    }
 57802                    break;
 57803                  }
 57804                t = new o.UnknownNamespace(++this._nextNsId);
 57805                this._namespaces.set(e, t);
 57806                return t;
 57807              }
 57808              _addNamespacePrefix(e) {
 57809                for (const { prefix: t, value: a } of e) {
 57810                  const e = this._searchNamespace(a);
 57811                  let r = this._namespacePrefixes.get(t);
 57812                  if (!r) {
 57813                    r = [];
 57814                    this._namespacePrefixes.set(t, r);
 57815                  }
 57816                  r.push(e);
 57817                }
 57818              }
 57819              _getNamespaceToUse(e) {
 57820                if (!e) return this._currentNamespace;
 57821                const t = this._namespacePrefixes.get(e);
 57822                if (t?.length > 0) return t.at(-1);
 57823                (0, c.warn)(`Unknown namespace prefix: ${e}.`);
 57824                return null;
 57825              }
 57826              clean(e) {
 57827                const { hasNamespace: t, prefixes: a, nsAgnostic: r } = e;
 57828                t && (this._currentNamespace = this._namespaceStack.pop());
 57829                a &&
 57830                  a.forEach(({ prefix: e }) => {
 57831                    this._namespacePrefixes.get(e).pop();
 57832                  });
 57833                r && this._nsAgnosticLevel--;
 57834              }
 57835            };
 57836          },
 57837          (e, t, a) => {
 57838            Object.defineProperty(t, "__esModule", { value: !0 });
 57839            t.NamespaceSetUp = void 0;
 57840            var r = a(93),
 57841              n = a(94),
 57842              i = a(95),
 57843              s = a(96),
 57844              o = a(97),
 57845              c = a(98),
 57846              l = a(80),
 57847              h = a(99),
 57848              u = a(100);
 57849            const d = {
 57850              config: r.ConfigNamespace,
 57851              connection: n.ConnectionSetNamespace,
 57852              datasets: i.DatasetsNamespace,
 57853              localeSet: s.LocaleSetNamespace,
 57854              signature: o.SignatureNamespace,
 57855              stylesheet: c.StylesheetNamespace,
 57856              template: l.TemplateNamespace,
 57857              xdp: h.XdpNamespace,
 57858              xhtml: u.XhtmlNamespace,
 57859            };
 57860            t.NamespaceSetUp = d;
 57861          },
 57862          (e, t, a) => {
 57863            Object.defineProperty(t, "__esModule", { value: !0 });
 57864            t.ConfigNamespace = void 0;
 57865            var r = a(81),
 57866              n = a(78),
 57867              i = a(87),
 57868              s = a(84),
 57869              o = a(2);
 57870            const c = r.NamespaceIds.config.id;
 57871            class Acrobat extends i.XFAObject {
 57872              constructor(e) {
 57873                super(c, "acrobat", !0);
 57874                this.acrobat7 = null;
 57875                this.autoSave = null;
 57876                this.common = null;
 57877                this.validate = null;
 57878                this.validateApprovalSignatures = null;
 57879                this.submitUrl = new i.XFAObjectArray();
 57880              }
 57881            }
 57882            class Acrobat7 extends i.XFAObject {
 57883              constructor(e) {
 57884                super(c, "acrobat7", !0);
 57885                this.dynamicRender = null;
 57886              }
 57887            }
 57888            class ADBE_JSConsole extends i.OptionObject {
 57889              constructor(e) {
 57890                super(c, "ADBE_JSConsole", ["delegate", "Enable", "Disable"]);
 57891              }
 57892            }
 57893            class ADBE_JSDebugger extends i.OptionObject {
 57894              constructor(e) {
 57895                super(c, "ADBE_JSDebugger", ["delegate", "Enable", "Disable"]);
 57896              }
 57897            }
 57898            class AddSilentPrint extends i.Option01 {
 57899              constructor(e) {
 57900                super(c, "addSilentPrint");
 57901              }
 57902            }
 57903            class AddViewerPreferences extends i.Option01 {
 57904              constructor(e) {
 57905                super(c, "addViewerPreferences");
 57906              }
 57907            }
 57908            class AdjustData extends i.Option10 {
 57909              constructor(e) {
 57910                super(c, "adjustData");
 57911              }
 57912            }
 57913            class AdobeExtensionLevel extends i.IntegerObject {
 57914              constructor(e) {
 57915                super(c, "adobeExtensionLevel", 0, (e) => e >= 1 && e <= 8);
 57916              }
 57917            }
 57918            class Agent extends i.XFAObject {
 57919              constructor(e) {
 57920                super(c, "agent", !0);
 57921                this.name = e.name ? e.name.trim() : "";
 57922                this.common = new i.XFAObjectArray();
 57923              }
 57924            }
 57925            class AlwaysEmbed extends i.ContentObject {
 57926              constructor(e) {
 57927                super(c, "alwaysEmbed");
 57928              }
 57929            }
 57930            class Amd extends i.StringObject {
 57931              constructor(e) {
 57932                super(c, "amd");
 57933              }
 57934            }
 57935            class Area extends i.XFAObject {
 57936              constructor(e) {
 57937                super(c, "area");
 57938                this.level = (0, s.getInteger)({
 57939                  data: e.level,
 57940                  defaultValue: 0,
 57941                  validate: (e) => e >= 1 && e <= 3,
 57942                });
 57943                this.name = (0, s.getStringOption)(e.name, [
 57944                  "",
 57945                  "barcode",
 57946                  "coreinit",
 57947                  "deviceDriver",
 57948                  "font",
 57949                  "general",
 57950                  "layout",
 57951                  "merge",
 57952                  "script",
 57953                  "signature",
 57954                  "sourceSet",
 57955                  "templateCache",
 57956                ]);
 57957              }
 57958            }
 57959            class Attributes extends i.OptionObject {
 57960              constructor(e) {
 57961                super(c, "attributes", ["preserve", "delegate", "ignore"]);
 57962              }
 57963            }
 57964            class AutoSave extends i.OptionObject {
 57965              constructor(e) {
 57966                super(c, "autoSave", ["disabled", "enabled"]);
 57967              }
 57968            }
 57969            class Base extends i.StringObject {
 57970              constructor(e) {
 57971                super(c, "base");
 57972              }
 57973            }
 57974            class BatchOutput extends i.XFAObject {
 57975              constructor(e) {
 57976                super(c, "batchOutput");
 57977                this.format = (0, s.getStringOption)(e.format, [
 57978                  "none",
 57979                  "concat",
 57980                  "zip",
 57981                  "zipCompress",
 57982                ]);
 57983              }
 57984            }
 57985            class BehaviorOverride extends i.ContentObject {
 57986              constructor(e) {
 57987                super(c, "behaviorOverride");
 57988              }
 57989              [n.$finalize]() {
 57990                this[n.$content] = new Map(
 57991                  this[n.$content]
 57992                    .trim()
 57993                    .split(/\s+/)
 57994                    .filter((e) => e.includes(":"))
 57995                    .map((e) => e.split(":", 2)),
 57996                );
 57997              }
 57998            }
 57999            class Cache extends i.XFAObject {
 58000              constructor(e) {
 58001                super(c, "cache", !0);
 58002                this.templateCache = null;
 58003              }
 58004            }
 58005            class Change extends i.Option01 {
 58006              constructor(e) {
 58007                super(c, "change");
 58008              }
 58009            }
 58010            class Common extends i.XFAObject {
 58011              constructor(e) {
 58012                super(c, "common", !0);
 58013                this.data = null;
 58014                this.locale = null;
 58015                this.localeSet = null;
 58016                this.messaging = null;
 58017                this.suppressBanner = null;
 58018                this.template = null;
 58019                this.validationMessaging = null;
 58020                this.versionControl = null;
 58021                this.log = new i.XFAObjectArray();
 58022              }
 58023            }
 58024            class Compress extends i.XFAObject {
 58025              constructor(e) {
 58026                super(c, "compress");
 58027                this.scope = (0, s.getStringOption)(e.scope, [
 58028                  "imageOnly",
 58029                  "document",
 58030                ]);
 58031              }
 58032            }
 58033            class CompressLogicalStructure extends i.Option01 {
 58034              constructor(e) {
 58035                super(c, "compressLogicalStructure");
 58036              }
 58037            }
 58038            class CompressObjectStream extends i.Option10 {
 58039              constructor(e) {
 58040                super(c, "compressObjectStream");
 58041              }
 58042            }
 58043            class Compression extends i.XFAObject {
 58044              constructor(e) {
 58045                super(c, "compression", !0);
 58046                this.compressLogicalStructure = null;
 58047                this.compressObjectStream = null;
 58048                this.level = null;
 58049                this.type = null;
 58050              }
 58051            }
 58052            class Config extends i.XFAObject {
 58053              constructor(e) {
 58054                super(c, "config", !0);
 58055                this.acrobat = null;
 58056                this.present = null;
 58057                this.trace = null;
 58058                this.agent = new i.XFAObjectArray();
 58059              }
 58060            }
 58061            class Conformance extends i.OptionObject {
 58062              constructor(e) {
 58063                super(c, "conformance", ["A", "B"]);
 58064              }
 58065            }
 58066            class ContentCopy extends i.Option01 {
 58067              constructor(e) {
 58068                super(c, "contentCopy");
 58069              }
 58070            }
 58071            class Copies extends i.IntegerObject {
 58072              constructor(e) {
 58073                super(c, "copies", 1, (e) => e >= 1);
 58074              }
 58075            }
 58076            class Creator extends i.StringObject {
 58077              constructor(e) {
 58078                super(c, "creator");
 58079              }
 58080            }
 58081            class CurrentPage extends i.IntegerObject {
 58082              constructor(e) {
 58083                super(c, "currentPage", 0, (e) => e >= 0);
 58084              }
 58085            }
 58086            class Data extends i.XFAObject {
 58087              constructor(e) {
 58088                super(c, "data", !0);
 58089                this.adjustData = null;
 58090                this.attributes = null;
 58091                this.incrementalLoad = null;
 58092                this.outputXSL = null;
 58093                this.range = null;
 58094                this.record = null;
 58095                this.startNode = null;
 58096                this.uri = null;
 58097                this.window = null;
 58098                this.xsl = null;
 58099                this.excludeNS = new i.XFAObjectArray();
 58100                this.transform = new i.XFAObjectArray();
 58101              }
 58102            }
 58103            class Debug extends i.XFAObject {
 58104              constructor(e) {
 58105                super(c, "debug", !0);
 58106                this.uri = null;
 58107              }
 58108            }
 58109            class DefaultTypeface extends i.ContentObject {
 58110              constructor(e) {
 58111                super(c, "defaultTypeface");
 58112                this.writingScript = (0, s.getStringOption)(e.writingScript, [
 58113                  "*",
 58114                  "Arabic",
 58115                  "Cyrillic",
 58116                  "EastEuropeanRoman",
 58117                  "Greek",
 58118                  "Hebrew",
 58119                  "Japanese",
 58120                  "Korean",
 58121                  "Roman",
 58122                  "SimplifiedChinese",
 58123                  "Thai",
 58124                  "TraditionalChinese",
 58125                  "Vietnamese",
 58126                ]);
 58127              }
 58128            }
 58129            class Destination extends i.OptionObject {
 58130              constructor(e) {
 58131                super(c, "destination", ["pdf", "pcl", "ps", "webClient", "zpl"]);
 58132              }
 58133            }
 58134            class DocumentAssembly extends i.Option01 {
 58135              constructor(e) {
 58136                super(c, "documentAssembly");
 58137              }
 58138            }
 58139            class Driver extends i.XFAObject {
 58140              constructor(e) {
 58141                super(c, "driver", !0);
 58142                this.name = e.name ? e.name.trim() : "";
 58143                this.fontInfo = null;
 58144                this.xdc = null;
 58145              }
 58146            }
 58147            class DuplexOption extends i.OptionObject {
 58148              constructor(e) {
 58149                super(c, "duplexOption", [
 58150                  "simplex",
 58151                  "duplexFlipLongEdge",
 58152                  "duplexFlipShortEdge",
 58153                ]);
 58154              }
 58155            }
 58156            class DynamicRender extends i.OptionObject {
 58157              constructor(e) {
 58158                super(c, "dynamicRender", ["forbidden", "required"]);
 58159              }
 58160            }
 58161            class Embed extends i.Option01 {
 58162              constructor(e) {
 58163                super(c, "embed");
 58164              }
 58165            }
 58166            class Encrypt extends i.Option01 {
 58167              constructor(e) {
 58168                super(c, "encrypt");
 58169              }
 58170            }
 58171            class Encryption extends i.XFAObject {
 58172              constructor(e) {
 58173                super(c, "encryption", !0);
 58174                this.encrypt = null;
 58175                this.encryptionLevel = null;
 58176                this.permissions = null;
 58177              }
 58178            }
 58179            class EncryptionLevel extends i.OptionObject {
 58180              constructor(e) {
 58181                super(c, "encryptionLevel", ["40bit", "128bit"]);
 58182              }
 58183            }
 58184            class Enforce extends i.StringObject {
 58185              constructor(e) {
 58186                super(c, "enforce");
 58187              }
 58188            }
 58189            class Equate extends i.XFAObject {
 58190              constructor(e) {
 58191                super(c, "equate");
 58192                this.force = (0, s.getInteger)({
 58193                  data: e.force,
 58194                  defaultValue: 1,
 58195                  validate: (e) => 0 === e,
 58196                });
 58197                this.from = e.from || "";
 58198                this.to = e.to || "";
 58199              }
 58200            }
 58201            class EquateRange extends i.XFAObject {
 58202              constructor(e) {
 58203                super(c, "equateRange");
 58204                this.from = e.from || "";
 58205                this.to = e.to || "";
 58206                this._unicodeRange = e.unicodeRange || "";
 58207              }
 58208              get unicodeRange() {
 58209                const e = [],
 58210                  t = /U\+([0-9a-fA-F]+)/,
 58211                  a = this._unicodeRange;
 58212                for (let r of a
 58213                  .split(",")
 58214                  .map((e) => e.trim())
 58215                  .filter((e) => !!e)) {
 58216                  r = r.split("-", 2).map((e) => {
 58217                    const a = e.match(t);
 58218                    return a ? parseInt(a[1], 16) : 0;
 58219                  });
 58220                  1 === r.length && r.push(r[0]);
 58221                  e.push(r);
 58222                }
 58223                return (0, o.shadow)(this, "unicodeRange", e);
 58224              }
 58225            }
 58226            class Exclude extends i.ContentObject {
 58227              constructor(e) {
 58228                super(c, "exclude");
 58229              }
 58230              [n.$finalize]() {
 58231                this[n.$content] = this[n.$content]
 58232                  .trim()
 58233                  .split(/\s+/)
 58234                  .filter(
 58235                    (e) =>
 58236                      e &&
 58237                      [
 58238                        "calculate",
 58239                        "close",
 58240                        "enter",
 58241                        "exit",
 58242                        "initialize",
 58243                        "ready",
 58244                        "validate",
 58245                      ].includes(e),
 58246                  );
 58247              }
 58248            }
 58249            class ExcludeNS extends i.StringObject {
 58250              constructor(e) {
 58251                super(c, "excludeNS");
 58252              }
 58253            }
 58254            class FlipLabel extends i.OptionObject {
 58255              constructor(e) {
 58256                super(c, "flipLabel", ["usePrinterSetting", "on", "off"]);
 58257              }
 58258            }
 58259            class FontInfo extends i.XFAObject {
 58260              constructor(e) {
 58261                super(c, "fontInfo", !0);
 58262                this.embed = null;
 58263                this.map = null;
 58264                this.subsetBelow = null;
 58265                this.alwaysEmbed = new i.XFAObjectArray();
 58266                this.defaultTypeface = new i.XFAObjectArray();
 58267                this.neverEmbed = new i.XFAObjectArray();
 58268              }
 58269            }
 58270            class FormFieldFilling extends i.Option01 {
 58271              constructor(e) {
 58272                super(c, "formFieldFilling");
 58273              }
 58274            }
 58275            class GroupParent extends i.StringObject {
 58276              constructor(e) {
 58277                super(c, "groupParent");
 58278              }
 58279            }
 58280            class IfEmpty extends i.OptionObject {
 58281              constructor(e) {
 58282                super(c, "ifEmpty", [
 58283                  "dataValue",
 58284                  "dataGroup",
 58285                  "ignore",
 58286                  "remove",
 58287                ]);
 58288              }
 58289            }
 58290            class IncludeXDPContent extends i.StringObject {
 58291              constructor(e) {
 58292                super(c, "includeXDPContent");
 58293              }
 58294            }
 58295            class IncrementalLoad extends i.OptionObject {
 58296              constructor(e) {
 58297                super(c, "incrementalLoad", ["none", "forwardOnly"]);
 58298              }
 58299            }
 58300            class IncrementalMerge extends i.Option01 {
 58301              constructor(e) {
 58302                super(c, "incrementalMerge");
 58303              }
 58304            }
 58305            class Interactive extends i.Option01 {
 58306              constructor(e) {
 58307                super(c, "interactive");
 58308              }
 58309            }
 58310            class Jog extends i.OptionObject {
 58311              constructor(e) {
 58312                super(c, "jog", ["usePrinterSetting", "none", "pageSet"]);
 58313              }
 58314            }
 58315            class LabelPrinter extends i.XFAObject {
 58316              constructor(e) {
 58317                super(c, "labelPrinter", !0);
 58318                this.name = (0, s.getStringOption)(e.name, [
 58319                  "zpl",
 58320                  "dpl",
 58321                  "ipl",
 58322                  "tcpl",
 58323                ]);
 58324                this.batchOutput = null;
 58325                this.flipLabel = null;
 58326                this.fontInfo = null;
 58327                this.xdc = null;
 58328              }
 58329            }
 58330            class Layout extends i.OptionObject {
 58331              constructor(e) {
 58332                super(c, "layout", ["paginate", "panel"]);
 58333              }
 58334            }
 58335            class Level extends i.IntegerObject {
 58336              constructor(e) {
 58337                super(c, "level", 0, (e) => e > 0);
 58338              }
 58339            }
 58340            class Linearized extends i.Option01 {
 58341              constructor(e) {
 58342                super(c, "linearized");
 58343              }
 58344            }
 58345            class Locale extends i.StringObject {
 58346              constructor(e) {
 58347                super(c, "locale");
 58348              }
 58349            }
 58350            class LocaleSet extends i.StringObject {
 58351              constructor(e) {
 58352                super(c, "localeSet");
 58353              }
 58354            }
 58355            class Log extends i.XFAObject {
 58356              constructor(e) {
 58357                super(c, "log", !0);
 58358                this.mode = null;
 58359                this.threshold = null;
 58360                this.to = null;
 58361                this.uri = null;
 58362              }
 58363            }
 58364            class MapElement extends i.XFAObject {
 58365              constructor(e) {
 58366                super(c, "map", !0);
 58367                this.equate = new i.XFAObjectArray();
 58368                this.equateRange = new i.XFAObjectArray();
 58369              }
 58370            }
 58371            class MediumInfo extends i.XFAObject {
 58372              constructor(e) {
 58373                super(c, "mediumInfo", !0);
 58374                this.map = null;
 58375              }
 58376            }
 58377            class Message extends i.XFAObject {
 58378              constructor(e) {
 58379                super(c, "message", !0);
 58380                this.msgId = null;
 58381                this.severity = null;
 58382              }
 58383            }
 58384            class Messaging extends i.XFAObject {
 58385              constructor(e) {
 58386                super(c, "messaging", !0);
 58387                this.message = new i.XFAObjectArray();
 58388              }
 58389            }
 58390            class Mode extends i.OptionObject {
 58391              constructor(e) {
 58392                super(c, "mode", ["append", "overwrite"]);
 58393              }
 58394            }
 58395            class ModifyAnnots extends i.Option01 {
 58396              constructor(e) {
 58397                super(c, "modifyAnnots");
 58398              }
 58399            }
 58400            class MsgId extends i.IntegerObject {
 58401              constructor(e) {
 58402                super(c, "msgId", 1, (e) => e >= 1);
 58403              }
 58404            }
 58405            class NameAttr extends i.StringObject {
 58406              constructor(e) {
 58407                super(c, "nameAttr");
 58408              }
 58409            }
 58410            class NeverEmbed extends i.ContentObject {
 58411              constructor(e) {
 58412                super(c, "neverEmbed");
 58413              }
 58414            }
 58415            class NumberOfCopies extends i.IntegerObject {
 58416              constructor(e) {
 58417                super(c, "numberOfCopies", null, (e) => e >= 2 && e <= 5);
 58418              }
 58419            }
 58420            class OpenAction extends i.XFAObject {
 58421              constructor(e) {
 58422                super(c, "openAction", !0);
 58423                this.destination = null;
 58424              }
 58425            }
 58426            class Output extends i.XFAObject {
 58427              constructor(e) {
 58428                super(c, "output", !0);
 58429                this.to = null;
 58430                this.type = null;
 58431                this.uri = null;
 58432              }
 58433            }
 58434            class OutputBin extends i.StringObject {
 58435              constructor(e) {
 58436                super(c, "outputBin");
 58437              }
 58438            }
 58439            class OutputXSL extends i.XFAObject {
 58440              constructor(e) {
 58441                super(c, "outputXSL", !0);
 58442                this.uri = null;
 58443              }
 58444            }
 58445            class Overprint extends i.OptionObject {
 58446              constructor(e) {
 58447                super(c, "overprint", ["none", "both", "draw", "field"]);
 58448              }
 58449            }
 58450            class Packets extends i.StringObject {
 58451              constructor(e) {
 58452                super(c, "packets");
 58453              }
 58454              [n.$finalize]() {
 58455                "*" !== this[n.$content] &&
 58456                  (this[n.$content] = this[n.$content]
 58457                    .trim()
 58458                    .split(/\s+/)
 58459                    .filter((e) =>
 58460                      ["config", "datasets", "template", "xfdf", "xslt"].includes(
 58461                        e,
 58462                      ),
 58463                    ));
 58464              }
 58465            }
 58466            class PageOffset extends i.XFAObject {
 58467              constructor(e) {
 58468                super(c, "pageOffset");
 58469                this.x = (0, s.getInteger)({
 58470                  data: e.x,
 58471                  defaultValue: "useXDCSetting",
 58472                  validate: (e) => !0,
 58473                });
 58474                this.y = (0, s.getInteger)({
 58475                  data: e.y,
 58476                  defaultValue: "useXDCSetting",
 58477                  validate: (e) => !0,
 58478                });
 58479              }
 58480            }
 58481            class PageRange extends i.StringObject {
 58482              constructor(e) {
 58483                super(c, "pageRange");
 58484              }
 58485              [n.$finalize]() {
 58486                const e = this[n.$content]
 58487                    .trim()
 58488                    .split(/\s+/)
 58489                    .map((e) => parseInt(e, 10)),
 58490                  t = [];
 58491                for (let a = 0, r = e.length; a < r; a += 2)
 58492                  t.push(e.slice(a, a + 2));
 58493                this[n.$content] = t;
 58494              }
 58495            }
 58496            class Pagination extends i.OptionObject {
 58497              constructor(e) {
 58498                super(c, "pagination", [
 58499                  "simplex",
 58500                  "duplexShortEdge",
 58501                  "duplexLongEdge",
 58502                ]);
 58503              }
 58504            }
 58505            class PaginationOverride extends i.OptionObject {
 58506              constructor(e) {
 58507                super(c, "paginationOverride", [
 58508                  "none",
 58509                  "forceDuplex",
 58510                  "forceDuplexLongEdge",
 58511                  "forceDuplexShortEdge",
 58512                  "forceSimplex",
 58513                ]);
 58514              }
 58515            }
 58516            class Part extends i.IntegerObject {
 58517              constructor(e) {
 58518                super(c, "part", 1, (e) => !1);
 58519              }
 58520            }
 58521            class Pcl extends i.XFAObject {
 58522              constructor(e) {
 58523                super(c, "pcl", !0);
 58524                this.name = e.name || "";
 58525                this.batchOutput = null;
 58526                this.fontInfo = null;
 58527                this.jog = null;
 58528                this.mediumInfo = null;
 58529                this.outputBin = null;
 58530                this.pageOffset = null;
 58531                this.staple = null;
 58532                this.xdc = null;
 58533              }
 58534            }
 58535            class Pdf extends i.XFAObject {
 58536              constructor(e) {
 58537                super(c, "pdf", !0);
 58538                this.name = e.name || "";
 58539                this.adobeExtensionLevel = null;
 58540                this.batchOutput = null;
 58541                this.compression = null;
 58542                this.creator = null;
 58543                this.encryption = null;
 58544                this.fontInfo = null;
 58545                this.interactive = null;
 58546                this.linearized = null;
 58547                this.openAction = null;
 58548                this.pdfa = null;
 58549                this.producer = null;
 58550                this.renderPolicy = null;
 58551                this.scriptModel = null;
 58552                this.silentPrint = null;
 58553                this.submitFormat = null;
 58554                this.tagged = null;
 58555                this.version = null;
 58556                this.viewerPreferences = null;
 58557                this.xdc = null;
 58558              }
 58559            }
 58560            class Pdfa extends i.XFAObject {
 58561              constructor(e) {
 58562                super(c, "pdfa", !0);
 58563                this.amd = null;
 58564                this.conformance = null;
 58565                this.includeXDPContent = null;
 58566                this.part = null;
 58567              }
 58568            }
 58569            class Permissions extends i.XFAObject {
 58570              constructor(e) {
 58571                super(c, "permissions", !0);
 58572                this.accessibleContent = null;
 58573                this.change = null;
 58574                this.contentCopy = null;
 58575                this.documentAssembly = null;
 58576                this.formFieldFilling = null;
 58577                this.modifyAnnots = null;
 58578                this.plaintextMetadata = null;
 58579                this.print = null;
 58580                this.printHighQuality = null;
 58581              }
 58582            }
 58583            class PickTrayByPDFSize extends i.Option01 {
 58584              constructor(e) {
 58585                super(c, "pickTrayByPDFSize");
 58586              }
 58587            }
 58588            class Picture extends i.StringObject {
 58589              constructor(e) {
 58590                super(c, "picture");
 58591              }
 58592            }
 58593            class PlaintextMetadata extends i.Option01 {
 58594              constructor(e) {
 58595                super(c, "plaintextMetadata");
 58596              }
 58597            }
 58598            class Presence extends i.OptionObject {
 58599              constructor(e) {
 58600                super(c, "presence", [
 58601                  "preserve",
 58602                  "dissolve",
 58603                  "dissolveStructure",
 58604                  "ignore",
 58605                  "remove",
 58606                ]);
 58607              }
 58608            }
 58609            class Present extends i.XFAObject {
 58610              constructor(e) {
 58611                super(c, "present", !0);
 58612                this.behaviorOverride = null;
 58613                this.cache = null;
 58614                this.common = null;
 58615                this.copies = null;
 58616                this.destination = null;
 58617                this.incrementalMerge = null;
 58618                this.layout = null;
 58619                this.output = null;
 58620                this.overprint = null;
 58621                this.pagination = null;
 58622                this.paginationOverride = null;
 58623                this.script = null;
 58624                this.validate = null;
 58625                this.xdp = null;
 58626                this.driver = new i.XFAObjectArray();
 58627                this.labelPrinter = new i.XFAObjectArray();
 58628                this.pcl = new i.XFAObjectArray();
 58629                this.pdf = new i.XFAObjectArray();
 58630                this.ps = new i.XFAObjectArray();
 58631                this.submitUrl = new i.XFAObjectArray();
 58632                this.webClient = new i.XFAObjectArray();
 58633                this.zpl = new i.XFAObjectArray();
 58634              }
 58635            }
 58636            class Print extends i.Option01 {
 58637              constructor(e) {
 58638                super(c, "print");
 58639              }
 58640            }
 58641            class PrintHighQuality extends i.Option01 {
 58642              constructor(e) {
 58643                super(c, "printHighQuality");
 58644              }
 58645            }
 58646            class PrintScaling extends i.OptionObject {
 58647              constructor(e) {
 58648                super(c, "printScaling", ["appdefault", "noScaling"]);
 58649              }
 58650            }
 58651            class PrinterName extends i.StringObject {
 58652              constructor(e) {
 58653                super(c, "printerName");
 58654              }
 58655            }
 58656            class Producer extends i.StringObject {
 58657              constructor(e) {
 58658                super(c, "producer");
 58659              }
 58660            }
 58661            class Ps extends i.XFAObject {
 58662              constructor(e) {
 58663                super(c, "ps", !0);
 58664                this.name = e.name || "";
 58665                this.batchOutput = null;
 58666                this.fontInfo = null;
 58667                this.jog = null;
 58668                this.mediumInfo = null;
 58669                this.outputBin = null;
 58670                this.staple = null;
 58671                this.xdc = null;
 58672              }
 58673            }
 58674            class Range extends i.ContentObject {
 58675              constructor(e) {
 58676                super(c, "range");
 58677              }
 58678              [n.$finalize]() {
 58679                this[n.$content] = this[n.$content]
 58680                  .trim()
 58681                  .split(/\s*,\s*/, 2)
 58682                  .map((e) => e.split("-").map((e) => parseInt(e.trim(), 10)))
 58683                  .filter((e) => e.every((e) => !isNaN(e)))
 58684                  .map((e) => {
 58685                    1 === e.length && e.push(e[0]);
 58686                    return e;
 58687                  });
 58688              }
 58689            }
 58690            class Record extends i.ContentObject {
 58691              constructor(e) {
 58692                super(c, "record");
 58693              }
 58694              [n.$finalize]() {
 58695                this[n.$content] = this[n.$content].trim();
 58696                const e = parseInt(this[n.$content], 10);
 58697                !isNaN(e) && e >= 0 && (this[n.$content] = e);
 58698              }
 58699            }
 58700            class Relevant extends i.ContentObject {
 58701              constructor(e) {
 58702                super(c, "relevant");
 58703              }
 58704              [n.$finalize]() {
 58705                this[n.$content] = this[n.$content].trim().split(/\s+/);
 58706              }
 58707            }
 58708            class Rename extends i.ContentObject {
 58709              constructor(e) {
 58710                super(c, "rename");
 58711              }
 58712              [n.$finalize]() {
 58713                this[n.$content] = this[n.$content].trim();
 58714                (this[n.$content].toLowerCase().startsWith("xml") ||
 58715                  new RegExp("[\\p{L}_][\\p{L}\\d._\\p{M}-]*", "u").test(
 58716                    this[n.$content],
 58717                  )) &&
 58718                  (0, o.warn)("XFA - Rename: invalid XFA name");
 58719              }
 58720            }
 58721            class RenderPolicy extends i.OptionObject {
 58722              constructor(e) {
 58723                super(c, "renderPolicy", ["server", "client"]);
 58724              }
 58725            }
 58726            class RunScripts extends i.OptionObject {
 58727              constructor(e) {
 58728                super(c, "runScripts", ["both", "client", "none", "server"]);
 58729              }
 58730            }
 58731            class Script extends i.XFAObject {
 58732              constructor(e) {
 58733                super(c, "script", !0);
 58734                this.currentPage = null;
 58735                this.exclude = null;
 58736                this.runScripts = null;
 58737              }
 58738            }
 58739            class ScriptModel extends i.OptionObject {
 58740              constructor(e) {
 58741                super(c, "scriptModel", ["XFA", "none"]);
 58742              }
 58743            }
 58744            class Severity extends i.OptionObject {
 58745              constructor(e) {
 58746                super(c, "severity", [
 58747                  "ignore",
 58748                  "error",
 58749                  "information",
 58750                  "trace",
 58751                  "warning",
 58752                ]);
 58753              }
 58754            }
 58755            class SilentPrint extends i.XFAObject {
 58756              constructor(e) {
 58757                super(c, "silentPrint", !0);
 58758                this.addSilentPrint = null;
 58759                this.printerName = null;
 58760              }
 58761            }
 58762            class Staple extends i.XFAObject {
 58763              constructor(e) {
 58764                super(c, "staple");
 58765                this.mode = (0, s.getStringOption)(e.mode, [
 58766                  "usePrinterSetting",
 58767                  "on",
 58768                  "off",
 58769                ]);
 58770              }
 58771            }
 58772            class StartNode extends i.StringObject {
 58773              constructor(e) {
 58774                super(c, "startNode");
 58775              }
 58776            }
 58777            class StartPage extends i.IntegerObject {
 58778              constructor(e) {
 58779                super(c, "startPage", 0, (e) => !0);
 58780              }
 58781            }
 58782            class SubmitFormat extends i.OptionObject {
 58783              constructor(e) {
 58784                super(c, "submitFormat", [
 58785                  "html",
 58786                  "delegate",
 58787                  "fdf",
 58788                  "xml",
 58789                  "pdf",
 58790                ]);
 58791              }
 58792            }
 58793            class SubmitUrl extends i.StringObject {
 58794              constructor(e) {
 58795                super(c, "submitUrl");
 58796              }
 58797            }
 58798            class SubsetBelow extends i.IntegerObject {
 58799              constructor(e) {
 58800                super(c, "subsetBelow", 100, (e) => e >= 0 && e <= 100);
 58801              }
 58802            }
 58803            class SuppressBanner extends i.Option01 {
 58804              constructor(e) {
 58805                super(c, "suppressBanner");
 58806              }
 58807            }
 58808            class Tagged extends i.Option01 {
 58809              constructor(e) {
 58810                super(c, "tagged");
 58811              }
 58812            }
 58813            class Template extends i.XFAObject {
 58814              constructor(e) {
 58815                super(c, "template", !0);
 58816                this.base = null;
 58817                this.relevant = null;
 58818                this.startPage = null;
 58819                this.uri = null;
 58820                this.xsl = null;
 58821              }
 58822            }
 58823            class Threshold extends i.OptionObject {
 58824              constructor(e) {
 58825                super(c, "threshold", [
 58826                  "trace",
 58827                  "error",
 58828                  "information",
 58829                  "warning",
 58830                ]);
 58831              }
 58832            }
 58833            class To extends i.OptionObject {
 58834              constructor(e) {
 58835                super(c, "to", [
 58836                  "null",
 58837                  "memory",
 58838                  "stderr",
 58839                  "stdout",
 58840                  "system",
 58841                  "uri",
 58842                ]);
 58843              }
 58844            }
 58845            class TemplateCache extends i.XFAObject {
 58846              constructor(e) {
 58847                super(c, "templateCache");
 58848                this.maxEntries = (0, s.getInteger)({
 58849                  data: e.maxEntries,
 58850                  defaultValue: 5,
 58851                  validate: (e) => e >= 0,
 58852                });
 58853              }
 58854            }
 58855            class Trace extends i.XFAObject {
 58856              constructor(e) {
 58857                super(c, "trace", !0);
 58858                this.area = new i.XFAObjectArray();
 58859              }
 58860            }
 58861            class Transform extends i.XFAObject {
 58862              constructor(e) {
 58863                super(c, "transform", !0);
 58864                this.groupParent = null;
 58865                this.ifEmpty = null;
 58866                this.nameAttr = null;
 58867                this.picture = null;
 58868                this.presence = null;
 58869                this.rename = null;
 58870                this.whitespace = null;
 58871              }
 58872            }
 58873            class Type extends i.OptionObject {
 58874              constructor(e) {
 58875                super(c, "type", [
 58876                  "none",
 58877                  "ascii85",
 58878                  "asciiHex",
 58879                  "ccittfax",
 58880                  "flate",
 58881                  "lzw",
 58882                  "runLength",
 58883                  "native",
 58884                  "xdp",
 58885                  "mergedXDP",
 58886                ]);
 58887              }
 58888            }
 58889            class Uri extends i.StringObject {
 58890              constructor(e) {
 58891                super(c, "uri");
 58892              }
 58893            }
 58894            class Validate extends i.OptionObject {
 58895              constructor(e) {
 58896                super(c, "validate", [
 58897                  "preSubmit",
 58898                  "prePrint",
 58899                  "preExecute",
 58900                  "preSave",
 58901                ]);
 58902              }
 58903            }
 58904            class ValidateApprovalSignatures extends i.ContentObject {
 58905              constructor(e) {
 58906                super(c, "validateApprovalSignatures");
 58907              }
 58908              [n.$finalize]() {
 58909                this[n.$content] = this[n.$content]
 58910                  .trim()
 58911                  .split(/\s+/)
 58912                  .filter((e) => ["docReady", "postSign"].includes(e));
 58913              }
 58914            }
 58915            class ValidationMessaging extends i.OptionObject {
 58916              constructor(e) {
 58917                super(c, "validationMessaging", [
 58918                  "allMessagesIndividually",
 58919                  "allMessagesTogether",
 58920                  "firstMessageOnly",
 58921                  "noMessages",
 58922                ]);
 58923              }
 58924            }
 58925            class Version extends i.OptionObject {
 58926              constructor(e) {
 58927                super(c, "version", ["1.7", "1.6", "1.5", "1.4", "1.3", "1.2"]);
 58928              }
 58929            }
 58930            class VersionControl extends i.XFAObject {
 58931              constructor(e) {
 58932                super(c, "VersionControl");
 58933                this.outputBelow = (0, s.getStringOption)(e.outputBelow, [
 58934                  "warn",
 58935                  "error",
 58936                  "update",
 58937                ]);
 58938                this.sourceAbove = (0, s.getStringOption)(e.sourceAbove, [
 58939                  "warn",
 58940                  "error",
 58941                ]);
 58942                this.sourceBelow = (0, s.getStringOption)(e.sourceBelow, [
 58943                  "update",
 58944                  "maintain",
 58945                ]);
 58946              }
 58947            }
 58948            class ViewerPreferences extends i.XFAObject {
 58949              constructor(e) {
 58950                super(c, "viewerPreferences", !0);
 58951                this.ADBE_JSConsole = null;
 58952                this.ADBE_JSDebugger = null;
 58953                this.addViewerPreferences = null;
 58954                this.duplexOption = null;
 58955                this.enforce = null;
 58956                this.numberOfCopies = null;
 58957                this.pageRange = null;
 58958                this.pickTrayByPDFSize = null;
 58959                this.printScaling = null;
 58960              }
 58961            }
 58962            class WebClient extends i.XFAObject {
 58963              constructor(e) {
 58964                super(c, "webClient", !0);
 58965                this.name = e.name ? e.name.trim() : "";
 58966                this.fontInfo = null;
 58967                this.xdc = null;
 58968              }
 58969            }
 58970            class Whitespace extends i.OptionObject {
 58971              constructor(e) {
 58972                super(c, "whitespace", [
 58973                  "preserve",
 58974                  "ltrim",
 58975                  "normalize",
 58976                  "rtrim",
 58977                  "trim",
 58978                ]);
 58979              }
 58980            }
 58981            class Window extends i.ContentObject {
 58982              constructor(e) {
 58983                super(c, "window");
 58984              }
 58985              [n.$finalize]() {
 58986                const e = this[n.$content]
 58987                  .trim()
 58988                  .split(/\s*,\s*/, 2)
 58989                  .map((e) => parseInt(e, 10));
 58990                if (e.some((e) => isNaN(e))) this[n.$content] = [0, 0];
 58991                else {
 58992                  1 === e.length && e.push(e[0]);
 58993                  this[n.$content] = e;
 58994                }
 58995              }
 58996            }
 58997            class Xdc extends i.XFAObject {
 58998              constructor(e) {
 58999                super(c, "xdc", !0);
 59000                this.uri = new i.XFAObjectArray();
 59001                this.xsl = new i.XFAObjectArray();
 59002              }
 59003            }
 59004            class Xdp extends i.XFAObject {
 59005              constructor(e) {
 59006                super(c, "xdp", !0);
 59007                this.packets = null;
 59008              }
 59009            }
 59010            class Xsl extends i.XFAObject {
 59011              constructor(e) {
 59012                super(c, "xsl", !0);
 59013                this.debug = null;
 59014                this.uri = null;
 59015              }
 59016            }
 59017            class Zpl extends i.XFAObject {
 59018              constructor(e) {
 59019                super(c, "zpl", !0);
 59020                this.name = e.name ? e.name.trim() : "";
 59021                this.batchOutput = null;
 59022                this.flipLabel = null;
 59023                this.fontInfo = null;
 59024                this.xdc = null;
 59025              }
 59026            }
 59027            class ConfigNamespace {
 59028              static [r.$buildXFAObject](e, t) {
 59029                if (ConfigNamespace.hasOwnProperty(e))
 59030                  return ConfigNamespace[e](t);
 59031              }
 59032              static acrobat(e) {
 59033                return new Acrobat(e);
 59034              }
 59035              static acrobat7(e) {
 59036                return new Acrobat7(e);
 59037              }
 59038              static ADBE_JSConsole(e) {
 59039                return new ADBE_JSConsole(e);
 59040              }
 59041              static ADBE_JSDebugger(e) {
 59042                return new ADBE_JSDebugger(e);
 59043              }
 59044              static addSilentPrint(e) {
 59045                return new AddSilentPrint(e);
 59046              }
 59047              static addViewerPreferences(e) {
 59048                return new AddViewerPreferences(e);
 59049              }
 59050              static adjustData(e) {
 59051                return new AdjustData(e);
 59052              }
 59053              static adobeExtensionLevel(e) {
 59054                return new AdobeExtensionLevel(e);
 59055              }
 59056              static agent(e) {
 59057                return new Agent(e);
 59058              }
 59059              static alwaysEmbed(e) {
 59060                return new AlwaysEmbed(e);
 59061              }
 59062              static amd(e) {
 59063                return new Amd(e);
 59064              }
 59065              static area(e) {
 59066                return new Area(e);
 59067              }
 59068              static attributes(e) {
 59069                return new Attributes(e);
 59070              }
 59071              static autoSave(e) {
 59072                return new AutoSave(e);
 59073              }
 59074              static base(e) {
 59075                return new Base(e);
 59076              }
 59077              static batchOutput(e) {
 59078                return new BatchOutput(e);
 59079              }
 59080              static behaviorOverride(e) {
 59081                return new BehaviorOverride(e);
 59082              }
 59083              static cache(e) {
 59084                return new Cache(e);
 59085              }
 59086              static change(e) {
 59087                return new Change(e);
 59088              }
 59089              static common(e) {
 59090                return new Common(e);
 59091              }
 59092              static compress(e) {
 59093                return new Compress(e);
 59094              }
 59095              static compressLogicalStructure(e) {
 59096                return new CompressLogicalStructure(e);
 59097              }
 59098              static compressObjectStream(e) {
 59099                return new CompressObjectStream(e);
 59100              }
 59101              static compression(e) {
 59102                return new Compression(e);
 59103              }
 59104              static config(e) {
 59105                return new Config(e);
 59106              }
 59107              static conformance(e) {
 59108                return new Conformance(e);
 59109              }
 59110              static contentCopy(e) {
 59111                return new ContentCopy(e);
 59112              }
 59113              static copies(e) {
 59114                return new Copies(e);
 59115              }
 59116              static creator(e) {
 59117                return new Creator(e);
 59118              }
 59119              static currentPage(e) {
 59120                return new CurrentPage(e);
 59121              }
 59122              static data(e) {
 59123                return new Data(e);
 59124              }
 59125              static debug(e) {
 59126                return new Debug(e);
 59127              }
 59128              static defaultTypeface(e) {
 59129                return new DefaultTypeface(e);
 59130              }
 59131              static destination(e) {
 59132                return new Destination(e);
 59133              }
 59134              static documentAssembly(e) {
 59135                return new DocumentAssembly(e);
 59136              }
 59137              static driver(e) {
 59138                return new Driver(e);
 59139              }
 59140              static duplexOption(e) {
 59141                return new DuplexOption(e);
 59142              }
 59143              static dynamicRender(e) {
 59144                return new DynamicRender(e);
 59145              }
 59146              static embed(e) {
 59147                return new Embed(e);
 59148              }
 59149              static encrypt(e) {
 59150                return new Encrypt(e);
 59151              }
 59152              static encryption(e) {
 59153                return new Encryption(e);
 59154              }
 59155              static encryptionLevel(e) {
 59156                return new EncryptionLevel(e);
 59157              }
 59158              static enforce(e) {
 59159                return new Enforce(e);
 59160              }
 59161              static equate(e) {
 59162                return new Equate(e);
 59163              }
 59164              static equateRange(e) {
 59165                return new EquateRange(e);
 59166              }
 59167              static exclude(e) {
 59168                return new Exclude(e);
 59169              }
 59170              static excludeNS(e) {
 59171                return new ExcludeNS(e);
 59172              }
 59173              static flipLabel(e) {
 59174                return new FlipLabel(e);
 59175              }
 59176              static fontInfo(e) {
 59177                return new FontInfo(e);
 59178              }
 59179              static formFieldFilling(e) {
 59180                return new FormFieldFilling(e);
 59181              }
 59182              static groupParent(e) {
 59183                return new GroupParent(e);
 59184              }
 59185              static ifEmpty(e) {
 59186                return new IfEmpty(e);
 59187              }
 59188              static includeXDPContent(e) {
 59189                return new IncludeXDPContent(e);
 59190              }
 59191              static incrementalLoad(e) {
 59192                return new IncrementalLoad(e);
 59193              }
 59194              static incrementalMerge(e) {
 59195                return new IncrementalMerge(e);
 59196              }
 59197              static interactive(e) {
 59198                return new Interactive(e);
 59199              }
 59200              static jog(e) {
 59201                return new Jog(e);
 59202              }
 59203              static labelPrinter(e) {
 59204                return new LabelPrinter(e);
 59205              }
 59206              static layout(e) {
 59207                return new Layout(e);
 59208              }
 59209              static level(e) {
 59210                return new Level(e);
 59211              }
 59212              static linearized(e) {
 59213                return new Linearized(e);
 59214              }
 59215              static locale(e) {
 59216                return new Locale(e);
 59217              }
 59218              static localeSet(e) {
 59219                return new LocaleSet(e);
 59220              }
 59221              static log(e) {
 59222                return new Log(e);
 59223              }
 59224              static map(e) {
 59225                return new MapElement(e);
 59226              }
 59227              static mediumInfo(e) {
 59228                return new MediumInfo(e);
 59229              }
 59230              static message(e) {
 59231                return new Message(e);
 59232              }
 59233              static messaging(e) {
 59234                return new Messaging(e);
 59235              }
 59236              static mode(e) {
 59237                return new Mode(e);
 59238              }
 59239              static modifyAnnots(e) {
 59240                return new ModifyAnnots(e);
 59241              }
 59242              static msgId(e) {
 59243                return new MsgId(e);
 59244              }
 59245              static nameAttr(e) {
 59246                return new NameAttr(e);
 59247              }
 59248              static neverEmbed(e) {
 59249                return new NeverEmbed(e);
 59250              }
 59251              static numberOfCopies(e) {
 59252                return new NumberOfCopies(e);
 59253              }
 59254              static openAction(e) {
 59255                return new OpenAction(e);
 59256              }
 59257              static output(e) {
 59258                return new Output(e);
 59259              }
 59260              static outputBin(e) {
 59261                return new OutputBin(e);
 59262              }
 59263              static outputXSL(e) {
 59264                return new OutputXSL(e);
 59265              }
 59266              static overprint(e) {
 59267                return new Overprint(e);
 59268              }
 59269              static packets(e) {
 59270                return new Packets(e);
 59271              }
 59272              static pageOffset(e) {
 59273                return new PageOffset(e);
 59274              }
 59275              static pageRange(e) {
 59276                return new PageRange(e);
 59277              }
 59278              static pagination(e) {
 59279                return new Pagination(e);
 59280              }
 59281              static paginationOverride(e) {
 59282                return new PaginationOverride(e);
 59283              }
 59284              static part(e) {
 59285                return new Part(e);
 59286              }
 59287              static pcl(e) {
 59288                return new Pcl(e);
 59289              }
 59290              static pdf(e) {
 59291                return new Pdf(e);
 59292              }
 59293              static pdfa(e) {
 59294                return new Pdfa(e);
 59295              }
 59296              static permissions(e) {
 59297                return new Permissions(e);
 59298              }
 59299              static pickTrayByPDFSize(e) {
 59300                return new PickTrayByPDFSize(e);
 59301              }
 59302              static picture(e) {
 59303                return new Picture(e);
 59304              }
 59305              static plaintextMetadata(e) {
 59306                return new PlaintextMetadata(e);
 59307              }
 59308              static presence(e) {
 59309                return new Presence(e);
 59310              }
 59311              static present(e) {
 59312                return new Present(e);
 59313              }
 59314              static print(e) {
 59315                return new Print(e);
 59316              }
 59317              static printHighQuality(e) {
 59318                return new PrintHighQuality(e);
 59319              }
 59320              static printScaling(e) {
 59321                return new PrintScaling(e);
 59322              }
 59323              static printerName(e) {
 59324                return new PrinterName(e);
 59325              }
 59326              static producer(e) {
 59327                return new Producer(e);
 59328              }
 59329              static ps(e) {
 59330                return new Ps(e);
 59331              }
 59332              static range(e) {
 59333                return new Range(e);
 59334              }
 59335              static record(e) {
 59336                return new Record(e);
 59337              }
 59338              static relevant(e) {
 59339                return new Relevant(e);
 59340              }
 59341              static rename(e) {
 59342                return new Rename(e);
 59343              }
 59344              static renderPolicy(e) {
 59345                return new RenderPolicy(e);
 59346              }
 59347              static runScripts(e) {
 59348                return new RunScripts(e);
 59349              }
 59350              static script(e) {
 59351                return new Script(e);
 59352              }
 59353              static scriptModel(e) {
 59354                return new ScriptModel(e);
 59355              }
 59356              static severity(e) {
 59357                return new Severity(e);
 59358              }
 59359              static silentPrint(e) {
 59360                return new SilentPrint(e);
 59361              }
 59362              static staple(e) {
 59363                return new Staple(e);
 59364              }
 59365              static startNode(e) {
 59366                return new StartNode(e);
 59367              }
 59368              static startPage(e) {
 59369                return new StartPage(e);
 59370              }
 59371              static submitFormat(e) {
 59372                return new SubmitFormat(e);
 59373              }
 59374              static submitUrl(e) {
 59375                return new SubmitUrl(e);
 59376              }
 59377              static subsetBelow(e) {
 59378                return new SubsetBelow(e);
 59379              }
 59380              static suppressBanner(e) {
 59381                return new SuppressBanner(e);
 59382              }
 59383              static tagged(e) {
 59384                return new Tagged(e);
 59385              }
 59386              static template(e) {
 59387                return new Template(e);
 59388              }
 59389              static templateCache(e) {
 59390                return new TemplateCache(e);
 59391              }
 59392              static threshold(e) {
 59393                return new Threshold(e);
 59394              }
 59395              static to(e) {
 59396                return new To(e);
 59397              }
 59398              static trace(e) {
 59399                return new Trace(e);
 59400              }
 59401              static transform(e) {
 59402                return new Transform(e);
 59403              }
 59404              static type(e) {
 59405                return new Type(e);
 59406              }
 59407              static uri(e) {
 59408                return new Uri(e);
 59409              }
 59410              static validate(e) {
 59411                return new Validate(e);
 59412              }
 59413              static validateApprovalSignatures(e) {
 59414                return new ValidateApprovalSignatures(e);
 59415              }
 59416              static validationMessaging(e) {
 59417                return new ValidationMessaging(e);
 59418              }
 59419              static version(e) {
 59420                return new Version(e);
 59421              }
 59422              static versionControl(e) {
 59423                return new VersionControl(e);
 59424              }
 59425              static viewerPreferences(e) {
 59426                return new ViewerPreferences(e);
 59427              }
 59428              static webClient(e) {
 59429                return new WebClient(e);
 59430              }
 59431              static whitespace(e) {
 59432                return new Whitespace(e);
 59433              }
 59434              static window(e) {
 59435                return new Window(e);
 59436              }
 59437              static xdc(e) {
 59438                return new Xdc(e);
 59439              }
 59440              static xdp(e) {
 59441                return new Xdp(e);
 59442              }
 59443              static xsl(e) {
 59444                return new Xsl(e);
 59445              }
 59446              static zpl(e) {
 59447                return new Zpl(e);
 59448              }
 59449            }
 59450            t.ConfigNamespace = ConfigNamespace;
 59451          },
 59452          (e, t, a) => {
 59453            Object.defineProperty(t, "__esModule", { value: !0 });
 59454            t.ConnectionSetNamespace = void 0;
 59455            var r = a(81),
 59456              n = a(87);
 59457            const i = r.NamespaceIds.connectionSet.id;
 59458            class ConnectionSet extends n.XFAObject {
 59459              constructor(e) {
 59460                super(i, "connectionSet", !0);
 59461                this.wsdlConnection = new n.XFAObjectArray();
 59462                this.xmlConnection = new n.XFAObjectArray();
 59463                this.xsdConnection = new n.XFAObjectArray();
 59464              }
 59465            }
 59466            class EffectiveInputPolicy extends n.XFAObject {
 59467              constructor(e) {
 59468                super(i, "effectiveInputPolicy");
 59469                this.id = e.id || "";
 59470                this.name = e.name || "";
 59471                this.use = e.use || "";
 59472                this.usehref = e.usehref || "";
 59473              }
 59474            }
 59475            class EffectiveOutputPolicy extends n.XFAObject {
 59476              constructor(e) {
 59477                super(i, "effectiveOutputPolicy");
 59478                this.id = e.id || "";
 59479                this.name = e.name || "";
 59480                this.use = e.use || "";
 59481                this.usehref = e.usehref || "";
 59482              }
 59483            }
 59484            class Operation extends n.StringObject {
 59485              constructor(e) {
 59486                super(i, "operation");
 59487                this.id = e.id || "";
 59488                this.input = e.input || "";
 59489                this.name = e.name || "";
 59490                this.output = e.output || "";
 59491                this.use = e.use || "";
 59492                this.usehref = e.usehref || "";
 59493              }
 59494            }
 59495            class RootElement extends n.StringObject {
 59496              constructor(e) {
 59497                super(i, "rootElement");
 59498                this.id = e.id || "";
 59499                this.name = e.name || "";
 59500                this.use = e.use || "";
 59501                this.usehref = e.usehref || "";
 59502              }
 59503            }
 59504            class SoapAction extends n.StringObject {
 59505              constructor(e) {
 59506                super(i, "soapAction");
 59507                this.id = e.id || "";
 59508                this.name = e.name || "";
 59509                this.use = e.use || "";
 59510                this.usehref = e.usehref || "";
 59511              }
 59512            }
 59513            class SoapAddress extends n.StringObject {
 59514              constructor(e) {
 59515                super(i, "soapAddress");
 59516                this.id = e.id || "";
 59517                this.name = e.name || "";
 59518                this.use = e.use || "";
 59519                this.usehref = e.usehref || "";
 59520              }
 59521            }
 59522            class Uri extends n.StringObject {
 59523              constructor(e) {
 59524                super(i, "uri");
 59525                this.id = e.id || "";
 59526                this.name = e.name || "";
 59527                this.use = e.use || "";
 59528                this.usehref = e.usehref || "";
 59529              }
 59530            }
 59531            class WsdlAddress extends n.StringObject {
 59532              constructor(e) {
 59533                super(i, "wsdlAddress");
 59534                this.id = e.id || "";
 59535                this.name = e.name || "";
 59536                this.use = e.use || "";
 59537                this.usehref = e.usehref || "";
 59538              }
 59539            }
 59540            class WsdlConnection extends n.XFAObject {
 59541              constructor(e) {
 59542                super(i, "wsdlConnection", !0);
 59543                this.dataDescription = e.dataDescription || "";
 59544                this.name = e.name || "";
 59545                this.effectiveInputPolicy = null;
 59546                this.effectiveOutputPolicy = null;
 59547                this.operation = null;
 59548                this.soapAction = null;
 59549                this.soapAddress = null;
 59550                this.wsdlAddress = null;
 59551              }
 59552            }
 59553            class XmlConnection extends n.XFAObject {
 59554              constructor(e) {
 59555                super(i, "xmlConnection", !0);
 59556                this.dataDescription = e.dataDescription || "";
 59557                this.name = e.name || "";
 59558                this.uri = null;
 59559              }
 59560            }
 59561            class XsdConnection extends n.XFAObject {
 59562              constructor(e) {
 59563                super(i, "xsdConnection", !0);
 59564                this.dataDescription = e.dataDescription || "";
 59565                this.name = e.name || "";
 59566                this.rootElement = null;
 59567                this.uri = null;
 59568              }
 59569            }
 59570            class ConnectionSetNamespace {
 59571              static [r.$buildXFAObject](e, t) {
 59572                if (ConnectionSetNamespace.hasOwnProperty(e))
 59573                  return ConnectionSetNamespace[e](t);
 59574              }
 59575              static connectionSet(e) {
 59576                return new ConnectionSet(e);
 59577              }
 59578              static effectiveInputPolicy(e) {
 59579                return new EffectiveInputPolicy(e);
 59580              }
 59581              static effectiveOutputPolicy(e) {
 59582                return new EffectiveOutputPolicy(e);
 59583              }
 59584              static operation(e) {
 59585                return new Operation(e);
 59586              }
 59587              static rootElement(e) {
 59588                return new RootElement(e);
 59589              }
 59590              static soapAction(e) {
 59591                return new SoapAction(e);
 59592              }
 59593              static soapAddress(e) {
 59594                return new SoapAddress(e);
 59595              }
 59596              static uri(e) {
 59597                return new Uri(e);
 59598              }
 59599              static wsdlAddress(e) {
 59600                return new WsdlAddress(e);
 59601              }
 59602              static wsdlConnection(e) {
 59603                return new WsdlConnection(e);
 59604              }
 59605              static xmlConnection(e) {
 59606                return new XmlConnection(e);
 59607              }
 59608              static xsdConnection(e) {
 59609                return new XsdConnection(e);
 59610              }
 59611            }
 59612            t.ConnectionSetNamespace = ConnectionSetNamespace;
 59613          },
 59614          (e, t, a) => {
 59615            Object.defineProperty(t, "__esModule", { value: !0 });
 59616            t.DatasetsNamespace = void 0;
 59617            var r = a(78),
 59618              n = a(81),
 59619              i = a(87);
 59620            const s = n.NamespaceIds.datasets.id;
 59621            class Data extends i.XmlObject {
 59622              constructor(e) {
 59623                super(s, "data", e);
 59624              }
 59625              [r.$isNsAgnostic]() {
 59626                return !0;
 59627              }
 59628            }
 59629            class Datasets extends i.XFAObject {
 59630              constructor(e) {
 59631                super(s, "datasets", !0);
 59632                this.data = null;
 59633                this.Signature = null;
 59634              }
 59635              [r.$onChild](e) {
 59636                const t = e[r.$nodeName];
 59637                (("data" === t && e[r.$namespaceId] === s) ||
 59638                  ("Signature" === t &&
 59639                    e[r.$namespaceId] === n.NamespaceIds.signature.id)) &&
 59640                  (this[t] = e);
 59641                this[r.$appendChild](e);
 59642              }
 59643            }
 59644            class DatasetsNamespace {
 59645              static [n.$buildXFAObject](e, t) {
 59646                if (DatasetsNamespace.hasOwnProperty(e))
 59647                  return DatasetsNamespace[e](t);
 59648              }
 59649              static datasets(e) {
 59650                return new Datasets(e);
 59651              }
 59652              static data(e) {
 59653                return new Data(e);
 59654              }
 59655            }
 59656            t.DatasetsNamespace = DatasetsNamespace;
 59657          },
 59658          (e, t, a) => {
 59659            Object.defineProperty(t, "__esModule", { value: !0 });
 59660            t.LocaleSetNamespace = void 0;
 59661            var r = a(81),
 59662              n = a(87),
 59663              i = a(84);
 59664            const s = r.NamespaceIds.localeSet.id;
 59665            class CalendarSymbols extends n.XFAObject {
 59666              constructor(e) {
 59667                super(s, "calendarSymbols", !0);
 59668                this.name = "gregorian";
 59669                this.dayNames = new n.XFAObjectArray(2);
 59670                this.eraNames = null;
 59671                this.meridiemNames = null;
 59672                this.monthNames = new n.XFAObjectArray(2);
 59673              }
 59674            }
 59675            class CurrencySymbol extends n.StringObject {
 59676              constructor(e) {
 59677                super(s, "currencySymbol");
 59678                this.name = (0, i.getStringOption)(e.name, [
 59679                  "symbol",
 59680                  "isoname",
 59681                  "decimal",
 59682                ]);
 59683              }
 59684            }
 59685            class CurrencySymbols extends n.XFAObject {
 59686              constructor(e) {
 59687                super(s, "currencySymbols", !0);
 59688                this.currencySymbol = new n.XFAObjectArray(3);
 59689              }
 59690            }
 59691            class DatePattern extends n.StringObject {
 59692              constructor(e) {
 59693                super(s, "datePattern");
 59694                this.name = (0, i.getStringOption)(e.name, [
 59695                  "full",
 59696                  "long",
 59697                  "med",
 59698                  "short",
 59699                ]);
 59700              }
 59701            }
 59702            class DatePatterns extends n.XFAObject {
 59703              constructor(e) {
 59704                super(s, "datePatterns", !0);
 59705                this.datePattern = new n.XFAObjectArray(4);
 59706              }
 59707            }
 59708            class DateTimeSymbols extends n.ContentObject {
 59709              constructor(e) {
 59710                super(s, "dateTimeSymbols");
 59711              }
 59712            }
 59713            class Day extends n.StringObject {
 59714              constructor(e) {
 59715                super(s, "day");
 59716              }
 59717            }
 59718            class DayNames extends n.XFAObject {
 59719              constructor(e) {
 59720                super(s, "dayNames", !0);
 59721                this.abbr = (0, i.getInteger)({
 59722                  data: e.abbr,
 59723                  defaultValue: 0,
 59724                  validate: (e) => 1 === e,
 59725                });
 59726                this.day = new n.XFAObjectArray(7);
 59727              }
 59728            }
 59729            class Era extends n.StringObject {
 59730              constructor(e) {
 59731                super(s, "era");
 59732              }
 59733            }
 59734            class EraNames extends n.XFAObject {
 59735              constructor(e) {
 59736                super(s, "eraNames", !0);
 59737                this.era = new n.XFAObjectArray(2);
 59738              }
 59739            }
 59740            class Locale extends n.XFAObject {
 59741              constructor(e) {
 59742                super(s, "locale", !0);
 59743                this.desc = e.desc || "";
 59744                this.name = "isoname";
 59745                this.calendarSymbols = null;
 59746                this.currencySymbols = null;
 59747                this.datePatterns = null;
 59748                this.dateTimeSymbols = null;
 59749                this.numberPatterns = null;
 59750                this.numberSymbols = null;
 59751                this.timePatterns = null;
 59752                this.typeFaces = null;
 59753              }
 59754            }
 59755            class LocaleSet extends n.XFAObject {
 59756              constructor(e) {
 59757                super(s, "localeSet", !0);
 59758                this.locale = new n.XFAObjectArray();
 59759              }
 59760            }
 59761            class Meridiem extends n.StringObject {
 59762              constructor(e) {
 59763                super(s, "meridiem");
 59764              }
 59765            }
 59766            class MeridiemNames extends n.XFAObject {
 59767              constructor(e) {
 59768                super(s, "meridiemNames", !0);
 59769                this.meridiem = new n.XFAObjectArray(2);
 59770              }
 59771            }
 59772            class Month extends n.StringObject {
 59773              constructor(e) {
 59774                super(s, "month");
 59775              }
 59776            }
 59777            class MonthNames extends n.XFAObject {
 59778              constructor(e) {
 59779                super(s, "monthNames", !0);
 59780                this.abbr = (0, i.getInteger)({
 59781                  data: e.abbr,
 59782                  defaultValue: 0,
 59783                  validate: (e) => 1 === e,
 59784                });
 59785                this.month = new n.XFAObjectArray(12);
 59786              }
 59787            }
 59788            class NumberPattern extends n.StringObject {
 59789              constructor(e) {
 59790                super(s, "numberPattern");
 59791                this.name = (0, i.getStringOption)(e.name, [
 59792                  "full",
 59793                  "long",
 59794                  "med",
 59795                  "short",
 59796                ]);
 59797              }
 59798            }
 59799            class NumberPatterns extends n.XFAObject {
 59800              constructor(e) {
 59801                super(s, "numberPatterns", !0);
 59802                this.numberPattern = new n.XFAObjectArray(4);
 59803              }
 59804            }
 59805            class NumberSymbol extends n.StringObject {
 59806              constructor(e) {
 59807                super(s, "numberSymbol");
 59808                this.name = (0, i.getStringOption)(e.name, [
 59809                  "decimal",
 59810                  "grouping",
 59811                  "percent",
 59812                  "minus",
 59813                  "zero",
 59814                ]);
 59815              }
 59816            }
 59817            class NumberSymbols extends n.XFAObject {
 59818              constructor(e) {
 59819                super(s, "numberSymbols", !0);
 59820                this.numberSymbol = new n.XFAObjectArray(5);
 59821              }
 59822            }
 59823            class TimePattern extends n.StringObject {
 59824              constructor(e) {
 59825                super(s, "timePattern");
 59826                this.name = (0, i.getStringOption)(e.name, [
 59827                  "full",
 59828                  "long",
 59829                  "med",
 59830                  "short",
 59831                ]);
 59832              }
 59833            }
 59834            class TimePatterns extends n.XFAObject {
 59835              constructor(e) {
 59836                super(s, "timePatterns", !0);
 59837                this.timePattern = new n.XFAObjectArray(4);
 59838              }
 59839            }
 59840            class TypeFace extends n.XFAObject {
 59841              constructor(e) {
 59842                super(s, "typeFace", !0);
 59843                this.name = "" | e.name;
 59844              }
 59845            }
 59846            class TypeFaces extends n.XFAObject {
 59847              constructor(e) {
 59848                super(s, "typeFaces", !0);
 59849                this.typeFace = new n.XFAObjectArray();
 59850              }
 59851            }
 59852            class LocaleSetNamespace {
 59853              static [r.$buildXFAObject](e, t) {
 59854                if (LocaleSetNamespace.hasOwnProperty(e))
 59855                  return LocaleSetNamespace[e](t);
 59856              }
 59857              static calendarSymbols(e) {
 59858                return new CalendarSymbols(e);
 59859              }
 59860              static currencySymbol(e) {
 59861                return new CurrencySymbol(e);
 59862              }
 59863              static currencySymbols(e) {
 59864                return new CurrencySymbols(e);
 59865              }
 59866              static datePattern(e) {
 59867                return new DatePattern(e);
 59868              }
 59869              static datePatterns(e) {
 59870                return new DatePatterns(e);
 59871              }
 59872              static dateTimeSymbols(e) {
 59873                return new DateTimeSymbols(e);
 59874              }
 59875              static day(e) {
 59876                return new Day(e);
 59877              }
 59878              static dayNames(e) {
 59879                return new DayNames(e);
 59880              }
 59881              static era(e) {
 59882                return new Era(e);
 59883              }
 59884              static eraNames(e) {
 59885                return new EraNames(e);
 59886              }
 59887              static locale(e) {
 59888                return new Locale(e);
 59889              }
 59890              static localeSet(e) {
 59891                return new LocaleSet(e);
 59892              }
 59893              static meridiem(e) {
 59894                return new Meridiem(e);
 59895              }
 59896              static meridiemNames(e) {
 59897                return new MeridiemNames(e);
 59898              }
 59899              static month(e) {
 59900                return new Month(e);
 59901              }
 59902              static monthNames(e) {
 59903                return new MonthNames(e);
 59904              }
 59905              static numberPattern(e) {
 59906                return new NumberPattern(e);
 59907              }
 59908              static numberPatterns(e) {
 59909                return new NumberPatterns(e);
 59910              }
 59911              static numberSymbol(e) {
 59912                return new NumberSymbol(e);
 59913              }
 59914              static numberSymbols(e) {
 59915                return new NumberSymbols(e);
 59916              }
 59917              static timePattern(e) {
 59918                return new TimePattern(e);
 59919              }
 59920              static timePatterns(e) {
 59921                return new TimePatterns(e);
 59922              }
 59923              static typeFace(e) {
 59924                return new TypeFace(e);
 59925              }
 59926              static typeFaces(e) {
 59927                return new TypeFaces(e);
 59928              }
 59929            }
 59930            t.LocaleSetNamespace = LocaleSetNamespace;
 59931          },
 59932          (e, t, a) => {
 59933            Object.defineProperty(t, "__esModule", { value: !0 });
 59934            t.SignatureNamespace = void 0;
 59935            var r = a(81),
 59936              n = a(87);
 59937            const i = r.NamespaceIds.signature.id;
 59938            class Signature extends n.XFAObject {
 59939              constructor(e) {
 59940                super(i, "signature", !0);
 59941              }
 59942            }
 59943            class SignatureNamespace {
 59944              static [r.$buildXFAObject](e, t) {
 59945                if (SignatureNamespace.hasOwnProperty(e))
 59946                  return SignatureNamespace[e](t);
 59947              }
 59948              static signature(e) {
 59949                return new Signature(e);
 59950              }
 59951            }
 59952            t.SignatureNamespace = SignatureNamespace;
 59953          },
 59954          (e, t, a) => {
 59955            Object.defineProperty(t, "__esModule", { value: !0 });
 59956            t.StylesheetNamespace = void 0;
 59957            var r = a(81),
 59958              n = a(87);
 59959            const i = r.NamespaceIds.stylesheet.id;
 59960            class Stylesheet extends n.XFAObject {
 59961              constructor(e) {
 59962                super(i, "stylesheet", !0);
 59963              }
 59964            }
 59965            class StylesheetNamespace {
 59966              static [r.$buildXFAObject](e, t) {
 59967                if (StylesheetNamespace.hasOwnProperty(e))
 59968                  return StylesheetNamespace[e](t);
 59969              }
 59970              static stylesheet(e) {
 59971                return new Stylesheet(e);
 59972              }
 59973            }
 59974            t.StylesheetNamespace = StylesheetNamespace;
 59975          },
 59976          (e, t, a) => {
 59977            Object.defineProperty(t, "__esModule", { value: !0 });
 59978            t.XdpNamespace = void 0;
 59979            var r = a(81),
 59980              n = a(78),
 59981              i = a(87);
 59982            const s = r.NamespaceIds.xdp.id;
 59983            class Xdp extends i.XFAObject {
 59984              constructor(e) {
 59985                super(s, "xdp", !0);
 59986                this.uuid = e.uuid || "";
 59987                this.timeStamp = e.timeStamp || "";
 59988                this.config = null;
 59989                this.connectionSet = null;
 59990                this.datasets = null;
 59991                this.localeSet = null;
 59992                this.stylesheet = new i.XFAObjectArray();
 59993                this.template = null;
 59994              }
 59995              [n.$onChildCheck](e) {
 59996                const t = r.NamespaceIds[e[n.$nodeName]];
 59997                return t && e[n.$namespaceId] === t.id;
 59998              }
 59999            }
 60000            class XdpNamespace {
 60001              static [r.$buildXFAObject](e, t) {
 60002                if (XdpNamespace.hasOwnProperty(e)) return XdpNamespace[e](t);
 60003              }
 60004              static xdp(e) {
 60005                return new Xdp(e);
 60006              }
 60007            }
 60008            t.XdpNamespace = XdpNamespace;
 60009          },
 60010          (e, t, a) => {
 60011            Object.defineProperty(t, "__esModule", { value: !0 });
 60012            t.XhtmlNamespace = void 0;
 60013            var r = a(78),
 60014              n = a(81),
 60015              i = a(83),
 60016              s = a(84),
 60017              o = a(87);
 60018            const c = n.NamespaceIds.xhtml.id,
 60019              l = Symbol(),
 60020              h = new Set([
 60021                "color",
 60022                "font",
 60023                "font-family",
 60024                "font-size",
 60025                "font-stretch",
 60026                "font-style",
 60027                "font-weight",
 60028                "margin",
 60029                "margin-bottom",
 60030                "margin-left",
 60031                "margin-right",
 60032                "margin-top",
 60033                "letter-spacing",
 60034                "line-height",
 60035                "orphans",
 60036                "page-break-after",
 60037                "page-break-before",
 60038                "page-break-inside",
 60039                "tab-interval",
 60040                "tab-stop",
 60041                "text-align",
 60042                "text-decoration",
 60043                "text-indent",
 60044                "vertical-align",
 60045                "widows",
 60046                "kerning-mode",
 60047                "xfa-font-horizontal-scale",
 60048                "xfa-font-vertical-scale",
 60049                "xfa-spacerun",
 60050                "xfa-tab-stops",
 60051              ]),
 60052              u = new Map([
 60053                ["page-break-after", "breakAfter"],
 60054                ["page-break-before", "breakBefore"],
 60055                ["page-break-inside", "breakInside"],
 60056                ["kerning-mode", (e) => ("none" === e ? "none" : "normal")],
 60057                [
 60058                  "xfa-font-horizontal-scale",
 60059                  (e) =>
 60060                    `scaleX(${Math.max(0, Math.min(parseInt(e) / 100)).toFixed(2)})`,
 60061                ],
 60062                [
 60063                  "xfa-font-vertical-scale",
 60064                  (e) =>
 60065                    `scaleY(${Math.max(0, Math.min(parseInt(e) / 100)).toFixed(2)})`,
 60066                ],
 60067                ["xfa-spacerun", ""],
 60068                ["xfa-tab-stops", ""],
 60069                [
 60070                  "font-size",
 60071                  (e, t) => {
 60072                    e = t.fontSize = (0, s.getMeasurement)(e);
 60073                    return (0, i.measureToString)(0.99 * e);
 60074                  },
 60075                ],
 60076                [
 60077                  "letter-spacing",
 60078                  (e) => (0, i.measureToString)((0, s.getMeasurement)(e)),
 60079                ],
 60080                [
 60081                  "line-height",
 60082                  (e) => (0, i.measureToString)((0, s.getMeasurement)(e)),
 60083                ],
 60084                [
 60085                  "margin",
 60086                  (e) => (0, i.measureToString)((0, s.getMeasurement)(e)),
 60087                ],
 60088                [
 60089                  "margin-bottom",
 60090                  (e) => (0, i.measureToString)((0, s.getMeasurement)(e)),
 60091                ],
 60092                [
 60093                  "margin-left",
 60094                  (e) => (0, i.measureToString)((0, s.getMeasurement)(e)),
 60095                ],
 60096                [
 60097                  "margin-right",
 60098                  (e) => (0, i.measureToString)((0, s.getMeasurement)(e)),
 60099                ],
 60100                [
 60101                  "margin-top",
 60102                  (e) => (0, i.measureToString)((0, s.getMeasurement)(e)),
 60103                ],
 60104                [
 60105                  "text-indent",
 60106                  (e) => (0, i.measureToString)((0, s.getMeasurement)(e)),
 60107                ],
 60108                ["font-family", (e) => e],
 60109                [
 60110                  "vertical-align",
 60111                  (e) => (0, i.measureToString)((0, s.getMeasurement)(e)),
 60112                ],
 60113              ]),
 60114              d = /\s+/g,
 60115              f = /[\r\n]+/g,
 60116              g = /\r\n?/g;
 60117            function mapStyle(e, t, a) {
 60118              const n = Object.create(null);
 60119              if (!e) return n;
 60120              const o = Object.create(null);
 60121              for (const [t, a] of e.split(";").map((e) => e.split(":", 2))) {
 60122                const e = u.get(t);
 60123                if ("" === e) continue;
 60124                let r = a;
 60125                e && (r = "string" == typeof e ? e : e(a, o));
 60126                t.endsWith("scale")
 60127                  ? (n.transform = n.transform ? `${n[t]} ${r}` : r)
 60128                  : (n[t.replaceAll(/-([a-zA-Z])/g, (e, t) => t.toUpperCase())] =
 60129                      r);
 60130              }
 60131              n.fontFamily &&
 60132                (0, i.setFontFamily)(
 60133                  {
 60134                    typeface: n.fontFamily,
 60135                    weight: n.fontWeight || "normal",
 60136                    posture: n.fontStyle || "normal",
 60137                    size: o.fontSize || 0,
 60138                  },
 60139                  t,
 60140                  t[r.$globalData].fontFinder,
 60141                  n,
 60142                );
 60143              if (
 60144                a &&
 60145                n.verticalAlign &&
 60146                "0px" !== n.verticalAlign &&
 60147                n.fontSize
 60148              ) {
 60149                const e = 0.583,
 60150                  t = 0.333,
 60151                  a = (0, s.getMeasurement)(n.fontSize);
 60152                n.fontSize = (0, i.measureToString)(a * e);
 60153                n.verticalAlign = (0, i.measureToString)(
 60154                  Math.sign((0, s.getMeasurement)(n.verticalAlign)) * a * t,
 60155                );
 60156              }
 60157              a &&
 60158                n.fontSize &&
 60159                (n.fontSize = `calc(${n.fontSize} * var(--scale-factor))`);
 60160              (0, i.fixTextIndent)(n);
 60161              return n;
 60162            }
 60163            const p = new Set(["body", "html"]);
 60164            class XhtmlObject extends o.XmlObject {
 60165              constructor(e, t) {
 60166                super(c, t);
 60167                this[l] = !1;
 60168                this.style = e.style || "";
 60169              }
 60170              [r.$clean](e) {
 60171                super[r.$clean](e);
 60172                this.style = (function checkStyle(e) {
 60173                  return e.style
 60174                    ? e.style
 60175                        .trim()
 60176                        .split(/\s*;\s*/)
 60177                        .filter((e) => !!e)
 60178                        .map((e) => e.split(/\s*:\s*/, 2))
 60179                        .filter(([t, a]) => {
 60180                          "font-family" === t &&
 60181                            e[r.$globalData].usedTypefaces.add(a);
 60182                          return h.has(t);
 60183                        })
 60184                        .map((e) => e.join(":"))
 60185                        .join(";")
 60186                    : "";
 60187                })(this);
 60188              }
 60189              [r.$acceptWhitespace]() {
 60190                return !p.has(this[r.$nodeName]);
 60191              }
 60192              [r.$onText](e, t = !1) {
 60193                if (t) this[l] = !0;
 60194                else {
 60195                  e = e.replaceAll(f, "");
 60196                  this.style.includes("xfa-spacerun:yes") ||
 60197                    (e = e.replaceAll(d, " "));
 60198                }
 60199                e && (this[r.$content] += e);
 60200              }
 60201              [r.$pushGlyphs](e, t = !0) {
 60202                const a = Object.create(null),
 60203                  n = { top: NaN, bottom: NaN, left: NaN, right: NaN };
 60204                let i = null;
 60205                for (const [e, t] of this.style
 60206                  .split(";")
 60207                  .map((e) => e.split(":", 2)))
 60208                  switch (e) {
 60209                    case "font-family":
 60210                      a.typeface = (0, s.stripQuotes)(t);
 60211                      break;
 60212                    case "font-size":
 60213                      a.size = (0, s.getMeasurement)(t);
 60214                      break;
 60215                    case "font-weight":
 60216                      a.weight = t;
 60217                      break;
 60218                    case "font-style":
 60219                      a.posture = t;
 60220                      break;
 60221                    case "letter-spacing":
 60222                      a.letterSpacing = (0, s.getMeasurement)(t);
 60223                      break;
 60224                    case "margin":
 60225                      const e = t
 60226                        .split(/ \t/)
 60227                        .map((e) => (0, s.getMeasurement)(e));
 60228                      switch (e.length) {
 60229                        case 1:
 60230                          n.top = n.bottom = n.left = n.right = e[0];
 60231                          break;
 60232                        case 2:
 60233                          n.top = n.bottom = e[0];
 60234                          n.left = n.right = e[1];
 60235                          break;
 60236                        case 3:
 60237                          n.top = e[0];
 60238                          n.bottom = e[2];
 60239                          n.left = n.right = e[1];
 60240                          break;
 60241                        case 4:
 60242                          n.top = e[0];
 60243                          n.left = e[1];
 60244                          n.bottom = e[2];
 60245                          n.right = e[3];
 60246                      }
 60247                      break;
 60248                    case "margin-top":
 60249                      n.top = (0, s.getMeasurement)(t);
 60250                      break;
 60251                    case "margin-bottom":
 60252                      n.bottom = (0, s.getMeasurement)(t);
 60253                      break;
 60254                    case "margin-left":
 60255                      n.left = (0, s.getMeasurement)(t);
 60256                      break;
 60257                    case "margin-right":
 60258                      n.right = (0, s.getMeasurement)(t);
 60259                      break;
 60260                    case "line-height":
 60261                      i = (0, s.getMeasurement)(t);
 60262                  }
 60263                e.pushData(a, n, i);
 60264                if (this[r.$content]) e.addString(this[r.$content]);
 60265                else
 60266                  for (const t of this[r.$getChildren]())
 60267                    "#text" !== t[r.$nodeName]
 60268                      ? t[r.$pushGlyphs](e)
 60269                      : e.addString(t[r.$content]);
 60270                t && e.popFont();
 60271              }
 60272              [r.$toHTML](e) {
 60273                const t = [];
 60274                this[r.$extra] = { children: t };
 60275                this[r.$childrenToHTML]({});
 60276                if (0 === t.length && !this[r.$content])
 60277                  return s.HTMLResult.EMPTY;
 60278                let a;
 60279                a = this[l]
 60280                  ? this[r.$content]
 60281                    ? this[r.$content].replaceAll(g, "\n")
 60282                    : void 0
 60283                  : this[r.$content] || void 0;
 60284                return s.HTMLResult.success({
 60285                  name: this[r.$nodeName],
 60286                  attributes: {
 60287                    href: this.href,
 60288                    style: mapStyle(this.style, this, this[l]),
 60289                  },
 60290                  children: t,
 60291                  value: a,
 60292                });
 60293              }
 60294            }
 60295            class A extends XhtmlObject {
 60296              constructor(e) {
 60297                super(e, "a");
 60298                this.href = (0, i.fixURL)(e.href) || "";
 60299              }
 60300            }
 60301            class B extends XhtmlObject {
 60302              constructor(e) {
 60303                super(e, "b");
 60304              }
 60305              [r.$pushGlyphs](e) {
 60306                e.pushFont({ weight: "bold" });
 60307                super[r.$pushGlyphs](e);
 60308                e.popFont();
 60309              }
 60310            }
 60311            class Body extends XhtmlObject {
 60312              constructor(e) {
 60313                super(e, "body");
 60314              }
 60315              [r.$toHTML](e) {
 60316                const t = super[r.$toHTML](e),
 60317                  { html: a } = t;
 60318                if (!a) return s.HTMLResult.EMPTY;
 60319                a.name = "div";
 60320                a.attributes.class = ["xfaRich"];
 60321                return t;
 60322              }
 60323            }
 60324            class Br extends XhtmlObject {
 60325              constructor(e) {
 60326                super(e, "br");
 60327              }
 60328              [r.$text]() {
 60329                return "\n";
 60330              }
 60331              [r.$pushGlyphs](e) {
 60332                e.addString("\n");
 60333              }
 60334              [r.$toHTML](e) {
 60335                return s.HTMLResult.success({ name: "br" });
 60336              }
 60337            }
 60338            class Html extends XhtmlObject {
 60339              constructor(e) {
 60340                super(e, "html");
 60341              }
 60342              [r.$toHTML](e) {
 60343                const t = [];
 60344                this[r.$extra] = { children: t };
 60345                this[r.$childrenToHTML]({});
 60346                if (0 === t.length)
 60347                  return s.HTMLResult.success({
 60348                    name: "div",
 60349                    attributes: { class: ["xfaRich"], style: {} },
 60350                    value: this[r.$content] || "",
 60351                  });
 60352                if (1 === t.length) {
 60353                  const e = t[0];
 60354                  if (e.attributes?.class.includes("xfaRich"))
 60355                    return s.HTMLResult.success(e);
 60356                }
 60357                return s.HTMLResult.success({
 60358                  name: "div",
 60359                  attributes: { class: ["xfaRich"], style: {} },
 60360                  children: t,
 60361                });
 60362              }
 60363            }
 60364            class I extends XhtmlObject {
 60365              constructor(e) {
 60366                super(e, "i");
 60367              }
 60368              [r.$pushGlyphs](e) {
 60369                e.pushFont({ posture: "italic" });
 60370                super[r.$pushGlyphs](e);
 60371                e.popFont();
 60372              }
 60373            }
 60374            class Li extends XhtmlObject {
 60375              constructor(e) {
 60376                super(e, "li");
 60377              }
 60378            }
 60379            class Ol extends XhtmlObject {
 60380              constructor(e) {
 60381                super(e, "ol");
 60382              }
 60383            }
 60384            class P extends XhtmlObject {
 60385              constructor(e) {
 60386                super(e, "p");
 60387              }
 60388              [r.$pushGlyphs](e) {
 60389                super[r.$pushGlyphs](e, !1);
 60390                e.addString("\n");
 60391                e.addPara();
 60392                e.popFont();
 60393              }
 60394              [r.$text]() {
 60395                return this[r.$getParent]()[r.$getChildren]().at(-1) === this
 60396                  ? super[r.$text]()
 60397                  : super[r.$text]() + "\n";
 60398              }
 60399            }
 60400            class Span extends XhtmlObject {
 60401              constructor(e) {
 60402                super(e, "span");
 60403              }
 60404            }
 60405            class Sub extends XhtmlObject {
 60406              constructor(e) {
 60407                super(e, "sub");
 60408              }
 60409            }
 60410            class Sup extends XhtmlObject {
 60411              constructor(e) {
 60412                super(e, "sup");
 60413              }
 60414            }
 60415            class Ul extends XhtmlObject {
 60416              constructor(e) {
 60417                super(e, "ul");
 60418              }
 60419            }
 60420            class XhtmlNamespace {
 60421              static [n.$buildXFAObject](e, t) {
 60422                if (XhtmlNamespace.hasOwnProperty(e)) return XhtmlNamespace[e](t);
 60423              }
 60424              static a(e) {
 60425                return new A(e);
 60426              }
 60427              static b(e) {
 60428                return new B(e);
 60429              }
 60430              static body(e) {
 60431                return new Body(e);
 60432              }
 60433              static br(e) {
 60434                return new Br(e);
 60435              }
 60436              static html(e) {
 60437                return new Html(e);
 60438              }
 60439              static i(e) {
 60440                return new I(e);
 60441              }
 60442              static li(e) {
 60443                return new Li(e);
 60444              }
 60445              static ol(e) {
 60446                return new Ol(e);
 60447              }
 60448              static p(e) {
 60449                return new P(e);
 60450              }
 60451              static span(e) {
 60452                return new Span(e);
 60453              }
 60454              static sub(e) {
 60455                return new Sub(e);
 60456              }
 60457              static sup(e) {
 60458                return new Sup(e);
 60459              }
 60460              static ul(e) {
 60461                return new Ul(e);
 60462              }
 60463            }
 60464            t.XhtmlNamespace = XhtmlNamespace;
 60465          },
 60466          (e, t, a) => {
 60467            Object.defineProperty(t, "__esModule", { value: !0 });
 60468            t.UnknownNamespace = void 0;
 60469            var r = a(81),
 60470              n = a(87);
 60471            class UnknownNamespace {
 60472              constructor(e) {
 60473                this.namespaceId = e;
 60474              }
 60475              [r.$buildXFAObject](e, t) {
 60476                return new n.XmlObject(this.namespaceId, e, t);
 60477              }
 60478            }
 60479            t.UnknownNamespace = UnknownNamespace;
 60480          },
 60481          (e, t, a) => {
 60482            Object.defineProperty(t, "__esModule", { value: !0 });
 60483            t.DatasetReader = void 0;
 60484            var r = a(2),
 60485              n = a(3),
 60486              i = a(71);
 60487            function decodeString(e) {
 60488              try {
 60489                return (0, r.stringToUTF8String)(e);
 60490              } catch (t) {
 60491                (0, r.warn)(`UTF-8 decoding failed: "${t}".`);
 60492                return e;
 60493              }
 60494            }
 60495            class DatasetXMLParser extends i.SimpleXMLParser {
 60496              constructor(e) {
 60497                super(e);
 60498                this.node = null;
 60499              }
 60500              onEndElement(e) {
 60501                const t = super.onEndElement(e);
 60502                if (t && "xfa:datasets" === e) {
 60503                  this.node = t;
 60504                  throw new Error("Aborting DatasetXMLParser.");
 60505                }
 60506              }
 60507            }
 60508            t.DatasetReader = class DatasetReader {
 60509              constructor(e) {
 60510                if (e.datasets)
 60511                  this.node = new i.SimpleXMLParser({
 60512                    hasAttributes: !0,
 60513                  }).parseFromString(e.datasets).documentElement;
 60514                else {
 60515                  const t = new DatasetXMLParser({ hasAttributes: !0 });
 60516                  try {
 60517                    t.parseFromString(e["xdp:xdp"]);
 60518                  } catch {}
 60519                  this.node = t.node;
 60520                }
 60521              }
 60522              getValue(e) {
 60523                if (!this.node || !e) return "";
 60524                const t = this.node.searchNode((0, n.parseXFAPath)(e), 0);
 60525                if (!t) return "";
 60526                const a = t.firstChild;
 60527                return "value" === a?.nodeName
 60528                  ? t.children.map((e) => decodeString(e.textContent))
 60529                  : decodeString(t.textContent);
 60530              }
 60531            };
 60532          },
 60533          (e, t, a) => {
 60534            Object.defineProperty(t, "__esModule", { value: !0 });
 60535            t.XRef = void 0;
 60536            var r = a(2),
 60537              n = a(4),
 60538              i = a(16),
 60539              s = a(3),
 60540              o = a(5),
 60541              c = a(74);
 60542            t.XRef = class XRef {
 60543              #B = null;
 60544              constructor(e, t) {
 60545                this.stream = e;
 60546                this.pdfManager = t;
 60547                this.entries = [];
 60548                this._xrefStms = new Set();
 60549                this._cacheMap = new Map();
 60550                this._pendingRefs = new n.RefSet();
 60551                this._newPersistentRefNum = null;
 60552                this._newTemporaryRefNum = null;
 60553              }
 60554              getNewPersistentRef(e) {
 60555                null === this._newPersistentRefNum &&
 60556                  (this._newPersistentRefNum = this.entries.length || 1);
 60557                const t = this._newPersistentRefNum++;
 60558                this._cacheMap.set(t, e);
 60559                return n.Ref.get(t, 0);
 60560              }
 60561              getNewTemporaryRef() {
 60562                null === this._newTemporaryRefNum &&
 60563                  (this._newTemporaryRefNum = this.entries.length || 1);
 60564                return n.Ref.get(this._newTemporaryRefNum++, 0);
 60565              }
 60566              resetNewTemporaryRef() {
 60567                this._newTemporaryRefNum = null;
 60568              }
 60569              setStartXRef(e) {
 60570                this.startXRefQueue = [e];
 60571              }
 60572              parse(e = !1) {
 60573                let t, a, i;
 60574                if (e) {
 60575                  (0, r.warn)("Indexing all PDF objects");
 60576                  t = this.indexObjects();
 60577                } else t = this.readXRef();
 60578                t.assignXref(this);
 60579                this.trailer = t;
 60580                try {
 60581                  a = t.get("Encrypt");
 60582                } catch (e) {
 60583                  if (e instanceof s.MissingDataException) throw e;
 60584                  (0, r.warn)(
 60585                    `XRef.parse - Invalid "Encrypt" reference: "${e}".`,
 60586                  );
 60587                }
 60588                if (a instanceof n.Dict) {
 60589                  const e = t.get("ID"),
 60590                    r = e?.length ? e[0] : "";
 60591                  a.suppressEncryption = !0;
 60592                  this.encrypt = new c.CipherTransformFactory(
 60593                    a,
 60594                    r,
 60595                    this.pdfManager.password,
 60596                  );
 60597                }
 60598                try {
 60599                  i = t.get("Root");
 60600                } catch (e) {
 60601                  if (e instanceof s.MissingDataException) throw e;
 60602                  (0, r.warn)(`XRef.parse - Invalid "Root" reference: "${e}".`);
 60603                }
 60604                if (i instanceof n.Dict)
 60605                  try {
 60606                    if (i.get("Pages") instanceof n.Dict) {
 60607                      this.root = i;
 60608                      return;
 60609                    }
 60610                  } catch (e) {
 60611                    if (e instanceof s.MissingDataException) throw e;
 60612                    (0, r.warn)(
 60613                      `XRef.parse - Invalid "Pages" reference: "${e}".`,
 60614                    );
 60615                  }
 60616                if (!e) throw new s.XRefParseException();
 60617                throw new r.InvalidPDFException("Invalid Root reference.");
 60618              }
 60619              processXRefTable(e) {
 60620                "tableState" in this ||
 60621                  (this.tableState = {
 60622                    entryNum: 0,
 60623                    streamPos: e.lexer.stream.pos,
 60624                    parserBuf1: e.buf1,
 60625                    parserBuf2: e.buf2,
 60626                  });
 60627                const t = this.readXRefTable(e);
 60628                if (!(0, n.isCmd)(t, "trailer"))
 60629                  throw new r.FormatError(
 60630                    "Invalid XRef table: could not find trailer dictionary",
 60631                  );
 60632                let a = e.getObj();
 60633                a instanceof n.Dict || !a.dict || (a = a.dict);
 60634                if (!(a instanceof n.Dict))
 60635                  throw new r.FormatError(
 60636                    "Invalid XRef table: could not parse trailer dictionary",
 60637                  );
 60638                delete this.tableState;
 60639                return a;
 60640              }
 60641              readXRefTable(e) {
 60642                const t = e.lexer.stream,
 60643                  a = this.tableState;
 60644                t.pos = a.streamPos;
 60645                e.buf1 = a.parserBuf1;
 60646                e.buf2 = a.parserBuf2;
 60647                let i;
 60648                for (;;) {
 60649                  if (!("firstEntryNum" in a) || !("entryCount" in a)) {
 60650                    if ((0, n.isCmd)((i = e.getObj()), "trailer")) break;
 60651                    a.firstEntryNum = i;
 60652                    a.entryCount = e.getObj();
 60653                  }
 60654                  let s = a.firstEntryNum;
 60655                  const o = a.entryCount;
 60656                  if (!Number.isInteger(s) || !Number.isInteger(o))
 60657                    throw new r.FormatError(
 60658                      "Invalid XRef table: wrong types in subsection header",
 60659                    );
 60660                  for (let i = a.entryNum; i < o; i++) {
 60661                    a.streamPos = t.pos;
 60662                    a.entryNum = i;
 60663                    a.parserBuf1 = e.buf1;
 60664                    a.parserBuf2 = e.buf2;
 60665                    const c = {};
 60666                    c.offset = e.getObj();
 60667                    c.gen = e.getObj();
 60668                    const l = e.getObj();
 60669                    if (l instanceof n.Cmd)
 60670                      switch (l.cmd) {
 60671                        case "f":
 60672                          c.free = !0;
 60673                          break;
 60674                        case "n":
 60675                          c.uncompressed = !0;
 60676                      }
 60677                    if (
 60678                      !Number.isInteger(c.offset) ||
 60679                      !Number.isInteger(c.gen) ||
 60680                      (!c.free && !c.uncompressed)
 60681                    )
 60682                      throw new r.FormatError(
 60683                        `Invalid entry in XRef subsection: ${s}, ${o}`,
 60684                      );
 60685                    0 === i && c.free && 1 === s && (s = 0);
 60686                    this.entries[i + s] || (this.entries[i + s] = c);
 60687                  }
 60688                  a.entryNum = 0;
 60689                  a.streamPos = t.pos;
 60690                  a.parserBuf1 = e.buf1;
 60691                  a.parserBuf2 = e.buf2;
 60692                  delete a.firstEntryNum;
 60693                  delete a.entryCount;
 60694                }
 60695                if (this.entries[0] && !this.entries[0].free)
 60696                  throw new r.FormatError(
 60697                    "Invalid XRef table: unexpected first object",
 60698                  );
 60699                return i;
 60700              }
 60701              processXRefStream(e) {
 60702                if (!("streamState" in this)) {
 60703                  const t = e.dict,
 60704                    a = t.get("W");
 60705                  let r = t.get("Index");
 60706                  r || (r = [0, t.get("Size")]);
 60707                  this.streamState = {
 60708                    entryRanges: r,
 60709                    byteWidths: a,
 60710                    entryNum: 0,
 60711                    streamPos: e.pos,
 60712                  };
 60713                }
 60714                this.readXRefStream(e);
 60715                delete this.streamState;
 60716                return e.dict;
 60717              }
 60718              readXRefStream(e) {
 60719                const t = this.streamState;
 60720                e.pos = t.streamPos;
 60721                const [a, n, i] = t.byteWidths,
 60722                  s = t.entryRanges;
 60723                for (; s.length > 0; ) {
 60724                  const [o, c] = s;
 60725                  if (!Number.isInteger(o) || !Number.isInteger(c))
 60726                    throw new r.FormatError(
 60727                      `Invalid XRef range fields: ${o}, ${c}`,
 60728                    );
 60729                  if (
 60730                    !Number.isInteger(a) ||
 60731                    !Number.isInteger(n) ||
 60732                    !Number.isInteger(i)
 60733                  )
 60734                    throw new r.FormatError(
 60735                      `Invalid XRef entry fields length: ${o}, ${c}`,
 60736                    );
 60737                  for (let s = t.entryNum; s < c; ++s) {
 60738                    t.entryNum = s;
 60739                    t.streamPos = e.pos;
 60740                    let c = 0,
 60741                      l = 0,
 60742                      h = 0;
 60743                    for (let t = 0; t < a; ++t) {
 60744                      const t = e.getByte();
 60745                      if (-1 === t)
 60746                        throw new r.FormatError(
 60747                          "Invalid XRef byteWidths 'type'.",
 60748                        );
 60749                      c = (c << 8) | t;
 60750                    }
 60751                    0 === a && (c = 1);
 60752                    for (let t = 0; t < n; ++t) {
 60753                      const t = e.getByte();
 60754                      if (-1 === t)
 60755                        throw new r.FormatError(
 60756                          "Invalid XRef byteWidths 'offset'.",
 60757                        );
 60758                      l = (l << 8) | t;
 60759                    }
 60760                    for (let t = 0; t < i; ++t) {
 60761                      const t = e.getByte();
 60762                      if (-1 === t)
 60763                        throw new r.FormatError(
 60764                          "Invalid XRef byteWidths 'generation'.",
 60765                        );
 60766                      h = (h << 8) | t;
 60767                    }
 60768                    const u = {};
 60769                    u.offset = l;
 60770                    u.gen = h;
 60771                    switch (c) {
 60772                      case 0:
 60773                        u.free = !0;
 60774                        break;
 60775                      case 1:
 60776                        u.uncompressed = !0;
 60777                        break;
 60778                      case 2:
 60779                        break;
 60780                      default:
 60781                        throw new r.FormatError(`Invalid XRef entry type: ${c}`);
 60782                    }
 60783                    this.entries[o + s] || (this.entries[o + s] = u);
 60784                  }
 60785                  t.entryNum = 0;
 60786                  t.streamPos = e.pos;
 60787                  s.splice(0, 2);
 60788                }
 60789              }
 60790              indexObjects() {
 60791                function readToken(e, t) {
 60792                  let a = "",
 60793                    r = e[t];
 60794                  for (
 60795                    ;
 60796                    10 !== r && 13 !== r && 60 !== r && !(++t >= e.length);
 60797  
 60798                  ) {
 60799                    a += String.fromCharCode(r);
 60800                    r = e[t];
 60801                  }
 60802                  return a;
 60803                }
 60804                function skipUntil(e, t, a) {
 60805                  const r = a.length,
 60806                    n = e.length;
 60807                  let i = 0;
 60808                  for (; t < n; ) {
 60809                    let n = 0;
 60810                    for (; n < r && e[t + n] === a[n]; ) ++n;
 60811                    if (n >= r) break;
 60812                    t++;
 60813                    i++;
 60814                  }
 60815                  return i;
 60816                }
 60817                const e = /\b(endobj|\d+\s+\d+\s+obj|xref|trailer\s*<<)\b/g,
 60818                  t = /\b(startxref|\d+\s+\d+\s+obj)\b/g,
 60819                  a = /^(\d+)\s+(\d+)\s+obj\b/,
 60820                  o = new Uint8Array([116, 114, 97, 105, 108, 101, 114]),
 60821                  c = new Uint8Array([
 60822                    115, 116, 97, 114, 116, 120, 114, 101, 102,
 60823                  ]),
 60824                  l = new Uint8Array([47, 88, 82, 101, 102]);
 60825                this.entries.length = 0;
 60826                this._cacheMap.clear();
 60827                const h = this.stream;
 60828                h.pos = 0;
 60829                const u = h.getBytes(),
 60830                  d = (0, r.bytesToString)(u),
 60831                  f = u.length;
 60832                let g = h.start;
 60833                const p = [],
 60834                  m = [];
 60835                for (; g < f; ) {
 60836                  let n = u[g];
 60837                  if (9 === n || 10 === n || 13 === n || 32 === n) {
 60838                    ++g;
 60839                    continue;
 60840                  }
 60841                  if (37 === n) {
 60842                    do {
 60843                      ++g;
 60844                      if (g >= f) break;
 60845                      n = u[g];
 60846                    } while (10 !== n && 13 !== n);
 60847                    continue;
 60848                  }
 60849                  const b = readToken(u, g);
 60850                  let y;
 60851                  if (
 60852                    b.startsWith("xref") &&
 60853                    (4 === b.length || /\s/.test(b[4]))
 60854                  ) {
 60855                    g += skipUntil(u, g, o);
 60856                    p.push(g);
 60857                    g += skipUntil(u, g, c);
 60858                  } else if ((y = a.exec(b))) {
 60859                    const t = 0 | y[1],
 60860                      a = 0 | y[2],
 60861                      n = g + b.length;
 60862                    let o,
 60863                      c = !1;
 60864                    if (this.entries[t]) {
 60865                      if (this.entries[t].gen === a)
 60866                        try {
 60867                          new i.Parser({
 60868                            lexer: new i.Lexer(h.makeSubStream(n)),
 60869                          }).getObj();
 60870                          c = !0;
 60871                        } catch (e) {
 60872                          e instanceof s.ParserEOFException
 60873                            ? (0, r.warn)(
 60874                                `indexObjects -- checking object (${b}): "${e}".`,
 60875                              )
 60876                            : (c = !0);
 60877                        }
 60878                    } else c = !0;
 60879                    c &&
 60880                      (this.entries[t] = {
 60881                        offset: g - h.start,
 60882                        gen: a,
 60883                        uncompressed: !0,
 60884                      });
 60885                    e.lastIndex = n;
 60886                    const p = e.exec(d);
 60887                    if (p) {
 60888                      o = e.lastIndex + 1 - g;
 60889                      if ("endobj" !== p[1]) {
 60890                        (0, r.warn)(
 60891                          `indexObjects: Found "${p[1]}" inside of another "obj", caused by missing "endobj" -- trying to recover.`,
 60892                        );
 60893                        o -= p[1].length + 1;
 60894                      }
 60895                    } else o = f - g;
 60896                    const w = u.subarray(g, g + o),
 60897                      S = skipUntil(w, 0, l);
 60898                    if (S < o && w[S + 5] < 64) {
 60899                      m.push(g - h.start);
 60900                      this._xrefStms.add(g - h.start);
 60901                    }
 60902                    g += o;
 60903                  } else if (
 60904                    b.startsWith("trailer") &&
 60905                    (7 === b.length || /\s/.test(b[7]))
 60906                  ) {
 60907                    p.push(g);
 60908                    const e = g + b.length;
 60909                    let a;
 60910                    t.lastIndex = e;
 60911                    const n = t.exec(d);
 60912                    if (n) {
 60913                      a = t.lastIndex + 1 - g;
 60914                      if ("startxref" !== n[1]) {
 60915                        (0, r.warn)(
 60916                          `indexObjects: Found "${n[1]}" after "trailer", caused by missing "startxref" -- trying to recover.`,
 60917                        );
 60918                        a -= n[1].length + 1;
 60919                      }
 60920                    } else a = f - g;
 60921                    g += a;
 60922                  } else g += b.length + 1;
 60923                }
 60924                for (const e of m) {
 60925                  this.startXRefQueue.push(e);
 60926                  this.readXRef(!0);
 60927                }
 60928                const b = [];
 60929                let y,
 60930                  w,
 60931                  S = !1;
 60932                for (const e of p) {
 60933                  h.pos = e;
 60934                  const t = new i.Parser({
 60935                      lexer: new i.Lexer(h),
 60936                      xref: this,
 60937                      allowStreams: !0,
 60938                      recoveryMode: !0,
 60939                    }),
 60940                    a = t.getObj();
 60941                  if (!(0, n.isCmd)(a, "trailer")) continue;
 60942                  const r = t.getObj();
 60943                  if (r instanceof n.Dict) {
 60944                    b.push(r);
 60945                    r.has("Encrypt") && (S = !0);
 60946                  }
 60947                }
 60948                for (const e of [...b, "genFallback", ...b]) {
 60949                  if ("genFallback" === e) {
 60950                    if (!w) break;
 60951                    this._generationFallback = !0;
 60952                    continue;
 60953                  }
 60954                  let t = !1;
 60955                  try {
 60956                    const a = e.get("Root");
 60957                    if (!(a instanceof n.Dict)) continue;
 60958                    const r = a.get("Pages");
 60959                    if (!(r instanceof n.Dict)) continue;
 60960                    const i = r.get("Count");
 60961                    Number.isInteger(i) && (t = !0);
 60962                  } catch (e) {
 60963                    w = e;
 60964                    continue;
 60965                  }
 60966                  if (t && (!S || e.has("Encrypt")) && e.has("ID")) return e;
 60967                  y = e;
 60968                }
 60969                if (y) return y;
 60970                if (this.topDict) return this.topDict;
 60971                throw new r.InvalidPDFException("Invalid PDF structure.");
 60972              }
 60973              readXRef(e = !1) {
 60974                const t = this.stream,
 60975                  a = new Set();
 60976                for (; this.startXRefQueue.length; ) {
 60977                  try {
 60978                    const e = this.startXRefQueue[0];
 60979                    if (a.has(e)) {
 60980                      (0, r.warn)(
 60981                        "readXRef - skipping XRef table since it was already parsed.",
 60982                      );
 60983                      this.startXRefQueue.shift();
 60984                      continue;
 60985                    }
 60986                    a.add(e);
 60987                    t.pos = e + t.start;
 60988                    const s = new i.Parser({
 60989                      lexer: new i.Lexer(t),
 60990                      xref: this,
 60991                      allowStreams: !0,
 60992                    });
 60993                    let c,
 60994                      l = s.getObj();
 60995                    if ((0, n.isCmd)(l, "xref")) {
 60996                      c = this.processXRefTable(s);
 60997                      this.topDict || (this.topDict = c);
 60998                      l = c.get("XRefStm");
 60999                      if (Number.isInteger(l) && !this._xrefStms.has(l)) {
 61000                        this._xrefStms.add(l);
 61001                        this.startXRefQueue.push(l);
 61002                        this.#B ??= l;
 61003                      }
 61004                    } else {
 61005                      if (!Number.isInteger(l))
 61006                        throw new r.FormatError("Invalid XRef stream header");
 61007                      if (
 61008                        !(
 61009                          Number.isInteger(s.getObj()) &&
 61010                          (0, n.isCmd)(s.getObj(), "obj") &&
 61011                          (l = s.getObj()) instanceof o.BaseStream
 61012                        )
 61013                      )
 61014                        throw new r.FormatError("Invalid XRef stream");
 61015                      c = this.processXRefStream(l);
 61016                      this.topDict || (this.topDict = c);
 61017                      if (!c)
 61018                        throw new r.FormatError("Failed to read XRef stream");
 61019                    }
 61020                    l = c.get("Prev");
 61021                    Number.isInteger(l)
 61022                      ? this.startXRefQueue.push(l)
 61023                      : l instanceof n.Ref && this.startXRefQueue.push(l.num);
 61024                  } catch (e) {
 61025                    if (e instanceof s.MissingDataException) throw e;
 61026                    (0, r.info)("(while reading XRef): " + e);
 61027                  }
 61028                  this.startXRefQueue.shift();
 61029                }
 61030                if (this.topDict) return this.topDict;
 61031                if (!e) throw new s.XRefParseException();
 61032              }
 61033              get lastXRefStreamPos() {
 61034                return (
 61035                  this.#B ??
 61036                  (this._xrefStms.size > 0 ? Math.max(...this._xrefStms) : null)
 61037                );
 61038              }
 61039              getEntry(e) {
 61040                const t = this.entries[e];
 61041                return t && !t.free && t.offset ? t : null;
 61042              }
 61043              fetchIfRef(e, t = !1) {
 61044                return e instanceof n.Ref ? this.fetch(e, t) : e;
 61045              }
 61046              fetch(e, t = !1) {
 61047                if (!(e instanceof n.Ref))
 61048                  throw new Error("ref object is not a reference");
 61049                const a = e.num,
 61050                  i = this._cacheMap.get(a);
 61051                if (void 0 !== i) {
 61052                  i instanceof n.Dict && !i.objId && (i.objId = e.toString());
 61053                  return i;
 61054                }
 61055                let s = this.getEntry(a);
 61056                if (null === s) {
 61057                  this._cacheMap.set(a, s);
 61058                  return s;
 61059                }
 61060                if (this._pendingRefs.has(e)) {
 61061                  this._pendingRefs.remove(e);
 61062                  (0, r.warn)(`Ignoring circular reference: ${e}.`);
 61063                  return n.CIRCULAR_REF;
 61064                }
 61065                this._pendingRefs.put(e);
 61066                try {
 61067                  s = s.uncompressed
 61068                    ? this.fetchUncompressed(e, s, t)
 61069                    : this.fetchCompressed(e, s, t);
 61070                  this._pendingRefs.remove(e);
 61071                } catch (t) {
 61072                  this._pendingRefs.remove(e);
 61073                  throw t;
 61074                }
 61075                s instanceof n.Dict
 61076                  ? (s.objId = e.toString())
 61077                  : s instanceof o.BaseStream && (s.dict.objId = e.toString());
 61078                return s;
 61079              }
 61080              fetchUncompressed(e, t, a = !1) {
 61081                const c = e.gen;
 61082                let l = e.num;
 61083                if (t.gen !== c) {
 61084                  const i = `Inconsistent generation in XRef: ${e}`;
 61085                  if (this._generationFallback && t.gen < c) {
 61086                    (0, r.warn)(i);
 61087                    return this.fetchUncompressed(n.Ref.get(l, t.gen), t, a);
 61088                  }
 61089                  throw new s.XRefEntryException(i);
 61090                }
 61091                const h = this.stream.makeSubStream(t.offset + this.stream.start),
 61092                  u = new i.Parser({
 61093                    lexer: new i.Lexer(h),
 61094                    xref: this,
 61095                    allowStreams: !0,
 61096                  }),
 61097                  d = u.getObj(),
 61098                  f = u.getObj(),
 61099                  g = u.getObj();
 61100                if (d !== l || f !== c || !(g instanceof n.Cmd))
 61101                  throw new s.XRefEntryException(
 61102                    `Bad (uncompressed) XRef entry: ${e}`,
 61103                  );
 61104                if ("obj" !== g.cmd) {
 61105                  if (g.cmd.startsWith("obj")) {
 61106                    l = parseInt(g.cmd.substring(3), 10);
 61107                    if (!Number.isNaN(l)) return l;
 61108                  }
 61109                  throw new s.XRefEntryException(
 61110                    `Bad (uncompressed) XRef entry: ${e}`,
 61111                  );
 61112                }
 61113                (t =
 61114                  this.encrypt && !a
 61115                    ? u.getObj(this.encrypt.createCipherTransform(l, c))
 61116                    : u.getObj()) instanceof o.BaseStream ||
 61117                  this._cacheMap.set(l, t);
 61118                return t;
 61119              }
 61120              fetchCompressed(e, t, a = !1) {
 61121                const c = t.offset,
 61122                  l = this.fetch(n.Ref.get(c, 0));
 61123                if (!(l instanceof o.BaseStream))
 61124                  throw new r.FormatError("bad ObjStm stream");
 61125                const h = l.dict.get("First"),
 61126                  u = l.dict.get("N");
 61127                if (!Number.isInteger(h) || !Number.isInteger(u))
 61128                  throw new r.FormatError(
 61129                    "invalid first and n parameters for ObjStm stream",
 61130                  );
 61131                let d = new i.Parser({
 61132                  lexer: new i.Lexer(l),
 61133                  xref: this,
 61134                  allowStreams: !0,
 61135                });
 61136                const f = new Array(u),
 61137                  g = new Array(u);
 61138                for (let e = 0; e < u; ++e) {
 61139                  const t = d.getObj();
 61140                  if (!Number.isInteger(t))
 61141                    throw new r.FormatError(
 61142                      `invalid object number in the ObjStm stream: ${t}`,
 61143                    );
 61144                  const a = d.getObj();
 61145                  if (!Number.isInteger(a))
 61146                    throw new r.FormatError(
 61147                      `invalid object offset in the ObjStm stream: ${a}`,
 61148                    );
 61149                  f[e] = t;
 61150                  g[e] = a;
 61151                }
 61152                const p = (l.start || 0) + h,
 61153                  m = new Array(u);
 61154                for (let e = 0; e < u; ++e) {
 61155                  const t = e < u - 1 ? g[e + 1] - g[e] : void 0;
 61156                  if (t < 0)
 61157                    throw new r.FormatError(
 61158                      "Invalid offset in the ObjStm stream.",
 61159                    );
 61160                  d = new i.Parser({
 61161                    lexer: new i.Lexer(l.makeSubStream(p + g[e], t, l.dict)),
 61162                    xref: this,
 61163                    allowStreams: !0,
 61164                  });
 61165                  const a = d.getObj();
 61166                  m[e] = a;
 61167                  if (a instanceof o.BaseStream) continue;
 61168                  const n = f[e],
 61169                    s = this.entries[n];
 61170                  s && s.offset === c && s.gen === e && this._cacheMap.set(n, a);
 61171                }
 61172                if (void 0 === (t = m[t.gen]))
 61173                  throw new s.XRefEntryException(
 61174                    `Bad (compressed) XRef entry: ${e}`,
 61175                  );
 61176                return t;
 61177              }
 61178              async fetchIfRefAsync(e, t) {
 61179                return e instanceof n.Ref ? this.fetchAsync(e, t) : e;
 61180              }
 61181              async fetchAsync(e, t) {
 61182                try {
 61183                  return this.fetch(e, t);
 61184                } catch (a) {
 61185                  if (!(a instanceof s.MissingDataException)) throw a;
 61186                  await this.pdfManager.requestRange(a.begin, a.end);
 61187                  return this.fetchAsync(e, t);
 61188                }
 61189              }
 61190              getCatalogObj() {
 61191                return this.root;
 61192              }
 61193            };
 61194          },
 61195          (e, t, a) => {
 61196            Object.defineProperty(t, "__esModule", { value: !0 });
 61197            t.MessageHandler = void 0;
 61198            var r = a(2);
 61199            const n = 1,
 61200              i = 2,
 61201              s = 1,
 61202              o = 2,
 61203              c = 3,
 61204              l = 4,
 61205              h = 5,
 61206              u = 6,
 61207              d = 7,
 61208              f = 8;
 61209            function wrapReason(e) {
 61210              e instanceof Error ||
 61211                ("object" == typeof e && null !== e) ||
 61212                (0, r.unreachable)(
 61213                  'wrapReason: Expected "reason" to be a (possibly cloned) Error.',
 61214                );
 61215              switch (e.name) {
 61216                case "AbortException":
 61217                  return new r.AbortException(e.message);
 61218                case "MissingPDFException":
 61219                  return new r.MissingPDFException(e.message);
 61220                case "PasswordException":
 61221                  return new r.PasswordException(e.message, e.code);
 61222                case "UnexpectedResponseException":
 61223                  return new r.UnexpectedResponseException(e.message, e.status);
 61224                case "UnknownErrorException":
 61225                  return new r.UnknownErrorException(e.message, e.details);
 61226                default:
 61227                  return new r.UnknownErrorException(e.message, e.toString());
 61228              }
 61229            }
 61230            t.MessageHandler = class MessageHandler {
 61231              constructor(e, t, a) {
 61232                this.sourceName = e;
 61233                this.targetName = t;
 61234                this.comObj = a;
 61235                this.callbackId = 1;
 61236                this.streamId = 1;
 61237                this.streamSinks = Object.create(null);
 61238                this.streamControllers = Object.create(null);
 61239                this.callbackCapabilities = Object.create(null);
 61240                this.actionHandler = Object.create(null);
 61241                this._onComObjOnMessage = (e) => {
 61242                  const t = e.data;
 61243                  if (t.targetName !== this.sourceName) return;
 61244                  if (t.stream) {
 61245                    this.#E(t);
 61246                    return;
 61247                  }
 61248                  if (t.callback) {
 61249                    const e = t.callbackId,
 61250                      a = this.callbackCapabilities[e];
 61251                    if (!a) throw new Error(`Cannot resolve callback ${e}`);
 61252                    delete this.callbackCapabilities[e];
 61253                    if (t.callback === n) a.resolve(t.data);
 61254                    else {
 61255                      if (t.callback !== i)
 61256                        throw new Error("Unexpected callback case");
 61257                      a.reject(wrapReason(t.reason));
 61258                    }
 61259                    return;
 61260                  }
 61261                  const r = this.actionHandler[t.action];
 61262                  if (!r)
 61263                    throw new Error(`Unknown action from worker: ${t.action}`);
 61264                  if (t.callbackId) {
 61265                    const e = this.sourceName,
 61266                      s = t.sourceName;
 61267                    new Promise(function (e) {
 61268                      e(r(t.data));
 61269                    }).then(
 61270                      function (r) {
 61271                        a.postMessage({
 61272                          sourceName: e,
 61273                          targetName: s,
 61274                          callback: n,
 61275                          callbackId: t.callbackId,
 61276                          data: r,
 61277                        });
 61278                      },
 61279                      function (r) {
 61280                        a.postMessage({
 61281                          sourceName: e,
 61282                          targetName: s,
 61283                          callback: i,
 61284                          callbackId: t.callbackId,
 61285                          reason: wrapReason(r),
 61286                        });
 61287                      },
 61288                    );
 61289                  } else t.streamId ? this.#N(t) : r(t.data);
 61290                };
 61291                a.addEventListener("message", this._onComObjOnMessage);
 61292              }
 61293              on(e, t) {
 61294                const a = this.actionHandler;
 61295                if (a[e])
 61296                  throw new Error(`There is already an actionName called "${e}"`);
 61297                a[e] = t;
 61298              }
 61299              send(e, t, a) {
 61300                this.comObj.postMessage(
 61301                  {
 61302                    sourceName: this.sourceName,
 61303                    targetName: this.targetName,
 61304                    action: e,
 61305                    data: t,
 61306                  },
 61307                  a,
 61308                );
 61309              }
 61310              sendWithPromise(e, t, a) {
 61311                const n = this.callbackId++,
 61312                  i = new r.PromiseCapability();
 61313                this.callbackCapabilities[n] = i;
 61314                try {
 61315                  this.comObj.postMessage(
 61316                    {
 61317                      sourceName: this.sourceName,
 61318                      targetName: this.targetName,
 61319                      action: e,
 61320                      callbackId: n,
 61321                      data: t,
 61322                    },
 61323                    a,
 61324                  );
 61325                } catch (e) {
 61326                  i.reject(e);
 61327                }
 61328                return i.promise;
 61329              }
 61330              sendWithStream(e, t, a, n) {
 61331                const i = this.streamId++,
 61332                  o = this.sourceName,
 61333                  c = this.targetName,
 61334                  l = this.comObj;
 61335                return new ReadableStream(
 61336                  {
 61337                    start: (a) => {
 61338                      const s = new r.PromiseCapability();
 61339                      this.streamControllers[i] = {
 61340                        controller: a,
 61341                        startCall: s,
 61342                        pullCall: null,
 61343                        cancelCall: null,
 61344                        isClosed: !1,
 61345                      };
 61346                      l.postMessage(
 61347                        {
 61348                          sourceName: o,
 61349                          targetName: c,
 61350                          action: e,
 61351                          streamId: i,
 61352                          data: t,
 61353                          desiredSize: a.desiredSize,
 61354                        },
 61355                        n,
 61356                      );
 61357                      return s.promise;
 61358                    },
 61359                    pull: (e) => {
 61360                      const t = new r.PromiseCapability();
 61361                      this.streamControllers[i].pullCall = t;
 61362                      l.postMessage({
 61363                        sourceName: o,
 61364                        targetName: c,
 61365                        stream: u,
 61366                        streamId: i,
 61367                        desiredSize: e.desiredSize,
 61368                      });
 61369                      return t.promise;
 61370                    },
 61371                    cancel: (e) => {
 61372                      (0, r.assert)(
 61373                        e instanceof Error,
 61374                        "cancel must have a valid reason",
 61375                      );
 61376                      const t = new r.PromiseCapability();
 61377                      this.streamControllers[i].cancelCall = t;
 61378                      this.streamControllers[i].isClosed = !0;
 61379                      l.postMessage({
 61380                        sourceName: o,
 61381                        targetName: c,
 61382                        stream: s,
 61383                        streamId: i,
 61384                        reason: wrapReason(e),
 61385                      });
 61386                      return t.promise;
 61387                    },
 61388                  },
 61389                  a,
 61390                );
 61391              }
 61392              #N(e) {
 61393                const t = e.streamId,
 61394                  a = this.sourceName,
 61395                  n = e.sourceName,
 61396                  i = this.comObj,
 61397                  s = this,
 61398                  o = this.actionHandler[e.action],
 61399                  u = {
 61400                    enqueue(e, s = 1, o) {
 61401                      if (this.isCancelled) return;
 61402                      const c = this.desiredSize;
 61403                      this.desiredSize -= s;
 61404                      if (c > 0 && this.desiredSize <= 0) {
 61405                        this.sinkCapability = new r.PromiseCapability();
 61406                        this.ready = this.sinkCapability.promise;
 61407                      }
 61408                      i.postMessage(
 61409                        {
 61410                          sourceName: a,
 61411                          targetName: n,
 61412                          stream: l,
 61413                          streamId: t,
 61414                          chunk: e,
 61415                        },
 61416                        o,
 61417                      );
 61418                    },
 61419                    close() {
 61420                      if (!this.isCancelled) {
 61421                        this.isCancelled = !0;
 61422                        i.postMessage({
 61423                          sourceName: a,
 61424                          targetName: n,
 61425                          stream: c,
 61426                          streamId: t,
 61427                        });
 61428                        delete s.streamSinks[t];
 61429                      }
 61430                    },
 61431                    error(e) {
 61432                      (0, r.assert)(
 61433                        e instanceof Error,
 61434                        "error must have a valid reason",
 61435                      );
 61436                      if (!this.isCancelled) {
 61437                        this.isCancelled = !0;
 61438                        i.postMessage({
 61439                          sourceName: a,
 61440                          targetName: n,
 61441                          stream: h,
 61442                          streamId: t,
 61443                          reason: wrapReason(e),
 61444                        });
 61445                      }
 61446                    },
 61447                    sinkCapability: new r.PromiseCapability(),
 61448                    onPull: null,
 61449                    onCancel: null,
 61450                    isCancelled: !1,
 61451                    desiredSize: e.desiredSize,
 61452                    ready: null,
 61453                  };
 61454                u.sinkCapability.resolve();
 61455                u.ready = u.sinkCapability.promise;
 61456                this.streamSinks[t] = u;
 61457                new Promise(function (t) {
 61458                  t(o(e.data, u));
 61459                }).then(
 61460                  function () {
 61461                    i.postMessage({
 61462                      sourceName: a,
 61463                      targetName: n,
 61464                      stream: f,
 61465                      streamId: t,
 61466                      success: !0,
 61467                    });
 61468                  },
 61469                  function (e) {
 61470                    i.postMessage({
 61471                      sourceName: a,
 61472                      targetName: n,
 61473                      stream: f,
 61474                      streamId: t,
 61475                      reason: wrapReason(e),
 61476                    });
 61477                  },
 61478                );
 61479              }
 61480              #E(e) {
 61481                const t = e.streamId,
 61482                  a = this.sourceName,
 61483                  n = e.sourceName,
 61484                  i = this.comObj,
 61485                  g = this.streamControllers[t],
 61486                  p = this.streamSinks[t];
 61487                switch (e.stream) {
 61488                  case f:
 61489                    e.success
 61490                      ? g.startCall.resolve()
 61491                      : g.startCall.reject(wrapReason(e.reason));
 61492                    break;
 61493                  case d:
 61494                    e.success
 61495                      ? g.pullCall.resolve()
 61496                      : g.pullCall.reject(wrapReason(e.reason));
 61497                    break;
 61498                  case u:
 61499                    if (!p) {
 61500                      i.postMessage({
 61501                        sourceName: a,
 61502                        targetName: n,
 61503                        stream: d,
 61504                        streamId: t,
 61505                        success: !0,
 61506                      });
 61507                      break;
 61508                    }
 61509                    p.desiredSize <= 0 &&
 61510                      e.desiredSize > 0 &&
 61511                      p.sinkCapability.resolve();
 61512                    p.desiredSize = e.desiredSize;
 61513                    new Promise(function (e) {
 61514                      e(p.onPull?.());
 61515                    }).then(
 61516                      function () {
 61517                        i.postMessage({
 61518                          sourceName: a,
 61519                          targetName: n,
 61520                          stream: d,
 61521                          streamId: t,
 61522                          success: !0,
 61523                        });
 61524                      },
 61525                      function (e) {
 61526                        i.postMessage({
 61527                          sourceName: a,
 61528                          targetName: n,
 61529                          stream: d,
 61530                          streamId: t,
 61531                          reason: wrapReason(e),
 61532                        });
 61533                      },
 61534                    );
 61535                    break;
 61536                  case l:
 61537                    (0, r.assert)(g, "enqueue should have stream controller");
 61538                    if (g.isClosed) break;
 61539                    g.controller.enqueue(e.chunk);
 61540                    break;
 61541                  case c:
 61542                    (0, r.assert)(g, "close should have stream controller");
 61543                    if (g.isClosed) break;
 61544                    g.isClosed = !0;
 61545                    g.controller.close();
 61546                    this.#R(g, t);
 61547                    break;
 61548                  case h:
 61549                    (0, r.assert)(g, "error should have stream controller");
 61550                    g.controller.error(wrapReason(e.reason));
 61551                    this.#R(g, t);
 61552                    break;
 61553                  case o:
 61554                    e.success
 61555                      ? g.cancelCall.resolve()
 61556                      : g.cancelCall.reject(wrapReason(e.reason));
 61557                    this.#R(g, t);
 61558                    break;
 61559                  case s:
 61560                    if (!p) break;
 61561                    new Promise(function (t) {
 61562                      t(p.onCancel?.(wrapReason(e.reason)));
 61563                    }).then(
 61564                      function () {
 61565                        i.postMessage({
 61566                          sourceName: a,
 61567                          targetName: n,
 61568                          stream: o,
 61569                          streamId: t,
 61570                          success: !0,
 61571                        });
 61572                      },
 61573                      function (e) {
 61574                        i.postMessage({
 61575                          sourceName: a,
 61576                          targetName: n,
 61577                          stream: o,
 61578                          streamId: t,
 61579                          reason: wrapReason(e),
 61580                        });
 61581                      },
 61582                    );
 61583                    p.sinkCapability.reject(wrapReason(e.reason));
 61584                    p.isCancelled = !0;
 61585                    delete this.streamSinks[t];
 61586                    break;
 61587                  default:
 61588                    throw new Error("Unexpected stream case");
 61589                }
 61590              }
 61591              async #R(e, t) {
 61592                await Promise.allSettled([
 61593                  e.startCall?.promise,
 61594                  e.pullCall?.promise,
 61595                  e.cancelCall?.promise,
 61596                ]);
 61597                delete this.streamControllers[t];
 61598              }
 61599              destroy() {
 61600                this.comObj.removeEventListener(
 61601                  "message",
 61602                  this._onComObjOnMessage,
 61603                );
 61604              }
 61605            };
 61606          },
 61607          (e, t, a) => {
 61608            Object.defineProperty(t, "__esModule", { value: !0 });
 61609            t.PDFWorkerStream = void 0;
 61610            var r = a(2);
 61611            t.PDFWorkerStream = class PDFWorkerStream {
 61612              constructor(e) {
 61613                this._msgHandler = e;
 61614                this._contentLength = null;
 61615                this._fullRequestReader = null;
 61616                this._rangeRequestReaders = [];
 61617              }
 61618              getFullReader() {
 61619                (0, r.assert)(
 61620                  !this._fullRequestReader,
 61621                  "PDFWorkerStream.getFullReader can only be called once.",
 61622                );
 61623                this._fullRequestReader = new PDFWorkerStreamReader(
 61624                  this._msgHandler,
 61625                );
 61626                return this._fullRequestReader;
 61627              }
 61628              getRangeReader(e, t) {
 61629                const a = new PDFWorkerStreamRangeReader(e, t, this._msgHandler);
 61630                this._rangeRequestReaders.push(a);
 61631                return a;
 61632              }
 61633              cancelAllRequests(e) {
 61634                this._fullRequestReader?.cancel(e);
 61635                for (const t of this._rangeRequestReaders.slice(0)) t.cancel(e);
 61636              }
 61637            };
 61638            class PDFWorkerStreamReader {
 61639              constructor(e) {
 61640                this._msgHandler = e;
 61641                this.onProgress = null;
 61642                this._contentLength = null;
 61643                this._isRangeSupported = !1;
 61644                this._isStreamingSupported = !1;
 61645                const t = this._msgHandler.sendWithStream("GetReader");
 61646                this._reader = t.getReader();
 61647                this._headersReady = this._msgHandler
 61648                  .sendWithPromise("ReaderHeadersReady")
 61649                  .then((e) => {
 61650                    this._isStreamingSupported = e.isStreamingSupported;
 61651                    this._isRangeSupported = e.isRangeSupported;
 61652                    this._contentLength = e.contentLength;
 61653                  });
 61654              }
 61655              get headersReady() {
 61656                return this._headersReady;
 61657              }
 61658              get contentLength() {
 61659                return this._contentLength;
 61660              }
 61661              get isStreamingSupported() {
 61662                return this._isStreamingSupported;
 61663              }
 61664              get isRangeSupported() {
 61665                return this._isRangeSupported;
 61666              }
 61667              async read() {
 61668                const { value: e, done: t } = await this._reader.read();
 61669                return t
 61670                  ? { value: void 0, done: !0 }
 61671                  : { value: e.buffer, done: !1 };
 61672              }
 61673              cancel(e) {
 61674                this._reader.cancel(e);
 61675              }
 61676            }
 61677            class PDFWorkerStreamRangeReader {
 61678              constructor(e, t, a) {
 61679                this._msgHandler = a;
 61680                this.onProgress = null;
 61681                const r = this._msgHandler.sendWithStream("GetRangeReader", {
 61682                  begin: e,
 61683                  end: t,
 61684                });
 61685                this._reader = r.getReader();
 61686              }
 61687              get isStreamingSupported() {
 61688                return !1;
 61689              }
 61690              async read() {
 61691                const { value: e, done: t } = await this._reader.read();
 61692                return t
 61693                  ? { value: void 0, done: !0 }
 61694                  : { value: e.buffer, done: !1 };
 61695              }
 61696              cancel(e) {
 61697                this._reader.cancel(e);
 61698              }
 61699            }
 61700          },
 61701        ],
 61702        t = {};
 61703      function __w_pdfjs_require__(a) {
 61704        var r = t[a];
 61705        if (void 0 !== r) return r.exports;
 61706        var n = (t[a] = { exports: {} });
 61707        e[a](n, n.exports, __w_pdfjs_require__);
 61708        return n.exports;
 61709      }
 61710      var a = {};
 61711      (() => {
 61712        var e = a;
 61713        Object.defineProperty(e, "__esModule", { value: !0 });
 61714        Object.defineProperty(e, "WorkerMessageHandler", {
 61715          enumerable: !0,
 61716          get: function () {
 61717            return t.WorkerMessageHandler;
 61718          },
 61719        });
 61720        var t = __w_pdfjs_require__(1);
 61721      })();
 61722      return a;
 61723    })(),
 61724  );