document-model 1.0.10 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/browser/document/index.d.ts +1 -0
  2. package/dist/browser/document/object.d.ts +4 -2
  3. package/dist/browser/document/reducer.d.ts +2 -1
  4. package/dist/browser/document/signal.d.ts +16 -0
  5. package/dist/browser/document/types.d.ts +4 -3
  6. package/dist/browser/document-model/gen/object.d.ts +2 -2
  7. package/dist/browser/document-model.cjs +1 -1
  8. package/dist/browser/document-model.js +2 -2
  9. package/dist/browser/document.cjs +1 -1
  10. package/dist/browser/document.js +2 -2
  11. package/dist/browser/index.cjs +1 -1
  12. package/dist/browser/index.js +3 -3
  13. package/dist/browser/internal/{index-05592a17.js → index-ac329925.js} +2 -2
  14. package/dist/{node/internal/index-7056a501.js → browser/internal/index-c9e4dc9e.js} +1 -1
  15. package/dist/{node/internal/index-14934709.js → browser/internal/index-cf51e575.js} +1 -1
  16. package/dist/browser/internal/{index-ea1557d4.js → index-df1f6a1b.js} +3 -3
  17. package/dist/browser/internal/{object-70e4dae8.js → object-113c73e2.js} +2 -2
  18. package/dist/browser/internal/{object-35506f2f.js → object-13eaec2b.js} +218 -217
  19. package/dist/node/document/index.d.ts +1 -0
  20. package/dist/node/document/object.d.ts +4 -2
  21. package/dist/node/document/reducer.d.ts +2 -1
  22. package/dist/node/document/signal.d.ts +16 -0
  23. package/dist/node/document/types.d.ts +4 -3
  24. package/dist/node/document-model/gen/object.d.ts +2 -2
  25. package/dist/node/document-model.cjs +1 -1
  26. package/dist/node/document-model.js +2 -2
  27. package/dist/node/document.cjs +1 -1
  28. package/dist/node/document.js +2 -2
  29. package/dist/node/index.cjs +1 -1
  30. package/dist/node/index.js +3 -3
  31. package/dist/node/internal/{index-0b946b7d.js → index-0abc9251.js} +3 -3
  32. package/dist/{browser/internal/index-5dee4170.js → node/internal/index-150bbba4.js} +1 -1
  33. package/dist/node/internal/{index-fbe65e32.js → index-2cd26a65.js} +2 -2
  34. package/dist/{browser/internal/index-a61bcd7c.js → node/internal/index-a74d15aa.js} +1 -1
  35. package/dist/node/internal/{object-8ed23327.js → object-073dccc4.js} +1 -1
  36. package/dist/node/internal/{object-e24dafec.js → object-baf4e3d5.js} +86 -85
  37. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  var xr = Object.defineProperty;
2
2
  var dr = (n, a, s) => a in n ? xr(n, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[a] = s;
3
- var V = (n, a, s) => (dr(n, typeof a != "symbol" ? a + "" : a, s), s);
3
+ var q = (n, a, s) => (dr(n, typeof a != "symbol" ? a + "" : a, s), s);
4
4
  import wr from "json-stringify-deterministic";
5
5
  import { produce as Et, castDraft as yr, castImmutable as gr, freeze as vr } from "immer";
6
- import _t from "jszip";
6
+ import Ft from "jszip";
7
7
  import { z as d } from "zod";
8
8
  const At = (n) => n != null, Er = d.any().refine((n) => At(n)), Bt = d.enum(["LOAD_STATE"]), St = d.enum(["PRUNE"]), jt = d.enum(["REDO"]), Ut = d.enum(["SET_NAME"]), It = d.enum(["UNDO"]);
9
9
  function br() {
@@ -21,7 +21,7 @@ function kt() {
21
21
  ot()
22
22
  ]);
23
23
  }
