@signalk/freeboard-sk
Version:
Openlayers chart plotter implementation for Signal K
3 lines • 140 kB
JavaScript
var Ki=Object.create;var _e=Object.defineProperty;var zi=Object.getOwnPropertyDescriptor;var Hi=Object.getOwnPropertyNames;var Qi=Object.getPrototypeOf,Zi=Object.prototype.hasOwnProperty;var S=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports);var Ji=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Hi(t))!Zi.call(r,n)&&n!==e&&_e(r,n,{get:()=>t[n],enumerable:!(i=zi(t,n))||i.enumerable});return r};var tn=(r,t,e)=>(e=r!=null?Ki(Qi(r)):{},Ji(t||!r||!r.__esModule?_e(e,"default",{value:r,enumerable:!0}):e,r));var Lt=S(ee=>{(function(){ee.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:`
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(ee)});var et=S((Le,ht)=>{(function(){var r,t,e,i,n,s,o,l=[].slice,p={}.hasOwnProperty;r=function(){var m,N,I,E,g,T;if(T=arguments[0],g=2<=arguments.length?l.call(arguments,1):[],n(Object.assign))Object.assign.apply(null,arguments);else for(m=0,I=g.length;m<I;m++)if(E=g[m],E!=null)for(N in E)p.call(E,N)&&(T[N]=E[N]);return T},n=function(m){return!!m&&Object.prototype.toString.call(m)==="[object Function]"},s=function(m){var N;return!!m&&((N=typeof m)=="function"||N==="object")},e=function(m){return n(Array.isArray)?Array.isArray(m):Object.prototype.toString.call(m)==="[object Array]"},i=function(m){var N;if(e(m))return!m.length;for(N in m)if(p.call(m,N))return!1;return!0},o=function(m){var N,I;return s(m)&&(I=Object.getPrototypeOf(m))&&(N=I.constructor)&&typeof N=="function"&&N instanceof N&&Function.prototype.toString.call(N)===Function.prototype.toString.call(Object)},t=function(m){return n(m.valueOf)?m.valueOf():m},ht.exports.assign=r,ht.exports.isFunction=n,ht.exports.isObject=s,ht.exports.isArray=e,ht.exports.isEmpty=i,ht.exports.isPlainObject=o,ht.exports.getValue=t}).call(Le)});var re=S((ve,Pe)=>{(function(){var r;Pe.exports=r=(function(){function t(){}return t.prototype.hasFeature=function(e,i){return!0},t.prototype.createDocumentType=function(e,i,n){throw new Error("This DOM method is not implemented.")},t.prototype.createDocument=function(e,i,n){throw new Error("This DOM method is not implemented.")},t.prototype.createHTMLDocument=function(e){throw new Error("This DOM method is not implemented.")},t.prototype.getFeature=function(e,i){throw new Error("This DOM method is not implemented.")},t})()}).call(ve)});var Be=S((Me,Fe)=>{(function(){var r;Fe.exports=r=(function(){function t(){}return t.prototype.handleError=function(e){throw new Error(e)},t})()}).call(Me)});var Ue=S((Se,Re)=>{(function(){var r;Re.exports=r=(function(){function t(e){this.arr=e||[]}return Object.defineProperty(t.prototype,"length",{get:function(){return this.arr.length}}),t.prototype.item=function(e){return this.arr[e]||null},t.prototype.contains=function(e){return this.arr.indexOf(e)!==-1},t})()}).call(Se)});var je=S((qe,Xe)=>{(function(){var r,t,e;t=Be(),e=Ue(),Xe.exports=r=(function(){function i(){var n;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new t,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=n=Object.create(this.defaultParams)}return Object.defineProperty(i.prototype,"parameterNames",{get:function(){return new e(Object.keys(this.defaultParams))}}),i.prototype.getParameter=function(n){return this.params.hasOwnProperty(n)?this.params[n]:null},i.prototype.canSetParameter=function(n,s){return!0},i.prototype.setParameter=function(n,s){return s!=null?this.params[n]=s:delete this.params[n]},i})()}).call(qe)});var V=S((ke,Ve)=>{(function(){Ve.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(ke)});var ie=S((We,Ge)=>{(function(){var r,t,e;r=V(),e=Q(),Ge.exports=t=(function(){function i(n,s,o){if(this.parent=n,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),s==null)throw new Error("Missing attribute name. "+this.debugInfo(s));this.name=this.stringify.name(s),this.value=this.stringify.attValue(o),this.type=r.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(i.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(i.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(i.prototype,"textContent",{get:function(){return this.value},set:function(n){return this.value=n||""}}),Object.defineProperty(i.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(i.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(i.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(i.prototype,"specified",{get:function(){return!0}}),i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(n){return this.options.writer.attribute(this,this.options.writer.filterOptions(n))},i.prototype.debugInfo=function(n){return n=n||this.name,n==null?"parent: <"+this.parent.name+">":"attribute: {"+n+"}, parent: <"+this.parent.name+">"},i.prototype.isEqualNode=function(n){return!(n.namespaceURI!==this.namespaceURI||n.prefix!==this.prefix||n.localName!==this.localName||n.value!==this.value)},i})()}).call(We)});var vt=S((Ye,$e)=>{(function(){var r;$e.exports=r=(function(){function t(e){this.nodes=e}return Object.defineProperty(t.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),t.prototype.clone=function(){return this.nodes=null},t.prototype.getNamedItem=function(e){return this.nodes[e]},t.prototype.setNamedItem=function(e){var i;return i=this.nodes[e.nodeName],this.nodes[e.nodeName]=e,i||null},t.prototype.removeNamedItem=function(e){var i;return i=this.nodes[e],delete this.nodes[e],i||null},t.prototype.item=function(e){return this.nodes[Object.keys(this.nodes)[e]]||null},t.prototype.getNamedItemNS=function(e,i){throw new Error("This DOM method is not implemented.")},t.prototype.setNamedItemNS=function(e){throw new Error("This DOM method is not implemented.")},t.prototype.removeNamedItemNS=function(e,i){throw new Error("This DOM method is not implemented.")},t})()}).call(Ye)});var Pt=S((Ke,ze)=>{(function(){var r,t,e,i,n,s,o,l,p,m=function(I,E){for(var g in E)N.call(E,g)&&(I[g]=E[g]);function T(){this.constructor=I}return T.prototype=E.prototype,I.prototype=new T,I.__super__=E.prototype,I},N={}.hasOwnProperty;p=et(),l=p.isObject,o=p.isFunction,s=p.getValue,n=Q(),r=V(),t=ie(),i=vt(),ze.exports=e=(function(I){m(E,I);function E(g,T,b){var M,v,O,y;if(E.__super__.constructor.call(this,g),T==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(T),this.type=r.Element,this.attribs={},this.schemaTypeInfo=null,b!=null&&this.attribute(b),g.type===r.Document&&(this.isRoot=!0,this.documentObject=g,g.rootObject=this,g.children)){for(y=g.children,v=0,O=y.length;v<O;v++)if(M=y[v],M.type===r.DocType){M.name=this.name;break}}}return Object.defineProperty(E.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(E.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(E.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(E.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(E.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(E.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(E.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(E.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new i(this.attribs)),this.attributeMap}}),E.prototype.clone=function(){var g,T,b,M;b=Object.create(this),b.isRoot&&(b.documentObject=null),b.attribs={},M=this.attribs;for(T in M)N.call(M,T)&&(g=M[T],b.attribs[T]=g.clone());return b.children=[],this.children.forEach(function(v){var O;return O=v.clone(),O.parent=b,b.children.push(O)}),b},E.prototype.attribute=function(g,T){var b,M;if(g!=null&&(g=s(g)),l(g))for(b in g)N.call(g,b)&&(M=g[b],this.attribute(b,M));else o(T)&&(T=T.apply()),this.options.keepNullAttributes&&T==null?this.attribs[g]=new t(this,g,""):T!=null&&(this.attribs[g]=new t(this,g,T));return this},E.prototype.removeAttribute=function(g){var T,b,M;if(g==null)throw new Error("Missing attribute name. "+this.debugInfo());if(g=s(g),Array.isArray(g))for(b=0,M=g.length;b<M;b++)T=g[b],delete this.attribs[T];else delete this.attribs[g];return this},E.prototype.toString=function(g){return this.options.writer.element(this,this.options.writer.filterOptions(g))},E.prototype.att=function(g,T){return this.attribute(g,T)},E.prototype.a=function(g,T){return this.attribute(g,T)},E.prototype.getAttribute=function(g){return this.attribs.hasOwnProperty(g)?this.attribs[g].value:null},E.prototype.setAttribute=function(g,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getAttributeNode=function(g){return this.attribs.hasOwnProperty(g)?this.attribs[g]:null},E.prototype.setAttributeNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.removeAttributeNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByTagName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getAttributeNS=function(g,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setAttributeNS=function(g,T,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.removeAttributeNS=function(g,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getAttributeNodeNS=function(g,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setAttributeNodeNS=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByTagNameNS=function(g,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.hasAttribute=function(g){return this.attribs.hasOwnProperty(g)},E.prototype.hasAttributeNS=function(g,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setIdAttribute=function(g,T){return this.attribs.hasOwnProperty(g)?this.attribs[g].isId:T},E.prototype.setIdAttributeNS=function(g,T,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setIdAttributeNode=function(g,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByTagName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByTagNameNS=function(g,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByClassName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isEqualNode=function(g){var T,b,M;if(!E.__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(T=b=0,M=this.attribs.length-1;0<=M?b<=M:b>=M;T=0<=M?++b:--b)if(!this.attribs[T].isEqualNode(g.attribs[T]))return!1;return!0},E})(n)}).call(Ke)});var xt=S((He,Qe)=>{(function(){var r,t,e=function(n,s){for(var o in s)i.call(s,o)&&(n[o]=s[o]);function l(){this.constructor=n}return l.prototype=s.prototype,n.prototype=new l,n.__super__=s.prototype,n},i={}.hasOwnProperty;t=Q(),Qe.exports=r=(function(n){e(s,n);function s(o){s.__super__.constructor.call(this,o),this.value=""}return Object.defineProperty(s.prototype,"data",{get:function(){return this.value},set:function(o){return this.value=o||""}}),Object.defineProperty(s.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(s.prototype,"textContent",{get:function(){return this.value},set:function(o){return this.value=o||""}}),s.prototype.clone=function(){return Object.create(this)},s.prototype.substringData=function(o,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.appendData=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.insertData=function(o,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.deleteData=function(o,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.replaceData=function(o,l,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.isEqualNode=function(o){return!(!s.__super__.isEqualNode.apply(this,arguments).isEqualNode(o)||o.data!==this.data)},s})(t)}).call(He)});var Mt=S((Ze,Je)=>{(function(){var r,t,e,i=function(s,o){for(var l in o)n.call(o,l)&&(s[l]=o[l]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},n={}.hasOwnProperty;r=V(),e=xt(),Je.exports=t=(function(s){i(o,s);function o(l,p){if(o.__super__.constructor.call(this,l),p==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=r.CData,this.value=this.stringify.cdata(p)}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(l){return this.options.writer.cdata(this,this.options.writer.filterOptions(l))},o})(e)}).call(Ze)});var Ft=S((tr,er)=>{(function(){var r,t,e,i=function(s,o){for(var l in o)n.call(o,l)&&(s[l]=o[l]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},n={}.hasOwnProperty;r=V(),t=xt(),er.exports=e=(function(s){i(o,s);function o(l,p){if(o.__super__.constructor.call(this,l),p==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=r.Comment,this.value=this.stringify.comment(p)}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(l){return this.options.writer.comment(this,this.options.writer.filterOptions(l))},o})(t)}).call(tr)});var Bt=S((rr,ir)=>{(function(){var r,t,e,i,n=function(o,l){for(var p in l)s.call(l,p)&&(o[p]=l[p]);function m(){this.constructor=o}return m.prototype=l.prototype,o.prototype=new m,o.__super__=l.prototype,o},s={}.hasOwnProperty;i=et().isObject,e=Q(),r=V(),ir.exports=t=(function(o){n(l,o);function l(p,m,N,I){var E;l.__super__.constructor.call(this,p),i(m)&&(E=m,m=E.version,N=E.encoding,I=E.standalone),m||(m="1.0"),this.type=r.Declaration,this.version=this.stringify.xmlVersion(m),N!=null&&(this.encoding=this.stringify.xmlEncoding(N)),I!=null&&(this.standalone=this.stringify.xmlStandalone(I))}return l.prototype.toString=function(p){return this.options.writer.declaration(this,this.options.writer.filterOptions(p))},l})(e)}).call(rr)});var St=S((nr,or)=>{(function(){var r,t,e,i=function(s,o){for(var l in o)n.call(o,l)&&(s[l]=o[l]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},n={}.hasOwnProperty;e=Q(),r=V(),or.exports=t=(function(s){i(o,s);function o(l,p,m,N,I,E){if(o.__super__.constructor.call(this,l),p==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(m==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(p));if(!N)throw new Error("Missing DTD attribute type. "+this.debugInfo(p));if(!I)throw new Error("Missing DTD attribute default. "+this.debugInfo(p));if(I.indexOf("#")!==0&&(I="#"+I),!I.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(p));if(E&&!I.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(p));this.elementName=this.stringify.name(p),this.type=r.AttributeDeclaration,this.attributeName=this.stringify.name(m),this.attributeType=this.stringify.dtdAttType(N),E&&(this.defaultValue=this.stringify.dtdAttDefault(E)),this.defaultValueType=I}return o.prototype.toString=function(l){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(l))},o})(e)}).call(nr)});var Rt=S((sr,ur)=>{(function(){var r,t,e,i,n=function(o,l){for(var p in l)s.call(l,p)&&(o[p]=l[p]);function m(){this.constructor=o}return m.prototype=l.prototype,o.prototype=new m,o.__super__=l.prototype,o},s={}.hasOwnProperty;i=et().isObject,e=Q(),r=V(),ur.exports=t=(function(o){n(l,o);function l(p,m,N,I){if(l.__super__.constructor.call(this,p),N==null)throw new Error("Missing DTD entity name. "+this.debugInfo(N));if(I==null)throw new Error("Missing DTD entity value. "+this.debugInfo(N));if(this.pe=!!m,this.name=this.stringify.name(N),this.type=r.EntityDeclaration,!i(I))this.value=this.stringify.dtdEntityValue(I),this.internal=!0;else{if(!I.pubID&&!I.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(N));if(I.pubID&&!I.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(N));if(this.internal=!1,I.pubID!=null&&(this.pubID=this.stringify.dtdPubID(I.pubID)),I.sysID!=null&&(this.sysID=this.stringify.dtdSysID(I.sysID)),I.nData!=null&&(this.nData=this.stringify.dtdNData(I.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(N))}}return Object.defineProperty(l.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(l.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(l.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(l.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(l.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(l.prototype,"xmlVersion",{get:function(){return null}}),l.prototype.toString=function(p){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(p))},l})(e)}).call(sr)});var Ut=S((ar,cr)=>{(function(){var r,t,e,i=function(s,o){for(var l in o)n.call(o,l)&&(s[l]=o[l]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},n={}.hasOwnProperty;e=Q(),r=V(),cr.exports=t=(function(s){i(o,s);function o(l,p,m){if(o.__super__.constructor.call(this,l),p==null)throw new Error("Missing DTD element name. "+this.debugInfo());m||(m="(#PCDATA)"),Array.isArray(m)&&(m="("+m.join(",")+")"),this.name=this.stringify.name(p),this.type=r.ElementDeclaration,this.value=this.stringify.dtdElementValue(m)}return o.prototype.toString=function(l){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(l))},o})(e)}).call(ar)});var qt=S((hr,lr)=>{(function(){var r,t,e,i=function(s,o){for(var l in o)n.call(o,l)&&(s[l]=o[l]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},n={}.hasOwnProperty;e=Q(),r=V(),lr.exports=t=(function(s){i(o,s);function o(l,p,m){if(o.__super__.constructor.call(this,l),p==null)throw new Error("Missing DTD notation name. "+this.debugInfo(p));if(!m.pubID&&!m.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(p));this.name=this.stringify.name(p),this.type=r.NotationDeclaration,m.pubID!=null&&(this.pubID=this.stringify.dtdPubID(m.pubID)),m.sysID!=null&&(this.sysID=this.stringify.dtdSysID(m.sysID))}return Object.defineProperty(o.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(o.prototype,"systemId",{get:function(){return this.sysID}}),o.prototype.toString=function(l){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(l))},o})(e)}).call(hr)});var Xt=S((fr,pr)=>{(function(){var r,t,e,i,n,s,o,l,p,m=function(I,E){for(var g in E)N.call(E,g)&&(I[g]=E[g]);function T(){this.constructor=I}return T.prototype=E.prototype,I.prototype=new T,I.__super__=E.prototype,I},N={}.hasOwnProperty;p=et().isObject,l=Q(),r=V(),t=St(),i=Rt(),e=Ut(),n=qt(),o=vt(),pr.exports=s=(function(I){m(E,I);function E(g,T,b){var M,v,O,y,c,a;if(E.__super__.constructor.call(this,g),this.type=r.DocType,g.children){for(y=g.children,v=0,O=y.length;v<O;v++)if(M=y[v],M.type===r.Element){this.name=M.name;break}}this.documentObject=g,p(T)&&(c=T,T=c.pubID,b=c.sysID),b==null&&(a=[T,b],b=a[0],T=a[1]),T!=null&&(this.pubID=this.stringify.dtdPubID(T)),b!=null&&(this.sysID=this.stringify.dtdSysID(b))}return Object.defineProperty(E.prototype,"entities",{get:function(){var g,T,b,M,v;for(M={},v=this.children,T=0,b=v.length;T<b;T++)g=v[T],g.type===r.EntityDeclaration&&!g.pe&&(M[g.name]=g);return new o(M)}}),Object.defineProperty(E.prototype,"notations",{get:function(){var g,T,b,M,v;for(M={},v=this.children,T=0,b=v.length;T<b;T++)g=v[T],g.type===r.NotationDeclaration&&(M[g.name]=g);return new o(M)}}),Object.defineProperty(E.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(E.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(E.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),E.prototype.element=function(g,T){var b;return b=new e(this,g,T),this.children.push(b),this},E.prototype.attList=function(g,T,b,M,v){var O;return O=new t(this,g,T,b,M,v),this.children.push(O),this},E.prototype.entity=function(g,T){var b;return b=new i(this,!1,g,T),this.children.push(b),this},E.prototype.pEntity=function(g,T){var b;return b=new i(this,!0,g,T),this.children.push(b),this},E.prototype.notation=function(g,T){var b;return b=new n(this,g,T),this.children.push(b),this},E.prototype.toString=function(g){return this.options.writer.docType(this,this.options.writer.filterOptions(g))},E.prototype.ele=function(g,T){return this.element(g,T)},E.prototype.att=function(g,T,b,M,v){return this.attList(g,T,b,M,v)},E.prototype.ent=function(g,T){return this.entity(g,T)},E.prototype.pent=function(g,T){return this.pEntity(g,T)},E.prototype.not=function(g,T){return this.notation(g,T)},E.prototype.up=function(){return this.root()||this.documentObject},E.prototype.isEqualNode=function(g){return!(!E.__super__.isEqualNode.apply(this,arguments).isEqualNode(g)||g.name!==this.name||g.publicId!==this.publicId||g.systemId!==this.systemId)},E})(l)}).call(fr)});var jt=S((dr,yr)=>{(function(){var r,t,e,i=function(s,o){for(var l in o)n.call(o,l)&&(s[l]=o[l]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},n={}.hasOwnProperty;r=V(),t=Q(),yr.exports=e=(function(s){i(o,s);function o(l,p){if(o.__super__.constructor.call(this,l),p==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=r.Raw,this.value=this.stringify.raw(p)}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(l){return this.options.writer.raw(this,this.options.writer.filterOptions(l))},o})(t)}).call(dr)});var kt=S((mr,gr)=>{(function(){var r,t,e,i=function(s,o){for(var l in o)n.call(o,l)&&(s[l]=o[l]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},n={}.hasOwnProperty;r=V(),t=xt(),gr.exports=e=(function(s){i(o,s);function o(l,p){if(o.__super__.constructor.call(this,l),p==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=r.Text,this.value=this.stringify.text(p)}return Object.defineProperty(o.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(o.prototype,"wholeText",{get:function(){var l,p,m;for(m="",p=this.previousSibling;p;)m=p.data+m,p=p.previousSibling;for(m+=this.data,l=this.nextSibling;l;)m=m+l.data,l=l.nextSibling;return m}}),o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(l){return this.options.writer.text(this,this.options.writer.filterOptions(l))},o.prototype.splitText=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.replaceWholeText=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},o})(t)}).call(mr)});var Vt=S((wr,Er)=>{(function(){var r,t,e,i=function(s,o){for(var l in o)n.call(o,l)&&(s[l]=o[l]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},n={}.hasOwnProperty;r=V(),t=xt(),Er.exports=e=(function(s){i(o,s);function o(l,p,m){if(o.__super__.constructor.call(this,l),p==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=r.ProcessingInstruction,this.target=this.stringify.insTarget(p),this.name=this.target,m&&(this.value=this.stringify.insValue(m))}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(l){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(l))},o.prototype.isEqualNode=function(l){return!(!o.__super__.isEqualNode.apply(this,arguments).isEqualNode(l)||l.target!==this.target)},o})(t)}).call(wr)});var ne=S((Tr,Ir)=>{(function(){var r,t,e,i=function(s,o){for(var l in o)n.call(o,l)&&(s[l]=o[l]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},n={}.hasOwnProperty;e=Q(),r=V(),Ir.exports=t=(function(s){i(o,s);function o(l){o.__super__.constructor.call(this,l),this.type=r.Dummy}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(l){return""},o})(e)}).call(Tr)});var br=S((Nr,Dr)=>{(function(){var r;Dr.exports=r=(function(){function t(e){this.nodes=e}return Object.defineProperty(t.prototype,"length",{get:function(){return this.nodes.length||0}}),t.prototype.clone=function(){return this.nodes=null},t.prototype.item=function(e){return this.nodes[e]||null},t})()}).call(Nr)});var Ar=S((xr,Or)=>{(function(){Or.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(xr)});var Q=S((Cr,_r)=>{(function(){var r,t,e,i,n,s,o,l,p,m,N,I,E,g,T,b,M,v,O,y={}.hasOwnProperty;O=et(),v=O.isObject,M=O.isFunction,b=O.isEmpty,T=O.getValue,l=null,e=null,i=null,n=null,s=null,E=null,g=null,I=null,o=null,t=null,N=null,p=null,r=null,_r.exports=m=(function(){function c(a){this.parent=a,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,l||(l=Pt(),e=Mt(),i=Ft(),n=Bt(),s=Xt(),E=jt(),g=kt(),I=Vt(),o=ne(),t=V(),N=br(),p=vt(),r=Ar())}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 N(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 a;return a=this.parent.children.indexOf(this),this.parent.children[a-1]||null}}),Object.defineProperty(c.prototype,"nextSibling",{get:function(){var a;return a=this.parent.children.indexOf(this),this.parent.children[a+1]||null}}),Object.defineProperty(c.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(c.prototype,"textContent",{get:function(){var a,d,A,h,C;if(this.nodeType===t.Element||this.nodeType===t.DocumentFragment){for(C="",h=this.children,d=0,A=h.length;d<A;d++)a=h[d],a.textContent&&(C+=a.textContent);return C}else return null},set:function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),c.prototype.setParent=function(a){var d,A,h,C,w;for(this.parent=a,a&&(this.options=a.options,this.stringify=a.stringify),C=this.children,w=[],A=0,h=C.length;A<h;A++)d=C[A],w.push(d.setParent(this));return w},c.prototype.element=function(a,d,A){var h,C,w,x,P,F,R,U,B,W,q;if(F=null,d===null&&A==null&&(B=[{},null],d=B[0],A=B[1]),d==null&&(d={}),d=T(d),v(d)||(W=[d,A],A=W[0],d=W[1]),a!=null&&(a=T(a)),Array.isArray(a))for(w=0,R=a.length;w<R;w++)C=a[w],F=this.element(C);else if(M(a))F=this.element(a.apply());else if(v(a)){for(P in a)if(y.call(a,P))if(q=a[P],M(q)&&(q=q.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&P.indexOf(this.stringify.convertAttKey)===0)F=this.attribute(P.substr(this.stringify.convertAttKey.length),q);else if(!this.options.separateArrayItems&&Array.isArray(q)&&b(q))F=this.dummy();else if(v(q)&&b(q))F=this.element(P);else if(!this.options.keepNullNodes&&q==null)F=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(q))for(x=0,U=q.length;x<U;x++)C=q[x],h={},h[P]=C,F=this.element(h);else v(q)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&P.indexOf(this.stringify.convertTextKey)===0?F=this.element(q):(F=this.element(P),F.element(q)):F=this.element(P,q)}else!this.options.keepNullNodes&&A===null?F=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&a.indexOf(this.stringify.convertTextKey)===0?F=this.text(A):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&a.indexOf(this.stringify.convertCDataKey)===0?F=this.cdata(A):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&a.indexOf(this.stringify.convertCommentKey)===0?F=this.comment(A):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&a.indexOf(this.stringify.convertRawKey)===0?F=this.raw(A):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&a.indexOf(this.stringify.convertPIKey)===0?F=this.instruction(a.substr(this.stringify.convertPIKey.length),A):F=this.node(a,d,A);if(F==null)throw new Error("Could not create any elements with: "+a+". "+this.debugInfo());return F},c.prototype.insertBefore=function(a,d,A){var h,C,w,x,P;if(a?.type)return w=a,x=d,w.setParent(this),x?(C=children.indexOf(x),P=children.splice(C),children.push(w),Array.prototype.push.apply(children,P)):children.push(w),w;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(a));return C=this.parent.children.indexOf(this),P=this.parent.children.splice(C),h=this.parent.element(a,d,A),Array.prototype.push.apply(this.parent.children,P),h},c.prototype.insertAfter=function(a,d,A){var h,C,w;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(a));return C=this.parent.children.indexOf(this),w=this.parent.children.splice(C+1),h=this.parent.element(a,d,A),Array.prototype.push.apply(this.parent.children,w),h},c.prototype.remove=function(){var a,d;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return a=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[a,a-a+1].concat(d=[])),this.parent},c.prototype.node=function(a,d,A){var h,C;return a!=null&&(a=T(a)),d||(d={}),d=T(d),v(d)||(C=[d,A],A=C[0],d=C[1]),h=new l(this,a,d),A!=null&&h.text(A),this.children.push(h),h},c.prototype.text=function(a){var d;return v(a)&&this.element(a),d=new g(this,a),this.children.push(d),this},c.prototype.cdata=function(a){var d;return d=new e(this,a),this.children.push(d),this},c.prototype.comment=function(a){var d;return d=new i(this,a),this.children.push(d),this},c.prototype.commentBefore=function(a){var d,A,h;return A=this.parent.children.indexOf(this),h=this.parent.children.splice(A),d=this.parent.comment(a),Array.prototype.push.apply(this.parent.children,h),this},c.prototype.commentAfter=function(a){var d,A,h;return A=this.parent.children.indexOf(this),h=this.parent.children.splice(A+1),d=this.parent.comment(a),Array.prototype.push.apply(this.parent.children,h),this},c.prototype.raw=function(a){var d;return d=new E(this,a),this.children.push(d),this},c.prototype.dummy=function(){var a;return a=new o(this),a},c.prototype.instruction=function(a,d){var A,h,C,w,x;if(a!=null&&(a=T(a)),d!=null&&(d=T(d)),Array.isArray(a))for(w=0,x=a.length;w<x;w++)A=a[w],this.instruction(A);else if(v(a))for(A in a)y.call(a,A)&&(h=a[A],this.instruction(A,h));else M(d)&&(d=d.apply()),C=new I(this,a,d),this.children.push(C);return this},c.prototype.instructionBefore=function(a,d){var A,h,C;return h=this.parent.children.indexOf(this),C=this.parent.children.splice(h),A=this.parent.instruction(a,d),Array.prototype.push.apply(this.parent.children,C),this},c.prototype.instructionAfter=function(a,d){var A,h,C;return h=this.parent.children.indexOf(this),C=this.parent.children.splice(h+1),A=this.parent.instruction(a,d),Array.prototype.push.apply(this.parent.children,C),this},c.prototype.declaration=function(a,d,A){var h,C;return h=this.document(),C=new n(h,a,d,A),h.children.length===0?h.children.unshift(C):h.children[0].type===t.Declaration?h.children[0]=C:h.children.unshift(C),h.root()||h},c.prototype.dtd=function(a,d){var A,h,C,w,x,P,F,R,U,B;for(h=this.document(),C=new s(h,a,d),U=h.children,w=x=0,F=U.length;x<F;w=++x)if(A=U[w],A.type===t.DocType)return h.children[w]=C,C;for(B=h.children,w=P=0,R=B.length;P<R;w=++P)if(A=B[w],A.isRoot)return h.children.splice(w,0,C),C;return h.children.push(C),C},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 a;for(a=this;a;){if(a.type===t.Document)return a.rootObject;if(a.isRoot)return a;a=a.parent}},c.prototype.document=function(){var a;for(a=this;a;){if(a.type===t.Document)return a;a=a.parent}},c.prototype.end=function(a){return this.document().end(a)},c.prototype.prev=function(){var a;if(a=this.parent.children.indexOf(this),a<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[a-1]},c.prototype.next=function(){var a;if(a=this.parent.children.indexOf(this),a===-1||a===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[a+1]},c.prototype.importDocument=function(a){var d;return d=a.root().clone(),d.parent=this,d.isRoot=!1,this.children.push(d),this},c.prototype.debugInfo=function(a){var d,A;return a=a||this.name,a==null&&!((d=this.parent)!=null&&d.name)?"":a==null?"parent: <"+this.parent.name+">":(A=this.parent)!=null&&A.name?"node: <"+a+">, parent: <"+this.parent.name+">":"node: <"+a+">"},c.prototype.ele=function(a,d,A){return this.element(a,d,A)},c.prototype.nod=function(a,d,A){return this.node(a,d,A)},c.prototype.txt=function(a){return this.text(a)},c.prototype.dat=function(a){return this.cdata(a)},c.prototype.com=function(a){return this.comment(a)},c.prototype.ins=function(a,d){return this.instruction(a,d)},c.prototype.doc=function(){return this.document()},c.prototype.dec=function(a,d,A){return this.declaration(a,d,A)},c.prototype.e=function(a,d,A){return this.element(a,d,A)},c.prototype.n=function(a,d,A){return this.node(a,d,A)},c.prototype.t=function(a){return this.text(a)},c.prototype.d=function(a){return this.cdata(a)},c.prototype.c=function(a){return this.comment(a)},c.prototype.r=function(a){return this.raw(a)},c.prototype.i=function(a,d){return this.instruction(a,d)},c.prototype.u=function(){return this.up()},c.prototype.importXMLBuilder=function(a){return this.importDocument(a)},c.prototype.replaceChild=function(a,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.removeChild=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.appendChild=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.hasChildNodes=function(){return this.children.length!==0},c.prototype.cloneNode=function(a){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(a,d){return!0},c.prototype.hasAttributes=function(){return this.attribs.length!==0},c.prototype.compareDocumentPosition=function(a){var d,A;return d=this,d===a?0:this.document()!==a.document()?(A=r.Disconnected|r.ImplementationSpecific,Math.random()<.5?A|=r.Preceding:A|=r.Following,A):d.isAncestor(a)?r.Contains|r.Preceding:d.isDescendant(a)?r.Contains|r.Following:d.isPreceding(a)?r.Preceding:r.Following},c.prototype.isSameNode=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.lookupPrefix=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.isDefaultNamespace=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.lookupNamespaceURI=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.isEqualNode=function(a){var d,A,h;if(a.nodeType!==this.nodeType||a.children.length!==this.children.length)return!1;for(d=A=0,h=this.children.length-1;0<=h?A<=h:A>=h;d=0<=h?++A:--A)if(!this.children[d].isEqualNode(a.children[d]))return!1;return!0},c.prototype.getFeature=function(a,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.setUserData=function(a,d,A){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getUserData=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.contains=function(a){return a?a===this||this.isDescendant(a):!1},c.prototype.isDescendant=function(a){var d,A,h,C,w;for(w=this.children,h=0,C=w.length;h<C;h++)if(d=w[h],a===d||(A=d.isDescendant(a),A))return!0;return!1},c.prototype.isAncestor=function(a){return a.isDescendant(this)},c.prototype.isPreceding=function(a){var d,A;return d=this.treePosition(a),A=this.treePosition(this),d===-1||A===-1?!1:d<A},c.prototype.isFollowing=function(a){var d,A;return d=this.treePosition(a),A=this.treePosition(this),d===-1||A===-1?!1:d>A},c.prototype.treePosition=function(a){var d,A;return A=0,d=!1,this.foreachTreeNode(this.document(),function(h){if(A++,!d&&h===a)return d=!0}),d?A:-1},c.prototype.foreachTreeNode=function(a,d){var A,h,C,w,x;for(a||(a=this.document()),w=a.children,h=0,C=w.length;h<C;h++){if(A=w[h],x=d(A))return x;if(x=this.foreachTreeNode(A,d),x)return x}},c})()}).call(Cr)});var oe=S((Lr,vr)=>{(function(){var r,t=function(i,n){return function(){return i.apply(n,arguments)}},e={}.hasOwnProperty;vr.exports=r=(function(){function i(n){this.assertLegalName=t(this.assertLegalName,this),this.assertLegalChar=t(this.assertLegalChar,this);var s,o,l;n||(n={}),this.options=n,this.options.version||(this.options.version="1.0"),o=n.stringify||{};for(s in o)e.call(o,s)&&(l=o[s],this[s]=l)}return i.prototype.name=function(n){return this.options.noValidation?n:this.assertLegalName(""+n||"")},i.prototype.text=function(n){return this.options.noValidation?n:this.assertLegalChar(this.textEscape(""+n||""))},i.prototype.cdata=function(n){return this.options.noValidation?n:(n=""+n||"",n=n.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(n))},i.prototype.comment=function(n){if(this.options.noValidation)return n;if(n=""+n||"",n.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+n);return this.assertLegalChar(n)},i.prototype.raw=function(n){return this.options.noValidation?n:""+n||""},i.prototype.attValue=function(n){return this.options.noValidation?n:this.assertLegalChar(this.attEscape(n=""+n||""))},i.prototype.insTarget=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},i.prototype.insValue=function(n){if(this.options.noValidation)return n;if(n=""+n||"",n.match(/\?>/))throw new Error("Invalid processing instruction value: "+n);return this.assertLegalChar(n)},i.prototype.xmlVersion=function(n){if(this.options.noValidation)return n;if(n=""+n||"",!n.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+n);return n},i.prototype.xmlEncoding=function(n){if(this.options.noValidation)return n;if(n=""+n||"",!n.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+n);return this.assertLegalChar(n)},i.prototype.xmlStandalone=function(n){return this.options.noValidation?n:n?"yes":"no"},i.prototype.dtdPubID=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},i.prototype.dtdSysID=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},i.prototype.dtdElementValue=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},i.prototype.dtdAttType=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},i.prototype.dtdAttDefault=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},i.prototype.dtdEntityValue=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},i.prototype.dtdNData=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},i.prototype.convertAttKey="@",i.prototype.convertPIKey="?",i.prototype.convertTextKey="#text",i.prototype.convertCDataKey="#cdata",i.prototype.convertCommentKey="#comment",i.prototype.convertRawKey="#raw",i.prototype.assertLegalChar=function(n){var s,o;if(this.options.noValidation)return n;if(s="",this.options.version==="1.0"){if(s=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,o=n.match(s))throw new Error("Invalid character in string: "+n+" at index "+o.index)}else if(this.options.version==="1.1"&&(s=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,o=n.match(s)))throw new Error("Invalid character in string: "+n+" at index "+o.index);return n},i.prototype.assertLegalName=function(n){var s;if(this.options.noValidation)return n;if(this.assertLegalChar(n),s=/^([: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])*$/,!n.match(s))throw new Error("Invalid character in name");return n},i.prototype.textEscape=function(n){var s;return this.options.noValidation?n:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,n.replace(s,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},i.prototype.attEscape=function(n){var s;return this.options.noValidation?n:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,n.replace(s,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},i})()}).call(Lr)});var Ot=S((Pr,Mr)=>{(function(){Mr.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(Pr)});var se=S((Fr,Br)=>{(function(){var r,t,e,i,n,s,o,l,p,m,N,I,E,g,T,b,M,v={}.hasOwnProperty;M=et().assign,r=V(),p=Bt(),m=Xt(),e=Mt(),i=Ft(),I=Pt(),g=jt(),T=kt(),E=Vt(),N=ne(),n=St(),s=Ut(),o=Rt(),l=qt(),t=Ot(),Br.exports=b=(function(){function O(y){var c,a,d;y||(y={}),this.options=y,a=y.writer||{};for(c in a)v.call(a,c)&&(d=a[c],this["_"+c]=this[c],this[c]=d)}return O.prototype.filterOptions=function(y){var c,a,d,A,h,C,w,x;return y||(y={}),y=M({},this.options,y),c={writer:this},c.pretty=y.pretty||!1,c.allowEmpty=y.allowEmpty||!1,c.indent=(a=y.indent)!=null?a:" ",c.newline=(d=y.newline)!=null?d:`
`,c.offset=(A=y.offset)!=null?A:0,c.dontPrettyTextNodes=(h=(C=y.dontPrettyTextNodes)!=null?C:y.dontprettytextnodes)!=null?h:0,c.spaceBeforeSlash=(w=(x=y.spaceBeforeSlash)!=null?x:y.spacebeforeslash)!=null?w:"",c.spaceBeforeSlash===!0&&(c.spaceBeforeSlash=" "),c.suppressPrettyCount=0,c.user={},c.state=t.None,c},O.prototype.indent=function(y,c,a){var d;return!c.pretty||c.suppressPrettyCount?"":c.pretty&&(d=(a||0)+c.offset+1,d>0)?new Array(d).join(c.indent):""},O.prototype.endline=function(y,c,a){return!c.pretty||c.suppressPrettyCount?"":c.newline},O.prototype.attribute=function(y,c,a){var d;return this.openAttribute(y,c,a),d=" "+y.name+'="'+y.value+'"',this.closeAttribute(y,c,a),d},O.prototype.cdata=function(y,c,a){var d;return this.openNode(y,c,a),c.state=t.OpenTag,d=this.indent(y,c,a)+"<![CDATA[",c.state=t.InsideTag,d+=y.value,c.state=t.CloseTag,d+="]]>"+this.endline(y,c,a),c.state=t.None,this.closeNode(y,c,a),d},O.prototype.comment=function(y,c,a){var d;return this.openNode(y,c,a),c.state=t.OpenTag,d=this.indent(y,c,a)+"<!-- ",c.state=t.InsideTag,d+=y.value,c.state=t.CloseTag,d+=" -->"+this.endline(y,c,a),c.state=t.None,this.closeNode(y,c,a),d},O.prototype.declaration=function(y,c,a){var d;return this.openNode(y,c,a),c.state=t.OpenTag,d=this.indent(y,c,a)+"<?xml",c.state=t.InsideTag,d+=' version="'+y.version+'"',y.encoding!=null&&(d+=' encoding="'+y.encoding+'"'),y.standalone!=null&&(d+=' standalone="'+y.standalone+'"'),c.state=t.CloseTag,d+=c.spaceBeforeSlash+"?>",d+=this.endline(y,c,a),c.state=t.None,this.closeNode(y,c,a),d},O.prototype.docType=function(y,c,a){var d,A,h,C,w;if(a||(a=0),this.openNode(y,c,a),c.state=t.OpenTag,C=this.indent(y,c,a),C+="<!DOCTYPE "+y.root().name,y.pubID&&y.sysID?C+=' PUBLIC "'+y.pubID+'" "'+y.sysID+'"':y.sysID&&(C+=' SYSTEM "'+y.sysID+'"'),y.children.length>0){for(C+=" [",C+=this.endline(y,c,a),c.state=t.InsideTag,w=y.children,A=0,h=w.length;A<h;A++)d=w[A],C+=this.writeChildNode(d,c,a+1);c.state=t.CloseTag,C+="]"}return c.state=t.CloseTag,C+=c.spaceBeforeSlash+">",C+=this.endline(y,c,a),c.state=t.None,this.closeNode(y,c,a),C},O.prototype.element=function(y,c,a){var d,A,h,C,w,x,P,F,R,U,B,W,q,pt;a||(a=0),U=!1,B="",this.openNode(y,c,a),c.state=t.OpenTag,B+=this.indent(y,c,a)+"<"+y.name,W=y.attribs;for(R in W)v.call(W,R)&&(d=W[R],B+=this.attribute(d,c,a));if(h=y.children.length,C=h===0?null:y.children[0],h===0||y.children.every(function(tt){return(tt.type===r.Text||tt.type===r.Raw)&&tt.value===""}))c.allowEmpty?(B+=">",c.state=t.CloseTag,B+="</"+y.name+">"+this.endline(y,c,a)):(c.state=t.CloseTag,B+=c.spaceBeforeSlash+"/>"+this.endline(y,c,a));else if(c.pretty&&h===1&&(C.type===r.Text||C.type===r.Raw)&&C.value!=null)B+=">",c.state=t.InsideTag,c.suppressPrettyCount++,U=!0,B+=this.writeChildNode(C,c,a+1),c.suppressPrettyCount--,U=!1,c.state=t.CloseTag,B+="</"+y.name+">"+this.endline(y,c,a);else{if(c.dontPrettyTextNodes){for(q=y.children,w=0,P=q.length;w<P;w++)if(A=q[w],(A.type===r.Text||A.type===r.Raw)&&A.value!=null){c.suppressPrettyCount++,U=!0;break}}for(B+=">"+this.endline(y,c,a),c.state=t.InsideTag,pt=y.children,x=0,F=pt.length;x<F;x++)A=pt[x],B+=this.writeChildNode(A,c,a+1);c.state=t.CloseTag,B+=this.indent(y,c,a)+"</"+y.name+">",U&&c.suppressPrettyCount--,B+=this.endline(y,c,a),c.state=t.None}return this.closeNode(y,c,a),B},O.prototype.writeChildNode=function(y,c,a){switch(y.type){case r.CData:return this.cdata(y,c,a);case r.Comment:return this.comment(y,c,a);case r.Element:return this.element(y,c,a);case r.Raw:return this.raw(y,c,a);case r.Text:return this.text(y,c,a);case r.ProcessingInstruction:return this.processingInstruction(y,c,a);case r.Dummy:return"";case r.Declaration:return this.declaration(y,c,a);case r.DocType:return this.docType(y,c,a);case r.AttributeDeclaration:return this.dtdAttList(y,c,a);case r.ElementDeclaration:return this.dtdElement(y,c,a);case r.EntityDeclaration:return this.dtdEntity(y,c,a);case r.NotationDeclaration:return this.dtdNotation(y,c,a);default:throw new Error("Unknown XML node type: "+y.constructor.name)}},O.prototype.processingInstruction=function(y,c,a){var d;return this.openNode(y,c,a),c.state=t.OpenTag,d=this.indent(y,c,a)+"<?",c.state=t.InsideTag,d+=y.target,y.value&&(d+=" "+y.value),c.state=t.CloseTag,d+=c.spaceBeforeSlash+"?>",d+=this.endline(y,c,a),c.state=t.None,this.closeNode(y,c,a),d},O.prototype.raw=function(y,c,a){var d;return this.openNode(y,c,a),c.state=t.OpenTag,d=this.indent(y,c,a),c.state=t.InsideTag,d+=y.value,c.state=t.CloseTag,d+=this.endline(y,c,a),c.state=t.None,this.closeNode(y,c,a),d},O.prototype.text=function(y,c,a){var d;return this.openNode(y,c,a),c.state=t.OpenTag,d=this.indent(y,c,a),c.state=t.InsideTag,d+=y.value,c.state=t.CloseTag,d+=this.endline(y,c,a),c.state=t.None,this.closeNode(y,c,a),d},O.prototype.dtdAttList=function(y,c,a){var d;return this.openNode(y,c,a),c.state=t.OpenTag,d=this.indent(y,c,a)+"<!ATTLIST",c.state=t.InsideTag,d+=" "+y.elementName+" "+y.attributeName+" "+y.attributeType,y.defaultValueType!=="#D