UNPKG

vue-files-preview-inno

Version:

A tool for previewing files such as doc, excel, pdf, image, markdown, txt, audio, and video and so on.

27 lines (26 loc) 757 B
import r from "../../path-webpack/path.mjs"; import { qs as e } from "./utils/core.mjs"; class s { constructor(t) { this.packagePath = "", this.directory = "", this.encoding = "", t && this.parse(t); } /** * Parse the Container XML * @param {document} containerDocument */ parse(t) { var i; if (!t) throw new Error("Container File Not Found"); if (i = e(t, "rootfile"), !i) throw new Error("No RootFile Found"); this.packagePath = i.getAttribute("full-path"), this.directory = r.dirname(this.packagePath), this.encoding = t.xmlEncoding; } destroy() { this.packagePath = void 0, this.directory = void 0, this.encoding = void 0; } } export { s as default }; //# sourceMappingURL=container.mjs.map