24
- function Fr() {
24
+ function _r() {
25
25
  return d.object({
26
26
  __typename: d.literal("DocumentFile").optional(),
27
27
  data: d.string(),
@@ -48,7 +48,7 @@ function Dt() {
48
48
  name: d.string()
49
49
  });
50
50
  }
51
- function _r() {
51
+ function Fr() {
52
52
  return d.object({
53
53
  __typename: d.literal("Operation").optional(),
54
54
  hash: d.string(),
@@ -97,16 +97,16 @@ function ot() {
97
97
  type: It
98
98
  });
99
99
  }
100
- const _i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
100
+ const Fi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
101
101
  __proto__: null,
102
102
  ActionSchema: br,
103
103
  BaseActionSchema: kt,
104
- DocumentFileSchema: Fr,
104
+ DocumentFileSchema: _r,
105
105
  LoadStateActionInputSchema: Tt,
106
106
  LoadStateActionSchema: it,
107
107
  LoadStateActionStateInputSchema: Dt,
108
108
  Load_StateSchema: Bt,
109
- OperationSchema: _r,
109
+ OperationSchema: Fr,
110
110
  PruneActionInputSchema: Ot,
111
111
  PruneActionSchema: et,
112
112
  PruneSchema: St,
@@ -123,26 +123,26 @@ const _i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
123
123
  function Nt(n) {
124
124
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
125
125
  }
126
- function J() {
126
+ function P() {
127
127
  this._types = /* @__PURE__ */ Object.create(null), this._extensions = /* @__PURE__ */ Object.create(null);
128
128
  for (let n = 0; n < arguments.length; n++)
129
129
  this.define(arguments[n]);
130
130
  this.define = this.define.bind(this), this.getType = this.getType.bind(this), this.getExtension = this.getExtension.bind(this);
131
131
  }
132
- J.prototype.define = function(n, a) {
132
+ P.prototype.define = function(n, a) {
133
133
  for (let s in n) {
134
134
  let c = n[s].map(function(f) {
135
135
  return f.toLowerCase();
136
136
  });
137
137
  s = s.toLowerCase();
138
138
  for (let f = 0; f < c.length; f++) {
139
- const m = c[f];
140
- if (m[0] !== "*") {
141
- if (!a && m in this._types)
139
+ const h = c[f];
140
+ if (h[0] !== "*") {
141
+ if (!a && h in this._types)
142
142
  throw new Error(
143
- 'Attempt to change mapping for "' + m + '" extension from "' + this._types[m] + '" to "' + s + '". Pass `force=true` to allow this, otherwise remove "' + m + '" from the list of extensions for "' + s + '".'
143
+ 'Attempt to change mapping for "' + h + '" extension from "' + this._types[h] + '" to "' + s + '". Pass `force=true` to allow this, otherwise remove "' + h + '" from the list of extensions for "' + s + '".'
144
144
  );
145
- this._types[m] = s;
145
+ this._types[h] = s;
146
146
  }
147
147
  }
148
148
  if (a || !this._extensions[s]) {
@@ -151,15 +151,15 @@ J.prototype.define = function(n, a) {
151
151
  }
152
152
  }
153
153
  };
154
- J.prototype.getType = function(n) {
154
+ P.prototype.getType = function(n) {
155
155
  n = String(n);
156
156
  let a = n.replace(/^.*[/\\]/, "").toLowerCase(), s = a.replace(/^.*\./, "").toLowerCase(), c = a.length < n.length;
157
157
  return (s.length < a.length - 1 || !c) && this._types[s] || null;
158
158
  };
159
- J.prototype.getExtension = function(n) {
159
+ P.prototype.getExtension = function(n) {
160
160
  return n = /^\s*([^;\s]*)/.test(n) && RegExp.$1, n && this._extensions[n.toLowerCase()] || null;
161
161
  };
162
- var Br = J, Sr = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["es", "ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/trig": ["trig"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] };
162
+ var Br = P, Sr = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["es", "ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/trig": ["trig"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] };
163
163
  let jr = Br;
164
164
  var Ur = new jr(Sr);
165
165
  const Ir = /* @__PURE__ */ Nt(Ur);
@@ -181,10 +181,10 @@ typeof Object.create == "function" ? tt.exports = function(a, s) {
181
181
  c.prototype = s.prototype, a.prototype = new c(), a.prototype.constructor = a;
182
182
  }
183
183
  };
184
- var kr = tt.exports, rt = { exports: {} }, Mt = {}, P = {};
185
- P.byteLength = Or;
186
- P.toByteArray = Mr;
187
- P.fromByteArray = Lr;
184
+ var kr = tt.exports, rt = { exports: {} }, Mt = {}, W = {};
185
+ W.byteLength = Or;
186
+ W.toByteArray = Mr;
187
+ W.fromByteArray = Lr;
188
188
  var k = [], j = [], Tr = typeof Uint8Array < "u" ? Uint8Array : Array, Q = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
189
189
  for (var D = 0, Dr = Q.length; D < Dr; ++D)
190
190
  k[D] = Q[D], j[Q.charCodeAt(D)] = D;
@@ -207,22 +207,22 @@ function Nr(n, a, s) {
207
207
  return (a + s) * 3 / 4 - s;
208
208
  }
209
209
  function Mr(n) {
210
- var a, s = Ct(n), c = s[0], f = s[1], m = new Tr(Nr(n, c, f)), u = 0, o = f > 0 ? c - 4 : c, x;
210
+ var a, s = Ct(n), c = s[0], f = s[1], h = new Tr(Nr(n, c, f)), u = 0, o = f > 0 ? c - 4 : c, x;
211
211
  for (x = 0; x < o; x += 4)
212
- a = j[n.charCodeAt(x)] << 18 | j[n.charCodeAt(x + 1)] << 12 | j[n.charCodeAt(x + 2)] << 6 | j[n.charCodeAt(x + 3)], m[u++] = a >> 16 & 255, m[u++] = a >> 8 & 255, m[u++] = a & 255;
213
- return f === 2 && (a = j[n.charCodeAt(x)] << 2 | j[n.charCodeAt(x + 1)] >> 4, m[u++] = a & 255), f === 1 && (a = j[n.charCodeAt(x)] << 10 | j[n.charCodeAt(x + 1)] << 4 | j[n.charCodeAt(x + 2)] >> 2, m[u++] = a >> 8 & 255, m[u++] = a & 255), m;
212
+ a = j[n.charCodeAt(x)] << 18 | j[n.charCodeAt(x + 1)] << 12 | j[n.charCodeAt(x + 2)] << 6 | j[n.charCodeAt(x + 3)], h[u++] = a >> 16 & 255, h[u++] = a >> 8 & 255, h[u++] = a & 255;
213
+ return f === 2 && (a = j[n.charCodeAt(x)] << 2 | j[n.charCodeAt(x + 1)] >> 4, h[u++] = a & 255), f === 1 && (a = j[n.charCodeAt(x)] << 10 | j[n.charCodeAt(x + 1)] << 4 | j[n.charCodeAt(x + 2)] >> 2, h[u++] = a >> 8 & 255, h[u++] = a & 255), h;
214
214
  }
215
215
  function Cr(n) {
216
216
  return k[n >> 18 & 63] + k[n >> 12 & 63] + k[n >> 6 & 63] + k[n & 63];
217
217
  }
218
218
  function Rr(n, a, s) {
219
- for (var c, f = [], m = a; m < s; m += 3)
220
- c = (n[m] << 16 & 16711680) + (n[m + 1] << 8 & 65280) + (n[m + 2] & 255), f.push(Cr(c));
219
+ for (var c, f = [], h = a; h < s; h += 3)
220
+ c = (n[h] << 16 & 16711680) + (n[h + 1] << 8 & 65280) + (n[h + 2] & 255), f.push(Cr(c));
221
221
  return f.join("");
222
222
  }
223
223
  function Lr(n) {
224
- for (var a, s = n.length, c = s % 3, f = [], m = 16383, u = 0, o = s - c; u < o; u += m)
225
- f.push(Rr(n, u, u + m > o ? o : u + m));
224
+ for (var a, s = n.length, c = s % 3, f = [], h = 16383, u = 0, o = s - c; u < o; u += h)
225
+ f.push(Rr(n, u, u + h > o ? o : u + h));
226
226
  return c === 1 ? (a = n[s - 1], f.push(
227
227
  k[a >> 2] + k[a << 4 & 63] + "=="
228
228
  )) : c === 2 && (a = (n[s - 2] << 8) + n[s - 1], f.push(
@@ -232,23 +232,23 @@ function Lr(n) {
232
232
  var pt = {};
233
233
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
234
234
  pt.read = function(n, a, s, c, f) {
235
- var m, u, o = f * 8 - c - 1, x = (1 << o) - 1, y = x >> 1, v = -7, F = s ? f - 1 : 0, U = s ? -1 : 1, B = n[a + F];
236
- for (F += U, m = B & (1 << -v) - 1, B >>= -v, v += o; v > 0; m = m * 256 + n[a + F], F += U, v -= 8)
235
+ var h, u, o = f * 8 - c - 1, x = (1 << o) - 1, y = x >> 1, v = -7, _ = s ? f - 1 : 0, U = s ? -1 : 1, B = n[a + _];
236
+ for (_ += U, h = B & (1 << -v) - 1, B >>= -v, v += o; v > 0; h = h * 256 + n[a + _], _ += U, v -= 8)
237
237
  ;
238
- for (u = m & (1 << -v) - 1, m >>= -v, v += c; v > 0; u = u * 256 + n[a + F], F += U, v -= 8)
238
+ for (u = h & (1 << -v) - 1, h >>= -v, v += c; v > 0; u = u * 256 + n[a + _], _ += U, v -= 8)
239
239
  ;
240
- if (m === 0)
241
- m = 1 - y;
240
+ if (h === 0)
241
+ h = 1 - y;
242
242
  else {
243
- if (m === x)
243
+ if (h === x)
244
244
  return u ? NaN : (B ? -1 : 1) * (1 / 0);
245
- u = u + Math.pow(2, c), m = m - y;
245
+ u = u + Math.pow(2, c), h = h - y;
246
246
  }
247
- return (B ? -1 : 1) * u * Math.pow(2, m - c);
247
+ return (B ? -1 : 1) * u * Math.pow(2, h - c);
248
248
  };
249
- pt.write = function(n, a, s, c, f, m) {
250
- var u, o, x, y = m * 8 - f - 1, v = (1 << y) - 1, F = v >> 1, U = f === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, B = c ? 0 : m - 1, O = c ? 1 : -1, N = a < 0 || a === 0 && 1 / a < 0 ? 1 : 0;
251
- for (a = Math.abs(a), isNaN(a) || a === 1 / 0 ? (o = isNaN(a) ? 1 : 0, u = v) : (u = Math.floor(Math.log(a) / Math.LN2), a * (x = Math.pow(2, -u)) < 1 && (u--, x *= 2), u + F >= 1 ? a += U / x : a += U * Math.pow(2, 1 - F), a * x >= 2 && (u++, x /= 2), u + F >= v ? (o = 0, u = v) : u + F >= 1 ? (o = (a * x - 1) * Math.pow(2, f), u = u + F) : (o = a * Math.pow(2, F - 1) * Math.pow(2, f), u = 0)); f >= 8; n[s + B] = o & 255, B += O, o /= 256, f -= 8)
249
+ pt.write = function(n, a, s, c, f, h) {
250
+ var u, o, x, y = h * 8 - f - 1, v = (1 << y) - 1, _ = v >> 1, U = f === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, B = c ? 0 : h - 1, O = c ? 1 : -1, N = a < 0 || a === 0 && 1 / a < 0 ? 1 : 0;
251
+ for (a = Math.abs(a), isNaN(a) || a === 1 / 0 ? (o = isNaN(a) ? 1 : 0, u = v) : (u = Math.floor(Math.log(a) / Math.LN2), a * (x = Math.pow(2, -u)) < 1 && (u--, x *= 2), u + _ >= 1 ? a += U / x : a += U * Math.pow(2, 1 - _), a * x >= 2 && (u++, x /= 2), u + _ >= v ? (o = 0, u = v) : u + _ >= 1 ? (o = (a * x - 1) * Math.pow(2, f), u = u + _) : (o = a * Math.pow(2, _ - 1) * Math.pow(2, f), u = 0)); f >= 8; n[s + B] = o & 255, B += O, o /= 256, f -= 8)
252
252
  ;
253
253
  for (u = u << f | o, y += f; y > 0; n[s + B] = u & 255, B += O, u /= 256, y -= 8)
254
254
  ;
@@ -261,13 +261,13 @@ pt.write = function(n, a, s, c, f, m) {
261
261
  * @license MIT
262
262
  */
263
263
  (function(n) {
264
- var a = P, s = pt, c = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
264
+ var a = W, s = pt, c = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
265
265
  n.Buffer = o, n.SlowBuffer = Gt, n.INSPECT_MAX_BYTES = 50;
266
266
  var f = 2147483647;
267
- n.kMaxLength = f, o.TYPED_ARRAY_SUPPORT = m(), !o.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
267
+ n.kMaxLength = f, o.TYPED_ARRAY_SUPPORT = h(), !o.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
268
268
  "This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
269
269
  );
270
- function m() {
270
+ function h() {
271
271
  try {
272
272
  var i = new Uint8Array(1), t = { foo: function() {
273
273
  return 42;
@@ -302,7 +302,7 @@ pt.write = function(n, a, s, c, f, m) {
302
302
  throw new TypeError(
303
303
  'The "string" argument must be of type string. Received type number'
304
304
  );
305
- return F(i);
305
+ return _(i);
306
306
  }
307
307
  return x(i, t, r);
308
308
  }
@@ -353,13 +353,13 @@ pt.write = function(n, a, s, c, f, m) {
353
353
  o.alloc = function(i, t, r) {
354
354
  return v(i, t, r);
355
355
  };
356
- function F(i) {
357
- return y(i), u(i < 0 ? 0 : K(i) | 0);
356
+ function _(i) {
357
+ return y(i), u(i < 0 ? 0 : X(i) | 0);
358
358
  }
359
359
  o.allocUnsafe = function(i) {
360
- return F(i);
360
+ return _(i);
361
361
  }, o.allocUnsafeSlow = function(i) {
362
- return F(i);
362
+ return _(i);
363
363
  };
364
364
  function U(i, t) {
365
365
  if ((typeof t != "string" || t === "") && (t = "utf8"), !o.isEncoding(t))
@@ -368,7 +368,7 @@ pt.write = function(n, a, s, c, f, m) {
368
368
  return p !== r && (e = e.slice(0, p)), e;
369
369
  }
370
370
  function B(i) {
371
- for (var t = i.length < 0 ? 0 : K(i.length) | 0, r = u(t), e = 0; e < t; e += 1)
371
+ for (var t = i.length < 0 ? 0 : X(i.length) | 0, r = u(t), e = 0; e < t; e += 1)
372
372
  r[e] = i[e] & 255;
373
373
  return r;
374
374
  }
@@ -389,15 +389,15 @@ pt.write = function(n, a, s, c, f, m) {
389
389
  }
390
390
  function Xt(i) {
391
391
  if (o.isBuffer(i)) {
392
- var t = K(i.length) | 0, r = u(t);
392
+ var t = X(i.length) | 0, r = u(t);
393
393
  return r.length === 0 || i.copy(r, 0, 0, t), r;
394
394
  }
395
395
  if (i.length !== void 0)
396
- return typeof i.length != "number" || G(i.length) ? u(0) : B(i);
396
+ return typeof i.length != "number" || V(i.length) ? u(0) : B(i);
397
397
  if (i.type === "Buffer" && Array.isArray(i.data))
398
398
  return B(i.data);
399
399
  }
400
- function K(i) {
400
+ function X(i) {
401
401
  if (i >= f)
402
402
  throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + f.toString(16) + " bytes");
403
403
  return i | 0;
@@ -414,7 +414,7 @@ pt.write = function(n, a, s, c, f, m) {
414
414
  );
415
415
  if (t === r)
416
416
  return 0;
417
- for (var e = t.length, p = r.length, l = 0, h = Math.min(e, p); l < h; ++l)
417
+ for (var e = t.length, p = r.length, l = 0, m = Math.min(e, p); l < m; ++l)
418
418
  if (t[l] !== r[l]) {
419
419
  e = t[l], p = r[l];
420
420
  break;
@@ -448,18 +448,18 @@ pt.write = function(n, a, s, c, f, m) {
448
448
  r += t[e].length;
449
449
  var p = o.allocUnsafe(r), l = 0;
450
450
  for (e = 0; e < t.length; ++e) {
451
- var h = t[e];
452
- if (I(h, Uint8Array))
453
- l + h.length > p.length ? o.from(h).copy(p, l) : Uint8Array.prototype.set.call(
451
+ var m = t[e];
452
+ if (I(m, Uint8Array))
453
+ l + m.length > p.length ? o.from(m).copy(p, l) : Uint8Array.prototype.set.call(
454
454
  p,
455
- h,
455
+ m,
456
456
  l
457
457
  );
458
- else if (o.isBuffer(h))
459
- h.copy(p, l);
458
+ else if (o.isBuffer(m))
459
+ m.copy(p, l);
460
460
  else
461
461
  throw new TypeError('"list" argument must be an Array of Buffers');
462
- l += h.length;
462
+ l += m.length;
463
463
  }
464
464
  return p;
465
465
  };
@@ -483,7 +483,7 @@ pt.write = function(n, a, s, c, f, m) {
483
483
  return r;
484
484
  case "utf8":
485
485
  case "utf-8":
486
- return X(i).length;
486
+ return G(i).length;
487
487
  case "ucs2":
488
488
  case "ucs-2":
489
489
  case "utf16le":
@@ -495,7 +495,7 @@ pt.write = function(n, a, s, c, f, m) {
495
495
  return yt(i).length;
496
496
  default:
497
497
  if (p)
498
- return e ? -1 : X(i).length;
498
+ return e ? -1 : G(i).length;
499
499
  t = ("" + t).toLowerCase(), p = !0;
500
500
  }
501
501
  }
@@ -580,17 +580,17 @@ pt.write = function(n, a, s, c, f, m) {
580
580
  return 1;
581
581
  if (r >>>= 0, e >>>= 0, p >>>= 0, l >>>= 0, this === t)
582
582
  return 0;
583
- for (var h = l - p, w = e - r, g = Math.min(h, w), E = this.slice(p, l), A = t.slice(r, e), b = 0; b < g; ++b)
583
+ for (var m = l - p, w = e - r, g = Math.min(m, w), E = this.slice(p, l), A = t.slice(r, e), b = 0; b < g; ++b)
584
584
  if (E[b] !== A[b]) {
585
- h = E[b], w = A[b];
585
+ m = E[b], w = A[b];
586
586
  break;
587
587
  }
588
- return h < w ? -1 : w < h ? 1 : 0;
588
+ return m < w ? -1 : w < m ? 1 : 0;
589
589
  };
590
590
  function ut(i, t, r, e, p) {
591
591
  if (i.length === 0)
592
592
  return -1;
593
- if (typeof r == "string" ? (e = r, r = 0) : r > 2147483647 ? r = 2147483647 : r < -2147483648 && (r = -2147483648), r = +r, G(r) && (r = p ? 0 : i.length - 1), r < 0 && (r = i.length + r), r >= i.length) {
593
+ if (typeof r == "string" ? (e = r, r = 0) : r > 2147483647 ? r = 2147483647 : r < -2147483648 && (r = -2147483648), r = +r, V(r) && (r = p ? 0 : i.length - 1), r < 0 && (r = i.length + r), r >= i.length) {
594
594
  if (p)
595
595
  return -1;
596
596
  r = i.length - 1;
@@ -606,11 +606,11 @@ pt.write = function(n, a, s, c, f, m) {
606
606
  throw new TypeError("val must be string, number or Buffer");
607
607
  }
608
608
  function ft(i, t, r, e, p) {
609
- var l = 1, h = i.length, w = t.length;
609
+ var l = 1, m = i.length, w = t.length;
610
610
  if (e !== void 0 && (e = String(e).toLowerCase(), e === "ucs2" || e === "ucs-2" || e === "utf16le" || e === "utf-16le")) {
611
611
  if (i.length < 2 || t.length < 2)
612
612
  return -1;
613
- l = 2, h /= 2, w /= 2, r /= 2;
613
+ l = 2, m /= 2, w /= 2, r /= 2;
614
614
  }
615
615
  function g(gt, vt) {
616
616
  return l === 1 ? gt[vt] : gt.readUInt16BE(vt * l);
@@ -618,14 +618,14 @@ pt.write = function(n, a, s, c, f, m) {
618
618
  var E;
619
619
  if (p) {
620
620
  var A = -1;
621
- for (E = r; E < h; E++)
621
+ for (E = r; E < m; E++)
622
622
  if (g(i, E) === g(t, A === -1 ? 0 : E - A)) {
623
623
  if (A === -1 && (A = E), E - A + 1 === w)
624
624
  return A * l;
625
625
  } else
626
626
  A !== -1 && (E -= E - A), A = -1;
627
627
  } else
628
- for (r + w > h && (r = h - w), E = r; E >= 0; E--) {
628
+ for (r + w > m && (r = m - w), E = r; E >= 0; E--) {
629
629
  for (var b = !0, z = 0; z < w; z++)
630
630
  if (g(i, E + z) !== g(t, z)) {
631
631
  b = !1;
@@ -649,16 +649,16 @@ pt.write = function(n, a, s, c, f, m) {
649
649
  e ? (e = Number(e), e > p && (e = p)) : e = p;
650
650
  var l = t.length;
651
651
  e > l / 2 && (e = l / 2);
652
- for (var h = 0; h < e; ++h) {
653
- var w = parseInt(t.substr(h * 2, 2), 16);
654
- if (G(w))
655
- return h;
656
- i[r + h] = w;
652
+ for (var m = 0; m < e; ++m) {
653
+ var w = parseInt(t.substr(m * 2, 2), 16);
654
+ if (V(w))
655
+ return m;
656
+ i[r + m] = w;
657
657
  }
658
- return h;
658
+ return m;
659
659
  }
660
660
  function tr(i, t, r, e) {
661
- return L(X(t, i.length - r), i, r, e);
661
+ return L(G(t, i.length - r), i, r, e);
662
662
  }
663
663
  function rr(i, t, r, e) {
664
664
  return L(fr(t), i, r, e);
@@ -684,7 +684,7 @@ pt.write = function(n, a, s, c, f, m) {
684
684
  if ((e === void 0 || e > l) && (e = l), t.length > 0 && (e < 0 || r < 0) || r > this.length)
685
685
  throw new RangeError("Attempt to write outside buffer bounds");
686
686
  p || (p = "utf8");
687
- for (var h = !1; ; )
687
+ for (var m = !1; ; )
688
688
  switch (p) {
689
689
  case "hex":
690
690
  return Qt(this, t, r, e);
@@ -703,9 +703,9 @@ pt.write = function(n, a, s, c, f, m) {
703
703
  case "utf-16le":
704
704
  return er(this, t, r, e);
705
705
  default:
706
- if (h)
706
+ if (m)
707
707
  throw new TypeError("Unknown encoding: " + p);
708
- p = ("" + p).toLowerCase(), h = !0;
708
+ p = ("" + p).toLowerCase(), m = !0;
709
709
  }
710
710
  }, o.prototype.toJSON = function() {
711
711
  return {
@@ -719,24 +719,24 @@ pt.write = function(n, a, s, c, f, m) {
719
719
  function ht(i, t, r) {
720
720
  r = Math.min(i.length, r);
721
721
  for (var e = [], p = t; p < r; ) {
722
- var l = i[p], h = null, w = l > 239 ? 4 : l > 223 ? 3 : l > 191 ? 2 : 1;
722
+ var l = i[p], m = null, w = l > 239 ? 4 : l > 223 ? 3 : l > 191 ? 2 : 1;
723
723
  if (p + w <= r) {
724
724
  var g, E, A, b;
725
725
  switch (w) {
726
726
  case 1:
727
- l < 128 && (h = l);
727
+ l < 128 && (m = l);
728
728
  break;
729
729
  case 2:
730
- g = i[p + 1], (g & 192) === 128 && (b = (l & 31) << 6 | g & 63, b > 127 && (h = b));
730
+ g = i[p + 1], (g & 192) === 128 && (b = (l & 31) << 6 | g & 63, b > 127 && (m = b));
731
731
  break;
732
732
  case 3:
733
- g = i[p + 1], E = i[p + 2], (g & 192) === 128 && (E & 192) === 128 && (b = (l & 15) << 12 | (g & 63) << 6 | E & 63, b > 2047 && (b < 55296 || b > 57343) && (h = b));
733
+ g = i[p + 1], E = i[p + 2], (g & 192) === 128 && (E & 192) === 128 && (b = (l & 15) << 12 | (g & 63) << 6 | E & 63, b > 2047 && (b < 55296 || b > 57343) && (m = b));
734
734
  break;
735
735
  case 4:
736
- g = i[p + 1], E = i[p + 2], A = i[p + 3], (g & 192) === 128 && (E & 192) === 128 && (A & 192) === 128 && (b = (l & 15) << 18 | (g & 63) << 12 | (E & 63) << 6 | A & 63, b > 65535 && b < 1114112 && (h = b));
736
+ g = i[p + 1], E = i[p + 2], A = i[p + 3], (g & 192) === 128 && (E & 192) === 128 && (A & 192) === 128 && (b = (l & 15) << 18 | (g & 63) << 12 | (E & 63) << 6 | A & 63, b > 65535 && b < 1114112 && (m = b));
737
737
  }
738
738
  }
739
- h === null ? (h = 65533, w = 1) : h > 65535 && (h -= 65536, e.push(h >>> 10 & 1023 | 55296), h = 56320 | h & 1023), e.push(h), p += w;
739
+ m === null ? (m = 65533, w = 1) : m > 65535 && (m -= 65536, e.push(m >>> 10 & 1023 | 55296), m = 56320 | m & 1023), e.push(m), p += w;
740
740
  }
741
741
  return ar(e);
742
742
  }
@@ -784,64 +784,64 @@ pt.write = function(n, a, s, c, f, m) {
784
784
  var p = this.subarray(t, r);
785
785
  return Object.setPrototypeOf(p, o.prototype), p;
786
786
  };
787
- function _(i, t, r) {
787
+ function F(i, t, r) {
788
788
  if (i % 1 !== 0 || i < 0)
789
789
  throw new RangeError("offset is not uint");
790
790
  if (i + t > r)
791
791
  throw new RangeError("Trying to access beyond buffer length");
792
792
  }
793
793
  o.prototype.readUintLE = o.prototype.readUIntLE = function(t, r, e) {
794
- t = t >>> 0, r = r >>> 0, e || _(t, r, this.length);
795
- for (var p = this[t], l = 1, h = 0; ++h < r && (l *= 256); )
796
- p += this[t + h] * l;
794
+ t = t >>> 0, r = r >>> 0, e || F(t, r, this.length);
795
+ for (var p = this[t], l = 1, m = 0; ++m < r && (l *= 256); )
796
+ p += this[t + m] * l;
797
797
  return p;
798
798
  }, o.prototype.readUintBE = o.prototype.readUIntBE = function(t, r, e) {
799
- t = t >>> 0, r = r >>> 0, e || _(t, r, this.length);
799
+ t = t >>> 0, r = r >>> 0, e || F(t, r, this.length);
800
800
  for (var p = this[t + --r], l = 1; r > 0 && (l *= 256); )
801
801
  p += this[t + --r] * l;
802
802
  return p;
803
803
  }, o.prototype.readUint8 = o.prototype.readUInt8 = function(t, r) {
804
- return t = t >>> 0, r || _(t, 1, this.length), this[t];
804
+ return t = t >>> 0, r || F(t, 1, this.length), this[t];
805
805
  }, o.prototype.readUint16LE = o.prototype.readUInt16LE = function(t, r) {
806
- return t = t >>> 0, r || _(t, 2, this.length), this[t] | this[t + 1] << 8;
806
+ return t = t >>> 0, r || F(t, 2, this.length), this[t] | this[t + 1] << 8;
807
807
  }, o.prototype.readUint16BE = o.prototype.readUInt16BE = function(t, r) {
808
- return t = t >>> 0, r || _(t, 2, this.length), this[t] << 8 | this[t + 1];
808
+ return t = t >>> 0, r || F(t, 2, this.length), this[t] << 8 | this[t + 1];
809
809
  }, o.prototype.readUint32LE = o.prototype.readUInt32LE = function(t, r) {
810
- return t = t >>> 0, r || _(t, 4, this.length), (this[t] | this[t + 1] << 8 | this[t + 2] << 16) + this[t + 3] * 16777216;
810
+ return t = t >>> 0, r || F(t, 4, this.length), (this[t] | this[t + 1] << 8 | this[t + 2] << 16) + this[t + 3] * 16777216;
811
811
  }, o.prototype.readUint32BE = o.prototype.readUInt32BE = function(t, r) {
812
- return t = t >>> 0, r || _(t, 4, this.length), this[t] * 16777216 + (this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3]);
812
+ return t = t >>> 0, r || F(t, 4, this.length), this[t] * 16777216 + (this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3]);
813
813
  }, o.prototype.readIntLE = function(t, r, e) {
814
- t = t >>> 0, r = r >>> 0, e || _(t, r, this.length);
815
- for (var p = this[t], l = 1, h = 0; ++h < r && (l *= 256); )
816
- p += this[t + h] * l;
814
+ t = t >>> 0, r = r >>> 0, e || F(t, r, this.length);
815
+ for (var p = this[t], l = 1, m = 0; ++m < r && (l *= 256); )
816
+ p += this[t + m] * l;
817
817
  return l *= 128, p >= l && (p -= Math.pow(2, 8 * r)), p;
818
818
  }, o.prototype.readIntBE = function(t, r, e) {
819
- t = t >>> 0, r = r >>> 0, e || _(t, r, this.length);
820
- for (var p = r, l = 1, h = this[t + --p]; p > 0 && (l *= 256); )
821
- h += this[t + --p] * l;
822
- return l *= 128, h >= l && (h -= Math.pow(2, 8 * r)), h;
819
+ t = t >>> 0, r = r >>> 0, e || F(t, r, this.length);
820
+ for (var p = r, l = 1, m = this[t + --p]; p > 0 && (l *= 256); )
821
+ m += this[t + --p] * l;
822
+ return l *= 128, m >= l && (m -= Math.pow(2, 8 * r)), m;
823
823
  }, o.prototype.readInt8 = function(t, r) {
824
- return t = t >>> 0, r || _(t, 1, this.length), this[t] & 128 ? (255 - this[t] + 1) * -1 : this[t];
824
+ return t = t >>> 0, r || F(t, 1, this.length), this[t] & 128 ? (255 - this[t] + 1) * -1 : this[t];
825
825
  }, o.prototype.readInt16LE = function(t, r) {
826
- t = t >>> 0, r || _(t, 2, this.length);
826
+ t = t >>> 0, r || F(t, 2, this.length);
827
827
  var e = this[t] | this[t + 1] << 8;
828
828
  return e & 32768 ? e | 4294901760 : e;
829
829
  }, o.prototype.readInt16BE = function(t, r) {
830
- t = t >>> 0, r || _(t, 2, this.length);
830
+ t = t >>> 0, r || F(t, 2, this.length);
831
831
  var e = this[t + 1] | this[t] << 8;
832
832
  return e & 32768 ? e | 4294901760 : e;
833
833
  }, o.prototype.readInt32LE = function(t, r) {
834
- return t = t >>> 0, r || _(t, 4, this.length), this[t] | this[t + 1] << 8 | this[t + 2] << 16 | this[t + 3] << 24;
834
+ return t = t >>> 0, r || F(t, 4, this.length), this[t] | this[t + 1] << 8 | this[t + 2] << 16 | this[t + 3] << 24;
835
835
  }, o.prototype.readInt32BE = function(t, r) {
836
- return t = t >>> 0, r || _(t, 4, this.length), this[t] << 24 | this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3];
836
+ return t = t >>> 0, r || F(t, 4, this.length), this[t] << 24 | this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3];
837
837
  }, o.prototype.readFloatLE = function(t, r) {
838
- return t = t >>> 0, r || _(t, 4, this.length), s.read(this, t, !0, 23, 4);
838
+ return t = t >>> 0, r || F(t, 4, this.length), s.read(this, t, !0, 23, 4);
839
839
  }, o.prototype.readFloatBE = function(t, r) {
840
- return t = t >>> 0, r || _(t, 4, this.length), s.read(this, t, !1, 23, 4);
840
+ return t = t >>> 0, r || F(t, 4, this.length), s.read(this, t, !1, 23, 4);
841
841
  }, o.prototype.readDoubleLE = function(t, r) {
842
- return t = t >>> 0, r || _(t, 8, this.length), s.read(this, t, !0, 52, 8);
842
+ return t = t >>> 0, r || F(t, 8, this.length), s.read(this, t, !0, 52, 8);
843
843
  }, o.prototype.readDoubleBE = function(t, r) {
844
- return t = t >>> 0, r || _(t, 8, this.length), s.read(this, t, !1, 52, 8);
844
+ return t = t >>> 0, r || F(t, 8, this.length), s.read(this, t, !1, 52, 8);
845
845
  };
846
846
  function S(i, t, r, e, p, l) {
847
847
  if (!o.isBuffer(i))
@@ -856,18 +856,18 @@ pt.write = function(n, a, s, c, f, m) {
856
856
  var l = Math.pow(2, 8 * e) - 1;
857
857
  S(this, t, r, e, l, 0);
858
858
  }
859
- var h = 1, w = 0;
860
- for (this[r] = t & 255; ++w < e && (h *= 256); )
861
- this[r + w] = t / h & 255;
859
+ var m = 1, w = 0;
860
+ for (this[r] = t & 255; ++w < e && (m *= 256); )
861
+ this[r + w] = t / m & 255;
862
862
  return r + e;
863
863
  }, o.prototype.writeUintBE = o.prototype.writeUIntBE = function(t, r, e, p) {
864
864
  if (t = +t, r = r >>> 0, e = e >>> 0, !p) {
865
865
  var l = Math.pow(2, 8 * e) - 1;
866
866
  S(this, t, r, e, l, 0);
867
867
  }
868
- var h = e - 1, w = 1;
869
- for (this[r + h] = t & 255; --h >= 0 && (w *= 256); )
870
- this[r + h] = t / w & 255;
868
+ var m = e - 1, w = 1;
869
+ for (this[r + m] = t & 255; --m >= 0 && (w *= 256); )
870
+ this[r + m] = t / w & 255;
871
871
  return r + e;
872
872
  }, o.prototype.writeUint8 = o.prototype.writeUInt8 = function(t, r, e) {
873
873
  return t = +t, r = r >>> 0, e || S(this, t, r, 1, 255, 0), this[r] = t & 255, r + 1;
@@ -884,18 +884,18 @@ pt.write = function(n, a, s, c, f, m) {
884
884
  var l = Math.pow(2, 8 * e - 1);
885
885
  S(this, t, r, e, l - 1, -l);
886
886
  }
887
- var h = 0, w = 1, g = 0;
888
- for (this[r] = t & 255; ++h < e && (w *= 256); )
889
- t < 0 && g === 0 && this[r + h - 1] !== 0 && (g = 1), this[r + h] = (t / w >> 0) - g & 255;
887
+ var m = 0, w = 1, g = 0;
888
+ for (this[r] = t & 255; ++m < e && (w *= 256); )
889
+ t < 0 && g === 0 && this[r + m - 1] !== 0 && (g = 1), this[r + m] = (t / w >> 0) - g & 255;
890
890
  return r + e;
891
891
  }, o.prototype.writeIntBE = function(t, r, e, p) {
892
892
  if (t = +t, r = r >>> 0, !p) {
893
893
  var l = Math.pow(2, 8 * e - 1);
894
894
  S(this, t, r, e, l - 1, -l);
895
895
  }
896
- var h = e - 1, w = 1, g = 0;
897
- for (this[r + h] = t & 255; --h >= 0 && (w *= 256); )
898
- t < 0 && g === 0 && this[r + h + 1] !== 0 && (g = 1), this[r + h] = (t / w >> 0) - g & 255;
896
+ var m = e - 1, w = 1, g = 0;
897
+ for (this[r + m] = t & 255; --m >= 0 && (w *= 256); )
898
+ t < 0 && g === 0 && this[r + m + 1] !== 0 && (g = 1), this[r + m] = (t / w >> 0) - g & 255;
899
899
  return r + e;
900
900
  }, o.prototype.writeInt8 = function(t, r, e) {
901
901
  return t = +t, r = r >>> 0, e || S(this, t, r, 1, 127, -128), t < 0 && (t = 255 + t + 1), this[r] = t & 255, r + 1;
@@ -964,16 +964,16 @@ pt.write = function(n, a, s, c, f, m) {
964
964
  if (e <= r)
965
965
  return this;
966
966
  r = r >>> 0, e = e === void 0 ? this.length : e >>> 0, t || (t = 0);
967
- var h;
967
+ var m;
968
968
  if (typeof t == "number")
969
- for (h = r; h < e; ++h)
970
- this[h] = t;
969
+ for (m = r; m < e; ++m)
970
+ this[m] = t;
971
971
  else {
972
972
  var w = o.isBuffer(t) ? t : o.from(t, p), g = w.length;
973
973
  if (g === 0)
974
974
  throw new TypeError('The value "' + t + '" is invalid for argument "value"');
975
- for (h = 0; h < e - r; ++h)
976
- this[h + r] = w[h % g];
975
+ for (m = 0; m < e - r; ++m)
976
+ this[m + r] = w[m % g];
977
977
  }
978
978
  return this;
979
979
  };
@@ -985,15 +985,15 @@ pt.write = function(n, a, s, c, f, m) {
985
985
  i = i + "=";
986
986
  return i;
987
987
  }
988
- function X(i, t) {
988
+ function G(i, t) {
989
989
  t = t || 1 / 0;
990
- for (var r, e = i.length, p = null, l = [], h = 0; h < e; ++h) {
991
- if (r = i.charCodeAt(h), r > 55295 && r < 57344) {
990
+ for (var r, e = i.length, p = null, l = [], m = 0; m < e; ++m) {
991
+ if (r = i.charCodeAt(m), r > 55295 && r < 57344) {
992
992
  if (!p) {
993
993
  if (r > 56319) {
994
994
  (t -= 3) > -1 && l.push(239, 191, 189);
995
995
  continue;
996
- } else if (h + 1 === e) {
996
+ } else if (m + 1 === e) {
997
997
  (t -= 3) > -1 && l.push(239, 191, 189);
998
998
  continue;
999
999
  }
@@ -1046,8 +1046,8 @@ pt.write = function(n, a, s, c, f, m) {
1046
1046
  return t;
1047
1047
  }
1048
1048
  function hr(i, t) {
1049
- for (var r, e, p, l = [], h = 0; h < i.length && !((t -= 2) < 0); ++h)
1050
- r = i.charCodeAt(h), e = r >> 8, p = r % 256, l.push(p), l.push(e);
1049
+ for (var r, e, p, l = [], m = 0; m < i.length && !((t -= 2) < 0); ++m)
1050
+ r = i.charCodeAt(m), e = r >> 8, p = r % 256, l.push(p), l.push(e);
1051
1051
  return l;
1052
1052
  }
1053
1053
  function yt(i) {
@@ -1061,7 +1061,7 @@ pt.write = function(n, a, s, c, f, m) {
1061
1061
  function I(i, t) {
1062
1062
  return i instanceof t || i != null && i.constructor != null && i.constructor.name != null && i.constructor.name === t.name;
1063
1063
  }
1064
- function G(i) {
1064
+ function V(i) {
1065
1065
  return i !== i;
1066
1066
  }
1067
1067
  var mr = function() {
@@ -1078,43 +1078,43 @@ pt.write = function(n, a, s, c, f, m) {
1078
1078
  for (var x in u)
1079
1079
  o[x] = u[x];
1080
1080
  }
1081
- c.from && c.alloc && c.allocUnsafe && c.allocUnsafeSlow ? n.exports = s : (f(s, a), a.Buffer = m);
1082
- function m(u, o, x) {
1081
+ c.from && c.alloc && c.allocUnsafe && c.allocUnsafeSlow ? n.exports = s : (f(s, a), a.Buffer = h);
1082
+ function h(u, o, x) {
1083
1083
  return c(u, o, x);
1084
1084
  }
1085
- m.prototype = Object.create(c.prototype), f(c, m), m.from = function(u, o, x) {
1085
+ h.prototype = Object.create(c.prototype), f(c, h), h.from = function(u, o, x) {
1086
1086
  if (typeof u == "number")
1087
1087
  throw new TypeError("Argument must not be a number");
1088
1088
  return c(u, o, x);
1089
- }, m.alloc = function(u, o, x) {
1089
+ }, h.alloc = function(u, o, x) {
1090
1090
  if (typeof u != "number")
1091
1091
  throw new TypeError("Argument must be a number");
1092
1092
  var y = c(u);
1093
1093
  return o !== void 0 ? typeof x == "string" ? y.fill(o, x) : y.fill(o) : y.fill(0), y;
1094
- }, m.allocUnsafe = function(u) {
1094
+ }, h.allocUnsafe = function(u) {
1095
1095
  if (typeof u != "number")
1096
1096
  throw new TypeError("Argument must be a number");
1097
1097
  return c(u);
1098
- }, m.allocUnsafeSlow = function(u) {
1098
+ }, h.allocUnsafeSlow = function(u) {
1099
1099
  if (typeof u != "number")
1100
1100
  throw new TypeError("Argument must be a number");
1101
1101
  return s.SlowBuffer(u);
1102
1102
  };
1103
1103
  })(rt, rt.exports);
1104
1104
  var Rt = rt.exports, Lt = Rt.Buffer;
1105
- function W(n, a) {
1105
+ function H(n, a) {
1106
1106
  this._block = Lt.alloc(n), this._finalSize = a, this._blockSize = n, this._len = 0;
1107
1107
  }
1108
- W.prototype.update = function(n, a) {
1108
+ H.prototype.update = function(n, a) {
1109
1109
  typeof n == "string" && (a = a || "utf8", n = Lt.from(n, a));
1110
- for (var s = this._block, c = this._blockSize, f = n.length, m = this._len, u = 0; u < f; ) {
1111
- for (var o = m % c, x = Math.min(f - u, c - o), y = 0; y < x; y++)
1110
+ for (var s = this._block, c = this._blockSize, f = n.length, h = this._len, u = 0; u < f; ) {
1111
+ for (var o = h % c, x = Math.min(f - u, c - o), y = 0; y < x; y++)
1112
1112
  s[o + y] = n[u + y];
1113
- m += x, u += x, m % c === 0 && this._update(s);
1113
+ h += x, u += x, h % c === 0 && this._update(s);
1114
1114
  }
1115
1115
  return this._len += f, this;
1116
1116
  };
1117
- W.prototype.digest = function(n) {
1117
+ H.prototype.digest = function(n) {
1118
1118
  var a = this._len % this._blockSize;
1119
1119
  this._block[a] = 128, this._block.fill(0, a + 1), a >= this._finalSize && (this._update(this._block), this._block.fill(0));
1120
1120
  var s = this._len * 8;
@@ -1125,13 +1125,13 @@ W.prototype.digest = function(n) {
1125
1125
  this._block.writeUInt32BE(f, this._blockSize - 8), this._block.writeUInt32BE(c, this._blockSize - 4);
1126
1126
  }
1127
1127
  this._update(this._block);
1128
- var m = this._hash();
1129
- return n ? m.toString(n) : m;
1128
+ var h = this._hash();
1129
+ return n ? h.toString(n) : h;
1130
1130
  };
1131
- W.prototype._update = function() {
1131
+ H.prototype._update = function() {
1132
1132
  throw new Error("_update must be implemented by subclass");
1133
1133
  };
1134
- var zr = W, qr = kr, zt = zr, $r = Rt.Buffer, Jr = [
1134
+ var zr = H, qr = kr, zt = zr, $r = Rt.Buffer, Jr = [
1135
1135
  1518500249,
1136
1136
  1859775393,
1137
1137
  -1894007588,
@@ -1157,15 +1157,15 @@ function Yr(n, a, s, c) {
1157
1157
  return n === 0 ? a & s | ~a & c : n === 2 ? a & s | a & c | s & c : a ^ s ^ c;
1158
1158
  }
1159
1159
  C.prototype._update = function(n) {
1160
- for (var a = this._w, s = this._a | 0, c = this._b | 0, f = this._c | 0, m = this._d | 0, u = this._e | 0, o = 0; o < 16; ++o)
1160
+ for (var a = this._w, s = this._a | 0, c = this._b | 0, f = this._c | 0, h = this._d | 0, u = this._e | 0, o = 0; o < 16; ++o)
1161
1161
  a[o] = n.readInt32BE(o * 4);
1162
1162
  for (; o < 80; ++o)
1163
1163
  a[o] = Wr(a[o - 3] ^ a[o - 8] ^ a[o - 14] ^ a[o - 16]);
1164
1164
  for (var x = 0; x < 80; ++x) {
1165
- var y = ~~(x / 20), v = Hr(s) + Yr(y, c, f, m) + u + a[x] + Jr[y] | 0;
1166
- u = m, m = f, f = Zr(c), c = s, s = v;
1165
+ var y = ~~(x / 20), v = Hr(s) + Yr(y, c, f, h) + u + a[x] + Jr[y] | 0;
1166
+ u = h, h = f, f = Zr(c), c = s, s = v;
1167
1167
  }
1168
- this._a = s + this._a | 0, this._b = c + this._b | 0, this._c = f + this._c | 0, this._d = m + this._d | 0, this._e = u + this._e | 0;
1168
+ this._a = s + this._a | 0, this._b = c + this._b | 0, this._c = f + this._c | 0, this._d = h + this._d | 0, this._e = u + this._e | 0;
1169
1169
  };
1170
1170
  C.prototype._hash = function() {
1171
1171
  var n = $r.allocUnsafe(20);
@@ -1189,28 +1189,28 @@ function ti(n) {
1189
1189
  a += String.fromCharCode(parseInt(n.substr(s, 2), 16));
1190
1190
  return btoa(a);
1191
1191
  }
1192
- const H = (n, a = "sha1") => {
1192
+ const Z = (n, a = "sha1") => {
1193
1193
  if (a !== "sha1")
1194
1194
  throw new Error("Only sha1 algorithm is available.");
1195
1195
  const s = new Xr();
1196
1196
  return ti(s.update(n).digest("hex"));
1197
1197
  }, $t = async (n) => {
1198
- const a = new _t(), { name: s, revision: c, documentType: f, created: m, lastModified: u } = n, o = {
1198
+ const a = new Ft(), { name: s, revision: c, documentType: f, created: h, lastModified: u } = n, o = {
1199
1199
  name: s,
1200
1200
  revision: c,
1201
1201
  documentType: f,
1202
- created: m,
1202
+ created: h,
1203
1203
  lastModified: u
1204
1204
  };
1205
1205
  return a.file("header.json", JSON.stringify(o, null, 2)), a.file(
1206
1206
  "state.json",
1207
1207
  JSON.stringify(n.initialState || {}, null, 2)
1208
1208
  ), a.file("operations.json", JSON.stringify(n.operations, null, 2)), Object.keys(n.attachments).forEach((y) => {
1209
- const { data: v, ...F } = n.attachments[y];
1209
+ const { data: v, ..._ } = n.attachments[y];
1210
1210
  a.file(y, v, {
1211
1211
  base64: !0,
1212
1212
  createFolders: !0,
1213
- comment: JSON.stringify(F)
1213
+ comment: JSON.stringify(_)
1214
1214
  });
1215
1215
  }), a;
1216
1216
  }, ri = async (n, a, s, c) => {
@@ -1218,10 +1218,10 @@ const H = (n, a = "sha1") => {
1218
1218
  type: "uint8array",
1219
1219
  streamFiles: !0
1220
1220
  });
1221
- const m = c ?? n.name, u = `.${s}.zip`;
1221
+ const h = c ?? n.name, u = `.${s}.zip`;
1222
1222
  return Gr(
1223
1223
  a,
1224
- m.endsWith(u) ? m : `${m}${u}`
1224
+ h.endsWith(u) ? h : `${h}${u}`
1225
1225
  );
1226
1226
  }, Ai = async (n, a) => {
1227
1227
  const c = await (await $t(n)).generateAsync({ type: "blob" }), f = await a.createWritable();
@@ -1230,16 +1230,16 @@ const H = (n, a = "sha1") => {
1230
1230
  const s = qt();
1231
1231
  return ii(s, a);
1232
1232
  }, ii = async (n, a) => {
1233
- const s = new _t();
1233
+ const s = new Ft();
1234
1234
  return await s.loadAsync(n), ei(s, a);
1235
1235
  };
1236
1236
  async function ei(n, a) {
1237
1237
  const s = n.file("state.json");
1238
1238
  if (!s)
1239
1239
  throw new Error("Initial state not found");
1240
- const c = await s.async("string"), f = JSON.parse(c), m = n.file("header.json");
1240
+ const c = await s.async("string"), f = JSON.parse(c), h = n.file("header.json");
1241
1241
  let u = null;
1242
- m && (u = JSON.parse(await m.async("string")));
1242
+ h && (u = JSON.parse(await h.async("string")));
1243
1243
  const o = n.file("operations.json");
1244
1244
  if (!o)
1245
1245
  throw new Error("Operations history not found");
@@ -1253,7 +1253,7 @@ async function ei(n, a) {
1253
1253
  attachments: { ...f.attachments }
1254
1254
  };
1255
1255
  let v = x.slice(0, u == null ? void 0 : u.revision).reduce(
1256
- (F, U) => a(F, U),
1256
+ (_, U) => a(_, U),
1257
1257
  y
1258
1258
  );
1259
1259
  return u && (v = {
@@ -1273,20 +1273,20 @@ async function Bi(n) {
1273
1273
  const { buffer: a, mimeType: s = "application/octet-stream" } = await Vr(), c = Jt(n), f = a.toString("base64");
1274
1274
  return {
1275
1275
  data: f,
1276
- hash: H(f),
1276
+ hash: Z(f),
1277
1277
  mimeType: s,
1278
1278
  ...c
1279
1279
  };
1280
1280
  }
1281
1281
  async function Si(n) {
1282
1282
  const a = await Qr(), s = Ir.getType(n) || "application/octet-stream", c = Jt(n), f = a.toString("base64");
1283
- return { data: f, hash: H(f), mimeType: s, ...c };
1283
+ return { data: f, hash: Z(f), mimeType: s, ...c };
1284
1284
  }
1285
- function $(n, a, s) {
1286
- const c = wi(n), f = xi(s);
1285
+ function J(n, a, s, c) {
1286
+ const f = wi(n), h = xi(s);
1287
1287
  return a.reduce(
1288
- (m, u) => f(m, u),
1289
- c
1288
+ (u, o) => h(u, o, c),
1289
+ f
1290
1290
  );
1291
1291
  }
1292
1292
  function ni(n, a) {
@@ -1298,7 +1298,7 @@ function ai(n, a, s) {
1298
1298
  n.revision - c
1299
1299
  );
1300
1300
  return {
1301
- ...$(
1301
+ ...J(
1302
1302
  n.initialState,
1303
1303
  f,
1304
1304
  s
@@ -1311,14 +1311,14 @@ function oi(n, a, s) {
1311
1311
  const c = n.operations.length - n.revision;
1312
1312
  if (!c)
1313
1313
  throw new Error("There is no UNDO operation to REDO");
1314
- const f = a < c ? a : c, m = n.operations.slice(
1314
+ const f = a < c ? a : c, h = n.operations.slice(
1315
1315
  0,
1316
1316
  n.revision + f
1317
1317
  );
1318
1318
  return {
1319
- ...$(
1319
+ ...J(
1320
1320
  n.initialState,
1321
- m,
1321
+ h,
1322
1322
  s
1323
1323
  ),
1324
1324
  operations: n.operations,
@@ -1327,15 +1327,15 @@ function oi(n, a, s) {
1327
1327
  }
1328
1328
  function pi(n, a, s, c) {
1329
1329
  a = a || 0, s = s || n.operations.length;
1330
- const f = n.operations.slice(a, s), m = n.operations.slice(0, a), u = n.operations.slice(s), o = $(
1330
+ const f = n.operations.slice(a, s), h = n.operations.slice(0, a), u = n.operations.slice(s), o = J(
1331
1331
  n.initialState,
1332
- m.concat(f),
1332
+ h.concat(f),
1333
1333
  c
1334
1334
  ), { name: x, state: y } = o;
1335
- return $(
1335
+ return J(
1336
1336
  n.initialState,
1337
1337
  [
1338
- ...m,
1338
+ ...h,
1339
1339
  ct({ name: x, state: y }, f.length),
1340
1340
  ...u
1341
1341
  ],
@@ -1349,9 +1349,9 @@ function si(n, a) {
1349
1349
  state: a.state ?? {}
1350
1350
  };
1351
1351
  }
1352
- const Pt = "SET_NAME", Z = "UNDO", Y = "REDO", M = "PRUNE", Wt = "LOAD_STATE";
1352
+ const Pt = "SET_NAME", Y = "UNDO", K = "REDO", M = "PRUNE", Wt = "LOAD_STATE";
1353
1353
  function ci(n, a) {
1354
- return [Z, Y, M].includes(a.type) ? n.revision : n.revision + 1;
1354
+ return [Y, K, M].includes(a.type) ? n.revision : n.revision + 1;
1355
1355
  }
1356
1356
  function li(n, a) {
1357
1357
  return {
@@ -1361,7 +1361,7 @@ function li(n, a) {
1361
1361
  };
1362
1362
  }
1363
1363
  function ui(n, a) {
1364
- if ([Z, Y, M, M].includes(a.type))
1364
+ if ([Y, K, M, M].includes(a.type))
1365
1365
  return n;
1366
1366
  const s = n.operations.slice(0, n.revision);
1367
1367
  return {
@@ -1385,9 +1385,9 @@ function hi(n, a, s) {
1385
1385
  switch (kt().parse(a), a.type) {
1386
1386
  case Pt:
1387
1387
  return ni(n, a.input);
1388
- case Z:
1389
- return ai(n, a.input, s);
1390
1388
  case Y:
1389
+ return ai(n, a.input, s);
1390
+ case K:
1391
1391
  return oi(n, a.input, s);
1392
1392
  case M:
1393
1393
  return pi(
@@ -1402,37 +1402,37 @@ function hi(n, a, s) {
1402
1402
  return n;
1403
1403
  }
1404
1404
  }
1405
- function mi(n, a, s) {
1406
- let c = n;
1407
- return Ft(a) && (c = hi(c, a, s)), c = fi(c, a), c = Et(c, (f) => {
1408
- const m = s(f.state, a);
1409
- if (m)
1405
+ function mi(n, a, s, c) {
1406
+ let f = n;
1407
+ return _t(a) && (f = hi(f, a, s)), f = fi(f, a), f = Et(f, (h) => {
1408
+ const u = s(h.state, a, c);
1409
+ if (u)
1410
1410
  return yr({
1411
- ...c,
1412
- state: m
1411
+ ...f,
1412
+ state: u
1413
1413
  });
1414
- }), Et(c, (f) => {
1415
- f.operations[f.operations.length - 1].hash = yi(f), !Ft(a) && a.attachments && a.attachments.forEach((m) => {
1416
- const { hash: u, ...o } = m;
1417
- f.attachments[u] = {
1418
- ...o
1414
+ }), Et(f, (h) => {
1415
+ h.operations[h.operations.length - 1].hash = yi(h), !_t(a) && a.attachments && a.attachments.forEach((u) => {
1416
+ const { hash: o, ...x } = u;
1417
+ h.attachments[o] = {
1418
+ ...x
1419
1419
  };
1420
1420
  });
1421
1421
  });
1422
1422
  }
1423
- function Ft(n) {
1424
- return [Pt, Z, Y, M, Wt].includes(n.type);
1423
+ function _t(n) {
1424
+ return [Pt, Y, K, M, Wt].includes(n.type);
1425
1425
  }
1426
1426
  function R(n, a, s, c, f = "global") {
1427
1427
  if (!n)
1428
1428
  throw new Error("Empty action type");
1429
1429
  if (typeof n != "string")
1430
1430
  throw new Error(`Invalid action type: ${n}`);
1431
- const m = { type: n, input: a, scope: f };
1432
- return s && (m.attachments = s), c == null || c().parse(m), m;
1431
+ const h = { type: n, input: a, scope: f };
1432
+ return s && (h.attachments = s), c == null || c().parse(h), h;
1433
1433
  }
1434
1434
  function xi(n, a = mi) {
1435
- return (s, c) => a(s, c, n);
1435
+ return (s, c, f) => a(s, c, n, f);
1436
1436
  }
1437
1437
  const di = (n, a) => ({
1438
1438
  name: "",
@@ -1453,11 +1453,11 @@ const di = (n, a) => ({
1453
1453
  initialState: s,
1454
1454
  operations: []
1455
1455
  };
1456
- }, yi = (n) => H(wr(n.state)), ji = (n, a = 1e3) => {
1456
+ }, yi = (n) => Z(wr(n.state)), ji = (n, a = 1e3) => {
1457
1457
  const s = Math.random() * a;
1458
- return H(`${(n ?? /* @__PURE__ */ new Date()).toISOString()}${s}`);
1458
+ return Z(`${(n ?? /* @__PURE__ */ new Date()).toISOString()}${s}`);
1459
1459
  };
1460
- function q(n) {
1460
+ function $(n) {
1461
1461
  return gr(vr(n, !0));
1462
1462
  }
1463
1463
  const Ht = (n) => R(
@@ -1489,10 +1489,11 @@ class Ii {
1489
1489
  * @param reducer - The reducer function that updates the state.
1490
1490
  * @param document - The initial state of the document.
1491
1491
  */
1492
- constructor(a, s) {
1493
- V(this, "_document");
1494
- V(this, "_reducer");
1495
- this._reducer = a, this._document = s;
1492
+ constructor(a, s, c) {
1493
+ q(this, "_document");
1494
+ q(this, "_reducer");
1495
+ q(this, "_dispatch");
1496
+ this._reducer = a, this._document = s, this._dispatch = c;
1496
1497
  }
1497
1498
  /**
1498
1499
  * Dispatches an action to update the state of the document.
@@ -1500,7 +1501,7 @@ class Ii {
1500
1501
  * @returns The Document instance.
1501
1502
  */
1502
1503
  dispatch(a) {
1503
- return this._document = this._reducer(this._document, a), this;
1504
+ return this._document = this._reducer(this._document, a, this._dispatch), this;
1504
1505
  }
1505
1506
  /**
1506
1507
  * Saves the state of the document to a file.
@@ -1531,13 +1532,13 @@ class Ii {
1531
1532
  * Gets the current state of the document.
1532
1533
  */
1533
1534
  get state() {
1534
- return q(this._document.state);
1535
+ return $(this._document.state);
1535
1536
  }
1536
1537
  /**
1537
1538
  * Gets the list of operations performed on the document.
1538
1539
  */
1539
1540
  get operations() {
1540
- return q(this._document.operations);
1541
+ return $(this._document.operations);
1541
1542
  }
1542
1543
  /**
1543
1544
  * Gets the name of the document.
@@ -1573,13 +1574,13 @@ class Ii {
1573
1574
  * Gets the initial state of the document.
1574
1575
  */
1575
1576
  get initialState() {
1576
- return q(this._document.initialState);
1577
+ return $(this._document.initialState);
1577
1578
  }
1578
1579
  /**
1579
1580
  * Returns the current document as an object
1580
1581
  */
1581
1582
  toDocument() {
1582
- return q(this._document);
1583
+ return $(this._document);
1583
1584
  }
1584
1585
  /**
1585
1586
  * Gets the attachment associated with the given key.
@@ -1647,7 +1648,7 @@ export {
1647
1648
  R as f,
1648
1649
  ki as g,
1649
1650
  Ui as h,
1650
- Ft as i,
1651
+ _t as i,
1651
1652
  $t as j,
1652
1653
  Si as k,
1653
1654
  bt as l,
@@ -1655,7 +1656,7 @@ export {
1655
1656
  yi as n,
1656
1657
  ji as o,
1657
1658
  mi as p,
1658
- q as r,
1659
+ $ as r,
1659
1660
  ri as s,
1660
- _i as z
1661
+ Fi as z
1661
1662
  };