filetomarkdown
Version:
Convert various file types to markdown format with browser and Node.js support
2 lines • 164 kB
JavaScript
/*! For license information please see main.js.LICENSE.txt */
(()=>{var t={181:t=>{"use strict";t.exports=require("buffer")},231:function(t){(function(){t.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},416:t=>{"use strict";t.exports=require("pdf-parse")},420:function(t,e,n){(function(){var e,r={}.hasOwnProperty;e=n(2652),t.exports=function(t){function e(t){e.__super__.constructor.call(this,t)}return function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function o(){this.constructor=t}o.prototype=e.prototype,t.prototype=new o,t.__super__=e.prototype}(e,t),e.prototype.document=function(t,e){var n,r,o,i,s;for(e=this.filterOptions(e),i="",r=0,o=(s=t.children).length;r<o;r++)n=s[r],i+=this.writeChildNode(n,e,0);return e.pretty&&i.slice(-e.newline.length)===e.newline&&(i=i.slice(0,-e.newline.length)),i},e}(e)}).call(this)},630:(t,e,n)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",s=n.toStringTag||"@@toStringTag";function a(n,r,o,s){var a=r&&r.prototype instanceof c?r:c,p=Object.create(a.prototype);return i(p,"_invoke",function(n,r,o){var i,s,a,c=0,p=o||[],l=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,s=0,a=t,f.n=n,u}};function h(n,r){for(s=n,a=r,e=0;!l&&c&&!o&&e<p.length;e++){var o,i=p[e],h=f.p,y=i[2];n>3?(o=y===r)&&(a=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=n<2&&h<i[1])?(s=0,f.v=r,f.n=i[1]):h<y&&(o=n<3||i[0]>r||r>y)&&(i[4]=n,i[5]=r,f.n=y,s=0))}if(o||n>1)return u;throw l=!0,r}return function(o,p,y){if(c>1)throw TypeError("Generator is already running");for(l&&1===p&&h(p,y),s=p,a=y;(e=s<2?t:a)||!l;){i||(s?s<3?(s>1&&(f.n=-1),h(s,a)):f.n=a:f.v=a);try{if(c=2,i){if(s||(o="next"),e=i[o]){if(!(e=e.call(i,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,s<2&&(s=0)}else 1===s&&(e=i.return)&&e.call(i),s<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=t}else if((e=(l=f.n<0)?a:n.call(r,f))!==u)break}catch(e){i=t,s=1,a=e}finally{c=1}}return{value:e,done:l}}}(n,o,s),!0),p}var u={};function c(){}function p(){}function l(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(i(e={},r,function(){return this}),e),h=l.prototype=c.prototype=Object.create(f);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,i(t,s,"GeneratorFunction")),t.prototype=Object.create(h),t}return p.prototype=l,i(h,"constructor",l),i(l,"constructor",p),p.displayName="GeneratorFunction",i(l,s,"GeneratorFunction"),i(h),i(h,s,"Generator"),i(h,r,function(){return this}),i(h,"toString",function(){return"[object Generator]"}),(o=function(){return{w:a,m:y}})()}function i(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}i=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var s=function(e,n){i(t,e,function(t){return this._invoke(e,n,t)})};s("next",0),s("throw",1),s("return",2)}},i(t,e,n,r)}function s(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function u(t,e,n,r,o,i,s){try{var a=t[i](s),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(r,o)}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,p(r.key),r)}}function p(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}t.exports=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"convert",value:(i=o().m(function t(e){var r,i;return o().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,n(7393).convertToMarkdown({path:e},{styleMap:s(Array(6)).map(function(t,e){return"p[style-name='Heading ".concat(e+1,"'] => h").concat(e+1,":fresh")})});case 1:return r=t.v,i=r.value,t.a(2,i.trim())}},t)}),a=function(){var t=this,e=arguments;return new Promise(function(n,r){var o=i.apply(t,e);function s(t){u(o,n,r,s,a,"next",t)}function a(t){u(o,n,r,s,a,"throw",t)}s(void 0)})},function(t){return a.apply(this,arguments)})}],e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i,a}()},669:function(t,e,n){(function(){var e,r,o={}.hasOwnProperty;e=n(231),r=n(1959),t.exports=function(t){function n(t,r,o){if(n.__super__.constructor.call(this,t),null==r)throw new Error("Missing instruction target. "+this.debugInfo());this.type=e.ProcessingInstruction,this.target=this.stringify.insTarget(r),this.name=this.target,o&&(this.value=this.stringify.insValue(o))}return function(t,e){for(var n in e)o.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(t){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(t))},n.prototype.isEqualNode=function(t){return!!n.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)&&t.target===this.target},n}(r)}).call(this)},690:function(t,e,n){(function(){var e,r,o={}.hasOwnProperty;r=n(3910),e=n(231),t.exports=function(t){function n(t,r,o){if(n.__super__.constructor.call(this,t),null==r)throw new Error("Missing DTD notation name. "+this.debugInfo(r));if(!o.pubID&&!o.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(r));this.name=this.stringify.name(r),this.type=e.NotationDeclaration,null!=o.pubID&&(this.pubID=this.stringify.dtdPubID(o.pubID)),null!=o.sysID&&(this.sysID=this.stringify.dtdSysID(o.sysID))}return function(t,e){for(var n in e)o.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),Object.defineProperty(n.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(n.prototype,"systemId",{get:function(){return this.sysID}}),n.prototype.toString=function(t){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(t))},n}(r)}).call(this)},857:t=>{"use strict";t.exports=require("os")},1859:function(t){(function(){var e,n,r,o,i,s,a,u=[].slice,c={}.hasOwnProperty;e=function(){var t,e,n,r,o,s;if(s=arguments[0],o=2<=arguments.length?u.call(arguments,1):[],i(Object.assign))Object.assign.apply(null,arguments);else for(t=0,n=o.length;t<n;t++)if(null!=(r=o[t]))for(e in r)c.call(r,e)&&(s[e]=r[e]);return s},i=function(t){return!!t&&"[object Function]"===Object.prototype.toString.call(t)},s=function(t){var e;return!!t&&("function"==(e=typeof t)||"object"===e)},r=function(t){return i(Array.isArray)?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)},o=function(t){var e;if(r(t))return!t.length;for(e in t)if(c.call(t,e))return!1;return!0},a=function(t){var e,n;return s(t)&&(n=Object.getPrototypeOf(t))&&(e=n.constructor)&&"function"==typeof e&&e instanceof e&&Function.prototype.toString.call(e)===Function.prototype.toString.call(Object)},n=function(t){return i(t.valueOf)?t.valueOf():t},t.exports.assign=e,t.exports.isFunction=i,t.exports.isObject=s,t.exports.isArray=r,t.exports.isEmpty=o,t.exports.isPlainObject=a,t.exports.getValue=n}).call(this)},1912:function(t,e,n){(function(){"use strict";var t,r,o,i,s,a,u,c,p,l=function(t,e){return function(){return t.apply(e,arguments)}},f={}.hasOwnProperty;c=n(4043),i=n(4434),t=n(3177),u=n(2114),p=n(3557).setImmediate,r=n(6465).defaults,s=function(t){return"object"==typeof t&&null!=t&&0===Object.keys(t).length},a=function(t,e,n){var r,o;for(r=0,o=t.length;r<o;r++)e=(0,t[r])(e,n);return e},o=function(t,e,n){var r;return(r=Object.create(null)).value=n,r.writable=!0,r.enumerable=!0,r.configurable=!0,Object.defineProperty(t,e,r)},e.Parser=function(n){function i(t){var n,o,i;if(this.parseStringPromise=l(this.parseStringPromise,this),this.parseString=l(this.parseString,this),this.reset=l(this.reset,this),this.assignOrPush=l(this.assignOrPush,this),this.processAsync=l(this.processAsync,this),!(this instanceof e.Parser))return new e.Parser(t);for(n in this.options={},o=r[.2])f.call(o,n)&&(i=o[n],this.options[n]=i);for(n in t)f.call(t,n)&&(i=t[n],this.options[n]=i);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(u.normalize)),this.reset()}return function(t,e){for(var n in e)f.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(i,n),i.prototype.processAsync=function(){var t,e;try{return this.remaining.length<=this.options.chunkSize?(t=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(t),this.saxParser.close()):(t=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(t),p(this.processAsync))}catch(n){if(e=n,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(e)}},i.prototype.assignOrPush=function(t,e,n){return e in t?(t[e]instanceof Array||o(t,e,[t[e]]),t[e].push(n)):this.options.explicitArray?o(t,e,[n]):o(t,e,n)},i.prototype.reset=function(){var t,e,n,r,i;return this.removeAllListeners(),this.saxParser=c.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(i=this,function(t){if(i.saxParser.resume(),!i.saxParser.errThrown)return i.saxParser.errThrown=!0,i.emit("error",t)}),this.saxParser.onend=function(t){return function(){if(!t.saxParser.ended)return t.saxParser.ended=!0,t.emit("end",t.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,r=[],t=this.options.attrkey,e=this.options.charkey,this.saxParser.onopentag=function(n){return function(i){var s,u,c,p,l;if((c={})[e]="",!n.options.ignoreAttrs)for(s in l=i.attributes)f.call(l,s)&&(t in c||n.options.mergeAttrs||(c[t]={}),u=n.options.attrValueProcessors?a(n.options.attrValueProcessors,i.attributes[s],s):i.attributes[s],p=n.options.attrNameProcessors?a(n.options.attrNameProcessors,s):s,n.options.mergeAttrs?n.assignOrPush(c,p,u):o(c[t],p,u));return c["#name"]=n.options.tagNameProcessors?a(n.options.tagNameProcessors,i.name):i.name,n.options.xmlns&&(c[n.options.xmlnskey]={uri:i.uri,local:i.local}),r.push(c)}}(this),this.saxParser.onclosetag=function(t){return function(){var n,i,u,c,p,l,h,y,d,m;if(l=r.pop(),p=l["#name"],t.options.explicitChildren&&t.options.preserveChildrenOrder||delete l["#name"],!0===l.cdata&&(n=l.cdata,delete l.cdata),d=r[r.length-1],l[e].match(/^\s*$/)&&!n?(i=l[e],delete l[e]):(t.options.trim&&(l[e]=l[e].trim()),t.options.normalize&&(l[e]=l[e].replace(/\s{2,}/g," ").trim()),l[e]=t.options.valueProcessors?a(t.options.valueProcessors,l[e],p):l[e],1===Object.keys(l).length&&e in l&&!t.EXPLICIT_CHARKEY&&(l=l[e])),s(l)&&(l="function"==typeof t.options.emptyTag?t.options.emptyTag():""!==t.options.emptyTag?t.options.emptyTag:i),null!=t.options.validator&&(m="/"+function(){var t,e,n;for(n=[],t=0,e=r.length;t<e;t++)c=r[t],n.push(c["#name"]);return n}().concat(p).join("/"),function(){var e;try{return l=t.options.validator(m,d&&d[p],l)}catch(n){return e=n,t.emit("error",e)}}()),t.options.explicitChildren&&!t.options.mergeAttrs&&"object"==typeof l)if(t.options.preserveChildrenOrder){if(d){for(u in d[t.options.childkey]=d[t.options.childkey]||[],h={},l)f.call(l,u)&&o(h,u,l[u]);d[t.options.childkey].push(h),delete l["#name"],1===Object.keys(l).length&&e in l&&!t.EXPLICIT_CHARKEY&&(l=l[e])}}else c={},t.options.attrkey in l&&(c[t.options.attrkey]=l[t.options.attrkey],delete l[t.options.attrkey]),!t.options.charsAsChildren&&t.options.charkey in l&&(c[t.options.charkey]=l[t.options.charkey],delete l[t.options.charkey]),Object.getOwnPropertyNames(l).length>0&&(c[t.options.childkey]=l),l=c;return r.length>0?t.assignOrPush(d,p,l):(t.options.explicitRoot&&(y=l,o(l={},p,y)),t.resultObject=l,t.saxParser.ended=!0,t.emit("end",t.resultObject))}}(this),n=function(t){return function(n){var o,i;if(i=r[r.length-1])return i[e]+=n,t.options.explicitChildren&&t.options.preserveChildrenOrder&&t.options.charsAsChildren&&(t.options.includeWhiteChars||""!==n.replace(/\\n/g,"").trim())&&(i[t.options.childkey]=i[t.options.childkey]||[],(o={"#name":"__text__"})[e]=n,t.options.normalize&&(o[e]=o[e].replace(/\s{2,}/g," ").trim()),i[t.options.childkey].push(o)),i}}(this),this.saxParser.ontext=n,this.saxParser.oncdata=function(t){var e;if(e=n(t))return e.cdata=!0}},i.prototype.parseString=function(e,n){var r;null!=n&&"function"==typeof n&&(this.on("end",function(t){return this.reset(),n(null,t)}),this.on("error",function(t){return this.reset(),n(t)}));try{return""===(e=e.toString()).trim()?(this.emit("end",null),!0):(e=t.stripBOM(e),this.options.async?(this.remaining=e,p(this.processAsync),this.saxParser):this.saxParser.write(e).close())}catch(o){if(r=o,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",r),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw r}},i.prototype.parseStringPromise=function(t){return new Promise((e=this,function(n,r){return e.parseString(t,function(t,e){return t?r(t):n(e)})}));var e},i}(i),e.parseString=function(t,n,r){var o,i;return null!=r?("function"==typeof r&&(o=r),"object"==typeof n&&(i=n)):("function"==typeof n&&(o=n),i={}),new e.Parser(i).parseString(t,o)},e.parseStringPromise=function(t,n){var r;return"object"==typeof n&&(r=n),new e.Parser(r).parseStringPromise(t)}}).call(this)},1959:function(t,e,n){(function(){var e,r={}.hasOwnProperty;e=n(3910),t.exports=function(t){function e(t){e.__super__.constructor.call(this,t),this.value=""}return function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function o(){this.constructor=t}o.prototype=e.prototype,t.prototype=new o,t.__super__=e.prototype}(e,t),Object.defineProperty(e.prototype,"data",{get:function(){return this.value},set:function(t){return this.value=t||""}}),Object.defineProperty(e.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(e.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}}),e.prototype.clone=function(){return Object.create(this)},e.prototype.substringData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.appendData=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.insertData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.deleteData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.replaceData=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isEqualNode=function(t){return!!e.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)&&t.data===this.data},e}(e)}).call(this)},1998:function(t,e,n){(function(){var e,r,o,i,s,a,u,c,p={}.hasOwnProperty;c=n(1859).isObject,u=n(3910),e=n(231),r=n(5109),i=n(4059),o=n(9790),s=n(690),a=n(8339),t.exports=function(t){function n(t,r,o){var i,s,a,u,p,l;if(n.__super__.constructor.call(this,t),this.type=e.DocType,t.children)for(s=0,a=(u=t.children).length;s<a;s++)if((i=u[s]).type===e.Element){this.name=i.name;break}this.documentObject=t,c(r)&&(r=(p=r).pubID,o=p.sysID),null==o&&(o=(l=[r,o])[0],r=l[1]),null!=r&&(this.pubID=this.stringify.dtdPubID(r)),null!=o&&(this.sysID=this.stringify.dtdSysID(o))}return function(t,e){for(var n in e)p.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),Object.defineProperty(n.prototype,"entities",{get:function(){var t,n,r,o,i;for(o={},n=0,r=(i=this.children).length;n<r;n++)(t=i[n]).type!==e.EntityDeclaration||t.pe||(o[t.name]=t);return new a(o)}}),Object.defineProperty(n.prototype,"notations",{get:function(){var t,n,r,o,i;for(o={},n=0,r=(i=this.children).length;n<r;n++)(t=i[n]).type===e.NotationDeclaration&&(o[t.name]=t);return new a(o)}}),Object.defineProperty(n.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(n.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(n.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),n.prototype.element=function(t,e){var n;return n=new o(this,t,e),this.children.push(n),this},n.prototype.attList=function(t,e,n,o,i){var s;return s=new r(this,t,e,n,o,i),this.children.push(s),this},n.prototype.entity=function(t,e){var n;return n=new i(this,!1,t,e),this.children.push(n),this},n.prototype.pEntity=function(t,e){var n;return n=new i(this,!0,t,e),this.children.push(n),this},n.prototype.notation=function(t,e){var n;return n=new s(this,t,e),this.children.push(n),this},n.prototype.toString=function(t){return this.options.writer.docType(this,this.options.writer.filterOptions(t))},n.prototype.ele=function(t,e){return this.element(t,e)},n.prototype.att=function(t,e,n,r,o){return this.attList(t,e,n,r,o)},n.prototype.ent=function(t,e){return this.entity(t,e)},n.prototype.pent=function(t,e){return this.pEntity(t,e)},n.prototype.not=function(t,e){return this.notation(t,e)},n.prototype.up=function(){return this.root()||this.documentObject},n.prototype.isEqualNode=function(t){return!!n.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)&&(t.name===this.name&&(t.publicId===this.publicId&&t.systemId===this.systemId))},n}(u)}).call(this)},2114:function(t,e){(function(){"use strict";var t;t=new RegExp(/(?!xmlns)^.*:/),e.normalize=function(t){return t.toLowerCase()},e.firstCharLowerCase=function(t){return t.charAt(0).toLowerCase()+t.slice(1)},e.stripPrefix=function(e){return e.replace(t,"")},e.parseNumbers=function(t){return isNaN(t)||(t=t%1==0?parseInt(t,10):parseFloat(t)),t},e.parseBooleans=function(t){return/^(?:true|false)$/i.test(t)&&(t="true"===t.toLowerCase()),t}}).call(this)},2152:function(t,e,n){(function(){var e,r,o,i={}.hasOwnProperty;o=n(1859).isObject,r=n(3910),e=n(231),t.exports=function(t){function n(t,r,i,s){var a;n.__super__.constructor.call(this,t),o(r)&&(r=(a=r).version,i=a.encoding,s=a.standalone),r||(r="1.0"),this.type=e.Declaration,this.version=this.stringify.xmlVersion(r),null!=i&&(this.encoding=this.stringify.xmlEncoding(i)),null!=s&&(this.standalone=this.stringify.xmlStandalone(s))}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),n.prototype.toString=function(t){return this.options.writer.declaration(this,this.options.writer.filterOptions(t))},n}(r)}).call(this)},2203:t=>{"use strict";t.exports=require("stream")},2537:function(t,e,n){(function(){var e,r,o={}.hasOwnProperty;e=n(231),r=n(1959),t.exports=function(t){function n(t,r){if(n.__super__.constructor.call(this,t),null==r)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=e.Text,this.value=this.stringify.text(r)}return function(t,e){for(var n in e)o.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),Object.defineProperty(n.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(n.prototype,"wholeText",{get:function(){var t,e,n;for(n="",e=this.previousSibling;e;)n=e.data+n,e=e.previousSibling;for(n+=this.data,t=this.nextSibling;t;)n+=t.data,t=t.nextSibling;return n}}),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(t){return this.options.writer.text(this,this.options.writer.filterOptions(t))},n.prototype.splitText=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.replaceWholeText=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n}(r)}).call(this)},2652:function(t,e,n){(function(){var e,r,o,i={}.hasOwnProperty;o=n(1859).assign,e=n(231),n(2152),n(1998),n(2869),n(3673),n(8252),n(9602),n(2537),n(669),n(6400),n(5109),n(9790),n(4059),n(690),r=n(3267),t.exports=function(){function t(t){var e,n,r;for(e in t||(t={}),this.options=t,n=t.writer||{})i.call(n,e)&&(r=n[e],this["_"+e]=this[e],this[e]=r)}return t.prototype.filterOptions=function(t){var e,n,i,s,a,u,c,p;return t||(t={}),t=o({},this.options,t),(e={writer:this}).pretty=t.pretty||!1,e.allowEmpty=t.allowEmpty||!1,e.indent=null!=(n=t.indent)?n:" ",e.newline=null!=(i=t.newline)?i:"\n",e.offset=null!=(s=t.offset)?s:0,e.dontPrettyTextNodes=null!=(a=null!=(u=t.dontPrettyTextNodes)?u:t.dontprettytextnodes)?a:0,e.spaceBeforeSlash=null!=(c=null!=(p=t.spaceBeforeSlash)?p:t.spacebeforeslash)?c:"",!0===e.spaceBeforeSlash&&(e.spaceBeforeSlash=" "),e.suppressPrettyCount=0,e.user={},e.state=r.None,e},t.prototype.indent=function(t,e,n){var r;return!e.pretty||e.suppressPrettyCount?"":e.pretty&&(r=(n||0)+e.offset+1)>0?new Array(r).join(e.indent):""},t.prototype.endline=function(t,e,n){return!e.pretty||e.suppressPrettyCount?"":e.newline},t.prototype.attribute=function(t,e,n){var r;return this.openAttribute(t,e,n),r=" "+t.name+'="'+t.value+'"',this.closeAttribute(t,e,n),r},t.prototype.cdata=function(t,e,n){var o;return this.openNode(t,e,n),e.state=r.OpenTag,o=this.indent(t,e,n)+"<![CDATA[",e.state=r.InsideTag,o+=t.value,e.state=r.CloseTag,o+="]]>"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),o},t.prototype.comment=function(t,e,n){var o;return this.openNode(t,e,n),e.state=r.OpenTag,o=this.indent(t,e,n)+"\x3c!-- ",e.state=r.InsideTag,o+=t.value,e.state=r.CloseTag,o+=" --\x3e"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),o},t.prototype.declaration=function(t,e,n){var o;return this.openNode(t,e,n),e.state=r.OpenTag,o=this.indent(t,e,n)+"<?xml",e.state=r.InsideTag,o+=' version="'+t.version+'"',null!=t.encoding&&(o+=' encoding="'+t.encoding+'"'),null!=t.standalone&&(o+=' standalone="'+t.standalone+'"'),e.state=r.CloseTag,o+=e.spaceBeforeSlash+"?>",o+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),o},t.prototype.docType=function(t,e,n){var o,i,s,a,u;if(n||(n=0),this.openNode(t,e,n),e.state=r.OpenTag,a=this.indent(t,e,n),a+="<!DOCTYPE "+t.root().name,t.pubID&&t.sysID?a+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(a+=' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(a+=" [",a+=this.endline(t,e,n),e.state=r.InsideTag,i=0,s=(u=t.children).length;i<s;i++)o=u[i],a+=this.writeChildNode(o,e,n+1);e.state=r.CloseTag,a+="]"}return e.state=r.CloseTag,a+=e.spaceBeforeSlash+">",a+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),a},t.prototype.element=function(t,n,o){var s,a,u,c,p,l,f,h,y,d,m,b,v,g;for(y in o||(o=0),d=!1,m="",this.openNode(t,n,o),n.state=r.OpenTag,m+=this.indent(t,n,o)+"<"+t.name,b=t.attribs)i.call(b,y)&&(s=b[y],m+=this.attribute(s,n,o));if(c=0===(u=t.children.length)?null:t.children[0],0===u||t.children.every(function(t){return(t.type===e.Text||t.type===e.Raw)&&""===t.value}))n.allowEmpty?(m+=">",n.state=r.CloseTag,m+="</"+t.name+">"+this.endline(t,n,o)):(n.state=r.CloseTag,m+=n.spaceBeforeSlash+"/>"+this.endline(t,n,o));else if(!n.pretty||1!==u||c.type!==e.Text&&c.type!==e.Raw||null==c.value){if(n.dontPrettyTextNodes)for(p=0,f=(v=t.children).length;p<f;p++)if(((a=v[p]).type===e.Text||a.type===e.Raw)&&null!=a.value){n.suppressPrettyCount++,d=!0;break}for(m+=">"+this.endline(t,n,o),n.state=r.InsideTag,l=0,h=(g=t.children).length;l<h;l++)a=g[l],m+=this.writeChildNode(a,n,o+1);n.state=r.CloseTag,m+=this.indent(t,n,o)+"</"+t.name+">",d&&n.suppressPrettyCount--,m+=this.endline(t,n,o),n.state=r.None}else m+=">",n.state=r.InsideTag,n.suppressPrettyCount++,d=!0,m+=this.writeChildNode(c,n,o+1),n.suppressPrettyCount--,d=!1,n.state=r.CloseTag,m+="</"+t.name+">"+this.endline(t,n,o);return this.closeNode(t,n,o),m},t.prototype.writeChildNode=function(t,n,r){switch(t.type){case e.CData:return this.cdata(t,n,r);case e.Comment:return this.comment(t,n,r);case e.Element:return this.element(t,n,r);case e.Raw:return this.raw(t,n,r);case e.Text:return this.text(t,n,r);case e.ProcessingInstruction:return this.processingInstruction(t,n,r);case e.Dummy:return"";case e.Declaration:return this.declaration(t,n,r);case e.DocType:return this.docType(t,n,r);case e.AttributeDeclaration:return this.dtdAttList(t,n,r);case e.ElementDeclaration:return this.dtdElement(t,n,r);case e.EntityDeclaration:return this.dtdEntity(t,n,r);case e.NotationDeclaration:return this.dtdNotation(t,n,r);default:throw new Error("Unknown XML node type: "+t.constructor.name)}},t.prototype.processingInstruction=function(t,e,n){var o;return this.openNode(t,e,n),e.state=r.OpenTag,o=this.indent(t,e,n)+"<?",e.state=r.InsideTag,o+=t.target,t.value&&(o+=" "+t.value),e.state=r.CloseTag,o+=e.spaceBeforeSlash+"?>",o+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),o},t.prototype.raw=function(t,e,n){var o;return this.openNode(t,e,n),e.state=r.OpenTag,o=this.indent(t,e,n),e.state=r.InsideTag,o+=t.value,e.state=r.CloseTag,o+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),o},t.prototype.text=function(t,e,n){var o;return this.openNode(t,e,n),e.state=r.OpenTag,o=this.indent(t,e,n),e.state=r.InsideTag,o+=t.value,e.state=r.CloseTag,o+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),o},t.prototype.dtdAttList=function(t,e,n){var o;return this.openNode(t,e,n),e.state=r.OpenTag,o=this.indent(t,e,n)+"<!ATTLIST",e.state=r.InsideTag,o+=" "+t.elementName+" "+t.attributeName+" "+t.attributeType,"#DEFAULT"!==t.defaultValueType&&(o+=" "+t.defaultValueType),t.defaultValue&&(o+=' "'+t.defaultValue+'"'),e.state=r.CloseTag,o+=e.spaceBeforeSlash+">"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),o},t.prototype.dtdElement=function(t,e,n){var o;return this.openNode(t,e,n),e.state=r.OpenTag,o=this.indent(t,e,n)+"<!ELEMENT",e.state=r.InsideTag,o+=" "+t.name+" "+t.value,e.state=r.CloseTag,o+=e.spaceBeforeSlash+">"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),o},t.prototype.dtdEntity=function(t,e,n){var o;return this.openNode(t,e,n),e.state=r.OpenTag,o=this.indent(t,e,n)+"<!ENTITY",e.state=r.InsideTag,t.pe&&(o+=" %"),o+=" "+t.name,t.value?o+=' "'+t.value+'"':(t.pubID&&t.sysID?o+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(o+=' SYSTEM "'+t.sysID+'"'),t.nData&&(o+=" NDATA "+t.nData)),e.state=r.CloseTag,o+=e.spaceBeforeSlash+">"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),o},t.prototype.dtdNotation=function(t,e,n){var o;return this.openNode(t,e,n),e.state=r.OpenTag,o=this.indent(t,e,n)+"<!NOTATION",e.state=r.InsideTag,o+=" "+t.name,t.pubID&&t.sysID?o+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.pubID?o+=' PUBLIC "'+t.pubID+'"':t.sysID&&(o+=' SYSTEM "'+t.sysID+'"'),e.state=r.CloseTag,o+=e.spaceBeforeSlash+">"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),o},t.prototype.openNode=function(t,e,n){},t.prototype.closeNode=function(t,e,n){},t.prototype.openAttribute=function(t,e,n){},t.prototype.closeAttribute=function(t,e,n){},t}()}).call(this)},2869:function(t,e,n){(function(){var e,r,o={}.hasOwnProperty;e=n(231),r=n(1959),t.exports=function(t){function n(t,r){if(n.__super__.constructor.call(this,t),null==r)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=e.CData,this.value=this.stringify.cdata(r)}return function(t,e){for(var n in e)o.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(t){return this.options.writer.cdata(this,this.options.writer.filterOptions(t))},n}(r)}).call(this)},3158:function(t,e,n){(function(){var e,r,o,i,s,a,u,c,p,l,f,h,y,d,m,b,v,g,w,T,O,E,_,D={}.hasOwnProperty;_=n(1859),O=_.isObject,T=_.isFunction,E=_.isPlainObject,w=_.getValue,e=n(231),h=n(3835),y=n(8252),i=n(2869),s=n(3673),m=n(9602),g=n(2537),d=n(669),l=n(2152),f=n(1998),a=n(5109),c=n(4059),u=n(9790),p=n(690),o=n(6708),v=n(5854),b=n(420),r=n(3267),t.exports=function(){function t(t,n,r){var o;this.name="?xml",this.type=e.Document,t||(t={}),o={},t.writer?E(t.writer)&&(o=t.writer,t.writer=new b):t.writer=new b,this.options=t,this.writer=t.writer,this.writerOptions=this.writer.filterOptions(o),this.stringify=new v(t),this.onDataCallback=n||function(){},this.onEndCallback=r||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return t.prototype.createChildNode=function(t){var n,r,o,i,s,a,u,c;switch(t.type){case e.CData:this.cdata(t.value);break;case e.Comment:this.comment(t.value);break;case e.Element:for(r in o={},u=t.attribs)D.call(u,r)&&(n=u[r],o[r]=n.value);this.node(t.name,o);break;case e.Dummy:this.dummy();break;case e.Raw:this.raw(t.value);break;case e.Text:this.text(t.value);break;case e.ProcessingInstruction:this.instruction(t.target,t.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+t.constructor.name)}for(s=0,a=(c=t.children).length;s<a;s++)i=c[s],this.createChildNode(i),i.type===e.Element&&this.up();return this},t.prototype.dummy=function(){return this},t.prototype.node=function(t,e,n){var r;if(null==t)throw new Error("Missing node name.");if(this.root&&-1===this.currentLevel)throw new Error("Document can only have one root node. "+this.debugInfo(t));return this.openCurrent(),t=w(t),null==e&&(e={}),e=w(e),O(e)||(n=(r=[e,n])[0],e=r[1]),this.currentNode=new y(this,t,e),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,null!=n&&this.text(n),this},t.prototype.element=function(t,n,r){var o,i,s,a,u,c;if(this.currentNode&&this.currentNode.type===e.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(t)||O(t)||T(t))for(a=this.options.noValidation,this.options.noValidation=!0,(c=new h(this.options).element("TEMP_ROOT")).element(t),this.options.noValidation=a,i=0,s=(u=c.children).length;i<s;i++)o=u[i],this.createChildNode(o),o.type===e.Element&&this.up();else this.node(t,n,r);return this},t.prototype.attribute=function(t,e){var n,r;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(t));if(null!=t&&(t=w(t)),O(t))for(n in t)D.call(t,n)&&(r=t[n],this.attribute(n,r));else T(e)&&(e=e.apply()),this.options.keepNullAttributes&&null==e?this.currentNode.attribs[t]=new o(this,t,""):null!=e&&(this.currentNode.attribs[t]=new o(this,t,e));return this},t.prototype.text=function(t){var e;return this.openCurrent(),e=new g(this,t),this.onData(this.writer.text(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.cdata=function(t){var e;return this.openCurrent(),e=new i(this,t),this.onData(this.writer.cdata(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.comment=function(t){var e;return this.openCurrent(),e=new s(this,t),this.onData(this.writer.comment(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.raw=function(t){var e;return this.openCurrent(),e=new m(this,t),this.onData(this.writer.raw(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.instruction=function(t,e){var n,r,o,i,s;if(this.openCurrent(),null!=t&&(t=w(t)),null!=e&&(e=w(e)),Array.isArray(t))for(n=0,i=t.length;n<i;n++)r=t[n],this.instruction(r);else if(O(t))for(r in t)D.call(t,r)&&(o=t[r],this.instruction(r,o));else T(e)&&(e=e.apply()),s=new d(this,t,e),this.onData(this.writer.processingInstruction(s,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},t.prototype.declaration=function(t,e,n){var r;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return r=new l(this,t,e,n),this.onData(this.writer.declaration(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.doctype=function(t,e,n){if(this.openCurrent(),null==t)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new f(this,e,n),this.currentNode.rootNodeName=t,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},t.prototype.dtdElement=function(t,e){var n;return this.openCurrent(),n=new u(this,t,e),this.onData(this.writer.dtdElement(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.attList=function(t,e,n,r,o){var i;return this.openCurrent(),i=new a(this,t,e,n,r,o),this.onData(this.writer.dtdAttList(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.entity=function(t,e){var n;return this.openCurrent(),n=new c(this,!1,t,e),this.onData(this.writer.dtdEntity(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.pEntity=function(t,e){var n;return this.openCurrent(),n=new c(this,!0,t,e),this.onData(this.writer.dtdEntity(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.notation=function(t,e){var n;return this.openCurrent(),n=new p(this,t,e),this.onData(this.writer.dtdNotation(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},t.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},t.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},t.prototype.openNode=function(t){var n,o,i,s;if(!t.isOpen){if(this.root||0!==this.currentLevel||t.type!==e.Element||(this.root=t),o="",t.type===e.Element){for(i in this.writerOptions.state=r.OpenTag,o=this.writer.indent(t,this.writerOptions,this.currentLevel)+"<"+t.name,s=t.attribs)D.call(s,i)&&(n=s[i],o+=this.writer.attribute(n,this.writerOptions,this.currentLevel));o+=(t.children?">":"/>")+this.writer.endline(t,this.writerOptions,this.currentLevel),this.writerOptions.state=r.InsideTag}else this.writerOptions.state=r.OpenTag,o=this.writer.indent(t,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+t.rootNodeName,t.pubID&&t.sysID?o+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(o+=' SYSTEM "'+t.sysID+'"'),t.children?(o+=" [",this.writerOptions.state=r.InsideTag):(this.writerOptions.state=r.CloseTag,o+=">"),o+=this.writer.endline(t,this.writerOptions,this.currentLevel);return this.onData(o,this.currentLevel),t.isOpen=!0}},t.prototype.closeNode=function(t){var n;if(!t.isClosed)return n="",this.writerOptions.state=r.CloseTag,n=t.type===e.Element?this.writer.indent(t,this.writerOptions,this.currentLevel)+"</"+t.name+">"+this.writer.endline(t,this.writerOptions,this.currentLevel):this.writer.indent(t,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(t,this.writerOptions,this.currentLevel),this.writerOptions.state=r.None,this.onData(n,this.currentLevel),t.isClosed=!0},t.prototype.onData=function(t,e){return this.documentStarted=!0,this.onDataCallback(t,e+1)},t.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},t.prototype.debugInfo=function(t){return null==t?"":"node: <"+t+">"},t.prototype.ele=function(){return this.element.apply(this,arguments)},t.prototype.nod=function(t,e,n){return this.node(t,e,n)},t.prototype.txt=function(t){return this.text(t)},t.prototype.dat=function(t){return this.cdata(t)},t.prototype.com=function(t){return this.comment(t)},t.prototype.ins=function(t,e){return this.instruction(t,e)},t.prototype.dec=function(t,e,n){return this.declaration(t,e,n)},t.prototype.dtd=function(t,e,n){return this.doctype(t,e,n)},t.prototype.e=function(t,e,n){return this.element(t,e,n)},t.prototype.n=function(t,e,n){return this.node(t,e,n)},t.prototype.t=function(t){return this.text(t)},t.prototype.d=function(t){return this.cdata(t)},t.prototype.c=function(t){return this.comment(t)},t.prototype.r=function(t){return this.raw(t)},t.prototype.i=function(t,e){return this.instruction(t,e)},t.prototype.att=function(){return this.currentNode&&this.currentNode.type===e.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},t.prototype.a=function(){return this.currentNode&&this.currentNode.type===e.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},t.prototype.ent=function(t,e){return this.entity(t,e)},t.prototype.pent=function(t,e){return this.pEntity(t,e)},t.prototype.not=function(t,e){return this.notation(t,e)},t}()}).call(this)},3177:function(t,e){(function(){"use strict";e.stripBOM=function(t){return"\ufeff"===t[0]?t.substring(1):t}}).call(this)},3193:t=>{"use strict";t.exports=require("string_decoder")},3267:function(t){(function(){t.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},3368:(t,e,n)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",s=n.toStringTag||"@@toStringTag";function a(n,r,o,s){var a=r&&r.prototype instanceof c?r:c,p=Object.create(a.prototype);return i(p,"_invoke",function(n,r,o){var i,s,a,c=0,p=o||[],l=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,s=0,a=t,f.n=n,u}};function h(n,r){for(s=n,a=r,e=0;!l&&c&&!o&&e<p.length;e++){var o,i=p[e],h=f.p,y=i[2];n>3?(o=y===r)&&(a=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=n<2&&h<i[1])?(s=0,f.v=r,f.n=i[1]):h<y&&(o=n<3||i[0]>r||r>y)&&(i[4]=n,i[5]=r,f.n=y,s=0))}if(o||n>1)return u;throw l=!0,r}return function(o,p,y){if(c>1)throw TypeError("Generator is already running");for(l&&1===p&&h(p,y),s=p,a=y;(e=s<2?t:a)||!l;){i||(s?s<3?(s>1&&(f.n=-1),h(s,a)):f.n=a:f.v=a);try{if(c=2,i){if(s||(o="next"),e=i[o]){if(!(e=e.call(i,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,s<2&&(s=0)}else 1===s&&(e=i.return)&&e.call(i),s<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=t}else if((e=(l=f.n<0)?a:n.call(r,f))!==u)break}catch(e){i=t,s=1,a=e}finally{c=1}}return{value:e,done:l}}}(n,o,s),!0),p}var u={};function c(){}function p(){}function l(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(i(e={},r,function(){return this}),e),h=l.prototype=c.prototype=Object.create(f);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,i(t,s,"GeneratorFunction")),t.prototype=Object.create(h),t}return p.prototype=l,i(h,"constructor",l),i(l,"constructor",p),p.displayName="GeneratorFunction",i(l,s,"GeneratorFunction"),i(h),i(h,s,"Generator"),i(h,r,function(){return this}),i(h,"toString",function(){return"[object Generator]"}),(o=function(){return{w:a,m:y}})()}function i(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}i=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var s=function(e,n){i(t,e,function(t){return this._invoke(e,n,t)})};s("next",0),s("throw",1),s("return",2)}},i(t,e,n,r)}function s(t,e,n,r,o,i,s){try{var a=t[i](s),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(r,o)}function a(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){s(i,r,o,a,u,"next",t)}function u(t){s(i,r,o,a,u,"throw",t)}a(void 0)})}}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,c(r.key),r)}}function c(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}var p=n(9896),l=n(416);t.exports=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"convert",value:(i=a(o().m(function t(e){return o().w(function(t){for(;;)if(0===t.n)return t.a(2,this.pdfTextConvert(e))},t,this)})),function(t){return i.apply(this,arguments)})},{key:"pdfTextConvert",value:(r=a(o().m(function t(e){var n,r;return o().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,p.promises.readFile(e);case 1:return n=t.v,t.n=2,l(n);case 2:return r=t.v,t.a(2,r.text.trim());case 3:throw t.p=3,t.v;case 4:return t.a(2)}},t,null,[[0,3]])})),function(t){return r.apply(this,arguments)})}],e&&u(t.prototype,e),n&&u(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r,i}()},3557:t=>{"use strict";t.exports=require("timers")},3647:(t,e,n)=>{function r(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",s=n.toStringTag||"@@toStringTag";function a(n,r,i,s){var a=r&&r.prototype instanceof c?r:c,p=Object.create(a.prototype);return o(p,"_invoke",function(n,r,o){var i,s,a,c=0,p=o||[],l=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,s=0,a=t,f.n=n,u}};function h(n,r){for(s=n,a=r,e=0;!l&&c&&!o&&e<p.length;e++){var o,i=p[e],h=f.p,y=i[2];n>3?(o=y===r)&&(a=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=n<2&&h<i[1])?(s=0,f.v=r,f.n=i[1]):h<y&&(o=n<3||i[0]>r||r>y)&&(i[4]=n,i[5]=r,f.n=y,s=0))}if(o||n>1)return u;throw l=!0,r}return function(o,p,y){if(c>1)throw TypeError("Generator is already running");for(l&&1===p&&h(p,y),s=p,a=y;(e=s<2?t:a)||!l;){i||(s?s<3?(s>1&&(f.n=-1),h(s,a)):f.n=a:f.v=a);try{if(c=2,i){if(s||(o="next"),e=i[o]){if(!(e=e.call(i,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,s<2&&(s=0)}else 1===s&&(e=i.return)&&e.call(i),s<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=t}else if((e=(l=f.n<0)?a:n.call(r,f))!==u)break}catch(e){i=t,s=1,a=e}finally{c=1}}return{value:e,done:l}}}(n,i,s),!0),p}var u={};function c(){}function p(){}function l(){}e=Object.getPrototypeOf;var f=[][i]?e(e([][i]())):(o(e={},i,function(){return this}),e),h=l.prototype=c.prototype=Object.create(f);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,o(t,s,"GeneratorFunction")),t.prototype=Object.create(h),t}return p.prototype=l,o(h,"constructor",l),o(l,"constructor",p),p.displayName="GeneratorFunction",o(l,s,"GeneratorFunction"),o(h),o(h,s,"Generator"),o(h,i,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(r=function(){return{w:a,m:y}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){if(e)i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var s=function(e,n){o(t,e,function(t){return this._invoke(e,n,t)})};s("next",0),s("throw",1),s("return",2)}},o(t,e,n,r)}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function s(t,e,n,r,o,i,s){try{var a=t[i](s),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(r,o)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,u(r.key),r)}}function u(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==i(e)?e:e+""}t.exports=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"convert",value:(u=r().m(function t(e){var o,s,a,u,c,p,l,f,h,y;return r().w(function(t){for(;;)switch(t.n){case 0:return f=n(4650),t.n=1,n(9896).promises.readFile(e);case 1:if(h=t.v,o=new f(h),s=new(n(8805).Parser),t.p=2,a=o.getEntry("content.xml")){t.n=3;break}return t.a(2,"# Presentation\n\nNo content found.\n\n---\n\n");case 3:return t.n=4,s.parseStringPromise(o.readAsText(a.entryName));case 4:return u=t.v,c=[],p=function(t){var e=[],n=function(t){if(t)if(Array.isArray(t))t.forEach(n);else if("object"===i(t)){if("string"==typeof t)return void e.push(t);t["text:p"]&&(Array.isArray(t["text:p"])?t["text:p"].forEach(function(t){"string"==typeof t?e.push(t):t._?e.push(t._):t["text:span"]&&(Array.isArray(t["text:span"])?t["text:span"].forEach(function(t){"string"==typeof t?e.push(t):t._&&e.push(t._)}):t["text:span"]._&&e.push(t["text:span"]._))}):"string"==typeof t["text:p"]?e.push(t["text:p"]):t["text:p"]._&&e.push(t["text:p"]._)),t["text:span"]&&(Array.isArray(t["text:span"])?t["text:span"].forEach(function(t){"string"==typeof t?e.push(t):t._&&e.push(t._)}):"string"==typeof t["text:span"]?e.push(t["text:span"]):t["text:span"]._&&e.push(t["text:span"]._)),t._&&"string"==typeof t._&&e.push(t._),Object.values(t).forEach(n)}else"string"==typeof t&&e.push(t)};return n(t),e.filter(function(t){return t&&t.trim().length>0})},(l=u["office:document-content"]["office:body"][0]["office:presentation"])&&l[0]&&l[0]["draw:page"]&&(Array.isArray(l[0]["draw:page"])?l[0]["draw:page"]:[l[0]["draw:page"]]).forEach(function(t,e){var n=p(t),r=n.length>0?n.join("\n"):"No text content found.";c.push("# Slide ".concat(e+1,"\n\n").concat(r,"\n\n---\n\n"))}),t.a(2,c.length>0?c.join("").trim():"# Presentation\n\nNo slides found.\n\n---\n\n");case 5:return t.p=5,y=t.v,t.a(2,"# Presentation\n\nError reading presentation: ".concat(y.message,"\n\n---\n\n"))}},t,null,[[2,5]])}),c=function(){var t=this,e=arguments;return new Promise(function(n,r){var o=u.apply(t,e);function i(t){s(o,n,r,i,a,"next",t)}function a(t){s(o,n,r,i,a,"throw",t)}i(void 0)})},function(t){return c.apply(this,arguments)})}],e&&a(t.prototype,e),o&&a(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,o,u,c}()},3673:function(t,e,n){(function(){var e,r,o={}.hasOwnProperty;e=n(231),r=n(1959),t.exports=function(t){function n(t,r){if(n.__super__.constructor.call(this,t),null==r)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=e.Comment,this.value=this.stringify.comment(r)}return function(t,e){for(var n in e)o.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(t){return this.options.writer.comment(this,this.options.writer.filterOptions(t))},n}(r)}).call(this)},3754:function(t){(function(){t.exports=function(){function t(){}return t.prototype.hasFeature=function(t,e){return!0},t.prototype.createDocumentType=function(t,e,n){throw new Error("This DOM method is not implemented.")},t.prototype.createDocument=function(t,e,n){throw new Error("This DOM method is not implemented.")},t.prototype.createHTMLDocument=function(t){throw new Error("This DOM method is not implemented.")},t.prototype.getFeature=function(t,e){throw new Error("This DOM method is not implemented.")},t}()}).call(this)},3835:function(t,e,n){(function(){var e,r,o,i,s,a,u,c={}.hasOwnProperty;u=n(1859).isPlainObject,o=n(3754),r=n(8312),i=n(3910),e=n(231),a=n(5854),s=n(420),t.exports=function(t){function n(t){n.__super__.constructor.call(this,null),this.name="#document",this.type=e.Document,this.documentURI=null,this.domConfig=new r,t||(t={}),t.writer||(t.writer=new s),this.options=t,this.stringify=new a(t)}return function(t,e){for(var n in e)c.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),Object.defineProperty(n.prototype,"implementation",{value:new o}),Object.defineProperty(n.prototype,"doctype",{get:function(){var t,n,r,o;for(n=0,r=(o=this.children).length;n<r;n++)if((t=o[n]).type===e.DocType)return t;return null}}),Object.defineProperty(n.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(n.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(n.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(n.prototype,"xmlEncoding",{get:fu