@flyfish-group/file-viewer 1.0.2 → 1.0.4

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.
@@ -20,8 +20,8 @@ var N = (a, t, e) => {
20
20
  t instanceof WeakSet ? t.add(a) : t.set(a, e);
21
21
  };
22
22
  var v = (a, t, e) => (ze(a, t, "access private method"), e);
23
- import { defineComponent as Re, computed as Se } from "vue";
24
- import { n as Ie } from "./index.js";
23
+ import { defineComponent as Re, computed as Ie } from "vue";
24
+ import { n as Se } from "./index.js";
25
25
  function V() {
26
26
  return {
27
27
  async: !1,
@@ -80,7 +80,7 @@ function re(a) {
80
80
  }
81
81
  return a;
82
82
  }
83
- const I = { exec: () => null };
83
+ const S = { exec: () => null };
84
84
  function le(a, t) {
85
85
  const e = a.replace(/\|/g, (i, s, l) => {
86
86
  let o = !1, p = s;
@@ -611,7 +611,7 @@ const qe = /^(?: *(?:\n|$))+/, Me = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, Qe =
611
611
  list: He,
612
612
  newline: qe,
613
613
  paragraph: ge,
614
- table: I,
614
+ table: S,
615
615
  text: Oe
616
616
  }, ae = k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", D).getRegex(), Ue = R(x({}, J), {
617
617
  table: ae,
@@ -620,20 +620,20 @@ const qe = /^(?: *(?:\n|$))+/, Me = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, Qe =
620
620
  html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", W).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
621
621
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
622
622
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
623
- fences: I,
623
+ fences: S,
624
624
  // fences not supported
625
625
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
626
626
  paragraph: k(X).replace("hr", C).replace("heading", ` *#{1,6} *[^
627
627
  ]`).replace("lheading", fe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
628
628
  }), ke = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Xe = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, de = /^( {2,}|\\)\n(?!\s*$)/, Ge = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, L = "\\p{P}$+<=>`^|~", We = k(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, L).getRegex(), Je = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, Ke = k(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, L).getRegex(), Ye = k("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, L).getRegex(), et = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, L).getRegex(), tt = k(/\\([punct])/, "gu").replace(/punct/g, L).getRegex(), nt = k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), st = k(W).replace("(?:-->|$)", "-->").getRegex(), it = k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", st).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, rt = k(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), xe = k(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", G).getRegex(), me = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", G).getRegex(), lt = k("reflink|nolink(?!\\()", "g").replace("reflink", xe).replace("nolink", me).getRegex(), K = {
629
- _backpedal: I,
629
+ _backpedal: S,
630
630
  // only used for GFM url
631
631
  anyPunctuation: tt,
632
632
  autolink: nt,
633
633
  blockSkip: Je,
634
634
  br: de,
635
635
  code: Xe,
636
- del: I,
636
+ del: S,
637
637
  emStrongLDelim: Ke,
638
638
  emStrongRDelimAst: Ye,
639
639
  emStrongRDelimUnd: et,
@@ -645,7 +645,7 @@ const qe = /^(?: *(?:\n|$))+/, Me = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, Qe =
645
645
  reflinkSearch: lt,
646
646
  tag: it,
647
647
  text: Ge,
648
- url: I
648
+ url: S
649
649
  }, ot = R(x({}, K), {
650
650
  link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(),
651
651
  reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex()
@@ -662,7 +662,7 @@ const qe = /^(?: *(?:\n|$))+/, Me = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, Qe =
662
662
  normal: J,
663
663
  gfm: Ue,
664
664
  pedantic: Ve
665
- }, S = {
665
+ }, I = {
666
666
  normal: K,
667
667
  gfm: F,
668
668
  breaks: at,
@@ -682,9 +682,9 @@ class w {
682
682
  };
683
683
  const e = {
684
684
  block: Z.normal,
685
- inline: S.normal
685
+ inline: I.normal
686
686
  };
687
- this.options.pedantic ? (e.block = Z.pedantic, e.inline = S.pedantic) : this.options.gfm && (e.block = Z.gfm, this.options.breaks ? e.inline = S.breaks : e.inline = S.gfm), this.tokenizer.rules = e;
687
+ this.options.pedantic ? (e.block = Z.pedantic, e.inline = I.pedantic) : this.options.gfm && (e.block = Z.gfm, this.options.breaks ? e.inline = I.breaks : e.inline = I.gfm), this.tokenizer.rules = e;
688
688
  }
689
689
  /**
690
690
  * Expose Rules
@@ -692,7 +692,7 @@ class w {
692
692
  static get rules() {
693
693
  return {
694
694
  block: Z,
695
- inline: S
695
+ inline: I
696
696
  };
697
697
  }
698
698
  /**
@@ -1287,7 +1287,8 @@ class ct {
1287
1287
  default: {
1288
1288
  const l = s;
1289
1289
  (i = (r = this.defaults.extensions) == null ? void 0 : r.childTokens) != null && i[l.type] ? this.defaults.extensions.childTokens[l.type].forEach((o) => {
1290
- n = n.concat(this.walkTokens(l[o], e));
1290
+ const p = l[o].flat(1 / 0);
1291
+ n = n.concat(this.walkTokens(p, e));
1291
1292
  }) : l.tokens && (n = n.concat(this.walkTokens(l.tokens, e)));
1292
1293
  }
1293
1294
  }
@@ -1455,14 +1456,14 @@ const ht = /* @__PURE__ */ Re({
1455
1456
  data: null
1456
1457
  },
1457
1458
  setup(a) {
1458
- const t = a, e = Se(() => f(t.data));
1459
+ const t = a, e = Ie(() => f(t.data));
1459
1460
  return { __sfc: !0, props: t, html: e };
1460
1461
  }
1461
1462
  });
1462
1463
  var pt = function() {
1463
1464
  var t = this, e = t._self._c, n = t._self._setupProxy;
1464
1465
  return e("div", { staticClass: "markdown-body", domProps: { innerHTML: t._s(n.html) } });
1465
- }, ut = [], ft = /* @__PURE__ */ Ie(
1466
+ }, ut = [], ft = /* @__PURE__ */ Se(
1466
1467
  ht,
1467
1468
  pt,
1468
1469
  ut,
@@ -22537,7 +22537,7 @@ var pdfExports = pdf$1.exports, pdf_viewer = { exports: {} };
22537
22537
  var pdf_viewerExports = pdf_viewer.exports;
22538
22538
  const pdf = "", PDFWorker = {
22539
22539
  create() {
22540
- return refWorker("pdf.worker.js").defaults(() => new Worker(new URL("" + new URL("../worker/pdf.worker.js", import.meta.url).href, self.location), { type: "module" }));
22540
+ return refWorker("pdf.worker.js").defaults(() => new Worker(new URL("../worker/pdf.worker.js", import.meta.url), { type: "module" }));
22541
22541
  }
22542
22542
  }, _sfc_main = /* @__PURE__ */ defineComponent({
22543
22543
  __name: "PdfView",
@@ -21649,7 +21649,7 @@ function sr(t, e) {
21649
21649
  }
21650
21650
  const x_ = {
21651
21651
  create() {
21652
- return wf("pptx.worker.js").defaults(() => new Worker(new URL("" + new URL("../worker/pptx.worker.js", import.meta.url).href, self.location), { type: "module" }));
21652
+ return wf("pptx.worker.js").defaults(() => new Worker(new URL("../worker/pptx.worker.js", import.meta.url), { type: "module" }));
21653
21653
  }
21654
21654
  }, y_ = /* @__PURE__ */ yf({
21655
21655
  __name: "PptxRender",