@transai/connector-runner-file 0.4.1 → 0.4.2
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.
- package/CHANGELOG.md +6 -0
- package/index.cjs +37 -37
- package/index.cjs.map +4 -4
- package/index.js +37 -37
- package/index.js.map +4 -4
- package/libs/connector-runner-file/src/lib/actions/action-delete-file.d.ts +12 -0
- package/libs/connector-runner-file/src/lib/actions/action-download-file.d.ts +15 -0
- package/libs/connector-runner-file/src/lib/actions/action-read-file.d.ts +17 -0
- package/libs/connector-runner-file/src/lib/actions/action-upload-file.d.ts +14 -0
- package/libs/connector-runner-file/src/lib/actions/action-write-file.d.ts +14 -0
- package/libs/connector-runner-file/src/lib/{actions-handler.d.ts → actions/actions-handler.d.ts} +3 -2
- package/libs/connector-runner-file/src/lib/types.d.ts +3 -0
- package/libs/connector-runtime-sdk/src/index.d.ts +1 -0
- package/libs/connector-runtime-sdk/src/lib/support/index.d.ts +1 -0
- package/libs/connector-runtime-sdk/src/lib/support/null-logger.d.ts +8 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
var
|
|
2
|
-
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(ji)});var De=T((sa,We)=>{"use strict";(function(){var t,e,r,n,i,o,s,a=[].slice,u={}.hasOwnProperty;t=function(){var d,w,E,y,m,h;if(h=arguments[0],m=2<=arguments.length?a.call(arguments,1):[],i(Object.assign))Object.assign.apply(null,arguments);else for(d=0,E=m.length;d<E;d++)if(y=m[d],y!=null)for(w in y)u.call(y,w)&&(h[w]=y[w]);return h},i=function(d){return!!d&&Object.prototype.toString.call(d)==="[object Function]"},o=function(d){var w;return!!d&&((w=typeof d)=="function"||w==="object")},r=function(d){return i(Array.isArray)?Array.isArray(d):Object.prototype.toString.call(d)==="[object Array]"},n=function(d){var w;if(r(d))return!d.length;for(w in d)if(u.call(d,w))return!1;return!0},s=function(d){var w,E;return o(d)&&(E=Object.getPrototypeOf(d))&&(w=E.constructor)&&typeof w=="function"&&w instanceof w&&Function.prototype.toString.call(w)===Function.prototype.toString.call(Object)},e=function(d){return i(d.valueOf)?d.valueOf():d},We.exports.assign=t,We.exports.isFunction=i,We.exports.isObject=o,We.exports.isArray=r,We.exports.isEmpty=n,We.exports.isPlainObject=s,We.exports.getValue=e}).call(sa)});var Fi=T((aa,ua)=>{"use strict";(function(){var t;ua.exports=t=(function(){function e(){}return e.prototype.hasFeature=function(r,n){return!0},e.prototype.createDocumentType=function(r,n,i){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(r,n,i){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(r){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(r,n){throw new Error("This DOM method is not implemented.")},e})()}).call(aa)});var ca=T((la,fa)=>{"use strict";(function(){var t;fa.exports=t=(function(){function e(){}return e.prototype.handleError=function(r){throw new Error(r)},e})()}).call(la)});var pa=T((ha,da)=>{"use strict";(function(){var t;da.exports=t=(function(){function e(r){this.arr=r||[]}return Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e.prototype.item=function(r){return this.arr[r]||null},e.prototype.contains=function(r){return this.arr.indexOf(r)!==-1},e})()}).call(ha)});var ya=T((ga,ma)=>{"use strict";(function(){var t,e,r;e=ca(),r=pa(),ma.exports=t=(function(){function n(){var i;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=i=Object.create(this.defaultParams)}return Object.defineProperty(n.prototype,"parameterNames",{get:function(){return new r(Object.keys(this.defaultParams))}}),n.prototype.getParameter=function(i){return this.params.hasOwnProperty(i)?this.params[i]:null},n.prototype.canSetParameter=function(i,o){return!0},n.prototype.setParameter=function(i,o){return o!=null?this.params[i]=o:delete this.params[i]},n})()}).call(ga)});var ne=T((ba,wa)=>{"use strict";(function(){wa.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(ba)});var ki=T((_a,va)=>{"use strict";(function(){var t,e,r;t=ne(),r=we(),va.exports=e=(function(){function n(i,o,s){if(this.parent=i,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),o==null)throw new Error("Missing attribute name. "+this.debugInfo(o));this.name=this.stringify.name(o),this.value=this.stringify.attValue(s),this.type=t.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(n.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(n.prototype,"textContent",{get:function(){return this.value},set:function(i){return this.value=i||""}}),Object.defineProperty(n.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(n.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(n.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(n.prototype,"specified",{get:function(){return!0}}),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(i){return this.options.writer.attribute(this,this.options.writer.filterOptions(i))},n.prototype.debugInfo=function(i){return i=i||this.name,i==null?"parent: <"+this.parent.name+">":"attribute: {"+i+"}, parent: <"+this.parent.name+">"},n.prototype.isEqualNode=function(i){return!(i.namespaceURI!==this.namespaceURI||i.prefix!==this.prefix||i.localName!==this.localName||i.value!==this.value)},n})()}).call(_a)});var Jr=T((Ea,Ta)=>{"use strict";(function(){var t;Ta.exports=t=(function(){function e(r){this.nodes=r}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),e.prototype.clone=function(){return this.nodes=null},e.prototype.getNamedItem=function(r){return this.nodes[r]},e.prototype.setNamedItem=function(r){var n;return n=this.nodes[r.nodeName],this.nodes[r.nodeName]=r,n||null},e.prototype.removeNamedItem=function(r){var n;return n=this.nodes[r],delete this.nodes[r],n||null},e.prototype.item=function(r){return this.nodes[Object.keys(this.nodes)[r]]||null},e.prototype.getNamedItemNS=function(r,n){throw new Error("This DOM method is not implemented.")},e.prototype.setNamedItemNS=function(r){throw new Error("This DOM method is not implemented.")},e.prototype.removeNamedItemNS=function(r,n){throw new Error("This DOM method is not implemented.")},e})()}).call(Ea)});var Qr=T((Sa,Oa)=>{"use strict";(function(){var t,e,r,n,i,o,s,a,u,d=function(E,y){for(var m in y)w.call(y,m)&&(E[m]=y[m]);function h(){this.constructor=E}return h.prototype=y.prototype,E.prototype=new h,E.__super__=y.prototype,E},w={}.hasOwnProperty;u=De(),a=u.isObject,s=u.isFunction,o=u.getValue,i=we(),t=ne(),e=ki(),n=Jr(),Oa.exports=r=(function(E){d(y,E);function y(m,h,v){var C,P,D,g;if(y.__super__.constructor.call(this,m),h==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(h),this.type=t.Element,this.attribs={},this.schemaTypeInfo=null,v!=null&&this.attribute(v),m.type===t.Document&&(this.isRoot=!0,this.documentObject=m,m.rootObject=this,m.children)){for(g=m.children,P=0,D=g.length;P<D;P++)if(C=g[P],C.type===t.DocType){C.name=this.name;break}}}return Object.defineProperty(y.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(y.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(y.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(y.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(y.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(y.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(y.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(y.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new n(this.attribs)),this.attributeMap}}),y.prototype.clone=function(){var m,h,v,C;v=Object.create(this),v.isRoot&&(v.documentObject=null),v.attribs={},C=this.attribs;for(h in C)w.call(C,h)&&(m=C[h],v.attribs[h]=m.clone());return v.children=[],this.children.forEach(function(P){var D;return D=P.clone(),D.parent=v,v.children.push(D)}),v},y.prototype.attribute=function(m,h){var v,C;if(m!=null&&(m=o(m)),a(m))for(v in m)w.call(m,v)&&(C=m[v],this.attribute(v,C));else s(h)&&(h=h.apply()),this.options.keepNullAttributes&&h==null?this.attribs[m]=new e(this,m,""):h!=null&&(this.attribs[m]=new e(this,m,h));return this},y.prototype.removeAttribute=function(m){var h,v,C;if(m==null)throw new Error("Missing attribute name. "+this.debugInfo());if(m=o(m),Array.isArray(m))for(v=0,C=m.length;v<C;v++)h=m[v],delete this.attribs[h];else delete this.attribs[m];return this},y.prototype.toString=function(m){return this.options.writer.element(this,this.options.writer.filterOptions(m))},y.prototype.att=function(m,h){return this.attribute(m,h)},y.prototype.a=function(m,h){return this.attribute(m,h)},y.prototype.getAttribute=function(m){return this.attribs.hasOwnProperty(m)?this.attribs[m].value:null},y.prototype.setAttribute=function(m,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getAttributeNode=function(m){return this.attribs.hasOwnProperty(m)?this.attribs[m]:null},y.prototype.setAttributeNode=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.removeAttributeNode=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagName=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getAttributeNS=function(m,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setAttributeNS=function(m,h,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.removeAttributeNS=function(m,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getAttributeNodeNS=function(m,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setAttributeNodeNS=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagNameNS=function(m,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.hasAttribute=function(m){return this.attribs.hasOwnProperty(m)},y.prototype.hasAttributeNS=function(m,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setIdAttribute=function(m,h){return this.attribs.hasOwnProperty(m)?this.attribs[m].isId:h},y.prototype.setIdAttributeNS=function(m,h,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setIdAttributeNode=function(m,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagName=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagNameNS=function(m,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByClassName=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.isEqualNode=function(m){var h,v,C;if(!y.__super__.isEqualNode.apply(this,arguments).isEqualNode(m)||m.namespaceURI!==this.namespaceURI||m.prefix!==this.prefix||m.localName!==this.localName||m.attribs.length!==this.attribs.length)return!1;for(h=v=0,C=this.attribs.length-1;0<=C?v<=C:v>=C;h=0<=C?++v:--v)if(!this.attribs[h].isEqualNode(m.attribs[h]))return!1;return!0},y})(i)}).call(Sa)});var Zt=T((Da,xa)=>{"use strict";(function(){var t,e,r=function(i,o){for(var s in o)n.call(o,s)&&(i[s]=o[s]);function a(){this.constructor=i}return a.prototype=o.prototype,i.prototype=new a,i.__super__=o.prototype,i},n={}.hasOwnProperty;e=we(),xa.exports=t=(function(i){r(o,i);function o(s){o.__super__.constructor.call(this,s),this.value=""}return Object.defineProperty(o.prototype,"data",{get:function(){return this.value},set:function(s){return this.value=s||""}}),Object.defineProperty(o.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(o.prototype,"textContent",{get:function(){return this.value},set:function(s){return this.value=s||""}}),o.prototype.clone=function(){return Object.create(this)},o.prototype.substringData=function(s,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.appendData=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.insertData=function(s,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.deleteData=function(s,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.replaceData=function(s,a,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.isEqualNode=function(s){return!(!o.__super__.isEqualNode.apply(this,arguments).isEqualNode(s)||s.data!==this.data)},o})(e)}).call(Da)});var Zr=T((Na,Ma)=>{"use strict";(function(){var t,e,r,n=function(o,s){for(var a in s)i.call(s,a)&&(o[a]=s[a]);function u(){this.constructor=o}return u.prototype=s.prototype,o.prototype=new u,o.__super__=s.prototype,o},i={}.hasOwnProperty;t=ne(),r=Zt(),Ma.exports=e=(function(o){n(s,o);function s(a,u){if(s.__super__.constructor.call(this,a),u==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=t.CData,this.value=this.stringify.cdata(u)}return s.prototype.clone=function(){return Object.create(this)},s.prototype.toString=function(a){return this.options.writer.cdata(this,this.options.writer.filterOptions(a))},s})(r)}).call(Na)});var en=T((Ra,Pa)=>{"use strict";(function(){var t,e,r,n=function(o,s){for(var a in s)i.call(s,a)&&(o[a]=s[a]);function u(){this.constructor=o}return u.prototype=s.prototype,o.prototype=new u,o.__super__=s.prototype,o},i={}.hasOwnProperty;t=ne(),e=Zt(),Pa.exports=r=(function(o){n(s,o);function s(a,u){if(s.__super__.constructor.call(this,a),u==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=t.Comment,this.value=this.stringify.comment(u)}return s.prototype.clone=function(){return Object.create(this)},s.prototype.toString=function(a){return this.options.writer.comment(this,this.options.writer.filterOptions(a))},s})(e)}).call(Ra)});var tn=T((Ca,La)=>{"use strict";(function(){var t,e,r,n,i=function(s,a){for(var u in a)o.call(a,u)&&(s[u]=a[u]);function d(){this.constructor=s}return d.prototype=a.prototype,s.prototype=new d,s.__super__=a.prototype,s},o={}.hasOwnProperty;n=De().isObject,r=we(),t=ne(),La.exports=e=(function(s){i(a,s);function a(u,d,w,E){var y;a.__super__.constructor.call(this,u),n(d)&&(y=d,d=y.version,w=y.encoding,E=y.standalone),d||(d="1.0"),this.type=t.Declaration,this.version=this.stringify.xmlVersion(d),w!=null&&(this.encoding=this.stringify.xmlEncoding(w)),E!=null&&(this.standalone=this.stringify.xmlStandalone(E))}return a.prototype.toString=function(u){return this.options.writer.declaration(this,this.options.writer.filterOptions(u))},a})(r)}).call(Ca)});var rn=T((Ia,Aa)=>{"use strict";(function(){var t,e,r,n=function(o,s){for(var a in s)i.call(s,a)&&(o[a]=s[a]);function u(){this.constructor=o}return u.prototype=s.prototype,o.prototype=new u,o.__super__=s.prototype,o},i={}.hasOwnProperty;r=we(),t=ne(),Aa.exports=e=(function(o){n(s,o);function s(a,u,d,w,E,y){if(s.__super__.constructor.call(this,a),u==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(d==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(u));if(!w)throw new Error("Missing DTD attribute type. "+this.debugInfo(u));if(!E)throw new Error("Missing DTD attribute default. "+this.debugInfo(u));if(E.indexOf("#")!==0&&(E="#"+E),!E.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(u));if(y&&!E.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(u));this.elementName=this.stringify.name(u),this.type=t.AttributeDeclaration,this.attributeName=this.stringify.name(d),this.attributeType=this.stringify.dtdAttType(w),y&&(this.defaultValue=this.stringify.dtdAttDefault(y)),this.defaultValueType=E}return s.prototype.toString=function(a){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(a))},s})(r)}).call(Ia)});var nn=T((qa,ja)=>{"use strict";(function(){var t,e,r,n,i=function(s,a){for(var u in a)o.call(a,u)&&(s[u]=a[u]);function d(){this.constructor=s}return d.prototype=a.prototype,s.prototype=new d,s.__super__=a.prototype,s},o={}.hasOwnProperty;n=De().isObject,r=we(),t=ne(),ja.exports=e=(function(s){i(a,s);function a(u,d,w,E){if(a.__super__.constructor.call(this,u),w==null)throw new Error("Missing DTD entity name. "+this.debugInfo(w));if(E==null)throw new Error("Missing DTD entity value. "+this.debugInfo(w));if(this.pe=!!d,this.name=this.stringify.name(w),this.type=t.EntityDeclaration,!n(E))this.value=this.stringify.dtdEntityValue(E),this.internal=!0;else{if(!E.pubID&&!E.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(w));if(E.pubID&&!E.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(w));if(this.internal=!1,E.pubID!=null&&(this.pubID=this.stringify.dtdPubID(E.pubID)),E.sysID!=null&&(this.sysID=this.stringify.dtdSysID(E.sysID)),E.nData!=null&&(this.nData=this.stringify.dtdNData(E.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(w))}}return Object.defineProperty(a.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(a.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(a.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(a.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(a.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(a.prototype,"xmlVersion",{get:function(){return null}}),a.prototype.toString=function(u){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(u))},a})(r)}).call(qa)});var on=T((Fa,ka)=>{"use strict";(function(){var t,e,r,n=function(o,s){for(var a in s)i.call(s,a)&&(o[a]=s[a]);function u(){this.constructor=o}return u.prototype=s.prototype,o.prototype=new u,o.__super__=s.prototype,o},i={}.hasOwnProperty;r=we(),t=ne(),ka.exports=e=(function(o){n(s,o);function s(a,u,d){if(s.__super__.constructor.call(this,a),u==null)throw new Error("Missing DTD element name. "+this.debugInfo());d||(d="(#PCDATA)"),Array.isArray(d)&&(d="("+d.join(",")+")"),this.name=this.stringify.name(u),this.type=t.ElementDeclaration,this.value=this.stringify.dtdElementValue(d)}return s.prototype.toString=function(a){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(a))},s})(r)}).call(Fa)});var sn=T((Ba,$a)=>{"use strict";(function(){var t,e,r,n=function(o,s){for(var a in s)i.call(s,a)&&(o[a]=s[a]);function u(){this.constructor=o}return u.prototype=s.prototype,o.prototype=new u,o.__super__=s.prototype,o},i={}.hasOwnProperty;r=we(),t=ne(),$a.exports=e=(function(o){n(s,o);function s(a,u,d){if(s.__super__.constructor.call(this,a),u==null)throw new Error("Missing DTD notation name. "+this.debugInfo(u));if(!d.pubID&&!d.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(u));this.name=this.stringify.name(u),this.type=t.NotationDeclaration,d.pubID!=null&&(this.pubID=this.stringify.dtdPubID(d.pubID)),d.sysID!=null&&(this.sysID=this.stringify.dtdSysID(d.sysID))}return Object.defineProperty(s.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(s.prototype,"systemId",{get:function(){return this.sysID}}),s.prototype.toString=function(a){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(a))},s})(r)}).call(Ba)});var an=T((Ua,Va)=>{"use strict";(function(){var t,e,r,n,i,o,s,a,u,d=function(E,y){for(var m in y)w.call(y,m)&&(E[m]=y[m]);function h(){this.constructor=E}return h.prototype=y.prototype,E.prototype=new h,E.__super__=y.prototype,E},w={}.hasOwnProperty;u=De().isObject,a=we(),t=ne(),e=rn(),n=nn(),r=on(),i=sn(),s=Jr(),Va.exports=o=(function(E){d(y,E);function y(m,h,v){var C,P,D,g,c,l;if(y.__super__.constructor.call(this,m),this.type=t.DocType,m.children){for(g=m.children,P=0,D=g.length;P<D;P++)if(C=g[P],C.type===t.Element){this.name=C.name;break}}this.documentObject=m,u(h)&&(c=h,h=c.pubID,v=c.sysID),v==null&&(l=[h,v],v=l[0],h=l[1]),h!=null&&(this.pubID=this.stringify.dtdPubID(h)),v!=null&&(this.sysID=this.stringify.dtdSysID(v))}return Object.defineProperty(y.prototype,"entities",{get:function(){var m,h,v,C,P;for(C={},P=this.children,h=0,v=P.length;h<v;h++)m=P[h],m.type===t.EntityDeclaration&&!m.pe&&(C[m.name]=m);return new s(C)}}),Object.defineProperty(y.prototype,"notations",{get:function(){var m,h,v,C,P;for(C={},P=this.children,h=0,v=P.length;h<v;h++)m=P[h],m.type===t.NotationDeclaration&&(C[m.name]=m);return new s(C)}}),Object.defineProperty(y.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(y.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(y.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),y.prototype.element=function(m,h){var v;return v=new r(this,m,h),this.children.push(v),this},y.prototype.attList=function(m,h,v,C,P){var D;return D=new e(this,m,h,v,C,P),this.children.push(D),this},y.prototype.entity=function(m,h){var v;return v=new n(this,!1,m,h),this.children.push(v),this},y.prototype.pEntity=function(m,h){var v;return v=new n(this,!0,m,h),this.children.push(v),this},y.prototype.notation=function(m,h){var v;return v=new i(this,m,h),this.children.push(v),this},y.prototype.toString=function(m){return this.options.writer.docType(this,this.options.writer.filterOptions(m))},y.prototype.ele=function(m,h){return this.element(m,h)},y.prototype.att=function(m,h,v,C,P){return this.attList(m,h,v,C,P)},y.prototype.ent=function(m,h){return this.entity(m,h)},y.prototype.pent=function(m,h){return this.pEntity(m,h)},y.prototype.not=function(m,h){return this.notation(m,h)},y.prototype.up=function(){return this.root()||this.documentObject},y.prototype.isEqualNode=function(m){return!(!y.__super__.isEqualNode.apply(this,arguments).isEqualNode(m)||m.name!==this.name||m.publicId!==this.publicId||m.systemId!==this.systemId)},y})(a)}).call(Ua)});var un=T((Ha,Xa)=>{"use strict";(function(){var t,e,r,n=function(o,s){for(var a in s)i.call(s,a)&&(o[a]=s[a]);function u(){this.constructor=o}return u.prototype=s.prototype,o.prototype=new u,o.__super__=s.prototype,o},i={}.hasOwnProperty;t=ne(),e=we(),Xa.exports=r=(function(o){n(s,o);function s(a,u){if(s.__super__.constructor.call(this,a),u==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=t.Raw,this.value=this.stringify.raw(u)}return s.prototype.clone=function(){return Object.create(this)},s.prototype.toString=function(a){return this.options.writer.raw(this,this.options.writer.filterOptions(a))},s})(e)}).call(Ha)});var ln=T((Wa,Ga)=>{"use strict";(function(){var t,e,r,n=function(o,s){for(var a in s)i.call(s,a)&&(o[a]=s[a]);function u(){this.constructor=o}return u.prototype=s.prototype,o.prototype=new u,o.__super__=s.prototype,o},i={}.hasOwnProperty;t=ne(),e=Zt(),Ga.exports=r=(function(o){n(s,o);function s(a,u){if(s.__super__.constructor.call(this,a),u==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=t.Text,this.value=this.stringify.text(u)}return Object.defineProperty(s.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(s.prototype,"wholeText",{get:function(){var a,u,d;for(d="",u=this.previousSibling;u;)d=u.data+d,u=u.previousSibling;for(d+=this.data,a=this.nextSibling;a;)d=d+a.data,a=a.nextSibling;return d}}),s.prototype.clone=function(){return Object.create(this)},s.prototype.toString=function(a){return this.options.writer.text(this,this.options.writer.filterOptions(a))},s.prototype.splitText=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.replaceWholeText=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},s})(e)}).call(Wa)});var fn=T((za,Ya)=>{"use strict";(function(){var t,e,r,n=function(o,s){for(var a in s)i.call(s,a)&&(o[a]=s[a]);function u(){this.constructor=o}return u.prototype=s.prototype,o.prototype=new u,o.__super__=s.prototype,o},i={}.hasOwnProperty;t=ne(),e=Zt(),Ya.exports=r=(function(o){n(s,o);function s(a,u,d){if(s.__super__.constructor.call(this,a),u==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=t.ProcessingInstruction,this.target=this.stringify.insTarget(u),this.name=this.target,d&&(this.value=this.stringify.insValue(d))}return s.prototype.clone=function(){return Object.create(this)},s.prototype.toString=function(a){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(a))},s.prototype.isEqualNode=function(a){return!(!s.__super__.isEqualNode.apply(this,arguments).isEqualNode(a)||a.target!==this.target)},s})(e)}).call(za)});var Bi=T((Ka,Ja)=>{"use strict";(function(){var t,e,r,n=function(o,s){for(var a in s)i.call(s,a)&&(o[a]=s[a]);function u(){this.constructor=o}return u.prototype=s.prototype,o.prototype=new u,o.__super__=s.prototype,o},i={}.hasOwnProperty;r=we(),t=ne(),Ja.exports=e=(function(o){n(s,o);function s(a){s.__super__.constructor.call(this,a),this.type=t.Dummy}return s.prototype.clone=function(){return Object.create(this)},s.prototype.toString=function(a){return""},s})(r)}).call(Ka)});var eu=T((Qa,Za)=>{"use strict";(function(){var t;Za.exports=t=(function(){function e(r){this.nodes=r}return Object.defineProperty(e.prototype,"length",{get:function(){return this.nodes.length||0}}),e.prototype.clone=function(){return this.nodes=null},e.prototype.item=function(r){return this.nodes[r]||null},e})()}).call(Qa)});var nu=T((tu,ru)=>{"use strict";(function(){ru.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(tu)});var we=T((iu,ou)=>{"use strict";(function(){var t,e,r,n,i,o,s,a,u,d,w,E,y,m,h,v,C,P,D,g={}.hasOwnProperty;D=De(),P=D.isObject,C=D.isFunction,v=D.isEmpty,h=D.getValue,a=null,r=null,n=null,i=null,o=null,y=null,m=null,E=null,s=null,e=null,w=null,u=null,t=null,ou.exports=d=(function(){function c(l){this.parent=l,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,a||(a=Qr(),r=Zr(),n=en(),i=tn(),o=an(),y=un(),m=ln(),E=fn(),s=Bi(),e=ne(),w=eu(),u=Jr(),t=nu())}return Object.defineProperty(c.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(c.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(c.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(c.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(c.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new w(this.children)),this.childNodeList}}),Object.defineProperty(c.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(c.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(c.prototype,"previousSibling",{get:function(){var l;return l=this.parent.children.indexOf(this),this.parent.children[l-1]||null}}),Object.defineProperty(c.prototype,"nextSibling",{get:function(){var l;return l=this.parent.children.indexOf(this),this.parent.children[l+1]||null}}),Object.defineProperty(c.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(c.prototype,"textContent",{get:function(){var l,_,R,p,M;if(this.nodeType===e.Element||this.nodeType===e.DocumentFragment){for(M="",p=this.children,_=0,R=p.length;_<R;_++)l=p[_],l.textContent&&(M+=l.textContent);return M}else return null},set:function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),c.prototype.setParent=function(l){var _,R,p,M,S;for(this.parent=l,l&&(this.options=l.options,this.stringify=l.stringify),M=this.children,S=[],R=0,p=M.length;R<p;R++)_=M[R],S.push(_.setParent(this));return S},c.prototype.element=function(l,_,R){var p,M,S,N,I,A,B,U,x,q,F;if(A=null,_===null&&R==null&&(x=[{},null],_=x[0],R=x[1]),_==null&&(_={}),_=h(_),P(_)||(q=[_,R],R=q[0],_=q[1]),l!=null&&(l=h(l)),Array.isArray(l))for(S=0,B=l.length;S<B;S++)M=l[S],A=this.element(M);else if(C(l))A=this.element(l.apply());else if(P(l)){for(I in l)if(g.call(l,I))if(F=l[I],C(F)&&(F=F.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&I.indexOf(this.stringify.convertAttKey)===0)A=this.attribute(I.substr(this.stringify.convertAttKey.length),F);else if(!this.options.separateArrayItems&&Array.isArray(F)&&v(F))A=this.dummy();else if(P(F)&&v(F))A=this.element(I);else if(!this.options.keepNullNodes&&F==null)A=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(F))for(N=0,U=F.length;N<U;N++)M=F[N],p={},p[I]=M,A=this.element(p);else P(F)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&I.indexOf(this.stringify.convertTextKey)===0?A=this.element(F):(A=this.element(I),A.element(F)):A=this.element(I,F)}else!this.options.keepNullNodes&&R===null?A=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&l.indexOf(this.stringify.convertTextKey)===0?A=this.text(R):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&l.indexOf(this.stringify.convertCDataKey)===0?A=this.cdata(R):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&l.indexOf(this.stringify.convertCommentKey)===0?A=this.comment(R):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&l.indexOf(this.stringify.convertRawKey)===0?A=this.raw(R):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&l.indexOf(this.stringify.convertPIKey)===0?A=this.instruction(l.substr(this.stringify.convertPIKey.length),R):A=this.node(l,_,R);if(A==null)throw new Error("Could not create any elements with: "+l+". "+this.debugInfo());return A},c.prototype.insertBefore=function(l,_,R){var p,M,S,N,I;if(l?.type)return S=l,N=_,S.setParent(this),N?(M=children.indexOf(N),I=children.splice(M),children.push(S),Array.prototype.push.apply(children,I)):children.push(S),S;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(l));return M=this.parent.children.indexOf(this),I=this.parent.children.splice(M),p=this.parent.element(l,_,R),Array.prototype.push.apply(this.parent.children,I),p},c.prototype.insertAfter=function(l,_,R){var p,M,S;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(l));return M=this.parent.children.indexOf(this),S=this.parent.children.splice(M+1),p=this.parent.element(l,_,R),Array.prototype.push.apply(this.parent.children,S),p},c.prototype.remove=function(){var l,_;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return l=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[l,l-l+1].concat(_=[])),this.parent},c.prototype.node=function(l,_,R){var p,M;return l!=null&&(l=h(l)),_||(_={}),_=h(_),P(_)||(M=[_,R],R=M[0],_=M[1]),p=new a(this,l,_),R!=null&&p.text(R),this.children.push(p),p},c.prototype.text=function(l){var _;return P(l)&&this.element(l),_=new m(this,l),this.children.push(_),this},c.prototype.cdata=function(l){var _;return _=new r(this,l),this.children.push(_),this},c.prototype.comment=function(l){var _;return _=new n(this,l),this.children.push(_),this},c.prototype.commentBefore=function(l){var _,R,p;return R=this.parent.children.indexOf(this),p=this.parent.children.splice(R),_=this.parent.comment(l),Array.prototype.push.apply(this.parent.children,p),this},c.prototype.commentAfter=function(l){var _,R,p;return R=this.parent.children.indexOf(this),p=this.parent.children.splice(R+1),_=this.parent.comment(l),Array.prototype.push.apply(this.parent.children,p),this},c.prototype.raw=function(l){var _;return _=new y(this,l),this.children.push(_),this},c.prototype.dummy=function(){var l;return l=new s(this),l},c.prototype.instruction=function(l,_){var R,p,M,S,N;if(l!=null&&(l=h(l)),_!=null&&(_=h(_)),Array.isArray(l))for(S=0,N=l.length;S<N;S++)R=l[S],this.instruction(R);else if(P(l))for(R in l)g.call(l,R)&&(p=l[R],this.instruction(R,p));else C(_)&&(_=_.apply()),M=new E(this,l,_),this.children.push(M);return this},c.prototype.instructionBefore=function(l,_){var R,p,M;return p=this.parent.children.indexOf(this),M=this.parent.children.splice(p),R=this.parent.instruction(l,_),Array.prototype.push.apply(this.parent.children,M),this},c.prototype.instructionAfter=function(l,_){var R,p,M;return p=this.parent.children.indexOf(this),M=this.parent.children.splice(p+1),R=this.parent.instruction(l,_),Array.prototype.push.apply(this.parent.children,M),this},c.prototype.declaration=function(l,_,R){var p,M;return p=this.document(),M=new i(p,l,_,R),p.children.length===0?p.children.unshift(M):p.children[0].type===e.Declaration?p.children[0]=M:p.children.unshift(M),p.root()||p},c.prototype.dtd=function(l,_){var R,p,M,S,N,I,A,B,U,x;for(p=this.document(),M=new o(p,l,_),U=p.children,S=N=0,A=U.length;N<A;S=++N)if(R=U[S],R.type===e.DocType)return p.children[S]=M,M;for(x=p.children,S=I=0,B=x.length;I<B;S=++I)if(R=x[S],R.isRoot)return p.children.splice(S,0,M),M;return p.children.push(M),M},c.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},c.prototype.root=function(){var l;for(l=this;l;){if(l.type===e.Document)return l.rootObject;if(l.isRoot)return l;l=l.parent}},c.prototype.document=function(){var l;for(l=this;l;){if(l.type===e.Document)return l;l=l.parent}},c.prototype.end=function(l){return this.document().end(l)},c.prototype.prev=function(){var l;if(l=this.parent.children.indexOf(this),l<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[l-1]},c.prototype.next=function(){var l;if(l=this.parent.children.indexOf(this),l===-1||l===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[l+1]},c.prototype.importDocument=function(l){var _;return _=l.root().clone(),_.parent=this,_.isRoot=!1,this.children.push(_),this},c.prototype.debugInfo=function(l){var _,R;return l=l||this.name,l==null&&!((_=this.parent)!=null&&_.name)?"":l==null?"parent: <"+this.parent.name+">":(R=this.parent)!=null&&R.name?"node: <"+l+">, parent: <"+this.parent.name+">":"node: <"+l+">"},c.prototype.ele=function(l,_,R){return this.element(l,_,R)},c.prototype.nod=function(l,_,R){return this.node(l,_,R)},c.prototype.txt=function(l){return this.text(l)},c.prototype.dat=function(l){return this.cdata(l)},c.prototype.com=function(l){return this.comment(l)},c.prototype.ins=function(l,_){return this.instruction(l,_)},c.prototype.doc=function(){return this.document()},c.prototype.dec=function(l,_,R){return this.declaration(l,_,R)},c.prototype.e=function(l,_,R){return this.element(l,_,R)},c.prototype.n=function(l,_,R){return this.node(l,_,R)},c.prototype.t=function(l){return this.text(l)},c.prototype.d=function(l){return this.cdata(l)},c.prototype.c=function(l){return this.comment(l)},c.prototype.r=function(l){return this.raw(l)},c.prototype.i=function(l,_){return this.instruction(l,_)},c.prototype.u=function(){return this.up()},c.prototype.importXMLBuilder=function(l){return this.importDocument(l)},c.prototype.replaceChild=function(l,_){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.removeChild=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.appendChild=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.hasChildNodes=function(){return this.children.length!==0},c.prototype.cloneNode=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.isSupported=function(l,_){return!0},c.prototype.hasAttributes=function(){return this.attribs.length!==0},c.prototype.compareDocumentPosition=function(l){var _,R;return _=this,_===l?0:this.document()!==l.document()?(R=t.Disconnected|t.ImplementationSpecific,Math.random()<.5?R|=t.Preceding:R|=t.Following,R):_.isAncestor(l)?t.Contains|t.Preceding:_.isDescendant(l)?t.Contains|t.Following:_.isPreceding(l)?t.Preceding:t.Following},c.prototype.isSameNode=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.lookupPrefix=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.isDefaultNamespace=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.lookupNamespaceURI=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.isEqualNode=function(l){var _,R,p;if(l.nodeType!==this.nodeType||l.children.length!==this.children.length)return!1;for(_=R=0,p=this.children.length-1;0<=p?R<=p:R>=p;_=0<=p?++R:--R)if(!this.children[_].isEqualNode(l.children[_]))return!1;return!0},c.prototype.getFeature=function(l,_){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.setUserData=function(l,_,R){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getUserData=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.contains=function(l){return l?l===this||this.isDescendant(l):!1},c.prototype.isDescendant=function(l){var _,R,p,M,S;for(S=this.children,p=0,M=S.length;p<M;p++)if(_=S[p],l===_||(R=_.isDescendant(l),R))return!0;return!1},c.prototype.isAncestor=function(l){return l.isDescendant(this)},c.prototype.isPreceding=function(l){var _,R;return _=this.treePosition(l),R=this.treePosition(this),_===-1||R===-1?!1:_<R},c.prototype.isFollowing=function(l){var _,R;return _=this.treePosition(l),R=this.treePosition(this),_===-1||R===-1?!1:_>R},c.prototype.treePosition=function(l){var _,R;return R=0,_=!1,this.foreachTreeNode(this.document(),function(p){if(R++,!_&&p===l)return _=!0}),_?R:-1},c.prototype.foreachTreeNode=function(l,_){var R,p,M,S,N;for(l||(l=this.document()),S=l.children,p=0,M=S.length;p<M;p++){if(R=S[p],N=_(R))return N;if(N=this.foreachTreeNode(R,_),N)return N}},c})()}).call(iu)});var $i=T((su,au)=>{"use strict";(function(){var t,e=function(n,i){return function(){return n.apply(i,arguments)}},r={}.hasOwnProperty;au.exports=t=(function(){function n(i){this.assertLegalName=e(this.assertLegalName,this),this.assertLegalChar=e(this.assertLegalChar,this);var o,s,a;i||(i={}),this.options=i,this.options.version||(this.options.version="1.0"),s=i.stringify||{};for(o in s)r.call(s,o)&&(a=s[o],this[o]=a)}return n.prototype.name=function(i){return this.options.noValidation?i:this.assertLegalName(""+i||"")},n.prototype.text=function(i){return this.options.noValidation?i:this.assertLegalChar(this.textEscape(""+i||""))},n.prototype.cdata=function(i){return this.options.noValidation?i:(i=""+i||"",i=i.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(i))},n.prototype.comment=function(i){if(this.options.noValidation)return i;if(i=""+i||"",i.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+i);return this.assertLegalChar(i)},n.prototype.raw=function(i){return this.options.noValidation?i:""+i||""},n.prototype.attValue=function(i){return this.options.noValidation?i:this.assertLegalChar(this.attEscape(i=""+i||""))},n.prototype.insTarget=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.insValue=function(i){if(this.options.noValidation)return i;if(i=""+i||"",i.match(/\?>/))throw new Error("Invalid processing instruction value: "+i);return this.assertLegalChar(i)},n.prototype.xmlVersion=function(i){if(this.options.noValidation)return i;if(i=""+i||"",!i.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+i);return i},n.prototype.xmlEncoding=function(i){if(this.options.noValidation)return i;if(i=""+i||"",!i.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+i);return this.assertLegalChar(i)},n.prototype.xmlStandalone=function(i){return this.options.noValidation?i:i?"yes":"no"},n.prototype.dtdPubID=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.dtdSysID=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.dtdElementValue=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.dtdAttType=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.dtdAttDefault=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.dtdEntityValue=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.dtdNData=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.convertAttKey="@",n.prototype.convertPIKey="?",n.prototype.convertTextKey="#text",n.prototype.convertCDataKey="#cdata",n.prototype.convertCommentKey="#comment",n.prototype.convertRawKey="#raw",n.prototype.assertLegalChar=function(i){var o,s;if(this.options.noValidation)return i;if(o="",this.options.version==="1.0"){if(o=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,s=i.match(o))throw new Error("Invalid character in string: "+i+" at index "+s.index)}else if(this.options.version==="1.1"&&(o=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,s=i.match(o)))throw new Error("Invalid character in string: "+i+" at index "+s.index);return i},n.prototype.assertLegalName=function(i){var o;if(this.options.noValidation)return i;if(this.assertLegalChar(i),o=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!i.match(o))throw new Error("Invalid character in name");return i},n.prototype.textEscape=function(i){var o;return this.options.noValidation?i:(o=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,i.replace(o,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},n.prototype.attEscape=function(i){var o;return this.options.noValidation?i:(o=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,i.replace(o,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},n})()}).call(su)});var er=T((uu,lu)=>{"use strict";(function(){lu.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(uu)});var Ui=T((fu,cu)=>{"use strict";(function(){var t,e,r,n,i,o,s,a,u,d,w,E,y,m,h,v,C,P={}.hasOwnProperty;C=De().assign,t=ne(),u=tn(),d=an(),r=Zr(),n=en(),E=Qr(),m=un(),h=ln(),y=fn(),w=Bi(),i=rn(),o=on(),s=nn(),a=sn(),e=er(),cu.exports=v=(function(){function D(g){var c,l,_;g||(g={}),this.options=g,l=g.writer||{};for(c in l)P.call(l,c)&&(_=l[c],this["_"+c]=this[c],this[c]=_)}return D.prototype.filterOptions=function(g){var c,l,_,R,p,M,S,N;return g||(g={}),g=C({},this.options,g),c={writer:this},c.pretty=g.pretty||!1,c.allowEmpty=g.allowEmpty||!1,c.indent=(l=g.indent)!=null?l:" ",c.newline=(_=g.newline)!=null?_:`
|
|
3
|
-
`,c.offset=(R=g.offset)!=null?R:0,c.dontPrettyTextNodes=(p=(M=g.dontPrettyTextNodes)!=null?M:g.dontprettytextnodes)!=null?p:0,c.spaceBeforeSlash=(S=(N=g.spaceBeforeSlash)!=null?N:g.spacebeforeslash)!=null?S:"",c.spaceBeforeSlash===!0&&(c.spaceBeforeSlash=" "),c.suppressPrettyCount=0,c.user={},c.state=e.None,c},D.prototype.indent=function(g,c,l){var _;return!c.pretty||c.suppressPrettyCount?"":c.pretty&&(_=(l||0)+c.offset+1,_>0)?new Array(_).join(c.indent):""},D.prototype.endline=function(g,c,l){return!c.pretty||c.suppressPrettyCount?"":c.newline},D.prototype.attribute=function(g,c,l){var _;return this.openAttribute(g,c,l),_=" "+g.name+'="'+g.value+'"',this.closeAttribute(g,c,l),_},D.prototype.cdata=function(g,c,l){var _;return this.openNode(g,c,l),c.state=e.OpenTag,_=this.indent(g,c,l)+"<![CDATA[",c.state=e.InsideTag,_+=g.value,c.state=e.CloseTag,_+="]]>"+this.endline(g,c,l),c.state=e.None,this.closeNode(g,c,l),_},D.prototype.comment=function(g,c,l){var _;return this.openNode(g,c,l),c.state=e.OpenTag,_=this.indent(g,c,l)+"<!-- ",c.state=e.InsideTag,_+=g.value,c.state=e.CloseTag,_+=" -->"+this.endline(g,c,l),c.state=e.None,this.closeNode(g,c,l),_},D.prototype.declaration=function(g,c,l){var _;return this.openNode(g,c,l),c.state=e.OpenTag,_=this.indent(g,c,l)+"<?xml",c.state=e.InsideTag,_+=' version="'+g.version+'"',g.encoding!=null&&(_+=' encoding="'+g.encoding+'"'),g.standalone!=null&&(_+=' standalone="'+g.standalone+'"'),c.state=e.CloseTag,_+=c.spaceBeforeSlash+"?>",_+=this.endline(g,c,l),c.state=e.None,this.closeNode(g,c,l),_},D.prototype.docType=function(g,c,l){var _,R,p,M,S;if(l||(l=0),this.openNode(g,c,l),c.state=e.OpenTag,M=this.indent(g,c,l),M+="<!DOCTYPE "+g.root().name,g.pubID&&g.sysID?M+=' PUBLIC "'+g.pubID+'" "'+g.sysID+'"':g.sysID&&(M+=' SYSTEM "'+g.sysID+'"'),g.children.length>0){for(M+=" [",M+=this.endline(g,c,l),c.state=e.InsideTag,S=g.children,R=0,p=S.length;R<p;R++)_=S[R],M+=this.writeChildNode(_,c,l+1);c.state=e.CloseTag,M+="]"}return c.state=e.CloseTag,M+=c.spaceBeforeSlash+">",M+=this.endline(g,c,l),c.state=e.None,this.closeNode(g,c,l),M},D.prototype.element=function(g,c,l){var _,R,p,M,S,N,I,A,B,U,x,q,F,Q;l||(l=0),U=!1,x="",this.openNode(g,c,l),c.state=e.OpenTag,x+=this.indent(g,c,l)+"<"+g.name,q=g.attribs;for(B in q)P.call(q,B)&&(_=q[B],x+=this.attribute(_,c,l));if(p=g.children.length,M=p===0?null:g.children[0],p===0||g.children.every(function(k){return(k.type===t.Text||k.type===t.Raw)&&k.value===""}))c.allowEmpty?(x+=">",c.state=e.CloseTag,x+="</"+g.name+">"+this.endline(g,c,l)):(c.state=e.CloseTag,x+=c.spaceBeforeSlash+"/>"+this.endline(g,c,l));else if(c.pretty&&p===1&&(M.type===t.Text||M.type===t.Raw)&&M.value!=null)x+=">",c.state=e.InsideTag,c.suppressPrettyCount++,U=!0,x+=this.writeChildNode(M,c,l+1),c.suppressPrettyCount--,U=!1,c.state=e.CloseTag,x+="</"+g.name+">"+this.endline(g,c,l);else{if(c.dontPrettyTextNodes){for(F=g.children,S=0,I=F.length;S<I;S++)if(R=F[S],(R.type===t.Text||R.type===t.Raw)&&R.value!=null){c.suppressPrettyCount++,U=!0;break}}for(x+=">"+this.endline(g,c,l),c.state=e.InsideTag,Q=g.children,N=0,A=Q.length;N<A;N++)R=Q[N],x+=this.writeChildNode(R,c,l+1);c.state=e.CloseTag,x+=this.indent(g,c,l)+"</"+g.name+">",U&&c.suppressPrettyCount--,x+=this.endline(g,c,l),c.state=e.None}return this.closeNode(g,c,l),x},D.prototype.writeChildNode=function(g,c,l){switch(g.type){case t.CData:return this.cdata(g,c,l);case t.Comment:return this.comment(g,c,l);case t.Element:return this.element(g,c,l);case t.Raw:return this.raw(g,c,l);case t.Text:return this.text(g,c,l);case t.ProcessingInstruction:return this.processingInstruction(g,c,l);case t.Dummy:return"";case t.Declaration:return this.declaration(g,c,l);case t.DocType:return this.docType(g,c,l);case t.AttributeDeclaration:return this.dtdAttList(g,c,l);case t.ElementDeclaration:return this.dtdElement(g,c,l);case t.EntityDeclaration:return this.dtdEntity(g,c,l);case t.NotationDeclaration:return this.dtdNotation(g,c,l);default:throw new Error("Unknown XML node type: "+g.constructor.name)}},D.prototype.processingInstruction=function(g,c,l){var _;return this.openNode(g,c,l),c.state=e.OpenTag,_=this.indent(g,c,l)+"<?",c.state=e.InsideTag,_+=g.target,g.value&&(_+=" "+g.value),c.state=e.CloseTag,_+=c.spaceBeforeSlash+"?>",_+=this.endline(g,c,l),c.state=e.None,this.closeNode(g,c,l),_},D.prototype.raw=function(g,c,l){var _;return this.openNode(g,c,l),c.state=e.OpenTag,_=this.indent(g,c,l),c.state=e.InsideTag,_+=g.value,c.state=e.CloseTag,_+=this.endline(g,c,l),c.state=e.None,this.closeNode(g,c,l),_},D.prototype.text=function(g,c,l){var _;return this.openNode(g,c,l),c.state=e.OpenTag,_=this.indent(g,c,l),c.state=e.InsideTag,_+=g.value,c.state=e.CloseTag,_+=this.endline(g,c,l),c.state=e.None,this.closeNode(g,c,l),_},D.prototype.dtdAttList=function(g,c,l){var _;return this.openNode(g,c,l),c.state=e.OpenTag,_=this.indent(g,c,l)+"<!ATTLIST",c.state=e.InsideTag,_+=" "+g.elementName+" "+g.attributeName+" "+g.attributeType,g.defaultValueType!=="#DEFAULT"&&(_+=" "+g.defaultValueType),g.defaultValue&&(_+=' "'+g.defaultValue+'"'),c.state=e.CloseTag,_+=c.spaceBeforeSlash+">"+this.endline(g,c,l),c.state=e.None,this.closeNode(g,c,l),_},D.prototype.dtdElement=function(g,c,l){var _;return this.openNode(g,c,l),c.state=e.OpenTag,_=this.indent(g,c,l)+"<!ELEMENT",c.state=e.InsideTag,_+=" "+g.name+" "+g.value,c.state=e.CloseTag,_+=c.spaceBeforeSlash+">"+this.endline(g,c,l),c.state=e.None,this.closeNode(g,c,l),_},D.prototype.dtdEntity=function(g,c,l){var _;return this.openNode(g,c,l),c.state=e.OpenTag,_=this.indent(g,c,l)+"<!ENTITY",c.state=e.InsideTag,g.pe&&(_+=" %"),_+=" "+g.name,g.value?_+=' "'+g.value+'"':(g.pubID&&g.sysID?_+=' PUBLIC "'+g.pubID+'" "'+g.sysID+'"':g.sysID&&(_+=' SYSTEM "'+g.sysID+'"'),g.nData&&(_+=" NDATA "+g.nData)),c.state=e.CloseTag,_+=c.spaceBeforeSlash+">"+this.endline(g,c,l),c.state=e.None,this.closeNode(g,c,l),_},D.prototype.dtdNotation=function(g,c,l){var _;return this.openNode(g,c,l),c.state=e.OpenTag,_=this.indent(g,c,l)+"<!NOTATION",c.state=e.InsideTag,_+=" "+g.name,g.pubID&&g.sysID?_+=' PUBLIC "'+g.pubID+'" "'+g.sysID+'"':g.pubID?_+=' PUBLIC "'+g.pubID+'"':g.sysID&&(_+=' SYSTEM "'+g.sysID+'"'),c.state=e.CloseTag,_+=c.spaceBeforeSlash+">"+this.endline(g,c,l),c.state=e.None,this.closeNode(g,c,l),_},D.prototype.openNode=function(g,c,l){},D.prototype.closeNode=function(g,c,l){},D.prototype.openAttribute=function(g,c,l){},D.prototype.closeAttribute=function(g,c,l){},D})()}).call(fu)});var cn=T((hu,du)=>{"use strict";(function(){var t,e,r=function(i,o){for(var s in o)n.call(o,s)&&(i[s]=o[s]);function a(){this.constructor=i}return a.prototype=o.prototype,i.prototype=new a,i.__super__=o.prototype,i},n={}.hasOwnProperty;e=Ui(),du.exports=t=(function(i){r(o,i);function o(s){o.__super__.constructor.call(this,s)}return o.prototype.document=function(s,a){var u,d,w,E,y;for(a=this.filterOptions(a),E="",y=s.children,d=0,w=y.length;d<w;d++)u=y[d],E+=this.writeChildNode(u,a,0);return a.pretty&&E.slice(-a.newline.length)===a.newline&&(E=E.slice(0,-a.newline.length)),E},o})(e)}).call(hu)});var Vi=T((pu,gu)=>{"use strict";(function(){var t,e,r,n,i,o,s,a,u=function(w,E){for(var y in E)d.call(E,y)&&(w[y]=E[y]);function m(){this.constructor=w}return m.prototype=E.prototype,w.prototype=new m,w.__super__=E.prototype,w},d={}.hasOwnProperty;a=De().isPlainObject,r=Fi(),e=ya(),i=we(),t=ne(),s=$i(),o=cn(),gu.exports=n=(function(w){u(E,w);function E(y){E.__super__.constructor.call(this,null),this.name="#document",this.type=t.Document,this.documentURI=null,this.domConfig=new e,y||(y={}),y.writer||(y.writer=new o),this.options=y,this.stringify=new s(y)}return Object.defineProperty(E.prototype,"implementation",{value:new r}),Object.defineProperty(E.prototype,"doctype",{get:function(){var y,m,h,v;for(v=this.children,m=0,h=v.length;m<h;m++)if(y=v[m],y.type===t.DocType)return y;return null}}),Object.defineProperty(E.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(E.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(E.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(E.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===t.Declaration?this.children[0].encoding:null}}),Object.defineProperty(E.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===t.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(E.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===t.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(E.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(E.prototype,"origin",{get:function(){return null}}),Object.defineProperty(E.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(E.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(E.prototype,"contentType",{get:function(){return null}}),E.prototype.end=function(y){var m;return m={},y?a(y)&&(m=y,y=this.options.writer):y=this.options.writer,y.document(this,y.filterOptions(m))},E.prototype.toString=function(y){return this.options.writer.document(this,this.options.writer.filterOptions(y))},E.prototype.createElement=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createTextNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createComment=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createCDATASection=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createProcessingInstruction=function(y,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createAttribute=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createEntityReference=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByTagName=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.importNode=function(y,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createElementNS=function(y,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createAttributeNS=function(y,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByTagNameNS=function(y,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementById=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.adoptNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.renameNode=function(y,m,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByClassName=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createEvent=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createNodeIterator=function(y,m,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createTreeWalker=function(y,m,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},E})(i)}).call(pu)});var bu=T((mu,yu)=>{"use strict";(function(){var t,e,r,n,i,o,s,a,u,d,w,E,y,m,h,v,C,P,D,g,c,l,_,R,p={}.hasOwnProperty;R=De(),l=R.isObject,c=R.isFunction,_=R.isPlainObject,g=R.getValue,t=ne(),E=Vi(),m=Qr(),n=Zr(),i=en(),v=un(),D=ln(),h=fn(),d=tn(),w=an(),o=rn(),a=nn(),s=on(),u=sn(),r=ki(),P=$i(),C=cn(),e=er(),yu.exports=y=(function(){function M(S,N,I){var A;this.name="?xml",this.type=t.Document,S||(S={}),A={},S.writer?_(S.writer)&&(A=S.writer,S.writer=new C):S.writer=new C,this.options=S,this.writer=S.writer,this.writerOptions=this.writer.filterOptions(A),this.stringify=new P(S),this.onDataCallback=N||function(){},this.onEndCallback=I||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return M.prototype.createChildNode=function(S){var N,I,A,B,U,x,q,F;switch(S.type){case t.CData:this.cdata(S.value);break;case t.Comment:this.comment(S.value);break;case t.Element:A={},q=S.attribs;for(I in q)p.call(q,I)&&(N=q[I],A[I]=N.value);this.node(S.name,A);break;case t.Dummy:this.dummy();break;case t.Raw:this.raw(S.value);break;case t.Text:this.text(S.value);break;case t.ProcessingInstruction:this.instruction(S.target,S.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+S.constructor.name)}for(F=S.children,U=0,x=F.length;U<x;U++)B=F[U],this.createChildNode(B),B.type===t.Element&&this.up();return this},M.prototype.dummy=function(){return this},M.prototype.node=function(S,N,I){var A;if(S==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(S));return this.openCurrent(),S=g(S),N==null&&(N={}),N=g(N),l(N)||(A=[N,I],I=A[0],N=A[1]),this.currentNode=new m(this,S,N),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,I!=null&&this.text(I),this},M.prototype.element=function(S,N,I){var A,B,U,x,q,F;if(this.currentNode&&this.currentNode.type===t.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(S)||l(S)||c(S))for(x=this.options.noValidation,this.options.noValidation=!0,F=new E(this.options).element("TEMP_ROOT"),F.element(S),this.options.noValidation=x,q=F.children,B=0,U=q.length;B<U;B++)A=q[B],this.createChildNode(A),A.type===t.Element&&this.up();else this.node(S,N,I);return this},M.prototype.attribute=function(S,N){var I,A;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(S));if(S!=null&&(S=g(S)),l(S))for(I in S)p.call(S,I)&&(A=S[I],this.attribute(I,A));else c(N)&&(N=N.apply()),this.options.keepNullAttributes&&N==null?this.currentNode.attribs[S]=new r(this,S,""):N!=null&&(this.currentNode.attribs[S]=new r(this,S,N));return this},M.prototype.text=function(S){var N;return this.openCurrent(),N=new D(this,S),this.onData(this.writer.text(N,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.prototype.cdata=function(S){var N;return this.openCurrent(),N=new n(this,S),this.onData(this.writer.cdata(N,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.prototype.comment=function(S){var N;return this.openCurrent(),N=new i(this,S),this.onData(this.writer.comment(N,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.prototype.raw=function(S){var N;return this.openCurrent(),N=new v(this,S),this.onData(this.writer.raw(N,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.prototype.instruction=function(S,N){var I,A,B,U,x;if(this.openCurrent(),S!=null&&(S=g(S)),N!=null&&(N=g(N)),Array.isArray(S))for(I=0,U=S.length;I<U;I++)A=S[I],this.instruction(A);else if(l(S))for(A in S)p.call(S,A)&&(B=S[A],this.instruction(A,B));else c(N)&&(N=N.apply()),x=new h(this,S,N),this.onData(this.writer.processingInstruction(x,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},M.prototype.declaration=function(S,N,I){var A;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return A=new d(this,S,N,I),this.onData(this.writer.declaration(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.prototype.doctype=function(S,N,I){if(this.openCurrent(),S==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new w(this,N,I),this.currentNode.rootNodeName=S,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},M.prototype.dtdElement=function(S,N){var I;return this.openCurrent(),I=new s(this,S,N),this.onData(this.writer.dtdElement(I,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.prototype.attList=function(S,N,I,A,B){var U;return this.openCurrent(),U=new o(this,S,N,I,A,B),this.onData(this.writer.dtdAttList(U,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.prototype.entity=function(S,N){var I;return this.openCurrent(),I=new a(this,!1,S,N),this.onData(this.writer.dtdEntity(I,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.prototype.pEntity=function(S,N){var I;return this.openCurrent(),I=new a(this,!0,S,N),this.onData(this.writer.dtdEntity(I,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.prototype.notation=function(S,N){var I;return this.openCurrent(),I=new u(this,S,N),this.onData(this.writer.dtdNotation(I,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.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},M.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},M.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},M.prototype.openNode=function(S){var N,I,A,B;if(!S.isOpen){if(!this.root&&this.currentLevel===0&&S.type===t.Element&&(this.root=S),I="",S.type===t.Element){this.writerOptions.state=e.OpenTag,I=this.writer.indent(S,this.writerOptions,this.currentLevel)+"<"+S.name,B=S.attribs;for(A in B)p.call(B,A)&&(N=B[A],I+=this.writer.attribute(N,this.writerOptions,this.currentLevel));I+=(S.children?">":"/>")+this.writer.endline(S,this.writerOptions,this.currentLevel),this.writerOptions.state=e.InsideTag}else this.writerOptions.state=e.OpenTag,I=this.writer.indent(S,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+S.rootNodeName,S.pubID&&S.sysID?I+=' PUBLIC "'+S.pubID+'" "'+S.sysID+'"':S.sysID&&(I+=' SYSTEM "'+S.sysID+'"'),S.children?(I+=" [",this.writerOptions.state=e.InsideTag):(this.writerOptions.state=e.CloseTag,I+=">"),I+=this.writer.endline(S,this.writerOptions,this.currentLevel);return this.onData(I,this.currentLevel),S.isOpen=!0}},M.prototype.closeNode=function(S){var N;if(!S.isClosed)return N="",this.writerOptions.state=e.CloseTag,S.type===t.Element?N=this.writer.indent(S,this.writerOptions,this.currentLevel)+"</"+S.name+">"+this.writer.endline(S,this.writerOptions,this.currentLevel):N=this.writer.indent(S,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(S,this.writerOptions,this.currentLevel),this.writerOptions.state=e.None,this.onData(N,this.currentLevel),S.isClosed=!0},M.prototype.onData=function(S,N){return this.documentStarted=!0,this.onDataCallback(S,N+1)},M.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},M.prototype.debugInfo=function(S){return S==null?"":"node: <"+S+">"},M.prototype.ele=function(){return this.element.apply(this,arguments)},M.prototype.nod=function(S,N,I){return this.node(S,N,I)},M.prototype.txt=function(S){return this.text(S)},M.prototype.dat=function(S){return this.cdata(S)},M.prototype.com=function(S){return this.comment(S)},M.prototype.ins=function(S,N){return this.instruction(S,N)},M.prototype.dec=function(S,N,I){return this.declaration(S,N,I)},M.prototype.dtd=function(S,N,I){return this.doctype(S,N,I)},M.prototype.e=function(S,N,I){return this.element(S,N,I)},M.prototype.n=function(S,N,I){return this.node(S,N,I)},M.prototype.t=function(S){return this.text(S)},M.prototype.d=function(S){return this.cdata(S)},M.prototype.c=function(S){return this.comment(S)},M.prototype.r=function(S){return this.raw(S)},M.prototype.i=function(S,N){return this.instruction(S,N)},M.prototype.att=function(){return this.currentNode&&this.currentNode.type===t.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},M.prototype.a=function(){return this.currentNode&&this.currentNode.type===t.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},M.prototype.ent=function(S,N){return this.entity(S,N)},M.prototype.pent=function(S,N){return this.pEntity(S,N)},M.prototype.not=function(S,N){return this.notation(S,N)},M})()}).call(mu)});var vu=T((wu,_u)=>{"use strict";(function(){var t,e,r,n,i=function(s,a){for(var u in a)o.call(a,u)&&(s[u]=a[u]);function d(){this.constructor=s}return d.prototype=a.prototype,s.prototype=new d,s.__super__=a.prototype,s},o={}.hasOwnProperty;t=ne(),n=Ui(),e=er(),_u.exports=r=(function(s){i(a,s);function a(u,d){this.stream=u,a.__super__.constructor.call(this,d)}return a.prototype.endline=function(u,d,w){return u.isLastRootNode&&d.state===e.CloseTag?"":a.__super__.endline.call(this,u,d,w)},a.prototype.document=function(u,d){var w,E,y,m,h,v,C,P,D;for(C=u.children,E=y=0,h=C.length;y<h;E=++y)w=C[E],w.isLastRootNode=E===u.children.length-1;for(d=this.filterOptions(d),P=u.children,D=[],m=0,v=P.length;m<v;m++)w=P[m],D.push(this.writeChildNode(w,d,0));return D},a.prototype.attribute=function(u,d,w){return this.stream.write(a.__super__.attribute.call(this,u,d,w))},a.prototype.cdata=function(u,d,w){return this.stream.write(a.__super__.cdata.call(this,u,d,w))},a.prototype.comment=function(u,d,w){return this.stream.write(a.__super__.comment.call(this,u,d,w))},a.prototype.declaration=function(u,d,w){return this.stream.write(a.__super__.declaration.call(this,u,d,w))},a.prototype.docType=function(u,d,w){var E,y,m,h;if(w||(w=0),this.openNode(u,d,w),d.state=e.OpenTag,this.stream.write(this.indent(u,d,w)),this.stream.write("<!DOCTYPE "+u.root().name),u.pubID&&u.sysID?this.stream.write(' PUBLIC "'+u.pubID+'" "'+u.sysID+'"'):u.sysID&&this.stream.write(' SYSTEM "'+u.sysID+'"'),u.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(u,d,w)),d.state=e.InsideTag,h=u.children,y=0,m=h.length;y<m;y++)E=h[y],this.writeChildNode(E,d,w+1);d.state=e.CloseTag,this.stream.write("]")}return d.state=e.CloseTag,this.stream.write(d.spaceBeforeSlash+">"),this.stream.write(this.endline(u,d,w)),d.state=e.None,this.closeNode(u,d,w)},a.prototype.element=function(u,d,w){var E,y,m,h,v,C,P,D,g,c;w||(w=0),this.openNode(u,d,w),d.state=e.OpenTag,this.stream.write(this.indent(u,d,w)+"<"+u.name),g=u.attribs;for(P in g)o.call(g,P)&&(E=g[P],this.attribute(E,d,w));if(m=u.children.length,h=m===0?null:u.children[0],m===0||u.children.every(function(l){return(l.type===t.Text||l.type===t.Raw)&&l.value===""}))d.allowEmpty?(this.stream.write(">"),d.state=e.CloseTag,this.stream.write("</"+u.name+">")):(d.state=e.CloseTag,this.stream.write(d.spaceBeforeSlash+"/>"));else if(d.pretty&&m===1&&(h.type===t.Text||h.type===t.Raw)&&h.value!=null)this.stream.write(">"),d.state=e.InsideTag,d.suppressPrettyCount++,D=!0,this.writeChildNode(h,d,w+1),d.suppressPrettyCount--,D=!1,d.state=e.CloseTag,this.stream.write("</"+u.name+">");else{for(this.stream.write(">"+this.endline(u,d,w)),d.state=e.InsideTag,c=u.children,v=0,C=c.length;v<C;v++)y=c[v],this.writeChildNode(y,d,w+1);d.state=e.CloseTag,this.stream.write(this.indent(u,d,w)+"</"+u.name+">")}return this.stream.write(this.endline(u,d,w)),d.state=e.None,this.closeNode(u,d,w)},a.prototype.processingInstruction=function(u,d,w){return this.stream.write(a.__super__.processingInstruction.call(this,u,d,w))},a.prototype.raw=function(u,d,w){return this.stream.write(a.__super__.raw.call(this,u,d,w))},a.prototype.text=function(u,d,w){return this.stream.write(a.__super__.text.call(this,u,d,w))},a.prototype.dtdAttList=function(u,d,w){return this.stream.write(a.__super__.dtdAttList.call(this,u,d,w))},a.prototype.dtdElement=function(u,d,w){return this.stream.write(a.__super__.dtdElement.call(this,u,d,w))},a.prototype.dtdEntity=function(u,d,w){return this.stream.write(a.__super__.dtdEntity.call(this,u,d,w))},a.prototype.dtdNotation=function(u,d,w){return this.stream.write(a.__super__.dtdNotation.call(this,u,d,w))},a})(n)}).call(wu)});var Tu=T((Eu,Ge)=>{"use strict";(function(){var t,e,r,n,i,o,s,a,u,d;d=De(),a=d.assign,u=d.isFunction,r=Fi(),n=Vi(),i=bu(),s=cn(),o=vu(),t=ne(),e=er(),Ge.exports.create=function(w,E,y,m){var h,v;if(w==null)throw new Error("Root element needs a name.");return m=a({},E,y,m),h=new n(m),v=h.element(w),m.headless||(h.declaration(m),(m.pubID!=null||m.sysID!=null)&&h.dtd(m)),v},Ge.exports.begin=function(w,E,y){var m;return u(w)&&(m=[w,E],E=m[0],y=m[1],w={}),E?new i(w,E,y):new n(w)},Ge.exports.stringWriter=function(w){return new s(w)},Ge.exports.streamWriter=function(w,E){return new o(w,E)},Ge.exports.implementation=new r,Ge.exports.nodeType=t,Ge.exports.writerState=e}).call(Eu)});var Su=T(Hi=>{"use strict";(function(){"use strict";var t,e,r,n,i,o={}.hasOwnProperty;t=Tu(),e=Kr().defaults,n=function(s){return typeof s=="string"&&(s.indexOf("&")>=0||s.indexOf(">")>=0||s.indexOf("<")>=0)},i=function(s){return"<![CDATA["+r(s)+"]]>"},r=function(s){return s.replace("]]>","]]]]><![CDATA[>")},Hi.Builder=(function(){function s(a){var u,d,w;this.options={},d=e["0.2"];for(u in d)o.call(d,u)&&(w=d[u],this.options[u]=w);for(u in a)o.call(a,u)&&(w=a[u],this.options[u]=w)}return s.prototype.buildObject=function(a){var u,d,w,E,y;return u=this.options.attrkey,d=this.options.charkey,Object.keys(a).length===1&&this.options.rootName===e["0.2"].rootName?(y=Object.keys(a)[0],a=a[y]):y=this.options.rootName,w=(function(m){return function(h,v){var C,P,D,g,c,l;if(typeof v!="object")m.options.cdata&&n(v)?h.raw(i(v)):h.txt(v);else if(Array.isArray(v)){for(g in v)if(o.call(v,g)){P=v[g];for(c in P)D=P[c],h=w(h.ele(c),D).up()}}else for(c in v)if(o.call(v,c))if(P=v[c],c===u){if(typeof P=="object")for(C in P)l=P[C],h=h.att(C,l)}else if(c===d)m.options.cdata&&n(P)?h=h.raw(i(P)):h=h.txt(P);else if(Array.isArray(P))for(g in P)o.call(P,g)&&(D=P[g],typeof D=="string"?m.options.cdata&&n(D)?h=h.ele(c).raw(i(D)).up():h=h.ele(c,D).up():h=w(h.ele(c),D).up());else typeof P=="object"?h=w(h.ele(c),P).up():typeof P=="string"&&m.options.cdata&&n(P)?h=h.ele(c).raw(i(P)).up():(P==null&&(P=""),h=h.ele(c,P.toString()).up());return h}})(this),E=t.create(y,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),w(E,a).end(this.options.renderOpts)},s})()}).call(Hi)});var Ou=T(hn=>{"use strict";(function(t){t.parser=function(b,f){return new r(b,f)},t.SAXParser=r,t.SAXStream=d,t.createStream=u,t.MAX_BUFFER_LENGTH=64*1024;var e=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function r(b,f){if(!(this instanceof r))return new r(b,f);var L=this;i(L),L.q=L.c="",L.bufferCheckPosition=t.MAX_BUFFER_LENGTH,L.opt=f||{},L.opt.lowercase=L.opt.lowercase||L.opt.lowercasetags,L.looseCase=L.opt.lowercase?"toLowerCase":"toUpperCase",L.tags=[],L.closed=L.closedRoot=L.sawRoot=!1,L.tag=L.error=null,L.strict=!!b,L.noscript=!!(b||L.opt.noscript),L.state=p.BEGIN,L.strictEntities=L.opt.strictEntities,L.ENTITIES=L.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),L.attribList=[],L.opt.xmlns&&(L.ns=Object.create(h)),L.opt.unquotedAttributeValues===void 0&&(L.opt.unquotedAttributeValues=!b),L.trackPosition=L.opt.position!==!1,L.trackPosition&&(L.position=L.line=L.column=0),S(L,"onready")}Object.create||(Object.create=function(b){function f(){}f.prototype=b;var L=new f;return L}),Object.keys||(Object.keys=function(b){var f=[];for(var L in b)b.hasOwnProperty(L)&&f.push(L);return f});function n(b){for(var f=Math.max(t.MAX_BUFFER_LENGTH,10),L=0,O=0,z=e.length;O<z;O++){var K=b[e[O]].length;if(K>f)switch(e[O]){case"textNode":I(b);break;case"cdata":N(b,"oncdata",b.cdata),b.cdata="";break;case"script":N(b,"onscript",b.script),b.script="";break;default:B(b,"Max buffer length exceeded: "+e[O])}L=Math.max(L,K)}var Z=t.MAX_BUFFER_LENGTH-L;b.bufferCheckPosition=Z+b.position}function i(b){for(var f=0,L=e.length;f<L;f++)b[e[f]]=""}function o(b){I(b),b.cdata!==""&&(N(b,"oncdata",b.cdata),b.cdata=""),b.script!==""&&(N(b,"onscript",b.script),b.script="")}r.prototype={end:function(){U(this)},write:Wr,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){o(this)}};var s;try{s=$("stream").Stream}catch{s=function(){}}s||(s=function(){});var a=t.EVENTS.filter(function(b){return b!=="error"&&b!=="end"});function u(b,f){return new d(b,f)}function d(b,f){if(!(this instanceof d))return new d(b,f);s.apply(this),this._parser=new r(b,f),this.writable=!0,this.readable=!0;var L=this;this._parser.onend=function(){L.emit("end")},this._parser.onerror=function(O){L.emit("error",O),L._parser.error=null},this._decoder=null,a.forEach(function(O){Object.defineProperty(L,"on"+O,{get:function(){return L._parser["on"+O]},set:function(z){if(!z)return L.removeAllListeners(O),L._parser["on"+O]=z,z;L.on(O,z)},enumerable:!0,configurable:!1})})}d.prototype=Object.create(s.prototype,{constructor:{value:d}}),d.prototype.write=function(b){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(b)){if(!this._decoder){var f=$("string_decoder").StringDecoder;this._decoder=new f("utf8")}b=this._decoder.write(b)}return this._parser.write(b.toString()),this.emit("data",b),!0},d.prototype.end=function(b){return b&&b.length&&this.write(b),this._parser.end(),!0},d.prototype.on=function(b,f){var L=this;return!L._parser["on"+b]&&a.indexOf(b)!==-1&&(L._parser["on"+b]=function(){var O=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);O.splice(0,0,b),L.emit.apply(L,O)}),s.prototype.on.call(L,b,f)};var w="[CDATA[",E="DOCTYPE",y="http://www.w3.org/XML/1998/namespace",m="http://www.w3.org/2000/xmlns/",h={xml:y,xmlns:m},v=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,C=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,P=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,D=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function g(b){return b===" "||b===`
|
|
4
|
-
`||b==="\r"||b===" "}function c(b){return b==='"'||b==="'"}function l(b){return b===">"||
|
|
1
|
+
var Lg=Object.create;var ga=Object.defineProperty;var Ag=Object.getOwnPropertyDescriptor;var Cg=Object.getOwnPropertyNames;var qg=Object.getPrototypeOf,jg=Object.prototype.hasOwnProperty;var $=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var S=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fg=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Cg(e))!jg.call(t,i)&&i!==r&&ga(t,i,{get:()=>e[i],enumerable:!(n=Ag(e,i))||n.enumerable});return t};var Hi=(t,e,r)=>(r=t!=null?Lg(qg(t)):{},Fg(e||!t||!t.__esModule?ga(r,"default",{value:t,enumerable:!0}):r,t));var on=S(Ki=>{"use strict";(function(){Ki.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
2
|
+
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(Ki)});var Pe=S((ba,Ke)=>{"use strict";(function(){var t,e,r,n,i,o,s,a=[].slice,u={}.hasOwnProperty;t=function(){var d,w,E,y,g,h;if(h=arguments[0],g=2<=arguments.length?a.call(arguments,1):[],i(Object.assign))Object.assign.apply(null,arguments);else for(d=0,E=g.length;d<E;d++)if(y=g[d],y!=null)for(w in y)u.call(y,w)&&(h[w]=y[w]);return h},i=function(d){return!!d&&Object.prototype.toString.call(d)==="[object Function]"},o=function(d){var w;return!!d&&((w=typeof d)=="function"||w==="object")},r=function(d){return i(Array.isArray)?Array.isArray(d):Object.prototype.toString.call(d)==="[object Array]"},n=function(d){var w;if(r(d))return!d.length;for(w in d)if(u.call(d,w))return!1;return!0},s=function(d){var w,E;return o(d)&&(E=Object.getPrototypeOf(d))&&(w=E.constructor)&&typeof w=="function"&&w instanceof w&&Function.prototype.toString.call(w)===Function.prototype.toString.call(Object)},e=function(d){return i(d.valueOf)?d.valueOf():d},Ke.exports.assign=t,Ke.exports.isFunction=i,Ke.exports.isObject=o,Ke.exports.isArray=r,Ke.exports.isEmpty=n,Ke.exports.isPlainObject=s,Ke.exports.getValue=e}).call(ba)});var Yi=S((wa,_a)=>{"use strict";(function(){var t;_a.exports=t=(function(){function e(){}return e.prototype.hasFeature=function(r,n){return!0},e.prototype.createDocumentType=function(r,n,i){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(r,n,i){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(r){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(r,n){throw new Error("This DOM method is not implemented.")},e})()}).call(wa)});var Sa=S((va,Ea)=>{"use strict";(function(){var t;Ea.exports=t=(function(){function e(){}return e.prototype.handleError=function(r){throw new Error(r)},e})()}).call(va)});var Da=S((Ta,Oa)=>{"use strict";(function(){var t;Oa.exports=t=(function(){function e(r){this.arr=r||[]}return Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e.prototype.item=function(r){return this.arr[r]||null},e.prototype.contains=function(r){return this.arr.indexOf(r)!==-1},e})()}).call(Ta)});var Ma=S((xa,Pa)=>{"use strict";(function(){var t,e,r;e=Sa(),r=Da(),Pa.exports=t=(function(){function n(){var i;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=i=Object.create(this.defaultParams)}return Object.defineProperty(n.prototype,"parameterNames",{get:function(){return new r(Object.keys(this.defaultParams))}}),n.prototype.getParameter=function(i){return this.params.hasOwnProperty(i)?this.params[i]:null},n.prototype.canSetParameter=function(i,o){return!0},n.prototype.setParameter=function(i,o){return o!=null?this.params[i]=o:delete this.params[i]},n})()}).call(xa)});var ne=S((Na,Ra)=>{"use strict";(function(){Ra.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(Na)});var zi=S((Ia,La)=>{"use strict";(function(){var t,e,r;t=ne(),r=_e(),La.exports=e=(function(){function n(i,o,s){if(this.parent=i,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),o==null)throw new Error("Missing attribute name. "+this.debugInfo(o));this.name=this.stringify.name(o),this.value=this.stringify.attValue(s),this.type=t.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(n.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(n.prototype,"textContent",{get:function(){return this.value},set:function(i){return this.value=i||""}}),Object.defineProperty(n.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(n.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(n.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(n.prototype,"specified",{get:function(){return!0}}),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(i){return this.options.writer.attribute(this,this.options.writer.filterOptions(i))},n.prototype.debugInfo=function(i){return i=i||this.name,i==null?"parent: <"+this.parent.name+">":"attribute: {"+i+"}, parent: <"+this.parent.name+">"},n.prototype.isEqualNode=function(i){return!(i.namespaceURI!==this.namespaceURI||i.prefix!==this.prefix||i.localName!==this.localName||i.value!==this.value)},n})()}).call(Ia)});var sn=S((Aa,Ca)=>{"use strict";(function(){var t;Ca.exports=t=(function(){function e(r){this.nodes=r}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),e.prototype.clone=function(){return this.nodes=null},e.prototype.getNamedItem=function(r){return this.nodes[r]},e.prototype.setNamedItem=function(r){var n;return n=this.nodes[r.nodeName],this.nodes[r.nodeName]=r,n||null},e.prototype.removeNamedItem=function(r){var n;return n=this.nodes[r],delete this.nodes[r],n||null},e.prototype.item=function(r){return this.nodes[Object.keys(this.nodes)[r]]||null},e.prototype.getNamedItemNS=function(r,n){throw new Error("This DOM method is not implemented.")},e.prototype.setNamedItemNS=function(r){throw new Error("This DOM method is not implemented.")},e.prototype.removeNamedItemNS=function(r,n){throw new Error("This DOM method is not implemented.")},e})()}).call(Aa)});var an=S((qa,ja)=>{"use strict";(function(){var t,e,r,n,i,o,s,a,u,d=function(E,y){for(var g in y)w.call(y,g)&&(E[g]=y[g]);function h(){this.constructor=E}return h.prototype=y.prototype,E.prototype=new h,E.__super__=y.prototype,E},w={}.hasOwnProperty;u=Pe(),a=u.isObject,s=u.isFunction,o=u.getValue,i=_e(),t=ne(),e=zi(),n=sn(),ja.exports=r=(function(E){d(y,E);function y(g,h,v){var I,R,D,m;if(y.__super__.constructor.call(this,g),h==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(h),this.type=t.Element,this.attribs={},this.schemaTypeInfo=null,v!=null&&this.attribute(v),g.type===t.Document&&(this.isRoot=!0,this.documentObject=g,g.rootObject=this,g.children)){for(m=g.children,R=0,D=m.length;R<D;R++)if(I=m[R],I.type===t.DocType){I.name=this.name;break}}}return Object.defineProperty(y.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(y.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(y.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(y.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(y.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(y.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(y.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(y.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new n(this.attribs)),this.attributeMap}}),y.prototype.clone=function(){var g,h,v,I;v=Object.create(this),v.isRoot&&(v.documentObject=null),v.attribs={},I=this.attribs;for(h in I)w.call(I,h)&&(g=I[h],v.attribs[h]=g.clone());return v.children=[],this.children.forEach(function(R){var D;return D=R.clone(),D.parent=v,v.children.push(D)}),v},y.prototype.attribute=function(g,h){var v,I;if(g!=null&&(g=o(g)),a(g))for(v in g)w.call(g,v)&&(I=g[v],this.attribute(v,I));else s(h)&&(h=h.apply()),this.options.keepNullAttributes&&h==null?this.attribs[g]=new e(this,g,""):h!=null&&(this.attribs[g]=new e(this,g,h));return this},y.prototype.removeAttribute=function(g){var h,v,I;if(g==null)throw new Error("Missing attribute name. "+this.debugInfo());if(g=o(g),Array.isArray(g))for(v=0,I=g.length;v<I;v++)h=g[v],delete this.attribs[h];else delete this.attribs[g];return this},y.prototype.toString=function(g){return this.options.writer.element(this,this.options.writer.filterOptions(g))},y.prototype.att=function(g,h){return this.attribute(g,h)},y.prototype.a=function(g,h){return this.attribute(g,h)},y.prototype.getAttribute=function(g){return this.attribs.hasOwnProperty(g)?this.attribs[g].value:null},y.prototype.setAttribute=function(g,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getAttributeNode=function(g){return this.attribs.hasOwnProperty(g)?this.attribs[g]:null},y.prototype.setAttributeNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.removeAttributeNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getAttributeNS=function(g,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setAttributeNS=function(g,h,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.removeAttributeNS=function(g,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getAttributeNodeNS=function(g,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setAttributeNodeNS=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagNameNS=function(g,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.hasAttribute=function(g){return this.attribs.hasOwnProperty(g)},y.prototype.hasAttributeNS=function(g,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setIdAttribute=function(g,h){return this.attribs.hasOwnProperty(g)?this.attribs[g].isId:h},y.prototype.setIdAttributeNS=function(g,h,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setIdAttributeNode=function(g,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagNameNS=function(g,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByClassName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.isEqualNode=function(g){var h,v,I;if(!y.__super__.isEqualNode.apply(this,arguments).isEqualNode(g)||g.namespaceURI!==this.namespaceURI||g.prefix!==this.prefix||g.localName!==this.localName||g.attribs.length!==this.attribs.length)return!1;for(h=v=0,I=this.attribs.length-1;0<=I?v<=I:v>=I;h=0<=I?++v:--v)if(!this.attribs[h].isEqualNode(g.attribs[h]))return!1;return!0},y})(i)}).call(qa)});var or=S((Fa,ka)=>{"use strict";(function(){var t,e,r=function(i,o){for(var s in o)n.call(o,s)&&(i[s]=o[s]);function a(){this.constructor=i}return a.prototype=o.prototype,i.prototype=new a,i.__super__=o.prototype,i},n={}.hasOwnProperty;e=_e(),ka.exports=t=(function(i){r(o,i);function o(s){o.__super__.constructor.call(this,s),this.value=""}return Object.defineProperty(o.prototype,"data",{get:function(){return this.value},set:function(s){return this.value=s||""}}),Object.defineProperty(o.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(o.prototype,"textContent",{get:function(){return this.value},set:function(s){return this.value=s||""}}),o.prototype.clone=function(){return Object.create(this)},o.prototype.substringData=function(s,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.appendData=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.insertData=function(s,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.deleteData=function(s,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.replaceData=function(s,a,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.isEqualNode=function(s){return!(!o.__super__.isEqualNode.apply(this,arguments).isEqualNode(s)||s.data!==this.data)},o})(e)}).call(Fa)});var un=S((Ba,$a)=>{"use strict";(function(){var t,e,r,n=function(o,s){for(var a in s)i.call(s,a)&&(o[a]=s[a]);function u(){this.constructor=o}return u.prototype=s.prototype,o.prototype=new u,o.__super__=s.prototype,o},i={}.hasOwnProperty;t=ne(),r=or(),$a.exports=e=(function(o){n(s,o);function s(a,u){if(s.__super__.constructor.call(this,a),u==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=t.CData,this.value=this.stringify.cdata(u)}return s.prototype.clone=function(){return Object.create(this)},s.prototype.toString=function(a){return this.options.writer.cdata(this,this.options.writer.filterOptions(a))},s})(r)}).call(Ba)});var ln=S((Ua,Va)=>{"use strict";(function(){var t,e,r,n=function(o,s){for(var a in s)i.call(s,a)&&(o[a]=s[a]);function u(){this.constructor=o}return u.prototype=s.prototype,o.prototype=new u,o.__super__=s.prototype,o},i={}.hasOwnProperty;t=ne(),e=or(),Va.exports=r=(function(o){n(s,o);function s(a,u){if(s.__super__.constructor.call(this,a),u==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=t.Comment,this.value=this.stringify.comment(u)}return s.prototype.clone=function(){return Object.create(this)},s.prototype.toString=function(a){return this.options.writer.comment(this,this.options.writer.filterOptions(a))},s})(e)}).call(Ua)});var fn=S((Ha,Wa)=>{"use strict";(function(){var t,e,r,n,i=function(s,a){for(var u in a)o.call(a,u)&&(s[u]=a[u]);function d(){this.constructor=s}return d.prototype=a.prototype,s.prototype=new d,s.__super__=a.prototype,s},o={}.hasOwnProperty;n=Pe().isObject,r=_e(),t=ne(),Wa.exports=e=(function(s){i(a,s);function a(u,d,w,E){var y;a.__super__.constructor.call(this,u),n(d)&&(y=d,d=y.version,w=y.encoding,E=y.standalone),d||(d="1.0"),this.type=t.Declaration,this.version=this.stringify.xmlVersion(d),w!=null&&(this.encoding=this.stringify.xmlEncoding(w)),E!=null&&(this.standalone=this.stringify.xmlStandalone(E))}return a.prototype.toString=function(u){return this.options.writer.declaration(this,this.options.writer.filterOptions(u))},a})(r)}).call(Ha)});var cn=S((Xa,Ga)=>{"use strict";(function(){var t,e,r,n=function(o,s){for(var a in s)i.call(s,a)&&(o[a]=s[a]);function u(){this.constructor=o}return u.prototype=s.prototype,o.prototype=new u,o.__super__=s.prototype,o},i={}.hasOwnProperty;r=_e(),t=ne(),Ga.exports=e=(function(o){n(s,o);function s(a,u,d,w,E,y){if(s.__super__.constructor.call(this,a),u==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(d==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(u));if(!w)throw new Error("Missing DTD attribute type. "+this.debugInfo(u));if(!E)throw new Error("Missing DTD attribute default. "+this.debugInfo(u));if(E.indexOf("#")!==0&&(E="#"+E),!E.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(u));if(y&&!E.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(u));this.elementName=this.stringify.name(u),this.type=t.AttributeDeclaration,this.attributeName=this.stringify.name(d),this.attributeType=this.stringify.dtdAttType(w),y&&(this.defaultValue=this.stringify.dtdAttDefault(y)),this.defaultValueType=E}return s.prototype.toString=function(a){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(a))},s})(r)}).call(Xa)});var hn=S((Ka,Ya)=>{"use strict";(function(){var t,e,r,n,i=function(s,a){for(var u in a)o.call(a,u)&&(s[u]=a[u]);function d(){this.constructor=s}return d.prototype=a.prototype,s.prototype=new d,s.__super__=a.prototype,s},o={}.hasOwnProperty;n=Pe().isObject,r=_e(),t=ne(),Ya.exports=e=(function(s){i(a,s);function a(u,d,w,E){if(a.__super__.constructor.call(this,u),w==null)throw new Error("Missing DTD entity name. "+this.debugInfo(w));if(E==null)throw new Error("Missing DTD entity value. "+this.debugInfo(w));if(this.pe=!!d,this.name=this.stringify.name(w),this.type=t.EntityDeclaration,!n(E))this.value=this.stringify.dtdEntityValue(E),this.internal=!0;else{if(!E.pubID&&!E.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(w));if(E.pubID&&!E.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(w));if(this.internal=!1,E.pubID!=null&&(this.pubID=this.stringify.dtdPubID(E.pubID)),E.sysID!=null&&(this.sysID=this.stringify.dtdSysID(E.sysID)),E.nData!=null&&(this.nData=this.stringify.dtdNData(E.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(w))}}return Object.defineProperty(a.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(a.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(a.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(a.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(a.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(a.prototype,"xmlVersion",{get:function(){return null}}),a.prototype.toString=function(u){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(u))},a})(r)}).call(Ka)});var dn=S((za,Ja)=>{"use strict";(function(){var t,e,r,n=function(o,s){for(var a in s)i.call(s,a)&&(o[a]=s[a]);function u(){this.constructor=o}return u.prototype=s.prototype,o.prototype=new u,o.__super__=s.prototype,o},i={}.hasOwnProperty;r=_e(),t=ne(),Ja.exports=e=(function(o){n(s,o);function s(a,u,d){if(s.__super__.constructor.call(this,a),u==null)throw new Error("Missing DTD element name. "+this.debugInfo());d||(d="(#PCDATA)"),Array.isArray(d)&&(d="("+d.join(",")+")"),this.name=this.stringify.name(u),this.type=t.ElementDeclaration,this.value=this.stringify.dtdElementValue(d)}return s.prototype.toString=function(a){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(a))},s})(r)}).call(za)});var pn=S((Qa,Za)=>{"use strict";(function(){var t,e,r,n=function(o,s){for(var a in s)i.call(s,a)&&(o[a]=s[a]);function u(){this.constructor=o}return u.prototype=s.prototype,o.prototype=new u,o.__super__=s.prototype,o},i={}.hasOwnProperty;r=_e(),t=ne(),Za.exports=e=(function(o){n(s,o);function s(a,u,d){if(s.__super__.constructor.call(this,a),u==null)throw new Error("Missing DTD notation name. "+this.debugInfo(u));if(!d.pubID&&!d.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(u));this.name=this.stringify.name(u),this.type=t.NotationDeclaration,d.pubID!=null&&(this.pubID=this.stringify.dtdPubID(d.pubID)),d.sysID!=null&&(this.sysID=this.stringify.dtdSysID(d.sysID))}return Object.defineProperty(s.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(s.prototype,"systemId",{get:function(){return this.sysID}}),s.prototype.toString=function(a){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(a))},s})(r)}).call(Qa)});var mn=S((eu,tu)=>{"use strict";(function(){var t,e,r,n,i,o,s,a,u,d=function(E,y){for(var g in y)w.call(y,g)&&(E[g]=y[g]);function h(){this.constructor=E}return h.prototype=y.prototype,E.prototype=new h,E.__super__=y.prototype,E},w={}.hasOwnProperty;u=Pe().isObject,a=_e(),t=ne(),e=cn(),n=hn(),r=dn(),i=pn(),s=sn(),tu.exports=o=(function(E){d(y,E);function y(g,h,v){var I,R,D,m,c,l;if(y.__super__.constructor.call(this,g),this.type=t.DocType,g.children){for(m=g.children,R=0,D=m.length;R<D;R++)if(I=m[R],I.type===t.Element){this.name=I.name;break}}this.documentObject=g,u(h)&&(c=h,h=c.pubID,v=c.sysID),v==null&&(l=[h,v],v=l[0],h=l[1]),h!=null&&(this.pubID=this.stringify.dtdPubID(h)),v!=null&&(this.sysID=this.stringify.dtdSysID(v))}return Object.defineProperty(y.prototype,"entities",{get:function(){var g,h,v,I,R;for(I={},R=this.children,h=0,v=R.length;h<v;h++)g=R[h],g.type===t.EntityDeclaration&&!g.pe&&(I[g.name]=g);return new s(I)}}),Object.defineProperty(y.prototype,"notations",{get:function(){var g,h,v,I,R;for(I={},R=this.children,h=0,v=R.length;h<v;h++)g=R[h],g.type===t.NotationDeclaration&&(I[g.name]=g);return new s(I)}}),Object.defineProperty(y.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(y.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(y.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),y.prototype.element=function(g,h){var v;return v=new r(this,g,h),this.children.push(v),this},y.prototype.attList=function(g,h,v,I,R){var D;return D=new e(this,g,h,v,I,R),this.children.push(D),this},y.prototype.entity=function(g,h){var v;return v=new n(this,!1,g,h),this.children.push(v),this},y.prototype.pEntity=function(g,h){var v;return v=new n(this,!0,g,h),this.children.push(v),this},y.prototype.notation=function(g,h){var v;return v=new i(this,g,h),this.children.push(v),this},y.prototype.toString=function(g){return this.options.writer.docType(this,this.options.writer.filterOptions(g))},y.prototype.ele=function(g,h){return this.element(g,h)},y.prototype.att=function(g,h,v,I,R){return this.attList(g,h,v,I,R)},y.prototype.ent=function(g,h){return this.entity(g,h)},y.prototype.pent=function(g,h){return this.pEntity(g,h)},y.prototype.not=function(g,h){return this.notation(g,h)},y.prototype.up=function(){return this.root()||this.documentObject},y.prototype.isEqualNode=function(g){return!(!y.__super__.isEqualNode.apply(this,arguments).isEqualNode(g)||g.name!==this.name||g.publicId!==this.publicId||g.systemId!==this.systemId)},y})(a)}).call(eu)});var gn=S((ru,nu)=>{"use strict";(function(){var t,e,r,n=function(o,s){for(var a in s)i.call(s,a)&&(o[a]=s[a]);function u(){this.constructor=o}return u.prototype=s.prototype,o.prototype=new u,o.__super__=s.prototype,o},i={}.hasOwnProperty;t=ne(),e=_e(),nu.exports=r=(function(o){n(s,o);function s(a,u){if(s.__super__.constructor.call(this,a),u==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=t.Raw,this.value=this.stringify.raw(u)}return s.prototype.clone=function(){return Object.create(this)},s.prototype.toString=function(a){return this.options.writer.raw(this,this.options.writer.filterOptions(a))},s})(e)}).call(ru)});var yn=S((iu,ou)=>{"use strict";(function(){var t,e,r,n=function(o,s){for(var a in s)i.call(s,a)&&(o[a]=s[a]);function u(){this.constructor=o}return u.prototype=s.prototype,o.prototype=new u,o.__super__=s.prototype,o},i={}.hasOwnProperty;t=ne(),e=or(),ou.exports=r=(function(o){n(s,o);function s(a,u){if(s.__super__.constructor.call(this,a),u==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=t.Text,this.value=this.stringify.text(u)}return Object.defineProperty(s.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(s.prototype,"wholeText",{get:function(){var a,u,d;for(d="",u=this.previousSibling;u;)d=u.data+d,u=u.previousSibling;for(d+=this.data,a=this.nextSibling;a;)d=d+a.data,a=a.nextSibling;return d}}),s.prototype.clone=function(){return Object.create(this)},s.prototype.toString=function(a){return this.options.writer.text(this,this.options.writer.filterOptions(a))},s.prototype.splitText=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.replaceWholeText=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},s})(e)}).call(iu)});var bn=S((su,au)=>{"use strict";(function(){var t,e,r,n=function(o,s){for(var a in s)i.call(s,a)&&(o[a]=s[a]);function u(){this.constructor=o}return u.prototype=s.prototype,o.prototype=new u,o.__super__=s.prototype,o},i={}.hasOwnProperty;t=ne(),e=or(),au.exports=r=(function(o){n(s,o);function s(a,u,d){if(s.__super__.constructor.call(this,a),u==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=t.ProcessingInstruction,this.target=this.stringify.insTarget(u),this.name=this.target,d&&(this.value=this.stringify.insValue(d))}return s.prototype.clone=function(){return Object.create(this)},s.prototype.toString=function(a){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(a))},s.prototype.isEqualNode=function(a){return!(!s.__super__.isEqualNode.apply(this,arguments).isEqualNode(a)||a.target!==this.target)},s})(e)}).call(su)});var Ji=S((uu,lu)=>{"use strict";(function(){var t,e,r,n=function(o,s){for(var a in s)i.call(s,a)&&(o[a]=s[a]);function u(){this.constructor=o}return u.prototype=s.prototype,o.prototype=new u,o.__super__=s.prototype,o},i={}.hasOwnProperty;r=_e(),t=ne(),lu.exports=e=(function(o){n(s,o);function s(a){s.__super__.constructor.call(this,a),this.type=t.Dummy}return s.prototype.clone=function(){return Object.create(this)},s.prototype.toString=function(a){return""},s})(r)}).call(uu)});var hu=S((fu,cu)=>{"use strict";(function(){var t;cu.exports=t=(function(){function e(r){this.nodes=r}return Object.defineProperty(e.prototype,"length",{get:function(){return this.nodes.length||0}}),e.prototype.clone=function(){return this.nodes=null},e.prototype.item=function(r){return this.nodes[r]||null},e})()}).call(fu)});var mu=S((du,pu)=>{"use strict";(function(){pu.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(du)});var _e=S((gu,yu)=>{"use strict";(function(){var t,e,r,n,i,o,s,a,u,d,w,E,y,g,h,v,I,R,D,m={}.hasOwnProperty;D=Pe(),R=D.isObject,I=D.isFunction,v=D.isEmpty,h=D.getValue,a=null,r=null,n=null,i=null,o=null,y=null,g=null,E=null,s=null,e=null,w=null,u=null,t=null,yu.exports=d=(function(){function c(l){this.parent=l,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,a||(a=an(),r=un(),n=ln(),i=fn(),o=mn(),y=gn(),g=yn(),E=bn(),s=Ji(),e=ne(),w=hu(),u=sn(),t=mu())}return Object.defineProperty(c.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(c.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(c.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(c.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(c.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new w(this.children)),this.childNodeList}}),Object.defineProperty(c.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(c.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(c.prototype,"previousSibling",{get:function(){var l;return l=this.parent.children.indexOf(this),this.parent.children[l-1]||null}}),Object.defineProperty(c.prototype,"nextSibling",{get:function(){var l;return l=this.parent.children.indexOf(this),this.parent.children[l+1]||null}}),Object.defineProperty(c.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(c.prototype,"textContent",{get:function(){var l,_,N,p,M;if(this.nodeType===e.Element||this.nodeType===e.DocumentFragment){for(M="",p=this.children,_=0,N=p.length;_<N;_++)l=p[_],l.textContent&&(M+=l.textContent);return M}else return null},set:function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),c.prototype.setParent=function(l){var _,N,p,M,T;for(this.parent=l,l&&(this.options=l.options,this.stringify=l.stringify),M=this.children,T=[],N=0,p=M.length;N<p;N++)_=M[N],T.push(_.setParent(this));return T},c.prototype.element=function(l,_,N){var p,M,T,P,A,C,B,U,x,q,F;if(C=null,_===null&&N==null&&(x=[{},null],_=x[0],N=x[1]),_==null&&(_={}),_=h(_),R(_)||(q=[_,N],N=q[0],_=q[1]),l!=null&&(l=h(l)),Array.isArray(l))for(T=0,B=l.length;T<B;T++)M=l[T],C=this.element(M);else if(I(l))C=this.element(l.apply());else if(R(l)){for(A in l)if(m.call(l,A))if(F=l[A],I(F)&&(F=F.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&A.indexOf(this.stringify.convertAttKey)===0)C=this.attribute(A.substr(this.stringify.convertAttKey.length),F);else if(!this.options.separateArrayItems&&Array.isArray(F)&&v(F))C=this.dummy();else if(R(F)&&v(F))C=this.element(A);else if(!this.options.keepNullNodes&&F==null)C=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(F))for(P=0,U=F.length;P<U;P++)M=F[P],p={},p[A]=M,C=this.element(p);else R(F)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&A.indexOf(this.stringify.convertTextKey)===0?C=this.element(F):(C=this.element(A),C.element(F)):C=this.element(A,F)}else!this.options.keepNullNodes&&N===null?C=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&l.indexOf(this.stringify.convertTextKey)===0?C=this.text(N):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&l.indexOf(this.stringify.convertCDataKey)===0?C=this.cdata(N):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&l.indexOf(this.stringify.convertCommentKey)===0?C=this.comment(N):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&l.indexOf(this.stringify.convertRawKey)===0?C=this.raw(N):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&l.indexOf(this.stringify.convertPIKey)===0?C=this.instruction(l.substr(this.stringify.convertPIKey.length),N):C=this.node(l,_,N);if(C==null)throw new Error("Could not create any elements with: "+l+". "+this.debugInfo());return C},c.prototype.insertBefore=function(l,_,N){var p,M,T,P,A;if(l?.type)return T=l,P=_,T.setParent(this),P?(M=children.indexOf(P),A=children.splice(M),children.push(T),Array.prototype.push.apply(children,A)):children.push(T),T;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(l));return M=this.parent.children.indexOf(this),A=this.parent.children.splice(M),p=this.parent.element(l,_,N),Array.prototype.push.apply(this.parent.children,A),p},c.prototype.insertAfter=function(l,_,N){var p,M,T;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(l));return M=this.parent.children.indexOf(this),T=this.parent.children.splice(M+1),p=this.parent.element(l,_,N),Array.prototype.push.apply(this.parent.children,T),p},c.prototype.remove=function(){var l,_;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return l=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[l,l-l+1].concat(_=[])),this.parent},c.prototype.node=function(l,_,N){var p,M;return l!=null&&(l=h(l)),_||(_={}),_=h(_),R(_)||(M=[_,N],N=M[0],_=M[1]),p=new a(this,l,_),N!=null&&p.text(N),this.children.push(p),p},c.prototype.text=function(l){var _;return R(l)&&this.element(l),_=new g(this,l),this.children.push(_),this},c.prototype.cdata=function(l){var _;return _=new r(this,l),this.children.push(_),this},c.prototype.comment=function(l){var _;return _=new n(this,l),this.children.push(_),this},c.prototype.commentBefore=function(l){var _,N,p;return N=this.parent.children.indexOf(this),p=this.parent.children.splice(N),_=this.parent.comment(l),Array.prototype.push.apply(this.parent.children,p),this},c.prototype.commentAfter=function(l){var _,N,p;return N=this.parent.children.indexOf(this),p=this.parent.children.splice(N+1),_=this.parent.comment(l),Array.prototype.push.apply(this.parent.children,p),this},c.prototype.raw=function(l){var _;return _=new y(this,l),this.children.push(_),this},c.prototype.dummy=function(){var l;return l=new s(this),l},c.prototype.instruction=function(l,_){var N,p,M,T,P;if(l!=null&&(l=h(l)),_!=null&&(_=h(_)),Array.isArray(l))for(T=0,P=l.length;T<P;T++)N=l[T],this.instruction(N);else if(R(l))for(N in l)m.call(l,N)&&(p=l[N],this.instruction(N,p));else I(_)&&(_=_.apply()),M=new E(this,l,_),this.children.push(M);return this},c.prototype.instructionBefore=function(l,_){var N,p,M;return p=this.parent.children.indexOf(this),M=this.parent.children.splice(p),N=this.parent.instruction(l,_),Array.prototype.push.apply(this.parent.children,M),this},c.prototype.instructionAfter=function(l,_){var N,p,M;return p=this.parent.children.indexOf(this),M=this.parent.children.splice(p+1),N=this.parent.instruction(l,_),Array.prototype.push.apply(this.parent.children,M),this},c.prototype.declaration=function(l,_,N){var p,M;return p=this.document(),M=new i(p,l,_,N),p.children.length===0?p.children.unshift(M):p.children[0].type===e.Declaration?p.children[0]=M:p.children.unshift(M),p.root()||p},c.prototype.dtd=function(l,_){var N,p,M,T,P,A,C,B,U,x;for(p=this.document(),M=new o(p,l,_),U=p.children,T=P=0,C=U.length;P<C;T=++P)if(N=U[T],N.type===e.DocType)return p.children[T]=M,M;for(x=p.children,T=A=0,B=x.length;A<B;T=++A)if(N=x[T],N.isRoot)return p.children.splice(T,0,M),M;return p.children.push(M),M},c.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},c.prototype.root=function(){var l;for(l=this;l;){if(l.type===e.Document)return l.rootObject;if(l.isRoot)return l;l=l.parent}},c.prototype.document=function(){var l;for(l=this;l;){if(l.type===e.Document)return l;l=l.parent}},c.prototype.end=function(l){return this.document().end(l)},c.prototype.prev=function(){var l;if(l=this.parent.children.indexOf(this),l<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[l-1]},c.prototype.next=function(){var l;if(l=this.parent.children.indexOf(this),l===-1||l===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[l+1]},c.prototype.importDocument=function(l){var _;return _=l.root().clone(),_.parent=this,_.isRoot=!1,this.children.push(_),this},c.prototype.debugInfo=function(l){var _,N;return l=l||this.name,l==null&&!((_=this.parent)!=null&&_.name)?"":l==null?"parent: <"+this.parent.name+">":(N=this.parent)!=null&&N.name?"node: <"+l+">, parent: <"+this.parent.name+">":"node: <"+l+">"},c.prototype.ele=function(l,_,N){return this.element(l,_,N)},c.prototype.nod=function(l,_,N){return this.node(l,_,N)},c.prototype.txt=function(l){return this.text(l)},c.prototype.dat=function(l){return this.cdata(l)},c.prototype.com=function(l){return this.comment(l)},c.prototype.ins=function(l,_){return this.instruction(l,_)},c.prototype.doc=function(){return this.document()},c.prototype.dec=function(l,_,N){return this.declaration(l,_,N)},c.prototype.e=function(l,_,N){return this.element(l,_,N)},c.prototype.n=function(l,_,N){return this.node(l,_,N)},c.prototype.t=function(l){return this.text(l)},c.prototype.d=function(l){return this.cdata(l)},c.prototype.c=function(l){return this.comment(l)},c.prototype.r=function(l){return this.raw(l)},c.prototype.i=function(l,_){return this.instruction(l,_)},c.prototype.u=function(){return this.up()},c.prototype.importXMLBuilder=function(l){return this.importDocument(l)},c.prototype.replaceChild=function(l,_){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.removeChild=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.appendChild=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.hasChildNodes=function(){return this.children.length!==0},c.prototype.cloneNode=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.isSupported=function(l,_){return!0},c.prototype.hasAttributes=function(){return this.attribs.length!==0},c.prototype.compareDocumentPosition=function(l){var _,N;return _=this,_===l?0:this.document()!==l.document()?(N=t.Disconnected|t.ImplementationSpecific,Math.random()<.5?N|=t.Preceding:N|=t.Following,N):_.isAncestor(l)?t.Contains|t.Preceding:_.isDescendant(l)?t.Contains|t.Following:_.isPreceding(l)?t.Preceding:t.Following},c.prototype.isSameNode=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.lookupPrefix=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.isDefaultNamespace=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.lookupNamespaceURI=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.isEqualNode=function(l){var _,N,p;if(l.nodeType!==this.nodeType||l.children.length!==this.children.length)return!1;for(_=N=0,p=this.children.length-1;0<=p?N<=p:N>=p;_=0<=p?++N:--N)if(!this.children[_].isEqualNode(l.children[_]))return!1;return!0},c.prototype.getFeature=function(l,_){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.setUserData=function(l,_,N){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getUserData=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.contains=function(l){return l?l===this||this.isDescendant(l):!1},c.prototype.isDescendant=function(l){var _,N,p,M,T;for(T=this.children,p=0,M=T.length;p<M;p++)if(_=T[p],l===_||(N=_.isDescendant(l),N))return!0;return!1},c.prototype.isAncestor=function(l){return l.isDescendant(this)},c.prototype.isPreceding=function(l){var _,N;return _=this.treePosition(l),N=this.treePosition(this),_===-1||N===-1?!1:_<N},c.prototype.isFollowing=function(l){var _,N;return _=this.treePosition(l),N=this.treePosition(this),_===-1||N===-1?!1:_>N},c.prototype.treePosition=function(l){var _,N;return N=0,_=!1,this.foreachTreeNode(this.document(),function(p){if(N++,!_&&p===l)return _=!0}),_?N:-1},c.prototype.foreachTreeNode=function(l,_){var N,p,M,T,P;for(l||(l=this.document()),T=l.children,p=0,M=T.length;p<M;p++){if(N=T[p],P=_(N))return P;if(P=this.foreachTreeNode(N,_),P)return P}},c})()}).call(gu)});var Qi=S((bu,wu)=>{"use strict";(function(){var t,e=function(n,i){return function(){return n.apply(i,arguments)}},r={}.hasOwnProperty;wu.exports=t=(function(){function n(i){this.assertLegalName=e(this.assertLegalName,this),this.assertLegalChar=e(this.assertLegalChar,this);var o,s,a;i||(i={}),this.options=i,this.options.version||(this.options.version="1.0"),s=i.stringify||{};for(o in s)r.call(s,o)&&(a=s[o],this[o]=a)}return n.prototype.name=function(i){return this.options.noValidation?i:this.assertLegalName(""+i||"")},n.prototype.text=function(i){return this.options.noValidation?i:this.assertLegalChar(this.textEscape(""+i||""))},n.prototype.cdata=function(i){return this.options.noValidation?i:(i=""+i||"",i=i.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(i))},n.prototype.comment=function(i){if(this.options.noValidation)return i;if(i=""+i||"",i.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+i);return this.assertLegalChar(i)},n.prototype.raw=function(i){return this.options.noValidation?i:""+i||""},n.prototype.attValue=function(i){return this.options.noValidation?i:this.assertLegalChar(this.attEscape(i=""+i||""))},n.prototype.insTarget=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.insValue=function(i){if(this.options.noValidation)return i;if(i=""+i||"",i.match(/\?>/))throw new Error("Invalid processing instruction value: "+i);return this.assertLegalChar(i)},n.prototype.xmlVersion=function(i){if(this.options.noValidation)return i;if(i=""+i||"",!i.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+i);return i},n.prototype.xmlEncoding=function(i){if(this.options.noValidation)return i;if(i=""+i||"",!i.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+i);return this.assertLegalChar(i)},n.prototype.xmlStandalone=function(i){return this.options.noValidation?i:i?"yes":"no"},n.prototype.dtdPubID=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.dtdSysID=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.dtdElementValue=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.dtdAttType=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.dtdAttDefault=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.dtdEntityValue=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.dtdNData=function(i){return this.options.noValidation?i:this.assertLegalChar(""+i||"")},n.prototype.convertAttKey="@",n.prototype.convertPIKey="?",n.prototype.convertTextKey="#text",n.prototype.convertCDataKey="#cdata",n.prototype.convertCommentKey="#comment",n.prototype.convertRawKey="#raw",n.prototype.assertLegalChar=function(i){var o,s;if(this.options.noValidation)return i;if(o="",this.options.version==="1.0"){if(o=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,s=i.match(o))throw new Error("Invalid character in string: "+i+" at index "+s.index)}else if(this.options.version==="1.1"&&(o=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,s=i.match(o)))throw new Error("Invalid character in string: "+i+" at index "+s.index);return i},n.prototype.assertLegalName=function(i){var o;if(this.options.noValidation)return i;if(this.assertLegalChar(i),o=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!i.match(o))throw new Error("Invalid character in name");return i},n.prototype.textEscape=function(i){var o;return this.options.noValidation?i:(o=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,i.replace(o,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},n.prototype.attEscape=function(i){var o;return this.options.noValidation?i:(o=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,i.replace(o,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},n})()}).call(bu)});var sr=S((_u,vu)=>{"use strict";(function(){vu.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(_u)});var Zi=S((Eu,Su)=>{"use strict";(function(){var t,e,r,n,i,o,s,a,u,d,w,E,y,g,h,v,I,R={}.hasOwnProperty;I=Pe().assign,t=ne(),u=fn(),d=mn(),r=un(),n=ln(),E=an(),g=gn(),h=yn(),y=bn(),w=Ji(),i=cn(),o=dn(),s=hn(),a=pn(),e=sr(),Su.exports=v=(function(){function D(m){var c,l,_;m||(m={}),this.options=m,l=m.writer||{};for(c in l)R.call(l,c)&&(_=l[c],this["_"+c]=this[c],this[c]=_)}return D.prototype.filterOptions=function(m){var c,l,_,N,p,M,T,P;return m||(m={}),m=I({},this.options,m),c={writer:this},c.pretty=m.pretty||!1,c.allowEmpty=m.allowEmpty||!1,c.indent=(l=m.indent)!=null?l:" ",c.newline=(_=m.newline)!=null?_:`
|
|
3
|
+
`,c.offset=(N=m.offset)!=null?N:0,c.dontPrettyTextNodes=(p=(M=m.dontPrettyTextNodes)!=null?M:m.dontprettytextnodes)!=null?p:0,c.spaceBeforeSlash=(T=(P=m.spaceBeforeSlash)!=null?P:m.spacebeforeslash)!=null?T:"",c.spaceBeforeSlash===!0&&(c.spaceBeforeSlash=" "),c.suppressPrettyCount=0,c.user={},c.state=e.None,c},D.prototype.indent=function(m,c,l){var _;return!c.pretty||c.suppressPrettyCount?"":c.pretty&&(_=(l||0)+c.offset+1,_>0)?new Array(_).join(c.indent):""},D.prototype.endline=function(m,c,l){return!c.pretty||c.suppressPrettyCount?"":c.newline},D.prototype.attribute=function(m,c,l){var _;return this.openAttribute(m,c,l),_=" "+m.name+'="'+m.value+'"',this.closeAttribute(m,c,l),_},D.prototype.cdata=function(m,c,l){var _;return this.openNode(m,c,l),c.state=e.OpenTag,_=this.indent(m,c,l)+"<![CDATA[",c.state=e.InsideTag,_+=m.value,c.state=e.CloseTag,_+="]]>"+this.endline(m,c,l),c.state=e.None,this.closeNode(m,c,l),_},D.prototype.comment=function(m,c,l){var _;return this.openNode(m,c,l),c.state=e.OpenTag,_=this.indent(m,c,l)+"<!-- ",c.state=e.InsideTag,_+=m.value,c.state=e.CloseTag,_+=" -->"+this.endline(m,c,l),c.state=e.None,this.closeNode(m,c,l),_},D.prototype.declaration=function(m,c,l){var _;return this.openNode(m,c,l),c.state=e.OpenTag,_=this.indent(m,c,l)+"<?xml",c.state=e.InsideTag,_+=' version="'+m.version+'"',m.encoding!=null&&(_+=' encoding="'+m.encoding+'"'),m.standalone!=null&&(_+=' standalone="'+m.standalone+'"'),c.state=e.CloseTag,_+=c.spaceBeforeSlash+"?>",_+=this.endline(m,c,l),c.state=e.None,this.closeNode(m,c,l),_},D.prototype.docType=function(m,c,l){var _,N,p,M,T;if(l||(l=0),this.openNode(m,c,l),c.state=e.OpenTag,M=this.indent(m,c,l),M+="<!DOCTYPE "+m.root().name,m.pubID&&m.sysID?M+=' PUBLIC "'+m.pubID+'" "'+m.sysID+'"':m.sysID&&(M+=' SYSTEM "'+m.sysID+'"'),m.children.length>0){for(M+=" [",M+=this.endline(m,c,l),c.state=e.InsideTag,T=m.children,N=0,p=T.length;N<p;N++)_=T[N],M+=this.writeChildNode(_,c,l+1);c.state=e.CloseTag,M+="]"}return c.state=e.CloseTag,M+=c.spaceBeforeSlash+">",M+=this.endline(m,c,l),c.state=e.None,this.closeNode(m,c,l),M},D.prototype.element=function(m,c,l){var _,N,p,M,T,P,A,C,B,U,x,q,F,Q;l||(l=0),U=!1,x="",this.openNode(m,c,l),c.state=e.OpenTag,x+=this.indent(m,c,l)+"<"+m.name,q=m.attribs;for(B in q)R.call(q,B)&&(_=q[B],x+=this.attribute(_,c,l));if(p=m.children.length,M=p===0?null:m.children[0],p===0||m.children.every(function(k){return(k.type===t.Text||k.type===t.Raw)&&k.value===""}))c.allowEmpty?(x+=">",c.state=e.CloseTag,x+="</"+m.name+">"+this.endline(m,c,l)):(c.state=e.CloseTag,x+=c.spaceBeforeSlash+"/>"+this.endline(m,c,l));else if(c.pretty&&p===1&&(M.type===t.Text||M.type===t.Raw)&&M.value!=null)x+=">",c.state=e.InsideTag,c.suppressPrettyCount++,U=!0,x+=this.writeChildNode(M,c,l+1),c.suppressPrettyCount--,U=!1,c.state=e.CloseTag,x+="</"+m.name+">"+this.endline(m,c,l);else{if(c.dontPrettyTextNodes){for(F=m.children,T=0,A=F.length;T<A;T++)if(N=F[T],(N.type===t.Text||N.type===t.Raw)&&N.value!=null){c.suppressPrettyCount++,U=!0;break}}for(x+=">"+this.endline(m,c,l),c.state=e.InsideTag,Q=m.children,P=0,C=Q.length;P<C;P++)N=Q[P],x+=this.writeChildNode(N,c,l+1);c.state=e.CloseTag,x+=this.indent(m,c,l)+"</"+m.name+">",U&&c.suppressPrettyCount--,x+=this.endline(m,c,l),c.state=e.None}return this.closeNode(m,c,l),x},D.prototype.writeChildNode=function(m,c,l){switch(m.type){case t.CData:return this.cdata(m,c,l);case t.Comment:return this.comment(m,c,l);case t.Element:return this.element(m,c,l);case t.Raw:return this.raw(m,c,l);case t.Text:return this.text(m,c,l);case t.ProcessingInstruction:return this.processingInstruction(m,c,l);case t.Dummy:return"";case t.Declaration:return this.declaration(m,c,l);case t.DocType:return this.docType(m,c,l);case t.AttributeDeclaration:return this.dtdAttList(m,c,l);case t.ElementDeclaration:return this.dtdElement(m,c,l);case t.EntityDeclaration:return this.dtdEntity(m,c,l);case t.NotationDeclaration:return this.dtdNotation(m,c,l);default:throw new Error("Unknown XML node type: "+m.constructor.name)}},D.prototype.processingInstruction=function(m,c,l){var _;return this.openNode(m,c,l),c.state=e.OpenTag,_=this.indent(m,c,l)+"<?",c.state=e.InsideTag,_+=m.target,m.value&&(_+=" "+m.value),c.state=e.CloseTag,_+=c.spaceBeforeSlash+"?>",_+=this.endline(m,c,l),c.state=e.None,this.closeNode(m,c,l),_},D.prototype.raw=function(m,c,l){var _;return this.openNode(m,c,l),c.state=e.OpenTag,_=this.indent(m,c,l),c.state=e.InsideTag,_+=m.value,c.state=e.CloseTag,_+=this.endline(m,c,l),c.state=e.None,this.closeNode(m,c,l),_},D.prototype.text=function(m,c,l){var _;return this.openNode(m,c,l),c.state=e.OpenTag,_=this.indent(m,c,l),c.state=e.InsideTag,_+=m.value,c.state=e.CloseTag,_+=this.endline(m,c,l),c.state=e.None,this.closeNode(m,c,l),_},D.prototype.dtdAttList=function(m,c,l){var _;return this.openNode(m,c,l),c.state=e.OpenTag,_=this.indent(m,c,l)+"<!ATTLIST",c.state=e.InsideTag,_+=" "+m.elementName+" "+m.attributeName+" "+m.attributeType,m.defaultValueType!=="#DEFAULT"&&(_+=" "+m.defaultValueType),m.defaultValue&&(_+=' "'+m.defaultValue+'"'),c.state=e.CloseTag,_+=c.spaceBeforeSlash+">"+this.endline(m,c,l),c.state=e.None,this.closeNode(m,c,l),_},D.prototype.dtdElement=function(m,c,l){var _;return this.openNode(m,c,l),c.state=e.OpenTag,_=this.indent(m,c,l)+"<!ELEMENT",c.state=e.InsideTag,_+=" "+m.name+" "+m.value,c.state=e.CloseTag,_+=c.spaceBeforeSlash+">"+this.endline(m,c,l),c.state=e.None,this.closeNode(m,c,l),_},D.prototype.dtdEntity=function(m,c,l){var _;return this.openNode(m,c,l),c.state=e.OpenTag,_=this.indent(m,c,l)+"<!ENTITY",c.state=e.InsideTag,m.pe&&(_+=" %"),_+=" "+m.name,m.value?_+=' "'+m.value+'"':(m.pubID&&m.sysID?_+=' PUBLIC "'+m.pubID+'" "'+m.sysID+'"':m.sysID&&(_+=' SYSTEM "'+m.sysID+'"'),m.nData&&(_+=" NDATA "+m.nData)),c.state=e.CloseTag,_+=c.spaceBeforeSlash+">"+this.endline(m,c,l),c.state=e.None,this.closeNode(m,c,l),_},D.prototype.dtdNotation=function(m,c,l){var _;return this.openNode(m,c,l),c.state=e.OpenTag,_=this.indent(m,c,l)+"<!NOTATION",c.state=e.InsideTag,_+=" "+m.name,m.pubID&&m.sysID?_+=' PUBLIC "'+m.pubID+'" "'+m.sysID+'"':m.pubID?_+=' PUBLIC "'+m.pubID+'"':m.sysID&&(_+=' SYSTEM "'+m.sysID+'"'),c.state=e.CloseTag,_+=c.spaceBeforeSlash+">"+this.endline(m,c,l),c.state=e.None,this.closeNode(m,c,l),_},D.prototype.openNode=function(m,c,l){},D.prototype.closeNode=function(m,c,l){},D.prototype.openAttribute=function(m,c,l){},D.prototype.closeAttribute=function(m,c,l){},D})()}).call(Eu)});var wn=S((Tu,Ou)=>{"use strict";(function(){var t,e,r=function(i,o){for(var s in o)n.call(o,s)&&(i[s]=o[s]);function a(){this.constructor=i}return a.prototype=o.prototype,i.prototype=new a,i.__super__=o.prototype,i},n={}.hasOwnProperty;e=Zi(),Ou.exports=t=(function(i){r(o,i);function o(s){o.__super__.constructor.call(this,s)}return o.prototype.document=function(s,a){var u,d,w,E,y;for(a=this.filterOptions(a),E="",y=s.children,d=0,w=y.length;d<w;d++)u=y[d],E+=this.writeChildNode(u,a,0);return a.pretty&&E.slice(-a.newline.length)===a.newline&&(E=E.slice(0,-a.newline.length)),E},o})(e)}).call(Tu)});var eo=S((Du,xu)=>{"use strict";(function(){var t,e,r,n,i,o,s,a,u=function(w,E){for(var y in E)d.call(E,y)&&(w[y]=E[y]);function g(){this.constructor=w}return g.prototype=E.prototype,w.prototype=new g,w.__super__=E.prototype,w},d={}.hasOwnProperty;a=Pe().isPlainObject,r=Yi(),e=Ma(),i=_e(),t=ne(),s=Qi(),o=wn(),xu.exports=n=(function(w){u(E,w);function E(y){E.__super__.constructor.call(this,null),this.name="#document",this.type=t.Document,this.documentURI=null,this.domConfig=new e,y||(y={}),y.writer||(y.writer=new o),this.options=y,this.stringify=new s(y)}return Object.defineProperty(E.prototype,"implementation",{value:new r}),Object.defineProperty(E.prototype,"doctype",{get:function(){var y,g,h,v;for(v=this.children,g=0,h=v.length;g<h;g++)if(y=v[g],y.type===t.DocType)return y;return null}}),Object.defineProperty(E.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(E.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(E.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(E.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===t.Declaration?this.children[0].encoding:null}}),Object.defineProperty(E.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===t.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(E.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===t.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(E.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(E.prototype,"origin",{get:function(){return null}}),Object.defineProperty(E.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(E.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(E.prototype,"contentType",{get:function(){return null}}),E.prototype.end=function(y){var g;return g={},y?a(y)&&(g=y,y=this.options.writer):y=this.options.writer,y.document(this,y.filterOptions(g))},E.prototype.toString=function(y){return this.options.writer.document(this,this.options.writer.filterOptions(y))},E.prototype.createElement=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createTextNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createComment=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createCDATASection=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createProcessingInstruction=function(y,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createAttribute=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createEntityReference=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByTagName=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.importNode=function(y,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createElementNS=function(y,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createAttributeNS=function(y,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByTagNameNS=function(y,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementById=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.adoptNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.renameNode=function(y,g,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByClassName=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createEvent=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createNodeIterator=function(y,g,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createTreeWalker=function(y,g,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},E})(i)}).call(Du)});var Nu=S((Pu,Mu)=>{"use strict";(function(){var t,e,r,n,i,o,s,a,u,d,w,E,y,g,h,v,I,R,D,m,c,l,_,N,p={}.hasOwnProperty;N=Pe(),l=N.isObject,c=N.isFunction,_=N.isPlainObject,m=N.getValue,t=ne(),E=eo(),g=an(),n=un(),i=ln(),v=gn(),D=yn(),h=bn(),d=fn(),w=mn(),o=cn(),a=hn(),s=dn(),u=pn(),r=zi(),R=Qi(),I=wn(),e=sr(),Mu.exports=y=(function(){function M(T,P,A){var C;this.name="?xml",this.type=t.Document,T||(T={}),C={},T.writer?_(T.writer)&&(C=T.writer,T.writer=new I):T.writer=new I,this.options=T,this.writer=T.writer,this.writerOptions=this.writer.filterOptions(C),this.stringify=new R(T),this.onDataCallback=P||function(){},this.onEndCallback=A||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return M.prototype.createChildNode=function(T){var P,A,C,B,U,x,q,F;switch(T.type){case t.CData:this.cdata(T.value);break;case t.Comment:this.comment(T.value);break;case t.Element:C={},q=T.attribs;for(A in q)p.call(q,A)&&(P=q[A],C[A]=P.value);this.node(T.name,C);break;case t.Dummy:this.dummy();break;case t.Raw:this.raw(T.value);break;case t.Text:this.text(T.value);break;case t.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(F=T.children,U=0,x=F.length;U<x;U++)B=F[U],this.createChildNode(B),B.type===t.Element&&this.up();return this},M.prototype.dummy=function(){return this},M.prototype.node=function(T,P,A){var C;if(T==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(T));return this.openCurrent(),T=m(T),P==null&&(P={}),P=m(P),l(P)||(C=[P,A],A=C[0],P=C[1]),this.currentNode=new g(this,T,P),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,A!=null&&this.text(A),this},M.prototype.element=function(T,P,A){var C,B,U,x,q,F;if(this.currentNode&&this.currentNode.type===t.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(T)||l(T)||c(T))for(x=this.options.noValidation,this.options.noValidation=!0,F=new E(this.options).element("TEMP_ROOT"),F.element(T),this.options.noValidation=x,q=F.children,B=0,U=q.length;B<U;B++)C=q[B],this.createChildNode(C),C.type===t.Element&&this.up();else this.node(T,P,A);return this},M.prototype.attribute=function(T,P){var A,C;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(T!=null&&(T=m(T)),l(T))for(A in T)p.call(T,A)&&(C=T[A],this.attribute(A,C));else c(P)&&(P=P.apply()),this.options.keepNullAttributes&&P==null?this.currentNode.attribs[T]=new r(this,T,""):P!=null&&(this.currentNode.attribs[T]=new r(this,T,P));return this},M.prototype.text=function(T){var P;return this.openCurrent(),P=new D(this,T),this.onData(this.writer.text(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.prototype.cdata=function(T){var P;return this.openCurrent(),P=new n(this,T),this.onData(this.writer.cdata(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.prototype.comment=function(T){var P;return this.openCurrent(),P=new i(this,T),this.onData(this.writer.comment(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.prototype.raw=function(T){var P;return this.openCurrent(),P=new v(this,T),this.onData(this.writer.raw(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.prototype.instruction=function(T,P){var A,C,B,U,x;if(this.openCurrent(),T!=null&&(T=m(T)),P!=null&&(P=m(P)),Array.isArray(T))for(A=0,U=T.length;A<U;A++)C=T[A],this.instruction(C);else if(l(T))for(C in T)p.call(T,C)&&(B=T[C],this.instruction(C,B));else c(P)&&(P=P.apply()),x=new h(this,T,P),this.onData(this.writer.processingInstruction(x,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},M.prototype.declaration=function(T,P,A){var C;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return C=new d(this,T,P,A),this.onData(this.writer.declaration(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.prototype.doctype=function(T,P,A){if(this.openCurrent(),T==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new w(this,P,A),this.currentNode.rootNodeName=T,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},M.prototype.dtdElement=function(T,P){var A;return this.openCurrent(),A=new s(this,T,P),this.onData(this.writer.dtdElement(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.prototype.attList=function(T,P,A,C,B){var U;return this.openCurrent(),U=new o(this,T,P,A,C,B),this.onData(this.writer.dtdAttList(U,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.prototype.entity=function(T,P){var A;return this.openCurrent(),A=new a(this,!1,T,P),this.onData(this.writer.dtdEntity(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.prototype.pEntity=function(T,P){var A;return this.openCurrent(),A=new a(this,!0,T,P),this.onData(this.writer.dtdEntity(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.prototype.notation=function(T,P){var A;return this.openCurrent(),A=new u(this,T,P),this.onData(this.writer.dtdNotation(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},M.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},M.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},M.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},M.prototype.openNode=function(T){var P,A,C,B;if(!T.isOpen){if(!this.root&&this.currentLevel===0&&T.type===t.Element&&(this.root=T),A="",T.type===t.Element){this.writerOptions.state=e.OpenTag,A=this.writer.indent(T,this.writerOptions,this.currentLevel)+"<"+T.name,B=T.attribs;for(C in B)p.call(B,C)&&(P=B[C],A+=this.writer.attribute(P,this.writerOptions,this.currentLevel));A+=(T.children?">":"/>")+this.writer.endline(T,this.writerOptions,this.currentLevel),this.writerOptions.state=e.InsideTag}else this.writerOptions.state=e.OpenTag,A=this.writer.indent(T,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+T.rootNodeName,T.pubID&&T.sysID?A+=' PUBLIC "'+T.pubID+'" "'+T.sysID+'"':T.sysID&&(A+=' SYSTEM "'+T.sysID+'"'),T.children?(A+=" [",this.writerOptions.state=e.InsideTag):(this.writerOptions.state=e.CloseTag,A+=">"),A+=this.writer.endline(T,this.writerOptions,this.currentLevel);return this.onData(A,this.currentLevel),T.isOpen=!0}},M.prototype.closeNode=function(T){var P;if(!T.isClosed)return P="",this.writerOptions.state=e.CloseTag,T.type===t.Element?P=this.writer.indent(T,this.writerOptions,this.currentLevel)+"</"+T.name+">"+this.writer.endline(T,this.writerOptions,this.currentLevel):P=this.writer.indent(T,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(T,this.writerOptions,this.currentLevel),this.writerOptions.state=e.None,this.onData(P,this.currentLevel),T.isClosed=!0},M.prototype.onData=function(T,P){return this.documentStarted=!0,this.onDataCallback(T,P+1)},M.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},M.prototype.debugInfo=function(T){return T==null?"":"node: <"+T+">"},M.prototype.ele=function(){return this.element.apply(this,arguments)},M.prototype.nod=function(T,P,A){return this.node(T,P,A)},M.prototype.txt=function(T){return this.text(T)},M.prototype.dat=function(T){return this.cdata(T)},M.prototype.com=function(T){return this.comment(T)},M.prototype.ins=function(T,P){return this.instruction(T,P)},M.prototype.dec=function(T,P,A){return this.declaration(T,P,A)},M.prototype.dtd=function(T,P,A){return this.doctype(T,P,A)},M.prototype.e=function(T,P,A){return this.element(T,P,A)},M.prototype.n=function(T,P,A){return this.node(T,P,A)},M.prototype.t=function(T){return this.text(T)},M.prototype.d=function(T){return this.cdata(T)},M.prototype.c=function(T){return this.comment(T)},M.prototype.r=function(T){return this.raw(T)},M.prototype.i=function(T,P){return this.instruction(T,P)},M.prototype.att=function(){return this.currentNode&&this.currentNode.type===t.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},M.prototype.a=function(){return this.currentNode&&this.currentNode.type===t.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},M.prototype.ent=function(T,P){return this.entity(T,P)},M.prototype.pent=function(T,P){return this.pEntity(T,P)},M.prototype.not=function(T,P){return this.notation(T,P)},M})()}).call(Pu)});var Lu=S((Ru,Iu)=>{"use strict";(function(){var t,e,r,n,i=function(s,a){for(var u in a)o.call(a,u)&&(s[u]=a[u]);function d(){this.constructor=s}return d.prototype=a.prototype,s.prototype=new d,s.__super__=a.prototype,s},o={}.hasOwnProperty;t=ne(),n=Zi(),e=sr(),Iu.exports=r=(function(s){i(a,s);function a(u,d){this.stream=u,a.__super__.constructor.call(this,d)}return a.prototype.endline=function(u,d,w){return u.isLastRootNode&&d.state===e.CloseTag?"":a.__super__.endline.call(this,u,d,w)},a.prototype.document=function(u,d){var w,E,y,g,h,v,I,R,D;for(I=u.children,E=y=0,h=I.length;y<h;E=++y)w=I[E],w.isLastRootNode=E===u.children.length-1;for(d=this.filterOptions(d),R=u.children,D=[],g=0,v=R.length;g<v;g++)w=R[g],D.push(this.writeChildNode(w,d,0));return D},a.prototype.attribute=function(u,d,w){return this.stream.write(a.__super__.attribute.call(this,u,d,w))},a.prototype.cdata=function(u,d,w){return this.stream.write(a.__super__.cdata.call(this,u,d,w))},a.prototype.comment=function(u,d,w){return this.stream.write(a.__super__.comment.call(this,u,d,w))},a.prototype.declaration=function(u,d,w){return this.stream.write(a.__super__.declaration.call(this,u,d,w))},a.prototype.docType=function(u,d,w){var E,y,g,h;if(w||(w=0),this.openNode(u,d,w),d.state=e.OpenTag,this.stream.write(this.indent(u,d,w)),this.stream.write("<!DOCTYPE "+u.root().name),u.pubID&&u.sysID?this.stream.write(' PUBLIC "'+u.pubID+'" "'+u.sysID+'"'):u.sysID&&this.stream.write(' SYSTEM "'+u.sysID+'"'),u.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(u,d,w)),d.state=e.InsideTag,h=u.children,y=0,g=h.length;y<g;y++)E=h[y],this.writeChildNode(E,d,w+1);d.state=e.CloseTag,this.stream.write("]")}return d.state=e.CloseTag,this.stream.write(d.spaceBeforeSlash+">"),this.stream.write(this.endline(u,d,w)),d.state=e.None,this.closeNode(u,d,w)},a.prototype.element=function(u,d,w){var E,y,g,h,v,I,R,D,m,c;w||(w=0),this.openNode(u,d,w),d.state=e.OpenTag,this.stream.write(this.indent(u,d,w)+"<"+u.name),m=u.attribs;for(R in m)o.call(m,R)&&(E=m[R],this.attribute(E,d,w));if(g=u.children.length,h=g===0?null:u.children[0],g===0||u.children.every(function(l){return(l.type===t.Text||l.type===t.Raw)&&l.value===""}))d.allowEmpty?(this.stream.write(">"),d.state=e.CloseTag,this.stream.write("</"+u.name+">")):(d.state=e.CloseTag,this.stream.write(d.spaceBeforeSlash+"/>"));else if(d.pretty&&g===1&&(h.type===t.Text||h.type===t.Raw)&&h.value!=null)this.stream.write(">"),d.state=e.InsideTag,d.suppressPrettyCount++,D=!0,this.writeChildNode(h,d,w+1),d.suppressPrettyCount--,D=!1,d.state=e.CloseTag,this.stream.write("</"+u.name+">");else{for(this.stream.write(">"+this.endline(u,d,w)),d.state=e.InsideTag,c=u.children,v=0,I=c.length;v<I;v++)y=c[v],this.writeChildNode(y,d,w+1);d.state=e.CloseTag,this.stream.write(this.indent(u,d,w)+"</"+u.name+">")}return this.stream.write(this.endline(u,d,w)),d.state=e.None,this.closeNode(u,d,w)},a.prototype.processingInstruction=function(u,d,w){return this.stream.write(a.__super__.processingInstruction.call(this,u,d,w))},a.prototype.raw=function(u,d,w){return this.stream.write(a.__super__.raw.call(this,u,d,w))},a.prototype.text=function(u,d,w){return this.stream.write(a.__super__.text.call(this,u,d,w))},a.prototype.dtdAttList=function(u,d,w){return this.stream.write(a.__super__.dtdAttList.call(this,u,d,w))},a.prototype.dtdElement=function(u,d,w){return this.stream.write(a.__super__.dtdElement.call(this,u,d,w))},a.prototype.dtdEntity=function(u,d,w){return this.stream.write(a.__super__.dtdEntity.call(this,u,d,w))},a.prototype.dtdNotation=function(u,d,w){return this.stream.write(a.__super__.dtdNotation.call(this,u,d,w))},a})(n)}).call(Ru)});var Cu=S((Au,Ye)=>{"use strict";(function(){var t,e,r,n,i,o,s,a,u,d;d=Pe(),a=d.assign,u=d.isFunction,r=Yi(),n=eo(),i=Nu(),s=wn(),o=Lu(),t=ne(),e=sr(),Ye.exports.create=function(w,E,y,g){var h,v;if(w==null)throw new Error("Root element needs a name.");return g=a({},E,y,g),h=new n(g),v=h.element(w),g.headless||(h.declaration(g),(g.pubID!=null||g.sysID!=null)&&h.dtd(g)),v},Ye.exports.begin=function(w,E,y){var g;return u(w)&&(g=[w,E],E=g[0],y=g[1],w={}),E?new i(w,E,y):new n(w)},Ye.exports.stringWriter=function(w){return new s(w)},Ye.exports.streamWriter=function(w,E){return new o(w,E)},Ye.exports.implementation=new r,Ye.exports.nodeType=t,Ye.exports.writerState=e}).call(Au)});var qu=S(to=>{"use strict";(function(){"use strict";var t,e,r,n,i,o={}.hasOwnProperty;t=Cu(),e=on().defaults,n=function(s){return typeof s=="string"&&(s.indexOf("&")>=0||s.indexOf(">")>=0||s.indexOf("<")>=0)},i=function(s){return"<![CDATA["+r(s)+"]]>"},r=function(s){return s.replace("]]>","]]]]><![CDATA[>")},to.Builder=(function(){function s(a){var u,d,w;this.options={},d=e["0.2"];for(u in d)o.call(d,u)&&(w=d[u],this.options[u]=w);for(u in a)o.call(a,u)&&(w=a[u],this.options[u]=w)}return s.prototype.buildObject=function(a){var u,d,w,E,y;return u=this.options.attrkey,d=this.options.charkey,Object.keys(a).length===1&&this.options.rootName===e["0.2"].rootName?(y=Object.keys(a)[0],a=a[y]):y=this.options.rootName,w=(function(g){return function(h,v){var I,R,D,m,c,l;if(typeof v!="object")g.options.cdata&&n(v)?h.raw(i(v)):h.txt(v);else if(Array.isArray(v)){for(m in v)if(o.call(v,m)){R=v[m];for(c in R)D=R[c],h=w(h.ele(c),D).up()}}else for(c in v)if(o.call(v,c))if(R=v[c],c===u){if(typeof R=="object")for(I in R)l=R[I],h=h.att(I,l)}else if(c===d)g.options.cdata&&n(R)?h=h.raw(i(R)):h=h.txt(R);else if(Array.isArray(R))for(m in R)o.call(R,m)&&(D=R[m],typeof D=="string"?g.options.cdata&&n(D)?h=h.ele(c).raw(i(D)).up():h=h.ele(c,D).up():h=w(h.ele(c),D).up());else typeof R=="object"?h=w(h.ele(c),R).up():typeof R=="string"&&g.options.cdata&&n(R)?h=h.ele(c).raw(i(R)).up():(R==null&&(R=""),h=h.ele(c,R.toString()).up());return h}})(this),E=t.create(y,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),w(E,a).end(this.options.renderOpts)},s})()}).call(to)});var ju=S(_n=>{"use strict";(function(t){t.parser=function(b,f){return new r(b,f)},t.SAXParser=r,t.SAXStream=d,t.createStream=u,t.MAX_BUFFER_LENGTH=64*1024;var e=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function r(b,f){if(!(this instanceof r))return new r(b,f);var L=this;i(L),L.q=L.c="",L.bufferCheckPosition=t.MAX_BUFFER_LENGTH,L.opt=f||{},L.opt.lowercase=L.opt.lowercase||L.opt.lowercasetags,L.looseCase=L.opt.lowercase?"toLowerCase":"toUpperCase",L.tags=[],L.closed=L.closedRoot=L.sawRoot=!1,L.tag=L.error=null,L.strict=!!b,L.noscript=!!(b||L.opt.noscript),L.state=p.BEGIN,L.strictEntities=L.opt.strictEntities,L.ENTITIES=L.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),L.attribList=[],L.opt.xmlns&&(L.ns=Object.create(h)),L.opt.unquotedAttributeValues===void 0&&(L.opt.unquotedAttributeValues=!b),L.trackPosition=L.opt.position!==!1,L.trackPosition&&(L.position=L.line=L.column=0),T(L,"onready")}Object.create||(Object.create=function(b){function f(){}f.prototype=b;var L=new f;return L}),Object.keys||(Object.keys=function(b){var f=[];for(var L in b)b.hasOwnProperty(L)&&f.push(L);return f});function n(b){for(var f=Math.max(t.MAX_BUFFER_LENGTH,10),L=0,O=0,K=e.length;O<K;O++){var z=b[e[O]].length;if(z>f)switch(e[O]){case"textNode":A(b);break;case"cdata":P(b,"oncdata",b.cdata),b.cdata="";break;case"script":P(b,"onscript",b.script),b.script="";break;default:B(b,"Max buffer length exceeded: "+e[O])}L=Math.max(L,z)}var Z=t.MAX_BUFFER_LENGTH-L;b.bufferCheckPosition=Z+b.position}function i(b){for(var f=0,L=e.length;f<L;f++)b[e[f]]=""}function o(b){A(b),b.cdata!==""&&(P(b,"oncdata",b.cdata),b.cdata=""),b.script!==""&&(P(b,"onscript",b.script),b.script="")}r.prototype={end:function(){U(this)},write:Qr,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){o(this)}};var s;try{s=$("stream").Stream}catch{s=function(){}}s||(s=function(){});var a=t.EVENTS.filter(function(b){return b!=="error"&&b!=="end"});function u(b,f){return new d(b,f)}function d(b,f){if(!(this instanceof d))return new d(b,f);s.apply(this),this._parser=new r(b,f),this.writable=!0,this.readable=!0;var L=this;this._parser.onend=function(){L.emit("end")},this._parser.onerror=function(O){L.emit("error",O),L._parser.error=null},this._decoder=null,a.forEach(function(O){Object.defineProperty(L,"on"+O,{get:function(){return L._parser["on"+O]},set:function(K){if(!K)return L.removeAllListeners(O),L._parser["on"+O]=K,K;L.on(O,K)},enumerable:!0,configurable:!1})})}d.prototype=Object.create(s.prototype,{constructor:{value:d}}),d.prototype.write=function(b){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(b)){if(!this._decoder){var f=$("string_decoder").StringDecoder;this._decoder=new f("utf8")}b=this._decoder.write(b)}return this._parser.write(b.toString()),this.emit("data",b),!0},d.prototype.end=function(b){return b&&b.length&&this.write(b),this._parser.end(),!0},d.prototype.on=function(b,f){var L=this;return!L._parser["on"+b]&&a.indexOf(b)!==-1&&(L._parser["on"+b]=function(){var O=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);O.splice(0,0,b),L.emit.apply(L,O)}),s.prototype.on.call(L,b,f)};var w="[CDATA[",E="DOCTYPE",y="http://www.w3.org/XML/1998/namespace",g="http://www.w3.org/2000/xmlns/",h={xml:y,xmlns:g},v=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,I=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,R=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,D=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function m(b){return b===" "||b===`
|
|
4
|
+
`||b==="\r"||b===" "}function c(b){return b==='"'||b==="'"}function l(b){return b===">"||m(b)}function _(b,f){return b.test(f)}function N(b,f){return!_(b,f)}var p=0;t.STATE={BEGIN:p++,BEGIN_WHITESPACE:p++,TEXT:p++,TEXT_ENTITY:p++,OPEN_WAKA:p++,SGML_DECL:p++,SGML_DECL_QUOTED:p++,DOCTYPE:p++,DOCTYPE_QUOTED:p++,DOCTYPE_DTD:p++,DOCTYPE_DTD_QUOTED:p++,COMMENT_STARTING:p++,COMMENT:p++,COMMENT_ENDING:p++,COMMENT_ENDED:p++,CDATA:p++,CDATA_ENDING:p++,CDATA_ENDING_2:p++,PROC_INST:p++,PROC_INST_BODY:p++,PROC_INST_ENDING:p++,OPEN_TAG:p++,OPEN_TAG_SLASH:p++,ATTRIB:p++,ATTRIB_NAME:p++,ATTRIB_NAME_SAW_WHITE:p++,ATTRIB_VALUE:p++,ATTRIB_VALUE_QUOTED:p++,ATTRIB_VALUE_CLOSED:p++,ATTRIB_VALUE_UNQUOTED:p++,ATTRIB_VALUE_ENTITY_Q:p++,ATTRIB_VALUE_ENTITY_U:p++,CLOSE_TAG:p++,CLOSE_TAG_SAW_WHITE:p++,SCRIPT:p++,SCRIPT_ENDING:p++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach(function(b){var f=t.ENTITIES[b],L=typeof f=="number"?String.fromCharCode(f):f;t.ENTITIES[b]=L});for(var M in t.STATE)t.STATE[t.STATE[M]]=M;p=t.STATE;function T(b,f,L){b[f]&&b[f](L)}function P(b,f,L){b.textNode&&A(b),T(b,f,L)}function A(b){b.textNode=C(b.opt,b.textNode),b.textNode&&T(b,"ontext",b.textNode),b.textNode=""}function C(b,f){return b.trim&&(f=f.trim()),b.normalize&&(f=f.replace(/\s+/g," ")),f}function B(b,f){return A(b),b.trackPosition&&(f+=`
|
|
5
5
|
Line: `+b.line+`
|
|
6
6
|
Column: `+b.column+`
|
|
7
|
-
Char: `+b.c),f=new Error(f),b.error=f,
|
|
8
|
-
Actual: `+b.attribValue);else if(O==="xmlns"&&b.attribValue!==
|
|
9
|
-
Actual: `+b.attribValue);else{var
|
|
10
|
-
`?(f.line++,f.column=0):f.column++),f.state){case p.BEGIN:if(f.state=p.BEGIN_WHITESPACE,O==="\uFEFF")continue;
|
|
11
|
-
`?(f.line++,f.column=0):f.column++);f.textNode+=b.substring(
|
|
12
|
-
`?(f.line++,f.column=0):f.column++);f.cdata+=b.substring(K,L-1),O==="]"&&(f.state=p.CDATA_ENDING);continue;case p.CDATA_ENDING:O==="]"?f.state=p.CDATA_ENDING_2:(f.cdata+="]"+O,f.state=p.CDATA);continue;case p.CDATA_ENDING_2:O===">"?(f.cdata&&N(f,"oncdata",f.cdata),N(f,"onclosecdata"),f.cdata="",f.state=p.TEXT):O==="]"?f.cdata+="]":(f.cdata+="]]"+O,f.state=p.CDATA);continue;case p.PROC_INST:O==="?"?f.state=p.PROC_INST_ENDING:g(O)?f.state=p.PROC_INST_BODY:f.procInstName+=O;continue;case p.PROC_INST_BODY:if(!f.procInstBody&&g(O))continue;O==="?"?f.state=p.PROC_INST_ENDING:f.procInstBody+=O;continue;case p.PROC_INST_ENDING:O===">"?(N(f,"onprocessinginstruction",{name:f.procInstName,body:f.procInstBody}),f.procInstName=f.procInstBody="",f.state=p.TEXT):(f.procInstBody+="?"+O,f.state=p.PROC_INST_BODY);continue;case p.OPEN_TAG:_(C,O)?f.tagName+=O:(q(f),O===">"?k(f):O==="/"?f.state=p.OPEN_TAG_SLASH:(g(O)||x(f,"Invalid character in tag name"),f.state=p.ATTRIB));continue;case p.OPEN_TAG_SLASH:O===">"?(k(f,!0),me(f)):(x(f,"Forward-slash in opening tag not followed by >"),f.state=p.ATTRIB);continue;case p.ATTRIB:if(g(O))continue;O===">"?k(f):O==="/"?f.state=p.OPEN_TAG_SLASH:_(v,O)?(f.attribName=O,f.attribValue="",f.state=p.ATTRIB_NAME):x(f,"Invalid attribute name");continue;case p.ATTRIB_NAME:O==="="?f.state=p.ATTRIB_VALUE:O===">"?(x(f,"Attribute without value"),f.attribValue=f.attribName,Q(f),k(f)):g(O)?f.state=p.ATTRIB_NAME_SAW_WHITE:_(C,O)?f.attribName+=O:x(f,"Invalid attribute name");continue;case p.ATTRIB_NAME_SAW_WHITE:if(O==="=")f.state=p.ATTRIB_VALUE;else{if(g(O))continue;x(f,"Attribute without value"),f.tag.attributes[f.attribName]="",f.attribValue="",N(f,"onattribute",{name:f.attribName,value:""}),f.attribName="",O===">"?k(f):_(v,O)?(f.attribName=O,f.state=p.ATTRIB_NAME):(x(f,"Invalid attribute name"),f.state=p.ATTRIB)}continue;case p.ATTRIB_VALUE:if(g(O))continue;c(O)?(f.q=O,f.state=p.ATTRIB_VALUE_QUOTED):(f.opt.unquotedAttributeValues||B(f,"Unquoted attribute value"),f.state=p.ATTRIB_VALUE_UNQUOTED,f.attribValue=O);continue;case p.ATTRIB_VALUE_QUOTED:if(O!==f.q){O==="&"?f.state=p.ATTRIB_VALUE_ENTITY_Q:f.attribValue+=O;continue}Q(f),f.q="",f.state=p.ATTRIB_VALUE_CLOSED;continue;case p.ATTRIB_VALUE_CLOSED:g(O)?f.state=p.ATTRIB:O===">"?k(f):O==="/"?f.state=p.OPEN_TAG_SLASH:_(v,O)?(x(f,"No whitespace between attributes"),f.attribName=O,f.attribValue="",f.state=p.ATTRIB_NAME):x(f,"Invalid attribute name");continue;case p.ATTRIB_VALUE_UNQUOTED:if(!l(O)){O==="&"?f.state=p.ATTRIB_VALUE_ENTITY_U:f.attribValue+=O;continue}Q(f),O===">"?k(f):f.state=p.ATTRIB;continue;case p.CLOSE_TAG:if(f.tagName)O===">"?me(f):_(C,O)?f.tagName+=O:f.script?(f.script+="</"+f.tagName,f.tagName="",f.state=p.SCRIPT):(g(O)||x(f,"Invalid tagname in closing tag"),f.state=p.CLOSE_TAG_SAW_WHITE);else{if(g(O))continue;R(v,O)?f.script?(f.script+="</"+O,f.state=p.SCRIPT):x(f,"Invalid tagname in closing tag."):f.tagName=O}continue;case p.CLOSE_TAG_SAW_WHITE:if(g(O))continue;O===">"?me(f):x(f,"Invalid characters in closing tag");continue;case p.TEXT_ENTITY:case p.ATTRIB_VALUE_ENTITY_Q:case p.ATTRIB_VALUE_ENTITY_U:var Z,oe;switch(f.state){case p.TEXT_ENTITY:Z=p.TEXT,oe="textNode";break;case p.ATTRIB_VALUE_ENTITY_Q:Z=p.ATTRIB_VALUE_QUOTED,oe="attribValue";break;case p.ATTRIB_VALUE_ENTITY_U:Z=p.ATTRIB_VALUE_UNQUOTED,oe="attribValue";break}if(O===";"){var se=Ie(f);f.opt.unparsedEntities&&!Object.values(t.XML_ENTITIES).includes(se)?(f.entity="",f.state=Z,f.write(se)):(f[oe]+=se,f.entity="",f.state=Z)}else _(f.entity.length?D:P,O)?f.entity+=O:(x(f,"Invalid character in entity name"),f[oe]+="&"+f.entity+O,f.entity="",f.state=Z);continue;default:throw new Error(f,"Unknown state: "+f.state)}return f.position>=f.bufferCheckPosition&&n(f),f}String.fromCodePoint||(function(){var b=String.fromCharCode,f=Math.floor,L=function(){var O=16384,z=[],K,Z,oe=-1,se=arguments.length;if(!se)return"";for(var Xe="";++oe<se;){var J=Number(arguments[oe]);if(!isFinite(J)||J<0||J>1114111||f(J)!==J)throw RangeError("Invalid code point: "+J);J<=65535?z.push(J):(J-=65536,K=(J>>10)+55296,Z=J%1024+56320,z.push(K,Z)),(oe+1===se||z.length>O)&&(Xe+=b.apply(null,z),z.length=0)}return Xe};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:L,configurable:!0,writable:!0}):String.fromCodePoint=L})()})(typeof hn>"u"?hn.sax={}:hn)});var Du=T(Xi=>{"use strict";(function(){"use strict";Xi.stripBOM=function(t){return t[0]==="\uFEFF"?t.substring(1):t}}).call(Xi)});var Wi=T(ut=>{"use strict";(function(){"use strict";var t;t=new RegExp(/(?!xmlns)^.*:/),ut.normalize=function(e){return e.toLowerCase()},ut.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},ut.stripPrefix=function(e){return e.replace(t,"")},ut.parseNumbers=function(e){return isNaN(e)||(e=e%1===0?parseInt(e,10):parseFloat(e)),e},ut.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e=e.toLowerCase()==="true"),e}}).call(ut)});var xu=T(Ae=>{"use strict";(function(){"use strict";var t,e,r,n,i,o,s,a,u,d=function(y,m){return function(){return y.apply(m,arguments)}},w=function(y,m){for(var h in m)E.call(m,h)&&(y[h]=m[h]);function v(){this.constructor=y}return v.prototype=m.prototype,y.prototype=new v,y.__super__=m.prototype,y},E={}.hasOwnProperty;a=Ou(),n=$("events"),t=Du(),s=Wi(),u=$("timers").setImmediate,e=Kr().defaults,i=function(y){return typeof y=="object"&&y!=null&&Object.keys(y).length===0},o=function(y,m,h){var v,C,P;for(v=0,C=y.length;v<C;v++)P=y[v],m=P(m,h);return m},r=function(y,m,h){var v;return v=Object.create(null),v.value=h,v.writable=!0,v.enumerable=!0,v.configurable=!0,Object.defineProperty(y,m,v)},Ae.Parser=(function(y){w(m,y);function m(h){this.parseStringPromise=d(this.parseStringPromise,this),this.parseString=d(this.parseString,this),this.reset=d(this.reset,this),this.assignOrPush=d(this.assignOrPush,this),this.processAsync=d(this.processAsync,this);var v,C,P;if(!(this instanceof Ae.Parser))return new Ae.Parser(h);this.options={},C=e["0.2"];for(v in C)E.call(C,v)&&(P=C[v],this.options[v]=P);for(v in h)E.call(h,v)&&(P=h[v],this.options[v]=P);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(s.normalize)),this.reset()}return m.prototype.processAsync=function(){var h,v;try{return this.remaining.length<=this.options.chunkSize?(h=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(h),this.saxParser.close()):(h=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(h),u(this.processAsync))}catch(C){if(v=C,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(v)}},m.prototype.assignOrPush=function(h,v,C){return v in h?(h[v]instanceof Array||r(h,v,[h[v]]),h[v].push(C)):this.options.explicitArray?r(h,v,[C]):r(h,v,C)},m.prototype.reset=function(){var h,v,C,P;return this.removeAllListeners(),this.saxParser=a.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(function(D){return function(g){if(D.saxParser.resume(),!D.saxParser.errThrown)return D.saxParser.errThrown=!0,D.emit("error",g)}})(this),this.saxParser.onend=(function(D){return function(){if(!D.saxParser.ended)return D.saxParser.ended=!0,D.emit("end",D.resultObject)}})(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,P=[],h=this.options.attrkey,v=this.options.charkey,this.saxParser.onopentag=(function(D){return function(g){var c,l,_,R,p;if(_={},_[v]="",!D.options.ignoreAttrs){p=g.attributes;for(c in p)E.call(p,c)&&(!(h in _)&&!D.options.mergeAttrs&&(_[h]={}),l=D.options.attrValueProcessors?o(D.options.attrValueProcessors,g.attributes[c],c):g.attributes[c],R=D.options.attrNameProcessors?o(D.options.attrNameProcessors,c):c,D.options.mergeAttrs?D.assignOrPush(_,R,l):r(_[h],R,l))}return _["#name"]=D.options.tagNameProcessors?o(D.options.tagNameProcessors,g.name):g.name,D.options.xmlns&&(_[D.options.xmlnskey]={uri:g.uri,local:g.local}),P.push(_)}})(this),this.saxParser.onclosetag=(function(D){return function(){var g,c,l,_,R,p,M,S,N,I;if(p=P.pop(),R=p["#name"],(!D.options.explicitChildren||!D.options.preserveChildrenOrder)&&delete p["#name"],p.cdata===!0&&(g=p.cdata,delete p.cdata),N=P[P.length-1],p[v].match(/^\s*$/)&&!g?(c=p[v],delete p[v]):(D.options.trim&&(p[v]=p[v].trim()),D.options.normalize&&(p[v]=p[v].replace(/\s{2,}/g," ").trim()),p[v]=D.options.valueProcessors?o(D.options.valueProcessors,p[v],R):p[v],Object.keys(p).length===1&&v in p&&!D.EXPLICIT_CHARKEY&&(p=p[v])),i(p)&&(typeof D.options.emptyTag=="function"?p=D.options.emptyTag():p=D.options.emptyTag!==""?D.options.emptyTag:c),D.options.validator!=null&&(I="/"+(function(){var A,B,U;for(U=[],A=0,B=P.length;A<B;A++)_=P[A],U.push(_["#name"]);return U})().concat(R).join("/"),(function(){var A;try{return p=D.options.validator(I,N&&N[R],p)}catch(B){return A=B,D.emit("error",A)}})()),D.options.explicitChildren&&!D.options.mergeAttrs&&typeof p=="object"){if(!D.options.preserveChildrenOrder)_={},D.options.attrkey in p&&(_[D.options.attrkey]=p[D.options.attrkey],delete p[D.options.attrkey]),!D.options.charsAsChildren&&D.options.charkey in p&&(_[D.options.charkey]=p[D.options.charkey],delete p[D.options.charkey]),Object.getOwnPropertyNames(p).length>0&&(_[D.options.childkey]=p),p=_;else if(N){N[D.options.childkey]=N[D.options.childkey]||[],M={};for(l in p)E.call(p,l)&&r(M,l,p[l]);N[D.options.childkey].push(M),delete p["#name"],Object.keys(p).length===1&&v in p&&!D.EXPLICIT_CHARKEY&&(p=p[v])}}return P.length>0?D.assignOrPush(N,R,p):(D.options.explicitRoot&&(S=p,p={},r(p,R,S)),D.resultObject=p,D.saxParser.ended=!0,D.emit("end",D.resultObject))}})(this),C=(function(D){return function(g){var c,l;if(l=P[P.length-1],l)return l[v]+=g,D.options.explicitChildren&&D.options.preserveChildrenOrder&&D.options.charsAsChildren&&(D.options.includeWhiteChars||g.replace(/\\n/g,"").trim()!=="")&&(l[D.options.childkey]=l[D.options.childkey]||[],c={"#name":"__text__"},c[v]=g,D.options.normalize&&(c[v]=c[v].replace(/\s{2,}/g," ").trim()),l[D.options.childkey].push(c)),l}})(this),this.saxParser.ontext=C,this.saxParser.oncdata=(function(D){return function(g){var c;if(c=C(g),c)return c.cdata=!0}})(this)},m.prototype.parseString=function(h,v){var C;v!=null&&typeof v=="function"&&(this.on("end",function(P){return this.reset(),v(null,P)}),this.on("error",function(P){return this.reset(),v(P)}));try{return h=h.toString(),h.trim()===""?(this.emit("end",null),!0):(h=t.stripBOM(h),this.options.async?(this.remaining=h,u(this.processAsync),this.saxParser):this.saxParser.write(h).close())}catch(P){if(C=P,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw C}else return this.emit("error",C),this.saxParser.errThrown=!0}},m.prototype.parseStringPromise=function(h){return new Promise((function(v){return function(C,P){return v.parseString(h,function(D,g){return D?P(D):C(g)})}})(this))},m})(n),Ae.parseString=function(y,m,h){var v,C,P;return h!=null?(typeof h=="function"&&(v=h),typeof m=="object"&&(C=m)):(typeof m=="function"&&(v=m),C={}),P=new Ae.Parser(C),P.parseString(y,v)},Ae.parseStringPromise=function(y,m){var h,v;return typeof m=="object"&&(h=m),v=new Ae.Parser(h),v.parseStringPromise(y)}}).call(Ae)});var Nu=T(qe=>{"use strict";(function(){"use strict";var t,e,r,n,i=function(s,a){for(var u in a)o.call(a,u)&&(s[u]=a[u]);function d(){this.constructor=s}return d.prototype=a.prototype,s.prototype=new d,s.__super__=a.prototype,s},o={}.hasOwnProperty;e=Kr(),t=Su(),r=xu(),n=Wi(),qe.defaults=e.defaults,qe.processors=n,qe.ValidationError=(function(s){i(a,s);function a(u){this.message=u}return a})(Error),qe.Builder=t.Builder,qe.Parser=r.Parser,qe.parseString=r.parseString,qe.parseStringPromise=r.parseStringPromise}).call(qe)});var Mu=T(tr=>{"use strict";var xm=tr&&tr.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))};Object.defineProperty(tr,"__esModule",{value:!0});tr.mergeParams=Nm;function Nm(t){var e={delimiter:",",ignoreColumns:void 0,includeColumns:void 0,quote:'"',trim:!0,checkType:!1,ignoreEmpty:!1,noheader:!1,headers:void 0,flatKeys:!1,maxRowLength:0,checkColumn:!1,escape:'"',colParser:{},eol:void 0,alwaysSplitAtEOL:!1,output:"json",nullObject:!1,downstreamFormat:"line",needEmitAll:!0};t||(t={});for(var r in t)t.hasOwnProperty(r)&&(Array.isArray(t[r])?e[r]=xm([],t[r],!0):e[r]=t[r]);return e}});var Ru=T(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.initParseRuntime=Mm;function Mm(t){var e=t.parseParam,r={needProcessIgnoreColumn:!1,needProcessIncludeColumn:!1,selectedColumns:void 0,ended:!1,hasError:!1,error:void 0,delimiter:t.parseParam.delimiter,eol:t.parseParam.eol,columnConv:[],headerType:[],headerTitle:[],headerFlag:[],headers:void 0,started:!1,parsedLineNumber:0,columnValueSetter:[]};return e.ignoreColumns&&(r.needProcessIgnoreColumn=!0),e.includeColumns&&(r.needProcessIncludeColumn=!0),r}});var Pu=T(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.Processor=void 0;var Rm=(function(){function t(e){this.converter=e,this.params=e.parseParam,this.runtime=e.parseRuntime}return t})();dn.Processor=Rm});var Cu=T(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.prepareData=Cm;function Pm(t){if(typeof t!="string")throw new TypeError("Expected a string, got ".concat(typeof t));return t.charCodeAt(0)===65279?t.slice(1):t}function Cm(t,e){var r=Lm(t,e);e.csvLineBuffer=void 0;var n=Im(r,e).toString("utf8");return e.started===!1?Pm(n):n}function Lm(t,e){return e.csvLineBuffer&&e.csvLineBuffer.length>0?Buffer.concat([e.csvLineBuffer,t]):t}function Im(t,e){var r=t.length-1;if((t[r]&128)!=0){for(;(t[r]&192)===128;)r--;r--}return r!=t.length-1?(e.csvLineBuffer=t.slice(r+1),t.slice(0,r+1)):t}});var pn=T(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.default=Am;function Am(t,e){if(!e.eol&&t){for(var r=0,n=t.length;r<n;r++)if(t[r]==="\r"){if(t[r+1]===`
|
|
7
|
+
Char: `+b.c),f=new Error(f),b.error=f,T(b,"onerror",f),b}function U(b){return b.sawRoot&&!b.closedRoot&&x(b,"Unclosed root tag"),b.state!==p.BEGIN&&b.state!==p.BEGIN_WHITESPACE&&b.state!==p.TEXT&&B(b,"Unexpected end"),A(b),b.c="",b.closed=!0,T(b,"onend"),r.call(b,b.strict,b.opt),b}function x(b,f){if(typeof b!="object"||!(b instanceof r))throw new Error("bad call to strictFail");b.strict&&B(b,f)}function q(b){b.strict||(b.tagName=b.tagName[b.looseCase]());var f=b.tags[b.tags.length-1]||b,L=b.tag={name:b.tagName,attributes:{}};b.opt.xmlns&&(L.ns=f.ns),b.attribList.length=0,P(b,"onopentagstart",L)}function F(b,f){var L=b.indexOf(":"),O=L<0?["",b]:b.split(":"),K=O[0],z=O[1];return f&&b==="xmlns"&&(K="xmlns",z=""),{prefix:K,local:z}}function Q(b){if(b.strict||(b.attribName=b.attribName[b.looseCase]()),b.attribList.indexOf(b.attribName)!==-1||b.tag.attributes.hasOwnProperty(b.attribName)){b.attribName=b.attribValue="";return}if(b.opt.xmlns){var f=F(b.attribName,!0),L=f.prefix,O=f.local;if(L==="xmlns")if(O==="xml"&&b.attribValue!==y)x(b,"xml: prefix must be bound to "+y+`
|
|
8
|
+
Actual: `+b.attribValue);else if(O==="xmlns"&&b.attribValue!==g)x(b,"xmlns: prefix must be bound to "+g+`
|
|
9
|
+
Actual: `+b.attribValue);else{var K=b.tag,z=b.tags[b.tags.length-1]||b;K.ns===z.ns&&(K.ns=Object.create(z.ns)),K.ns[O]=b.attribValue}b.attribList.push([b.attribName,b.attribValue])}else b.tag.attributes[b.attribName]=b.attribValue,P(b,"onattribute",{name:b.attribName,value:b.attribValue});b.attribName=b.attribValue=""}function k(b,f){if(b.opt.xmlns){var L=b.tag,O=F(b.tagName);L.prefix=O.prefix,L.local=O.local,L.uri=L.ns[O.prefix]||"",L.prefix&&!L.uri&&(x(b,"Unbound namespace prefix: "+JSON.stringify(b.tagName)),L.uri=O.prefix);var K=b.tags[b.tags.length-1]||b;L.ns&&K.ns!==L.ns&&Object.keys(L.ns).forEach(function(ma){P(b,"onopennamespace",{prefix:ma,uri:L.ns[ma]})});for(var z=0,Z=b.attribList.length;z<Z;z++){var oe=b.attribList[z],se=oe[0],Ge=oe[1],J=F(se,!0),pe=J.prefix,er=J.local,Zr=pe===""?"":L.ns[pe]||"",Dt={name:se,value:Ge,prefix:pe,local:er,uri:Zr};pe&&pe!=="xmlns"&&!Zr&&(x(b,"Unbound namespace prefix: "+JSON.stringify(pe)),Dt.uri=pe),b.tag.attributes[se]=Dt,P(b,"onattribute",Dt)}b.attribList.length=0}b.tag.isSelfClosing=!!f,b.sawRoot=!0,b.tags.push(b.tag),P(b,"onopentag",b.tag),f||(!b.noscript&&b.tagName.toLowerCase()==="script"?b.state=p.SCRIPT:b.state=p.TEXT,b.tag=null,b.tagName=""),b.attribName=b.attribValue="",b.attribList.length=0}function ye(b){if(!b.tagName){x(b,"Weird empty close tag."),b.textNode+="</>",b.state=p.TEXT;return}if(b.script){if(b.tagName!=="script"){b.script+="</"+b.tagName+">",b.tagName="",b.state=p.SCRIPT;return}P(b,"onscript",b.script),b.script=""}var f=b.tags.length,L=b.tagName;b.strict||(L=L[b.looseCase]());for(var O=L;f--;){var K=b.tags[f];if(K.name!==O)x(b,"Unexpected close tag");else break}if(f<0){x(b,"Unmatched closing tag: "+b.tagName),b.textNode+="</"+b.tagName+">",b.state=p.TEXT;return}b.tagName=L;for(var z=b.tags.length;z-- >f;){var Z=b.tag=b.tags.pop();b.tagName=b.tag.name,P(b,"onclosetag",b.tagName);var oe={};for(var se in Z.ns)oe[se]=Z.ns[se];var Ge=b.tags[b.tags.length-1]||b;b.opt.xmlns&&Z.ns!==Ge.ns&&Object.keys(Z.ns).forEach(function(J){var pe=Z.ns[J];P(b,"onclosenamespace",{prefix:J,uri:pe})})}f===0&&(b.closedRoot=!0),b.tagName=b.attribValue=b.attribName="",b.attribList.length=0,b.state=p.TEXT}function qe(b){var f=b.entity,L=f.toLowerCase(),O,K="";return b.ENTITIES[f]?b.ENTITIES[f]:b.ENTITIES[L]?b.ENTITIES[L]:(f=L,f.charAt(0)==="#"&&(f.charAt(1)==="x"?(f=f.slice(2),O=parseInt(f,16),K=O.toString(16)):(f=f.slice(1),O=parseInt(f,10),K=O.toString(10))),f=f.replace(/^0+/,""),isNaN(O)||K.toLowerCase()!==f||O<0||O>1114111?(x(b,"Invalid character entity"),"&"+b.entity+";"):String.fromCodePoint(O))}function We(b,f){f==="<"?(b.state=p.OPEN_WAKA,b.startTagPosition=b.position):m(f)||(x(b,"Non-whitespace before first tag."),b.textNode=f,b.state=p.TEXT)}function Xe(b,f){var L="";return f<b.length&&(L=b.charAt(f)),L}function Qr(b){var f=this;if(this.error)throw this.error;if(f.closed)return B(f,"Cannot write after close. Assign an onready handler.");if(b===null)return U(f);typeof b=="object"&&(b=b.toString());for(var L=0,O="";O=Xe(b,L++),f.c=O,!!O;)switch(f.trackPosition&&(f.position++,O===`
|
|
10
|
+
`?(f.line++,f.column=0):f.column++),f.state){case p.BEGIN:if(f.state=p.BEGIN_WHITESPACE,O==="\uFEFF")continue;We(f,O);continue;case p.BEGIN_WHITESPACE:We(f,O);continue;case p.TEXT:if(f.sawRoot&&!f.closedRoot){for(var z=L-1;O&&O!=="<"&&O!=="&";)O=Xe(b,L++),O&&f.trackPosition&&(f.position++,O===`
|
|
11
|
+
`?(f.line++,f.column=0):f.column++);f.textNode+=b.substring(z,L-1)}O==="<"&&!(f.sawRoot&&f.closedRoot&&!f.strict)?(f.state=p.OPEN_WAKA,f.startTagPosition=f.position):(!m(O)&&(!f.sawRoot||f.closedRoot)&&x(f,"Text data outside of root node."),O==="&"?f.state=p.TEXT_ENTITY:f.textNode+=O);continue;case p.SCRIPT:O==="<"?f.state=p.SCRIPT_ENDING:f.script+=O;continue;case p.SCRIPT_ENDING:O==="/"?f.state=p.CLOSE_TAG:(f.script+="<"+O,f.state=p.SCRIPT);continue;case p.OPEN_WAKA:if(O==="!")f.state=p.SGML_DECL,f.sgmlDecl="";else if(!m(O))if(_(v,O))f.state=p.OPEN_TAG,f.tagName=O;else if(O==="/")f.state=p.CLOSE_TAG,f.tagName="";else if(O==="?")f.state=p.PROC_INST,f.procInstName=f.procInstBody="";else{if(x(f,"Unencoded <"),f.startTagPosition+1<f.position){var K=f.position-f.startTagPosition;O=new Array(K).join(" ")+O}f.textNode+="<"+O,f.state=p.TEXT}continue;case p.SGML_DECL:if(f.sgmlDecl+O==="--"){f.state=p.COMMENT,f.comment="",f.sgmlDecl="";continue}f.doctype&&f.doctype!==!0&&f.sgmlDecl?(f.state=p.DOCTYPE_DTD,f.doctype+="<!"+f.sgmlDecl+O,f.sgmlDecl=""):(f.sgmlDecl+O).toUpperCase()===w?(P(f,"onopencdata"),f.state=p.CDATA,f.sgmlDecl="",f.cdata=""):(f.sgmlDecl+O).toUpperCase()===E?(f.state=p.DOCTYPE,(f.doctype||f.sawRoot)&&x(f,"Inappropriately located doctype declaration"),f.doctype="",f.sgmlDecl=""):O===">"?(P(f,"onsgmldeclaration",f.sgmlDecl),f.sgmlDecl="",f.state=p.TEXT):(c(O)&&(f.state=p.SGML_DECL_QUOTED),f.sgmlDecl+=O);continue;case p.SGML_DECL_QUOTED:O===f.q&&(f.state=p.SGML_DECL,f.q=""),f.sgmlDecl+=O;continue;case p.DOCTYPE:O===">"?(f.state=p.TEXT,P(f,"ondoctype",f.doctype),f.doctype=!0):(f.doctype+=O,O==="["?f.state=p.DOCTYPE_DTD:c(O)&&(f.state=p.DOCTYPE_QUOTED,f.q=O));continue;case p.DOCTYPE_QUOTED:f.doctype+=O,O===f.q&&(f.q="",f.state=p.DOCTYPE);continue;case p.DOCTYPE_DTD:O==="]"?(f.doctype+=O,f.state=p.DOCTYPE):O==="<"?(f.state=p.OPEN_WAKA,f.startTagPosition=f.position):c(O)?(f.doctype+=O,f.state=p.DOCTYPE_DTD_QUOTED,f.q=O):f.doctype+=O;continue;case p.DOCTYPE_DTD_QUOTED:f.doctype+=O,O===f.q&&(f.state=p.DOCTYPE_DTD,f.q="");continue;case p.COMMENT:O==="-"?f.state=p.COMMENT_ENDING:f.comment+=O;continue;case p.COMMENT_ENDING:O==="-"?(f.state=p.COMMENT_ENDED,f.comment=C(f.opt,f.comment),f.comment&&P(f,"oncomment",f.comment),f.comment=""):(f.comment+="-"+O,f.state=p.COMMENT);continue;case p.COMMENT_ENDED:O!==">"?(x(f,"Malformed comment"),f.comment+="--"+O,f.state=p.COMMENT):f.doctype&&f.doctype!==!0?f.state=p.DOCTYPE_DTD:f.state=p.TEXT;continue;case p.CDATA:for(var z=L-1;O&&O!=="]";)O=Xe(b,L++),O&&f.trackPosition&&(f.position++,O===`
|
|
12
|
+
`?(f.line++,f.column=0):f.column++);f.cdata+=b.substring(z,L-1),O==="]"&&(f.state=p.CDATA_ENDING);continue;case p.CDATA_ENDING:O==="]"?f.state=p.CDATA_ENDING_2:(f.cdata+="]"+O,f.state=p.CDATA);continue;case p.CDATA_ENDING_2:O===">"?(f.cdata&&P(f,"oncdata",f.cdata),P(f,"onclosecdata"),f.cdata="",f.state=p.TEXT):O==="]"?f.cdata+="]":(f.cdata+="]]"+O,f.state=p.CDATA);continue;case p.PROC_INST:O==="?"?f.state=p.PROC_INST_ENDING:m(O)?f.state=p.PROC_INST_BODY:f.procInstName+=O;continue;case p.PROC_INST_BODY:if(!f.procInstBody&&m(O))continue;O==="?"?f.state=p.PROC_INST_ENDING:f.procInstBody+=O;continue;case p.PROC_INST_ENDING:O===">"?(P(f,"onprocessinginstruction",{name:f.procInstName,body:f.procInstBody}),f.procInstName=f.procInstBody="",f.state=p.TEXT):(f.procInstBody+="?"+O,f.state=p.PROC_INST_BODY);continue;case p.OPEN_TAG:_(I,O)?f.tagName+=O:(q(f),O===">"?k(f):O==="/"?f.state=p.OPEN_TAG_SLASH:(m(O)||x(f,"Invalid character in tag name"),f.state=p.ATTRIB));continue;case p.OPEN_TAG_SLASH:O===">"?(k(f,!0),ye(f)):(x(f,"Forward-slash in opening tag not followed by >"),f.state=p.ATTRIB);continue;case p.ATTRIB:if(m(O))continue;O===">"?k(f):O==="/"?f.state=p.OPEN_TAG_SLASH:_(v,O)?(f.attribName=O,f.attribValue="",f.state=p.ATTRIB_NAME):x(f,"Invalid attribute name");continue;case p.ATTRIB_NAME:O==="="?f.state=p.ATTRIB_VALUE:O===">"?(x(f,"Attribute without value"),f.attribValue=f.attribName,Q(f),k(f)):m(O)?f.state=p.ATTRIB_NAME_SAW_WHITE:_(I,O)?f.attribName+=O:x(f,"Invalid attribute name");continue;case p.ATTRIB_NAME_SAW_WHITE:if(O==="=")f.state=p.ATTRIB_VALUE;else{if(m(O))continue;x(f,"Attribute without value"),f.tag.attributes[f.attribName]="",f.attribValue="",P(f,"onattribute",{name:f.attribName,value:""}),f.attribName="",O===">"?k(f):_(v,O)?(f.attribName=O,f.state=p.ATTRIB_NAME):(x(f,"Invalid attribute name"),f.state=p.ATTRIB)}continue;case p.ATTRIB_VALUE:if(m(O))continue;c(O)?(f.q=O,f.state=p.ATTRIB_VALUE_QUOTED):(f.opt.unquotedAttributeValues||B(f,"Unquoted attribute value"),f.state=p.ATTRIB_VALUE_UNQUOTED,f.attribValue=O);continue;case p.ATTRIB_VALUE_QUOTED:if(O!==f.q){O==="&"?f.state=p.ATTRIB_VALUE_ENTITY_Q:f.attribValue+=O;continue}Q(f),f.q="",f.state=p.ATTRIB_VALUE_CLOSED;continue;case p.ATTRIB_VALUE_CLOSED:m(O)?f.state=p.ATTRIB:O===">"?k(f):O==="/"?f.state=p.OPEN_TAG_SLASH:_(v,O)?(x(f,"No whitespace between attributes"),f.attribName=O,f.attribValue="",f.state=p.ATTRIB_NAME):x(f,"Invalid attribute name");continue;case p.ATTRIB_VALUE_UNQUOTED:if(!l(O)){O==="&"?f.state=p.ATTRIB_VALUE_ENTITY_U:f.attribValue+=O;continue}Q(f),O===">"?k(f):f.state=p.ATTRIB;continue;case p.CLOSE_TAG:if(f.tagName)O===">"?ye(f):_(I,O)?f.tagName+=O:f.script?(f.script+="</"+f.tagName,f.tagName="",f.state=p.SCRIPT):(m(O)||x(f,"Invalid tagname in closing tag"),f.state=p.CLOSE_TAG_SAW_WHITE);else{if(m(O))continue;N(v,O)?f.script?(f.script+="</"+O,f.state=p.SCRIPT):x(f,"Invalid tagname in closing tag."):f.tagName=O}continue;case p.CLOSE_TAG_SAW_WHITE:if(m(O))continue;O===">"?ye(f):x(f,"Invalid characters in closing tag");continue;case p.TEXT_ENTITY:case p.ATTRIB_VALUE_ENTITY_Q:case p.ATTRIB_VALUE_ENTITY_U:var Z,oe;switch(f.state){case p.TEXT_ENTITY:Z=p.TEXT,oe="textNode";break;case p.ATTRIB_VALUE_ENTITY_Q:Z=p.ATTRIB_VALUE_QUOTED,oe="attribValue";break;case p.ATTRIB_VALUE_ENTITY_U:Z=p.ATTRIB_VALUE_UNQUOTED,oe="attribValue";break}if(O===";"){var se=qe(f);f.opt.unparsedEntities&&!Object.values(t.XML_ENTITIES).includes(se)?(f.entity="",f.state=Z,f.write(se)):(f[oe]+=se,f.entity="",f.state=Z)}else _(f.entity.length?D:R,O)?f.entity+=O:(x(f,"Invalid character in entity name"),f[oe]+="&"+f.entity+O,f.entity="",f.state=Z);continue;default:throw new Error(f,"Unknown state: "+f.state)}return f.position>=f.bufferCheckPosition&&n(f),f}String.fromCodePoint||(function(){var b=String.fromCharCode,f=Math.floor,L=function(){var O=16384,K=[],z,Z,oe=-1,se=arguments.length;if(!se)return"";for(var Ge="";++oe<se;){var J=Number(arguments[oe]);if(!isFinite(J)||J<0||J>1114111||f(J)!==J)throw RangeError("Invalid code point: "+J);J<=65535?K.push(J):(J-=65536,z=(J>>10)+55296,Z=J%1024+56320,K.push(z,Z)),(oe+1===se||K.length>O)&&(Ge+=b.apply(null,K),K.length=0)}return Ge};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:L,configurable:!0,writable:!0}):String.fromCodePoint=L})()})(typeof _n>"u"?_n.sax={}:_n)});var Fu=S(ro=>{"use strict";(function(){"use strict";ro.stripBOM=function(t){return t[0]==="\uFEFF"?t.substring(1):t}}).call(ro)});var no=S(ft=>{"use strict";(function(){"use strict";var t;t=new RegExp(/(?!xmlns)^.*:/),ft.normalize=function(e){return e.toLowerCase()},ft.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},ft.stripPrefix=function(e){return e.replace(t,"")},ft.parseNumbers=function(e){return isNaN(e)||(e=e%1===0?parseInt(e,10):parseFloat(e)),e},ft.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e=e.toLowerCase()==="true"),e}}).call(ft)});var ku=S(je=>{"use strict";(function(){"use strict";var t,e,r,n,i,o,s,a,u,d=function(y,g){return function(){return y.apply(g,arguments)}},w=function(y,g){for(var h in g)E.call(g,h)&&(y[h]=g[h]);function v(){this.constructor=y}return v.prototype=g.prototype,y.prototype=new v,y.__super__=g.prototype,y},E={}.hasOwnProperty;a=ju(),n=$("events"),t=Fu(),s=no(),u=$("timers").setImmediate,e=on().defaults,i=function(y){return typeof y=="object"&&y!=null&&Object.keys(y).length===0},o=function(y,g,h){var v,I,R;for(v=0,I=y.length;v<I;v++)R=y[v],g=R(g,h);return g},r=function(y,g,h){var v;return v=Object.create(null),v.value=h,v.writable=!0,v.enumerable=!0,v.configurable=!0,Object.defineProperty(y,g,v)},je.Parser=(function(y){w(g,y);function g(h){this.parseStringPromise=d(this.parseStringPromise,this),this.parseString=d(this.parseString,this),this.reset=d(this.reset,this),this.assignOrPush=d(this.assignOrPush,this),this.processAsync=d(this.processAsync,this);var v,I,R;if(!(this instanceof je.Parser))return new je.Parser(h);this.options={},I=e["0.2"];for(v in I)E.call(I,v)&&(R=I[v],this.options[v]=R);for(v in h)E.call(h,v)&&(R=h[v],this.options[v]=R);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(s.normalize)),this.reset()}return g.prototype.processAsync=function(){var h,v;try{return this.remaining.length<=this.options.chunkSize?(h=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(h),this.saxParser.close()):(h=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(h),u(this.processAsync))}catch(I){if(v=I,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(v)}},g.prototype.assignOrPush=function(h,v,I){return v in h?(h[v]instanceof Array||r(h,v,[h[v]]),h[v].push(I)):this.options.explicitArray?r(h,v,[I]):r(h,v,I)},g.prototype.reset=function(){var h,v,I,R;return this.removeAllListeners(),this.saxParser=a.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(function(D){return function(m){if(D.saxParser.resume(),!D.saxParser.errThrown)return D.saxParser.errThrown=!0,D.emit("error",m)}})(this),this.saxParser.onend=(function(D){return function(){if(!D.saxParser.ended)return D.saxParser.ended=!0,D.emit("end",D.resultObject)}})(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,R=[],h=this.options.attrkey,v=this.options.charkey,this.saxParser.onopentag=(function(D){return function(m){var c,l,_,N,p;if(_={},_[v]="",!D.options.ignoreAttrs){p=m.attributes;for(c in p)E.call(p,c)&&(!(h in _)&&!D.options.mergeAttrs&&(_[h]={}),l=D.options.attrValueProcessors?o(D.options.attrValueProcessors,m.attributes[c],c):m.attributes[c],N=D.options.attrNameProcessors?o(D.options.attrNameProcessors,c):c,D.options.mergeAttrs?D.assignOrPush(_,N,l):r(_[h],N,l))}return _["#name"]=D.options.tagNameProcessors?o(D.options.tagNameProcessors,m.name):m.name,D.options.xmlns&&(_[D.options.xmlnskey]={uri:m.uri,local:m.local}),R.push(_)}})(this),this.saxParser.onclosetag=(function(D){return function(){var m,c,l,_,N,p,M,T,P,A;if(p=R.pop(),N=p["#name"],(!D.options.explicitChildren||!D.options.preserveChildrenOrder)&&delete p["#name"],p.cdata===!0&&(m=p.cdata,delete p.cdata),P=R[R.length-1],p[v].match(/^\s*$/)&&!m?(c=p[v],delete p[v]):(D.options.trim&&(p[v]=p[v].trim()),D.options.normalize&&(p[v]=p[v].replace(/\s{2,}/g," ").trim()),p[v]=D.options.valueProcessors?o(D.options.valueProcessors,p[v],N):p[v],Object.keys(p).length===1&&v in p&&!D.EXPLICIT_CHARKEY&&(p=p[v])),i(p)&&(typeof D.options.emptyTag=="function"?p=D.options.emptyTag():p=D.options.emptyTag!==""?D.options.emptyTag:c),D.options.validator!=null&&(A="/"+(function(){var C,B,U;for(U=[],C=0,B=R.length;C<B;C++)_=R[C],U.push(_["#name"]);return U})().concat(N).join("/"),(function(){var C;try{return p=D.options.validator(A,P&&P[N],p)}catch(B){return C=B,D.emit("error",C)}})()),D.options.explicitChildren&&!D.options.mergeAttrs&&typeof p=="object"){if(!D.options.preserveChildrenOrder)_={},D.options.attrkey in p&&(_[D.options.attrkey]=p[D.options.attrkey],delete p[D.options.attrkey]),!D.options.charsAsChildren&&D.options.charkey in p&&(_[D.options.charkey]=p[D.options.charkey],delete p[D.options.charkey]),Object.getOwnPropertyNames(p).length>0&&(_[D.options.childkey]=p),p=_;else if(P){P[D.options.childkey]=P[D.options.childkey]||[],M={};for(l in p)E.call(p,l)&&r(M,l,p[l]);P[D.options.childkey].push(M),delete p["#name"],Object.keys(p).length===1&&v in p&&!D.EXPLICIT_CHARKEY&&(p=p[v])}}return R.length>0?D.assignOrPush(P,N,p):(D.options.explicitRoot&&(T=p,p={},r(p,N,T)),D.resultObject=p,D.saxParser.ended=!0,D.emit("end",D.resultObject))}})(this),I=(function(D){return function(m){var c,l;if(l=R[R.length-1],l)return l[v]+=m,D.options.explicitChildren&&D.options.preserveChildrenOrder&&D.options.charsAsChildren&&(D.options.includeWhiteChars||m.replace(/\\n/g,"").trim()!=="")&&(l[D.options.childkey]=l[D.options.childkey]||[],c={"#name":"__text__"},c[v]=m,D.options.normalize&&(c[v]=c[v].replace(/\s{2,}/g," ").trim()),l[D.options.childkey].push(c)),l}})(this),this.saxParser.ontext=I,this.saxParser.oncdata=(function(D){return function(m){var c;if(c=I(m),c)return c.cdata=!0}})(this)},g.prototype.parseString=function(h,v){var I;v!=null&&typeof v=="function"&&(this.on("end",function(R){return this.reset(),v(null,R)}),this.on("error",function(R){return this.reset(),v(R)}));try{return h=h.toString(),h.trim()===""?(this.emit("end",null),!0):(h=t.stripBOM(h),this.options.async?(this.remaining=h,u(this.processAsync),this.saxParser):this.saxParser.write(h).close())}catch(R){if(I=R,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw I}else return this.emit("error",I),this.saxParser.errThrown=!0}},g.prototype.parseStringPromise=function(h){return new Promise((function(v){return function(I,R){return v.parseString(h,function(D,m){return D?R(D):I(m)})}})(this))},g})(n),je.parseString=function(y,g,h){var v,I,R;return h!=null?(typeof h=="function"&&(v=h),typeof g=="object"&&(I=g)):(typeof g=="function"&&(v=g),I={}),R=new je.Parser(I),R.parseString(y,v)},je.parseStringPromise=function(y,g){var h,v;return typeof g=="object"&&(h=g),v=new je.Parser(h),v.parseStringPromise(y)}}).call(je)});var Bu=S(Fe=>{"use strict";(function(){"use strict";var t,e,r,n,i=function(s,a){for(var u in a)o.call(a,u)&&(s[u]=a[u]);function d(){this.constructor=s}return d.prototype=a.prototype,s.prototype=new d,s.__super__=a.prototype,s},o={}.hasOwnProperty;e=on(),t=qu(),r=ku(),n=no(),Fe.defaults=e.defaults,Fe.processors=n,Fe.ValidationError=(function(s){i(a,s);function a(u){this.message=u}return a})(Error),Fe.Builder=t.Builder,Fe.Parser=r.Parser,Fe.parseString=r.parseString,Fe.parseStringPromise=r.parseStringPromise}).call(Fe)});var $u=S(ar=>{"use strict";var Vg=ar&&ar.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))};Object.defineProperty(ar,"__esModule",{value:!0});ar.mergeParams=Hg;function Hg(t){var e={delimiter:",",ignoreColumns:void 0,includeColumns:void 0,quote:'"',trim:!0,checkType:!1,ignoreEmpty:!1,noheader:!1,headers:void 0,flatKeys:!1,maxRowLength:0,checkColumn:!1,escape:'"',colParser:{},eol:void 0,alwaysSplitAtEOL:!1,output:"json",nullObject:!1,downstreamFormat:"line",needEmitAll:!0};t||(t={});for(var r in t)t.hasOwnProperty(r)&&(Array.isArray(t[r])?e[r]=Vg([],t[r],!0):e[r]=t[r]);return e}});var Uu=S(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.initParseRuntime=Wg;function Wg(t){var e=t.parseParam,r={needProcessIgnoreColumn:!1,needProcessIncludeColumn:!1,selectedColumns:void 0,ended:!1,hasError:!1,error:void 0,delimiter:t.parseParam.delimiter,eol:t.parseParam.eol,columnConv:[],headerType:[],headerTitle:[],headerFlag:[],headers:void 0,started:!1,parsedLineNumber:0,columnValueSetter:[]};return e.ignoreColumns&&(r.needProcessIgnoreColumn=!0),e.includeColumns&&(r.needProcessIncludeColumn=!0),r}});var Vu=S(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.Processor=void 0;var Xg=(function(){function t(e){this.converter=e,this.params=e.parseParam,this.runtime=e.parseRuntime}return t})();vn.Processor=Xg});var Hu=S(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.prepareData=Kg;function Gg(t){if(typeof t!="string")throw new TypeError("Expected a string, got ".concat(typeof t));return t.charCodeAt(0)===65279?t.slice(1):t}function Kg(t,e){var r=Yg(t,e);e.csvLineBuffer=void 0;var n=zg(r,e).toString("utf8");return e.started===!1?Gg(n):n}function Yg(t,e){return e.csvLineBuffer&&e.csvLineBuffer.length>0?Buffer.concat([e.csvLineBuffer,t]):t}function zg(t,e){var r=t.length-1;if((t[r]&128)!=0){for(;(t[r]&192)===128;)r--;r--}return r!=t.length-1?(e.csvLineBuffer=t.slice(r+1),t.slice(0,r+1)):t}});var En=S(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.default=Jg;function Jg(t,e){if(!e.eol&&t){for(var r=0,n=t.length;r<n;r++)if(t[r]==="\r"){if(t[r+1]===`
|
|
13
13
|
`){e.eol=`\r
|
|
14
14
|
`;break}else if(t[r+1]){e.eol="\r";break}}else if(t[r]===`
|
|
15
15
|
`){e.eol=`
|
|
16
16
|
`;break}}return e.eol||`
|
|
17
|
-
`}});var
|
|
18
|
-
`))}return{rowsCells:r,partial:n}},t})();Dt.RowSplit=Gm});var Ji=T(nr=>{"use strict";var zm=nr&&nr.__extends||(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();Object.defineProperty(nr,"__esModule",{value:!0});var Ym=(function(t){zm(e,t);function e(r,n,i){var o=t.call(this,"Error: "+r+". JSON Line number: "+n+(i?" near: "+i:""))||this;return o.err=r,o.line=n,o.extra=i,o.name="CSV Parse Error",o}return e.column_mismatched=function(r,n){return new e("column_mismatched",r,n)},e.unclosed_quote=function(r,n){return new e("unclosed_quote",r,n)},e.fromJSON=function(r){return new e(r.err,r.line,r.extra)},e.prototype.toJSON=function(){return{err:this.err,line:this.line,extra:this.extra}},e})(Error);nr.default=Ym});var qu=T((Z2,Au)=>{"use strict";var Km=typeof global=="object"&&global&&global.Object===Object&&global;Au.exports=Km});var gn=T((eD,ju)=>{"use strict";var Jm=qu(),Qm=typeof self=="object"&&self&&self.Object===Object&&self,Zm=Jm||Qm||Function("return this")();ju.exports=Zm});var mn=T((tD,Fu)=>{"use strict";var ey=gn(),ty=ey.Symbol;Fu.exports=ty});var Uu=T((rD,$u)=>{"use strict";var ku=mn(),Bu=Object.prototype,ry=Bu.hasOwnProperty,ny=Bu.toString,ir=ku?ku.toStringTag:void 0;function iy(t){var e=ry.call(t,ir),r=t[ir];try{t[ir]=void 0;var n=!0}catch{}var i=ny.call(t);return n&&(e?t[ir]=r:delete t[ir]),i}$u.exports=iy});var Hu=T((nD,Vu)=>{"use strict";var oy=Object.prototype,sy=oy.toString;function ay(t){return sy.call(t)}Vu.exports=ay});var Qi=T((iD,Gu)=>{"use strict";var Xu=mn(),uy=Uu(),ly=Hu(),fy="[object Null]",cy="[object Undefined]",Wu=Xu?Xu.toStringTag:void 0;function hy(t){return t==null?t===void 0?cy:fy:Wu&&Wu in Object(t)?uy(t):ly(t)}Gu.exports=hy});var yn=T((oD,zu)=>{"use strict";function dy(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}zu.exports=dy});var Ku=T((sD,Yu)=>{"use strict";var py=Qi(),gy=yn(),my="[object AsyncFunction]",yy="[object Function]",by="[object GeneratorFunction]",wy="[object Proxy]";function _y(t){if(!gy(t))return!1;var e=py(t);return e==yy||e==by||e==my||e==wy}Yu.exports=_y});var Qu=T((aD,Ju)=>{"use strict";var vy=gn(),Ey=vy["__core-js_shared__"];Ju.exports=Ey});var tl=T((uD,el)=>{"use strict";var Zi=Qu(),Zu=(function(){var t=/[^.]+$/.exec(Zi&&Zi.keys&&Zi.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Ty(t){return!!Zu&&Zu in t}el.exports=Ty});var nl=T((lD,rl)=>{"use strict";var Sy=Function.prototype,Oy=Sy.toString;function Dy(t){if(t!=null){try{return Oy.call(t)}catch{}try{return t+""}catch{}}return""}rl.exports=Dy});var ol=T((fD,il)=>{"use strict";var xy=Ku(),Ny=tl(),My=yn(),Ry=nl(),Py=/[\\^$.*+?()[\]{}|]/g,Cy=/^\[object .+?Constructor\]$/,Ly=Function.prototype,Iy=Object.prototype,Ay=Ly.toString,qy=Iy.hasOwnProperty,jy=RegExp("^"+Ay.call(qy).replace(Py,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Fy(t){if(!My(t)||Ny(t))return!1;var e=xy(t)?jy:Cy;return e.test(Ry(t))}il.exports=Fy});var al=T((cD,sl)=>{"use strict";function ky(t,e){return t?.[e]}sl.exports=ky});var bn=T((hD,ul)=>{"use strict";var By=ol(),$y=al();function Uy(t,e){var r=$y(t,e);return By(r)?r:void 0}ul.exports=Uy});var fl=T((dD,ll)=>{"use strict";var Vy=bn(),Hy=(function(){try{var t=Vy(Object,"defineProperty");return t({},"",{}),t}catch{}})();ll.exports=Hy});var dl=T((pD,hl)=>{"use strict";var cl=fl();function Xy(t,e,r){e=="__proto__"&&cl?cl(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}hl.exports=Xy});var eo=T((gD,pl)=>{"use strict";function Wy(t,e){return t===e||t!==t&&e!==e}pl.exports=Wy});var ml=T((mD,gl)=>{"use strict";var Gy=dl(),zy=eo(),Yy=Object.prototype,Ky=Yy.hasOwnProperty;function Jy(t,e,r){var n=t[e];(!(Ky.call(t,e)&&zy(n,r))||r===void 0&&!(e in t))&&Gy(t,e,r)}gl.exports=Jy});var wn=T((yD,yl)=>{"use strict";var Qy=Array.isArray;yl.exports=Qy});var wl=T((bD,bl)=>{"use strict";function Zy(t){return t!=null&&typeof t=="object"}bl.exports=Zy});var _n=T((wD,_l)=>{"use strict";var eb=Qi(),tb=wl(),rb="[object Symbol]";function nb(t){return typeof t=="symbol"||tb(t)&&eb(t)==rb}_l.exports=nb});var El=T((_D,vl)=>{"use strict";var ib=wn(),ob=_n(),sb=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ab=/^\w*$/;function ub(t,e){if(ib(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||ob(t)?!0:ab.test(t)||!sb.test(t)||e!=null&&t in Object(e)}vl.exports=ub});var or=T((vD,Tl)=>{"use strict";var lb=bn(),fb=lb(Object,"create");Tl.exports=fb});var Dl=T((ED,Ol)=>{"use strict";var Sl=or();function cb(){this.__data__=Sl?Sl(null):{},this.size=0}Ol.exports=cb});var Nl=T((TD,xl)=>{"use strict";function hb(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}xl.exports=hb});var Rl=T((SD,Ml)=>{"use strict";var db=or(),pb="__lodash_hash_undefined__",gb=Object.prototype,mb=gb.hasOwnProperty;function yb(t){var e=this.__data__;if(db){var r=e[t];return r===pb?void 0:r}return mb.call(e,t)?e[t]:void 0}Ml.exports=yb});var Cl=T((OD,Pl)=>{"use strict";var bb=or(),wb=Object.prototype,_b=wb.hasOwnProperty;function vb(t){var e=this.__data__;return bb?e[t]!==void 0:_b.call(e,t)}Pl.exports=vb});var Il=T((DD,Ll)=>{"use strict";var Eb=or(),Tb="__lodash_hash_undefined__";function Sb(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Eb&&e===void 0?Tb:e,this}Ll.exports=Sb});var ql=T((xD,Al)=>{"use strict";var Ob=Dl(),Db=Nl(),xb=Rl(),Nb=Cl(),Mb=Il();function xt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}xt.prototype.clear=Ob;xt.prototype.delete=Db;xt.prototype.get=xb;xt.prototype.has=Nb;xt.prototype.set=Mb;Al.exports=xt});var Fl=T((ND,jl)=>{"use strict";function Rb(){this.__data__=[],this.size=0}jl.exports=Rb});var sr=T((MD,kl)=>{"use strict";var Pb=eo();function Cb(t,e){for(var r=t.length;r--;)if(Pb(t[r][0],e))return r;return-1}kl.exports=Cb});var $l=T((RD,Bl)=>{"use strict";var Lb=sr(),Ib=Array.prototype,Ab=Ib.splice;function qb(t){var e=this.__data__,r=Lb(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Ab.call(e,r,1),--this.size,!0}Bl.exports=qb});var Vl=T((PD,Ul)=>{"use strict";var jb=sr();function Fb(t){var e=this.__data__,r=jb(e,t);return r<0?void 0:e[r][1]}Ul.exports=Fb});var Xl=T((CD,Hl)=>{"use strict";var kb=sr();function Bb(t){return kb(this.__data__,t)>-1}Hl.exports=Bb});var Gl=T((LD,Wl)=>{"use strict";var $b=sr();function Ub(t,e){var r=this.__data__,n=$b(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}Wl.exports=Ub});var Yl=T((ID,zl)=>{"use strict";var Vb=Fl(),Hb=$l(),Xb=Vl(),Wb=Xl(),Gb=Gl();function Nt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Nt.prototype.clear=Vb;Nt.prototype.delete=Hb;Nt.prototype.get=Xb;Nt.prototype.has=Wb;Nt.prototype.set=Gb;zl.exports=Nt});var Jl=T((AD,Kl)=>{"use strict";var zb=bn(),Yb=gn(),Kb=zb(Yb,"Map");Kl.exports=Kb});var ef=T((qD,Zl)=>{"use strict";var Ql=ql(),Jb=Yl(),Qb=Jl();function Zb(){this.size=0,this.__data__={hash:new Ql,map:new(Qb||Jb),string:new Ql}}Zl.exports=Zb});var rf=T((jD,tf)=>{"use strict";function e0(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}tf.exports=e0});var ar=T((FD,nf)=>{"use strict";var t0=rf();function r0(t,e){var r=t.__data__;return t0(e)?r[typeof e=="string"?"string":"hash"]:r.map}nf.exports=r0});var sf=T((kD,of)=>{"use strict";var n0=ar();function i0(t){var e=n0(this,t).delete(t);return this.size-=e?1:0,e}of.exports=i0});var uf=T((BD,af)=>{"use strict";var o0=ar();function s0(t){return o0(this,t).get(t)}af.exports=s0});var ff=T(($D,lf)=>{"use strict";var a0=ar();function u0(t){return a0(this,t).has(t)}lf.exports=u0});var hf=T((UD,cf)=>{"use strict";var l0=ar();function f0(t,e){var r=l0(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}cf.exports=f0});var pf=T((VD,df)=>{"use strict";var c0=ef(),h0=sf(),d0=uf(),p0=ff(),g0=hf();function Mt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Mt.prototype.clear=c0;Mt.prototype.delete=h0;Mt.prototype.get=d0;Mt.prototype.has=p0;Mt.prototype.set=g0;df.exports=Mt});var yf=T((HD,mf)=>{"use strict";var gf=pf(),m0="Expected a function";function to(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(m0);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(to.Cache||gf),r}to.Cache=gf;mf.exports=to});var wf=T((XD,bf)=>{"use strict";var y0=yf(),b0=500;function w0(t){var e=y0(t,function(n){return r.size===b0&&r.clear(),n}),r=e.cache;return e}bf.exports=w0});var vf=T((WD,_f)=>{"use strict";var _0=wf(),v0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,E0=/\\(\\)?/g,T0=_0(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(v0,function(r,n,i,o){e.push(i?o.replace(E0,"$1"):n||r)}),e});_f.exports=T0});var Tf=T((GD,Ef)=>{"use strict";function S0(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}Ef.exports=S0});var Mf=T((zD,Nf)=>{"use strict";var Sf=mn(),O0=Tf(),D0=wn(),x0=_n(),N0=1/0,Of=Sf?Sf.prototype:void 0,Df=Of?Of.toString:void 0;function xf(t){if(typeof t=="string")return t;if(D0(t))return O0(t,xf)+"";if(x0(t))return Df?Df.call(t):"";var e=t+"";return e=="0"&&1/t==-N0?"-0":e}Nf.exports=xf});var Pf=T((YD,Rf)=>{"use strict";var M0=Mf();function R0(t){return t==null?"":M0(t)}Rf.exports=R0});var Lf=T((KD,Cf)=>{"use strict";var P0=wn(),C0=El(),L0=vf(),I0=Pf();function A0(t,e){return P0(t)?t:C0(t,e)?[t]:L0(I0(t))}Cf.exports=A0});var Af=T((JD,If)=>{"use strict";var q0=9007199254740991,j0=/^(?:0|[1-9]\d*)$/;function F0(t,e){var r=typeof t;return e=e??q0,!!e&&(r=="number"||r!="symbol"&&j0.test(t))&&t>-1&&t%1==0&&t<e}If.exports=F0});var jf=T((QD,qf)=>{"use strict";var k0=_n(),B0=1/0;function $0(t){if(typeof t=="string"||k0(t))return t;var e=t+"";return e=="0"&&1/t==-B0?"-0":e}qf.exports=$0});var Bf=T((ZD,kf)=>{"use strict";var U0=ml(),V0=Lf(),H0=Af(),Ff=yn(),X0=jf();function W0(t,e,r,n){if(!Ff(t))return t;e=V0(e,t);for(var i=-1,o=e.length,s=o-1,a=t;a!=null&&++i<o;){var u=X0(e[i]),d=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(i!=s){var w=a[u];d=n?n(w,u,a):void 0,d===void 0&&(d=Ff(w)?w:H0(e[i+1])?[]:{})}U0(a,u,d),a=a[u]}return t}kf.exports=W0});var Uf=T((ex,$f)=>{"use strict";var G0=Bf();function z0(t,e,r){return t==null?t:G0(t,e,r)}$f.exports=z0});var Xf=T(lr=>{"use strict";var Hf=lr&&lr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lr,"__esModule",{value:!0});lr.default=Q0;var Y0=Hf(Ji()),K0=Hf(Uf()),J0=/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;function Q0(t,e){for(var r=[],n=0,i=t.length;n<i;n++){var o=Z0(t[n],e,n);o&&r.push(o)}return r}function Z0(t,e,r){if(e.parseParam.checkColumn&&e.parseRuntime.headers&&t.length!==e.parseRuntime.headers.length)throw Y0.default.column_mismatched(e.parseRuntime.parsedLineNumber+r);var n=e.parseRuntime.headers||[],i=ew(t,n,e);return i||null}function ew(t,e,r){for(var n=!1,i={},o=0,s=t.length;o<s;o++){var a=t[o];if(!(r.parseParam.ignoreEmpty&&a==="")){n=!0;var u=e[o];(!u||u==="")&&(u=e[o]="field"+(o+1));var d=rw(u,o,r);if(d){var w=d(a,u,i,t,o);w!==void 0&&Vf(i,u,w,r,o)}else{if(r.parseParam.checkType){var E=iw(a,u,o,r);a=E(a)}a!==void 0&&Vf(i,u,a,r,o)}}}return n?i:null}var tw={string:ur,number:no,omit:function(){}};function rw(t,e,r){if(r.parseRuntime.columnConv[e]!==void 0)return r.parseRuntime.columnConv[e];var n=r.parseParam.colParser[t];if(n===void 0)return r.parseRuntime.columnConv[e]=null;if(typeof n=="object"&&(n=n.cellParser||"string"),typeof n=="string"){n=n.trim().toLowerCase();var i=tw[n];return i?r.parseRuntime.columnConv[e]=i:r.parseRuntime.columnConv[e]=null}else return typeof n=="function"?r.parseRuntime.columnConv[e]=n:r.parseRuntime.columnConv[e]=null}function Vf(t,e,r,n,i){if(!n.parseRuntime.columnValueSetter[i])if(n.parseParam.flatKeys)n.parseRuntime.columnValueSetter[i]=ro;else if(e.indexOf(".")>-1){for(var o=e.split("."),s=!0;o.length>0;){var a=o.shift();if(a.length===0){s=!1;break}}!s||n.parseParam.colParser[e]&&n.parseParam.colParser[e].flat?n.parseRuntime.columnValueSetter[i]=ro:n.parseRuntime.columnValueSetter[i]=nw}else n.parseRuntime.columnValueSetter[i]=ro;n.parseParam.nullObject===!0&&r==="null"&&(r=null),n.parseRuntime.columnValueSetter[i](t,e,r)}function ro(t,e,r){t[e]=r}function nw(t,e,r){(0,K0.default)(t,e,r)}function iw(t,e,r,n){return n.parseRuntime.headerType[r]?n.parseRuntime.headerType[r]:e.indexOf("number#!")>-1?n.parseRuntime.headerType[r]=no:e.indexOf("string#!")>-1?n.parseRuntime.headerType[r]=ur:n.parseParam.checkType?n.parseRuntime.headerType[r]=ow:n.parseRuntime.headerType[r]=ur}function no(t){var e=parseFloat(t);return isNaN(e)?t:e}function ur(t){return t.toString()}function ow(t){var e=t.trim();return e===""?ur(t):J0.test(e)?no(t):e.length===5&&e.toLowerCase()==="false"||e.length===4&&e.toLowerCase()==="true"?sw(t):e[0]==="{"&&e[e.length-1]==="}"||e[0]==="["&&e[e.length-1]==="]"?aw(t):ur(t)}function sw(t){var e=t.trim();return!(e.length===5&&e.toLowerCase()==="false")}function aw(t){try{return JSON.parse(t)}catch{return t}}});var zf=T(ze=>{"use strict";var uw=ze&&ze.__extends||(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),io=ze&&ze.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ze,"__esModule",{value:!0});ze.ProcessorLocal=void 0;var lw=Pu(),fw=Cu(),Wf=io(pn()),cw=Lu(),fr=Ki(),hw=Iu(),dw=io(Xf()),pw=io(Ji()),gw=(function(t){uw(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.rowSplit=new hw.RowSplit(r.converter),r.eolEmitted=!1,r._needEmitEol=void 0,r.headEmitted=!1,r._needEmitHead=void 0,r}return e.prototype.flush=function(){var r=this;if(this.runtime.csvLineBuffer&&this.runtime.csvLineBuffer.length>0){var n=this.runtime.csvLineBuffer;return this.runtime.csvLineBuffer=void 0,this.process(n,!0).then(function(i){return r.runtime.csvLineBuffer&&r.runtime.csvLineBuffer.length>0?Promise.reject(pw.default.unclosed_quote(r.runtime.parsedLineNumber,r.runtime.csvLineBuffer.toString())):Promise.resolve(i)})}else return Promise.resolve([])},e.prototype.destroy=function(){return Promise.resolve()},Object.defineProperty(e.prototype,"needEmitEol",{get:function(){return this._needEmitEol===void 0&&(this._needEmitEol=this.converter.listeners("eol").length>0),this._needEmitEol},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"needEmitHead",{get:function(){return this._needEmitHead===void 0&&(this._needEmitHead=this.converter.listeners("header").length>0),this._needEmitHead},enumerable:!1,configurable:!0}),e.prototype.process=function(r,n){var i=this;n===void 0&&(n=!1);var o;return n?o=r.toString():o=(0,fw.prepareData)(r,this.converter.parseRuntime),Promise.resolve().then(function(){return i.runtime.preRawDataHook?i.runtime.preRawDataHook(o):o}).then(function(s){return s&&s.length>0?i.processCSV(s,n):Promise.resolve([])})},e.prototype.processCSV=function(r,n){var i=this,o=this.params,s=this.runtime;s.eol||(0,Wf.default)(r,s),this.needEmitEol&&!this.eolEmitted&&s.eol&&(this.converter.emit("eol",s.eol),this.eolEmitted=!0),o.ignoreEmpty&&!s.started&&(r=(0,fr.trimLeft)(r));var a=(0,cw.stringToLines)(r,s);if(n?(a.lines.push(a.partial),a.partial=""):this.prependLeftBuf((0,fr.bufFromString)(a.partial)),a.lines.length>0){var u=void 0;return s.preFileLineHook?u=this.runPreLineHook(a.lines):u=Promise.resolve(a.lines),u.then(function(d){return!s.started&&!i.runtime.headers?i.processDataWithHead(d):i.processCSVBody(d)})}else return Promise.resolve([])},e.prototype.processDataWithHead=function(r){if(this.params.noheader)this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=[];else{for(var n="",i=[];r.length;){var o=n+r.shift(),s=this.rowSplit.parse(o);if(s.closed){i=s.cells,n="";break}else n=o+(0,Wf.default)(o,this.runtime)}if(this.prependLeftBuf((0,fr.bufFromString)(n)),i.length===0)return[];this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=i}return(this.runtime.needProcessIgnoreColumn||this.runtime.needProcessIncludeColumn)&&this.filterHeader(),this.needEmitHead&&!this.headEmitted&&(this.converter.emit("header",this.runtime.headers),this.headEmitted=!0),this.processCSVBody(r)},e.prototype.filterHeader=function(){if(this.runtime.selectedColumns=[],this.runtime.headers){for(var r=this.runtime.headers,n=0;n<r.length;n++)if(this.params.ignoreColumns)if(this.params.ignoreColumns.test(r[n]))if(this.params.includeColumns&&this.params.includeColumns.test(r[n]))this.runtime.selectedColumns.push(n);else continue;else this.runtime.selectedColumns.push(n);else this.params.includeColumns?this.params.includeColumns.test(r[n])&&this.runtime.selectedColumns.push(n):this.runtime.selectedColumns.push(n);this.runtime.headers=(0,fr.filterArray)(this.runtime.headers,this.runtime.selectedColumns)}},e.prototype.processCSVBody=function(r){if(this.params.output==="line")return r;var n=this.rowSplit.parseMultiLines(r);return this.prependLeftBuf((0,fr.bufFromString)(n.partial)),this.params.output==="csv"?n.rowsCells:(0,dw.default)(n.rowsCells,this.converter)},e.prototype.prependLeftBuf=function(r){r&&(this.runtime.csvLineBuffer?this.runtime.csvLineBuffer=Buffer.concat([r,this.runtime.csvLineBuffer]):this.runtime.csvLineBuffer=r)},e.prototype.runPreLineHook=function(r){var n=this;return new Promise(function(i,o){Gf(r,n.runtime,0,function(s){s?o(s):i(r)})})},e})(lw.Processor);ze.ProcessorLocal=gw;function Gf(t,e,r,n){if(r>=t.length)n();else if(e.preFileLineHook){var i=t[r],o=e.preFileLineHook(i,e.parsedLineNumber+r);if(r++,o&&o.then)o.then(function(s){t[r-1]=s,Gf(t,e,r,n)});else{for(t[r-1]=o;r<t.length;)t[r]=e.preFileLineHook(t[r],e.parsedLineNumber+r),r++;n()}}else n()}});var Kf=T(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.Result=void 0;var vn=$("os"),mw=(function(){function t(e){this.converter=e,this.finalResult=[]}return Object.defineProperty(t.prototype,"needEmitLine",{get:function(){return!!this.converter.parseRuntime.subscribe&&!!this.converter.parseRuntime.subscribe.onNext||this.needPushDownstream},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"needPushDownstream",{get:function(){return this._needPushDownstream===void 0&&(this._needPushDownstream=this.converter.listeners("data").length>0||this.converter.listeners("readable").length>0),this._needPushDownstream},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"needEmitAll",{get:function(){return!!this.converter.parseRuntime.then&&this.converter.parseParam.needEmitAll},enumerable:!1,configurable:!0}),t.prototype.processResult=function(e){var r=this,n=this.converter.parseRuntime.parsedLineNumber;return this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&n===0&&Rt(this.converter,"["+vn.EOL),new Promise(function(i,o){r.needEmitLine?Yf(e,r.converter,0,r.needPushDownstream,function(s){s?o(s):(r.appendFinalResult(e),i(void 0))}):(r.appendFinalResult(e),i(void 0))})},t.prototype.appendFinalResult=function(e){this.needEmitAll&&(this.finalResult=this.finalResult.concat(e)),this.converter.parseRuntime.parsedLineNumber+=e.length},t.prototype.processError=function(e){this.converter.parseRuntime.subscribe&&this.converter.parseRuntime.subscribe.onError&&this.converter.parseRuntime.subscribe.onError(e),this.converter.parseRuntime.then&&this.converter.parseRuntime.then.onrejected&&this.converter.parseRuntime.then.onrejected(e)},t.prototype.endProcess=function(){this.converter.parseRuntime.then&&this.converter.parseRuntime.then.onfulfilled&&(this.needEmitAll?this.converter.parseRuntime.then.onfulfilled(this.finalResult):this.converter.parseRuntime.then.onfulfilled([])),this.converter.parseRuntime.subscribe&&this.converter.parseRuntime.subscribe.onCompleted&&this.converter.parseRuntime.subscribe.onCompleted(),this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&Rt(this.converter,"]"+vn.EOL)},t})();En.Result=mw;function Yf(t,e,r,n,i){if(r>=t.length)i();else if(e.parseRuntime.subscribe&&e.parseRuntime.subscribe.onNext){var o=e.parseRuntime.subscribe.onNext,s=t[r],a=o(s,e.parseRuntime.parsedLineNumber+r);if(r++,a&&a.then)a.then(function(){yw(t,o,e,r,n,i,s)},i);else{for(n&&Rt(e,s);r<t.length;){var u=t[r];o(u,e.parseRuntime.parsedLineNumber+r),r++,n&&Rt(e,u)}i()}}else{if(n)for(;r<t.length;){var u=t[r++];Rt(e,u)}i()}}function yw(t,e,r,n,i,o,s){i&&Rt(r,s),Yf(t,r,n,i,o)}function Rt(t,e){if(typeof e=="object"&&!t.options.objectMode){var r=JSON.stringify(e);t.push(r+(t.parseParam.downstreamFormat==="array"?","+vn.EOL:vn.EOL),"utf8")}else t.push(e)}});var Qf=T(Pt=>{"use strict";var bw=Pt&&Pt.__extends||(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();Object.defineProperty(Pt,"__esModule",{value:!0});Pt.Converter=void 0;var Jf=$("stream"),ww=Mu(),_w=Ru(),vw=zf(),Ew=Kf(),Tw=(function(t){bw(e,t);function e(r,n){n===void 0&&(n={});var i=t.call(this,n)||this;return i.options=n,i.params=(0,ww.mergeParams)(r),i.runtime=(0,_w.initParseRuntime)(i),i.result=new Ew.Result(i),i.processor=new vw.ProcessorLocal(i),i.once("error",function(o){setImmediate(function(){i.result.processError(o),i.emit("done",o)})}),i.once("done",function(){i.processor.destroy()}),i}return e.prototype.preRawData=function(r){return this.runtime.preRawDataHook=r,this},e.prototype.preFileLine=function(r){return this.runtime.preFileLineHook=r,this},e.prototype.subscribe=function(r,n,i){return this.parseRuntime.subscribe={onNext:r,onError:n,onCompleted:i},this},e.prototype.fromFile=function(r,n){var i=this,o=$("fs");return o.exists(r,function(s){if(s){var a=o.createReadStream(r,n);a.pipe(i)}else i.emit("error",new Error("File does not exist at ".concat(r,". Check to make sure the file path to your csv is correct.")))}),this},e.prototype.fromStream=function(r){return r.pipe(this),this},e.prototype.fromString=function(r){var n=r.toString(),i=new Jf.Readable,o=0;return i._read=function(s){if(o>=r.length)this.push(null);else{var a=r.substring(o,o+s);this.push(a),o+=s}},this.fromStream(i)},e.prototype.then=function(r,n){var i=this;return new Promise(function(o,s){i.parseRuntime.then={onfulfilled:function(a){o(r?r(a):a)},onrejected:function(a){n?o(n(a)):s(a)}}})},Object.defineProperty(e.prototype,"parseParam",{get:function(){return this.params},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parseRuntime",{get:function(){return this.runtime},enumerable:!1,configurable:!0}),e.prototype._transform=function(r,n,i){var o=this;this.processor.process(r).then(function(s){if(s.length>0)return o.runtime.started=!0,o.result.processResult(s)}).then(function(){o.emit("drained"),i()},function(s){o.runtime.hasError=!0,o.runtime.error=s,o.emit("error",s),i()})},e.prototype._flush=function(r){var n=this;this.processor.flush().then(function(i){if(i.length>0)return n.result.processResult(i)}).then(function(){n.processEnd(r)},function(i){n.emit("error",i),r()})},e.prototype.processEnd=function(r){this.result.endProcess(),this.emit("done"),r()},Object.defineProperty(e.prototype,"parsedLineNumber",{get:function(){return this.runtime.parsedLineNumber},enumerable:!1,configurable:!0}),e})(Jf.Transform);Pt.Converter=Tw});var tc=T((ox,ec)=>{"use strict";var Zf=Qf(),Tn=function(t,e){return new Zf.Converter(t,e)};Tn.csv=Tn;Tn.Converter=Zf.Converter;ec.exports=Tn});var ye=T((sx,rc)=>{"use strict";var oo=class t extends Error{constructor(e){super(`Format functions must be synchronous taking a two arguments: (info, opts)
|
|
17
|
+
`}});var Wu=S(ur=>{"use strict";var Qg=ur&&ur.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ur,"__esModule",{value:!0});ur.stringToLines=ey;var Zg=Qg(En());function ey(t,e){var r=(0,Zg.default)(t,e),n=t.split(r),i=n.pop()||"";return{lines:n,partial:i}}});var ao=S(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.trimRight=ke.trimLeft=void 0;ke.bufFromString=ty;ke.emptyBuffer=ry;ke.filterArray=ny;function ty(t){var e=Buffer.byteLength(t),r=Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e);return r.write(t),r}function ry(){var t=Buffer.allocUnsafe?Buffer.allocUnsafe(0):new Buffer(0);return t}function ny(t,e){for(var r=[],n=0;n<t.length;n++)e.indexOf(n)>-1&&r.push(t[n]);return r}var iy=function(e){return e.trimStart()};ke.trimLeft=iy;var oy=function(e){return e.trimEnd()};ke.trimRight=oy});var Xu=S(Pt=>{"use strict";var sy=Pt&&Pt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Pt,"__esModule",{value:!0});Pt.RowSplit=void 0;var ay=sy(En()),xt=ao(),uy=[",","|"," ",";",":"],ly=(function(){function t(e){this.conv=e,this.cachedRegExp={},this.delimiterEmitted=!1,this._needEmitDelimiter=void 0,this.quote=e.parseParam.quote,this.trim=e.parseParam.trim,this.escape=e.parseParam.escape}return Object.defineProperty(t.prototype,"needEmitDelimiter",{get:function(){return this._needEmitDelimiter===void 0&&(this._needEmitDelimiter=this.conv.listeners("delimiter").length>0),this._needEmitDelimiter},enumerable:!1,configurable:!0}),t.prototype.parse=function(e){if(e.length===0||this.conv.parseParam.ignoreEmpty&&e.trim().length===0)return{cells:[],closed:!0};var r=this.quote,n=this.trim,i=this.escape;(this.conv.parseRuntime.delimiter instanceof Array||this.conv.parseRuntime.delimiter.toLowerCase()==="auto")&&(this.conv.parseRuntime.delimiter=this.getDelimiter(e)),this.needEmitDelimiter&&!this.delimiterEmitted&&(this.conv.emit("delimiter",this.conv.parseRuntime.delimiter),this.delimiterEmitted=!0);var o=this.conv.parseRuntime.delimiter,s=e.split(o);if(r==="off"){if(n)for(var a=0;a<s.length;a++)s[a]=s[a].trim();return{cells:s,closed:!0}}else return this.toCSVRow(s,n,r,o)},t.prototype.toCSVRow=function(e,r,n,i){for(var o=[],s=!1,a="",u=0,d=e.length;u<d;u++){var w=e[u];!s&&r&&(w=(0,xt.trimLeft)(w));var E=w.length;if(s)this.isQuoteClose(w)?(s=!1,w=w.substr(0,E-1),a+=i+w,a=this.escapeQuote(a),r&&(a=(0,xt.trimRight)(a)),o.push(a),a=""):a+=i+w;else if(E===2&&w===this.quote+this.quote){o.push("");continue}else if(this.isQuoteOpen(w))if(w=w.substr(1),this.isQuoteClose(w)){w=w.substr(0,w.lastIndexOf(n)),w=this.escapeQuote(w),o.push(w);continue}else if(w.indexOf(n)!==-1){for(var y=0,g="",h=0,v=w;h<v.length;h++){var I=v[h];I===n&&g!==this.escape?(y++,g=""):g=I}if(y%2===1){r&&(w=(0,xt.trimRight)(w)),o.push(n+w);continue}else{s=!0,a+=w;continue}}else{s=!0,a+=w;continue}else{r&&(w=(0,xt.trimRight)(w)),o.push(w);continue}}return{cells:o,closed:!s}},t.prototype.getDelimiter=function(e){var r;if(this.conv.parseParam.delimiter==="auto")r=uy;else if(this.conv.parseParam.delimiter instanceof Array)r=this.conv.parseParam.delimiter;else return this.conv.parseParam.delimiter;var n=0,i=",";return r.forEach(function(o){var s=e.split(o).length;s>n&&(i=o,n=s)}),i},t.prototype.isQuoteOpen=function(e){var r=this.quote,n=this.escape;return e[0]===r&&(e[1]!==r||e[1]===n&&(e[2]===r||e.length===2))},t.prototype.isQuoteClose=function(e){var r=this.quote,n=this.escape;this.conv.parseParam.trim&&(e=(0,xt.trimRight)(e));for(var i=0,o=e.length-1;e[o]===r||e[o]===n;)o--,i++;return i%2!==0},t.prototype.escapeQuote=function(e){var r="es|"+this.quote+"|"+this.escape;this.cachedRegExp[r]===void 0&&(this.cachedRegExp[r]=new RegExp("\\"+this.escape+"\\"+this.quote,"g"));var n=this.cachedRegExp[r];return e.replace(n,this.quote)},t.prototype.parseMultiLines=function(e){for(var r=[],n="";e.length;){var i=n+e.shift(),o=this.parse(i);o.cells.length===0&&this.conv.parseParam.ignoreEmpty||(o.closed||this.conv.parseParam.alwaysSplitAtEOL?(this.conv.parseRuntime.selectedColumns?r.push((0,xt.filterArray)(o.cells,this.conv.parseRuntime.selectedColumns)):r.push(o.cells),n=""):n=i+((0,ay.default)(i,this.conv.parseRuntime)||`
|
|
18
|
+
`))}return{rowsCells:r,partial:n}},t})();Pt.RowSplit=ly});var uo=S(lr=>{"use strict";var fy=lr&&lr.__extends||(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();Object.defineProperty(lr,"__esModule",{value:!0});var cy=(function(t){fy(e,t);function e(r,n,i){var o=t.call(this,"Error: "+r+". JSON Line number: "+n+(i?" near: "+i:""))||this;return o.err=r,o.line=n,o.extra=i,o.name="CSV Parse Error",o}return e.column_mismatched=function(r,n){return new e("column_mismatched",r,n)},e.unclosed_quote=function(r,n){return new e("unclosed_quote",r,n)},e.fromJSON=function(r){return new e(r.err,r.line,r.extra)},e.prototype.toJSON=function(){return{err:this.err,line:this.line,extra:this.extra}},e})(Error);lr.default=cy});var Ku=S((ZD,Gu)=>{"use strict";var hy=typeof global=="object"&&global&&global.Object===Object&&global;Gu.exports=hy});var Sn=S((ex,Yu)=>{"use strict";var dy=Ku(),py=typeof self=="object"&&self&&self.Object===Object&&self,my=dy||py||Function("return this")();Yu.exports=my});var Tn=S((tx,zu)=>{"use strict";var gy=Sn(),yy=gy.Symbol;zu.exports=yy});var el=S((rx,Zu)=>{"use strict";var Ju=Tn(),Qu=Object.prototype,by=Qu.hasOwnProperty,wy=Qu.toString,fr=Ju?Ju.toStringTag:void 0;function _y(t){var e=by.call(t,fr),r=t[fr];try{t[fr]=void 0;var n=!0}catch{}var i=wy.call(t);return n&&(e?t[fr]=r:delete t[fr]),i}Zu.exports=_y});var rl=S((nx,tl)=>{"use strict";var vy=Object.prototype,Ey=vy.toString;function Sy(t){return Ey.call(t)}tl.exports=Sy});var lo=S((ix,ol)=>{"use strict";var nl=Tn(),Ty=el(),Oy=rl(),Dy="[object Null]",xy="[object Undefined]",il=nl?nl.toStringTag:void 0;function Py(t){return t==null?t===void 0?xy:Dy:il&&il in Object(t)?Ty(t):Oy(t)}ol.exports=Py});var On=S((ox,sl)=>{"use strict";function My(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}sl.exports=My});var ul=S((sx,al)=>{"use strict";var Ny=lo(),Ry=On(),Iy="[object AsyncFunction]",Ly="[object Function]",Ay="[object GeneratorFunction]",Cy="[object Proxy]";function qy(t){if(!Ry(t))return!1;var e=Ny(t);return e==Ly||e==Ay||e==Iy||e==Cy}al.exports=qy});var fl=S((ax,ll)=>{"use strict";var jy=Sn(),Fy=jy["__core-js_shared__"];ll.exports=Fy});var dl=S((ux,hl)=>{"use strict";var fo=fl(),cl=(function(){var t=/[^.]+$/.exec(fo&&fo.keys&&fo.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function ky(t){return!!cl&&cl in t}hl.exports=ky});var ml=S((lx,pl)=>{"use strict";var By=Function.prototype,$y=By.toString;function Uy(t){if(t!=null){try{return $y.call(t)}catch{}try{return t+""}catch{}}return""}pl.exports=Uy});var yl=S((fx,gl)=>{"use strict";var Vy=ul(),Hy=dl(),Wy=On(),Xy=ml(),Gy=/[\\^$.*+?()[\]{}|]/g,Ky=/^\[object .+?Constructor\]$/,Yy=Function.prototype,zy=Object.prototype,Jy=Yy.toString,Qy=zy.hasOwnProperty,Zy=RegExp("^"+Jy.call(Qy).replace(Gy,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function eb(t){if(!Wy(t)||Hy(t))return!1;var e=Vy(t)?Zy:Ky;return e.test(Xy(t))}gl.exports=eb});var wl=S((cx,bl)=>{"use strict";function tb(t,e){return t?.[e]}bl.exports=tb});var Dn=S((hx,_l)=>{"use strict";var rb=yl(),nb=wl();function ib(t,e){var r=nb(t,e);return rb(r)?r:void 0}_l.exports=ib});var El=S((dx,vl)=>{"use strict";var ob=Dn(),sb=(function(){try{var t=ob(Object,"defineProperty");return t({},"",{}),t}catch{}})();vl.exports=sb});var Ol=S((px,Tl)=>{"use strict";var Sl=El();function ab(t,e,r){e=="__proto__"&&Sl?Sl(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}Tl.exports=ab});var co=S((mx,Dl)=>{"use strict";function ub(t,e){return t===e||t!==t&&e!==e}Dl.exports=ub});var Pl=S((gx,xl)=>{"use strict";var lb=Ol(),fb=co(),cb=Object.prototype,hb=cb.hasOwnProperty;function db(t,e,r){var n=t[e];(!(hb.call(t,e)&&fb(n,r))||r===void 0&&!(e in t))&&lb(t,e,r)}xl.exports=db});var xn=S((yx,Ml)=>{"use strict";var pb=Array.isArray;Ml.exports=pb});var Rl=S((bx,Nl)=>{"use strict";function mb(t){return t!=null&&typeof t=="object"}Nl.exports=mb});var Pn=S((wx,Il)=>{"use strict";var gb=lo(),yb=Rl(),bb="[object Symbol]";function wb(t){return typeof t=="symbol"||yb(t)&&gb(t)==bb}Il.exports=wb});var Al=S((_x,Ll)=>{"use strict";var _b=xn(),vb=Pn(),Eb=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sb=/^\w*$/;function Tb(t,e){if(_b(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||vb(t)?!0:Sb.test(t)||!Eb.test(t)||e!=null&&t in Object(e)}Ll.exports=Tb});var cr=S((vx,Cl)=>{"use strict";var Ob=Dn(),Db=Ob(Object,"create");Cl.exports=Db});var Fl=S((Ex,jl)=>{"use strict";var ql=cr();function xb(){this.__data__=ql?ql(null):{},this.size=0}jl.exports=xb});var Bl=S((Sx,kl)=>{"use strict";function Pb(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}kl.exports=Pb});var Ul=S((Tx,$l)=>{"use strict";var Mb=cr(),Nb="__lodash_hash_undefined__",Rb=Object.prototype,Ib=Rb.hasOwnProperty;function Lb(t){var e=this.__data__;if(Mb){var r=e[t];return r===Nb?void 0:r}return Ib.call(e,t)?e[t]:void 0}$l.exports=Lb});var Hl=S((Ox,Vl)=>{"use strict";var Ab=cr(),Cb=Object.prototype,qb=Cb.hasOwnProperty;function jb(t){var e=this.__data__;return Ab?e[t]!==void 0:qb.call(e,t)}Vl.exports=jb});var Xl=S((Dx,Wl)=>{"use strict";var Fb=cr(),kb="__lodash_hash_undefined__";function Bb(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Fb&&e===void 0?kb:e,this}Wl.exports=Bb});var Kl=S((xx,Gl)=>{"use strict";var $b=Fl(),Ub=Bl(),Vb=Ul(),Hb=Hl(),Wb=Xl();function Mt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Mt.prototype.clear=$b;Mt.prototype.delete=Ub;Mt.prototype.get=Vb;Mt.prototype.has=Hb;Mt.prototype.set=Wb;Gl.exports=Mt});var zl=S((Px,Yl)=>{"use strict";function Xb(){this.__data__=[],this.size=0}Yl.exports=Xb});var hr=S((Mx,Jl)=>{"use strict";var Gb=co();function Kb(t,e){for(var r=t.length;r--;)if(Gb(t[r][0],e))return r;return-1}Jl.exports=Kb});var Zl=S((Nx,Ql)=>{"use strict";var Yb=hr(),zb=Array.prototype,Jb=zb.splice;function Qb(t){var e=this.__data__,r=Yb(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Jb.call(e,r,1),--this.size,!0}Ql.exports=Qb});var tf=S((Rx,ef)=>{"use strict";var Zb=hr();function e0(t){var e=this.__data__,r=Zb(e,t);return r<0?void 0:e[r][1]}ef.exports=e0});var nf=S((Ix,rf)=>{"use strict";var t0=hr();function r0(t){return t0(this.__data__,t)>-1}rf.exports=r0});var sf=S((Lx,of)=>{"use strict";var n0=hr();function i0(t,e){var r=this.__data__,n=n0(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}of.exports=i0});var uf=S((Ax,af)=>{"use strict";var o0=zl(),s0=Zl(),a0=tf(),u0=nf(),l0=sf();function Nt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Nt.prototype.clear=o0;Nt.prototype.delete=s0;Nt.prototype.get=a0;Nt.prototype.has=u0;Nt.prototype.set=l0;af.exports=Nt});var ff=S((Cx,lf)=>{"use strict";var f0=Dn(),c0=Sn(),h0=f0(c0,"Map");lf.exports=h0});var df=S((qx,hf)=>{"use strict";var cf=Kl(),d0=uf(),p0=ff();function m0(){this.size=0,this.__data__={hash:new cf,map:new(p0||d0),string:new cf}}hf.exports=m0});var mf=S((jx,pf)=>{"use strict";function g0(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}pf.exports=g0});var dr=S((Fx,gf)=>{"use strict";var y0=mf();function b0(t,e){var r=t.__data__;return y0(e)?r[typeof e=="string"?"string":"hash"]:r.map}gf.exports=b0});var bf=S((kx,yf)=>{"use strict";var w0=dr();function _0(t){var e=w0(this,t).delete(t);return this.size-=e?1:0,e}yf.exports=_0});var _f=S((Bx,wf)=>{"use strict";var v0=dr();function E0(t){return v0(this,t).get(t)}wf.exports=E0});var Ef=S(($x,vf)=>{"use strict";var S0=dr();function T0(t){return S0(this,t).has(t)}vf.exports=T0});var Tf=S((Ux,Sf)=>{"use strict";var O0=dr();function D0(t,e){var r=O0(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}Sf.exports=D0});var Df=S((Vx,Of)=>{"use strict";var x0=df(),P0=bf(),M0=_f(),N0=Ef(),R0=Tf();function Rt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Rt.prototype.clear=x0;Rt.prototype.delete=P0;Rt.prototype.get=M0;Rt.prototype.has=N0;Rt.prototype.set=R0;Of.exports=Rt});var Mf=S((Hx,Pf)=>{"use strict";var xf=Df(),I0="Expected a function";function ho(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(I0);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(ho.Cache||xf),r}ho.Cache=xf;Pf.exports=ho});var Rf=S((Wx,Nf)=>{"use strict";var L0=Mf(),A0=500;function C0(t){var e=L0(t,function(n){return r.size===A0&&r.clear(),n}),r=e.cache;return e}Nf.exports=C0});var Lf=S((Xx,If)=>{"use strict";var q0=Rf(),j0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,F0=/\\(\\)?/g,k0=q0(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(j0,function(r,n,i,o){e.push(i?o.replace(F0,"$1"):n||r)}),e});If.exports=k0});var Cf=S((Gx,Af)=>{"use strict";function B0(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}Af.exports=B0});var $f=S((Kx,Bf)=>{"use strict";var qf=Tn(),$0=Cf(),U0=xn(),V0=Pn(),H0=1/0,jf=qf?qf.prototype:void 0,Ff=jf?jf.toString:void 0;function kf(t){if(typeof t=="string")return t;if(U0(t))return $0(t,kf)+"";if(V0(t))return Ff?Ff.call(t):"";var e=t+"";return e=="0"&&1/t==-H0?"-0":e}Bf.exports=kf});var Vf=S((Yx,Uf)=>{"use strict";var W0=$f();function X0(t){return t==null?"":W0(t)}Uf.exports=X0});var Wf=S((zx,Hf)=>{"use strict";var G0=xn(),K0=Al(),Y0=Lf(),z0=Vf();function J0(t,e){return G0(t)?t:K0(t,e)?[t]:Y0(z0(t))}Hf.exports=J0});var Gf=S((Jx,Xf)=>{"use strict";var Q0=9007199254740991,Z0=/^(?:0|[1-9]\d*)$/;function ew(t,e){var r=typeof t;return e=e??Q0,!!e&&(r=="number"||r!="symbol"&&Z0.test(t))&&t>-1&&t%1==0&&t<e}Xf.exports=ew});var Yf=S((Qx,Kf)=>{"use strict";var tw=Pn(),rw=1/0;function nw(t){if(typeof t=="string"||tw(t))return t;var e=t+"";return e=="0"&&1/t==-rw?"-0":e}Kf.exports=nw});var Qf=S((Zx,Jf)=>{"use strict";var iw=Pl(),ow=Wf(),sw=Gf(),zf=On(),aw=Yf();function uw(t,e,r,n){if(!zf(t))return t;e=ow(e,t);for(var i=-1,o=e.length,s=o-1,a=t;a!=null&&++i<o;){var u=aw(e[i]),d=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(i!=s){var w=a[u];d=n?n(w,u,a):void 0,d===void 0&&(d=zf(w)?w:sw(e[i+1])?[]:{})}iw(a,u,d),a=a[u]}return t}Jf.exports=uw});var ec=S((eP,Zf)=>{"use strict";var lw=Qf();function fw(t,e,r){return t==null?t:lw(t,e,r)}Zf.exports=fw});var nc=S(mr=>{"use strict";var rc=mr&&mr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(mr,"__esModule",{value:!0});mr.default=pw;var cw=rc(uo()),hw=rc(ec()),dw=/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;function pw(t,e){for(var r=[],n=0,i=t.length;n<i;n++){var o=mw(t[n],e,n);o&&r.push(o)}return r}function mw(t,e,r){if(e.parseParam.checkColumn&&e.parseRuntime.headers&&t.length!==e.parseRuntime.headers.length)throw cw.default.column_mismatched(e.parseRuntime.parsedLineNumber+r);var n=e.parseRuntime.headers||[],i=gw(t,n,e);return i||null}function gw(t,e,r){for(var n=!1,i={},o=0,s=t.length;o<s;o++){var a=t[o];if(!(r.parseParam.ignoreEmpty&&a==="")){n=!0;var u=e[o];(!u||u==="")&&(u=e[o]="field"+(o+1));var d=bw(u,o,r);if(d){var w=d(a,u,i,t,o);w!==void 0&&tc(i,u,w,r,o)}else{if(r.parseParam.checkType){var E=_w(a,u,o,r);a=E(a)}a!==void 0&&tc(i,u,a,r,o)}}}return n?i:null}var yw={string:pr,number:mo,omit:function(){}};function bw(t,e,r){if(r.parseRuntime.columnConv[e]!==void 0)return r.parseRuntime.columnConv[e];var n=r.parseParam.colParser[t];if(n===void 0)return r.parseRuntime.columnConv[e]=null;if(typeof n=="object"&&(n=n.cellParser||"string"),typeof n=="string"){n=n.trim().toLowerCase();var i=yw[n];return i?r.parseRuntime.columnConv[e]=i:r.parseRuntime.columnConv[e]=null}else return typeof n=="function"?r.parseRuntime.columnConv[e]=n:r.parseRuntime.columnConv[e]=null}function tc(t,e,r,n,i){if(!n.parseRuntime.columnValueSetter[i])if(n.parseParam.flatKeys)n.parseRuntime.columnValueSetter[i]=po;else if(e.indexOf(".")>-1){for(var o=e.split("."),s=!0;o.length>0;){var a=o.shift();if(a.length===0){s=!1;break}}!s||n.parseParam.colParser[e]&&n.parseParam.colParser[e].flat?n.parseRuntime.columnValueSetter[i]=po:n.parseRuntime.columnValueSetter[i]=ww}else n.parseRuntime.columnValueSetter[i]=po;n.parseParam.nullObject===!0&&r==="null"&&(r=null),n.parseRuntime.columnValueSetter[i](t,e,r)}function po(t,e,r){t[e]=r}function ww(t,e,r){(0,hw.default)(t,e,r)}function _w(t,e,r,n){return n.parseRuntime.headerType[r]?n.parseRuntime.headerType[r]:e.indexOf("number#!")>-1?n.parseRuntime.headerType[r]=mo:e.indexOf("string#!")>-1?n.parseRuntime.headerType[r]=pr:n.parseParam.checkType?n.parseRuntime.headerType[r]=vw:n.parseRuntime.headerType[r]=pr}function mo(t){var e=parseFloat(t);return isNaN(e)?t:e}function pr(t){return t.toString()}function vw(t){var e=t.trim();return e===""?pr(t):dw.test(e)?mo(t):e.length===5&&e.toLowerCase()==="false"||e.length===4&&e.toLowerCase()==="true"?Ew(t):e[0]==="{"&&e[e.length-1]==="}"||e[0]==="["&&e[e.length-1]==="]"?Sw(t):pr(t)}function Ew(t){var e=t.trim();return!(e.length===5&&e.toLowerCase()==="false")}function Sw(t){try{return JSON.parse(t)}catch{return t}}});var sc=S(ze=>{"use strict";var Tw=ze&&ze.__extends||(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),go=ze&&ze.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ze,"__esModule",{value:!0});ze.ProcessorLocal=void 0;var Ow=Vu(),Dw=Hu(),ic=go(En()),xw=Wu(),gr=ao(),Pw=Xu(),Mw=go(nc()),Nw=go(uo()),Rw=(function(t){Tw(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.rowSplit=new Pw.RowSplit(r.converter),r.eolEmitted=!1,r._needEmitEol=void 0,r.headEmitted=!1,r._needEmitHead=void 0,r}return e.prototype.flush=function(){var r=this;if(this.runtime.csvLineBuffer&&this.runtime.csvLineBuffer.length>0){var n=this.runtime.csvLineBuffer;return this.runtime.csvLineBuffer=void 0,this.process(n,!0).then(function(i){return r.runtime.csvLineBuffer&&r.runtime.csvLineBuffer.length>0?Promise.reject(Nw.default.unclosed_quote(r.runtime.parsedLineNumber,r.runtime.csvLineBuffer.toString())):Promise.resolve(i)})}else return Promise.resolve([])},e.prototype.destroy=function(){return Promise.resolve()},Object.defineProperty(e.prototype,"needEmitEol",{get:function(){return this._needEmitEol===void 0&&(this._needEmitEol=this.converter.listeners("eol").length>0),this._needEmitEol},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"needEmitHead",{get:function(){return this._needEmitHead===void 0&&(this._needEmitHead=this.converter.listeners("header").length>0),this._needEmitHead},enumerable:!1,configurable:!0}),e.prototype.process=function(r,n){var i=this;n===void 0&&(n=!1);var o;return n?o=r.toString():o=(0,Dw.prepareData)(r,this.converter.parseRuntime),Promise.resolve().then(function(){return i.runtime.preRawDataHook?i.runtime.preRawDataHook(o):o}).then(function(s){return s&&s.length>0?i.processCSV(s,n):Promise.resolve([])})},e.prototype.processCSV=function(r,n){var i=this,o=this.params,s=this.runtime;s.eol||(0,ic.default)(r,s),this.needEmitEol&&!this.eolEmitted&&s.eol&&(this.converter.emit("eol",s.eol),this.eolEmitted=!0),o.ignoreEmpty&&!s.started&&(r=(0,gr.trimLeft)(r));var a=(0,xw.stringToLines)(r,s);if(n?(a.lines.push(a.partial),a.partial=""):this.prependLeftBuf((0,gr.bufFromString)(a.partial)),a.lines.length>0){var u=void 0;return s.preFileLineHook?u=this.runPreLineHook(a.lines):u=Promise.resolve(a.lines),u.then(function(d){return!s.started&&!i.runtime.headers?i.processDataWithHead(d):i.processCSVBody(d)})}else return Promise.resolve([])},e.prototype.processDataWithHead=function(r){if(this.params.noheader)this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=[];else{for(var n="",i=[];r.length;){var o=n+r.shift(),s=this.rowSplit.parse(o);if(s.closed){i=s.cells,n="";break}else n=o+(0,ic.default)(o,this.runtime)}if(this.prependLeftBuf((0,gr.bufFromString)(n)),i.length===0)return[];this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=i}return(this.runtime.needProcessIgnoreColumn||this.runtime.needProcessIncludeColumn)&&this.filterHeader(),this.needEmitHead&&!this.headEmitted&&(this.converter.emit("header",this.runtime.headers),this.headEmitted=!0),this.processCSVBody(r)},e.prototype.filterHeader=function(){if(this.runtime.selectedColumns=[],this.runtime.headers){for(var r=this.runtime.headers,n=0;n<r.length;n++)if(this.params.ignoreColumns)if(this.params.ignoreColumns.test(r[n]))if(this.params.includeColumns&&this.params.includeColumns.test(r[n]))this.runtime.selectedColumns.push(n);else continue;else this.runtime.selectedColumns.push(n);else this.params.includeColumns?this.params.includeColumns.test(r[n])&&this.runtime.selectedColumns.push(n):this.runtime.selectedColumns.push(n);this.runtime.headers=(0,gr.filterArray)(this.runtime.headers,this.runtime.selectedColumns)}},e.prototype.processCSVBody=function(r){if(this.params.output==="line")return r;var n=this.rowSplit.parseMultiLines(r);return this.prependLeftBuf((0,gr.bufFromString)(n.partial)),this.params.output==="csv"?n.rowsCells:(0,Mw.default)(n.rowsCells,this.converter)},e.prototype.prependLeftBuf=function(r){r&&(this.runtime.csvLineBuffer?this.runtime.csvLineBuffer=Buffer.concat([r,this.runtime.csvLineBuffer]):this.runtime.csvLineBuffer=r)},e.prototype.runPreLineHook=function(r){var n=this;return new Promise(function(i,o){oc(r,n.runtime,0,function(s){s?o(s):i(r)})})},e})(Ow.Processor);ze.ProcessorLocal=Rw;function oc(t,e,r,n){if(r>=t.length)n();else if(e.preFileLineHook){var i=t[r],o=e.preFileLineHook(i,e.parsedLineNumber+r);if(r++,o&&o.then)o.then(function(s){t[r-1]=s,oc(t,e,r,n)});else{for(t[r-1]=o;r<t.length;)t[r]=e.preFileLineHook(t[r],e.parsedLineNumber+r),r++;n()}}else n()}});var uc=S(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.Result=void 0;var Mn=$("os"),Iw=(function(){function t(e){this.converter=e,this.finalResult=[]}return Object.defineProperty(t.prototype,"needEmitLine",{get:function(){return!!this.converter.parseRuntime.subscribe&&!!this.converter.parseRuntime.subscribe.onNext||this.needPushDownstream},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"needPushDownstream",{get:function(){return this._needPushDownstream===void 0&&(this._needPushDownstream=this.converter.listeners("data").length>0||this.converter.listeners("readable").length>0),this._needPushDownstream},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"needEmitAll",{get:function(){return!!this.converter.parseRuntime.then&&this.converter.parseParam.needEmitAll},enumerable:!1,configurable:!0}),t.prototype.processResult=function(e){var r=this,n=this.converter.parseRuntime.parsedLineNumber;return this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&n===0&&It(this.converter,"["+Mn.EOL),new Promise(function(i,o){r.needEmitLine?ac(e,r.converter,0,r.needPushDownstream,function(s){s?o(s):(r.appendFinalResult(e),i(void 0))}):(r.appendFinalResult(e),i(void 0))})},t.prototype.appendFinalResult=function(e){this.needEmitAll&&(this.finalResult=this.finalResult.concat(e)),this.converter.parseRuntime.parsedLineNumber+=e.length},t.prototype.processError=function(e){this.converter.parseRuntime.subscribe&&this.converter.parseRuntime.subscribe.onError&&this.converter.parseRuntime.subscribe.onError(e),this.converter.parseRuntime.then&&this.converter.parseRuntime.then.onrejected&&this.converter.parseRuntime.then.onrejected(e)},t.prototype.endProcess=function(){this.converter.parseRuntime.then&&this.converter.parseRuntime.then.onfulfilled&&(this.needEmitAll?this.converter.parseRuntime.then.onfulfilled(this.finalResult):this.converter.parseRuntime.then.onfulfilled([])),this.converter.parseRuntime.subscribe&&this.converter.parseRuntime.subscribe.onCompleted&&this.converter.parseRuntime.subscribe.onCompleted(),this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&It(this.converter,"]"+Mn.EOL)},t})();Nn.Result=Iw;function ac(t,e,r,n,i){if(r>=t.length)i();else if(e.parseRuntime.subscribe&&e.parseRuntime.subscribe.onNext){var o=e.parseRuntime.subscribe.onNext,s=t[r],a=o(s,e.parseRuntime.parsedLineNumber+r);if(r++,a&&a.then)a.then(function(){Lw(t,o,e,r,n,i,s)},i);else{for(n&&It(e,s);r<t.length;){var u=t[r];o(u,e.parseRuntime.parsedLineNumber+r),r++,n&&It(e,u)}i()}}else{if(n)for(;r<t.length;){var u=t[r++];It(e,u)}i()}}function Lw(t,e,r,n,i,o,s){i&&It(r,s),ac(t,r,n,i,o)}function It(t,e){if(typeof e=="object"&&!t.options.objectMode){var r=JSON.stringify(e);t.push(r+(t.parseParam.downstreamFormat==="array"?","+Mn.EOL:Mn.EOL),"utf8")}else t.push(e)}});var fc=S(Lt=>{"use strict";var Aw=Lt&&Lt.__extends||(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();Object.defineProperty(Lt,"__esModule",{value:!0});Lt.Converter=void 0;var lc=$("stream"),Cw=$u(),qw=Uu(),jw=sc(),Fw=uc(),kw=(function(t){Aw(e,t);function e(r,n){n===void 0&&(n={});var i=t.call(this,n)||this;return i.options=n,i.params=(0,Cw.mergeParams)(r),i.runtime=(0,qw.initParseRuntime)(i),i.result=new Fw.Result(i),i.processor=new jw.ProcessorLocal(i),i.once("error",function(o){setImmediate(function(){i.result.processError(o),i.emit("done",o)})}),i.once("done",function(){i.processor.destroy()}),i}return e.prototype.preRawData=function(r){return this.runtime.preRawDataHook=r,this},e.prototype.preFileLine=function(r){return this.runtime.preFileLineHook=r,this},e.prototype.subscribe=function(r,n,i){return this.parseRuntime.subscribe={onNext:r,onError:n,onCompleted:i},this},e.prototype.fromFile=function(r,n){var i=this,o=$("fs");return o.exists(r,function(s){if(s){var a=o.createReadStream(r,n);a.pipe(i)}else i.emit("error",new Error("File does not exist at ".concat(r,". Check to make sure the file path to your csv is correct.")))}),this},e.prototype.fromStream=function(r){return r.pipe(this),this},e.prototype.fromString=function(r){var n=r.toString(),i=new lc.Readable,o=0;return i._read=function(s){if(o>=r.length)this.push(null);else{var a=r.substring(o,o+s);this.push(a),o+=s}},this.fromStream(i)},e.prototype.then=function(r,n){var i=this;return new Promise(function(o,s){i.parseRuntime.then={onfulfilled:function(a){o(r?r(a):a)},onrejected:function(a){n?o(n(a)):s(a)}}})},Object.defineProperty(e.prototype,"parseParam",{get:function(){return this.params},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parseRuntime",{get:function(){return this.runtime},enumerable:!1,configurable:!0}),e.prototype._transform=function(r,n,i){var o=this;this.processor.process(r).then(function(s){if(s.length>0)return o.runtime.started=!0,o.result.processResult(s)}).then(function(){o.emit("drained"),i()},function(s){o.runtime.hasError=!0,o.runtime.error=s,o.emit("error",s),i()})},e.prototype._flush=function(r){var n=this;this.processor.flush().then(function(i){if(i.length>0)return n.result.processResult(i)}).then(function(){n.processEnd(r)},function(i){n.emit("error",i),r()})},e.prototype.processEnd=function(r){this.result.endProcess(),this.emit("done"),r()},Object.defineProperty(e.prototype,"parsedLineNumber",{get:function(){return this.runtime.parsedLineNumber},enumerable:!1,configurable:!0}),e})(lc.Transform);Lt.Converter=kw});var dc=S((oP,hc)=>{"use strict";var cc=fc(),Rn=function(t,e){return new cc.Converter(t,e)};Rn.csv=Rn;Rn.Converter=cc.Converter;hc.exports=Rn});var be=S((sP,pc)=>{"use strict";var yo=class t extends Error{constructor(e){super(`Format functions must be synchronous taking a two arguments: (info, opts)
|
|
19
19
|
Found: ${e.toString().split(`
|
|
20
20
|
`)[0]}
|
|
21
|
-
`),Error.captureStackTrace(this,t)}};
|
|
22
|
-
`)!=-1,n=this._styles,i=n.length;i--;){var o=
|
|
23
|
-
`));return!0}
|
|
21
|
+
`),Error.captureStackTrace(this,t)}};pc.exports=t=>{if(t.length>2)throw new yo(t);function e(n={}){this.options=n}e.prototype.transform=t;function r(n){return new e(n)}return r.Format=e,r}});var bc=S((aP,yc)=>{"use strict";var gc={};yc.exports=gc;var mc={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(mc).forEach(function(t){var e=mc[t],r=gc[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m"})});var _c=S((uP,wc)=>{"use strict";wc.exports=function(t,e){e=e||process.argv||[];var r=e.indexOf("--"),n=/^-{1,2}/.test(t)?"":"--",i=e.indexOf(n+t);return i!==-1&&(r===-1?!0:i<r)}});var Ec=S((lP,vc)=>{"use strict";var Bw=$("os"),Te=_c(),ge=process.env,At=void 0;Te("no-color")||Te("no-colors")||Te("color=false")?At=!1:(Te("color")||Te("colors")||Te("color=true")||Te("color=always"))&&(At=!0);"FORCE_COLOR"in ge&&(At=ge.FORCE_COLOR.length===0||parseInt(ge.FORCE_COLOR,10)!==0);function $w(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Uw(t){if(At===!1)return 0;if(Te("color=16m")||Te("color=full")||Te("color=truecolor"))return 3;if(Te("color=256"))return 2;if(t&&!t.isTTY&&At!==!0)return 0;var e=At?1:0;if(process.platform==="win32"){var r=Bw.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in ge)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(i){return i in ge})||ge.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in ge)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ge.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in ge){var n=parseInt((ge.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ge.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ge.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(ge.TERM)||"COLORTERM"in ge?1:(ge.TERM==="dumb",e)}function bo(t){var e=Uw(t);return $w(e)}vc.exports={supportsColor:bo,stdout:bo(process.stdout),stderr:bo(process.stderr)}});var Tc=S((fP,Sc)=>{"use strict";Sc.exports=function(e,r){var n="";e=e||"Run the trap, drop the bass",e=e.split("");var i={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return e.forEach(function(o){o=o.toLowerCase();var s=i[o]||[" "],a=Math.floor(Math.random()*s.length);typeof i[o]<"u"?n+=i[o][a]:n+=o}),n}});var Dc=S((cP,Oc)=>{"use strict";Oc.exports=function(e,r){e=e||" he is here ";var n={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},i=[].concat(n.up,n.down,n.mid);function o(u){var d=Math.floor(Math.random()*u);return d}function s(u){var d=!1;return i.filter(function(w){d=w===u}),d}function a(u,d){var w="",E,y;d=d||{},d.up=typeof d.up<"u"?d.up:!0,d.mid=typeof d.mid<"u"?d.mid:!0,d.down=typeof d.down<"u"?d.down:!0,d.size=typeof d.size<"u"?d.size:"maxi",u=u.split("");for(y in u)if(!s(y)){switch(w=w+u[y],E={up:0,down:0,mid:0},d.size){case"mini":E.up=o(8),E.mid=o(2),E.down=o(8);break;case"maxi":E.up=o(16)+3,E.mid=o(4)+1,E.down=o(64)+3;break;default:E.up=o(8)+1,E.mid=o(6)/2,E.down=o(8)+1;break}var g=["up","mid","down"];for(var h in g)for(var v=g[h],I=0;I<=E[v];I++)d[v]&&(w=w+n[v][o(n[v].length)])}return w}return a(e,r)}});var Pc=S((hP,xc)=>{"use strict";xc.exports=function(t){return function(e,r,n){if(e===" ")return e;switch(r%3){case 0:return t.red(e);case 1:return t.white(e);case 2:return t.blue(e)}}}});var Nc=S((dP,Mc)=>{"use strict";Mc.exports=function(t){return function(e,r,n){return r%2===0?e:t.inverse(e)}}});var Ic=S((pP,Rc)=>{"use strict";Rc.exports=function(t){var e=["red","yellow","green","blue","magenta"];return function(r,n,i){return r===" "?r:t[e[n++%e.length]](r)}}});var Ac=S((mP,Lc)=>{"use strict";Lc.exports=function(t){var e=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(r,n,i){return r===" "?r:t[e[Math.round(Math.random()*(e.length-2))]](r)}}});var Bc=S((yP,kc)=>{"use strict";var W={};kc.exports=W;W.themes={};var Vw=$("util"),ct=W.styles=bc(),qc=Object.defineProperties,Hw=new RegExp(/[\r\n]+/g);W.supportsColor=Ec().supportsColor;typeof W.enabled>"u"&&(W.enabled=W.supportsColor()!==!1);W.enable=function(){W.enabled=!0};W.disable=function(){W.enabled=!1};W.stripColors=W.strip=function(t){return(""+t).replace(/\x1B\[\d+m/g,"")};var gP=W.stylize=function(e,r){if(!W.enabled)return e+"";var n=ct[r];return!n&&r in W?W[r](e):n.open+e+n.close},Ww=/[|\\{}()[\]^$+*?.]/g,Xw=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(Ww,"\\$&")};function jc(t){var e=function r(){return Kw.apply(r,arguments)};return e._styles=t,e.__proto__=Gw,e}var Fc=(function(){var t={};return ct.grey=ct.gray,Object.keys(ct).forEach(function(e){ct[e].closeRe=new RegExp(Xw(ct[e].close),"g"),t[e]={get:function(){return jc(this._styles.concat(e))}}}),t})(),Gw=qc(function(){},Fc);function Kw(){var t=Array.prototype.slice.call(arguments),e=t.map(function(s){return s!=null&&s.constructor===String?s:Vw.inspect(s)}).join(" ");if(!W.enabled||!e)return e;for(var r=e.indexOf(`
|
|
22
|
+
`)!=-1,n=this._styles,i=n.length;i--;){var o=ct[n[i]];e=o.open+e.replace(o.closeRe,o.open)+o.close,r&&(e=e.replace(Hw,function(s){return o.close+s+o.open}))}return e}W.setTheme=function(t){if(typeof t=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var e in t)(function(r){W[r]=function(n){if(typeof t[r]=="object"){var i=n;for(var o in t[r])i=W[t[r][o]](i);return i}return W[t[r]](n)}})(e)};function Yw(){var t={};return Object.keys(Fc).forEach(function(e){t[e]={get:function(){return jc([e])}}}),t}var zw=function(e,r){var n=r.split("");return n=n.map(e),n.join("")};W.trap=Tc();W.zalgo=Dc();W.maps={};W.maps.america=Pc()(W);W.maps.zebra=Nc()(W);W.maps.rainbow=Ic()(W);W.maps.random=Ac()(W);for(Cc in W.maps)(function(t){W[t]=function(e){return zw(W.maps[t],e)}})(Cc);var Cc;qc(W,Yw())});var wo=S((bP,$c)=>{"use strict";var Jw=Bc();$c.exports=Jw});var Uc=S(_o=>{"use strict";_o.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};_o.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}});var Vc=S(vo=>{"use strict";vo.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};vo.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}});var Hc=S(Eo=>{"use strict";Eo.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};Eo.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}});var Wc=S(In=>{"use strict";Object.defineProperty(In,"cli",{value:Uc()});Object.defineProperty(In,"npm",{value:Vc()});Object.defineProperty(In,"syslog",{value:Hc()})});var ie=S(yr=>{"use strict";Object.defineProperty(yr,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(yr,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(yr,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(yr,"configs",{value:Wc()})});var Cn=S((TP,An)=>{"use strict";var Oo=wo(),{LEVEL:So,MESSAGE:To}=ie();Oo.enabled=!0;var Xc=/\s+/,Ln=class t{constructor(e={}){e.colors&&this.addColors(e.colors),this.options=e}static addColors(e){let r=Object.keys(e).reduce((n,i)=>(n[i]=Xc.test(e[i])?e[i].split(Xc):e[i],n),{});return t.allColors=Object.assign({},t.allColors||{},r),t.allColors}addColors(e){return t.addColors(e)}colorize(e,r,n){if(typeof n>"u"&&(n=r),!Array.isArray(t.allColors[e]))return Oo[t.allColors[e]](n);for(let i=0,o=t.allColors[e].length;i<o;i++)n=Oo[t.allColors[e][i]](n);return n}transform(e,r){return r.all&&typeof e[To]=="string"&&(e[To]=this.colorize(e[So],e.level,e[To])),(r.level||r.all||!r.message)&&(e.level=this.colorize(e[So],e.level)),(r.all||r.message)&&(e.message=this.colorize(e[So],e.level,e.message)),e}};An.exports=t=>new Ln(t);An.exports.Colorizer=An.exports.Format=Ln});var Kc=S((OP,Gc)=>{"use strict";var{Colorizer:Qw}=Cn();Gc.exports=t=>(Qw.addColors(t.colors||t),t)});var zc=S((DP,Yc)=>{"use strict";var Zw=be();Yc.exports=Zw(t=>(t.message=` ${t.message}`,t))});var Zc=S((xP,Qc)=>{"use strict";var e_=be(),{LEVEL:Jc,MESSAGE:Do}=ie();Qc.exports=e_((t,{stack:e,cause:r})=>{if(t instanceof Error){let i=Object.assign({},t,{level:t.level,[Jc]:t[Jc]||t.level,message:t.message,[Do]:t[Do]||t.message});return e&&(i.stack=t.stack),r&&(i.cause=t.cause),i}if(!(t.message instanceof Error))return t;let n=t.message;return Object.assign(t,n),t.message=n.message,t[Do]=n.message,e&&(t.stack=n.stack),r&&(t.cause=n.cause),t})});var Po=S((PP,jn)=>{"use strict";var{configs:t_,LEVEL:eh,MESSAGE:xo}=ie(),qn=class t{constructor(e={levels:t_.npm.levels}){this.paddings=t.paddingForLevels(e.levels,e.filler),this.options=e}static getLongestLevel(e){let r=Object.keys(e).map(n=>n.length);return Math.max(...r)}static paddingForLevel(e,r,n){let i=n+1-e.length,o=Math.floor(i/r.length);return`${r}${r.repeat(o)}`.slice(0,i)}static paddingForLevels(e,r=" "){let n=t.getLongestLevel(e);return Object.keys(e).reduce((i,o)=>(i[o]=t.paddingForLevel(o,r,n),i),{})}transform(e,r){return e.message=`${this.paddings[e[eh]]}${e.message}`,e[xo]&&(e[xo]=`${this.paddings[e[eh]]}${e[xo]}`),e}};jn.exports=t=>new qn(t);jn.exports.Padder=jn.exports.Format=qn});var th=S((MP,Mo)=>{"use strict";var{Colorizer:r_}=Cn(),{Padder:n_}=Po(),{configs:i_,MESSAGE:o_}=ie(),Fn=class{constructor(e={}){e.levels||(e.levels=i_.cli.levels),this.colorizer=new r_(e),this.padder=new n_(e),this.options=e}transform(e,r){return this.colorizer.transform(this.padder.transform(e,r),r),e[o_]=`${e.level}:${e.message}`,e}};Mo.exports=t=>new Fn(t);Mo.exports.Format=Fn});var nh=S((NP,No)=>{"use strict";var s_=be();function rh(t){if(t.every(a_))return e=>{let r=e;for(let n=0;n<t.length;n++)if(r=t[n].transform(r,t[n].options),!r)return!1;return r}}function a_(t){if(typeof t.transform!="function")throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join(`
|
|
23
|
+
`));return!0}No.exports=(...t)=>{let e=s_(rh(t)),r=e();return r.Format=e.Format,r};No.exports.cascade=rh});var wr=S((Ao,sh)=>{"use strict";var{hasOwnProperty:br}=Object.prototype,dt=Lo();dt.configure=Lo;dt.stringify=dt;dt.default=dt;Ao.stringify=dt;Ao.configure=Lo;sh.exports=dt;var u_=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function Je(t){return t.length<5e3&&!u_.test(t)?`"${t}"`:JSON.stringify(t)}function Ro(t,e){if(t.length>200||e)return t.sort(e);for(let r=1;r<t.length;r++){let n=t[r],i=r;for(;i!==0&&t[i-1]>n;)t[i]=t[i-1],i--;t[i]=n}return t}var l_=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Io(t){return l_.call(t)!==void 0&&t.length!==0}function ih(t,e,r){t.length<r&&(r=t.length);let n=e===","?"":" ",i=`"0":${n}${t[0]}`;for(let o=1;o<r;o++)i+=`${e}"${o}":${n}${t[o]}`;return i}function f_(t){if(br.call(t,"circularValue")){let e=t.circularValue;if(typeof e=="string")return`"${e}"`;if(e==null)return e;if(e===Error||e===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function c_(t){let e;if(br.call(t,"deterministic")&&(e=t.deterministic,typeof e!="boolean"&&typeof e!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return e===void 0?!0:e}function h_(t,e){let r;if(br.call(t,e)&&(r=t[e],typeof r!="boolean"))throw new TypeError(`The "${e}" argument must be of type boolean`);return r===void 0?!0:r}function oh(t,e){let r;if(br.call(t,e)){if(r=t[e],typeof r!="number")throw new TypeError(`The "${e}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${e}" argument must be an integer`);if(r<1)throw new RangeError(`The "${e}" argument must be >= 1`)}return r===void 0?1/0:r}function ht(t){return t===1?"1 item":`${t} items`}function d_(t){let e=new Set;for(let r of t)(typeof r=="string"||typeof r=="number")&&e.add(String(r));return e}function p_(t){if(br.call(t,"strict")){let e=t.strict;if(typeof e!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(e)return r=>{let n=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(n+=` (${r.toString()})`),new Error(n)}}}function Lo(t){t={...t};let e=p_(t);e&&(t.bigint===void 0&&(t.bigint=!1),"circularValue"in t||(t.circularValue=Error));let r=f_(t),n=h_(t,"bigint"),i=c_(t),o=typeof i=="function"?i:void 0,s=oh(t,"maximumDepth"),a=oh(t,"maximumBreadth");function u(g,h,v,I,R,D){let m=h[g];switch(typeof m=="object"&&m!==null&&typeof m.toJSON=="function"&&(m=m.toJSON(g)),m=I.call(h,g,m),typeof m){case"string":return Je(m);case"object":{if(m===null)return"null";if(v.indexOf(m)!==-1)return r;let c="",l=",",_=D;if(Array.isArray(m)){if(m.length===0)return"[]";if(s<v.length+1)return'"[Array]"';v.push(m),R!==""&&(D+=R,c+=`
|
|
24
24
|
${D}`,l=`,
|
|
25
|
-
${D}`);let
|
|
26
|
-
${_}`),v.pop(),`[${c}]`}let
|
|
27
|
-
${D}`,M=" ");let
|
|
25
|
+
${D}`);let A=Math.min(m.length,a),C=0;for(;C<A-1;C++){let U=u(String(C),m,v,I,R,D);c+=U!==void 0?U:"null",c+=l}let B=u(String(C),m,v,I,R,D);if(c+=B!==void 0?B:"null",m.length-1>a){let U=m.length-a-1;c+=`${l}"... ${ht(U)} not stringified"`}return R!==""&&(c+=`
|
|
26
|
+
${_}`),v.pop(),`[${c}]`}let N=Object.keys(m),p=N.length;if(p===0)return"{}";if(s<v.length+1)return'"[Object]"';let M="",T="";R!==""&&(D+=R,l=`,
|
|
27
|
+
${D}`,M=" ");let P=Math.min(p,a);i&&!Io(m)&&(N=Ro(N,o)),v.push(m);for(let A=0;A<P;A++){let C=N[A],B=u(C,m,v,I,R,D);B!==void 0&&(c+=`${T}${Je(C)}:${M}${B}`,T=l)}if(p>a){let A=p-a;c+=`${T}"...":${M}"${ht(A)} not stringified"`,T=l}return R!==""&&T.length>1&&(c=`
|
|
28
28
|
${D}${c}
|
|
29
|
-
${_}`),v.pop(),`{${c}}`}case"number":return isFinite(
|
|
29
|
+
${_}`),v.pop(),`{${c}}`}case"number":return isFinite(m)?String(m):e?e(m):"null";case"boolean":return m===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(m);default:return e?e(m):void 0}}function d(g,h,v,I,R,D){switch(typeof h=="object"&&h!==null&&typeof h.toJSON=="function"&&(h=h.toJSON(g)),typeof h){case"string":return Je(h);case"object":{if(h===null)return"null";if(v.indexOf(h)!==-1)return r;let m=D,c="",l=",";if(Array.isArray(h)){if(h.length===0)return"[]";if(s<v.length+1)return'"[Array]"';v.push(h),R!==""&&(D+=R,c+=`
|
|
30
30
|
${D}`,l=`,
|
|
31
|
-
${D}`);let p=Math.min(h.length,a),M=0;for(;M<p-1;M++){let
|
|
32
|
-
${
|
|
33
|
-
${D}`,_=" ");let
|
|
31
|
+
${D}`);let p=Math.min(h.length,a),M=0;for(;M<p-1;M++){let P=d(String(M),h[M],v,I,R,D);c+=P!==void 0?P:"null",c+=l}let T=d(String(M),h[M],v,I,R,D);if(c+=T!==void 0?T:"null",h.length-1>a){let P=h.length-a-1;c+=`${l}"... ${ht(P)} not stringified"`}return R!==""&&(c+=`
|
|
32
|
+
${m}`),v.pop(),`[${c}]`}v.push(h);let _="";R!==""&&(D+=R,l=`,
|
|
33
|
+
${D}`,_=" ");let N="";for(let p of I){let M=d(p,h[p],v,I,R,D);M!==void 0&&(c+=`${N}${Je(p)}:${_}${M}`,N=l)}return R!==""&&N.length>1&&(c=`
|
|
34
34
|
${D}${c}
|
|
35
|
-
${
|
|
36
|
-
${
|
|
37
|
-
${
|
|
38
|
-
${D}`,v.pop(),`[${M}]`}let
|
|
39
|
-
${
|
|
40
|
-
${
|
|
41
|
-
${D}`),v.pop(),`{${_}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(h);default:return e?e(h):void 0}}function E(m,h,v){switch(typeof h){case"string":return Ye(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(m),typeof h!="object")return E(m,h,v);if(h===null)return"null"}if(v.indexOf(h)!==-1)return r;let C="",P=h.length!==void 0;if(P&&Array.isArray(h)){if(h.length===0)return"[]";if(s<v.length+1)return'"[Array]"';v.push(h);let _=Math.min(h.length,a),R=0;for(;R<_-1;R++){let M=E(String(R),h[R],v);C+=M!==void 0?M:"null",C+=","}let p=E(String(R),h[R],v);if(C+=p!==void 0?p:"null",h.length-1>a){let M=h.length-a-1;C+=`,"... ${ft(M)} not stringified"`}return v.pop(),`[${C}]`}let D=Object.keys(h),g=D.length;if(g===0)return"{}";if(s<v.length+1)return'"[Object]"';let c="",l=Math.min(g,a);P&&vo(h)&&(C+=Wc(h,",",a),D=D.slice(h.length),l-=h.length,c=","),i&&(D=_o(D,o)),v.push(h);for(let _=0;_<l;_++){let R=D[_],p=E(R,h[R],v);p!==void 0&&(C+=`${c}${Ye(R)}:${p}`,c=",")}if(g>a){let _=g-a;C+=`${c}"...":"${ft(_)} not stringified"`}return v.pop(),`{${C}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(h);default:return e?e(h):void 0}}function y(m,h,v){if(arguments.length>1){let C="";if(typeof v=="number"?C=" ".repeat(Math.min(v,10)):typeof v=="string"&&(C=v.slice(0,10)),h!=null){if(typeof h=="function")return u("",{"":m},[],h,C,"");if(Array.isArray(h))return d("",m,[],Jw(h),C,"")}if(C.length!==0)return w("",m,[],C,"")}return E("",m,[])}return y}});var So=T((Px,Yc)=>{"use strict";var Zw=ye(),{MESSAGE:e_}=ie(),t_=dr();function r_(t,e){return typeof e=="bigint"?e.toString():e}Yc.exports=Zw((t,e)=>{let r=t_.configure(e);return t[e_]=r(t,e.replacer||r_,e.space),t})});var Jc=T((Cx,Kc)=>{"use strict";var n_=ye();Kc.exports=n_((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t))});var Zc=T((Lx,Qc)=>{"use strict";var i_=ye(),{MESSAGE:o_}=ie(),s_=dr();Qc.exports=i_(t=>{let e={};return t.message&&(e["@message"]=t.message,delete t.message),t.timestamp&&(e["@timestamp"]=t.timestamp,delete t.timestamp),e["@fields"]=t,t[o_]=s_(e),t})});var th=T((Ix,eh)=>{"use strict";var a_=ye();function u_(t,e,r){let n=e.reduce((o,s)=>(o[s]=t[s],delete t[s],o),{}),i=Object.keys(t).reduce((o,s)=>(o[s]=t[s],delete t[s],o),{});return Object.assign(t,n,{[r]:i}),t}function l_(t,e,r){return t[r]=e.reduce((n,i)=>(n[i]=t[i],delete t[i],n),{}),t}eh.exports=a_((t,e={})=>{let r="metadata";e.key&&(r=e.key);let n=[];return!e.fillExcept&&!e.fillWith&&(n.push("level"),n.push("message")),e.fillExcept&&(n=e.fillExcept),n.length>0?u_(t,n,r):e.fillWith?l_(t,e.fillWith,r):t})});var nh=T((Ax,rh)=>{"use strict";var Lt=1e3,It=Lt*60,At=It*60,ht=At*24,f_=ht*7,c_=ht*365.25;rh.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return h_(t);if(r==="number"&&isFinite(t))return e.long?p_(t):d_(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function h_(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*c_;case"weeks":case"week":case"w":return r*f_;case"days":case"day":case"d":return r*ht;case"hours":case"hour":case"hrs":case"hr":case"h":return r*At;case"minutes":case"minute":case"mins":case"min":case"m":return r*It;case"seconds":case"second":case"secs":case"sec":case"s":return r*Lt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function d_(t){var e=Math.abs(t);return e>=ht?Math.round(t/ht)+"d":e>=At?Math.round(t/At)+"h":e>=It?Math.round(t/It)+"m":e>=Lt?Math.round(t/Lt)+"s":t+"ms"}function p_(t){var e=Math.abs(t);return e>=ht?Pn(t,e,ht,"day"):e>=At?Pn(t,e,At,"hour"):e>=It?Pn(t,e,It,"minute"):e>=Lt?Pn(t,e,Lt,"second"):t+" ms"}function Pn(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var oh=T((pr,ih)=>{"use strict";var g_=ye(),m_=nh();ih.exports=g_(t=>{let e=+new Date;return pr.diff=e-(pr.prevTime||e),pr.prevTime=e,t.ms=`+${m_(pr.diff)}`,t})});var uh=T((qx,ah)=>{"use strict";var y_=$("util").inspect,b_=ye(),{LEVEL:w_,MESSAGE:sh,SPLAT:__}=ie();ah.exports=b_((t,e={})=>{let r=Object.assign({},t);return delete r[w_],delete r[sh],delete r[__],t[sh]=y_(r,!1,e.depth||null,e.colorize),t})});var lh=T((jx,Ln)=>{"use strict";var{MESSAGE:v_}=ie(),Cn=class{constructor(e){this.template=e}transform(e){return e[v_]=this.template(e),e}};Ln.exports=t=>new Cn(t);Ln.exports.Printf=Ln.exports.Format=Cn});var hh=T((Fx,ch)=>{"use strict";var E_=ye(),{MESSAGE:fh}=ie(),T_=dr();ch.exports=E_(t=>{let e=T_(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[fh]=`${t.level}:${r} ${t.message} ${e}`:t[fh]=`${t.level}:${r} ${t.message}`,t})});var gh=T((kx,ph)=>{"use strict";var S_=$("util"),{SPLAT:dh}=ie(),O_=/%[scdjifoO%]/g,D_=/%%/g,Oo=class{constructor(e){this.options=e}_splat(e,r){let n=e.message,i=e[dh]||e.splat||[],o=n.match(D_),s=o&&o.length||0,u=r.length-s-i.length,d=u<0?i.splice(u,-1*u):[],w=d.length;if(w)for(let E=0;E<w;E++)Object.assign(e,d[E]);return e.message=S_.format(n,...i),e}transform(e){let r=e.message,n=e[dh]||e.splat;if(!n||!n.length)return e;let i=r&&r.match&&r.match(O_);if(!i&&(n||n.length)){let o=n.length>1?n.splice(0):n,s=o.length;if(s)for(let a=0;a<s;a++)Object.assign(e,o[a]);return e}return i?this._splat(e,i):e}};ph.exports=t=>new Oo(t)});var yh=T((In,mh)=>{"use strict";(function(t,e){typeof In=="object"&&typeof mh<"u"?e(In):typeof define=="function"&&define.amd?define(["exports"],e):e(t.fecha={})})(In,(function(t){"use strict";var e=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,r="\\d\\d?",n="\\d\\d",i="\\d{3}",o="\\d{4}",s="[^\\s]+",a=/\[([^]*?)\]/gm;function u(x,q){for(var F=[],Q=0,k=x.length;Q<k;Q++)F.push(x[Q].substr(0,q));return F}var d=function(x){return function(q,F){var Q=F[x].map(function(me){return me.toLowerCase()}),k=Q.indexOf(q.toLowerCase());return k>-1?k:null}};function w(x){for(var q=[],F=1;F<arguments.length;F++)q[F-1]=arguments[F];for(var Q=0,k=q;Q<k.length;Q++){var me=k[Q];for(var Ie in me)x[Ie]=me[Ie]}return x}var E=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],y=["January","February","March","April","May","June","July","August","September","October","November","December"],m=u(y,3),h=u(E,3),v={dayNamesShort:h,dayNames:E,monthNamesShort:m,monthNames:y,amPm:["am","pm"],DoFn:function(x){return x+["th","st","nd","rd"][x%10>3?0:(x-x%10!==10?1:0)*x%10]}},C=w({},v),P=function(x){return C=w(C,x)},D=function(x){return x.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},g=function(x,q){for(q===void 0&&(q=2),x=String(x);x.length<q;)x="0"+x;return x},c={D:function(x){return String(x.getDate())},DD:function(x){return g(x.getDate())},Do:function(x,q){return q.DoFn(x.getDate())},d:function(x){return String(x.getDay())},dd:function(x){return g(x.getDay())},ddd:function(x,q){return q.dayNamesShort[x.getDay()]},dddd:function(x,q){return q.dayNames[x.getDay()]},M:function(x){return String(x.getMonth()+1)},MM:function(x){return g(x.getMonth()+1)},MMM:function(x,q){return q.monthNamesShort[x.getMonth()]},MMMM:function(x,q){return q.monthNames[x.getMonth()]},YY:function(x){return g(String(x.getFullYear()),4).substr(2)},YYYY:function(x){return g(x.getFullYear(),4)},h:function(x){return String(x.getHours()%12||12)},hh:function(x){return g(x.getHours()%12||12)},H:function(x){return String(x.getHours())},HH:function(x){return g(x.getHours())},m:function(x){return String(x.getMinutes())},mm:function(x){return g(x.getMinutes())},s:function(x){return String(x.getSeconds())},ss:function(x){return g(x.getSeconds())},S:function(x){return String(Math.round(x.getMilliseconds()/100))},SS:function(x){return g(Math.round(x.getMilliseconds()/10),2)},SSS:function(x){return g(x.getMilliseconds(),3)},a:function(x,q){return x.getHours()<12?q.amPm[0]:q.amPm[1]},A:function(x,q){return x.getHours()<12?q.amPm[0].toUpperCase():q.amPm[1].toUpperCase()},ZZ:function(x){var q=x.getTimezoneOffset();return(q>0?"-":"+")+g(Math.floor(Math.abs(q)/60)*100+Math.abs(q)%60,4)},Z:function(x){var q=x.getTimezoneOffset();return(q>0?"-":"+")+g(Math.floor(Math.abs(q)/60),2)+":"+g(Math.abs(q)%60,2)}},l=function(x){return+x-1},_=[null,r],R=[null,s],p=["isPm",s,function(x,q){var F=x.toLowerCase();return F===q.amPm[0]?0:F===q.amPm[1]?1:null}],M=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(x){var q=(x+"").match(/([+-]|\d\d)/gi);if(q){var F=+q[1]*60+parseInt(q[2],10);return q[0]==="+"?F:-F}return 0}],S={D:["day",r],DD:["day",n],Do:["day",r+s,function(x){return parseInt(x,10)}],M:["month",r,l],MM:["month",n,l],YY:["year",n,function(x){var q=new Date,F=+(""+q.getFullYear()).substr(0,2);return+(""+(+x>68?F-1:F)+x)}],h:["hour",r,void 0,"isPm"],hh:["hour",n,void 0,"isPm"],H:["hour",r],HH:["hour",n],m:["minute",r],mm:["minute",n],s:["second",r],ss:["second",n],YYYY:["year",o],S:["millisecond","\\d",function(x){return+x*100}],SS:["millisecond",n,function(x){return+x*10}],SSS:["millisecond",i],d:_,dd:_,ddd:R,dddd:R,MMM:["month",s,d("monthNamesShort")],MMMM:["month",s,d("monthNames")],a:p,A:p,ZZ:M,Z:M},N={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},I=function(x){return w(N,x)},A=function(x,q,F){if(q===void 0&&(q=N.default),F===void 0&&(F={}),typeof x=="number"&&(x=new Date(x)),Object.prototype.toString.call(x)!=="[object Date]"||isNaN(x.getTime()))throw new Error("Invalid Date pass to format");q=N[q]||q;var Q=[];q=q.replace(a,function(me,Ie){return Q.push(Ie),"@@@"});var k=w(w({},C),F);return q=q.replace(e,function(me){return c[me](x,k)}),q.replace(/@@@/g,function(){return Q.shift()})};function B(x,q,F){if(F===void 0&&(F={}),typeof q!="string")throw new Error("Invalid format in fecha parse");if(q=N[q]||q,x.length>1e3)return null;var Q=new Date,k={year:Q.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},me=[],Ie=[],Ve=q.replace(a,function(J,de){return Ie.push(D(de)),"@@@"}),He={},Wr={};Ve=D(Ve).replace(e,function(J){var de=S[J],Qt=de[0],Gr=de[1],St=de[3];if(He[Qt])throw new Error("Invalid format. "+Qt+" specified twice in format");return He[Qt]=!0,St&&(Wr[St]=!0),me.push(de),"("+Gr+")"}),Object.keys(Wr).forEach(function(J){if(!He[J])throw new Error("Invalid format. "+J+" is required in specified format")}),Ve=Ve.replace(/@@@/g,function(){return Ie.shift()});var b=x.match(new RegExp(Ve,"i"));if(!b)return null;for(var f=w(w({},C),F),L=1;L<b.length;L++){var O=me[L-1],z=O[0],K=O[2],Z=K?K(b[L],f):+b[L];if(Z==null)return null;k[z]=Z}k.isPm===1&&k.hour!=null&&+k.hour!=12?k.hour=+k.hour+12:k.isPm===0&&+k.hour==12&&(k.hour=0);var oe;if(k.timezoneOffset==null){oe=new Date(k.year,k.month,k.day,k.hour,k.minute,k.second,k.millisecond);for(var se=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],L=0,Xe=se.length;L<Xe;L++)if(He[se[L][0]]&&k[se[L][0]]!==oe[se[L][1]]())return null}else if(oe=new Date(Date.UTC(k.year,k.month,k.day,k.hour,k.minute-k.timezoneOffset,k.second,k.millisecond)),k.month>11||k.month<0||k.day>31||k.day<1||k.hour>23||k.hour<0||k.minute>59||k.minute<0||k.second>59||k.second<0)return null;return oe}var U={format:A,parse:B,defaultI18n:v,setGlobalDateI18n:P,setGlobalDateMasks:I};t.assign=w,t.default=U,t.format=A,t.parse=B,t.defaultI18n=v,t.setGlobalDateI18n=P,t.setGlobalDateMasks=I,Object.defineProperty(t,"__esModule",{value:!0})}))});var wh=T((Bx,bh)=>{"use strict";var x_=yh(),N_=ye();bh.exports=N_((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():x_.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t))});var vh=T(($x,_h)=>{"use strict";var Do=ao(),M_=ye(),{MESSAGE:xo}=ie();_h.exports=M_((t,e)=>(e.level!==!1&&(t.level=Do.strip(t.level)),e.message!==!1&&(t.message=Do.strip(String(t.message))),e.raw!==!1&&t[xo]&&(t[xo]=Do.strip(String(t[xo]))),t))});var Mo=T(No=>{"use strict";var R_=No.format=ye();No.levels=qc();function he(t,e){Object.defineProperty(R_,t,{get(){return e()},configurable:!0})}he("align",function(){return Fc()});he("errors",function(){return $c()});he("cli",function(){return Vc()});he("combine",function(){return Xc()});he("colorize",function(){return xn()});he("json",function(){return So()});he("label",function(){return Jc()});he("logstash",function(){return Zc()});he("metadata",function(){return th()});he("ms",function(){return oh()});he("padLevels",function(){return yo()});he("prettyPrint",function(){return uh()});he("printf",function(){return lh()});he("simple",function(){return hh()});he("splat",function(){return gh()});he("timestamp",function(){return wh()});he("uncolorize",function(){return vh()})});var Ro=T(An=>{"use strict";var{format:Eh}=$("util");An.warn={deprecated(t){return()=>{throw new Error(Eh("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return()=>{throw new Error([Eh("{ %s } was removed in winston@3.0.0.",t),"Use a custom winston.format = winston.format(function) instead."].join(`
|
|
42
|
-
`))}},forFunctions(t,e,r){r.forEach(n=>{t[n]=An.warn[e](n)})},forProperties(t,e,r){r.forEach(n=>{let i=An.warn[e](n);Object.defineProperty(t,n,{get:i,set:i})})}}});var Th=T((Hx,P_)=>{P_.exports={name:"winston",description:"A logger for just about everything.",version:"3.18.3",author:"Charlie Robbins <charlie.robbins@gmail.com>",maintainers:["David Hyde <dabh@alumni.stanford.edu>"],repository:{type:"git",url:"https://github.com/winstonjs/winston.git"},keywords:["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies:{"@dabh/diagnostics":"^2.0.8","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.7.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.9.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^4.4.0","@types/node":"^20.11.24","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.57.0",hock:"^1.4.1",mocha:"^10.3.0",nyc:"^17.1.0",rimraf:"5.0.1",split2:"^4.1.0","std-mocks":"^2.0.0",through2:"^4.0.2","winston-compat":"^0.1.5"},main:"./lib/winston.js",browser:"./dist/winston",types:"./index.d.ts",scripts:{lint:"eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist",test:"rimraf test/fixtures/logs/* && mocha","test:coverage":"nyc npm run test:unit","test:unit":"mocha test/unit","test:integration":"mocha test/integration",build:"rimraf dist && babel lib -d dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"}});var Po=T((Xx,Sh)=>{"use strict";Sh.exports=$("util").deprecate});var Co=T((Wx,Oh)=>{"use strict";Oh.exports=$("stream")});var Io=T((Gx,xh)=>{"use strict";function C_(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Lo,this,t)):process.nextTick(Lo,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(o){!e&&o?r._writableState?r._writableState.errorEmitted?process.nextTick(qn,r):(r._writableState.errorEmitted=!0,process.nextTick(Dh,r,o)):process.nextTick(Dh,r,o):e?(process.nextTick(qn,r),e(o)):process.nextTick(qn,r)}),this)}function Dh(t,e){Lo(t,e),qn(t)}function qn(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function L_(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Lo(t,e){t.emit("error",e)}function I_(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}xh.exports={destroy:C_,undestroy:L_,errorOrDestroy:I_}});var qt=T((zx,Rh)=>{"use strict";var Mh={};function _e(t,e,r){r||(r=Error);function n(o,s,a){return typeof e=="string"?e:e(o,s,a)}class i extends r{constructor(s,a,u){super(n(s,a,u))}}i.prototype.name=r.name,i.prototype.code=t,Mh[t]=i}function Nh(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(n=>String(n)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function A_(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function q_(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function j_(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}_e("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);_e("ERR_INVALID_ARG_TYPE",function(t,e,r){let n;typeof e=="string"&&A_(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";let i;if(q_(t," argument"))i=`The ${t} ${n} ${Nh(e,"type")}`;else{let o=j_(t,".")?"property":"argument";i=`The "${t}" ${o} ${n} ${Nh(e,"type")}`}return i+=`. Received type ${typeof r}`,i},TypeError);_e("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");_e("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});_e("ERR_STREAM_PREMATURE_CLOSE","Premature close");_e("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});_e("ERR_MULTIPLE_CALLBACK","Callback called multiple times");_e("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");_e("ERR_STREAM_WRITE_AFTER_END","write after end");_e("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);_e("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);_e("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Rh.exports.codes=Mh});var Ao=T((Yx,Ph)=>{"use strict";var F_=qt().codes.ERR_INVALID_OPT_VALUE;function k_(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function B_(t,e,r,n){var i=k_(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var o=n?r:"highWaterMark";throw new F_(o,i)}return Math.floor(i)}return t.objectMode?16:16*1024}Ph.exports={getHighWaterMark:B_}});var Ch=T((Kx,qo)=>{"use strict";typeof Object.create=="function"?qo.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:qo.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var Fe=T((Jx,Fo)=>{"use strict";try{if(jo=$("util"),typeof jo.inherits!="function")throw"";Fo.exports=jo.inherits}catch{Fo.exports=Ch()}var jo});var Fh=T((Qx,jh)=>{"use strict";function Lh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ih(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Lh(Object(r),!0).forEach(function(n){$_(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lh(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function $_(t,e,r){return e=qh(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function U_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ah(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qh(n.key),n)}}function V_(t,e,r){return e&&Ah(t.prototype,e),r&&Ah(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function qh(t){var e=H_(t,"string");return typeof e=="symbol"?e:String(e)}function H_(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var X_=$("buffer"),jn=X_.Buffer,W_=$("util"),ko=W_.inspect,G_=ko&&ko.custom||"inspect";function z_(t,e,r){jn.prototype.copy.call(t,e,r)}jh.exports=(function(){function t(){U_(this,t),this.head=null,this.tail=null,this.length=0}return V_(t,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return jn.alloc(0);for(var n=jn.allocUnsafe(r>>>0),i=this.head,o=0;i;)z_(i.data,n,o),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,o=n.data;for(r-=o.length;n=n.next;){var s=n.data,a=r>s.length?s.length:r;if(a===s.length?o+=s:o+=s.slice(0,r),r-=a,r===0){a===s.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=s.slice(a));break}++i}return this.length-=i,o}},{key:"_getBuffer",value:function(r){var n=jn.allocUnsafe(r),i=this.head,o=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var s=i.data,a=r>s.length?s.length:r;if(s.copy(n,n.length-r,0,a),r-=a,r===0){a===s.length?(++o,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=s.slice(a));break}++o}return this.length-=o,n}},{key:G_,value:function(r,n){return ko(this,Ih(Ih({},n),{},{depth:0,customInspect:!1}))}}]),t})()});var $h=T((Bo,Bh)=>{"use strict";var Fn=$("buffer"),xe=Fn.Buffer;function kh(t,e){for(var r in t)e[r]=t[r]}xe.from&&xe.alloc&&xe.allocUnsafe&&xe.allocUnsafeSlow?Bh.exports=Fn:(kh(Fn,Bo),Bo.Buffer=dt);function dt(t,e,r){return xe(t,e,r)}dt.prototype=Object.create(xe.prototype);kh(xe,dt);dt.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return xe(t,e,r)};dt.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=xe(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};dt.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return xe(t)};dt.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Fn.SlowBuffer(t)}});var mr=T(Vh=>{"use strict";var Uo=$h().Buffer,Uh=Uo.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Y_(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function K_(t){var e=Y_(t);if(typeof e!="string"&&(Uo.isEncoding===Uh||!Uh(t)))throw new Error("Unknown encoding: "+t);return e||t}Vh.StringDecoder=gr;function gr(t){this.encoding=K_(t);var e;switch(this.encoding){case"utf16le":this.text=rv,this.end=nv,e=4;break;case"utf8":this.fillLast=Z_,e=4;break;case"base64":this.text=iv,this.end=ov,e=3;break;default:this.write=sv,this.end=av;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Uo.allocUnsafe(e)}gr.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};gr.prototype.end=tv;gr.prototype.text=ev;gr.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function $o(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function J_(t,e,r){var n=e.length-1;if(n<r)return 0;var i=$o(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=$o(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=$o(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function Q_(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function Z_(t){var e=this.lastTotal-this.lastNeed,r=Q_(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function ev(t,e){var r=J_(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function tv(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function rv(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function nv(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function iv(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function ov(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function sv(t){return t.toString(this.encoding)}function av(t){return t&&t.length?this.write(t):""}});var Gh=T((eN,Wh)=>{"use strict";var Hh=qt().codes.ERR_STREAM_PREMATURE_CLOSE;function uv(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}function lv(){}function fv(t){return t.setHeader&&typeof t.abort=="function"}function Xh(t,e,r){if(typeof e=="function")return Xh(t,null,e);e||(e={}),r=uv(r||lv);var n=e.readable||e.readable!==!1&&t.readable,i=e.writable||e.writable!==!1&&t.writable,o=function(){t.writable||a()},s=t._writableState&&t._writableState.finished,a=function(){i=!1,s=!0,n||r.call(t)},u=t._readableState&&t._readableState.endEmitted,d=function(){n=!1,u=!0,i||r.call(t)},w=function(h){r.call(t,h)},E=function(){var h;if(n&&!u)return(!t._readableState||!t._readableState.ended)&&(h=new Hh),r.call(t,h);if(i&&!s)return(!t._writableState||!t._writableState.ended)&&(h=new Hh),r.call(t,h)},y=function(){t.req.on("finish",a)};return fv(t)?(t.on("complete",a),t.on("abort",E),t.req?y():t.on("request",y)):i&&!t._writableState&&(t.on("end",o),t.on("close",o)),t.on("end",d),t.on("finish",a),e.error!==!1&&t.on("error",w),t.on("close",E),function(){t.removeListener("complete",a),t.removeListener("abort",E),t.removeListener("request",y),t.req&&t.req.removeListener("finish",a),t.removeListener("end",o),t.removeListener("close",o),t.removeListener("finish",a),t.removeListener("end",d),t.removeListener("error",w),t.removeListener("close",E)}}Wh.exports=Xh});var Yh=T((tN,zh)=>{"use strict";var kn;function Ke(t,e,r){return e=cv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cv(t){var e=hv(t,"string");return typeof e=="symbol"?e:String(e)}function hv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var dv=Gh(),Je=Symbol("lastResolve"),pt=Symbol("lastReject"),yr=Symbol("error"),Bn=Symbol("ended"),gt=Symbol("lastPromise"),Vo=Symbol("handlePromise"),mt=Symbol("stream");function Qe(t,e){return{value:t,done:e}}function pv(t){var e=t[Je];if(e!==null){var r=t[mt].read();r!==null&&(t[gt]=null,t[Je]=null,t[pt]=null,e(Qe(r,!1)))}}function gv(t){process.nextTick(pv,t)}function mv(t,e){return function(r,n){t.then(function(){if(e[Bn]){r(Qe(void 0,!0));return}e[Vo](r,n)},n)}}var yv=Object.getPrototypeOf(function(){}),bv=Object.setPrototypeOf((kn={get stream(){return this[mt]},next:function(){var e=this,r=this[yr];if(r!==null)return Promise.reject(r);if(this[Bn])return Promise.resolve(Qe(void 0,!0));if(this[mt].destroyed)return new Promise(function(s,a){process.nextTick(function(){e[yr]?a(e[yr]):s(Qe(void 0,!0))})});var n=this[gt],i;if(n)i=new Promise(mv(n,this));else{var o=this[mt].read();if(o!==null)return Promise.resolve(Qe(o,!1));i=new Promise(this[Vo])}return this[gt]=i,i}},Ke(kn,Symbol.asyncIterator,function(){return this}),Ke(kn,"return",function(){var e=this;return new Promise(function(r,n){e[mt].destroy(null,function(i){if(i){n(i);return}r(Qe(void 0,!0))})})}),kn),yv),wv=function(e){var r,n=Object.create(bv,(r={},Ke(r,mt,{value:e,writable:!0}),Ke(r,Je,{value:null,writable:!0}),Ke(r,pt,{value:null,writable:!0}),Ke(r,yr,{value:null,writable:!0}),Ke(r,Bn,{value:e._readableState.endEmitted,writable:!0}),Ke(r,Vo,{value:function(o,s){var a=n[mt].read();a?(n[gt]=null,n[Je]=null,n[pt]=null,o(Qe(a,!1))):(n[Je]=o,n[pt]=s)},writable:!0}),r));return n[gt]=null,dv(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=n[pt];o!==null&&(n[gt]=null,n[Je]=null,n[pt]=null,o(i)),n[yr]=i;return}var s=n[Je];s!==null&&(n[gt]=null,n[Je]=null,n[pt]=null,s(Qe(void 0,!0))),n[Bn]=!0}),e.on("readable",gv.bind(null,n)),n};zh.exports=wv});var Zh=T((rN,Qh)=>{"use strict";function Kh(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(d){r(d);return}a.done?e(u):Promise.resolve(u).then(n,i)}function _v(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function s(u){Kh(o,n,i,s,a,"next",u)}function a(u){Kh(o,n,i,s,a,"throw",u)}s(void 0)})}}function Jh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function vv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Jh(Object(r),!0).forEach(function(n){Ev(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Jh(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ev(t,e,r){return e=Tv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Tv(t){var e=Sv(t,"string");return typeof e=="symbol"?e:String(e)}function Sv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ov=qt().codes.ERR_INVALID_ARG_TYPE;function Dv(t,e,r){var n;if(e&&typeof e.next=="function")n=e;else if(e&&e[Symbol.asyncIterator])n=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])n=e[Symbol.iterator]();else throw new Ov("iterable",["Iterable"],e);var i=new t(vv({objectMode:!0},r)),o=!1;i._read=function(){o||(o=!0,s())};function s(){return a.apply(this,arguments)}function a(){return a=_v(function*(){try{var u=yield n.next(),d=u.value,w=u.done;w?i.push(null):i.push(yield d)?s():o=!1}catch(E){i.destroy(E)}}),a.apply(this,arguments)}return i}Qh.exports=Dv});var fd=T((iN,ld)=>{"use strict";ld.exports=W;var jt;W.ReadableState=nd;var nN=$("events").EventEmitter,rd=function(e,r){return e.listeners(r).length},wr=Co(),$n=$("buffer").Buffer,xv=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Nv(t){return $n.from(t)}function Mv(t){return $n.isBuffer(t)||t instanceof xv}var Ho=$("util"),V;Ho&&Ho.debuglog?V=Ho.debuglog("stream"):V=function(){};var Rv=Fh(),Jo=Io(),Pv=Ao(),Cv=Pv.getHighWaterMark,Un=qt().codes,Lv=Un.ERR_INVALID_ARG_TYPE,Iv=Un.ERR_STREAM_PUSH_AFTER_EOF,Av=Un.ERR_METHOD_NOT_IMPLEMENTED,qv=Un.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Ft,Xo,Wo;Fe()(W,wr);var br=Jo.errorOrDestroy,Go=["error","close","destroy","pause","resume"];function jv(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function nd(t,e,r){jt=jt||_r(),t=t||{},typeof r!="boolean"&&(r=e instanceof jt),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=Cv(this,t,"readableHighWaterMark",r),this.buffer=new Rv,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Ft||(Ft=mr().StringDecoder),this.decoder=new Ft(t.encoding),this.encoding=t.encoding)}function W(t){if(jt=jt||_r(),!(this instanceof W))return new W(t);var e=this instanceof jt;this._readableState=new nd(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),wr.call(this)}Object.defineProperty(W.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});W.prototype.destroy=Jo.destroy;W.prototype._undestroy=Jo.undestroy;W.prototype._destroy=function(t,e){e(t)};W.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=$n.from(t,e),e=""),n=!0),id(this,t,e,!1,n)};W.prototype.unshift=function(t){return id(this,t,null,!0,!1)};function id(t,e,r,n,i){V("readableAddChunk",e);var o=t._readableState;if(e===null)o.reading=!1,Bv(t,o);else{var s;if(i||(s=Fv(o,e)),s)br(t,s);else if(o.objectMode||e&&e.length>0)if(typeof e!="string"&&!o.objectMode&&Object.getPrototypeOf(e)!==$n.prototype&&(e=Nv(e)),n)o.endEmitted?br(t,new qv):zo(t,o,e,!0);else if(o.ended)br(t,new Iv);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||e.length!==0?zo(t,o,e,!1):Ko(t,o)):zo(t,o,e,!1)}else n||(o.reading=!1,Ko(t,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function zo(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Vn(t)),Ko(t,e)}function Fv(t,e){var r;return!Mv(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new Lv("chunk",["string","Buffer","Uint8Array"],e)),r}W.prototype.isPaused=function(){return this._readableState.flowing===!1};W.prototype.setEncoding=function(t){Ft||(Ft=mr().StringDecoder);var e=new Ft(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var ed=1073741824;function kv(t){return t>=ed?t=ed:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function td(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=kv(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}W.prototype.read=function(t){V("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return V("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Yo(this):Vn(this),null;if(t=td(t,e),t===0&&e.ended)return e.length===0&&Yo(this),null;var n=e.needReadable;V("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,V("length less than watermark",n)),e.ended||e.reading?(n=!1,V("reading or ended",n)):n&&(V("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=td(r,e)));var i;return t>0?i=ad(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Yo(this)),i!==null&&this.emit("data",i),i};function Bv(t,e){if(V("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Vn(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,od(t)))}}function Vn(t){var e=t._readableState;V("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(V("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(od,t))}function od(t){var e=t._readableState;V("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Qo(t)}function Ko(t,e){e.readingMore||(e.readingMore=!0,process.nextTick($v,t,e))}function $v(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(V("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}W.prototype._read=function(t){br(this,new Av("_read()"))};W.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,V("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,o=i?a:v;n.endEmitted?process.nextTick(o):r.once("end",o),t.on("unpipe",s);function s(C,P){V("onunpipe"),C===r&&P&&P.hasUnpiped===!1&&(P.hasUnpiped=!0,w())}function a(){V("onend"),t.end()}var u=Uv(r);t.on("drain",u);var d=!1;function w(){V("cleanup"),t.removeListener("close",m),t.removeListener("finish",h),t.removeListener("drain",u),t.removeListener("error",y),t.removeListener("unpipe",s),r.removeListener("end",a),r.removeListener("end",v),r.removeListener("data",E),d=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}r.on("data",E);function E(C){V("ondata");var P=t.write(C);V("dest.write",P),P===!1&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&ud(n.pipes,t)!==-1)&&!d&&(V("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function y(C){V("onerror",C),v(),t.removeListener("error",y),rd(t,"error")===0&&br(t,C)}jv(t,"error",y);function m(){t.removeListener("finish",h),v()}t.once("close",m);function h(){V("onfinish"),t.removeListener("close",m),v()}t.once("finish",h);function v(){V("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(V("pipe resume"),r.resume()),t};function Uv(t){return function(){var r=t._readableState;V("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&rd(t,"data")&&(r.flowing=!0,Qo(t))}}W.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=ud(e.pipes,t);return s===-1?this:(e.pipes.splice(s,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};W.prototype.on=function(t,e){var r=wr.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,V("on readable",n.length,n.reading),n.length?Vn(this):n.reading||process.nextTick(Vv,this)),r};W.prototype.addListener=W.prototype.on;W.prototype.removeListener=function(t,e){var r=wr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(sd,this),r};W.prototype.removeAllListeners=function(t){var e=wr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(sd,this),e};function sd(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function Vv(t){V("readable nexttick read 0"),t.read(0)}W.prototype.resume=function(){var t=this._readableState;return t.flowing||(V("resume"),t.flowing=!t.readableListening,Hv(this,t)),t.paused=!1,this};function Hv(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Xv,t,e))}function Xv(t,e){V("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Qo(t),e.flowing&&!e.reading&&t.read(0)}W.prototype.pause=function(){return V("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(V("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Qo(t){var e=t._readableState;for(V("flow",e.flowing);e.flowing&&t.read()!==null;);}W.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(V("wrapped end"),r.decoder&&!r.ended){var s=r.decoder.end();s&&s.length&&e.push(s)}e.push(null)}),t.on("data",function(s){if(V("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!(r.objectMode&&s==null)&&!(!r.objectMode&&(!s||!s.length))){var a=e.push(s);a||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=(function(a){return function(){return t[a].apply(t,arguments)}})(i));for(var o=0;o<Go.length;o++)t.on(Go[o],this.emit.bind(this,Go[o]));return this._read=function(s){V("wrapped _read",s),n&&(n=!1,t.resume())},this};typeof Symbol=="function"&&(W.prototype[Symbol.asyncIterator]=function(){return Xo===void 0&&(Xo=Yh()),Xo(this)});Object.defineProperty(W.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(W.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(W.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});W._fromList=ad;Object.defineProperty(W.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function ad(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function Yo(t){var e=t._readableState;V("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Wv,e,t))}function Wv(t,e){if(V("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(W.from=function(t,e){return Wo===void 0&&(Wo=Zh()),Wo(W,t,e)});function ud(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var _r=T((oN,hd)=>{"use strict";var Gv=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};hd.exports=Ne;var cd=fd(),es=ts();Fe()(Ne,cd);for(Zo=Gv(es.prototype),Hn=0;Hn<Zo.length;Hn++)Xn=Zo[Hn],Ne.prototype[Xn]||(Ne.prototype[Xn]=es.prototype[Xn]);var Zo,Xn,Hn;function Ne(t){if(!(this instanceof Ne))return new Ne(t);cd.call(this,t),es.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",zv)))}Object.defineProperty(Ne.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ne.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ne.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function zv(){this._writableState.ended||process.nextTick(Yv,this)}function Yv(t){t.end()}Object.defineProperty(Ne.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var ts=T((sN,bd)=>{"use strict";bd.exports=ee;function pd(t){var e=this;this.next=null,this.entry=null,this.finish=function(){EE(e,t)}}var kt;ee.WritableState=Er;var Kv={deprecate:Po()},gd=Co(),Gn=$("buffer").Buffer,Jv=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Qv(t){return Gn.from(t)}function Zv(t){return Gn.isBuffer(t)||t instanceof Jv}var ns=Io(),eE=Ao(),tE=eE.getHighWaterMark,Ze=qt().codes,rE=Ze.ERR_INVALID_ARG_TYPE,nE=Ze.ERR_METHOD_NOT_IMPLEMENTED,iE=Ze.ERR_MULTIPLE_CALLBACK,oE=Ze.ERR_STREAM_CANNOT_PIPE,sE=Ze.ERR_STREAM_DESTROYED,aE=Ze.ERR_STREAM_NULL_VALUES,uE=Ze.ERR_STREAM_WRITE_AFTER_END,lE=Ze.ERR_UNKNOWN_ENCODING,Bt=ns.errorOrDestroy;Fe()(ee,gd);function fE(){}function Er(t,e,r){kt=kt||_r(),t=t||{},typeof r!="boolean"&&(r=e instanceof kt),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=tE(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){yE(e,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new pd(this)}Er.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Er.prototype,"buffer",{get:Kv.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Wn;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Wn=Function.prototype[Symbol.hasInstance],Object.defineProperty(ee,Symbol.hasInstance,{value:function(e){return Wn.call(this,e)?!0:this!==ee?!1:e&&e._writableState instanceof Er}})):Wn=function(e){return e instanceof this};function ee(t){kt=kt||_r();var e=this instanceof kt;if(!e&&!Wn.call(ee,this))return new ee(t);this._writableState=new Er(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),gd.call(this)}ee.prototype.pipe=function(){Bt(this,new oE)};function cE(t,e){var r=new uE;Bt(t,r),process.nextTick(e,r)}function hE(t,e,r,n){var i;return r===null?i=new aE:typeof r!="string"&&!e.objectMode&&(i=new rE("chunk",["string","Buffer"],r)),i?(Bt(t,i),process.nextTick(n,i),!1):!0}ee.prototype.write=function(t,e,r){var n=this._writableState,i=!1,o=!n.objectMode&&Zv(t);return o&&!Gn.isBuffer(t)&&(t=Qv(t)),typeof e=="function"&&(r=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=fE),n.ending?cE(this,r):(o||hE(this,n,t,r))&&(n.pendingcb++,i=pE(this,n,o,t,e,r)),i};ee.prototype.cork=function(){this._writableState.corked++};ee.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&md(this,t))};ee.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new lE(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(ee.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function dE(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Gn.from(e,r)),e}Object.defineProperty(ee.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function pE(t,e,r,n,i,o){if(!r){var s=dE(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var d=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},d?d.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else rs(t,e,!1,a,n,i,o);return u}function rs(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new sE("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function gE(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(vr,t,e),t._writableState.errorEmitted=!0,Bt(t,n)):(i(n),t._writableState.errorEmitted=!0,Bt(t,n),vr(t,e))}function mE(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function yE(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new iE;if(mE(r),e)gE(t,r,n,e,i);else{var o=yd(r)||t.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&md(t,r),n?process.nextTick(dd,t,r,o,i):dd(t,r,o,i)}}function dd(t,e,r,n){r||bE(t,e),e.pendingcb--,n(),vr(t,e)}function bE(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function md(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var s=0,a=!0;r;)i[s]=r,r.isBuf||(a=!1),r=r.next,s+=1;i.allBuffers=a,rs(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new pd(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,d=r.encoding,w=r.callback,E=e.objectMode?1:u.length;if(rs(t,e,!1,E,u,d,w),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}ee.prototype._write=function(t,e,r){r(new nE("_write()"))};ee.prototype._writev=null;ee.prototype.end=function(t,e,r){var n=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||vE(this,n,r),this};Object.defineProperty(ee.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function yd(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function wE(t,e){t._final(function(r){e.pendingcb--,r&&Bt(t,r),e.prefinished=!0,t.emit("prefinish"),vr(t,e)})}function _E(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(wE,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function vr(t,e){var r=yd(e);if(r&&(_E(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}function vE(t,e,r){e.ending=!0,vr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function EE(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty(ee.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});ee.prototype.destroy=ns.destroy;ee.prototype._undestroy=ns.undestroy;ee.prototype._destroy=function(t,e){e(t)}});var is=T((aN,vd)=>{"use strict";var TE=$("util"),wd=ts(),{LEVEL:_d}=ie(),Tr=vd.exports=function(e={}){wd.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this.format=e.format,this.level=e.level,this.handleExceptions=e.handleExceptions,this.handleRejections=e.handleRejections,this.silent=e.silent,e.log&&(this.log=e.log),e.logv&&(this.logv=e.logv),e.close&&(this.close=e.close),this.once("pipe",r=>{this.levels=r.levels,this.parent=r}),this.once("unpipe",r=>{r===this.parent&&(this.parent=null,this.close&&this.close())})};TE.inherits(Tr,wd);Tr.prototype._write=function(e,r,n){if(this.silent||e.exception===!0&&!this.handleExceptions)return n(null);let i=this.level||this.parent&&this.parent.level;if(!i||this.levels[i]>=this.levels[e[_d]]){if(e&&!this.format)return this.log(e,n);let o,s;try{s=this.format.transform(Object.assign({},e),this.format.options)}catch(a){o=a}if(o||!s){if(n(),o)throw o;return}return this.log(s,n)}return this._writableState.sync=!1,n(null)};Tr.prototype._writev=function(e,r){if(this.logv){let n=e.filter(this._accept,this);return n.length?this.logv(n,r):r(null)}for(let n=0;n<e.length;n++){if(!this._accept(e[n]))continue;if(e[n].chunk&&!this.format){this.log(e[n].chunk,e[n].callback);continue}let i,o;try{o=this.format.transform(Object.assign({},e[n].chunk),this.format.options)}catch(s){i=s}if(i||!o){if(e[n].callback(),i)throw r(null),i}else this.log(o,e[n].callback)}return r(null)};Tr.prototype._accept=function(e){let r=e.chunk;if(this.silent)return!1;let n=this.level||this.parent&&this.parent.level;return!!((r.exception===!0||!n||this.levels[n]>=this.levels[r[_d]])&&(this.handleExceptions||r.exception!==!0))};Tr.prototype._nop=function(){}});var ss=T((uN,Td)=>{"use strict";var SE=$("util"),{LEVEL:os}=ie(),Ed=is(),Sr=Td.exports=function(e={}){if(Ed.call(this,e),!e.transport||typeof e.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated();function r(n){this.emit("error",n,this.transport)}this.transport.__winstonError||(this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError))};SE.inherits(Sr,Ed);Sr.prototype._write=function(e,r,n){if(this.silent||e.exception===!0&&!this.handleExceptions)return n(null);(!this.level||this.levels[this.level]>=this.levels[e[os]])&&this.transport.log(e[os],e.message,e,this._nop),n(null)};Sr.prototype._writev=function(e,r){for(let n=0;n<e.length;n++)this._accept(e[n])&&(this.transport.log(e[n].chunk[os],e[n].chunk.message,e[n].chunk,this._nop),e[n].callback());return r(null)};Sr.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
|
|
43
|
-
`))};Sr.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var $t=T((lN,as)=>{"use strict";as.exports=is();as.exports.LegacyTransportStream=ss()});var Dd=T((cN,Od)=>{"use strict";var OE=$("os"),{LEVEL:Sd,MESSAGE:Ut}=ie(),DE=$t();Od.exports=class extends DE{constructor(e={}){super(e),this.name=e.name||"console",this.stderrLevels=this._stringArrayToSet(e.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(e.consoleWarnLevels),this.eol=typeof e.eol=="string"?e.eol:OE.EOL,this.forceConsole=e.forceConsole||!1,this._consoleLog=console.log.bind(console),this._consoleWarn=console.warn.bind(console),this._consoleError=console.error.bind(console),this.setMaxListeners(30)}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.stderrLevels[e[Sd]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[Ut]}${this.eol}`):this._consoleError(e[Ut]),r&&r();return}else if(this.consoleWarnLevels[e[Sd]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[Ut]}${this.eol}`):this._consoleWarn(e[Ut]),r&&r();return}console._stdout&&!this.forceConsole?console._stdout.write(`${e[Ut]}${this.eol}`):this._consoleLog(e[Ut]),r&&r()}_stringArrayToSet(e,r){if(!e)return{};if(r=r||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(r);return e.reduce((n,i)=>{if(typeof i!="string")throw new Error(r);return n[i]=!0,n},{})}}});var Yn=T((zn,xd)=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.default=xE;function xE(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}xd.exports=zn.default});var Md=T((Kn,Nd)=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};Nd.exports=Kn.default});var Cd=T(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.fallback=Rd;et.wrap=Pd;var NE=et.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,ME=et.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,RE=et.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function Rd(t){setTimeout(t,0)}function Pd(t){return(e,...r)=>t(()=>e(...r))}var Or;NE?Or=queueMicrotask:ME?Or=setImmediate:RE?Or=process.nextTick:Or=Rd;et.default=Pd(Or)});var jd=T((Jn,qd)=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.default=qE;var PE=Md(),CE=Ad(PE),LE=Cd(),IE=Ad(LE),AE=yt();function Ad(t){return t&&t.__esModule?t:{default:t}}function qE(t){return(0,AE.isAsync)(t)?function(...e){let r=e.pop(),n=t.apply(this,e);return Ld(n,r)}:(0,CE.default)(function(e,r){var n;try{n=t.apply(this,e)}catch(i){return r(i)}if(n&&typeof n.then=="function")return Ld(n,r);r(null,n)})}function Ld(t,e){return t.then(r=>{Id(e,null,r)},r=>{Id(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function Id(t,e,r){try{t(e,r)}catch(n){(0,IE.default)(i=>{throw i},n)}}qd.exports=Jn.default});var yt=T(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.isAsyncIterable=ke.isAsyncGenerator=ke.isAsync=void 0;var jE=jd(),FE=kE(jE);function kE(t){return t&&t.__esModule?t:{default:t}}function Fd(t){return t[Symbol.toStringTag]==="AsyncFunction"}function BE(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function $E(t){return typeof t[Symbol.asyncIterator]=="function"}function UE(t){if(typeof t!="function")throw new Error("expected a function");return Fd(t)?(0,FE.default)(t):t}ke.default=UE;ke.isAsync=Fd;ke.isAsyncGenerator=BE;ke.isAsyncIterable=$E});var Vt=T((Qn,kd)=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.default=VE;function VE(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function r(...n){return typeof n[e-1]=="function"?t.apply(this,n):new Promise((i,o)=>{n[e-1]=(s,...a)=>{if(s)return o(s);i(a.length>1?a:a[0])},t.apply(this,n)})}return r}kd.exports=Qn.default});var $d=T((Zn,Bd)=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});var HE=Yn(),XE=us(HE),WE=yt(),GE=us(WE),zE=Vt(),YE=us(zE);function us(t){return t&&t.__esModule?t:{default:t}}Zn.default=(0,YE.default)((t,e,r)=>{var n=(0,XE.default)(e)?[]:{};t(e,(i,o,s)=>{(0,GE.default)(i)((a,...u)=>{u.length<2&&([u]=u),n[o]=u,s(a)})},i=>r(i,n))},3);Bd.exports=Zn.default});var ls=T((ei,Ud)=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.default=KE;function KE(t){function e(...r){if(t!==null){var n=t;t=null,n.apply(this,r)}}return Object.assign(e,t),e}Ud.exports=ei.default});var Hd=T((ti,Vd)=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};Vd.exports=ti.default});var Gd=T((ri,Wd)=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.default=i1;var JE=Yn(),QE=Xd(JE),ZE=Hd(),e1=Xd(ZE);function Xd(t){return t&&t.__esModule?t:{default:t}}function t1(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function r1(t){var e=-1;return function(){var n=t.next();return n.done?null:(e++,{value:n.value,key:e})}}function n1(t){var e=t?Object.keys(t):[],r=-1,n=e.length;return function i(){var o=e[++r];return o==="__proto__"?i():r<n?{value:t[o],key:o}:null}}function i1(t){if((0,QE.default)(t))return t1(t);var e=(0,e1.default)(t);return e?r1(e):n1(t)}Wd.exports=ri.default});var fs=T((ni,zd)=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.default=o1;function o1(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}zd.exports=ni.default});var oi=T((ii,Yd)=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});var s1={};ii.default=s1;Yd.exports=ii.default});var Jd=T((si,Kd)=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.default=f1;var a1=oi(),u1=l1(a1);function l1(t){return t&&t.__esModule?t:{default:t}}function f1(t,e,r,n){let i=!1,o=!1,s=!1,a=0,u=0;function d(){a>=e||s||i||(s=!0,t.next().then(({value:y,done:m})=>{if(!(o||i)){if(s=!1,m){i=!0,a<=0&&n(null);return}a++,r(y,u,w),u++,d()}}).catch(E))}function w(y,m){if(a-=1,!o){if(y)return E(y);if(y===!1){i=!0,o=!0;return}if(m===u1.default||i&&a<=0)return i=!0,n(null);d()}}function E(y){o||(s=!1,i=!0,n(y))}d()}Kd.exports=si.default});var tp=T((ai,ep)=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});var c1=ls(),h1=Dr(c1),d1=Gd(),p1=Dr(d1),g1=fs(),m1=Dr(g1),Qd=yt(),y1=Jd(),Zd=Dr(y1),b1=oi(),w1=Dr(b1);function Dr(t){return t&&t.__esModule?t:{default:t}}ai.default=t=>(e,r,n)=>{if(n=(0,h1.default)(n),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return n(null);if((0,Qd.isAsyncGenerator)(e))return(0,Zd.default)(e,t,r,n);if((0,Qd.isAsyncIterable)(e))return(0,Zd.default)(e[Symbol.asyncIterator](),t,r,n);var i=(0,p1.default)(e),o=!1,s=!1,a=0,u=!1;function d(E,y){if(!s)if(a-=1,E)o=!0,n(E);else if(E===!1)o=!0,s=!0;else{if(y===w1.default||o&&a<=0)return o=!0,n(null);u||w()}}function w(){for(u=!0;a<t&&!o;){var E=i();if(E===null){o=!0,a<=0&&n(null);return}a+=1,r(E.value,E.key,(0,m1.default)(d))}u=!1}w()};ep.exports=ai.default});var hs=T((ui,rp)=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});var _1=tp(),v1=cs(_1),E1=yt(),T1=cs(E1),S1=Vt(),O1=cs(S1);function cs(t){return t&&t.__esModule?t:{default:t}}function D1(t,e,r,n){return(0,v1.default)(e)(t,(0,T1.default)(r),n)}ui.default=(0,O1.default)(D1,4);rp.exports=ui.default});var op=T((li,ip)=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});var x1=hs(),N1=np(x1),M1=Vt(),R1=np(M1);function np(t){return t&&t.__esModule?t:{default:t}}function P1(t,e,r){return(0,N1.default)(t,1,e,r)}li.default=(0,R1.default)(P1,3);ip.exports=li.default});var up=T((fi,ap)=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.default=q1;var C1=$d(),L1=sp(C1),I1=op(),A1=sp(I1);function sp(t){return t&&t.__esModule?t:{default:t}}function q1(t,e){return(0,L1.default)(A1.default,t,e)}ap.exports=fi.default});var ds=T((pN,lp)=>{"use strict";lp.exports=$("stream")});var gp=T((gN,pp)=>{"use strict";function fp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function cp(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?fp(Object(r),!0).forEach(function(n){j1(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fp(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function j1(t,e,r){return e=dp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function F1(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,dp(n.key),n)}}function k1(t,e,r){return e&&hp(t.prototype,e),r&&hp(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function dp(t){var e=B1(t,"string");return typeof e=="symbol"?e:String(e)}function B1(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var $1=$("buffer"),ci=$1.Buffer,U1=$("util"),ps=U1.inspect,V1=ps&&ps.custom||"inspect";function H1(t,e,r){ci.prototype.copy.call(t,e,r)}pp.exports=(function(){function t(){F1(this,t),this.head=null,this.tail=null,this.length=0}return k1(t,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return ci.alloc(0);for(var n=ci.allocUnsafe(r>>>0),i=this.head,o=0;i;)H1(i.data,n,o),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,o=n.data;for(r-=o.length;n=n.next;){var s=n.data,a=r>s.length?s.length:r;if(a===s.length?o+=s:o+=s.slice(0,r),r-=a,r===0){a===s.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=s.slice(a));break}++i}return this.length-=i,o}},{key:"_getBuffer",value:function(r){var n=ci.allocUnsafe(r),i=this.head,o=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var s=i.data,a=r>s.length?s.length:r;if(s.copy(n,n.length-r,0,a),r-=a,r===0){a===s.length?(++o,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=s.slice(a));break}++o}return this.length-=o,n}},{key:V1,value:function(r,n){return ps(this,cp(cp({},n),{},{depth:0,customInspect:!1}))}}]),t})()});var ms=T((mN,yp)=>{"use strict";function X1(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(gs,this,t)):process.nextTick(gs,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(o){!e&&o?r._writableState?r._writableState.errorEmitted?process.nextTick(hi,r):(r._writableState.errorEmitted=!0,process.nextTick(mp,r,o)):process.nextTick(mp,r,o):e?(process.nextTick(hi,r),e(o)):process.nextTick(hi,r)}),this)}function mp(t,e){gs(t,e),hi(t)}function hi(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function W1(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function gs(t,e){t.emit("error",e)}function G1(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}yp.exports={destroy:X1,undestroy:W1,errorOrDestroy:G1}});var tt=T((yN,_p)=>{"use strict";var wp={};function ve(t,e,r){r||(r=Error);function n(o,s,a){return typeof e=="string"?e:e(o,s,a)}class i extends r{constructor(s,a,u){super(n(s,a,u))}}i.prototype.name=r.name,i.prototype.code=t,wp[t]=i}function bp(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(n=>String(n)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function z1(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Y1(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function K1(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}ve("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);ve("ERR_INVALID_ARG_TYPE",function(t,e,r){let n;typeof e=="string"&&z1(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";let i;if(Y1(t," argument"))i=`The ${t} ${n} ${bp(e,"type")}`;else{let o=K1(t,".")?"property":"argument";i=`The "${t}" ${o} ${n} ${bp(e,"type")}`}return i+=`. Received type ${typeof r}`,i},TypeError);ve("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");ve("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});ve("ERR_STREAM_PREMATURE_CLOSE","Premature close");ve("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});ve("ERR_MULTIPLE_CALLBACK","Callback called multiple times");ve("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");ve("ERR_STREAM_WRITE_AFTER_END","write after end");ve("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);ve("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);ve("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");_p.exports.codes=wp});var ys=T((bN,vp)=>{"use strict";var J1=tt().codes.ERR_INVALID_OPT_VALUE;function Q1(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Z1(t,e,r,n){var i=Q1(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var o=n?r:"highWaterMark";throw new J1(o,i)}return Math.floor(i)}return t.objectMode?16:16*1024}vp.exports={getHighWaterMark:Z1}});var _s=T((wN,xp)=>{"use strict";xp.exports=te;function Tp(t){var e=this;this.next=null,this.entry=null,this.finish=function(){DT(e,t)}}var Ht;te.WritableState=Nr;var eT={deprecate:Po()},Sp=ds(),pi=$("buffer").Buffer,tT=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function rT(t){return pi.from(t)}function nT(t){return pi.isBuffer(t)||t instanceof tT}var ws=ms(),iT=ys(),oT=iT.getHighWaterMark,rt=tt().codes,sT=rt.ERR_INVALID_ARG_TYPE,aT=rt.ERR_METHOD_NOT_IMPLEMENTED,uT=rt.ERR_MULTIPLE_CALLBACK,lT=rt.ERR_STREAM_CANNOT_PIPE,fT=rt.ERR_STREAM_DESTROYED,cT=rt.ERR_STREAM_NULL_VALUES,hT=rt.ERR_STREAM_WRITE_AFTER_END,dT=rt.ERR_UNKNOWN_ENCODING,Xt=ws.errorOrDestroy;Fe()(te,Sp);function pT(){}function Nr(t,e,r){Ht=Ht||bt(),t=t||{},typeof r!="boolean"&&(r=e instanceof Ht),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=oT(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){vT(e,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Tp(this)}Nr.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Nr.prototype,"buffer",{get:eT.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var di;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(di=Function.prototype[Symbol.hasInstance],Object.defineProperty(te,Symbol.hasInstance,{value:function(e){return di.call(this,e)?!0:this!==te?!1:e&&e._writableState instanceof Nr}})):di=function(e){return e instanceof this};function te(t){Ht=Ht||bt();var e=this instanceof Ht;if(!e&&!di.call(te,this))return new te(t);this._writableState=new Nr(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),Sp.call(this)}te.prototype.pipe=function(){Xt(this,new lT)};function gT(t,e){var r=new hT;Xt(t,r),process.nextTick(e,r)}function mT(t,e,r,n){var i;return r===null?i=new cT:typeof r!="string"&&!e.objectMode&&(i=new sT("chunk",["string","Buffer"],r)),i?(Xt(t,i),process.nextTick(n,i),!1):!0}te.prototype.write=function(t,e,r){var n=this._writableState,i=!1,o=!n.objectMode&&nT(t);return o&&!pi.isBuffer(t)&&(t=rT(t)),typeof e=="function"&&(r=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=pT),n.ending?gT(this,r):(o||mT(this,n,t,r))&&(n.pendingcb++,i=bT(this,n,o,t,e,r)),i};te.prototype.cork=function(){this._writableState.corked++};te.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Op(this,t))};te.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new dT(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(te.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function yT(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=pi.from(e,r)),e}Object.defineProperty(te.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function bT(t,e,r,n,i,o){if(!r){var s=yT(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var d=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},d?d.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else bs(t,e,!1,a,n,i,o);return u}function bs(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new fT("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function wT(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(xr,t,e),t._writableState.errorEmitted=!0,Xt(t,n)):(i(n),t._writableState.errorEmitted=!0,Xt(t,n),xr(t,e))}function _T(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function vT(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new uT;if(_T(r),e)wT(t,r,n,e,i);else{var o=Dp(r)||t.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Op(t,r),n?process.nextTick(Ep,t,r,o,i):Ep(t,r,o,i)}}function Ep(t,e,r,n){r||ET(t,e),e.pendingcb--,n(),xr(t,e)}function ET(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Op(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var s=0,a=!0;r;)i[s]=r,r.isBuf||(a=!1),r=r.next,s+=1;i.allBuffers=a,bs(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new Tp(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,d=r.encoding,w=r.callback,E=e.objectMode?1:u.length;if(bs(t,e,!1,E,u,d,w),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}te.prototype._write=function(t,e,r){r(new aT("_write()"))};te.prototype._writev=null;te.prototype.end=function(t,e,r){var n=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||OT(this,n,r),this};Object.defineProperty(te.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Dp(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function TT(t,e){t._final(function(r){e.pendingcb--,r&&Xt(t,r),e.prefinished=!0,t.emit("prefinish"),xr(t,e)})}function ST(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(TT,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function xr(t,e){var r=Dp(e);if(r&&(ST(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}function OT(t,e,r){e.ending=!0,xr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function DT(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty(te.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});te.prototype.destroy=ws.destroy;te.prototype._undestroy=ws.undestroy;te.prototype._destroy=function(t,e){e(t)}});var bt=T((_N,Mp)=>{"use strict";var xT=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Mp.exports=Me;var Np=Ts(),Es=_s();Fe()(Me,Np);for(vs=xT(Es.prototype),gi=0;gi<vs.length;gi++)mi=vs[gi],Me.prototype[mi]||(Me.prototype[mi]=Es.prototype[mi]);var vs,mi,gi;function Me(t){if(!(this instanceof Me))return new Me(t);Np.call(this,t),Es.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",NT)))}Object.defineProperty(Me.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Me.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Me.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function NT(){this._writableState.ended||process.nextTick(MT,this)}function MT(t){t.end()}Object.defineProperty(Me.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var yi=T((vN,Cp)=>{"use strict";var Rp=tt().codes.ERR_STREAM_PREMATURE_CLOSE;function RT(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}function PT(){}function CT(t){return t.setHeader&&typeof t.abort=="function"}function Pp(t,e,r){if(typeof e=="function")return Pp(t,null,e);e||(e={}),r=RT(r||PT);var n=e.readable||e.readable!==!1&&t.readable,i=e.writable||e.writable!==!1&&t.writable,o=function(){t.writable||a()},s=t._writableState&&t._writableState.finished,a=function(){i=!1,s=!0,n||r.call(t)},u=t._readableState&&t._readableState.endEmitted,d=function(){n=!1,u=!0,i||r.call(t)},w=function(h){r.call(t,h)},E=function(){var h;if(n&&!u)return(!t._readableState||!t._readableState.ended)&&(h=new Rp),r.call(t,h);if(i&&!s)return(!t._writableState||!t._writableState.ended)&&(h=new Rp),r.call(t,h)},y=function(){t.req.on("finish",a)};return CT(t)?(t.on("complete",a),t.on("abort",E),t.req?y():t.on("request",y)):i&&!t._writableState&&(t.on("end",o),t.on("close",o)),t.on("end",d),t.on("finish",a),e.error!==!1&&t.on("error",w),t.on("close",E),function(){t.removeListener("complete",a),t.removeListener("abort",E),t.removeListener("request",y),t.req&&t.req.removeListener("finish",a),t.removeListener("end",o),t.removeListener("close",o),t.removeListener("finish",a),t.removeListener("end",d),t.removeListener("error",w),t.removeListener("close",E)}}Cp.exports=Pp});var Ip=T((EN,Lp)=>{"use strict";var bi;function nt(t,e,r){return e=LT(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function LT(t){var e=IT(t,"string");return typeof e=="symbol"?e:String(e)}function IT(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var AT=yi(),it=Symbol("lastResolve"),wt=Symbol("lastReject"),Mr=Symbol("error"),wi=Symbol("ended"),_t=Symbol("lastPromise"),Ss=Symbol("handlePromise"),vt=Symbol("stream");function ot(t,e){return{value:t,done:e}}function qT(t){var e=t[it];if(e!==null){var r=t[vt].read();r!==null&&(t[_t]=null,t[it]=null,t[wt]=null,e(ot(r,!1)))}}function jT(t){process.nextTick(qT,t)}function FT(t,e){return function(r,n){t.then(function(){if(e[wi]){r(ot(void 0,!0));return}e[Ss](r,n)},n)}}var kT=Object.getPrototypeOf(function(){}),BT=Object.setPrototypeOf((bi={get stream(){return this[vt]},next:function(){var e=this,r=this[Mr];if(r!==null)return Promise.reject(r);if(this[wi])return Promise.resolve(ot(void 0,!0));if(this[vt].destroyed)return new Promise(function(s,a){process.nextTick(function(){e[Mr]?a(e[Mr]):s(ot(void 0,!0))})});var n=this[_t],i;if(n)i=new Promise(FT(n,this));else{var o=this[vt].read();if(o!==null)return Promise.resolve(ot(o,!1));i=new Promise(this[Ss])}return this[_t]=i,i}},nt(bi,Symbol.asyncIterator,function(){return this}),nt(bi,"return",function(){var e=this;return new Promise(function(r,n){e[vt].destroy(null,function(i){if(i){n(i);return}r(ot(void 0,!0))})})}),bi),kT),$T=function(e){var r,n=Object.create(BT,(r={},nt(r,vt,{value:e,writable:!0}),nt(r,it,{value:null,writable:!0}),nt(r,wt,{value:null,writable:!0}),nt(r,Mr,{value:null,writable:!0}),nt(r,wi,{value:e._readableState.endEmitted,writable:!0}),nt(r,Ss,{value:function(o,s){var a=n[vt].read();a?(n[_t]=null,n[it]=null,n[wt]=null,o(ot(a,!1))):(n[it]=o,n[wt]=s)},writable:!0}),r));return n[_t]=null,AT(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=n[wt];o!==null&&(n[_t]=null,n[it]=null,n[wt]=null,o(i)),n[Mr]=i;return}var s=n[it];s!==null&&(n[_t]=null,n[it]=null,n[wt]=null,s(ot(void 0,!0))),n[wi]=!0}),e.on("readable",jT.bind(null,n)),n};Lp.exports=$T});var Fp=T((TN,jp)=>{"use strict";function Ap(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(d){r(d);return}a.done?e(u):Promise.resolve(u).then(n,i)}function UT(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function s(u){Ap(o,n,i,s,a,"next",u)}function a(u){Ap(o,n,i,s,a,"throw",u)}s(void 0)})}}function qp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function VT(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?qp(Object(r),!0).forEach(function(n){HT(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qp(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function HT(t,e,r){return e=XT(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function XT(t){var e=WT(t,"string");return typeof e=="symbol"?e:String(e)}function WT(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var GT=tt().codes.ERR_INVALID_ARG_TYPE;function zT(t,e,r){var n;if(e&&typeof e.next=="function")n=e;else if(e&&e[Symbol.asyncIterator])n=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])n=e[Symbol.iterator]();else throw new GT("iterable",["Iterable"],e);var i=new t(VT({objectMode:!0},r)),o=!1;i._read=function(){o||(o=!0,s())};function s(){return a.apply(this,arguments)}function a(){return a=UT(function*(){try{var u=yield n.next(),d=u.value,w=u.done;w?i.push(null):i.push(yield d)?s():o=!1}catch(E){i.destroy(E)}}),a.apply(this,arguments)}return i}jp.exports=zT});var Ts=T((ON,zp)=>{"use strict";zp.exports=G;var Wt;G.ReadableState=Up;var SN=$("events").EventEmitter,$p=function(e,r){return e.listeners(r).length},Pr=ds(),_i=$("buffer").Buffer,YT=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function KT(t){return _i.from(t)}function JT(t){return _i.isBuffer(t)||t instanceof YT}var Os=$("util"),H;Os&&Os.debuglog?H=Os.debuglog("stream"):H=function(){};var QT=gp(),Cs=ms(),ZT=ys(),eS=ZT.getHighWaterMark,vi=tt().codes,tS=vi.ERR_INVALID_ARG_TYPE,rS=vi.ERR_STREAM_PUSH_AFTER_EOF,nS=vi.ERR_METHOD_NOT_IMPLEMENTED,iS=vi.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Gt,Ds,xs;Fe()(G,Pr);var Rr=Cs.errorOrDestroy,Ns=["error","close","destroy","pause","resume"];function oS(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Up(t,e,r){Wt=Wt||bt(),t=t||{},typeof r!="boolean"&&(r=e instanceof Wt),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=eS(this,t,"readableHighWaterMark",r),this.buffer=new QT,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Gt||(Gt=mr().StringDecoder),this.decoder=new Gt(t.encoding),this.encoding=t.encoding)}function G(t){if(Wt=Wt||bt(),!(this instanceof G))return new G(t);var e=this instanceof Wt;this._readableState=new Up(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Pr.call(this)}Object.defineProperty(G.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});G.prototype.destroy=Cs.destroy;G.prototype._undestroy=Cs.undestroy;G.prototype._destroy=function(t,e){e(t)};G.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=_i.from(t,e),e=""),n=!0),Vp(this,t,e,!1,n)};G.prototype.unshift=function(t){return Vp(this,t,null,!0,!1)};function Vp(t,e,r,n,i){H("readableAddChunk",e);var o=t._readableState;if(e===null)o.reading=!1,uS(t,o);else{var s;if(i||(s=sS(o,e)),s)Rr(t,s);else if(o.objectMode||e&&e.length>0)if(typeof e!="string"&&!o.objectMode&&Object.getPrototypeOf(e)!==_i.prototype&&(e=KT(e)),n)o.endEmitted?Rr(t,new iS):Ms(t,o,e,!0);else if(o.ended)Rr(t,new rS);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||e.length!==0?Ms(t,o,e,!1):Ps(t,o)):Ms(t,o,e,!1)}else n||(o.reading=!1,Ps(t,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function Ms(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Ei(t)),Ps(t,e)}function sS(t,e){var r;return!JT(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new tS("chunk",["string","Buffer","Uint8Array"],e)),r}G.prototype.isPaused=function(){return this._readableState.flowing===!1};G.prototype.setEncoding=function(t){Gt||(Gt=mr().StringDecoder);var e=new Gt(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var kp=1073741824;function aS(t){return t>=kp?t=kp:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Bp(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=aS(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}G.prototype.read=function(t){H("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return H("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Rs(this):Ei(this),null;if(t=Bp(t,e),t===0&&e.ended)return e.length===0&&Rs(this),null;var n=e.needReadable;H("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,H("length less than watermark",n)),e.ended||e.reading?(n=!1,H("reading or ended",n)):n&&(H("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Bp(r,e)));var i;return t>0?i=Wp(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Rs(this)),i!==null&&this.emit("data",i),i};function uS(t,e){if(H("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Ei(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Hp(t)))}}function Ei(t){var e=t._readableState;H("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(H("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Hp,t))}function Hp(t){var e=t._readableState;H("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Ls(t)}function Ps(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(lS,t,e))}function lS(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(H("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}G.prototype._read=function(t){Rr(this,new nS("_read()"))};G.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,H("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,o=i?a:v;n.endEmitted?process.nextTick(o):r.once("end",o),t.on("unpipe",s);function s(C,P){H("onunpipe"),C===r&&P&&P.hasUnpiped===!1&&(P.hasUnpiped=!0,w())}function a(){H("onend"),t.end()}var u=fS(r);t.on("drain",u);var d=!1;function w(){H("cleanup"),t.removeListener("close",m),t.removeListener("finish",h),t.removeListener("drain",u),t.removeListener("error",y),t.removeListener("unpipe",s),r.removeListener("end",a),r.removeListener("end",v),r.removeListener("data",E),d=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}r.on("data",E);function E(C){H("ondata");var P=t.write(C);H("dest.write",P),P===!1&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&Gp(n.pipes,t)!==-1)&&!d&&(H("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function y(C){H("onerror",C),v(),t.removeListener("error",y),$p(t,"error")===0&&Rr(t,C)}oS(t,"error",y);function m(){t.removeListener("finish",h),v()}t.once("close",m);function h(){H("onfinish"),t.removeListener("close",m),v()}t.once("finish",h);function v(){H("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(H("pipe resume"),r.resume()),t};function fS(t){return function(){var r=t._readableState;H("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&$p(t,"data")&&(r.flowing=!0,Ls(t))}}G.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=Gp(e.pipes,t);return s===-1?this:(e.pipes.splice(s,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};G.prototype.on=function(t,e){var r=Pr.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,H("on readable",n.length,n.reading),n.length?Ei(this):n.reading||process.nextTick(cS,this)),r};G.prototype.addListener=G.prototype.on;G.prototype.removeListener=function(t,e){var r=Pr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Xp,this),r};G.prototype.removeAllListeners=function(t){var e=Pr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Xp,this),e};function Xp(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function cS(t){H("readable nexttick read 0"),t.read(0)}G.prototype.resume=function(){var t=this._readableState;return t.flowing||(H("resume"),t.flowing=!t.readableListening,hS(this,t)),t.paused=!1,this};function hS(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(dS,t,e))}function dS(t,e){H("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Ls(t),e.flowing&&!e.reading&&t.read(0)}G.prototype.pause=function(){return H("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(H("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Ls(t){var e=t._readableState;for(H("flow",e.flowing);e.flowing&&t.read()!==null;);}G.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(H("wrapped end"),r.decoder&&!r.ended){var s=r.decoder.end();s&&s.length&&e.push(s)}e.push(null)}),t.on("data",function(s){if(H("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!(r.objectMode&&s==null)&&!(!r.objectMode&&(!s||!s.length))){var a=e.push(s);a||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=(function(a){return function(){return t[a].apply(t,arguments)}})(i));for(var o=0;o<Ns.length;o++)t.on(Ns[o],this.emit.bind(this,Ns[o]));return this._read=function(s){H("wrapped _read",s),n&&(n=!1,t.resume())},this};typeof Symbol=="function"&&(G.prototype[Symbol.asyncIterator]=function(){return Ds===void 0&&(Ds=Ip()),Ds(this)});Object.defineProperty(G.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(G.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(G.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});G._fromList=Wp;Object.defineProperty(G.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Wp(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function Rs(t){var e=t._readableState;H("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(pS,e,t))}function pS(t,e){if(H("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(G.from=function(t,e){return xs===void 0&&(xs=Fp()),xs(G,t,e)});function Gp(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var Is=T((DN,Kp)=>{"use strict";Kp.exports=Be;var Ti=tt().codes,gS=Ti.ERR_METHOD_NOT_IMPLEMENTED,mS=Ti.ERR_MULTIPLE_CALLBACK,yS=Ti.ERR_TRANSFORM_ALREADY_TRANSFORMING,bS=Ti.ERR_TRANSFORM_WITH_LENGTH_0,Si=bt();Fe()(Be,Si);function wS(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new mS);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Be(t){if(!(this instanceof Be))return new Be(t);Si.call(this,t),this._transformState={afterTransform:wS.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",_S)}function _S(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Yp(t,e,r)}):Yp(this,null,null)}Be.prototype.push=function(t,e){return this._transformState.needTransform=!1,Si.prototype.push.call(this,t,e)};Be.prototype._transform=function(t,e,r){r(new gS("_transform()"))};Be.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Be.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Be.prototype._destroy=function(t,e){Si.prototype._destroy.call(this,t,function(r){e(r)})};function Yp(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new bS;if(t._transformState.transforming)throw new yS;return t.push(null)}});var Zp=T((xN,Qp)=>{"use strict";Qp.exports=Cr;var Jp=Is();Fe()(Cr,Jp);function Cr(t){if(!(this instanceof Cr))return new Cr(t);Jp.call(this,t)}Cr.prototype._transform=function(t,e,r){r(null,t)}});var ig=T((NN,ng)=>{"use strict";var As;function vS(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var rg=tt().codes,ES=rg.ERR_MISSING_ARGS,TS=rg.ERR_STREAM_DESTROYED;function eg(t){if(t)throw t}function SS(t){return t.setHeader&&typeof t.abort=="function"}function OS(t,e,r,n){n=vS(n);var i=!1;t.on("close",function(){i=!0}),As===void 0&&(As=yi()),As(t,{readable:e,writable:r},function(s){if(s)return n(s);i=!0,n()});var o=!1;return function(s){if(!i&&!o){if(o=!0,SS(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();n(s||new TS("pipe"))}}}function tg(t){t()}function DS(t,e){return t.pipe(e)}function xS(t){return!t.length||typeof t[t.length-1]!="function"?eg:t.pop()}function NS(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=xS(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new ES("streams");var i,o=e.map(function(s,a){var u=a<e.length-1,d=a>0;return OS(s,u,d,function(w){i||(i=w),w&&o.forEach(tg),!u&&(o.forEach(tg),n(i))})});return e.reduce(DS)}ng.exports=NS});var Et=T((Ee,Ir)=>{"use strict";var Lr=$("stream");process.env.READABLE_STREAM==="disable"&&Lr?(Ir.exports=Lr.Readable,Object.assign(Ir.exports,Lr),Ir.exports.Stream=Lr):(Ee=Ir.exports=Ts(),Ee.Stream=Lr||Ee,Ee.Readable=Ee,Ee.Writable=_s(),Ee.Duplex=bt(),Ee.Transform=Is(),Ee.PassThrough=Zp(),Ee.finished=yi(),Ee.pipeline=ig())});var Us=T((MN,sg)=>{"use strict";var zt=[],Ar=[],qs=function(){};function Fs(t){return~zt.indexOf(t)?!1:(zt.push(t),!0)}function ks(t){qs=t}function MS(t){for(var e=[],r=0;r<zt.length;r++){if(zt[r].async){e.push(zt[r]);continue}if(zt[r](t))return!0}return e.length?new Promise(function(i){Promise.all(e.map(function(s){return s(t)})).then(function(s){i(s.some(Boolean))})}):!1}function Bs(t){return~Ar.indexOf(t)?!1:(Ar.push(t),!0)}function js(){qs.apply(qs,arguments)}function og(t){for(var e=0;e<Ar.length;e++)t=Ar[e].apply(Ar[e],arguments);return t}function $s(t,e){var r=Object.prototype.hasOwnProperty;for(var n in e)r.call(e,n)&&(t[n]=e[n]);return t}function RS(t){return t.enabled=!1,t.modify=Bs,t.set=ks,t.use=Fs,$s(function(){return!1},t)}function PS(t){function e(){var r=Array.prototype.slice.call(arguments,0);return js.call(js,t,og(r,t)),!0}return t.enabled=!0,t.modify=Bs,t.set=ks,t.use=Fs,$s(e,t)}sg.exports=function(e){return e.introduce=$s,e.enabled=MS,e.process=og,e.modify=Bs,e.write=js,e.nope=RS,e.yep=PS,e.set=ks,e.use=Fs,e}});var ug=T((RN,ag)=>{"use strict";var CS=Us(),LS=CS(function t(e,r){return r=r||{},r.namespace=e,r.prod=!0,r.dev=!1,r.force||t.force?t.yep(r):t.nope(r)});ag.exports=LS});var pg=T((PN,dg)=>{"use strict";var Re={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},fg=Object.create(null);for(let t in Re)Object.hasOwn(Re,t)&&(fg[Re[t]]=t);var le={to:{},get:{}};le.get=function(t){let e=t.slice(0,3).toLowerCase(),r,n;switch(e){case"hsl":{r=le.get.hsl(t),n="hsl";break}case"hwb":{r=le.get.hwb(t),n="hwb";break}default:{r=le.get.rgb(t),n="rgb";break}}return r?{model:n,value:r}:null};le.get.rgb=function(t){if(!t)return null;let e=/^#([a-f\d]{3,4})$/i,r=/^#([a-f\d]{6})([a-f\d]{2})?$/i,n=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,i=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,s=[0,0,0,1],a,u,d;if(a=t.match(r)){for(d=a[2],a=a[1],u=0;u<3;u++){let w=u*2;s[u]=Number.parseInt(a.slice(w,w+2),16)}d&&(s[3]=Number.parseInt(d,16)/255)}else if(a=t.match(e)){for(a=a[1],d=a[3],u=0;u<3;u++)s[u]=Number.parseInt(a[u]+a[u],16);d&&(s[3]=Number.parseInt(d+d,16)/255)}else if(a=t.match(n)){for(u=0;u<3;u++)s[u]=Number.parseInt(a[u+1],10);a[4]&&(s[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else if(a=t.match(i)){for(u=0;u<3;u++)s[u]=Math.round(Number.parseFloat(a[u+1])*2.55);a[4]&&(s[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else return(a=t.match(o))?a[1]==="transparent"?[0,0,0,0]:Object.hasOwn(Re,a[1])?(s=Re[a[1]],s[3]=1,s):null:null;for(u=0;u<3;u++)s[u]=st(s[u],0,255);return s[3]=st(s[3],0,1),s};le.get.hsl=function(t){if(!t)return null;let e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){let n=Number.parseFloat(r[4]),i=(Number.parseFloat(r[1])%360+360)%360,o=st(Number.parseFloat(r[2]),0,100),s=st(Number.parseFloat(r[3]),0,100),a=st(Number.isNaN(n)?1:n,0,1);return[i,o,s,a]}return null};le.get.hwb=function(t){if(!t)return null;let e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){let n=Number.parseFloat(r[4]),i=(Number.parseFloat(r[1])%360+360)%360,o=st(Number.parseFloat(r[2]),0,100),s=st(Number.parseFloat(r[3]),0,100),a=st(Number.isNaN(n)?1:n,0,1);return[i,o,s,a]}return null};le.to.hex=function(...t){return"#"+Oi(t[0])+Oi(t[1])+Oi(t[2])+(t[3]<1?Oi(Math.round(t[3]*255)):"")};le.to.rgb=function(...t){return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};le.to.rgb.percent=function(...t){let e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),n=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+r+"%, "+n+"%)":"rgba("+e+"%, "+r+"%, "+n+"%, "+t[3]+")"};le.to.hsl=function(...t){return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};le.to.hwb=function(...t){let e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};le.to.keyword=function(...t){return fg[t.slice(0,3)]};function st(t,e,r){return Math.min(Math.max(e,t),r)}function Oi(t){let e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}var cg={};for(let t of Object.keys(Re))cg[Re[t]]=t;var j={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},$e=(6/29)**3;function Yt(t){let e=t>.0031308?1.055*t**.4166666666666667-.055:t*12.92;return Math.min(Math.max(0,e),1)}function Kt(t){return t>.04045?((t+.055)/1.055)**2.4:t/12.92}for(let t of Object.keys(j)){if(!("channels"in j[t]))throw new Error("missing channels property: "+t);if(!("labels"in j[t]))throw new Error("missing channel labels property: "+t);if(j[t].labels.length!==j[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=j[t];delete j[t].channels,delete j[t].labels,Object.defineProperty(j[t],"channels",{value:e}),Object.defineProperty(j[t],"labels",{value:r})}j.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),o=Math.max(e,r,n),s=o-i,a,u;switch(o){case i:{a=0;break}case e:{a=(r-n)/s;break}case r:{a=2+(n-e)/s;break}case n:{a=4+(e-r)/s;break}}a=Math.min(a*60,360),a<0&&(a+=360);let d=(i+o)/2;return o===i?u=0:d<=.5?u=s/(o+i):u=s/(2-o-i),[a,u*100,d*100]};j.rgb.hsv=function(t){let e,r,n,i,o,s=t[0]/255,a=t[1]/255,u=t[2]/255,d=Math.max(s,a,u),w=d-Math.min(s,a,u),E=function(y){return(d-y)/6/w+1/2};if(w===0)i=0,o=0;else{switch(o=w/d,e=E(s),r=E(a),n=E(u),d){case s:{i=n-r;break}case a:{i=1/3+e-n;break}case u:{i=2/3+r-e;break}}i<0?i+=1:i>1&&(i-=1)}return[i*360,o*100,d*100]};j.rgb.hwb=function(t){let e=t[0],r=t[1],n=t[2],i=j.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,o*100,n*100]};j.rgb.oklab=function(t){let e=Kt(t[0]/255),r=Kt(t[1]/255),n=Kt(t[2]/255),i=Math.cbrt(.4122214708*e+.5363325363*r+.0514459929*n),o=Math.cbrt(.2119034982*e+.6806995451*r+.1073969566*n),s=Math.cbrt(.0883024619*e+.2817188376*r+.6299787005*n),a=.2104542553*i+.793617785*o-.0040720468*s,u=1.9779984951*i-2.428592205*o+.4505937099*s,d=.0259040371*i+.7827717662*o-.808675766*s;return[a*100,u*100,d*100]};j.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(1-e,1-r,1-n),o=(1-e-i)/(1-i)||0,s=(1-r-i)/(1-i)||0,a=(1-n-i)/(1-i)||0;return[o*100,s*100,a*100,i*100]};function IS(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}j.rgb.keyword=function(t){let e=cg[t];if(e)return e;let r=Number.POSITIVE_INFINITY,n;for(let i of Object.keys(Re)){let o=Re[i],s=IS(t,o);s<r&&(r=s,n=i)}return n};j.keyword.rgb=function(t){return Re[t]};j.rgb.xyz=function(t){let e=Kt(t[0]/255),r=Kt(t[1]/255),n=Kt(t[2]/255),i=e*.4124564+r*.3575761+n*.1804375,o=e*.2126729+r*.7151522+n*.072175,s=e*.0193339+r*.119192+n*.9503041;return[i*100,o*100,s*100]};j.rgb.lab=function(t){let e=j.rgb.xyz(t),r=e[0],n=e[1],i=e[2];r/=95.047,n/=100,i/=108.883,r=r>$e?r**(1/3):7.787*r+16/116,n=n>$e?n**(1/3):7.787*n+16/116,i=i>$e?i**(1/3):7.787*i+16/116;let o=116*n-16,s=500*(r-n),a=200*(n-i);return[o,s,a]};j.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i,o;if(r===0)return o=n*255,[o,o,o];let s=n<.5?n*(1+r):n+r-n*r,a=2*n-s,u=[0,0,0];for(let d=0;d<3;d++)i=e+1/3*-(d-1),i<0&&i++,i>1&&i--,6*i<1?o=a+(s-a)*6*i:2*i<1?o=s:3*i<2?o=a+(s-a)*(2/3-i)*6:o=a,u[d]=o*255;return u};j.hsl.hsv=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=r,o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=o<=1?o:2-o;let s=(n+r)/2,a=n===0?2*i/(o+i):2*r/(n+r);return[e,a*100,s*100]};j.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,o=e-Math.floor(e),s=255*n*(1-r),a=255*n*(1-r*o),u=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,u,s];case 1:return[a,n,s];case 2:return[s,n,u];case 3:return[s,a,n];case 4:return[u,s,n];case 5:return[n,s,a]}};j.hsv.hsl=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),o,s;s=(2-r)*n;let a=(2-r)*i;return o=r*i,o/=a<=1?a:2-a,o=o||0,s/=2,[e,o*100,s*100]};j.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,o;i>1&&(r/=i,n/=i);let s=Math.floor(6*e),a=1-n;o=6*e-s,(s&1)!==0&&(o=1-o);let u=r+o*(a-r),d,w,E;switch(s){default:case 6:case 0:{d=a,w=u,E=r;break}case 1:{d=u,w=a,E=r;break}case 2:{d=r,w=a,E=u;break}case 3:{d=r,w=u,E=a;break}case 4:{d=u,w=r,E=a;break}case 5:{d=a,w=r,E=u;break}}return[d*255,w*255,E*255]};j.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,o=1-Math.min(1,e*(1-i)+i),s=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i);return[o*255,s*255,a*255]};j.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i,o,s;return i=e*3.2404542+r*-1.5371385+n*-.4985314,o=e*-.969266+r*1.8760108+n*.041556,s=e*.0556434+r*-.2040259+n*1.0572252,i=Yt(i),o=Yt(o),s=Yt(s),[i*255,o*255,s*255]};j.xyz.lab=function(t){let e=t[0],r=t[1],n=t[2];e/=95.047,r/=100,n/=108.883,e=e>$e?e**(1/3):7.787*e+16/116,r=r>$e?r**(1/3):7.787*r+16/116,n=n>$e?n**(1/3):7.787*n+16/116;let i=116*r-16,o=500*(e-r),s=200*(r-n);return[i,o,s]};j.xyz.oklab=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=Math.cbrt(.8189330101*e+.3618667424*r-.1288597137*n),o=Math.cbrt(.0329845436*e+.9293118715*r+.0361456387*n),s=Math.cbrt(.0482003018*e+.2643662691*r+.633851707*n),a=.2104542553*i+.793617785*o-.0040720468*s,u=1.9779984951*i-2.428592205*o+.4505937099*s,d=.0259040371*i+.7827717662*o-.808675766*s;return[a*100,u*100,d*100]};j.oklab.oklch=function(t){return j.lab.lch(t)};j.oklab.xyz=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=(.999999998*e+.396337792*r+.215803758*n)**3,o=(1.000000008*e-.105561342*r-.063854175*n)**3,s=(1.000000055*e-.089484182*r-1.291485538*n)**3,a=1.227013851*i-.55779998*o+.281256149*s,u=-.040580178*i+1.11225687*o-.071676679*s,d=-.076381285*i-.421481978*o+1.58616322*s;return[a*100,u*100,d*100]};j.oklab.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=(e+.3963377774*r+.2158037573*n)**3,o=(e-.1055613458*r-.0638541728*n)**3,s=(e-.0894841775*r-1.291485548*n)**3,a=Yt(4.0767416621*i-3.3077115913*o+.2309699292*s),u=Yt(-1.2684380046*i+2.6097574011*o-.3413193965*s),d=Yt(-.0041960863*i-.7034186147*o+1.707614701*s);return[a*255,u*255,d*255]};j.oklch.oklab=function(t){return j.lch.lab(t)};j.lab.xyz=function(t){let e=t[0],r=t[1],n=t[2],i,o,s;o=(e+16)/116,i=r/500+o,s=o-n/200;let a=o**3,u=i**3,d=s**3;return o=a>$e?a:(o-16/116)/7.787,i=u>$e?u:(i-16/116)/7.787,s=d>$e?d:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};j.lab.lch=function(t){let e=t[0],r=t[1],n=t[2],i;i=Math.atan2(n,r)*360/2/Math.PI,i<0&&(i+=360);let s=Math.sqrt(r*r+n*n);return[e,s,i]};j.lch.lab=function(t){let e=t[0],r=t[1],i=t[2]/360*2*Math.PI,o=r*Math.cos(i),s=r*Math.sin(i);return[e,o,s]};j.rgb.ansi16=function(t,e=null){let[r,n,i]=t,o=e===null?j.rgb.hsv(t)[2]:e;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return o===2&&(s+=60),s};j.hsv.ansi16=function(t){return j.rgb.ansi16(j.hsv.rgb(t),t[2])};j.rgb.ansi256=function(t){let e=t[0],r=t[1],n=t[2];return e>>4===r>>4&&r>>4===n>>4?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};j.ansi16.rgb=function(t){t=t[0];let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(Math.trunc(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,o=(e>>2&1)*r*255;return[n,i,o]};j.ansi256.rgb=function(t){if(t=t[0],t>=232){let o=(t-232)*10+8;return[o,o,o]}t-=16;let e,r=Math.floor(t/36)/5*255,n=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return[r,n,i]};j.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".slice(r.length)+r};j.hex.rgb=function(t){let e=t.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=[...r].map(a=>a+a).join(""));let n=Number.parseInt(r,16),i=n>>16&255,o=n>>8&255,s=n&255;return[i,o,s]};j.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),o=Math.min(Math.min(e,r),n),s=i-o,a,u=s<1?o/(1-s):0;return s<=0?a=0:i===e?a=(r-n)/s%6:i===r?a=2+(n-e)/s:a=4+(e-r)/s,a/=6,a%=1,[a*360,s*100,u*100]};j.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=r<.5?2*e*r:2*e*(1-r),i=0;return n<1&&(i=(r-.5*n)/(1-n)),[t[0],n*100,i*100]};j.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=e*r,i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],n*100,i*100]};j.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];let i=[0,0,0],o=e%1*6,s=o%1,a=1-s,u=0;switch(Math.floor(o)){case 0:{i[0]=1,i[1]=s,i[2]=0;break}case 1:{i[0]=a,i[1]=1,i[2]=0;break}case 2:{i[0]=0,i[1]=1,i[2]=s;break}case 3:{i[0]=0,i[1]=a,i[2]=1;break}case 4:{i[0]=s,i[1]=0,i[2]=1;break}default:i[0]=1,i[1]=0,i[2]=a}return u=(1-r)*n,[(r*i[0]+u)*255,(r*i[1]+u)*255,(r*i[2]+u)*255]};j.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e),i=0;return n>0&&(i=e/n),[t[0],i*100,n*100]};j.hcg.hsl=function(t){let e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],i*100,n*100]};j.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return[t[0],(n-e)*100,(1-n)*100]};j.hwb.hcg=function(t){let e=t[1]/100,n=1-t[2]/100,i=n-e,o=0;return i<1&&(o=(n-i)/(1-i)),[t[0],i*100,o*100]};j.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};j.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};j.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};j.gray.hsl=function(t){return[0,0,t[0]]};j.gray.hsv=j.gray.hsl;j.gray.hwb=function(t){return[0,100,t[0]]};j.gray.cmyk=function(t){return[0,0,0,t[0]]};j.gray.lab=function(t){return[t[0],0,0]};j.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".slice(n.length)+n};j.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};function AS(){let t={},e=Object.keys(j);for(let{length:r}=e,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function qS(t){let e=AS(),r=[t];for(e[t].distance=0;r.length>0;){let n=r.pop(),i=Object.keys(j[n]);for(let{length:o}=i,s=0;s<o;s++){let a=i[s],u=e[a];u.distance===-1&&(u.distance=e[n].distance+1,u.parent=n,r.unshift(a))}}return e}function jS(t,e){return function(r){return e(t(r))}}function FS(t,e){let r=[e[t].parent,t],n=j[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=jS(j[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}function kS(t){let e=qS(t),r={},n=Object.keys(e);for(let{length:i}=n,o=0;o<i;o++){let s=n[o];e[s].parent!==null&&(r[s]=FS(s,e))}return r}var fe={},BS=Object.keys(j);function $S(t){let e=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function US(t){let e=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let i=t(r);if(typeof i=="object")for(let{length:o}=i,s=0;s<o;s++)i[s]=Math.round(i[s]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}for(let t of BS){fe[t]={},Object.defineProperty(fe[t],"channels",{value:j[t].channels}),Object.defineProperty(fe[t],"labels",{value:j[t].labels});let e=kS(t),r=Object.keys(e);for(let n of r){let i=e[n];fe[t][n]=US(i),fe[t][n].raw=$S(i)}}var hg=["keyword","gray","hex"],Vs={};for(let t of Object.keys(fe))Vs[[...fe[t].labels].sort().join("")]=t;var Hs={};function ue(t,e){if(!(this instanceof ue))return new ue(t,e);if(e&&e in hg&&(e=null),e&&!(e in fe))throw new Error("Unknown model: "+e);let r,n;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof ue)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){let i=le.get(t);if(i===null)throw new Error("Unable to parse color from string: "+t);this.model=i.model,n=fe[this.model].channels,this.color=i.value.slice(0,n),this.valpha=typeof i.value[n]=="number"?i.value[n]:1}else if(t.length>0){this.model=e||"rgb",n=fe[this.model].channels;let i=Array.prototype.slice.call(t,0,n);this.color=Xs(i,n),this.valpha=typeof t[n]=="number"?t[n]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;let i=Object.keys(t);"alpha"in t&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);let o=i.sort().join("");if(!(o in Vs))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=Vs[o];let{labels:s}=fe[this.model],a=[];for(r=0;r<s.length;r++)a.push(t[s[r]]);this.color=Xs(a)}if(Hs[this.model])for(n=fe[this.model].channels,r=0;r<n;r++){let i=Hs[this.model][r];i&&(this.color[r]=i(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}ue.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in le.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);let r=e.valpha===1?e.color:[...e.color,this.valpha];return le.to[e.model](...r)},percentString(t){let e=this.rgb().round(typeof t=="number"?t:1),r=e.valpha===1?e.color:[...e.color,this.valpha];return le.to.rgb.percent(...r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let t={},{channels:e}=fe[this.model],{labels:r}=fe[this.model];for(let n=0;n<e;n++)t[r[n]]=this.color[n];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){let t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){let t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new ue([...this.color.map(HS(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new ue([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:re("rgb",0,ae(255)),green:re("rgb",1,ae(255)),blue:re("rgb",2,ae(255)),hue:re(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:re("hsl",1,ae(100)),lightness:re("hsl",2,ae(100)),saturationv:re("hsv",1,ae(100)),value:re("hsv",2,ae(100)),chroma:re("hcg",1,ae(100)),gray:re("hcg",2,ae(100)),white:re("hwb",1,ae(100)),wblack:re("hwb",2,ae(100)),cyan:re("cmyk",0,ae(100)),magenta:re("cmyk",1,ae(100)),yellow:re("cmyk",2,ae(100)),black:re("cmyk",3,ae(100)),x:re("xyz",0,ae(95.047)),y:re("xyz",1,ae(100)),z:re("xyz",2,ae(108.833)),l:re("lab",0,ae(100)),a:re("lab",1),b:re("lab",2),keyword(t){return t!==void 0?new ue(t):fe[this.model].keyword(this.color)},hex(t){return t!==void 0?new ue(t):le.to.hex(...this.rgb().round().color)},hexa(t){if(t!==void 0)return new ue(t);let e=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),le.to.hex(...e)+r},rgbNumber(){let t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){let t=this.rgb().color,e=[];for(let[r,n]of t.entries()){let i=n/255;e[r]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){let e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level(t){let e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){let t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){let e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){let e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){let e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){let e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){let e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){let e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){let t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return ue.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){let e=this.hsl(),r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);let r=t.rgb(),n=this.rgb(),i=e===void 0?.5:e,o=2*i-1,s=r.alpha()-n.alpha(),a=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,u=1-a;return ue.rgb(a*r.red()+u*n.red(),a*r.green()+u*n.green(),a*r.blue()+u*n.blue(),r.alpha()*i+n.alpha()*(1-i))}};for(let t of Object.keys(fe)){if(hg.includes(t))continue;let{channels:e}=fe[t];ue.prototype[t]=function(...r){return this.model===t?new ue(this):r.length>0?new ue(r,t):new ue([...XS(fe[this.model][t].raw(this.color)),this.valpha],t)},ue[t]=function(...r){let n=r[0];return typeof n=="number"&&(n=Xs(r,e)),new ue(n,t)}}function VS(t,e){return Number(t.toFixed(e))}function HS(t){return function(e){return VS(e,t)}}function re(t,e,r){t=Array.isArray(t)?t:[t];for(let n of t)(Hs[n]||=[])[e]=r;return t=t[0],function(n){let i;return n!==void 0?(r&&(n=r(n)),i=this[t](),i.color[e]=n,i):(i=this[t]().color[e],r&&(i=r(i)),i)}}function ae(t){return function(e){return Math.max(0,Math.min(t,e))}}function XS(t){return Array.isArray(t)?t:[t]}function Xs(t,e){for(let r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}function WS(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var GS=function(e){for(var r=0,n=0;r<e.length;n=e.charCodeAt(r++)+((n<<5)-n));var i=Math.floor(Math.abs(Math.sin(n)*1e4%1*16777216)).toString(16);return"#"+Array(6-i.length+1).join("0")+i},lg=WS(GS);function zS(t,e){let r=t.split(e||":"),n=lg(r[0]);if(!r.length)return n;for(let i=0,o=r.length-1;i<o;i++)n=ue(n).mix(ue(lg(r[i+1]))).saturate(1).hex();return n}dg.exports=zS});var mg=T((CN,gg)=>{"use strict";function Se(t,e){if(e)return new Se(t).style(e);if(!(this instanceof Se))return new Se(t);this.text=t}Se.prototype.prefix="\x1B[";Se.prototype.suffix="m";Se.prototype.hex=function(e){e=e[0]==="#"?e.substring(1):e,e.length===3&&(e=e.split(""),e[5]=e[2],e[4]=e[2],e[3]=e[1],e[2]=e[1],e[1]=e[0],e=e.join(""));var r=e.substring(0,2),n=e.substring(2,4),i=e.substring(4,6);return[parseInt(r,16),parseInt(n,16),parseInt(i,16)]};Se.prototype.rgb=function(e,r,n){var i=e/255*5,o=r/255*5,s=n/255*5;return this.ansi(i,o,s)};Se.prototype.ansi=function(e,r,n){var i=Math.round(e),o=Math.round(r),s=Math.round(n);return 16+i*36+o*6+s};Se.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};Se.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};gg.exports=Se});var bg=T((LN,yg)=>{"use strict";var YS=pg(),KS=mg();yg.exports=function(e,r){var n=r.namespace,i=r.colors!==!1?KS(n+":",YS(n)):n+":";return e[0]=i+" "+e[0],e}});var _g=T((IN,wg)=>{"use strict";wg.exports=function(e,r){if(!r)return!1;for(var n=r.split(/[\s,]+/),i=0;i<n.length;i++){if(r=n[i].replace("*",".*?"),r.charAt(0)==="-"){if(new RegExp("^"+r.substr(1)+"$").test(e))return!1;continue}if(new RegExp("^"+r+"$").test(e))return!0}return!1}});var Eg=T((AN,vg)=>{"use strict";var JS=_g();vg.exports=function(e){return function(n){try{return JS(n,e())}catch{}return!1}}});var Sg=T((qN,Tg)=>{"use strict";var QS=Eg();Tg.exports=QS(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var Dg=T((jN,Og)=>{"use strict";Og.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e)}catch{}}});var Ng=T((FN,xg)=>{"use strict";var ZS=Us(),eO=$("tty").isatty(1),Di=ZS(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:eO,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});Di.modify(bg());Di.use(Sg());Di.set(Dg());xg.exports=Di});var qr=T((kN,Ws)=>{"use strict";process.env.NODE_ENV==="production"?Ws.exports=ug():Ws.exports=Ng()});var Rg=T((BN,Mg)=>{"use strict";var Gs=$("fs"),{StringDecoder:tO}=$("string_decoder"),{Stream:rO}=Et();function nO(){}Mg.exports=(t,e)=>{let r=Buffer.alloc(65536),n=new tO("utf8"),i=new rO,o="",s=0,a=0;return t.start===-1&&delete t.start,i.readable=!0,i.destroy=()=>{i.destroyed=!0,i.emit("end"),i.emit("close")},Gs.open(t.file,"a+","0644",(u,d)=>{if(u){e?e(u):i.emit("error",u),i.destroy();return}(function w(){if(i.destroyed){Gs.close(d,nO);return}return Gs.read(d,r,0,r.length,s,(E,y)=>{if(E){e?e(E):i.emit("error",E),i.destroy();return}if(!y)return o&&((t.start==null||a>t.start)&&(e?e(null,o):i.emit("line",o)),a++,o=""),setTimeout(w,1e3);let m=n.write(r.slice(0,y));e||i.emit("data",m),m=(o+m).split(/\n+/);let h=m.length-1,v=0;for(;v<h;v++)(t.start==null||a>t.start)&&(e?e(null,m[v]):i.emit("line",m[v])),a++;return o=m[h],s+=y,w()})})()}),e?i.destroy:i}});var Ig=T((UN,Lg)=>{"use strict";var be=$("fs"),ce=$("path"),Pg=up(),iO=$("zlib"),{MESSAGE:oO}=ie(),{Stream:sO,PassThrough:Cg}=Et(),aO=$t(),Oe=qr()("winston:file"),uO=$("os"),lO=Rg();Lg.exports=class extends aO{constructor(e={}){super(e),this.name=e.name||"file";function r(n,...i){i.slice(1).forEach(o=>{if(e[o])throw new Error(`Cannot set ${o} and ${n} together`)})}if(this._stream=new Cg,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),e.filename||e.dirname)r("filename or dirname","stream"),this._basename=this.filename=e.filename?ce.basename(e.filename):"winston.log",this.dirname=e.dirname||ce.dirname(e.filename),this.options=e.options||{flags:"a"};else if(e.stream)console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),r("stream","filename","maxsize"),this._dest=this._stream.pipe(this._setupStream(e.stream)),this.dirname=ce.dirname(this._dest.path);else throw new Error("Cannot log to file without filename or stream.");this.maxsize=e.maxsize||null,this.rotationFormat=e.rotationFormat||!1,this.zippedArchive=e.zippedArchive||!1,this.maxFiles=e.maxFiles||null,this.eol=typeof e.eol=="string"?e.eol:uO.EOL,this.tailable=e.tailable||!1,this.lazy=e.lazy||!1,this._size=0,this._pendingSize=0,this._created=0,this._drain=!1,this._opening=!1,this._ending=!1,this._fileExist=!1,this.dirname&&this._createLogDirIfNotExist(this.dirname),this.lazy||this.open()}finishIfEnding(){this._ending&&(this._opening?this.once("open",()=>{this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())}):(this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())))}log(e,r=()=>{}){if(this.silent)return r(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(e,r)});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(e,r)});return}if(this.lazy){if(!this._fileExist){this._opening||this.open(),this.once("open",()=>{this._fileExist=!0,this.log(e,r)});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{this._opening||this.open(),this.once("open",()=>{this.log(e,r)})});return}}let n=`${e[oO]}${this.eol}`,i=Buffer.byteLength(n);function o(){if(this._size+=i,this._pendingSize-=i,Oe("logged %s %s",this._size,n),this.emit("logged",e),!this._rotate&&!this._opening&&this._needsNewFile()){if(this.lazy){this._endStream(()=>{this.emit("fileclosed")});return}this._rotate=!0,this._endStream(()=>this._rotateFile())}}this._pendingSize+=i,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);let s=this._stream.write(n,o.bind(this));return s?r():(this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r()})),Oe("written",s,this._drain),this.finishIfEnding(),s}query(e,r){typeof e=="function"&&(r=e,e={}),e=E(e);let n=ce.join(this.dirname,this.filename),i="",o=[],s=0,a=be.createReadStream(n,{encoding:"utf8"});a.on("error",y=>{if(a.readable&&a.destroy(),!!r)return y.code!=="ENOENT"?r(y):r(null,o)}),a.on("data",y=>{y=(i+y).split(/\n+/);let m=y.length-1,h=0;for(;h<m;h++)(!e.start||s>=e.start)&&u(y[h]),s++;i=y[m]}),a.on("close",()=>{i&&u(i,!0),e.order==="desc"&&(o=o.reverse()),r&&r(null,o)});function u(y,m){try{let h=JSON.parse(y);w(h)&&d(h)}catch(h){m||a.emit("error",h)}}function d(y){if(e.rows&&o.length>=e.rows&&e.order!=="desc"){a.readable&&a.destroy();return}e.fields&&(y=e.fields.reduce((m,h)=>(m[h]=y[h],m),{})),e.order==="desc"&&o.length>=e.rows&&o.shift(),o.push(y)}function w(y){if(!y||typeof y!="object")return;let m=new Date(y.timestamp);if(!(e.from&&m<e.from||e.until&&m>e.until||e.level&&e.level!==y.level))return!0}function E(y){return y=y||{},y.rows=y.rows||y.limit||10,y.start=y.start||0,y.until=y.until||new Date,typeof y.until!="object"&&(y.until=new Date(y.until)),y.from=y.from||y.until-1440*60*1e3,typeof y.from!="object"&&(y.from=new Date(y.from)),y.order=y.order||"desc",y}}stream(e={}){let r=ce.join(this.dirname,this.filename),n=new sO,i={file:r,start:e.start};return n.destroy=lO(i,(o,s)=>{if(o)return n.emit("error",o);try{n.emit("data",s),s=JSON.parse(s),n.emit("log",s)}catch(a){n.emit("error",a)}}),n}open(){this.filename&&(this._opening||(this._opening=!0,this.stat((e,r)=>{if(e)return this.emit("error",e);Oe("stat done: %s { size: %s }",this.filename,r),this._size=r,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",()=>{this._stream.emit("rotate")||(this._rotate=!1)})})))}stat(e){let r=this._getFile(),n=ce.join(this.dirname,r);be.stat(n,(i,o)=>{if(i&&i.code==="ENOENT")return Oe("ENOENT\xA0ok",n),this.filename=r,e(null,0);if(i)return Oe(`err ${i.code} ${n}`),e(i);if(!o||this._needsNewFile(o.size))return this._incFile(()=>this.stat(e));this.filename=r,e(null,o.size)})}close(e){this._stream&&this._stream.end(()=>{e&&e(),this.emit("flush"),this.emit("closed")})}_needsNewFile(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}_onError(e){this.emit("error",e)}_setupStream(e){return e.on("error",this._onError),e}_cleanupStream(e){return e.removeListener("error",this._onError),e.destroy(),e}_rotateFile(){this._incFile(()=>this.open())}_endStream(e=()=>{}){this._dest?(this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),e()})):e()}_createStream(e){let r=ce.join(this.dirname,this.filename);Oe("create stream start",r,this.options);let n=be.createWriteStream(r,this.options).on("error",i=>Oe(i)).on("close",()=>Oe("close",n.path,n.bytesWritten)).on("open",()=>{Oe("file open ok",r),this.emit("open",r),e.pipe(n),this.rotatedWhileOpening&&(this._stream=new Cg,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(n),e.end())});return Oe("create stream ok",r),n}_incFile(e){Oe("_incFile",this.filename);let r=ce.extname(this._basename),n=ce.basename(this._basename,r),i=[];this.zippedArchive&&i.push(function(o){let s=this._created>0&&!this.tailable?this._created:"";this._compressFile(ce.join(this.dirname,`${n}${s}${r}`),ce.join(this.dirname,`${n}${s}${r}.gz`),o)}.bind(this)),i.push(function(o){this.tailable?this._checkMaxFilesTailable(r,n,o):(this._created+=1,this._checkMaxFilesIncrementing(r,n,o))}.bind(this)),Pg(i,e)}_getFile(){let e=ce.extname(this._basename),r=ce.basename(this._basename,e),n=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${r}${n}${e}`:`${r}${e}`}_checkMaxFilesIncrementing(e,r,n){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(n);let i=this._created-this.maxFiles,o=i!==0?i:"",s=this.zippedArchive?".gz":"",a=`${r}${o}${e}${s}`,u=ce.join(this.dirname,a);be.unlink(u,n)}_checkMaxFilesTailable(e,r,n){let i=[];if(!this.maxFiles)return;let o=this.zippedArchive?".gz":"";for(let s=this.maxFiles-1;s>1;s--)i.push(function(a,u){let d=`${r}${a-1}${e}${o}`,w=ce.join(this.dirname,d);be.exists(w,E=>{if(!E)return u(null);d=`${r}${a}${e}${o}`,be.rename(w,ce.join(this.dirname,d),u)})}.bind(this,s));Pg(i,()=>{be.rename(ce.join(this.dirname,`${r}${e}${o}`),ce.join(this.dirname,`${r}1${e}${o}`),n)})}_compressFile(e,r,n){be.access(e,be.F_OK,i=>{if(i)return n();var o=iO.createGzip(),s=be.createReadStream(e),a=be.createWriteStream(r);a.on("finish",()=>{be.unlink(e,n)}),s.pipe(o).pipe(a)})}_createLogDirIfNotExist(e){be.existsSync(e)||be.mkdirSync(e,{recursive:!0})}}});var qg=T((HN,Ag)=>{"use strict";var fO=$("http"),cO=$("https"),{Stream:hO}=Et(),dO=$t(),{configure:pO}=dr();Ag.exports=class extends dO{constructor(e={}){super(e),this.options=e,this.name=e.name||"http",this.ssl=!!e.ssl,this.host=e.host||"localhost",this.port=e.port,this.auth=e.auth,this.path=e.path||"",this.maximumDepth=e.maximumDepth,this.agent=e.agent,this.headers=e.headers||{},this.headers["content-type"]="application/json",this.batch=e.batch||!1,this.batchInterval=e.batchInterval||5e3,this.batchCount=e.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},this.port||(this.port=this.ssl?443:80)}log(e,r){this._request(e,null,null,(n,i)=>{i&&i.statusCode!==200&&(n=new Error(`Invalid HTTP Status Code: ${i.statusCode}`)),n?this.emit("warn",n):this.emit("logged",e)}),r&&setImmediate(r)}query(e,r){typeof e=="function"&&(r=e,e={}),e={method:"query",params:this.normalizeQuery(e)};let n=e.params.auth||null;delete e.params.auth;let i=e.params.path||null;delete e.params.path,this._request(e,n,i,(o,s,a)=>{if(s&&s.statusCode!==200&&(o=new Error(`Invalid HTTP Status Code: ${s.statusCode}`)),o)return r(o);if(typeof a=="string")try{a=JSON.parse(a)}catch(u){return r(u)}r(null,a)})}stream(e={}){let r=new hO;e={method:"stream",params:e};let n=e.params.path||null;delete e.params.path;let i=e.params.auth||null;delete e.params.auth;let o="",s=this._request(e,i,n);return r.destroy=()=>s.destroy(),s.on("data",a=>{a=(o+a).split(/\n+/);let u=a.length-1,d=0;for(;d<u;d++)try{r.emit("log",JSON.parse(a[d]))}catch(w){r.emit("error",w)}o=a[u]}),s.on("error",a=>r.emit("error",a)),r}_request(e,r,n,i){e=e||{},r=r||this.auth,n=n||this.path||"",this.batch?this._doBatch(e,i,r,n):this._doRequest(e,i,r,n)}_doBatch(e,r,n,i){if(this.batchOptions.push(e),this.batchOptions.length===1){let o=this;this.batchCallback=r,this.batchTimeoutID=setTimeout(function(){o.batchTimeoutID=-1,o._doBatchRequest(o.batchCallback,n,i)},this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,n,i)}_doBatchRequest(e,r,n){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);let i=this.batchOptions.slice();this.batchOptions=[],this._doRequest(i,e,r,n)}_doRequest(e,r,n,i){let o=Object.assign({},this.headers);n&&n.bearer&&(o.Authorization=`Bearer ${n.bearer}`);let s=(this.ssl?cO:fO).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${i.replace(/^\//,"")}`,headers:o,auth:n&&n.username&&n.password?`${n.username}:${n.password}`:"",agent:this.agent});s.on("error",r),s.on("response",u=>u.on("end",()=>r(null,u)).resume());let a=pO({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});s.end(Buffer.from(a(e,this.options.replacer),"utf8"))}}});var zs=T((XN,jg)=>{"use strict";var Pe=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";Pe.writable=t=>Pe(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";Pe.readable=t=>Pe(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";Pe.duplex=t=>Pe.writable(t)&&Pe.readable(t);Pe.transform=t=>Pe.duplex(t)&&typeof t._transform=="function";jg.exports=Pe});var kg=T((GN,Fg)=>{"use strict";var gO=zs(),{MESSAGE:mO}=ie(),yO=$("os"),bO=$t();Fg.exports=class extends bO{constructor(e={}){if(super(e),!e.stream||!gO(e.stream))throw new Error("options.stream is required.");this._stream=e.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=e.stream._writableState.objectMode,this.eol=typeof e.eol=="string"?e.eol:yO.EOL}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[mO]}${this.eol}`),r&&r()}}});var Bg=T(jr=>{"use strict";Object.defineProperty(jr,"Console",{configurable:!0,enumerable:!0,get(){return Dd()}});Object.defineProperty(jr,"File",{configurable:!0,enumerable:!0,get(){return Ig()}});Object.defineProperty(jr,"Http",{configurable:!0,enumerable:!0,get(){return qg()}});Object.defineProperty(jr,"Stream",{configurable:!0,enumerable:!0,get(){return kg()}})});var Ni=T(Fr=>{"use strict";var xi=Mo(),{configs:Ys}=ie();Fr.cli=xi.levels(Ys.cli);Fr.npm=xi.levels(Ys.npm);Fr.syslog=xi.levels(Ys.syslog);Fr.addColors=xi.levels});var Ug=T((Mi,$g)=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});var wO=Yn(),_O=Tt(wO),vO=oi(),EO=Tt(vO),TO=hs(),SO=Tt(TO),OO=ls(),DO=Tt(OO),xO=fs(),NO=Tt(xO),MO=yt(),RO=Tt(MO),PO=Vt(),CO=Tt(PO);function Tt(t){return t&&t.__esModule?t:{default:t}}function LO(t,e,r){r=(0,DO.default)(r);var n=0,i=0,{length:o}=t,s=!1;o===0&&r(null);function a(u,d){u===!1&&(s=!0),s!==!0&&(u?r(u):(++i===o||d===EO.default)&&r(null))}for(;n<o;n++)e(t[n],n,(0,NO.default)(a))}function IO(t,e,r){return(0,SO.default)(t,1/0,e,r)}function AO(t,e,r){var n=(0,_O.default)(t)?LO:IO;return n(t,(0,RO.default)(e),r)}Mi.default=(0,CO.default)(AO,3);$g.exports=Mi.default});var Hg=T((Ri,Vg)=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.default=qO;function qO(t){return(e,r,n)=>t(e,n)}Vg.exports=Ri.default});var Li=T((Ci,Xg)=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});var jO=Ug(),FO=Pi(jO),kO=Hg(),BO=Pi(kO),$O=yt(),UO=Pi($O),VO=Vt(),HO=Pi(VO);function Pi(t){return t&&t.__esModule?t:{default:t}}function XO(t,e,r){return(0,FO.default)(t,(0,BO.default)((0,UO.default)(e)),r)}Ci.default=(0,HO.default)(XO,3);Xg.exports=Ci.default});var Gg=T((KN,Wg)=>{"use strict";var WO=Object.prototype.toString;Wg.exports=function(e){if(typeof e.displayName=="string"&&e.constructor.name)return e.displayName;if(typeof e.name=="string"&&e.name)return e.name;if(typeof e=="object"&&e.constructor&&typeof e.constructor.name=="string")return e.constructor.name;var r=e.toString(),n=WO.call(e).slice(8,-1);return n==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=n,r||"anonymous"}});var Ks=T((JN,zg)=>{"use strict";var GO=Gg();zg.exports=function(e){var r=0,n;function i(){return r||(r=1,n=e.apply(this,arguments),e=null),n}return i.displayName=GO(e),i}});var Js=T(Br=>{"use strict";Br.get=function(t){var e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},n=Error.prepareStackTrace;Error.prepareStackTrace=function(o,s){return s},Error.captureStackTrace(r,t||Br.get);var i=r.stack;return Error.prepareStackTrace=n,Error.stackTraceLimit=e,i};Br.parse=function(t){if(!t.stack)return[];var e=this,r=t.stack.split(`
|
|
44
|
-
`).slice(1);return r.map(function(n){if(n.match(/^\s*[-]{4,}$/))return e._createParsedCallSite({fileName:n,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var i=n.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(i){var o=null,s=null,a=null,u=null,d=null,w=i[5]==="native";if(i[1]){a=i[1];var E=a.lastIndexOf(".");if(a[E-1]=="."&&E--,E>0){o=a.substr(0,E),s=a.substr(E+1);var y=o.indexOf(".Module");y>0&&(a=a.substr(y+1),o=o.substr(0,y))}u=null}s&&(u=o,d=s),s==="<anonymous>"&&(d=null,a=null);var
|
|
45
|
-
`),stack:e&&e.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:
|
|
46
|
-
`),stack:e&&e.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:
|
|
47
|
-
`));h&&this.exceptions.handle(h),v&&this.rejections.handle(v)}getHighestLogLevel(){let e
|
|
48
|
-
`))}_onEvent(e,r){function n(i){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,i,r)}r["__winston"+e]||(r["__winston"+e]=n.bind(this),r.on(e,r["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function $r(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(Ai.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});fm.exports=Ai});var na=T((lM,cm)=>{"use strict";var{LEVEL:d2}=ie(),p2=Ni(),g2=Ii(),m2=qr()("winston:create-logger");function y2(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}cm.exports=function(t={}){t.levels=t.levels||p2.npm.levels;class e extends g2{constructor(i){super(i)}}let r=new e(t);return Object.keys(t.levels).forEach(function(n){if(m2('Define prototype method for "%s"',n),n==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[n]=function(...i){let o=this||r;if(i.length===1){let[s]=i,a=s&&s.message&&s||{message:s};return a.level=a[d2]=n,o._addDefaultMeta(a),o.write(a),this||r}return i.length===0?(o.log(n,""),o):o.log(n,...i)},e.prototype[y2(n)]=function(){return(this||r).isLevelEnabled(n)}}),r}});var dm=T((cM,hm)=>{"use strict";var b2=na();hm.exports=class{constructor(e={}){this.loggers=new Map,this.options=e}add(e,r){if(!this.loggers.has(e)){r=Object.assign({},r||this.options);let n=r.transports||this.options.transports;n?r.transports=Array.isArray(n)?n.slice():[n]:r.transports=[];let i=b2(r);i.on("close",()=>this._delete(e)),this.loggers.set(e,i)}return this.loggers.get(e)}get(e,r){return this.add(e,r)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach((r,n)=>this._removeLogger(n))}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e)}_delete(e){this.loggers.delete(e)}}});var gm=T(Y=>{"use strict";var pm=Mo(),{warn:Ur}=Ro();Y.version=Th().version;Y.transports=Bg();Y.config=Ni();Y.addColors=pm.levels;Y.format=pm.format;Y.createLogger=na();Y.Logger=Ii();Y.ExceptionHandler=Zs();Y.RejectionHandler=ta();Y.Container=dm();Y.Transport=$t();Y.loggers=new Y.Container;var Le=Y.createLogger();Object.keys(Y.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>Y[t]=(...e)=>Le[t](...e));Object.defineProperty(Y,"level",{get(){return Le.level},set(t){Le.level=t}});Object.defineProperty(Y,"exceptions",{get(){return Le.exceptions}});Object.defineProperty(Y,"rejections",{get(){return Le.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(Y,t,{get(){return Le[t]},set(e){Le[t]=e}})});Object.defineProperty(Y,"default",{get(){return{exceptionHandlers:Le.exceptionHandlers,rejectionHandlers:Le.rejectionHandlers,transports:Le.transports}}});Ur.deprecated(Y,"setLevels");Ur.forFunctions(Y,"useFormat",["cli"]);Ur.forProperties(Y,"useFormat",["padLevels","stripColors"]);Ur.forFunctions(Y,"deprecated",["addRewriter","addFilter","clone","extend"]);Ur.forProperties(Y,"deprecated",["emitErrs","levelLength"])});import*as at from"node:process";var zr=class{constructor(e,r){this.#e="connector-runtime";this.init=()=>Promise.resolve();this.start=()=>Promise.resolve();this.stop=()=>Promise.resolve();this.#t=r,at.on?at.on("message",n=>{n.cmd===this.#e&&r.logger.verbose(`${at.pid} Received message from parent process:`,n)}):r.logger.warn("IPC channel is not available. process.on is undefined."),at.send||r.logger.warn("IPC channel is not available. process.send is undefined."),e.actions?.forEach(n=>{if(n.config.templates===void 0)return;let i={};Object.entries(n.config.templates).forEach(([o,s])=>{try{i[o]=r.templating.compile(s)}catch(a){r.logger.error(`Error compiling template ${o} for action ${n.identifier}`,a)}}),n.config.parsedTemplates=i})}#e;#t;set callbackFunction(e){this.connectorSDK.receiver.registerCallback(this.#r(e))}get connectorSDK(){return this.#t}#r(e){return async r=>{let n=await this.#t.receiver.getActionConfig(r);return n?e(r,n):this.#t.receiver.responses.badRequest("Action not found")(r)}}};var Yr=class{#e;#t;constructor(e,r){this.#e=e,this.#t=r}get callbackFunctionChain(){return this.#r(this.#e.receiver.emitEventType(this.#e.receiver.responses.created()))}#r(e){return async(r,n)=>{this.#e.logger.debug(`Apply templates on payload: ${JSON.stringify(r.payload)}, action: ${JSON.stringify(n)}`);let i=n.config.parsedTemplates;try{let o=i.filename({inputs:r.payload}).trim(),s=i.contents({inputs:r.payload}).trim();if(r.testRun)return this.#e.logger.debug(`Test run for ${r.eventId} with parsedContent ${s}, parsedFilename ${o}`),e(r);await this.#t.write(o,s)}catch(o){return this.#e.receiver.responses.internalServerError(o instanceof Error?o.message:"Unknown error occurred")(r)}return e(r)}}};import wm from"path";var ym=qi(Nu()),bm=qi(tc());import*as Jt from"path";var pe=qi(gm());import Ue from"node:process";var mm=(o=>(o.error="error",o.warn="warn",o.info="info",o.http="http",o.debug="debug",o))(mm||{}),Vr=class t{#e;constructor(e="default",r="info"){this.logger=pe.createLogger({level:r,format:pe.format.combine(pe.format.label({label:e}),pe.format.timestamp(),pe.format.json())});let n=!1;(Ue.env.NODE_ENV!=="production"||Ue.env.LOG_TO_CONSOLE==="true")&&(n=!0,this.logger.add(new pe.transports.Console({format:pe.format.printf(({label:i,level:o,message:s})=>`[${i}] ${o}: ${s}`)}))),Ue.env.LOG_TO_FILE==="true"&&(n=!0,this.logger.add(new pe.transports.File({filename:"error.log",level:"error"})),this.logger.add(new pe.transports.File({filename:"combined.log"}))),n||this.logger.add(new pe.transports.Console({format:pe.format.printf(({label:i,level:o,message:s})=>`[${i}] ${o}: ${s}`)}))}static getInstance(e,r){return t.instance||(t.instance=new t(e??"default",t.#r(r))),t.instance}setDatadogTransport(e){let r=e?.apiKey??Ue.env.DATADOG_API_KEY;if(!r)return this.debug("DATADOG_API_KEY is not set, cannot add Datadog transport"),this;let n=new URLSearchParams({"dd-api-key":r,ddsource:e?.source??Ue.env.DD_SOURCE??"nodejs",service:e?.service??Ue.env.DD_SERVICE??"unknown",env:e?.env??Ue.env.DD_ENV??"prod"});e?.tags&&n.append("ddtags",Object.entries(e.tags).map(([o,s])=>`${o}:${s}`).join(","));let i={host:`http-intake.logs.${Ue.env.DD_SITE??"datadoghq.eu"}`,path:`/api/v2/logs?${n.toString()}`,ssl:!0,batch:!0,format:pe.format.json(),level:"info"};return this.#e&&this.logger.remove(this.#e),this.#e=new pe.transports.Http(i),this.logger.add(this.#e),this}info(...e){this.#t(this.logger.info,...e)}debug(...e){this.#t(this.logger.debug,...e)}error(...e){this.#t(this.logger.error,...e)}warn(...e){this.#t(this.logger.warn,...e)}verbose(...e){this.#t(this.logger.verbose,...e)}#t(e,...r){try{let n=r.map(i=>typeof i=="object"?JSON.stringify(i):String(i));e(n.join(" "),...r)}catch(n){console.error("unknown error in log, function",n)}}static#r=e=>{if(e!==void 0)return e;let r=Ue.env.LOG_LEVEL||"info",i=!Object.values(mm).includes(r);return i&&(r="info"),i&&console.error(`Invalid log level: ${r} only allow; 'error', 'warn', 'info', 'debug', 'trace'. Using info as default.`),r}};import{Readable as w2}from"stream";var Hr=class t{#e;#t;constructor(e=void 0){this.#e=e,this.#t=Vr.getInstance(),this.#t.info(`FileHandler initialized with delimiter: ${e}`)}async handleBuffer(e,r,n,i){let o;switch(t.getExtension(e)){case".csv":o=await this.parseCSV(r,n,i);break;default:return this.handle(e,r.toString(),n,i)}return o}async handle(e,r,n,i){let o;switch(t.getExtension(e)){case".xml":o=await this.parseXML(r,n);break;case".json":o=JSON.parse(r);break;default:Vr.getInstance().error(`Unsupported file type: ${e}`)}return o}async parseXML(e,r){try{let n=await ym.default.parseStringPromise(e,{explicitArray:!1});return this.xmlOptions(n,r)}catch(n){throw new Error(`Error parsing XML content: ${n.message}`)}}async parseCSV(e,r,n){try{let i=w2.from(e),o=!0;return Object.keys(n??{}).includes("noHeader")&&(o=(n??{}).noHeader===!0),(0,bm.default)({delimiter:this.#e??",",noheader:o}).fromStream(i)}catch(i){throw this.#t.error(`Error parsing CSV: ${i.message}`),new Error(`Error parsing CSV content: ${i.message}`)}}xmlOptions(e,r){let n=i=>{if(typeof i=="object")for(let o of Object.keys(i)){let s=i[o];r.includes(o)?Array.isArray(s)||(i[o]=[s]):o!=="_text"&&(i[o]=n(s))}return i};return n(e)}csvOptions(e,r){let n;return Array.isArray(r)&&r.length>0?n={headers:r}:n=e.split(`
|
|
49
|
-
`)[0].trim().split(",").length>1?{headers:!0}:{noheader:!0},n}stringify(e){return JSON.stringify(e,null,2)}static getPath(e){return
|
|
35
|
+
${m}`),v.pop(),`{${c}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(h);default:return e?e(h):void 0}}function w(g,h,v,I,R){switch(typeof h){case"string":return Je(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(g),typeof h!="object")return w(g,h,v,I,R);if(h===null)return"null"}if(v.indexOf(h)!==-1)return r;let D=R;if(Array.isArray(h)){if(h.length===0)return"[]";if(s<v.length+1)return'"[Array]"';v.push(h),R+=I;let M=`
|
|
36
|
+
${R}`,T=`,
|
|
37
|
+
${R}`,P=Math.min(h.length,a),A=0;for(;A<P-1;A++){let B=w(String(A),h[A],v,I,R);M+=B!==void 0?B:"null",M+=T}let C=w(String(A),h[A],v,I,R);if(M+=C!==void 0?C:"null",h.length-1>a){let B=h.length-a-1;M+=`${T}"... ${ht(B)} not stringified"`}return M+=`
|
|
38
|
+
${D}`,v.pop(),`[${M}]`}let m=Object.keys(h),c=m.length;if(c===0)return"{}";if(s<v.length+1)return'"[Object]"';R+=I;let l=`,
|
|
39
|
+
${R}`,_="",N="",p=Math.min(c,a);Io(h)&&(_+=ih(h,l,a),m=m.slice(h.length),p-=h.length,N=l),i&&(m=Ro(m,o)),v.push(h);for(let M=0;M<p;M++){let T=m[M],P=w(T,h[T],v,I,R);P!==void 0&&(_+=`${N}${Je(T)}: ${P}`,N=l)}if(c>a){let M=c-a;_+=`${N}"...": "${ht(M)} not stringified"`,N=l}return N!==""&&(_=`
|
|
40
|
+
${R}${_}
|
|
41
|
+
${D}`),v.pop(),`{${_}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(h);default:return e?e(h):void 0}}function E(g,h,v){switch(typeof h){case"string":return Je(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(g),typeof h!="object")return E(g,h,v);if(h===null)return"null"}if(v.indexOf(h)!==-1)return r;let I="",R=h.length!==void 0;if(R&&Array.isArray(h)){if(h.length===0)return"[]";if(s<v.length+1)return'"[Array]"';v.push(h);let _=Math.min(h.length,a),N=0;for(;N<_-1;N++){let M=E(String(N),h[N],v);I+=M!==void 0?M:"null",I+=","}let p=E(String(N),h[N],v);if(I+=p!==void 0?p:"null",h.length-1>a){let M=h.length-a-1;I+=`,"... ${ht(M)} not stringified"`}return v.pop(),`[${I}]`}let D=Object.keys(h),m=D.length;if(m===0)return"{}";if(s<v.length+1)return'"[Object]"';let c="",l=Math.min(m,a);R&&Io(h)&&(I+=ih(h,",",a),D=D.slice(h.length),l-=h.length,c=","),i&&(D=Ro(D,o)),v.push(h);for(let _=0;_<l;_++){let N=D[_],p=E(N,h[N],v);p!==void 0&&(I+=`${c}${Je(N)}:${p}`,c=",")}if(m>a){let _=m-a;I+=`${c}"...":"${ht(_)} not stringified"`}return v.pop(),`{${I}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(h);default:return e?e(h):void 0}}function y(g,h,v){if(arguments.length>1){let I="";if(typeof v=="number"?I=" ".repeat(Math.min(v,10)):typeof v=="string"&&(I=v.slice(0,10)),h!=null){if(typeof h=="function")return u("",{"":g},[],h,I,"");if(Array.isArray(h))return d("",g,[],d_(h),I,"")}if(I.length!==0)return w("",g,[],I,"")}return E("",g,[])}return y}});var Co=S((RP,ah)=>{"use strict";var m_=be(),{MESSAGE:g_}=ie(),y_=wr();function b_(t,e){return typeof e=="bigint"?e.toString():e}ah.exports=m_((t,e)=>{let r=y_.configure(e);return t[g_]=r(t,e.replacer||b_,e.space),t})});var lh=S((IP,uh)=>{"use strict";var w_=be();uh.exports=w_((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t))});var ch=S((LP,fh)=>{"use strict";var __=be(),{MESSAGE:v_}=ie(),E_=wr();fh.exports=__(t=>{let e={};return t.message&&(e["@message"]=t.message,delete t.message),t.timestamp&&(e["@timestamp"]=t.timestamp,delete t.timestamp),e["@fields"]=t,t[v_]=E_(e),t})});var dh=S((AP,hh)=>{"use strict";var S_=be();function T_(t,e,r){let n=e.reduce((o,s)=>(o[s]=t[s],delete t[s],o),{}),i=Object.keys(t).reduce((o,s)=>(o[s]=t[s],delete t[s],o),{});return Object.assign(t,n,{[r]:i}),t}function O_(t,e,r){return t[r]=e.reduce((n,i)=>(n[i]=t[i],delete t[i],n),{}),t}hh.exports=S_((t,e={})=>{let r="metadata";e.key&&(r=e.key);let n=[];return!e.fillExcept&&!e.fillWith&&(n.push("level"),n.push("message")),e.fillExcept&&(n=e.fillExcept),n.length>0?T_(t,n,r):e.fillWith?O_(t,e.fillWith,r):t})});var mh=S((CP,ph)=>{"use strict";var Ct=1e3,qt=Ct*60,jt=qt*60,pt=jt*24,D_=pt*7,x_=pt*365.25;ph.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return P_(t);if(r==="number"&&isFinite(t))return e.long?N_(t):M_(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function P_(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*x_;case"weeks":case"week":case"w":return r*D_;case"days":case"day":case"d":return r*pt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*jt;case"minutes":case"minute":case"mins":case"min":case"m":return r*qt;case"seconds":case"second":case"secs":case"sec":case"s":return r*Ct;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function M_(t){var e=Math.abs(t);return e>=pt?Math.round(t/pt)+"d":e>=jt?Math.round(t/jt)+"h":e>=qt?Math.round(t/qt)+"m":e>=Ct?Math.round(t/Ct)+"s":t+"ms"}function N_(t){var e=Math.abs(t);return e>=pt?kn(t,e,pt,"day"):e>=jt?kn(t,e,jt,"hour"):e>=qt?kn(t,e,qt,"minute"):e>=Ct?kn(t,e,Ct,"second"):t+" ms"}function kn(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var yh=S((_r,gh)=>{"use strict";var R_=be(),I_=mh();gh.exports=R_(t=>{let e=+new Date;return _r.diff=e-(_r.prevTime||e),_r.prevTime=e,t.ms=`+${I_(_r.diff)}`,t})});var _h=S((qP,wh)=>{"use strict";var L_=$("util").inspect,A_=be(),{LEVEL:C_,MESSAGE:bh,SPLAT:q_}=ie();wh.exports=A_((t,e={})=>{let r=Object.assign({},t);return delete r[C_],delete r[bh],delete r[q_],t[bh]=L_(r,!1,e.depth||null,e.colorize),t})});var vh=S((jP,$n)=>{"use strict";var{MESSAGE:j_}=ie(),Bn=class{constructor(e){this.template=e}transform(e){return e[j_]=this.template(e),e}};$n.exports=t=>new Bn(t);$n.exports.Printf=$n.exports.Format=Bn});var Th=S((FP,Sh)=>{"use strict";var F_=be(),{MESSAGE:Eh}=ie(),k_=wr();Sh.exports=F_(t=>{let e=k_(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[Eh]=`${t.level}:${r} ${t.message} ${e}`:t[Eh]=`${t.level}:${r} ${t.message}`,t})});var xh=S((kP,Dh)=>{"use strict";var B_=$("util"),{SPLAT:Oh}=ie(),$_=/%[scdjifoO%]/g,U_=/%%/g,qo=class{constructor(e){this.options=e}_splat(e,r){let n=e.message,i=e[Oh]||e.splat||[],o=n.match(U_),s=o&&o.length||0,u=r.length-s-i.length,d=u<0?i.splice(u,-1*u):[],w=d.length;if(w)for(let E=0;E<w;E++)Object.assign(e,d[E]);return e.message=B_.format(n,...i),e}transform(e){let r=e.message,n=e[Oh]||e.splat;if(!n||!n.length)return e;let i=r&&r.match&&r.match($_);if(!i&&(n||n.length)){let o=n.length>1?n.splice(0):n,s=o.length;if(s)for(let a=0;a<s;a++)Object.assign(e,o[a]);return e}return i?this._splat(e,i):e}};Dh.exports=t=>new qo(t)});var Mh=S((Un,Ph)=>{"use strict";(function(t,e){typeof Un=="object"&&typeof Ph<"u"?e(Un):typeof define=="function"&&define.amd?define(["exports"],e):e(t.fecha={})})(Un,(function(t){"use strict";var e=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,r="\\d\\d?",n="\\d\\d",i="\\d{3}",o="\\d{4}",s="[^\\s]+",a=/\[([^]*?)\]/gm;function u(x,q){for(var F=[],Q=0,k=x.length;Q<k;Q++)F.push(x[Q].substr(0,q));return F}var d=function(x){return function(q,F){var Q=F[x].map(function(ye){return ye.toLowerCase()}),k=Q.indexOf(q.toLowerCase());return k>-1?k:null}};function w(x){for(var q=[],F=1;F<arguments.length;F++)q[F-1]=arguments[F];for(var Q=0,k=q;Q<k.length;Q++){var ye=k[Q];for(var qe in ye)x[qe]=ye[qe]}return x}var E=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],y=["January","February","March","April","May","June","July","August","September","October","November","December"],g=u(y,3),h=u(E,3),v={dayNamesShort:h,dayNames:E,monthNamesShort:g,monthNames:y,amPm:["am","pm"],DoFn:function(x){return x+["th","st","nd","rd"][x%10>3?0:(x-x%10!==10?1:0)*x%10]}},I=w({},v),R=function(x){return I=w(I,x)},D=function(x){return x.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},m=function(x,q){for(q===void 0&&(q=2),x=String(x);x.length<q;)x="0"+x;return x},c={D:function(x){return String(x.getDate())},DD:function(x){return m(x.getDate())},Do:function(x,q){return q.DoFn(x.getDate())},d:function(x){return String(x.getDay())},dd:function(x){return m(x.getDay())},ddd:function(x,q){return q.dayNamesShort[x.getDay()]},dddd:function(x,q){return q.dayNames[x.getDay()]},M:function(x){return String(x.getMonth()+1)},MM:function(x){return m(x.getMonth()+1)},MMM:function(x,q){return q.monthNamesShort[x.getMonth()]},MMMM:function(x,q){return q.monthNames[x.getMonth()]},YY:function(x){return m(String(x.getFullYear()),4).substr(2)},YYYY:function(x){return m(x.getFullYear(),4)},h:function(x){return String(x.getHours()%12||12)},hh:function(x){return m(x.getHours()%12||12)},H:function(x){return String(x.getHours())},HH:function(x){return m(x.getHours())},m:function(x){return String(x.getMinutes())},mm:function(x){return m(x.getMinutes())},s:function(x){return String(x.getSeconds())},ss:function(x){return m(x.getSeconds())},S:function(x){return String(Math.round(x.getMilliseconds()/100))},SS:function(x){return m(Math.round(x.getMilliseconds()/10),2)},SSS:function(x){return m(x.getMilliseconds(),3)},a:function(x,q){return x.getHours()<12?q.amPm[0]:q.amPm[1]},A:function(x,q){return x.getHours()<12?q.amPm[0].toUpperCase():q.amPm[1].toUpperCase()},ZZ:function(x){var q=x.getTimezoneOffset();return(q>0?"-":"+")+m(Math.floor(Math.abs(q)/60)*100+Math.abs(q)%60,4)},Z:function(x){var q=x.getTimezoneOffset();return(q>0?"-":"+")+m(Math.floor(Math.abs(q)/60),2)+":"+m(Math.abs(q)%60,2)}},l=function(x){return+x-1},_=[null,r],N=[null,s],p=["isPm",s,function(x,q){var F=x.toLowerCase();return F===q.amPm[0]?0:F===q.amPm[1]?1:null}],M=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(x){var q=(x+"").match(/([+-]|\d\d)/gi);if(q){var F=+q[1]*60+parseInt(q[2],10);return q[0]==="+"?F:-F}return 0}],T={D:["day",r],DD:["day",n],Do:["day",r+s,function(x){return parseInt(x,10)}],M:["month",r,l],MM:["month",n,l],YY:["year",n,function(x){var q=new Date,F=+(""+q.getFullYear()).substr(0,2);return+(""+(+x>68?F-1:F)+x)}],h:["hour",r,void 0,"isPm"],hh:["hour",n,void 0,"isPm"],H:["hour",r],HH:["hour",n],m:["minute",r],mm:["minute",n],s:["second",r],ss:["second",n],YYYY:["year",o],S:["millisecond","\\d",function(x){return+x*100}],SS:["millisecond",n,function(x){return+x*10}],SSS:["millisecond",i],d:_,dd:_,ddd:N,dddd:N,MMM:["month",s,d("monthNamesShort")],MMMM:["month",s,d("monthNames")],a:p,A:p,ZZ:M,Z:M},P={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},A=function(x){return w(P,x)},C=function(x,q,F){if(q===void 0&&(q=P.default),F===void 0&&(F={}),typeof x=="number"&&(x=new Date(x)),Object.prototype.toString.call(x)!=="[object Date]"||isNaN(x.getTime()))throw new Error("Invalid Date pass to format");q=P[q]||q;var Q=[];q=q.replace(a,function(ye,qe){return Q.push(qe),"@@@"});var k=w(w({},I),F);return q=q.replace(e,function(ye){return c[ye](x,k)}),q.replace(/@@@/g,function(){return Q.shift()})};function B(x,q,F){if(F===void 0&&(F={}),typeof q!="string")throw new Error("Invalid format in fecha parse");if(q=P[q]||q,x.length>1e3)return null;var Q=new Date,k={year:Q.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},ye=[],qe=[],We=q.replace(a,function(J,pe){return qe.push(D(pe)),"@@@"}),Xe={},Qr={};We=D(We).replace(e,function(J){var pe=T[J],er=pe[0],Zr=pe[1],Dt=pe[3];if(Xe[er])throw new Error("Invalid format. "+er+" specified twice in format");return Xe[er]=!0,Dt&&(Qr[Dt]=!0),ye.push(pe),"("+Zr+")"}),Object.keys(Qr).forEach(function(J){if(!Xe[J])throw new Error("Invalid format. "+J+" is required in specified format")}),We=We.replace(/@@@/g,function(){return qe.shift()});var b=x.match(new RegExp(We,"i"));if(!b)return null;for(var f=w(w({},I),F),L=1;L<b.length;L++){var O=ye[L-1],K=O[0],z=O[2],Z=z?z(b[L],f):+b[L];if(Z==null)return null;k[K]=Z}k.isPm===1&&k.hour!=null&&+k.hour!=12?k.hour=+k.hour+12:k.isPm===0&&+k.hour==12&&(k.hour=0);var oe;if(k.timezoneOffset==null){oe=new Date(k.year,k.month,k.day,k.hour,k.minute,k.second,k.millisecond);for(var se=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],L=0,Ge=se.length;L<Ge;L++)if(Xe[se[L][0]]&&k[se[L][0]]!==oe[se[L][1]]())return null}else if(oe=new Date(Date.UTC(k.year,k.month,k.day,k.hour,k.minute-k.timezoneOffset,k.second,k.millisecond)),k.month>11||k.month<0||k.day>31||k.day<1||k.hour>23||k.hour<0||k.minute>59||k.minute<0||k.second>59||k.second<0)return null;return oe}var U={format:C,parse:B,defaultI18n:v,setGlobalDateI18n:R,setGlobalDateMasks:A};t.assign=w,t.default=U,t.format=C,t.parse=B,t.defaultI18n=v,t.setGlobalDateI18n=R,t.setGlobalDateMasks=A,Object.defineProperty(t,"__esModule",{value:!0})}))});var Rh=S((BP,Nh)=>{"use strict";var V_=Mh(),H_=be();Nh.exports=H_((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():V_.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t))});var Lh=S(($P,Ih)=>{"use strict";var jo=wo(),W_=be(),{MESSAGE:Fo}=ie();Ih.exports=W_((t,e)=>(e.level!==!1&&(t.level=jo.strip(t.level)),e.message!==!1&&(t.message=jo.strip(String(t.message))),e.raw!==!1&&t[Fo]&&(t[Fo]=jo.strip(String(t[Fo]))),t))});var Bo=S(ko=>{"use strict";var X_=ko.format=be();ko.levels=Kc();function de(t,e){Object.defineProperty(X_,t,{get(){return e()},configurable:!0})}de("align",function(){return zc()});de("errors",function(){return Zc()});de("cli",function(){return th()});de("combine",function(){return nh()});de("colorize",function(){return Cn()});de("json",function(){return Co()});de("label",function(){return lh()});de("logstash",function(){return ch()});de("metadata",function(){return dh()});de("ms",function(){return yh()});de("padLevels",function(){return Po()});de("prettyPrint",function(){return _h()});de("printf",function(){return vh()});de("simple",function(){return Th()});de("splat",function(){return xh()});de("timestamp",function(){return Rh()});de("uncolorize",function(){return Lh()})});var $o=S(Vn=>{"use strict";var{format:Ah}=$("util");Vn.warn={deprecated(t){return()=>{throw new Error(Ah("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return()=>{throw new Error([Ah("{ %s } was removed in winston@3.0.0.",t),"Use a custom winston.format = winston.format(function) instead."].join(`
|
|
42
|
+
`))}},forFunctions(t,e,r){r.forEach(n=>{t[n]=Vn.warn[e](n)})},forProperties(t,e,r){r.forEach(n=>{let i=Vn.warn[e](n);Object.defineProperty(t,n,{get:i,set:i})})}}});var Ch=S((HP,G_)=>{G_.exports={name:"winston",description:"A logger for just about everything.",version:"3.18.3",author:"Charlie Robbins <charlie.robbins@gmail.com>",maintainers:["David Hyde <dabh@alumni.stanford.edu>"],repository:{type:"git",url:"https://github.com/winstonjs/winston.git"},keywords:["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies:{"@dabh/diagnostics":"^2.0.8","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.7.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.9.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^4.4.0","@types/node":"^20.11.24","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.57.0",hock:"^1.4.1",mocha:"^10.3.0",nyc:"^17.1.0",rimraf:"5.0.1",split2:"^4.1.0","std-mocks":"^2.0.0",through2:"^4.0.2","winston-compat":"^0.1.5"},main:"./lib/winston.js",browser:"./dist/winston",types:"./index.d.ts",scripts:{lint:"eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist",test:"rimraf test/fixtures/logs/* && mocha","test:coverage":"nyc npm run test:unit","test:unit":"mocha test/unit","test:integration":"mocha test/integration",build:"rimraf dist && babel lib -d dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"}});var Uo=S((WP,qh)=>{"use strict";qh.exports=$("util").deprecate});var Vo=S((XP,jh)=>{"use strict";jh.exports=$("stream")});var Wo=S((GP,kh)=>{"use strict";function K_(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Ho,this,t)):process.nextTick(Ho,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(o){!e&&o?r._writableState?r._writableState.errorEmitted?process.nextTick(Hn,r):(r._writableState.errorEmitted=!0,process.nextTick(Fh,r,o)):process.nextTick(Fh,r,o):e?(process.nextTick(Hn,r),e(o)):process.nextTick(Hn,r)}),this)}function Fh(t,e){Ho(t,e),Hn(t)}function Hn(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Y_(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Ho(t,e){t.emit("error",e)}function z_(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}kh.exports={destroy:K_,undestroy:Y_,errorOrDestroy:z_}});var Ft=S((KP,Uh)=>{"use strict";var $h={};function ve(t,e,r){r||(r=Error);function n(o,s,a){return typeof e=="string"?e:e(o,s,a)}class i extends r{constructor(s,a,u){super(n(s,a,u))}}i.prototype.name=r.name,i.prototype.code=t,$h[t]=i}function Bh(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(n=>String(n)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function J_(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Q_(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Z_(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}ve("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);ve("ERR_INVALID_ARG_TYPE",function(t,e,r){let n;typeof e=="string"&&J_(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";let i;if(Q_(t," argument"))i=`The ${t} ${n} ${Bh(e,"type")}`;else{let o=Z_(t,".")?"property":"argument";i=`The "${t}" ${o} ${n} ${Bh(e,"type")}`}return i+=`. Received type ${typeof r}`,i},TypeError);ve("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");ve("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});ve("ERR_STREAM_PREMATURE_CLOSE","Premature close");ve("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});ve("ERR_MULTIPLE_CALLBACK","Callback called multiple times");ve("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");ve("ERR_STREAM_WRITE_AFTER_END","write after end");ve("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);ve("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);ve("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Uh.exports.codes=$h});var Xo=S((YP,Vh)=>{"use strict";var ev=Ft().codes.ERR_INVALID_OPT_VALUE;function tv(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function rv(t,e,r,n){var i=tv(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var o=n?r:"highWaterMark";throw new ev(o,i)}return Math.floor(i)}return t.objectMode?16:16*1024}Vh.exports={getHighWaterMark:rv}});var Hh=S((zP,Go)=>{"use strict";typeof Object.create=="function"?Go.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Go.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var Be=S((JP,Yo)=>{"use strict";try{if(Ko=$("util"),typeof Ko.inherits!="function")throw"";Yo.exports=Ko.inherits}catch{Yo.exports=Hh()}var Ko});var zh=S((QP,Yh)=>{"use strict";function Wh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Xh(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Wh(Object(r),!0).forEach(function(n){nv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Wh(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function nv(t,e,r){return e=Kh(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function iv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Kh(n.key),n)}}function ov(t,e,r){return e&&Gh(t.prototype,e),r&&Gh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Kh(t){var e=sv(t,"string");return typeof e=="symbol"?e:String(e)}function sv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var av=$("buffer"),Wn=av.Buffer,uv=$("util"),zo=uv.inspect,lv=zo&&zo.custom||"inspect";function fv(t,e,r){Wn.prototype.copy.call(t,e,r)}Yh.exports=(function(){function t(){iv(this,t),this.head=null,this.tail=null,this.length=0}return ov(t,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return Wn.alloc(0);for(var n=Wn.allocUnsafe(r>>>0),i=this.head,o=0;i;)fv(i.data,n,o),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,o=n.data;for(r-=o.length;n=n.next;){var s=n.data,a=r>s.length?s.length:r;if(a===s.length?o+=s:o+=s.slice(0,r),r-=a,r===0){a===s.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=s.slice(a));break}++i}return this.length-=i,o}},{key:"_getBuffer",value:function(r){var n=Wn.allocUnsafe(r),i=this.head,o=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var s=i.data,a=r>s.length?s.length:r;if(s.copy(n,n.length-r,0,a),r-=a,r===0){a===s.length?(++o,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=s.slice(a));break}++o}return this.length-=o,n}},{key:lv,value:function(r,n){return zo(this,Xh(Xh({},n),{},{depth:0,customInspect:!1}))}}]),t})()});var Zh=S((Jo,Qh)=>{"use strict";var Xn=$("buffer"),Me=Xn.Buffer;function Jh(t,e){for(var r in t)e[r]=t[r]}Me.from&&Me.alloc&&Me.allocUnsafe&&Me.allocUnsafeSlow?Qh.exports=Xn:(Jh(Xn,Jo),Jo.Buffer=mt);function mt(t,e,r){return Me(t,e,r)}mt.prototype=Object.create(Me.prototype);Jh(Me,mt);mt.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Me(t,e,r)};mt.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=Me(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};mt.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Me(t)};mt.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Xn.SlowBuffer(t)}});var Er=S(td=>{"use strict";var Zo=Zh().Buffer,ed=Zo.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function cv(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function hv(t){var e=cv(t);if(typeof e!="string"&&(Zo.isEncoding===ed||!ed(t)))throw new Error("Unknown encoding: "+t);return e||t}td.StringDecoder=vr;function vr(t){this.encoding=hv(t);var e;switch(this.encoding){case"utf16le":this.text=bv,this.end=wv,e=4;break;case"utf8":this.fillLast=mv,e=4;break;case"base64":this.text=_v,this.end=vv,e=3;break;default:this.write=Ev,this.end=Sv;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Zo.allocUnsafe(e)}vr.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};vr.prototype.end=yv;vr.prototype.text=gv;vr.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function Qo(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function dv(t,e,r){var n=e.length-1;if(n<r)return 0;var i=Qo(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=Qo(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=Qo(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function pv(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function mv(t){var e=this.lastTotal-this.lastNeed,r=pv(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function gv(t,e){var r=dv(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function yv(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function bv(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function wv(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function _v(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function vv(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Ev(t){return t.toString(this.encoding)}function Sv(t){return t&&t.length?this.write(t):""}});var od=S((eM,id)=>{"use strict";var rd=Ft().codes.ERR_STREAM_PREMATURE_CLOSE;function Tv(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}function Ov(){}function Dv(t){return t.setHeader&&typeof t.abort=="function"}function nd(t,e,r){if(typeof e=="function")return nd(t,null,e);e||(e={}),r=Tv(r||Ov);var n=e.readable||e.readable!==!1&&t.readable,i=e.writable||e.writable!==!1&&t.writable,o=function(){t.writable||a()},s=t._writableState&&t._writableState.finished,a=function(){i=!1,s=!0,n||r.call(t)},u=t._readableState&&t._readableState.endEmitted,d=function(){n=!1,u=!0,i||r.call(t)},w=function(h){r.call(t,h)},E=function(){var h;if(n&&!u)return(!t._readableState||!t._readableState.ended)&&(h=new rd),r.call(t,h);if(i&&!s)return(!t._writableState||!t._writableState.ended)&&(h=new rd),r.call(t,h)},y=function(){t.req.on("finish",a)};return Dv(t)?(t.on("complete",a),t.on("abort",E),t.req?y():t.on("request",y)):i&&!t._writableState&&(t.on("end",o),t.on("close",o)),t.on("end",d),t.on("finish",a),e.error!==!1&&t.on("error",w),t.on("close",E),function(){t.removeListener("complete",a),t.removeListener("abort",E),t.removeListener("request",y),t.req&&t.req.removeListener("finish",a),t.removeListener("end",o),t.removeListener("close",o),t.removeListener("finish",a),t.removeListener("end",d),t.removeListener("error",w),t.removeListener("close",E)}}id.exports=nd});var ad=S((tM,sd)=>{"use strict";var Gn;function Qe(t,e,r){return e=xv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xv(t){var e=Pv(t,"string");return typeof e=="symbol"?e:String(e)}function Pv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Mv=od(),Ze=Symbol("lastResolve"),gt=Symbol("lastReject"),Sr=Symbol("error"),Kn=Symbol("ended"),yt=Symbol("lastPromise"),es=Symbol("handlePromise"),bt=Symbol("stream");function et(t,e){return{value:t,done:e}}function Nv(t){var e=t[Ze];if(e!==null){var r=t[bt].read();r!==null&&(t[yt]=null,t[Ze]=null,t[gt]=null,e(et(r,!1)))}}function Rv(t){process.nextTick(Nv,t)}function Iv(t,e){return function(r,n){t.then(function(){if(e[Kn]){r(et(void 0,!0));return}e[es](r,n)},n)}}var Lv=Object.getPrototypeOf(function(){}),Av=Object.setPrototypeOf((Gn={get stream(){return this[bt]},next:function(){var e=this,r=this[Sr];if(r!==null)return Promise.reject(r);if(this[Kn])return Promise.resolve(et(void 0,!0));if(this[bt].destroyed)return new Promise(function(s,a){process.nextTick(function(){e[Sr]?a(e[Sr]):s(et(void 0,!0))})});var n=this[yt],i;if(n)i=new Promise(Iv(n,this));else{var o=this[bt].read();if(o!==null)return Promise.resolve(et(o,!1));i=new Promise(this[es])}return this[yt]=i,i}},Qe(Gn,Symbol.asyncIterator,function(){return this}),Qe(Gn,"return",function(){var e=this;return new Promise(function(r,n){e[bt].destroy(null,function(i){if(i){n(i);return}r(et(void 0,!0))})})}),Gn),Lv),Cv=function(e){var r,n=Object.create(Av,(r={},Qe(r,bt,{value:e,writable:!0}),Qe(r,Ze,{value:null,writable:!0}),Qe(r,gt,{value:null,writable:!0}),Qe(r,Sr,{value:null,writable:!0}),Qe(r,Kn,{value:e._readableState.endEmitted,writable:!0}),Qe(r,es,{value:function(o,s){var a=n[bt].read();a?(n[yt]=null,n[Ze]=null,n[gt]=null,o(et(a,!1))):(n[Ze]=o,n[gt]=s)},writable:!0}),r));return n[yt]=null,Mv(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=n[gt];o!==null&&(n[yt]=null,n[Ze]=null,n[gt]=null,o(i)),n[Sr]=i;return}var s=n[Ze];s!==null&&(n[yt]=null,n[Ze]=null,n[gt]=null,s(et(void 0,!0))),n[Kn]=!0}),e.on("readable",Rv.bind(null,n)),n};sd.exports=Cv});var cd=S((rM,fd)=>{"use strict";function ud(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(d){r(d);return}a.done?e(u):Promise.resolve(u).then(n,i)}function qv(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function s(u){ud(o,n,i,s,a,"next",u)}function a(u){ud(o,n,i,s,a,"throw",u)}s(void 0)})}}function ld(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function jv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ld(Object(r),!0).forEach(function(n){Fv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ld(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Fv(t,e,r){return e=kv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kv(t){var e=Bv(t,"string");return typeof e=="symbol"?e:String(e)}function Bv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var $v=Ft().codes.ERR_INVALID_ARG_TYPE;function Uv(t,e,r){var n;if(e&&typeof e.next=="function")n=e;else if(e&&e[Symbol.asyncIterator])n=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])n=e[Symbol.iterator]();else throw new $v("iterable",["Iterable"],e);var i=new t(jv({objectMode:!0},r)),o=!1;i._read=function(){o||(o=!0,s())};function s(){return a.apply(this,arguments)}function a(){return a=qv(function*(){try{var u=yield n.next(),d=u.value,w=u.done;w?i.push(null):i.push(yield d)?s():o=!1}catch(E){i.destroy(E)}}),a.apply(this,arguments)}return i}fd.exports=Uv});var Ed=S((iM,vd)=>{"use strict";vd.exports=X;var kt;X.ReadableState=md;var nM=$("events").EventEmitter,pd=function(e,r){return e.listeners(r).length},Or=Vo(),Yn=$("buffer").Buffer,Vv=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Hv(t){return Yn.from(t)}function Wv(t){return Yn.isBuffer(t)||t instanceof Vv}var ts=$("util"),V;ts&&ts.debuglog?V=ts.debuglog("stream"):V=function(){};var Xv=zh(),us=Wo(),Gv=Xo(),Kv=Gv.getHighWaterMark,zn=Ft().codes,Yv=zn.ERR_INVALID_ARG_TYPE,zv=zn.ERR_STREAM_PUSH_AFTER_EOF,Jv=zn.ERR_METHOD_NOT_IMPLEMENTED,Qv=zn.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Bt,rs,ns;Be()(X,Or);var Tr=us.errorOrDestroy,is=["error","close","destroy","pause","resume"];function Zv(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function md(t,e,r){kt=kt||Dr(),t=t||{},typeof r!="boolean"&&(r=e instanceof kt),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=Kv(this,t,"readableHighWaterMark",r),this.buffer=new Xv,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Bt||(Bt=Er().StringDecoder),this.decoder=new Bt(t.encoding),this.encoding=t.encoding)}function X(t){if(kt=kt||Dr(),!(this instanceof X))return new X(t);var e=this instanceof kt;this._readableState=new md(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Or.call(this)}Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});X.prototype.destroy=us.destroy;X.prototype._undestroy=us.undestroy;X.prototype._destroy=function(t,e){e(t)};X.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Yn.from(t,e),e=""),n=!0),gd(this,t,e,!1,n)};X.prototype.unshift=function(t){return gd(this,t,null,!0,!1)};function gd(t,e,r,n,i){V("readableAddChunk",e);var o=t._readableState;if(e===null)o.reading=!1,rE(t,o);else{var s;if(i||(s=eE(o,e)),s)Tr(t,s);else if(o.objectMode||e&&e.length>0)if(typeof e!="string"&&!o.objectMode&&Object.getPrototypeOf(e)!==Yn.prototype&&(e=Hv(e)),n)o.endEmitted?Tr(t,new Qv):os(t,o,e,!0);else if(o.ended)Tr(t,new zv);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||e.length!==0?os(t,o,e,!1):as(t,o)):os(t,o,e,!1)}else n||(o.reading=!1,as(t,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function os(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Jn(t)),as(t,e)}function eE(t,e){var r;return!Wv(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new Yv("chunk",["string","Buffer","Uint8Array"],e)),r}X.prototype.isPaused=function(){return this._readableState.flowing===!1};X.prototype.setEncoding=function(t){Bt||(Bt=Er().StringDecoder);var e=new Bt(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var hd=1073741824;function tE(t){return t>=hd?t=hd:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function dd(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=tE(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}X.prototype.read=function(t){V("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return V("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?ss(this):Jn(this),null;if(t=dd(t,e),t===0&&e.ended)return e.length===0&&ss(this),null;var n=e.needReadable;V("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,V("length less than watermark",n)),e.ended||e.reading?(n=!1,V("reading or ended",n)):n&&(V("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=dd(r,e)));var i;return t>0?i=wd(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&ss(this)),i!==null&&this.emit("data",i),i};function rE(t,e){if(V("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Jn(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,yd(t)))}}function Jn(t){var e=t._readableState;V("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(V("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(yd,t))}function yd(t){var e=t._readableState;V("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,ls(t)}function as(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(nE,t,e))}function nE(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(V("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}X.prototype._read=function(t){Tr(this,new Jv("_read()"))};X.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,V("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,o=i?a:v;n.endEmitted?process.nextTick(o):r.once("end",o),t.on("unpipe",s);function s(I,R){V("onunpipe"),I===r&&R&&R.hasUnpiped===!1&&(R.hasUnpiped=!0,w())}function a(){V("onend"),t.end()}var u=iE(r);t.on("drain",u);var d=!1;function w(){V("cleanup"),t.removeListener("close",g),t.removeListener("finish",h),t.removeListener("drain",u),t.removeListener("error",y),t.removeListener("unpipe",s),r.removeListener("end",a),r.removeListener("end",v),r.removeListener("data",E),d=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}r.on("data",E);function E(I){V("ondata");var R=t.write(I);V("dest.write",R),R===!1&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&_d(n.pipes,t)!==-1)&&!d&&(V("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function y(I){V("onerror",I),v(),t.removeListener("error",y),pd(t,"error")===0&&Tr(t,I)}Zv(t,"error",y);function g(){t.removeListener("finish",h),v()}t.once("close",g);function h(){V("onfinish"),t.removeListener("close",g),v()}t.once("finish",h);function v(){V("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(V("pipe resume"),r.resume()),t};function iE(t){return function(){var r=t._readableState;V("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&pd(t,"data")&&(r.flowing=!0,ls(t))}}X.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=_d(e.pipes,t);return s===-1?this:(e.pipes.splice(s,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};X.prototype.on=function(t,e){var r=Or.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,V("on readable",n.length,n.reading),n.length?Jn(this):n.reading||process.nextTick(oE,this)),r};X.prototype.addListener=X.prototype.on;X.prototype.removeListener=function(t,e){var r=Or.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(bd,this),r};X.prototype.removeAllListeners=function(t){var e=Or.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(bd,this),e};function bd(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function oE(t){V("readable nexttick read 0"),t.read(0)}X.prototype.resume=function(){var t=this._readableState;return t.flowing||(V("resume"),t.flowing=!t.readableListening,sE(this,t)),t.paused=!1,this};function sE(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(aE,t,e))}function aE(t,e){V("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),ls(t),e.flowing&&!e.reading&&t.read(0)}X.prototype.pause=function(){return V("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(V("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function ls(t){var e=t._readableState;for(V("flow",e.flowing);e.flowing&&t.read()!==null;);}X.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(V("wrapped end"),r.decoder&&!r.ended){var s=r.decoder.end();s&&s.length&&e.push(s)}e.push(null)}),t.on("data",function(s){if(V("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!(r.objectMode&&s==null)&&!(!r.objectMode&&(!s||!s.length))){var a=e.push(s);a||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=(function(a){return function(){return t[a].apply(t,arguments)}})(i));for(var o=0;o<is.length;o++)t.on(is[o],this.emit.bind(this,is[o]));return this._read=function(s){V("wrapped _read",s),n&&(n=!1,t.resume())},this};typeof Symbol=="function"&&(X.prototype[Symbol.asyncIterator]=function(){return rs===void 0&&(rs=ad()),rs(this)});Object.defineProperty(X.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(X.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(X.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});X._fromList=wd;Object.defineProperty(X.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function wd(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function ss(t){var e=t._readableState;V("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(uE,e,t))}function uE(t,e){if(V("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(X.from=function(t,e){return ns===void 0&&(ns=cd()),ns(X,t,e)});function _d(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var Dr=S((oM,Td)=>{"use strict";var lE=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Td.exports=Ne;var Sd=Ed(),cs=hs();Be()(Ne,Sd);for(fs=lE(cs.prototype),Qn=0;Qn<fs.length;Qn++)Zn=fs[Qn],Ne.prototype[Zn]||(Ne.prototype[Zn]=cs.prototype[Zn]);var fs,Zn,Qn;function Ne(t){if(!(this instanceof Ne))return new Ne(t);Sd.call(this,t),cs.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",fE)))}Object.defineProperty(Ne.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ne.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ne.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function fE(){this._writableState.ended||process.nextTick(cE,this)}function cE(t){t.end()}Object.defineProperty(Ne.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var hs=S((sM,Nd)=>{"use strict";Nd.exports=ee;function Dd(t){var e=this;this.next=null,this.entry=null,this.finish=function(){FE(e,t)}}var $t;ee.WritableState=Pr;var hE={deprecate:Uo()},xd=Vo(),ti=$("buffer").Buffer,dE=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function pE(t){return ti.from(t)}function mE(t){return ti.isBuffer(t)||t instanceof dE}var ps=Wo(),gE=Xo(),yE=gE.getHighWaterMark,tt=Ft().codes,bE=tt.ERR_INVALID_ARG_TYPE,wE=tt.ERR_METHOD_NOT_IMPLEMENTED,_E=tt.ERR_MULTIPLE_CALLBACK,vE=tt.ERR_STREAM_CANNOT_PIPE,EE=tt.ERR_STREAM_DESTROYED,SE=tt.ERR_STREAM_NULL_VALUES,TE=tt.ERR_STREAM_WRITE_AFTER_END,OE=tt.ERR_UNKNOWN_ENCODING,Ut=ps.errorOrDestroy;Be()(ee,xd);function DE(){}function Pr(t,e,r){$t=$t||Dr(),t=t||{},typeof r!="boolean"&&(r=e instanceof $t),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=yE(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){LE(e,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Dd(this)}Pr.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Pr.prototype,"buffer",{get:hE.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var ei;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ei=Function.prototype[Symbol.hasInstance],Object.defineProperty(ee,Symbol.hasInstance,{value:function(e){return ei.call(this,e)?!0:this!==ee?!1:e&&e._writableState instanceof Pr}})):ei=function(e){return e instanceof this};function ee(t){$t=$t||Dr();var e=this instanceof $t;if(!e&&!ei.call(ee,this))return new ee(t);this._writableState=new Pr(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),xd.call(this)}ee.prototype.pipe=function(){Ut(this,new vE)};function xE(t,e){var r=new TE;Ut(t,r),process.nextTick(e,r)}function PE(t,e,r,n){var i;return r===null?i=new SE:typeof r!="string"&&!e.objectMode&&(i=new bE("chunk",["string","Buffer"],r)),i?(Ut(t,i),process.nextTick(n,i),!1):!0}ee.prototype.write=function(t,e,r){var n=this._writableState,i=!1,o=!n.objectMode&&mE(t);return o&&!ti.isBuffer(t)&&(t=pE(t)),typeof e=="function"&&(r=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=DE),n.ending?xE(this,r):(o||PE(this,n,t,r))&&(n.pendingcb++,i=NE(this,n,o,t,e,r)),i};ee.prototype.cork=function(){this._writableState.corked++};ee.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Pd(this,t))};ee.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new OE(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(ee.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function ME(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=ti.from(e,r)),e}Object.defineProperty(ee.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function NE(t,e,r,n,i,o){if(!r){var s=ME(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var d=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},d?d.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else ds(t,e,!1,a,n,i,o);return u}function ds(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new EE("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function RE(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(xr,t,e),t._writableState.errorEmitted=!0,Ut(t,n)):(i(n),t._writableState.errorEmitted=!0,Ut(t,n),xr(t,e))}function IE(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function LE(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new _E;if(IE(r),e)RE(t,r,n,e,i);else{var o=Md(r)||t.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Pd(t,r),n?process.nextTick(Od,t,r,o,i):Od(t,r,o,i)}}function Od(t,e,r,n){r||AE(t,e),e.pendingcb--,n(),xr(t,e)}function AE(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Pd(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var s=0,a=!0;r;)i[s]=r,r.isBuf||(a=!1),r=r.next,s+=1;i.allBuffers=a,ds(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new Dd(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,d=r.encoding,w=r.callback,E=e.objectMode?1:u.length;if(ds(t,e,!1,E,u,d,w),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}ee.prototype._write=function(t,e,r){r(new wE("_write()"))};ee.prototype._writev=null;ee.prototype.end=function(t,e,r){var n=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||jE(this,n,r),this};Object.defineProperty(ee.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Md(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function CE(t,e){t._final(function(r){e.pendingcb--,r&&Ut(t,r),e.prefinished=!0,t.emit("prefinish"),xr(t,e)})}function qE(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(CE,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function xr(t,e){var r=Md(e);if(r&&(qE(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}function jE(t,e,r){e.ending=!0,xr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function FE(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty(ee.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});ee.prototype.destroy=ps.destroy;ee.prototype._undestroy=ps.undestroy;ee.prototype._destroy=function(t,e){e(t)}});var ms=S((aM,Ld)=>{"use strict";var kE=$("util"),Rd=hs(),{LEVEL:Id}=ie(),Mr=Ld.exports=function(e={}){Rd.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this.format=e.format,this.level=e.level,this.handleExceptions=e.handleExceptions,this.handleRejections=e.handleRejections,this.silent=e.silent,e.log&&(this.log=e.log),e.logv&&(this.logv=e.logv),e.close&&(this.close=e.close),this.once("pipe",r=>{this.levels=r.levels,this.parent=r}),this.once("unpipe",r=>{r===this.parent&&(this.parent=null,this.close&&this.close())})};kE.inherits(Mr,Rd);Mr.prototype._write=function(e,r,n){if(this.silent||e.exception===!0&&!this.handleExceptions)return n(null);let i=this.level||this.parent&&this.parent.level;if(!i||this.levels[i]>=this.levels[e[Id]]){if(e&&!this.format)return this.log(e,n);let o,s;try{s=this.format.transform(Object.assign({},e),this.format.options)}catch(a){o=a}if(o||!s){if(n(),o)throw o;return}return this.log(s,n)}return this._writableState.sync=!1,n(null)};Mr.prototype._writev=function(e,r){if(this.logv){let n=e.filter(this._accept,this);return n.length?this.logv(n,r):r(null)}for(let n=0;n<e.length;n++){if(!this._accept(e[n]))continue;if(e[n].chunk&&!this.format){this.log(e[n].chunk,e[n].callback);continue}let i,o;try{o=this.format.transform(Object.assign({},e[n].chunk),this.format.options)}catch(s){i=s}if(i||!o){if(e[n].callback(),i)throw r(null),i}else this.log(o,e[n].callback)}return r(null)};Mr.prototype._accept=function(e){let r=e.chunk;if(this.silent)return!1;let n=this.level||this.parent&&this.parent.level;return!!((r.exception===!0||!n||this.levels[n]>=this.levels[r[Id]])&&(this.handleExceptions||r.exception!==!0))};Mr.prototype._nop=function(){}});var ys=S((uM,Cd)=>{"use strict";var BE=$("util"),{LEVEL:gs}=ie(),Ad=ms(),Nr=Cd.exports=function(e={}){if(Ad.call(this,e),!e.transport||typeof e.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated();function r(n){this.emit("error",n,this.transport)}this.transport.__winstonError||(this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError))};BE.inherits(Nr,Ad);Nr.prototype._write=function(e,r,n){if(this.silent||e.exception===!0&&!this.handleExceptions)return n(null);(!this.level||this.levels[this.level]>=this.levels[e[gs]])&&this.transport.log(e[gs],e.message,e,this._nop),n(null)};Nr.prototype._writev=function(e,r){for(let n=0;n<e.length;n++)this._accept(e[n])&&(this.transport.log(e[n].chunk[gs],e[n].chunk.message,e[n].chunk,this._nop),e[n].callback());return r(null)};Nr.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
|
|
43
|
+
`))};Nr.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var Vt=S((lM,bs)=>{"use strict";bs.exports=ms();bs.exports.LegacyTransportStream=ys()});var Fd=S((cM,jd)=>{"use strict";var $E=$("os"),{LEVEL:qd,MESSAGE:Ht}=ie(),UE=Vt();jd.exports=class extends UE{constructor(e={}){super(e),this.name=e.name||"console",this.stderrLevels=this._stringArrayToSet(e.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(e.consoleWarnLevels),this.eol=typeof e.eol=="string"?e.eol:$E.EOL,this.forceConsole=e.forceConsole||!1,this._consoleLog=console.log.bind(console),this._consoleWarn=console.warn.bind(console),this._consoleError=console.error.bind(console),this.setMaxListeners(30)}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.stderrLevels[e[qd]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[Ht]}${this.eol}`):this._consoleError(e[Ht]),r&&r();return}else if(this.consoleWarnLevels[e[qd]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[Ht]}${this.eol}`):this._consoleWarn(e[Ht]),r&&r();return}console._stdout&&!this.forceConsole?console._stdout.write(`${e[Ht]}${this.eol}`):this._consoleLog(e[Ht]),r&&r()}_stringArrayToSet(e,r){if(!e)return{};if(r=r||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(r);return e.reduce((n,i)=>{if(typeof i!="string")throw new Error(r);return n[i]=!0,n},{})}}});var ni=S((ri,kd)=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.default=VE;function VE(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}kd.exports=ri.default});var $d=S((ii,Bd)=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};Bd.exports=ii.default});var Hd=S(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.fallback=Ud;rt.wrap=Vd;var HE=rt.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,WE=rt.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,XE=rt.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function Ud(t){setTimeout(t,0)}function Vd(t){return(e,...r)=>t(()=>e(...r))}var Rr;HE?Rr=queueMicrotask:WE?Rr=setImmediate:XE?Rr=process.nextTick:Rr=Ud;rt.default=Vd(Rr)});var Yd=S((oi,Kd)=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.default=QE;var GE=$d(),KE=Gd(GE),YE=Hd(),zE=Gd(YE),JE=wt();function Gd(t){return t&&t.__esModule?t:{default:t}}function QE(t){return(0,JE.isAsync)(t)?function(...e){let r=e.pop(),n=t.apply(this,e);return Wd(n,r)}:(0,KE.default)(function(e,r){var n;try{n=t.apply(this,e)}catch(i){return r(i)}if(n&&typeof n.then=="function")return Wd(n,r);r(null,n)})}function Wd(t,e){return t.then(r=>{Xd(e,null,r)},r=>{Xd(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function Xd(t,e,r){try{t(e,r)}catch(n){(0,zE.default)(i=>{throw i},n)}}Kd.exports=oi.default});var wt=S($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.isAsyncIterable=$e.isAsyncGenerator=$e.isAsync=void 0;var ZE=Yd(),e1=t1(ZE);function t1(t){return t&&t.__esModule?t:{default:t}}function zd(t){return t[Symbol.toStringTag]==="AsyncFunction"}function r1(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function n1(t){return typeof t[Symbol.asyncIterator]=="function"}function i1(t){if(typeof t!="function")throw new Error("expected a function");return zd(t)?(0,e1.default)(t):t}$e.default=i1;$e.isAsync=zd;$e.isAsyncGenerator=r1;$e.isAsyncIterable=n1});var Wt=S((si,Jd)=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.default=o1;function o1(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function r(...n){return typeof n[e-1]=="function"?t.apply(this,n):new Promise((i,o)=>{n[e-1]=(s,...a)=>{if(s)return o(s);i(a.length>1?a:a[0])},t.apply(this,n)})}return r}Jd.exports=si.default});var Zd=S((ai,Qd)=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});var s1=ni(),a1=ws(s1),u1=wt(),l1=ws(u1),f1=Wt(),c1=ws(f1);function ws(t){return t&&t.__esModule?t:{default:t}}ai.default=(0,c1.default)((t,e,r)=>{var n=(0,a1.default)(e)?[]:{};t(e,(i,o,s)=>{(0,l1.default)(i)((a,...u)=>{u.length<2&&([u]=u),n[o]=u,s(a)})},i=>r(i,n))},3);Qd.exports=ai.default});var _s=S((ui,ep)=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.default=h1;function h1(t){function e(...r){if(t!==null){var n=t;t=null,n.apply(this,r)}}return Object.assign(e,t),e}ep.exports=ui.default});var rp=S((li,tp)=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};tp.exports=li.default});var op=S((fi,ip)=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.default=_1;var d1=ni(),p1=np(d1),m1=rp(),g1=np(m1);function np(t){return t&&t.__esModule?t:{default:t}}function y1(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function b1(t){var e=-1;return function(){var n=t.next();return n.done?null:(e++,{value:n.value,key:e})}}function w1(t){var e=t?Object.keys(t):[],r=-1,n=e.length;return function i(){var o=e[++r];return o==="__proto__"?i():r<n?{value:t[o],key:o}:null}}function _1(t){if((0,p1.default)(t))return y1(t);var e=(0,g1.default)(t);return e?b1(e):w1(t)}ip.exports=fi.default});var vs=S((ci,sp)=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.default=v1;function v1(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}sp.exports=ci.default});var di=S((hi,ap)=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});var E1={};hi.default=E1;ap.exports=hi.default});var lp=S((pi,up)=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.default=D1;var S1=di(),T1=O1(S1);function O1(t){return t&&t.__esModule?t:{default:t}}function D1(t,e,r,n){let i=!1,o=!1,s=!1,a=0,u=0;function d(){a>=e||s||i||(s=!0,t.next().then(({value:y,done:g})=>{if(!(o||i)){if(s=!1,g){i=!0,a<=0&&n(null);return}a++,r(y,u,w),u++,d()}}).catch(E))}function w(y,g){if(a-=1,!o){if(y)return E(y);if(y===!1){i=!0,o=!0;return}if(g===T1.default||i&&a<=0)return i=!0,n(null);d()}}function E(y){o||(s=!1,i=!0,n(y))}d()}up.exports=pi.default});var dp=S((mi,hp)=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});var x1=_s(),P1=Ir(x1),M1=op(),N1=Ir(M1),R1=vs(),I1=Ir(R1),fp=wt(),L1=lp(),cp=Ir(L1),A1=di(),C1=Ir(A1);function Ir(t){return t&&t.__esModule?t:{default:t}}mi.default=t=>(e,r,n)=>{if(n=(0,P1.default)(n),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return n(null);if((0,fp.isAsyncGenerator)(e))return(0,cp.default)(e,t,r,n);if((0,fp.isAsyncIterable)(e))return(0,cp.default)(e[Symbol.asyncIterator](),t,r,n);var i=(0,N1.default)(e),o=!1,s=!1,a=0,u=!1;function d(E,y){if(!s)if(a-=1,E)o=!0,n(E);else if(E===!1)o=!0,s=!0;else{if(y===C1.default||o&&a<=0)return o=!0,n(null);u||w()}}function w(){for(u=!0;a<t&&!o;){var E=i();if(E===null){o=!0,a<=0&&n(null);return}a+=1,r(E.value,E.key,(0,I1.default)(d))}u=!1}w()};hp.exports=mi.default});var Ss=S((gi,pp)=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});var q1=dp(),j1=Es(q1),F1=wt(),k1=Es(F1),B1=Wt(),$1=Es(B1);function Es(t){return t&&t.__esModule?t:{default:t}}function U1(t,e,r,n){return(0,j1.default)(e)(t,(0,k1.default)(r),n)}gi.default=(0,$1.default)(U1,4);pp.exports=gi.default});var yp=S((yi,gp)=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});var V1=Ss(),H1=mp(V1),W1=Wt(),X1=mp(W1);function mp(t){return t&&t.__esModule?t:{default:t}}function G1(t,e,r){return(0,H1.default)(t,1,e,r)}yi.default=(0,X1.default)(G1,3);gp.exports=yi.default});var _p=S((bi,wp)=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.default=Q1;var K1=Zd(),Y1=bp(K1),z1=yp(),J1=bp(z1);function bp(t){return t&&t.__esModule?t:{default:t}}function Q1(t,e){return(0,Y1.default)(J1.default,t,e)}wp.exports=bi.default});var Ts=S((pM,vp)=>{"use strict";vp.exports=$("stream")});var xp=S((mM,Dp)=>{"use strict";function Ep(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Sp(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ep(Object(r),!0).forEach(function(n){Z1(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ep(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Z1(t,e,r){return e=Op(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function eS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Op(n.key),n)}}function tS(t,e,r){return e&&Tp(t.prototype,e),r&&Tp(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Op(t){var e=rS(t,"string");return typeof e=="symbol"?e:String(e)}function rS(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var nS=$("buffer"),wi=nS.Buffer,iS=$("util"),Os=iS.inspect,oS=Os&&Os.custom||"inspect";function sS(t,e,r){wi.prototype.copy.call(t,e,r)}Dp.exports=(function(){function t(){eS(this,t),this.head=null,this.tail=null,this.length=0}return tS(t,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return wi.alloc(0);for(var n=wi.allocUnsafe(r>>>0),i=this.head,o=0;i;)sS(i.data,n,o),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,o=n.data;for(r-=o.length;n=n.next;){var s=n.data,a=r>s.length?s.length:r;if(a===s.length?o+=s:o+=s.slice(0,r),r-=a,r===0){a===s.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=s.slice(a));break}++i}return this.length-=i,o}},{key:"_getBuffer",value:function(r){var n=wi.allocUnsafe(r),i=this.head,o=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var s=i.data,a=r>s.length?s.length:r;if(s.copy(n,n.length-r,0,a),r-=a,r===0){a===s.length?(++o,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=s.slice(a));break}++o}return this.length-=o,n}},{key:oS,value:function(r,n){return Os(this,Sp(Sp({},n),{},{depth:0,customInspect:!1}))}}]),t})()});var xs=S((gM,Mp)=>{"use strict";function aS(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Ds,this,t)):process.nextTick(Ds,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(o){!e&&o?r._writableState?r._writableState.errorEmitted?process.nextTick(_i,r):(r._writableState.errorEmitted=!0,process.nextTick(Pp,r,o)):process.nextTick(Pp,r,o):e?(process.nextTick(_i,r),e(o)):process.nextTick(_i,r)}),this)}function Pp(t,e){Ds(t,e),_i(t)}function _i(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function uS(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Ds(t,e){t.emit("error",e)}function lS(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}Mp.exports={destroy:aS,undestroy:uS,errorOrDestroy:lS}});var nt=S((yM,Ip)=>{"use strict";var Rp={};function Ee(t,e,r){r||(r=Error);function n(o,s,a){return typeof e=="string"?e:e(o,s,a)}class i extends r{constructor(s,a,u){super(n(s,a,u))}}i.prototype.name=r.name,i.prototype.code=t,Rp[t]=i}function Np(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(n=>String(n)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function fS(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function cS(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function hS(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Ee("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Ee("ERR_INVALID_ARG_TYPE",function(t,e,r){let n;typeof e=="string"&&fS(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";let i;if(cS(t," argument"))i=`The ${t} ${n} ${Np(e,"type")}`;else{let o=hS(t,".")?"property":"argument";i=`The "${t}" ${o} ${n} ${Np(e,"type")}`}return i+=`. Received type ${typeof r}`,i},TypeError);Ee("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ee("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});Ee("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ee("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});Ee("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ee("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ee("ERR_STREAM_WRITE_AFTER_END","write after end");Ee("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ee("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);Ee("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Ip.exports.codes=Rp});var Ps=S((bM,Lp)=>{"use strict";var dS=nt().codes.ERR_INVALID_OPT_VALUE;function pS(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function mS(t,e,r,n){var i=pS(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var o=n?r:"highWaterMark";throw new dS(o,i)}return Math.floor(i)}return t.objectMode?16:16*1024}Lp.exports={getHighWaterMark:mS}});var Rs=S((wM,kp)=>{"use strict";kp.exports=te;function Cp(t){var e=this;this.next=null,this.entry=null,this.finish=function(){US(e,t)}}var Xt;te.WritableState=Ar;var gS={deprecate:Uo()},qp=Ts(),Ei=$("buffer").Buffer,yS=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function bS(t){return Ei.from(t)}function wS(t){return Ei.isBuffer(t)||t instanceof yS}var Ns=xs(),_S=Ps(),vS=_S.getHighWaterMark,it=nt().codes,ES=it.ERR_INVALID_ARG_TYPE,SS=it.ERR_METHOD_NOT_IMPLEMENTED,TS=it.ERR_MULTIPLE_CALLBACK,OS=it.ERR_STREAM_CANNOT_PIPE,DS=it.ERR_STREAM_DESTROYED,xS=it.ERR_STREAM_NULL_VALUES,PS=it.ERR_STREAM_WRITE_AFTER_END,MS=it.ERR_UNKNOWN_ENCODING,Gt=Ns.errorOrDestroy;Be()(te,qp);function NS(){}function Ar(t,e,r){Xt=Xt||_t(),t=t||{},typeof r!="boolean"&&(r=e instanceof Xt),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=vS(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){jS(e,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Cp(this)}Ar.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Ar.prototype,"buffer",{get:gS.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var vi;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(vi=Function.prototype[Symbol.hasInstance],Object.defineProperty(te,Symbol.hasInstance,{value:function(e){return vi.call(this,e)?!0:this!==te?!1:e&&e._writableState instanceof Ar}})):vi=function(e){return e instanceof this};function te(t){Xt=Xt||_t();var e=this instanceof Xt;if(!e&&!vi.call(te,this))return new te(t);this._writableState=new Ar(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),qp.call(this)}te.prototype.pipe=function(){Gt(this,new OS)};function RS(t,e){var r=new PS;Gt(t,r),process.nextTick(e,r)}function IS(t,e,r,n){var i;return r===null?i=new xS:typeof r!="string"&&!e.objectMode&&(i=new ES("chunk",["string","Buffer"],r)),i?(Gt(t,i),process.nextTick(n,i),!1):!0}te.prototype.write=function(t,e,r){var n=this._writableState,i=!1,o=!n.objectMode&&wS(t);return o&&!Ei.isBuffer(t)&&(t=bS(t)),typeof e=="function"&&(r=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=NS),n.ending?RS(this,r):(o||IS(this,n,t,r))&&(n.pendingcb++,i=AS(this,n,o,t,e,r)),i};te.prototype.cork=function(){this._writableState.corked++};te.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&jp(this,t))};te.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new MS(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(te.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function LS(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Ei.from(e,r)),e}Object.defineProperty(te.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function AS(t,e,r,n,i,o){if(!r){var s=LS(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var d=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},d?d.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Ms(t,e,!1,a,n,i,o);return u}function Ms(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new DS("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function CS(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(Lr,t,e),t._writableState.errorEmitted=!0,Gt(t,n)):(i(n),t._writableState.errorEmitted=!0,Gt(t,n),Lr(t,e))}function qS(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function jS(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new TS;if(qS(r),e)CS(t,r,n,e,i);else{var o=Fp(r)||t.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&jp(t,r),n?process.nextTick(Ap,t,r,o,i):Ap(t,r,o,i)}}function Ap(t,e,r,n){r||FS(t,e),e.pendingcb--,n(),Lr(t,e)}function FS(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function jp(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var s=0,a=!0;r;)i[s]=r,r.isBuf||(a=!1),r=r.next,s+=1;i.allBuffers=a,Ms(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new Cp(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,d=r.encoding,w=r.callback,E=e.objectMode?1:u.length;if(Ms(t,e,!1,E,u,d,w),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}te.prototype._write=function(t,e,r){r(new SS("_write()"))};te.prototype._writev=null;te.prototype.end=function(t,e,r){var n=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||$S(this,n,r),this};Object.defineProperty(te.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Fp(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function kS(t,e){t._final(function(r){e.pendingcb--,r&&Gt(t,r),e.prefinished=!0,t.emit("prefinish"),Lr(t,e)})}function BS(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(kS,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Lr(t,e){var r=Fp(e);if(r&&(BS(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}function $S(t,e,r){e.ending=!0,Lr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function US(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty(te.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});te.prototype.destroy=Ns.destroy;te.prototype._undestroy=Ns.undestroy;te.prototype._destroy=function(t,e){e(t)}});var _t=S((_M,$p)=>{"use strict";var VS=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};$p.exports=Re;var Bp=As(),Ls=Rs();Be()(Re,Bp);for(Is=VS(Ls.prototype),Si=0;Si<Is.length;Si++)Ti=Is[Si],Re.prototype[Ti]||(Re.prototype[Ti]=Ls.prototype[Ti]);var Is,Ti,Si;function Re(t){if(!(this instanceof Re))return new Re(t);Bp.call(this,t),Ls.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",HS)))}Object.defineProperty(Re.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Re.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Re.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function HS(){this._writableState.ended||process.nextTick(WS,this)}function WS(t){t.end()}Object.defineProperty(Re.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var Oi=S((vM,Hp)=>{"use strict";var Up=nt().codes.ERR_STREAM_PREMATURE_CLOSE;function XS(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}function GS(){}function KS(t){return t.setHeader&&typeof t.abort=="function"}function Vp(t,e,r){if(typeof e=="function")return Vp(t,null,e);e||(e={}),r=XS(r||GS);var n=e.readable||e.readable!==!1&&t.readable,i=e.writable||e.writable!==!1&&t.writable,o=function(){t.writable||a()},s=t._writableState&&t._writableState.finished,a=function(){i=!1,s=!0,n||r.call(t)},u=t._readableState&&t._readableState.endEmitted,d=function(){n=!1,u=!0,i||r.call(t)},w=function(h){r.call(t,h)},E=function(){var h;if(n&&!u)return(!t._readableState||!t._readableState.ended)&&(h=new Up),r.call(t,h);if(i&&!s)return(!t._writableState||!t._writableState.ended)&&(h=new Up),r.call(t,h)},y=function(){t.req.on("finish",a)};return KS(t)?(t.on("complete",a),t.on("abort",E),t.req?y():t.on("request",y)):i&&!t._writableState&&(t.on("end",o),t.on("close",o)),t.on("end",d),t.on("finish",a),e.error!==!1&&t.on("error",w),t.on("close",E),function(){t.removeListener("complete",a),t.removeListener("abort",E),t.removeListener("request",y),t.req&&t.req.removeListener("finish",a),t.removeListener("end",o),t.removeListener("close",o),t.removeListener("finish",a),t.removeListener("end",d),t.removeListener("error",w),t.removeListener("close",E)}}Hp.exports=Vp});var Xp=S((EM,Wp)=>{"use strict";var Di;function ot(t,e,r){return e=YS(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function YS(t){var e=zS(t,"string");return typeof e=="symbol"?e:String(e)}function zS(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var JS=Oi(),st=Symbol("lastResolve"),vt=Symbol("lastReject"),Cr=Symbol("error"),xi=Symbol("ended"),Et=Symbol("lastPromise"),Cs=Symbol("handlePromise"),St=Symbol("stream");function at(t,e){return{value:t,done:e}}function QS(t){var e=t[st];if(e!==null){var r=t[St].read();r!==null&&(t[Et]=null,t[st]=null,t[vt]=null,e(at(r,!1)))}}function ZS(t){process.nextTick(QS,t)}function eT(t,e){return function(r,n){t.then(function(){if(e[xi]){r(at(void 0,!0));return}e[Cs](r,n)},n)}}var tT=Object.getPrototypeOf(function(){}),rT=Object.setPrototypeOf((Di={get stream(){return this[St]},next:function(){var e=this,r=this[Cr];if(r!==null)return Promise.reject(r);if(this[xi])return Promise.resolve(at(void 0,!0));if(this[St].destroyed)return new Promise(function(s,a){process.nextTick(function(){e[Cr]?a(e[Cr]):s(at(void 0,!0))})});var n=this[Et],i;if(n)i=new Promise(eT(n,this));else{var o=this[St].read();if(o!==null)return Promise.resolve(at(o,!1));i=new Promise(this[Cs])}return this[Et]=i,i}},ot(Di,Symbol.asyncIterator,function(){return this}),ot(Di,"return",function(){var e=this;return new Promise(function(r,n){e[St].destroy(null,function(i){if(i){n(i);return}r(at(void 0,!0))})})}),Di),tT),nT=function(e){var r,n=Object.create(rT,(r={},ot(r,St,{value:e,writable:!0}),ot(r,st,{value:null,writable:!0}),ot(r,vt,{value:null,writable:!0}),ot(r,Cr,{value:null,writable:!0}),ot(r,xi,{value:e._readableState.endEmitted,writable:!0}),ot(r,Cs,{value:function(o,s){var a=n[St].read();a?(n[Et]=null,n[st]=null,n[vt]=null,o(at(a,!1))):(n[st]=o,n[vt]=s)},writable:!0}),r));return n[Et]=null,JS(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=n[vt];o!==null&&(n[Et]=null,n[st]=null,n[vt]=null,o(i)),n[Cr]=i;return}var s=n[st];s!==null&&(n[Et]=null,n[st]=null,n[vt]=null,s(at(void 0,!0))),n[xi]=!0}),e.on("readable",ZS.bind(null,n)),n};Wp.exports=nT});var zp=S((SM,Yp)=>{"use strict";function Gp(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(d){r(d);return}a.done?e(u):Promise.resolve(u).then(n,i)}function iT(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function s(u){Gp(o,n,i,s,a,"next",u)}function a(u){Gp(o,n,i,s,a,"throw",u)}s(void 0)})}}function Kp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function oT(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Kp(Object(r),!0).forEach(function(n){sT(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Kp(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function sT(t,e,r){return e=aT(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function aT(t){var e=uT(t,"string");return typeof e=="symbol"?e:String(e)}function uT(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var lT=nt().codes.ERR_INVALID_ARG_TYPE;function fT(t,e,r){var n;if(e&&typeof e.next=="function")n=e;else if(e&&e[Symbol.asyncIterator])n=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])n=e[Symbol.iterator]();else throw new lT("iterable",["Iterable"],e);var i=new t(oT({objectMode:!0},r)),o=!1;i._read=function(){o||(o=!0,s())};function s(){return a.apply(this,arguments)}function a(){return a=iT(function*(){try{var u=yield n.next(),d=u.value,w=u.done;w?i.push(null):i.push(yield d)?s():o=!1}catch(E){i.destroy(E)}}),a.apply(this,arguments)}return i}Yp.exports=fT});var As=S((OM,sm)=>{"use strict";sm.exports=G;var Kt;G.ReadableState=em;var TM=$("events").EventEmitter,Zp=function(e,r){return e.listeners(r).length},jr=Ts(),Pi=$("buffer").Buffer,cT=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function hT(t){return Pi.from(t)}function dT(t){return Pi.isBuffer(t)||t instanceof cT}var qs=$("util"),H;qs&&qs.debuglog?H=qs.debuglog("stream"):H=function(){};var pT=xp(),Vs=xs(),mT=Ps(),gT=mT.getHighWaterMark,Mi=nt().codes,yT=Mi.ERR_INVALID_ARG_TYPE,bT=Mi.ERR_STREAM_PUSH_AFTER_EOF,wT=Mi.ERR_METHOD_NOT_IMPLEMENTED,_T=Mi.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Yt,js,Fs;Be()(G,jr);var qr=Vs.errorOrDestroy,ks=["error","close","destroy","pause","resume"];function vT(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function em(t,e,r){Kt=Kt||_t(),t=t||{},typeof r!="boolean"&&(r=e instanceof Kt),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=gT(this,t,"readableHighWaterMark",r),this.buffer=new pT,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Yt||(Yt=Er().StringDecoder),this.decoder=new Yt(t.encoding),this.encoding=t.encoding)}function G(t){if(Kt=Kt||_t(),!(this instanceof G))return new G(t);var e=this instanceof Kt;this._readableState=new em(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),jr.call(this)}Object.defineProperty(G.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});G.prototype.destroy=Vs.destroy;G.prototype._undestroy=Vs.undestroy;G.prototype._destroy=function(t,e){e(t)};G.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Pi.from(t,e),e=""),n=!0),tm(this,t,e,!1,n)};G.prototype.unshift=function(t){return tm(this,t,null,!0,!1)};function tm(t,e,r,n,i){H("readableAddChunk",e);var o=t._readableState;if(e===null)o.reading=!1,TT(t,o);else{var s;if(i||(s=ET(o,e)),s)qr(t,s);else if(o.objectMode||e&&e.length>0)if(typeof e!="string"&&!o.objectMode&&Object.getPrototypeOf(e)!==Pi.prototype&&(e=hT(e)),n)o.endEmitted?qr(t,new _T):Bs(t,o,e,!0);else if(o.ended)qr(t,new bT);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||e.length!==0?Bs(t,o,e,!1):Us(t,o)):Bs(t,o,e,!1)}else n||(o.reading=!1,Us(t,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function Bs(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Ni(t)),Us(t,e)}function ET(t,e){var r;return!dT(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new yT("chunk",["string","Buffer","Uint8Array"],e)),r}G.prototype.isPaused=function(){return this._readableState.flowing===!1};G.prototype.setEncoding=function(t){Yt||(Yt=Er().StringDecoder);var e=new Yt(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var Jp=1073741824;function ST(t){return t>=Jp?t=Jp:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Qp(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=ST(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}G.prototype.read=function(t){H("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return H("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?$s(this):Ni(this),null;if(t=Qp(t,e),t===0&&e.ended)return e.length===0&&$s(this),null;var n=e.needReadable;H("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,H("length less than watermark",n)),e.ended||e.reading?(n=!1,H("reading or ended",n)):n&&(H("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Qp(r,e)));var i;return t>0?i=im(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&$s(this)),i!==null&&this.emit("data",i),i};function TT(t,e){if(H("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Ni(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,rm(t)))}}function Ni(t){var e=t._readableState;H("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(H("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(rm,t))}function rm(t){var e=t._readableState;H("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Hs(t)}function Us(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(OT,t,e))}function OT(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(H("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}G.prototype._read=function(t){qr(this,new wT("_read()"))};G.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,H("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,o=i?a:v;n.endEmitted?process.nextTick(o):r.once("end",o),t.on("unpipe",s);function s(I,R){H("onunpipe"),I===r&&R&&R.hasUnpiped===!1&&(R.hasUnpiped=!0,w())}function a(){H("onend"),t.end()}var u=DT(r);t.on("drain",u);var d=!1;function w(){H("cleanup"),t.removeListener("close",g),t.removeListener("finish",h),t.removeListener("drain",u),t.removeListener("error",y),t.removeListener("unpipe",s),r.removeListener("end",a),r.removeListener("end",v),r.removeListener("data",E),d=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}r.on("data",E);function E(I){H("ondata");var R=t.write(I);H("dest.write",R),R===!1&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&om(n.pipes,t)!==-1)&&!d&&(H("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function y(I){H("onerror",I),v(),t.removeListener("error",y),Zp(t,"error")===0&&qr(t,I)}vT(t,"error",y);function g(){t.removeListener("finish",h),v()}t.once("close",g);function h(){H("onfinish"),t.removeListener("close",g),v()}t.once("finish",h);function v(){H("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(H("pipe resume"),r.resume()),t};function DT(t){return function(){var r=t._readableState;H("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Zp(t,"data")&&(r.flowing=!0,Hs(t))}}G.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=om(e.pipes,t);return s===-1?this:(e.pipes.splice(s,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};G.prototype.on=function(t,e){var r=jr.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,H("on readable",n.length,n.reading),n.length?Ni(this):n.reading||process.nextTick(xT,this)),r};G.prototype.addListener=G.prototype.on;G.prototype.removeListener=function(t,e){var r=jr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(nm,this),r};G.prototype.removeAllListeners=function(t){var e=jr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(nm,this),e};function nm(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function xT(t){H("readable nexttick read 0"),t.read(0)}G.prototype.resume=function(){var t=this._readableState;return t.flowing||(H("resume"),t.flowing=!t.readableListening,PT(this,t)),t.paused=!1,this};function PT(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(MT,t,e))}function MT(t,e){H("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Hs(t),e.flowing&&!e.reading&&t.read(0)}G.prototype.pause=function(){return H("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(H("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Hs(t){var e=t._readableState;for(H("flow",e.flowing);e.flowing&&t.read()!==null;);}G.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(H("wrapped end"),r.decoder&&!r.ended){var s=r.decoder.end();s&&s.length&&e.push(s)}e.push(null)}),t.on("data",function(s){if(H("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!(r.objectMode&&s==null)&&!(!r.objectMode&&(!s||!s.length))){var a=e.push(s);a||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=(function(a){return function(){return t[a].apply(t,arguments)}})(i));for(var o=0;o<ks.length;o++)t.on(ks[o],this.emit.bind(this,ks[o]));return this._read=function(s){H("wrapped _read",s),n&&(n=!1,t.resume())},this};typeof Symbol=="function"&&(G.prototype[Symbol.asyncIterator]=function(){return js===void 0&&(js=Xp()),js(this)});Object.defineProperty(G.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(G.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(G.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});G._fromList=im;Object.defineProperty(G.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function im(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function $s(t){var e=t._readableState;H("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(NT,e,t))}function NT(t,e){if(H("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(G.from=function(t,e){return Fs===void 0&&(Fs=zp()),Fs(G,t,e)});function om(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var Ws=S((DM,um)=>{"use strict";um.exports=Ue;var Ri=nt().codes,RT=Ri.ERR_METHOD_NOT_IMPLEMENTED,IT=Ri.ERR_MULTIPLE_CALLBACK,LT=Ri.ERR_TRANSFORM_ALREADY_TRANSFORMING,AT=Ri.ERR_TRANSFORM_WITH_LENGTH_0,Ii=_t();Be()(Ue,Ii);function CT(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new IT);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Ue(t){if(!(this instanceof Ue))return new Ue(t);Ii.call(this,t),this._transformState={afterTransform:CT.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",qT)}function qT(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){am(t,e,r)}):am(this,null,null)}Ue.prototype.push=function(t,e){return this._transformState.needTransform=!1,Ii.prototype.push.call(this,t,e)};Ue.prototype._transform=function(t,e,r){r(new RT("_transform()"))};Ue.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Ue.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Ue.prototype._destroy=function(t,e){Ii.prototype._destroy.call(this,t,function(r){e(r)})};function am(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new AT;if(t._transformState.transforming)throw new LT;return t.push(null)}});var cm=S((xM,fm)=>{"use strict";fm.exports=Fr;var lm=Ws();Be()(Fr,lm);function Fr(t){if(!(this instanceof Fr))return new Fr(t);lm.call(this,t)}Fr.prototype._transform=function(t,e,r){r(null,t)}});var gm=S((PM,mm)=>{"use strict";var Xs;function jT(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var pm=nt().codes,FT=pm.ERR_MISSING_ARGS,kT=pm.ERR_STREAM_DESTROYED;function hm(t){if(t)throw t}function BT(t){return t.setHeader&&typeof t.abort=="function"}function $T(t,e,r,n){n=jT(n);var i=!1;t.on("close",function(){i=!0}),Xs===void 0&&(Xs=Oi()),Xs(t,{readable:e,writable:r},function(s){if(s)return n(s);i=!0,n()});var o=!1;return function(s){if(!i&&!o){if(o=!0,BT(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();n(s||new kT("pipe"))}}}function dm(t){t()}function UT(t,e){return t.pipe(e)}function VT(t){return!t.length||typeof t[t.length-1]!="function"?hm:t.pop()}function HT(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=VT(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new FT("streams");var i,o=e.map(function(s,a){var u=a<e.length-1,d=a>0;return $T(s,u,d,function(w){i||(i=w),w&&o.forEach(dm),!u&&(o.forEach(dm),n(i))})});return e.reduce(UT)}mm.exports=HT});var Tt=S((Se,Br)=>{"use strict";var kr=$("stream");process.env.READABLE_STREAM==="disable"&&kr?(Br.exports=kr.Readable,Object.assign(Br.exports,kr),Br.exports.Stream=kr):(Se=Br.exports=As(),Se.Stream=kr||Se,Se.Readable=Se,Se.Writable=Rs(),Se.Duplex=_t(),Se.Transform=Ws(),Se.PassThrough=cm(),Se.finished=Oi(),Se.pipeline=gm())});var Zs=S((MM,bm)=>{"use strict";var zt=[],$r=[],Gs=function(){};function Ys(t){return~zt.indexOf(t)?!1:(zt.push(t),!0)}function zs(t){Gs=t}function WT(t){for(var e=[],r=0;r<zt.length;r++){if(zt[r].async){e.push(zt[r]);continue}if(zt[r](t))return!0}return e.length?new Promise(function(i){Promise.all(e.map(function(s){return s(t)})).then(function(s){i(s.some(Boolean))})}):!1}function Js(t){return~$r.indexOf(t)?!1:($r.push(t),!0)}function Ks(){Gs.apply(Gs,arguments)}function ym(t){for(var e=0;e<$r.length;e++)t=$r[e].apply($r[e],arguments);return t}function Qs(t,e){var r=Object.prototype.hasOwnProperty;for(var n in e)r.call(e,n)&&(t[n]=e[n]);return t}function XT(t){return t.enabled=!1,t.modify=Js,t.set=zs,t.use=Ys,Qs(function(){return!1},t)}function GT(t){function e(){var r=Array.prototype.slice.call(arguments,0);return Ks.call(Ks,t,ym(r,t)),!0}return t.enabled=!0,t.modify=Js,t.set=zs,t.use=Ys,Qs(e,t)}bm.exports=function(e){return e.introduce=Qs,e.enabled=WT,e.process=ym,e.modify=Js,e.write=Ks,e.nope=XT,e.yep=GT,e.set=zs,e.use=Ys,e}});var _m=S((NM,wm)=>{"use strict";var KT=Zs(),YT=KT(function t(e,r){return r=r||{},r.namespace=e,r.prod=!0,r.dev=!1,r.force||t.force?t.yep(r):t.nope(r)});wm.exports=YT});var Dm=S((RM,Om)=>{"use strict";var Ie={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Em=Object.create(null);for(let t in Ie)Object.hasOwn(Ie,t)&&(Em[Ie[t]]=t);var le={to:{},get:{}};le.get=function(t){let e=t.slice(0,3).toLowerCase(),r,n;switch(e){case"hsl":{r=le.get.hsl(t),n="hsl";break}case"hwb":{r=le.get.hwb(t),n="hwb";break}default:{r=le.get.rgb(t),n="rgb";break}}return r?{model:n,value:r}:null};le.get.rgb=function(t){if(!t)return null;let e=/^#([a-f\d]{3,4})$/i,r=/^#([a-f\d]{6})([a-f\d]{2})?$/i,n=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,i=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,s=[0,0,0,1],a,u,d;if(a=t.match(r)){for(d=a[2],a=a[1],u=0;u<3;u++){let w=u*2;s[u]=Number.parseInt(a.slice(w,w+2),16)}d&&(s[3]=Number.parseInt(d,16)/255)}else if(a=t.match(e)){for(a=a[1],d=a[3],u=0;u<3;u++)s[u]=Number.parseInt(a[u]+a[u],16);d&&(s[3]=Number.parseInt(d+d,16)/255)}else if(a=t.match(n)){for(u=0;u<3;u++)s[u]=Number.parseInt(a[u+1],10);a[4]&&(s[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else if(a=t.match(i)){for(u=0;u<3;u++)s[u]=Math.round(Number.parseFloat(a[u+1])*2.55);a[4]&&(s[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else return(a=t.match(o))?a[1]==="transparent"?[0,0,0,0]:Object.hasOwn(Ie,a[1])?(s=Ie[a[1]],s[3]=1,s):null:null;for(u=0;u<3;u++)s[u]=ut(s[u],0,255);return s[3]=ut(s[3],0,1),s};le.get.hsl=function(t){if(!t)return null;let e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){let n=Number.parseFloat(r[4]),i=(Number.parseFloat(r[1])%360+360)%360,o=ut(Number.parseFloat(r[2]),0,100),s=ut(Number.parseFloat(r[3]),0,100),a=ut(Number.isNaN(n)?1:n,0,1);return[i,o,s,a]}return null};le.get.hwb=function(t){if(!t)return null;let e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){let n=Number.parseFloat(r[4]),i=(Number.parseFloat(r[1])%360+360)%360,o=ut(Number.parseFloat(r[2]),0,100),s=ut(Number.parseFloat(r[3]),0,100),a=ut(Number.isNaN(n)?1:n,0,1);return[i,o,s,a]}return null};le.to.hex=function(...t){return"#"+Li(t[0])+Li(t[1])+Li(t[2])+(t[3]<1?Li(Math.round(t[3]*255)):"")};le.to.rgb=function(...t){return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};le.to.rgb.percent=function(...t){let e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),n=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+r+"%, "+n+"%)":"rgba("+e+"%, "+r+"%, "+n+"%, "+t[3]+")"};le.to.hsl=function(...t){return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};le.to.hwb=function(...t){let e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};le.to.keyword=function(...t){return Em[t.slice(0,3)]};function ut(t,e,r){return Math.min(Math.max(e,t),r)}function Li(t){let e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}var Sm={};for(let t of Object.keys(Ie))Sm[Ie[t]]=t;var j={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},Ve=(6/29)**3;function Jt(t){let e=t>.0031308?1.055*t**.4166666666666667-.055:t*12.92;return Math.min(Math.max(0,e),1)}function Qt(t){return t>.04045?((t+.055)/1.055)**2.4:t/12.92}for(let t of Object.keys(j)){if(!("channels"in j[t]))throw new Error("missing channels property: "+t);if(!("labels"in j[t]))throw new Error("missing channel labels property: "+t);if(j[t].labels.length!==j[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=j[t];delete j[t].channels,delete j[t].labels,Object.defineProperty(j[t],"channels",{value:e}),Object.defineProperty(j[t],"labels",{value:r})}j.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),o=Math.max(e,r,n),s=o-i,a,u;switch(o){case i:{a=0;break}case e:{a=(r-n)/s;break}case r:{a=2+(n-e)/s;break}case n:{a=4+(e-r)/s;break}}a=Math.min(a*60,360),a<0&&(a+=360);let d=(i+o)/2;return o===i?u=0:d<=.5?u=s/(o+i):u=s/(2-o-i),[a,u*100,d*100]};j.rgb.hsv=function(t){let e,r,n,i,o,s=t[0]/255,a=t[1]/255,u=t[2]/255,d=Math.max(s,a,u),w=d-Math.min(s,a,u),E=function(y){return(d-y)/6/w+1/2};if(w===0)i=0,o=0;else{switch(o=w/d,e=E(s),r=E(a),n=E(u),d){case s:{i=n-r;break}case a:{i=1/3+e-n;break}case u:{i=2/3+r-e;break}}i<0?i+=1:i>1&&(i-=1)}return[i*360,o*100,d*100]};j.rgb.hwb=function(t){let e=t[0],r=t[1],n=t[2],i=j.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,o*100,n*100]};j.rgb.oklab=function(t){let e=Qt(t[0]/255),r=Qt(t[1]/255),n=Qt(t[2]/255),i=Math.cbrt(.4122214708*e+.5363325363*r+.0514459929*n),o=Math.cbrt(.2119034982*e+.6806995451*r+.1073969566*n),s=Math.cbrt(.0883024619*e+.2817188376*r+.6299787005*n),a=.2104542553*i+.793617785*o-.0040720468*s,u=1.9779984951*i-2.428592205*o+.4505937099*s,d=.0259040371*i+.7827717662*o-.808675766*s;return[a*100,u*100,d*100]};j.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(1-e,1-r,1-n),o=(1-e-i)/(1-i)||0,s=(1-r-i)/(1-i)||0,a=(1-n-i)/(1-i)||0;return[o*100,s*100,a*100,i*100]};function zT(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}j.rgb.keyword=function(t){let e=Sm[t];if(e)return e;let r=Number.POSITIVE_INFINITY,n;for(let i of Object.keys(Ie)){let o=Ie[i],s=zT(t,o);s<r&&(r=s,n=i)}return n};j.keyword.rgb=function(t){return Ie[t]};j.rgb.xyz=function(t){let e=Qt(t[0]/255),r=Qt(t[1]/255),n=Qt(t[2]/255),i=e*.4124564+r*.3575761+n*.1804375,o=e*.2126729+r*.7151522+n*.072175,s=e*.0193339+r*.119192+n*.9503041;return[i*100,o*100,s*100]};j.rgb.lab=function(t){let e=j.rgb.xyz(t),r=e[0],n=e[1],i=e[2];r/=95.047,n/=100,i/=108.883,r=r>Ve?r**(1/3):7.787*r+16/116,n=n>Ve?n**(1/3):7.787*n+16/116,i=i>Ve?i**(1/3):7.787*i+16/116;let o=116*n-16,s=500*(r-n),a=200*(n-i);return[o,s,a]};j.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i,o;if(r===0)return o=n*255,[o,o,o];let s=n<.5?n*(1+r):n+r-n*r,a=2*n-s,u=[0,0,0];for(let d=0;d<3;d++)i=e+1/3*-(d-1),i<0&&i++,i>1&&i--,6*i<1?o=a+(s-a)*6*i:2*i<1?o=s:3*i<2?o=a+(s-a)*(2/3-i)*6:o=a,u[d]=o*255;return u};j.hsl.hsv=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=r,o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=o<=1?o:2-o;let s=(n+r)/2,a=n===0?2*i/(o+i):2*r/(n+r);return[e,a*100,s*100]};j.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,o=e-Math.floor(e),s=255*n*(1-r),a=255*n*(1-r*o),u=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,u,s];case 1:return[a,n,s];case 2:return[s,n,u];case 3:return[s,a,n];case 4:return[u,s,n];case 5:return[n,s,a]}};j.hsv.hsl=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),o,s;s=(2-r)*n;let a=(2-r)*i;return o=r*i,o/=a<=1?a:2-a,o=o||0,s/=2,[e,o*100,s*100]};j.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,o;i>1&&(r/=i,n/=i);let s=Math.floor(6*e),a=1-n;o=6*e-s,(s&1)!==0&&(o=1-o);let u=r+o*(a-r),d,w,E;switch(s){default:case 6:case 0:{d=a,w=u,E=r;break}case 1:{d=u,w=a,E=r;break}case 2:{d=r,w=a,E=u;break}case 3:{d=r,w=u,E=a;break}case 4:{d=u,w=r,E=a;break}case 5:{d=a,w=r,E=u;break}}return[d*255,w*255,E*255]};j.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,o=1-Math.min(1,e*(1-i)+i),s=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i);return[o*255,s*255,a*255]};j.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i,o,s;return i=e*3.2404542+r*-1.5371385+n*-.4985314,o=e*-.969266+r*1.8760108+n*.041556,s=e*.0556434+r*-.2040259+n*1.0572252,i=Jt(i),o=Jt(o),s=Jt(s),[i*255,o*255,s*255]};j.xyz.lab=function(t){let e=t[0],r=t[1],n=t[2];e/=95.047,r/=100,n/=108.883,e=e>Ve?e**(1/3):7.787*e+16/116,r=r>Ve?r**(1/3):7.787*r+16/116,n=n>Ve?n**(1/3):7.787*n+16/116;let i=116*r-16,o=500*(e-r),s=200*(r-n);return[i,o,s]};j.xyz.oklab=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=Math.cbrt(.8189330101*e+.3618667424*r-.1288597137*n),o=Math.cbrt(.0329845436*e+.9293118715*r+.0361456387*n),s=Math.cbrt(.0482003018*e+.2643662691*r+.633851707*n),a=.2104542553*i+.793617785*o-.0040720468*s,u=1.9779984951*i-2.428592205*o+.4505937099*s,d=.0259040371*i+.7827717662*o-.808675766*s;return[a*100,u*100,d*100]};j.oklab.oklch=function(t){return j.lab.lch(t)};j.oklab.xyz=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=(.999999998*e+.396337792*r+.215803758*n)**3,o=(1.000000008*e-.105561342*r-.063854175*n)**3,s=(1.000000055*e-.089484182*r-1.291485538*n)**3,a=1.227013851*i-.55779998*o+.281256149*s,u=-.040580178*i+1.11225687*o-.071676679*s,d=-.076381285*i-.421481978*o+1.58616322*s;return[a*100,u*100,d*100]};j.oklab.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=(e+.3963377774*r+.2158037573*n)**3,o=(e-.1055613458*r-.0638541728*n)**3,s=(e-.0894841775*r-1.291485548*n)**3,a=Jt(4.0767416621*i-3.3077115913*o+.2309699292*s),u=Jt(-1.2684380046*i+2.6097574011*o-.3413193965*s),d=Jt(-.0041960863*i-.7034186147*o+1.707614701*s);return[a*255,u*255,d*255]};j.oklch.oklab=function(t){return j.lch.lab(t)};j.lab.xyz=function(t){let e=t[0],r=t[1],n=t[2],i,o,s;o=(e+16)/116,i=r/500+o,s=o-n/200;let a=o**3,u=i**3,d=s**3;return o=a>Ve?a:(o-16/116)/7.787,i=u>Ve?u:(i-16/116)/7.787,s=d>Ve?d:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};j.lab.lch=function(t){let e=t[0],r=t[1],n=t[2],i;i=Math.atan2(n,r)*360/2/Math.PI,i<0&&(i+=360);let s=Math.sqrt(r*r+n*n);return[e,s,i]};j.lch.lab=function(t){let e=t[0],r=t[1],i=t[2]/360*2*Math.PI,o=r*Math.cos(i),s=r*Math.sin(i);return[e,o,s]};j.rgb.ansi16=function(t,e=null){let[r,n,i]=t,o=e===null?j.rgb.hsv(t)[2]:e;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return o===2&&(s+=60),s};j.hsv.ansi16=function(t){return j.rgb.ansi16(j.hsv.rgb(t),t[2])};j.rgb.ansi256=function(t){let e=t[0],r=t[1],n=t[2];return e>>4===r>>4&&r>>4===n>>4?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};j.ansi16.rgb=function(t){t=t[0];let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(Math.trunc(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,o=(e>>2&1)*r*255;return[n,i,o]};j.ansi256.rgb=function(t){if(t=t[0],t>=232){let o=(t-232)*10+8;return[o,o,o]}t-=16;let e,r=Math.floor(t/36)/5*255,n=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return[r,n,i]};j.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".slice(r.length)+r};j.hex.rgb=function(t){let e=t.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=[...r].map(a=>a+a).join(""));let n=Number.parseInt(r,16),i=n>>16&255,o=n>>8&255,s=n&255;return[i,o,s]};j.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),o=Math.min(Math.min(e,r),n),s=i-o,a,u=s<1?o/(1-s):0;return s<=0?a=0:i===e?a=(r-n)/s%6:i===r?a=2+(n-e)/s:a=4+(e-r)/s,a/=6,a%=1,[a*360,s*100,u*100]};j.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=r<.5?2*e*r:2*e*(1-r),i=0;return n<1&&(i=(r-.5*n)/(1-n)),[t[0],n*100,i*100]};j.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=e*r,i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],n*100,i*100]};j.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];let i=[0,0,0],o=e%1*6,s=o%1,a=1-s,u=0;switch(Math.floor(o)){case 0:{i[0]=1,i[1]=s,i[2]=0;break}case 1:{i[0]=a,i[1]=1,i[2]=0;break}case 2:{i[0]=0,i[1]=1,i[2]=s;break}case 3:{i[0]=0,i[1]=a,i[2]=1;break}case 4:{i[0]=s,i[1]=0,i[2]=1;break}default:i[0]=1,i[1]=0,i[2]=a}return u=(1-r)*n,[(r*i[0]+u)*255,(r*i[1]+u)*255,(r*i[2]+u)*255]};j.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e),i=0;return n>0&&(i=e/n),[t[0],i*100,n*100]};j.hcg.hsl=function(t){let e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],i*100,n*100]};j.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return[t[0],(n-e)*100,(1-n)*100]};j.hwb.hcg=function(t){let e=t[1]/100,n=1-t[2]/100,i=n-e,o=0;return i<1&&(o=(n-i)/(1-i)),[t[0],i*100,o*100]};j.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};j.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};j.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};j.gray.hsl=function(t){return[0,0,t[0]]};j.gray.hsv=j.gray.hsl;j.gray.hwb=function(t){return[0,100,t[0]]};j.gray.cmyk=function(t){return[0,0,0,t[0]]};j.gray.lab=function(t){return[t[0],0,0]};j.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".slice(n.length)+n};j.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};function JT(){let t={},e=Object.keys(j);for(let{length:r}=e,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function QT(t){let e=JT(),r=[t];for(e[t].distance=0;r.length>0;){let n=r.pop(),i=Object.keys(j[n]);for(let{length:o}=i,s=0;s<o;s++){let a=i[s],u=e[a];u.distance===-1&&(u.distance=e[n].distance+1,u.parent=n,r.unshift(a))}}return e}function ZT(t,e){return function(r){return e(t(r))}}function eO(t,e){let r=[e[t].parent,t],n=j[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=ZT(j[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}function tO(t){let e=QT(t),r={},n=Object.keys(e);for(let{length:i}=n,o=0;o<i;o++){let s=n[o];e[s].parent!==null&&(r[s]=eO(s,e))}return r}var fe={},rO=Object.keys(j);function nO(t){let e=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function iO(t){let e=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let i=t(r);if(typeof i=="object")for(let{length:o}=i,s=0;s<o;s++)i[s]=Math.round(i[s]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}for(let t of rO){fe[t]={},Object.defineProperty(fe[t],"channels",{value:j[t].channels}),Object.defineProperty(fe[t],"labels",{value:j[t].labels});let e=tO(t),r=Object.keys(e);for(let n of r){let i=e[n];fe[t][n]=iO(i),fe[t][n].raw=nO(i)}}var Tm=["keyword","gray","hex"],ea={};for(let t of Object.keys(fe))ea[[...fe[t].labels].sort().join("")]=t;var ta={};function ue(t,e){if(!(this instanceof ue))return new ue(t,e);if(e&&e in Tm&&(e=null),e&&!(e in fe))throw new Error("Unknown model: "+e);let r,n;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof ue)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){let i=le.get(t);if(i===null)throw new Error("Unable to parse color from string: "+t);this.model=i.model,n=fe[this.model].channels,this.color=i.value.slice(0,n),this.valpha=typeof i.value[n]=="number"?i.value[n]:1}else if(t.length>0){this.model=e||"rgb",n=fe[this.model].channels;let i=Array.prototype.slice.call(t,0,n);this.color=ra(i,n),this.valpha=typeof t[n]=="number"?t[n]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;let i=Object.keys(t);"alpha"in t&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);let o=i.sort().join("");if(!(o in ea))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=ea[o];let{labels:s}=fe[this.model],a=[];for(r=0;r<s.length;r++)a.push(t[s[r]]);this.color=ra(a)}if(ta[this.model])for(n=fe[this.model].channels,r=0;r<n;r++){let i=ta[this.model][r];i&&(this.color[r]=i(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}ue.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in le.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);let r=e.valpha===1?e.color:[...e.color,this.valpha];return le.to[e.model](...r)},percentString(t){let e=this.rgb().round(typeof t=="number"?t:1),r=e.valpha===1?e.color:[...e.color,this.valpha];return le.to.rgb.percent(...r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let t={},{channels:e}=fe[this.model],{labels:r}=fe[this.model];for(let n=0;n<e;n++)t[r[n]]=this.color[n];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){let t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){let t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new ue([...this.color.map(sO(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new ue([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:re("rgb",0,ae(255)),green:re("rgb",1,ae(255)),blue:re("rgb",2,ae(255)),hue:re(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:re("hsl",1,ae(100)),lightness:re("hsl",2,ae(100)),saturationv:re("hsv",1,ae(100)),value:re("hsv",2,ae(100)),chroma:re("hcg",1,ae(100)),gray:re("hcg",2,ae(100)),white:re("hwb",1,ae(100)),wblack:re("hwb",2,ae(100)),cyan:re("cmyk",0,ae(100)),magenta:re("cmyk",1,ae(100)),yellow:re("cmyk",2,ae(100)),black:re("cmyk",3,ae(100)),x:re("xyz",0,ae(95.047)),y:re("xyz",1,ae(100)),z:re("xyz",2,ae(108.833)),l:re("lab",0,ae(100)),a:re("lab",1),b:re("lab",2),keyword(t){return t!==void 0?new ue(t):fe[this.model].keyword(this.color)},hex(t){return t!==void 0?new ue(t):le.to.hex(...this.rgb().round().color)},hexa(t){if(t!==void 0)return new ue(t);let e=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),le.to.hex(...e)+r},rgbNumber(){let t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){let t=this.rgb().color,e=[];for(let[r,n]of t.entries()){let i=n/255;e[r]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){let e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level(t){let e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){let t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){let e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){let e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){let e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){let e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){let e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){let e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){let t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return ue.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){let e=this.hsl(),r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);let r=t.rgb(),n=this.rgb(),i=e===void 0?.5:e,o=2*i-1,s=r.alpha()-n.alpha(),a=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,u=1-a;return ue.rgb(a*r.red()+u*n.red(),a*r.green()+u*n.green(),a*r.blue()+u*n.blue(),r.alpha()*i+n.alpha()*(1-i))}};for(let t of Object.keys(fe)){if(Tm.includes(t))continue;let{channels:e}=fe[t];ue.prototype[t]=function(...r){return this.model===t?new ue(this):r.length>0?new ue(r,t):new ue([...aO(fe[this.model][t].raw(this.color)),this.valpha],t)},ue[t]=function(...r){let n=r[0];return typeof n=="number"&&(n=ra(r,e)),new ue(n,t)}}function oO(t,e){return Number(t.toFixed(e))}function sO(t){return function(e){return oO(e,t)}}function re(t,e,r){t=Array.isArray(t)?t:[t];for(let n of t)(ta[n]||=[])[e]=r;return t=t[0],function(n){let i;return n!==void 0?(r&&(n=r(n)),i=this[t](),i.color[e]=n,i):(i=this[t]().color[e],r&&(i=r(i)),i)}}function ae(t){return function(e){return Math.max(0,Math.min(t,e))}}function aO(t){return Array.isArray(t)?t:[t]}function ra(t,e){for(let r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}function uO(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var lO=function(e){for(var r=0,n=0;r<e.length;n=e.charCodeAt(r++)+((n<<5)-n));var i=Math.floor(Math.abs(Math.sin(n)*1e4%1*16777216)).toString(16);return"#"+Array(6-i.length+1).join("0")+i},vm=uO(lO);function fO(t,e){let r=t.split(e||":"),n=vm(r[0]);if(!r.length)return n;for(let i=0,o=r.length-1;i<o;i++)n=ue(n).mix(ue(vm(r[i+1]))).saturate(1).hex();return n}Om.exports=fO});var Pm=S((IM,xm)=>{"use strict";function Oe(t,e){if(e)return new Oe(t).style(e);if(!(this instanceof Oe))return new Oe(t);this.text=t}Oe.prototype.prefix="\x1B[";Oe.prototype.suffix="m";Oe.prototype.hex=function(e){e=e[0]==="#"?e.substring(1):e,e.length===3&&(e=e.split(""),e[5]=e[2],e[4]=e[2],e[3]=e[1],e[2]=e[1],e[1]=e[0],e=e.join(""));var r=e.substring(0,2),n=e.substring(2,4),i=e.substring(4,6);return[parseInt(r,16),parseInt(n,16),parseInt(i,16)]};Oe.prototype.rgb=function(e,r,n){var i=e/255*5,o=r/255*5,s=n/255*5;return this.ansi(i,o,s)};Oe.prototype.ansi=function(e,r,n){var i=Math.round(e),o=Math.round(r),s=Math.round(n);return 16+i*36+o*6+s};Oe.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};Oe.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};xm.exports=Oe});var Nm=S((LM,Mm)=>{"use strict";var cO=Dm(),hO=Pm();Mm.exports=function(e,r){var n=r.namespace,i=r.colors!==!1?hO(n+":",cO(n)):n+":";return e[0]=i+" "+e[0],e}});var Im=S((AM,Rm)=>{"use strict";Rm.exports=function(e,r){if(!r)return!1;for(var n=r.split(/[\s,]+/),i=0;i<n.length;i++){if(r=n[i].replace("*",".*?"),r.charAt(0)==="-"){if(new RegExp("^"+r.substr(1)+"$").test(e))return!1;continue}if(new RegExp("^"+r+"$").test(e))return!0}return!1}});var Am=S((CM,Lm)=>{"use strict";var dO=Im();Lm.exports=function(e){return function(n){try{return dO(n,e())}catch{}return!1}}});var qm=S((qM,Cm)=>{"use strict";var pO=Am();Cm.exports=pO(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var Fm=S((jM,jm)=>{"use strict";jm.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e)}catch{}}});var Bm=S((FM,km)=>{"use strict";var mO=Zs(),gO=$("tty").isatty(1),Ai=mO(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:gO,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});Ai.modify(Nm());Ai.use(qm());Ai.set(Fm());km.exports=Ai});var Ur=S((kM,na)=>{"use strict";process.env.NODE_ENV==="production"?na.exports=_m():na.exports=Bm()});var Um=S((BM,$m)=>{"use strict";var ia=$("fs"),{StringDecoder:yO}=$("string_decoder"),{Stream:bO}=Tt();function wO(){}$m.exports=(t,e)=>{let r=Buffer.alloc(65536),n=new yO("utf8"),i=new bO,o="",s=0,a=0;return t.start===-1&&delete t.start,i.readable=!0,i.destroy=()=>{i.destroyed=!0,i.emit("end"),i.emit("close")},ia.open(t.file,"a+","0644",(u,d)=>{if(u){e?e(u):i.emit("error",u),i.destroy();return}(function w(){if(i.destroyed){ia.close(d,wO);return}return ia.read(d,r,0,r.length,s,(E,y)=>{if(E){e?e(E):i.emit("error",E),i.destroy();return}if(!y)return o&&((t.start==null||a>t.start)&&(e?e(null,o):i.emit("line",o)),a++,o=""),setTimeout(w,1e3);let g=n.write(r.slice(0,y));e||i.emit("data",g),g=(o+g).split(/\n+/);let h=g.length-1,v=0;for(;v<h;v++)(t.start==null||a>t.start)&&(e?e(null,g[v]):i.emit("line",g[v])),a++;return o=g[h],s+=y,w()})})()}),e?i.destroy:i}});var Xm=S((UM,Wm)=>{"use strict";var we=$("fs"),ce=$("path"),Vm=_p(),_O=$("zlib"),{MESSAGE:vO}=ie(),{Stream:EO,PassThrough:Hm}=Tt(),SO=Vt(),De=Ur()("winston:file"),TO=$("os"),OO=Um();Wm.exports=class extends SO{constructor(e={}){super(e),this.name=e.name||"file";function r(n,...i){i.slice(1).forEach(o=>{if(e[o])throw new Error(`Cannot set ${o} and ${n} together`)})}if(this._stream=new Hm,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),e.filename||e.dirname)r("filename or dirname","stream"),this._basename=this.filename=e.filename?ce.basename(e.filename):"winston.log",this.dirname=e.dirname||ce.dirname(e.filename),this.options=e.options||{flags:"a"};else if(e.stream)console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),r("stream","filename","maxsize"),this._dest=this._stream.pipe(this._setupStream(e.stream)),this.dirname=ce.dirname(this._dest.path);else throw new Error("Cannot log to file without filename or stream.");this.maxsize=e.maxsize||null,this.rotationFormat=e.rotationFormat||!1,this.zippedArchive=e.zippedArchive||!1,this.maxFiles=e.maxFiles||null,this.eol=typeof e.eol=="string"?e.eol:TO.EOL,this.tailable=e.tailable||!1,this.lazy=e.lazy||!1,this._size=0,this._pendingSize=0,this._created=0,this._drain=!1,this._opening=!1,this._ending=!1,this._fileExist=!1,this.dirname&&this._createLogDirIfNotExist(this.dirname),this.lazy||this.open()}finishIfEnding(){this._ending&&(this._opening?this.once("open",()=>{this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())}):(this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())))}log(e,r=()=>{}){if(this.silent)return r(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(e,r)});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(e,r)});return}if(this.lazy){if(!this._fileExist){this._opening||this.open(),this.once("open",()=>{this._fileExist=!0,this.log(e,r)});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{this._opening||this.open(),this.once("open",()=>{this.log(e,r)})});return}}let n=`${e[vO]}${this.eol}`,i=Buffer.byteLength(n);function o(){if(this._size+=i,this._pendingSize-=i,De("logged %s %s",this._size,n),this.emit("logged",e),!this._rotate&&!this._opening&&this._needsNewFile()){if(this.lazy){this._endStream(()=>{this.emit("fileclosed")});return}this._rotate=!0,this._endStream(()=>this._rotateFile())}}this._pendingSize+=i,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);let s=this._stream.write(n,o.bind(this));return s?r():(this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r()})),De("written",s,this._drain),this.finishIfEnding(),s}query(e,r){typeof e=="function"&&(r=e,e={}),e=E(e);let n=ce.join(this.dirname,this.filename),i="",o=[],s=0,a=we.createReadStream(n,{encoding:"utf8"});a.on("error",y=>{if(a.readable&&a.destroy(),!!r)return y.code!=="ENOENT"?r(y):r(null,o)}),a.on("data",y=>{y=(i+y).split(/\n+/);let g=y.length-1,h=0;for(;h<g;h++)(!e.start||s>=e.start)&&u(y[h]),s++;i=y[g]}),a.on("close",()=>{i&&u(i,!0),e.order==="desc"&&(o=o.reverse()),r&&r(null,o)});function u(y,g){try{let h=JSON.parse(y);w(h)&&d(h)}catch(h){g||a.emit("error",h)}}function d(y){if(e.rows&&o.length>=e.rows&&e.order!=="desc"){a.readable&&a.destroy();return}e.fields&&(y=e.fields.reduce((g,h)=>(g[h]=y[h],g),{})),e.order==="desc"&&o.length>=e.rows&&o.shift(),o.push(y)}function w(y){if(!y||typeof y!="object")return;let g=new Date(y.timestamp);if(!(e.from&&g<e.from||e.until&&g>e.until||e.level&&e.level!==y.level))return!0}function E(y){return y=y||{},y.rows=y.rows||y.limit||10,y.start=y.start||0,y.until=y.until||new Date,typeof y.until!="object"&&(y.until=new Date(y.until)),y.from=y.from||y.until-1440*60*1e3,typeof y.from!="object"&&(y.from=new Date(y.from)),y.order=y.order||"desc",y}}stream(e={}){let r=ce.join(this.dirname,this.filename),n=new EO,i={file:r,start:e.start};return n.destroy=OO(i,(o,s)=>{if(o)return n.emit("error",o);try{n.emit("data",s),s=JSON.parse(s),n.emit("log",s)}catch(a){n.emit("error",a)}}),n}open(){this.filename&&(this._opening||(this._opening=!0,this.stat((e,r)=>{if(e)return this.emit("error",e);De("stat done: %s { size: %s }",this.filename,r),this._size=r,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",()=>{this._stream.emit("rotate")||(this._rotate=!1)})})))}stat(e){let r=this._getFile(),n=ce.join(this.dirname,r);we.stat(n,(i,o)=>{if(i&&i.code==="ENOENT")return De("ENOENT\xA0ok",n),this.filename=r,e(null,0);if(i)return De(`err ${i.code} ${n}`),e(i);if(!o||this._needsNewFile(o.size))return this._incFile(()=>this.stat(e));this.filename=r,e(null,o.size)})}close(e){this._stream&&this._stream.end(()=>{e&&e(),this.emit("flush"),this.emit("closed")})}_needsNewFile(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}_onError(e){this.emit("error",e)}_setupStream(e){return e.on("error",this._onError),e}_cleanupStream(e){return e.removeListener("error",this._onError),e.destroy(),e}_rotateFile(){this._incFile(()=>this.open())}_endStream(e=()=>{}){this._dest?(this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),e()})):e()}_createStream(e){let r=ce.join(this.dirname,this.filename);De("create stream start",r,this.options);let n=we.createWriteStream(r,this.options).on("error",i=>De(i)).on("close",()=>De("close",n.path,n.bytesWritten)).on("open",()=>{De("file open ok",r),this.emit("open",r),e.pipe(n),this.rotatedWhileOpening&&(this._stream=new Hm,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(n),e.end())});return De("create stream ok",r),n}_incFile(e){De("_incFile",this.filename);let r=ce.extname(this._basename),n=ce.basename(this._basename,r),i=[];this.zippedArchive&&i.push(function(o){let s=this._created>0&&!this.tailable?this._created:"";this._compressFile(ce.join(this.dirname,`${n}${s}${r}`),ce.join(this.dirname,`${n}${s}${r}.gz`),o)}.bind(this)),i.push(function(o){this.tailable?this._checkMaxFilesTailable(r,n,o):(this._created+=1,this._checkMaxFilesIncrementing(r,n,o))}.bind(this)),Vm(i,e)}_getFile(){let e=ce.extname(this._basename),r=ce.basename(this._basename,e),n=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${r}${n}${e}`:`${r}${e}`}_checkMaxFilesIncrementing(e,r,n){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(n);let i=this._created-this.maxFiles,o=i!==0?i:"",s=this.zippedArchive?".gz":"",a=`${r}${o}${e}${s}`,u=ce.join(this.dirname,a);we.unlink(u,n)}_checkMaxFilesTailable(e,r,n){let i=[];if(!this.maxFiles)return;let o=this.zippedArchive?".gz":"";for(let s=this.maxFiles-1;s>1;s--)i.push(function(a,u){let d=`${r}${a-1}${e}${o}`,w=ce.join(this.dirname,d);we.exists(w,E=>{if(!E)return u(null);d=`${r}${a}${e}${o}`,we.rename(w,ce.join(this.dirname,d),u)})}.bind(this,s));Vm(i,()=>{we.rename(ce.join(this.dirname,`${r}${e}${o}`),ce.join(this.dirname,`${r}1${e}${o}`),n)})}_compressFile(e,r,n){we.access(e,we.F_OK,i=>{if(i)return n();var o=_O.createGzip(),s=we.createReadStream(e),a=we.createWriteStream(r);a.on("finish",()=>{we.unlink(e,n)}),s.pipe(o).pipe(a)})}_createLogDirIfNotExist(e){we.existsSync(e)||we.mkdirSync(e,{recursive:!0})}}});var Km=S((HM,Gm)=>{"use strict";var DO=$("http"),xO=$("https"),{Stream:PO}=Tt(),MO=Vt(),{configure:NO}=wr();Gm.exports=class extends MO{constructor(e={}){super(e),this.options=e,this.name=e.name||"http",this.ssl=!!e.ssl,this.host=e.host||"localhost",this.port=e.port,this.auth=e.auth,this.path=e.path||"",this.maximumDepth=e.maximumDepth,this.agent=e.agent,this.headers=e.headers||{},this.headers["content-type"]="application/json",this.batch=e.batch||!1,this.batchInterval=e.batchInterval||5e3,this.batchCount=e.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},this.port||(this.port=this.ssl?443:80)}log(e,r){this._request(e,null,null,(n,i)=>{i&&i.statusCode!==200&&(n=new Error(`Invalid HTTP Status Code: ${i.statusCode}`)),n?this.emit("warn",n):this.emit("logged",e)}),r&&setImmediate(r)}query(e,r){typeof e=="function"&&(r=e,e={}),e={method:"query",params:this.normalizeQuery(e)};let n=e.params.auth||null;delete e.params.auth;let i=e.params.path||null;delete e.params.path,this._request(e,n,i,(o,s,a)=>{if(s&&s.statusCode!==200&&(o=new Error(`Invalid HTTP Status Code: ${s.statusCode}`)),o)return r(o);if(typeof a=="string")try{a=JSON.parse(a)}catch(u){return r(u)}r(null,a)})}stream(e={}){let r=new PO;e={method:"stream",params:e};let n=e.params.path||null;delete e.params.path;let i=e.params.auth||null;delete e.params.auth;let o="",s=this._request(e,i,n);return r.destroy=()=>s.destroy(),s.on("data",a=>{a=(o+a).split(/\n+/);let u=a.length-1,d=0;for(;d<u;d++)try{r.emit("log",JSON.parse(a[d]))}catch(w){r.emit("error",w)}o=a[u]}),s.on("error",a=>r.emit("error",a)),r}_request(e,r,n,i){e=e||{},r=r||this.auth,n=n||this.path||"",this.batch?this._doBatch(e,i,r,n):this._doRequest(e,i,r,n)}_doBatch(e,r,n,i){if(this.batchOptions.push(e),this.batchOptions.length===1){let o=this;this.batchCallback=r,this.batchTimeoutID=setTimeout(function(){o.batchTimeoutID=-1,o._doBatchRequest(o.batchCallback,n,i)},this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,n,i)}_doBatchRequest(e,r,n){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);let i=this.batchOptions.slice();this.batchOptions=[],this._doRequest(i,e,r,n)}_doRequest(e,r,n,i){let o=Object.assign({},this.headers);n&&n.bearer&&(o.Authorization=`Bearer ${n.bearer}`);let s=(this.ssl?xO:DO).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${i.replace(/^\//,"")}`,headers:o,auth:n&&n.username&&n.password?`${n.username}:${n.password}`:"",agent:this.agent});s.on("error",r),s.on("response",u=>u.on("end",()=>r(null,u)).resume());let a=NO({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});s.end(Buffer.from(a(e,this.options.replacer),"utf8"))}}});var oa=S((WM,Ym)=>{"use strict";var Le=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";Le.writable=t=>Le(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";Le.readable=t=>Le(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";Le.duplex=t=>Le.writable(t)&&Le.readable(t);Le.transform=t=>Le.duplex(t)&&typeof t._transform=="function";Ym.exports=Le});var Jm=S((GM,zm)=>{"use strict";var RO=oa(),{MESSAGE:IO}=ie(),LO=$("os"),AO=Vt();zm.exports=class extends AO{constructor(e={}){if(super(e),!e.stream||!RO(e.stream))throw new Error("options.stream is required.");this._stream=e.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=e.stream._writableState.objectMode,this.eol=typeof e.eol=="string"?e.eol:LO.EOL}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[IO]}${this.eol}`),r&&r()}}});var Qm=S(Vr=>{"use strict";Object.defineProperty(Vr,"Console",{configurable:!0,enumerable:!0,get(){return Fd()}});Object.defineProperty(Vr,"File",{configurable:!0,enumerable:!0,get(){return Xm()}});Object.defineProperty(Vr,"Http",{configurable:!0,enumerable:!0,get(){return Km()}});Object.defineProperty(Vr,"Stream",{configurable:!0,enumerable:!0,get(){return Jm()}})});var qi=S(Hr=>{"use strict";var Ci=Bo(),{configs:sa}=ie();Hr.cli=Ci.levels(sa.cli);Hr.npm=Ci.levels(sa.npm);Hr.syslog=Ci.levels(sa.syslog);Hr.addColors=Ci.levels});var eg=S((ji,Zm)=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});var CO=ni(),qO=Ot(CO),jO=di(),FO=Ot(jO),kO=Ss(),BO=Ot(kO),$O=_s(),UO=Ot($O),VO=vs(),HO=Ot(VO),WO=wt(),XO=Ot(WO),GO=Wt(),KO=Ot(GO);function Ot(t){return t&&t.__esModule?t:{default:t}}function YO(t,e,r){r=(0,UO.default)(r);var n=0,i=0,{length:o}=t,s=!1;o===0&&r(null);function a(u,d){u===!1&&(s=!0),s!==!0&&(u?r(u):(++i===o||d===FO.default)&&r(null))}for(;n<o;n++)e(t[n],n,(0,HO.default)(a))}function zO(t,e,r){return(0,BO.default)(t,1/0,e,r)}function JO(t,e,r){var n=(0,qO.default)(t)?YO:zO;return n(t,(0,XO.default)(e),r)}ji.default=(0,KO.default)(JO,3);Zm.exports=ji.default});var rg=S((Fi,tg)=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.default=QO;function QO(t){return(e,r,n)=>t(e,n)}tg.exports=Fi.default});var $i=S((Bi,ng)=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});var ZO=eg(),e2=ki(ZO),t2=rg(),r2=ki(t2),n2=wt(),i2=ki(n2),o2=Wt(),s2=ki(o2);function ki(t){return t&&t.__esModule?t:{default:t}}function a2(t,e,r){return(0,e2.default)(t,(0,r2.default)((0,i2.default)(e)),r)}Bi.default=(0,s2.default)(a2,3);ng.exports=Bi.default});var og=S((zM,ig)=>{"use strict";var u2=Object.prototype.toString;ig.exports=function(e){if(typeof e.displayName=="string"&&e.constructor.name)return e.displayName;if(typeof e.name=="string"&&e.name)return e.name;if(typeof e=="object"&&e.constructor&&typeof e.constructor.name=="string")return e.constructor.name;var r=e.toString(),n=u2.call(e).slice(8,-1);return n==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=n,r||"anonymous"}});var aa=S((JM,sg)=>{"use strict";var l2=og();sg.exports=function(e){var r=0,n;function i(){return r||(r=1,n=e.apply(this,arguments),e=null),n}return i.displayName=l2(e),i}});var ua=S(Xr=>{"use strict";Xr.get=function(t){var e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},n=Error.prepareStackTrace;Error.prepareStackTrace=function(o,s){return s},Error.captureStackTrace(r,t||Xr.get);var i=r.stack;return Error.prepareStackTrace=n,Error.stackTraceLimit=e,i};Xr.parse=function(t){if(!t.stack)return[];var e=this,r=t.stack.split(`
|
|
44
|
+
`).slice(1);return r.map(function(n){if(n.match(/^\s*[-]{4,}$/))return e._createParsedCallSite({fileName:n,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var i=n.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(i){var o=null,s=null,a=null,u=null,d=null,w=i[5]==="native";if(i[1]){a=i[1];var E=a.lastIndexOf(".");if(a[E-1]=="."&&E--,E>0){o=a.substr(0,E),s=a.substr(E+1);var y=o.indexOf(".Module");y>0&&(a=a.substr(y+1),o=o.substr(0,y))}u=null}s&&(u=o,d=s),s==="<anonymous>"&&(d=null,a=null);var g={fileName:i[2]||null,lineNumber:parseInt(i[3],10)||null,functionName:a,typeName:u,methodName:d,columnNumber:parseInt(i[4],10)||null,native:w};return e._createParsedCallSite(g)}}).filter(function(n){return!!n})};function Wr(t){for(var e in t)this[e]=t[e]}var f2=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],c2=["topLevel","eval","native","constructor"];f2.forEach(function(t){Wr.prototype[t]=null,Wr.prototype["get"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});c2.forEach(function(t){Wr.prototype[t]=!1,Wr.prototype["is"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});Xr._createParsedCallSite=function(t){return new Wr(t)}});var ug=S((eN,ag)=>{"use strict";var{Writable:h2}=Tt();ag.exports=class extends h2{constructor(e){if(super({objectMode:!0}),!e)throw new Error("ExceptionStream requires a TransportStream instance.");this.handleExceptions=!0,this.transport=e}_write(e,r,n){return e.exception?this.transport.log(e,n):(n(),!0)}}});var fa=S((rN,cg)=>{"use strict";var lg=$("os"),d2=$i(),la=Ur()("winston:exception"),p2=aa(),fg=ua(),m2=ug();cg.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle exceptions");this.logger=e,this.handlers=new Map}handle(...e){e.forEach(r=>{if(Array.isArray(r))return r.forEach(n=>this._addHandler(n));this._addHandler(r)}),this.catcher||(this.catcher=this._uncaughtException.bind(this),process.on("uncaughtException",this.catcher))}unhandle(){this.catcher&&(process.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(e=>this.logger.unpipe(e)))}getAllInfo(e){let r=null;return e&&(r=typeof e=="string"?e:e.message),{error:e,level:"error",message:[`uncaughtException: ${r||"(no error message)"}`,e&&e.stack||" No stack trace"].join(`
|
|
45
|
+
`),stack:e&&e.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:lg.loadavg(),uptime:lg.uptime()}}getTrace(e){return(e?fg.parse(e):fg.get()).map(n=>({column:n.getColumnNumber(),file:n.getFileName(),function:n.getFunctionName(),line:n.getLineNumber(),method:n.getMethodName(),native:n.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleExceptions=!0;let r=new m2(e);this.handlers.set(e,r),this.logger.pipe(r)}}_uncaughtException(e){let r=this.getAllInfo(e),n=this._getExceptionHandlers(),i=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,o;!n.length&&i&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),i=!1);function s(){la("doExit",i),la("process._exiting",process._exiting),i&&!process._exiting&&(o&&clearTimeout(o),process.exit(1))}if(!n||n.length===0)return process.nextTick(s);d2(n,(a,u)=>{let d=p2(u),w=a.transport||a;function E(y){return()=>{la(y),d()}}w._ending=!0,w.once("finish",E("finished")),w.once("error",E("error"))},()=>i&&s()),this.logger.log(r),i&&(o=setTimeout(s,3e3))}_getExceptionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleExceptions)}}});var dg=S((iN,hg)=>{"use strict";var{Writable:g2}=Tt();hg.exports=class extends g2{constructor(e){if(super({objectMode:!0}),!e)throw new Error("RejectionStream requires a TransportStream instance.");this.handleRejections=!0,this.transport=e}_write(e,r,n){return e.rejection?this.transport.log(e,n):(n(),!0)}}});var ha=S((sN,gg)=>{"use strict";var pg=$("os"),y2=$i(),ca=Ur()("winston:rejection"),b2=aa(),mg=ua(),w2=dg();gg.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle rejections");this.logger=e,this.handlers=new Map}handle(...e){e.forEach(r=>{if(Array.isArray(r))return r.forEach(n=>this._addHandler(n));this._addHandler(r)}),this.catcher||(this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher))}unhandle(){this.catcher&&(process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(e=>this.logger.unpipe(e)))}getAllInfo(e){let r=null;return e&&(r=typeof e=="string"?e:e.message),{error:e,level:"error",message:[`unhandledRejection: ${r||"(no error message)"}`,e&&e.stack||" No stack trace"].join(`
|
|
46
|
+
`),stack:e&&e.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:pg.loadavg(),uptime:pg.uptime()}}getTrace(e){return(e?mg.parse(e):mg.get()).map(n=>({column:n.getColumnNumber(),file:n.getFileName(),function:n.getFunctionName(),line:n.getLineNumber(),method:n.getMethodName(),native:n.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleRejections=!0;let r=new w2(e);this.handlers.set(e,r),this.logger.pipe(r)}}_unhandledRejection(e){let r=this.getAllInfo(e),n=this._getRejectionHandlers(),i=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,o;!n.length&&i&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),i=!1);function s(){ca("doExit",i),ca("process._exiting",process._exiting),i&&!process._exiting&&(o&&clearTimeout(o),process.exit(1))}if(!n||n.length===0)return process.nextTick(s);y2(n,(a,u)=>{let d=b2(u),w=a.transport||a;function E(y){return()=>{ca(y),d()}}w._ending=!0,w.once("finish",E("finished")),w.once("error",E("error"))},()=>i&&s()),this.logger.log(r),i&&(o=setTimeout(s,3e3))}_getRejectionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleRejections)}}});var bg=S((aN,yg)=>{"use strict";var da=class{constructor(e){let r=Ui();if(typeof e!="object"||Array.isArray(e)||!(e instanceof r))throw new Error("Logger is required for profiling");this.logger=e,this.start=Date.now()}done(...e){typeof e[e.length-1]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),e.pop());let r=typeof e[e.length-1]=="object"?e.pop():{};return r.level=r.level||"info",r.durationMs=Date.now()-this.start,this.logger.write(r)}};yg.exports=da});var Ui=S((uN,Eg)=>{"use strict";var{Stream:_2,Transform:v2}=Tt(),wg=$i(),{LEVEL:Ae,SPLAT:_g}=ie(),vg=oa(),E2=fa(),S2=ha(),T2=ys(),O2=bg(),{warn:D2}=$o(),x2=qi(),P2=/%[scdjifoO%]/g,Vi=class extends v2{constructor(e){super({objectMode:!0}),this.configure(e)}child(e){let r=this;return Object.create(r,{write:{value:function(n){let i=Object.assign({},e,n);n instanceof Error&&(i.stack=n.stack,i.message=n.message),r.write(i)}}})}configure({silent:e,format:r,defaultMeta:n,levels:i,level:o="info",exitOnError:s=!0,transports:a,colors:u,emitErrs:d,formatters:w,padLevels:E,rewriters:y,stripColors:g,exceptionHandlers:h,rejectionHandlers:v}={}){if(this.transports.length&&this.clear(),this.silent=e,this.format=r||this.format||Co()(),this.defaultMeta=n||null,this.levels=i||this.levels||x2.npm.levels,this.level=o,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new E2(this),this.rejections=new S2(this),this.profilers={},this.exitOnError=s,a&&(a=Array.isArray(a)?a:[a],a.forEach(I=>this.add(I))),u||d||w||E||y||g)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
47
|
+
`));h&&this.exceptions.handle(h),v&&this.rejections.handle(v)}getHighestLogLevel(){let e=Gr(this.levels,this.level);return!this.transports||this.transports.length===0?e:this.transports.reduce((r,n)=>{let i=Gr(this.levels,n.level);return i!==null&&i>r?i:r},e)}isLevelEnabled(e){let r=Gr(this.levels,e);if(r===null)return!1;let n=Gr(this.levels,this.level);return n===null?!1:!this.transports||this.transports.length===0?n>=r:this.transports.findIndex(o=>{let s=Gr(this.levels,o.level);return s===null&&(s=n),s>=r})!==-1}log(e,r,...n){if(arguments.length===1)return e[Ae]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[Ae]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[Ae]:e,level:e,message:r},this._addDefaultMeta(r),this.write(r),this);let[i]=n;if(typeof i=="object"&&i!==null&&!(r&&r.match&&r.match(P2))){let s=Object.assign({},this.defaultMeta,i,{[Ae]:e,[_g]:n,level:e,message:r});return i.message&&(s.message=`${s.message} ${i.message}`),i.stack&&(s.stack=i.stack),i.cause&&(s.cause=i.cause),this.write(s),this}return this.write(Object.assign({},this.defaultMeta,{[Ae]:e,[_g]:n,level:e,message:r})),this}_transform(e,r,n){if(this.silent)return n();e[Ae]||(e[Ae]=e.level),!this.levels[e[Ae]]&&this.levels[e[Ae]]!==0&&console.error("[winston] Unknown logger level: %s",e[Ae]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,n()}}_final(e){let r=this.transports.slice();wg(r,(n,i)=>{if(!n||n.finished)return setImmediate(i);n.once("finish",i),n.end()},e)}add(e){let r=!vg(e)||e.log.length>2?new T2({transport:e}):e;if(!r._writableState||!r._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",r),this._onEvent("warn",r),this.pipe(r),e.handleExceptions&&this.exceptions.handle(),e.handleRejections&&this.rejections.handle(),this}remove(e){if(!e)return this;let r=e;return(!vg(e)||e.log.length>2)&&(r=this.transports.filter(n=>n.transport===e)[0]),r&&this.unpipe(r),this}clear(){return this.unpipe(),this}close(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}setLevels(){D2.deprecated("setLevels")}query(e,r){typeof e=="function"&&(r=e,e={}),e=e||{};let n={},i=Object.assign({},e.query||{});function o(a,u){e.query&&typeof a.formatQuery=="function"&&(e.query=a.formatQuery(i)),a.query(e,(d,w)=>{if(d)return u(d);typeof a.formatResults=="function"&&(w=a.formatResults(w,e.format)),u(null,w)})}function s(a,u){o(a,(d,w)=>{u&&(w=d||w,w&&(n[a.name]=w),u()),u=null})}wg(this.transports.filter(a=>!!a.query),s,()=>r(null,n))}stream(e={}){let r=new _2,n=[];return r._streams=n,r.destroy=()=>{let i=n.length;for(;i--;)n[i].destroy()},this.transports.filter(i=>!!i.stream).forEach(i=>{let o=i.stream(e);o&&(n.push(o),o.on("log",s=>{s.transport=s.transport||[],s.transport.push(i.name),r.emit("log",s)}),o.on("error",s=>{s.transport=s.transport||[],s.transport.push(i.name),r.emit("error",s)}))}),r}startTimer(){return new O2(this)}profile(e,...r){let n=Date.now();if(this.profilers[e]){let i=this.profilers[e];delete this.profilers[e],typeof r[r.length-2]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),r.pop());let o=typeof r[r.length-1]=="object"?r.pop():{};return o.level=o.level||"info",o.durationMs=n-i,o.message=o.message||e,this.write(o)}return this.profilers[e]=n,this}handleExceptions(...e){console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),this.exceptions.handle(...e)}unhandleExceptions(...e){console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),this.exceptions.unhandle(...e)}cli(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
48
|
+
`))}_onEvent(e,r){function n(i){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,i,r)}r["__winston"+e]||(r["__winston"+e]=n.bind(this),r.on(e,r["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function Gr(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(Vi.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});Eg.exports=Vi});var pa=S((lN,Sg)=>{"use strict";var{LEVEL:M2}=ie(),N2=qi(),R2=Ui(),I2=Ur()("winston:create-logger");function L2(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}Sg.exports=function(t={}){t.levels=t.levels||N2.npm.levels;class e extends R2{constructor(i){super(i)}}let r=new e(t);return Object.keys(t.levels).forEach(function(n){if(I2('Define prototype method for "%s"',n),n==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[n]=function(...i){let o=this||r;if(i.length===1){let[s]=i,a=s&&s.message&&s||{message:s};return a.level=a[M2]=n,o._addDefaultMeta(a),o.write(a),this||r}return i.length===0?(o.log(n,""),o):o.log(n,...i)},e.prototype[L2(n)]=function(){return(this||r).isLevelEnabled(n)}}),r}});var Og=S((cN,Tg)=>{"use strict";var A2=pa();Tg.exports=class{constructor(e={}){this.loggers=new Map,this.options=e}add(e,r){if(!this.loggers.has(e)){r=Object.assign({},r||this.options);let n=r.transports||this.options.transports;n?r.transports=Array.isArray(n)?n.slice():[n]:r.transports=[];let i=A2(r);i.on("close",()=>this._delete(e)),this.loggers.set(e,i)}return this.loggers.get(e)}get(e,r){return this.add(e,r)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach((r,n)=>this._removeLogger(n))}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e)}_delete(e){this.loggers.delete(e)}}});var xg=S(Y=>{"use strict";var Dg=Bo(),{warn:Kr}=$o();Y.version=Ch().version;Y.transports=Qm();Y.config=qi();Y.addColors=Dg.levels;Y.format=Dg.format;Y.createLogger=pa();Y.Logger=Ui();Y.ExceptionHandler=fa();Y.RejectionHandler=ha();Y.Container=Og();Y.Transport=Vt();Y.loggers=new Y.Container;var Ce=Y.createLogger();Object.keys(Y.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>Y[t]=(...e)=>Ce[t](...e));Object.defineProperty(Y,"level",{get(){return Ce.level},set(t){Ce.level=t}});Object.defineProperty(Y,"exceptions",{get(){return Ce.exceptions}});Object.defineProperty(Y,"rejections",{get(){return Ce.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(Y,t,{get(){return Ce[t]},set(e){Ce[t]=e}})});Object.defineProperty(Y,"default",{get(){return{exceptionHandlers:Ce.exceptionHandlers,rejectionHandlers:Ce.rejectionHandlers,transports:Ce.transports}}});Kr.deprecated(Y,"setLevels");Kr.forFunctions(Y,"useFormat",["cli"]);Kr.forProperties(Y,"useFormat",["padLevels","stripColors"]);Kr.forFunctions(Y,"deprecated",["addRewriter","addFilter","clone","extend"]);Kr.forProperties(Y,"deprecated",["emitErrs","levelLength"])});import*as lt from"node:process";var en=class{constructor(e,r){this.#e="connector-runtime";this.init=()=>Promise.resolve();this.start=()=>Promise.resolve();this.stop=()=>Promise.resolve();this.#t=r,lt.on?lt.on("message",n=>{n.cmd===this.#e&&r.logger.verbose(`${lt.pid} Received message from parent process:`,n)}):r.logger.warn("IPC channel is not available. process.on is undefined."),lt.send||r.logger.warn("IPC channel is not available. process.send is undefined."),e.actions?.forEach(n=>{if(n.config.templates===void 0)return;let i={};Object.entries(n.config.templates).forEach(([o,s])=>{try{i[o]=r.templating.compile(s)}catch(a){r.logger.error(`Error compiling template ${o} for action ${n.identifier}`,a)}}),n.config.parsedTemplates=i})}#e;#t;set callbackFunction(e){this.connectorSDK.receiver.registerCallback(this.#r(e))}get connectorSDK(){return this.#t}#r(e){return async r=>{let n=await this.#t.receiver.getActionConfig(r);return n?e(r,n):this.#t.receiver.responses.badRequest("Action not found")(r)}}};var xe=class{info(){}debug(){}error(){}warn(){}verbose(){}};import Ug from"node:events";var tr=class{static{this.TYPE="file.delete"}#e;#t;constructor(e,r=new xe){this.#e=e,this.#t=r}async execute(e){let{remotePath:r}=e;if(!r)throw new Error("Missing required parameter: remotePath");this.#t.debug(`Deleting file at ${r}`);try{await this.#e.delete(r)}catch(n){throw this.#t.error(`Error deleting file at ${r}: ${n instanceof Error?n.message:"Unknown error"}`),n}}};import kg from"crypto";var rn=new Uint8Array(256),tn=rn.length;function Wi(){return tn>rn.length-16&&(kg.randomFillSync(rn),tn=0),rn.slice(tn,tn+=16)}var he=[];for(let t=0;t<256;++t)he.push((t+256).toString(16).slice(1));function ya(t,e=0){return he[t[e+0]]+he[t[e+1]]+he[t[e+2]]+he[t[e+3]]+"-"+he[t[e+4]]+he[t[e+5]]+"-"+he[t[e+6]]+he[t[e+7]]+"-"+he[t[e+8]]+he[t[e+9]]+"-"+he[t[e+10]]+he[t[e+11]]+he[t[e+12]]+he[t[e+13]]+he[t[e+14]]+he[t[e+15]]}import Bg from"crypto";var Xi={randomUUID:Bg.randomUUID};function $g(t,e,r){if(Xi.randomUUID&&!e&&!t)return Xi.randomUUID();t=t||{};let n=t.random||(t.rng||Wi)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let i=0;i<16;++i)e[r+i]=n[i];return e}return ya(n)}var Gi=$g;var rr=class{static{this.TYPE="file.download"}#e;#t;#r;constructor(e,r,n=new xe){this.#e=e,this.#t=r,this.#r=n}async execute(e){let{remotePath:r}=e;if(!r)throw new Error("Missing required parameter: remotePath");let n=`downloaded-${Gi()}`;this.#r.debug(`Reading file from ${r} and writing to ${n}`);let i;try{i=await this.#e.read(r),await this.#t.write(n,i)}catch(o){throw this.#r.error(`Error reading file from ${r}: ${o instanceof Error?o.message:"Unknown error"}`),o}finally{i?.close()}return{pathDsn:this.#t.pathAsDsn(n)}}};var nr=class{static{this.TYPE="file.upload"}#e;#t;#r;constructor(e,r,n=new xe){this.#e=e,this.#t=r,this.#r=n}async execute(e){let{localPath:r,remotePath:n}=e;if(!r)throw new Error("Missing required parameter: localPath");if(!n)throw new Error("Missing required parameter: remotePath");this.#r.debug(`Writing file from ${r} to ${n}`);try{let i=await this.#t.read(this.#n(r)),o=await this.#e.exists(n);if(o&&e.overwrite!==!0)throw new Error(`File already exists at ${n}. Set overwrite to true to replace it.`);o&&e.overwrite===!0&&await this.#e.delete(n).catch(()=>{}),await this.#e.write(n,i)}catch(i){throw this.#r.error(`Error writing file from ${r} to ${n}: ${i instanceof Error?i.message:"Unknown error"}`),i}}#n(e){if(!e.startsWith("file://"))return e;let r=this.#t.pathAsDsn("/");if(e.startsWith(r))return e.slice(r.length-1);throw new Error(`Local path must be of the right format matching the local file SDK, got: ${e}`)}};var ir=class{static{this.TYPE="file.write"}#e;#t;constructor(e,r=new xe){this.#e=e,this.#t=r}async execute(e){let{contents:r,remotePath:n}=e;if(!r&&r!=="")throw new Error("Missing required parameter: contents");if(!n)throw new Error("Missing required parameter: remotePath");this.#t.debug(`Writing content to ${n}`);try{let i=await this.#e.exists(n);if(i&&e.overwrite!==!0)throw new Error(`File already exists at ${n}. Set overwrite to true to replace it.`);i&&e.overwrite===!0&&await this.#e.delete(n).catch(()=>{}),await this.#e.write(n,r)}catch(i){throw this.#t.error(`Error writing content to ${n}: ${i instanceof Error?i.message:"Unknown error"}`),i}}};var nn=class extends Ug{#e;#t;constructor(e,r,n){super(),this.#e=e,n=n??this.#e.files(`file://${process.env.TRANSAI_TMP_DIR??"/var/run/transai"}/connectors/${e.config.datasourceIdentifier??"file"}`),this.#t={[rr.TYPE]:new rr(r,n,this.#e.logger),[nr.TYPE]:new nr(r,n,this.#e.logger),[ir.TYPE]:new ir(r,this.#e.logger),[tr.TYPE]:new tr(r,this.#e.logger)}}get callbackFunctionChain(){return this.#r(this.#e.receiver.emitEventType(this.#e.receiver.responses.created()))}#r(e){return async(r,n)=>{let i=n.identifier,o=this.#t[i];if(!o)return this.#e.receiver.responses.badRequest(`Action ${i} does not exist.`)(r);try{let s=await o.execute(r.payload);this.#e.logger.debug(`Action ${i} executed successfully with pathDsn: ${JSON.stringify(s)}`);let a=r;return typeof s<"u"&&(a={...r,payload:{...r.payload??{},...s}}),e(a)}catch(s){return this.#e.logger.error(`Error executing action ${i}: ${s instanceof Error?s.message:"Unknown error"}`),this.#e.receiver.responses.internalServerError(s instanceof Error?s.message:"Unknown error occurred")(r)}}}};import Rg from"path";var Mg=Hi(Bu()),Ng=Hi(dc());import*as Zt from"path";var me=Hi(xg());import He from"node:process";var Pg=(o=>(o.error="error",o.warn="warn",o.info="info",o.http="http",o.debug="debug",o))(Pg||{}),Yr=class t{#e;constructor(e="default",r="info"){this.logger=me.createLogger({level:r,format:me.format.combine(me.format.label({label:e}),me.format.timestamp(),me.format.json())});let n=!1;(He.env.NODE_ENV!=="production"||He.env.LOG_TO_CONSOLE==="true")&&(n=!0,this.logger.add(new me.transports.Console({format:me.format.printf(({label:i,level:o,message:s})=>`[${i}] ${o}: ${s}`)}))),He.env.LOG_TO_FILE==="true"&&(n=!0,this.logger.add(new me.transports.File({filename:"error.log",level:"error"})),this.logger.add(new me.transports.File({filename:"combined.log"}))),n||this.logger.add(new me.transports.Console({format:me.format.printf(({label:i,level:o,message:s})=>`[${i}] ${o}: ${s}`)}))}static getInstance(e,r){return t.instance||(t.instance=new t(e??"default",t.#r(r))),t.instance}setDatadogTransport(e){let r=e?.apiKey??He.env.DATADOG_API_KEY;if(!r)return this.debug("DATADOG_API_KEY is not set, cannot add Datadog transport"),this;let n=new URLSearchParams({"dd-api-key":r,ddsource:e?.source??He.env.DD_SOURCE??"nodejs",service:e?.service??He.env.DD_SERVICE??"unknown",env:e?.env??He.env.DD_ENV??"prod"});e?.tags&&n.append("ddtags",Object.entries(e.tags).map(([o,s])=>`${o}:${s}`).join(","));let i={host:`http-intake.logs.${He.env.DD_SITE??"datadoghq.eu"}`,path:`/api/v2/logs?${n.toString()}`,ssl:!0,batch:!0,format:me.format.json(),level:"info"};return this.#e&&this.logger.remove(this.#e),this.#e=new me.transports.Http(i),this.logger.add(this.#e),this}info(...e){this.#t(this.logger.info,...e)}debug(...e){this.#t(this.logger.debug,...e)}error(...e){this.#t(this.logger.error,...e)}warn(...e){this.#t(this.logger.warn,...e)}verbose(...e){this.#t(this.logger.verbose,...e)}#t(e,...r){try{let n=r.map(i=>typeof i=="object"?JSON.stringify(i):String(i));e(n.join(" "),...r)}catch(n){console.error("unknown error in log, function",n)}}static#r=e=>{if(e!==void 0)return e;let r=He.env.LOG_LEVEL||"info",i=!Object.values(Pg).includes(r);return i&&(r="info"),i&&console.error(`Invalid log level: ${r} only allow; 'error', 'warn', 'info', 'debug', 'trace'. Using info as default.`),r}};import{Readable as C2}from"stream";var zr=class t{#e;#t;constructor(e=void 0){this.#e=e,this.#t=Yr.getInstance(),this.#t.info(`FileHandler initialized with delimiter: ${e}`)}async handleBuffer(e,r,n,i){let o;switch(t.getExtension(e)){case".csv":o=await this.parseCSV(r,n,i);break;default:return this.handle(e,r.toString(),n,i)}return o}async handle(e,r,n,i){let o;switch(t.getExtension(e)){case".xml":o=await this.parseXML(r,n);break;case".json":o=JSON.parse(r);break;default:Yr.getInstance().error(`Unsupported file type: ${e}`)}return o}async parseXML(e,r){try{let n=await Mg.default.parseStringPromise(e,{explicitArray:!1});return this.xmlOptions(n,r)}catch(n){throw new Error(`Error parsing XML content: ${n.message}`)}}async parseCSV(e,r,n){try{let i=C2.from(e),o=!0;return Object.keys(n??{}).includes("noHeader")&&(o=(n??{}).noHeader===!0),(0,Ng.default)({delimiter:this.#e??",",noheader:o}).fromStream(i)}catch(i){throw this.#t.error(`Error parsing CSV: ${i.message}`),new Error(`Error parsing CSV content: ${i.message}`)}}xmlOptions(e,r){let n=i=>{if(typeof i=="object")for(let o of Object.keys(i)){let s=i[o];r.includes(o)?Array.isArray(s)||(i[o]=[s]):o!=="_text"&&(i[o]=n(s))}return i};return n(e)}csvOptions(e,r){let n;return Array.isArray(r)&&r.length>0?n={headers:r}:n=e.split(`
|
|
49
|
+
`)[0].trim().split(",").length>1?{headers:!0}:{noheader:!0},n}stringify(e){return JSON.stringify(e,null,2)}static getPath(e){return Zt.dirname(e)}static getFileName(e){return Zt.basename(e)}static getExtension(e){return Zt.extname(e).toLowerCase()}};var Jr=class{static{this.DEFAULT_INTERVAL_SECONDS=60}#e;#t;#r;#n;#o;#i;constructor(e,r,n){this.#e=e,this.#t=r,this.#r=n,this.#o=new zr(r.delimiter);let{selector:i}=this.#t;if(this.#i=new RegExp(typeof i!="string"?i.pattern:i,typeof i!="string"&&i.flags?i.flags:"i"),this.#t.destinationDsn)this.#n=this.#e.files(this.#t.destinationDsn);else if(this.#t.action==="move")throw new Error(`Destination DSN must be provided for 'move' action in file selector: ${this.name}`)}get name(){let{selector:e}=this.#t;return`file-processor-${typeof e=="string"?e:e.pattern}`}async onRun(){let e=await this.#s();this.#e.telemetry.increment("files.processed.count",e)}async#s(e="/"){let r=await this.#r.list(e);return(await Promise.all(r.map(async i=>i.type==="FILE"?await this.#a(i,e)?1:0:this.#t.recursive===!0?this.#s(Rg.join(e,i.name)):Promise.resolve(0)))).reduce((i,o)=>i+o,0)}async#a(e,r){let n=Rg.join(r,e.name);if(!this.#i.test(n))return this.#e.logger.verbose(`Skipping file at path: ${n} as it does not match selector regex`),!1;this.#e.logger.debug(`Processing file at path: ${n}`);let i,o;try{if(i=await this.#r.read(n),o=await this.#o.handleBuffer(n,i.get(),this.#t.optionalHeaders??[],this.#t.optionalSettings),!o)return this.#e.logger.info(`Failed to parse file at path: ${n}`),i.close(),!1;this.#e.logger.debug(`Parsed file successfully at path: ${n}`)}catch(s){return this.#e.logger.error(`Error parsing file at path: ${n}, error: ${s}`),i?.close(),!1}try{let s={...o,_filename:zr.getFileName(n)??e.name},a={keyField:"_filename",collection:`${this.#e.config.datasourceIdentifier??"file"}_${this.#t.identifier??this.#i.source??"default"}`};this.#t.action==="move"&&(s._fileDestination=this.#n?.pathAsDsn(e.name)),this.#t.type==="metric"?await this.#e.sender.metricsLegacy([s],a):await this.#e.sender.documents([s],a)}catch(s){return this.#e.logger.error(`Error sending parsed file from path: ${n}, error: ${s}`),i?.close(),!1}try{switch(this.#t.action){case"move":await this.#n?.write(e.name,i),await this.#r.delete(n),this.#e.logger.debug(`"Moved" file at path: ${n} to ${this.#n?.pathAsDsn(e.name)} after processing`);break;case"delete":await this.#r.delete(n),this.#e.logger.debug(`Deleted file at path: ${n} after processing`);break}}finally{i?.close()}return!0}};var Ig=class extends en{constructor(r,n){super(r,n);this.init=async()=>{let{config:r}=this.connectorSDK;await Promise.all((r.fileSelectors??[]).map(async n=>{let i=new Jr(this.connectorSDK,n,this.#e);await this.connectorSDK.processing.registerInterval(n.intervalSeconds??Jr.DEFAULT_INTERVAL_SECONDS,i)}))};let{config:i}=this.connectorSDK;this.#e=this.connectorSDK.files(i.dsn);let o=new nn(this.connectorSDK,this.#e);this.callbackFunction=o.callbackFunctionChain}#e};export{Ig as ConnectorRunnerFile};
|
|
50
50
|
/*! Bundled license information:
|
|
51
51
|
|
|
52
52
|
sax/lib/sax.js:
|