@sheetxl/studio-vanilla
Version:
SheetXL Studio - Vanilla entry point for integrating SheetXL UI.
7 lines • 80.7 kB
JavaScript
"use strict";/**
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.7.27
*
* (C) 2025-present SheetXL Inc. & Michael T. Ford
* License: The license can be found at https://www.sheetxl.com/license.
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var nr,x={},ne={};function ke(){if(nr)return ne;function S(a,m){return m===void 0&&(m=Object),m&&typeof m.getOwnPropertyDescriptors=="function"&&(a=m.create(null,m.getOwnPropertyDescriptors(a))),m&&typeof m.freeze=="function"?m.freeze(a):a}function c(a,m){return Object.prototype.hasOwnProperty.call(a,m)}nr=1;var I=S({allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,formnovalidate:!0,hidden:!0,ismap:!0,itemscope:!0,loop:!0,multiple:!0,muted:!0,nomodule:!0,novalidate:!0,open:!0,playsinline:!0,readonly:!0,required:!0,reversed:!0,selected:!0}),_=S({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),g=S({script:!1,style:!1,textarea:!0,title:!0});function h(a){return a===H.HTML}var H=S({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),$=Object.keys(H).map(function(a){return H[a]}),j=S({HTML:"http://www.w3.org/1999/xhtml",SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return ne.assign=function(a,m){if(a===null||typeof a!="object")throw new TypeError("target is not an object");for(var p in m)c(m,p)&&(a[p]=m[p]);return a},ne.find=function(a,m,p){if(p===void 0&&(p=Array.prototype),a&&typeof p.find=="function")return p.find.call(a,m);for(var ae=0;ae<a.length;ae++)if(c(a,ae)){var q=a[ae];if(m.call(void 0,q,ae,a))return q}},ne.freeze=S,ne.HTML_BOOLEAN_ATTRIBUTES=I,ne.HTML_RAW_TEXT_ELEMENTS=g,ne.HTML_VOID_ELEMENTS=_,ne.hasDefaultHTMLNamespace=function(a){return h(a)||a===H.XML_XHTML_APPLICATION},ne.hasOwn=c,ne.isHTMLBooleanAttribute=function(a){return c(I,a.toLowerCase())},ne.isHTMLRawTextElement=function(a){var m=a.toLowerCase();return c(g,m)&&!g[m]},ne.isHTMLEscapableRawTextElement=function(a){var m=a.toLowerCase();return c(g,m)&&g[m]},ne.isHTMLMimeType=h,ne.isHTMLVoidElement=function(a){return c(_,a.toLowerCase())},ne.isValidMimeType=function(a){return $.indexOf(a)>-1},ne.MIME_TYPE=H,ne.NAMESPACE=j,ne}var or,Pe={};function Xe(){if(or)return Pe;function S(a,m){a.prototype=Object.create(Error.prototype,{constructor:{value:a},name:{value:a.name,enumerable:!0,writable:m}})}or=1;var c=ke().freeze({Error:"Error",IndexSizeError:"IndexSizeError",DomstringSizeError:"DomstringSizeError",HierarchyRequestError:"HierarchyRequestError",WrongDocumentError:"WrongDocumentError",InvalidCharacterError:"InvalidCharacterError",NoDataAllowedError:"NoDataAllowedError",NoModificationAllowedError:"NoModificationAllowedError",NotFoundError:"NotFoundError",NotSupportedError:"NotSupportedError",InUseAttributeError:"InUseAttributeError",InvalidStateError:"InvalidStateError",SyntaxError:"SyntaxError",InvalidModificationError:"InvalidModificationError",NamespaceError:"NamespaceError",InvalidAccessError:"InvalidAccessError",ValidationError:"ValidationError",TypeMismatchError:"TypeMismatchError",SecurityError:"SecurityError",NetworkError:"NetworkError",AbortError:"AbortError",URLMismatchError:"URLMismatchError",QuotaExceededError:"QuotaExceededError",TimeoutError:"TimeoutError",InvalidNodeTypeError:"InvalidNodeTypeError",DataCloneError:"DataCloneError",EncodingError:"EncodingError",NotReadableError:"NotReadableError",UnknownError:"UnknownError",ConstraintError:"ConstraintError",DataError:"DataError",TransactionInactiveError:"TransactionInactiveError",ReadOnlyError:"ReadOnlyError",VersionError:"VersionError",OperationError:"OperationError",NotAllowedError:"NotAllowedError",OptOutError:"OptOutError"}),I=Object.keys(c);function _(a){return typeof a=="number"&&a>=1&&a<=25}function g(a,m){var p;_(a)?(this.name=I[a],this.message=m||""):(this.message=a,this.name=typeof(p=m)=="string"&&p.substring(p.length-c.Error.length)===c.Error?m:c.Error),Error.captureStackTrace&&Error.captureStackTrace(this,g)}S(g,!0),Object.defineProperties(g.prototype,{code:{enumerable:!0,get:function(){var a=I.indexOf(this.name);return _(a)?a:0}}});for(var h={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},H=Object.entries(h),$=0;$<H.length;$++)g[H[$][0]]=H[$][1];function j(a,m){this.message=a,this.locator=m,Error.captureStackTrace&&Error.captureStackTrace(this,j)}return S(j),Pe.DOMException=g,Pe.DOMExceptionName=c,Pe.ExceptionCode=h,Pe.ParseError=j,Pe}var ar,ir,Z={},O={};function fr(){if(ar)return O;function S(k){try{typeof k!="function"&&(k=RegExp);var V=new k("𝌆","u").exec("𝌆");return!!V&&V[0].length===2}catch{}return!1}ar=1;var c=S();function I(k){if(k.source[0]!=="[")throw new Error(k+" can not be used with chars");return k.source.slice(1,k.source.lastIndexOf("]"))}function _(k,V){if(k.source[0]!=="[")throw new Error("/"+k.source+"/ can not be used with chars_without");if(!V||typeof V!="string")throw new Error(JSON.stringify(V)+" is not a valid search");if(k.source.indexOf(V)===-1)throw new Error('"'+V+'" is not is /'+k.source+"/");if(V==="-"&&k.source.indexOf(V)!==1)throw new Error('"'+V+'" is not at the first postion of /'+k.source+"/");return new RegExp(k.source.replace(V,""),c?"u":"")}function g(k){var V=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(le){var be=typeof le=="string";if(be&&V===void 0&&le==="|")throw new Error("use regg instead of reg to wrap expressions with `|`!");return be?le:le.source}).join(""),c?"mu":"m")}function h(k){if(arguments.length===0)throw new Error("no parameters provided");return g.apply(h,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var H=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;c&&(H=g("[",I(H),"\\u{10000}-\\u{10FFFF}","]"));var $=/[\x20\x09\x0D\x0A]/,j=I($),a=g($,"+"),m=g($,"*"),p=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;c&&(p=g("[",I(p),"\\u{10000}-\\u{10FFFF}","]"));var ae=g("[",I(p),I(/[-.0-9\xB7]/),I(/[\u0300-\u036F\u203F-\u2040]/),"]"),q=g(p,ae,"*"),Q=g(ae,"+"),Ee=g("&",q,";"),ue=h(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),ce=h(Ee,"|",ue),ie=g("%",q,";"),l=h(g('"',h(/[^%&"]/,"|",ie,"|",ce),"*",'"'),"|",g("'",h(/[^%&']/,"|",ie,"|",ce),"*","'")),y=h('"',h(/[^<&"]/,"|",ce),"*",'"',"|","'",h(/[^<&']/,"|",ce),"*","'"),o=g(_(p,":"),_(ae,":"),"*"),i=g(o,h(":",o),"?"),d=g("^",i,"$"),N=g("(",i,")"),T=h(/"[^"]*"|'[^']*'/),u=g(/^<\?/,"(",q,")",h(a,"(",H,"*?)"),"?",/\?>/),D=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,E=h('"',D,'*"',"|","'",_(D,"'"),"*'"),w="<!--",A=g(w,h(_(H,"-"),"|",g("-",_(H,"-"))),"*","-->"),f="#PCDATA",F=h(g(/\(/,m,f,h(m,/\|/,m,i),"*",m,/\)\*/),"|",g(/\(/,m,f,m,/\)/)),C=h("EMPTY","|","ANY","|",F,"|",g(/\([^>]+\)/,/[?*+]?/)),oe=g("<!ELEMENT",a,h(i,"|",ie),a,h(C,"|",ie),m,">"),P=g("NOTATION",a,/\(/,m,q,h(m,/\|/,m,q),"*",m,/\)/),ee=g(/\(/,m,Q,h(m,/\|/,m,Q),"*",m,/\)/),re=h(P,"|",ee),M=h(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",re),K=h(/#REQUIRED|#IMPLIED/,"|",h(h("#FIXED",a),"?",y)),G=g("<!ATTLIST",a,q,h(a,q,a,M,a,K),"*",m,">"),Y="about:legacy-compat",ve=h('"'+Y+'"',"|","'"+Y+"'"),Ne="SYSTEM",fe="PUBLIC",v=h(h(Ne,a,T),"|",h(fe,a,E,a,T)),Te=g("^",h(h(Ne,a,"(?<SystemLiteralOnly>",T,")"),"|",h(fe,a,"(?<PubidLiteral>",E,")",a,"(?<SystemLiteral>",T,")"))),me=h(a,"NDATA",a,q),se="<!ENTITY",Re=g(se,a,q,a,h(l,"|",h(v,me,"?")),m,">"),ye=h(l,"|",v),De=h(Re,"|",g(se,a,"%",a,q,a,ye,m,">")),pe=g(fe,a,E),X=g("<!NOTATION",a,q,a,h(v,"|",pe),m,">"),ge=g(m,"=",m),Se=/1[.]\d+/,_e=g(a,"version",ge,h("'",Se,"'","|",'"',Se,'"')),Ae=/[A-Za-z][-A-Za-z0-9._]*/,Ie=g(/^<\?xml/,_e,h(a,"encoding",ge,h('"',Ae,'"',"|","'",Ae,"'")),"?",h(a,"standalone",ge,h("'",h("yes","|","no"),"'","|",'"',h("yes","|","no"),'"')),"?",m,/\?>/),L=g(H,"*?",/\]\]>/),J=g(/<!\[CDATA\[/,L);return O.chars=I,O.chars_without=_,O.detectUnicodeSupport=S,O.reg=g,O.regg=h,O.ABOUT_LEGACY_COMPAT=Y,O.ABOUT_LEGACY_COMPAT_SystemLiteral=ve,O.AttlistDecl=G,O.CDATA_START="<![CDATA[",O.CDATA_END="]]>",O.CDSect=J,O.Char=H,O.Comment=A,O.COMMENT_START=w,O.COMMENT_END="-->",O.DOCTYPE_DECL_START="<!DOCTYPE",O.elementdecl=oe,O.EntityDecl=De,O.EntityValue=l,O.ExternalID=v,O.ExternalID_match=Te,O.Name=q,O.NotationDecl=X,O.Reference=ce,O.PEReference=ie,O.PI=u,O.PUBLIC=fe,O.PubidLiteral=E,O.QName=i,O.QName_exact=d,O.QName_group=N,O.S=a,O.SChar_s=j,O.S_OPT=m,O.SYSTEM=Ne,O.SystemLiteral=T,O.UNICODE_REPLACEMENT_CHARACTER="�",O.UNICODE_SUPPORT=c,O.XMLDecl=Ie,O}function mr(){if(ir)return Z;ir=1;var S=ke(),c=S.find,I=S.hasDefaultHTMLNamespace,_=S.hasOwn,g=S.isHTMLMimeType,h=S.isHTMLRawTextElement,H=S.isHTMLVoidElement,$=S.MIME_TYPE,j=S.NAMESPACE,a=Symbol(),m=Xe(),p=m.DOMException,ae=m.DOMExceptionName,q=fr();function Q(e){if(e!==a)throw new TypeError("Illegal constructor")}function Ee(e){return e!==""}function ue(e,r){return _(e,r)||(e[r]=!0),e}function ce(e){if(!e)return[];var r,t=(r=e)?r.split(/[\t\n\f\r ]+/).filter(Ee):[];return Object.keys(t.reduce(ue,{}))}function ie(e){if(!q.QName_exact.test(e))throw new p(p.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+e+'"')}function l(e,r){ie(r),e=e||null;var t=null,n=r;if(r.indexOf(":")>=0){var s=r.split(":");t=s[0],n=s[1]}if(t!==null&&e===null)throw new p(p.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(t==="xml"&&e!==S.NAMESPACE.XML)throw new p(p.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if((t==="xmlns"||r==="xmlns")&&e!==S.NAMESPACE.XMLNS)throw new p(p.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(e===S.NAMESPACE.XMLNS&&t!=="xmlns"&&r!=="xmlns")throw new p(p.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[e,t,n]}function y(e,r){for(var t in e)_(e,t)&&(r[t]=e[t])}function o(e,r){var t=e.prototype;if(!(t instanceof r)){let n=function(){};n.prototype=r.prototype,y(t,n=new n),e.prototype=t=n}t.constructor!=e&&(typeof e!="function"&&console.error("unknown Class:"+e),t.constructor=e)}var i={},d=i.ELEMENT_NODE=1,N=i.ATTRIBUTE_NODE=2,T=i.TEXT_NODE=3,u=i.CDATA_SECTION_NODE=4,D=i.ENTITY_REFERENCE_NODE=5,E=i.ENTITY_NODE=6,w=i.PROCESSING_INSTRUCTION_NODE=7,A=i.COMMENT_NODE=8,f=i.DOCUMENT_NODE=9,F=i.DOCUMENT_TYPE_NODE=10,C=i.DOCUMENT_FRAGMENT_NODE=11,oe=i.NOTATION_NODE=12,P=S.freeze({DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:2,DOCUMENT_POSITION_FOLLOWING:4,DOCUMENT_POSITION_CONTAINS:8,DOCUMENT_POSITION_CONTAINED_BY:16,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32});function ee(e,r){if(r.length<e.length)return ee(r,e);var t=null;for(var n in e){if(e[n]!==r[n])return t;t=e[n]}return t}function re(e){return e.guid||(e.guid=Math.random()),e.guid}function M(){}function K(e,r){this._node=e,this._refresh=r,G(this)}function G(e){var r=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==r){var t=e._refresh(e._node);if(rr(e,"length",t.length),!e.$$length||t.length<e.$$length)for(var n=t.length;n in e;n++)_(e,n)&&delete e[n];y(t,e),e._inc=r}}function Y(){}function ve(e,r){for(var t=0;t<e.length;){if(e[t]===r)return t;t++}}function Ne(e,r,t){var n=ve(r,t);if(n>=0){for(var s=r.length-1;n<=s;)r[n]=r[++n];if(r.length=s,e){var b=e.ownerDocument;b&&Re(b,e,t),t.ownerElement=null}}}function fe(){}function v(e){Q(e)}function Te(e){return(e=="<"?"<":e==">"&&">")||e=="&"&&"&"||e=='"'&&"""||"&#"+e.charCodeAt()+";"}function me(e,r){if(r(e))return!0;if(e=e.firstChild)do if(me(e,r))return!0;while(e=e.nextSibling)}function se(e,r){Q(e);var t=r||{};this.ownerDocument=this,this.contentType=t.contentType||$.XML_APPLICATION,this.type=g(this.contentType)?"html":"xml"}function Re(e,r,t,n){e&&e._inc++,t.namespaceURI===j.XMLNS&&delete r._nsMap[t.prefix?t.localName:""]}function ye(e,r,t){if(e&&e._inc){e._inc++;var n=r.childNodes;if(t&&!t.nextSibling)n[n.length++]=t;else{for(var s=r.firstChild,b=0;s;)n[b++]=s,s=s.nextSibling;n.length=b,delete n[n.length]}}}function De(e,r){if(e!==r.parentNode)throw new p(p.NOT_FOUND_ERR,"child's parent is not parent");var t=r.previousSibling,n=r.nextSibling;return t?t.nextSibling=n:e.firstChild=n,n?n.previousSibling=t:e.lastChild=t,ye(e.ownerDocument,e),r.parentNode=null,r.previousSibling=null,r.nextSibling=null,r}function pe(e){return e&&e.nodeType===v.DOCUMENT_TYPE_NODE}function X(e){return e&&e.nodeType===v.ELEMENT_NODE}function ge(e){return e&&e.nodeType===v.TEXT_NODE}function Se(e,r){var t=e.childNodes||[];if(c(t,X)||pe(r))return!1;var n=c(t,pe);return!(r&&n&&t.indexOf(n)>t.indexOf(r))}function _e(e,r){var t=e.childNodes||[];if(c(t,function(s){return X(s)&&s!==r}))return!1;var n=c(t,pe);return!(r&&n&&t.indexOf(n)>t.indexOf(r))}function Ae(e,r,t){var n=e.childNodes||[],s=r.childNodes||[];if(r.nodeType===v.DOCUMENT_FRAGMENT_NODE){var b=s.filter(X);if(b.length>1||c(s,ge))throw new p(p.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(b.length===1&&!Se(e,t))throw new p(p.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(X(r)&&!Se(e,t))throw new p(p.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(pe(r)){if(c(n,pe))throw new p(p.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var U=c(n,X);if(t&&n.indexOf(U)<n.indexOf(t))throw new p(p.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!t&&U)throw new p(p.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function Ie(e,r,t){var n=e.childNodes||[],s=r.childNodes||[];if(r.nodeType===v.DOCUMENT_FRAGMENT_NODE){var b=s.filter(X);if(b.length>1||c(s,ge))throw new p(p.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(b.length===1&&!_e(e,t))throw new p(p.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(X(r)&&!_e(e,t))throw new p(p.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(pe(r)){if(c(n,function(R){return pe(R)&&R!==t}))throw new p(p.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var U=c(n,X);if(t&&n.indexOf(U)<n.indexOf(t))throw new p(p.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function L(e,r,t,n){(function(B,W,z){if(!(de=B)||de.nodeType!==v.DOCUMENT_NODE&&de.nodeType!==v.DOCUMENT_FRAGMENT_NODE&&de.nodeType!==v.ELEMENT_NODE)throw new p(p.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+B.nodeType);var de;if(z&&z.parentNode!==B)throw new p(p.NOT_FOUND_ERR,"child not in parent");if(!(function(te){return te&&(te.nodeType===v.CDATA_SECTION_NODE||te.nodeType===v.COMMENT_NODE||te.nodeType===v.DOCUMENT_FRAGMENT_NODE||te.nodeType===v.DOCUMENT_TYPE_NODE||te.nodeType===v.ELEMENT_NODE||te.nodeType===v.PROCESSING_INSTRUCTION_NODE||te.nodeType===v.TEXT_NODE)})(W)||pe(W)&&B.nodeType!==v.DOCUMENT_NODE)throw new p(p.HIERARCHY_REQUEST_ERR,"Unexpected node type "+W.nodeType+" for parent node type "+B.nodeType)})(e,r,t),e.nodeType===v.DOCUMENT_NODE&&(n||Ae)(e,r,t);var s=r.parentNode;if(s&&s.removeChild(r),r.nodeType===C){var b=r.firstChild;if(b==null)return r;var U=r.lastChild}else b=U=r;var R=t?t.previousSibling:e.lastChild;b.previousSibling=R,U.nextSibling=t,R?R.nextSibling=b:e.firstChild=b,t==null?e.lastChild=U:t.previousSibling=U;do b.parentNode=e;while(b!==U&&(b=b.nextSibling));return ye(e.ownerDocument||e,e,r),r.nodeType==C&&(r.firstChild=r.lastChild=null),r}function J(e){Q(e),this._nsMap=Object.create(null)}function k(e){Q(e),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}function V(e){Q(e)}function le(e){Q(e)}function be(e){Q(e)}function xe(e){Q(e)}function Be(e){Q(e)}function ze(e){Q(e)}function je(e){Q(e)}function Fe(e){Q(e)}function He(e){Q(e)}function Ge(e){Q(e)}function $e(){}function Je(e){var r=[],t=this.nodeType===f&&this.documentElement||this,n=t.prefix,s=t.namespaceURI;if(s&&n==null&&(n=t.lookupPrefix(s))==null)var b=[{namespace:s,prefix:null}];return Le(this,r,e,b),r.join("")}function Ke(e,r,t){var n=e.prefix||"",s=e.namespaceURI;if(!s||n==="xml"&&s===j.XML||s===j.XMLNS)return!1;for(var b=t.length;b--;){var U=t[b];if(U.prefix===n)return U.namespace!==s}return!0}function Qe(e,r,t){e.push(" ",r,'="',t.replace(/[<>&"\t\n\r]/g,Te),'"')}function Le(e,r,t,n){n||(n=[]);var s=(e.nodeType===f?e:e.ownerDocument).type==="html";if(t){if(!(e=t(e)))return;if(typeof e=="string")return void r.push(e)}switch(e.nodeType){case d:var b=e.attributes,U=b.length,R=e.firstChild,B=e.tagName,W=B;if(!s&&!e.prefix&&e.namespaceURI){for(var z,de=0;de<b.length;de++)if(b.item(de).name==="xmlns"){z=b.item(de).value;break}if(!z){for(var te=n.length-1;te>=0;te--)if((he=n[te]).prefix===""&&he.namespace===e.namespaceURI){z=he.namespace;break}}if(z!==e.namespaceURI)for(te=n.length-1;te>=0;te--){var he;if((he=n[te]).namespace===e.namespaceURI){he.prefix&&(W=he.prefix+":"+B);break}}}r.push("<",W);for(var Oe=0;Oe<U;Oe++)(we=b.item(Oe)).prefix=="xmlns"?n.push({prefix:we.localName,namespace:we.value}):we.nodeName=="xmlns"&&n.push({prefix:"",namespace:we.value});for(Oe=0;Oe<U;Oe++){var we,Me,Ye;Ke(we=b.item(Oe),0,n)&&(Qe(r,(Me=we.prefix||"")?"xmlns:"+Me:"xmlns",Ye=we.namespaceURI),n.push({prefix:Me,namespace:Ye})),Le(we,r,t,n)}B===W&&Ke(e,0,n)&&(Qe(r,(Me=e.prefix||"")?"xmlns:"+Me:"xmlns",Ye=e.namespaceURI),n.push({prefix:Me,namespace:Ye}));var Ze=!R;if(Ze&&(s||e.namespaceURI===j.HTML)&&(Ze=H(B)),Ze)r.push("/>");else{if(r.push(">"),s&&h(B))for(;R;)R.data?r.push(R.data):Le(R,r,t,n.slice()),R=R.nextSibling;else for(;R;)Le(R,r,t,n.slice()),R=R.nextSibling;r.push("</",W,">")}return;case f:case C:for(R=e.firstChild;R;)Le(R,r,t,n.slice()),R=R.nextSibling;return;case N:return Qe(r,e.name,e.value);case T:return r.push(e.data.replace(/[<&>]/g,Te));case u:return r.push(q.CDATA_START,e.data,q.CDATA_END);case A:return r.push(q.COMMENT_START,e.data,q.COMMENT_END);case F:var tr=e.publicId,qe=e.systemId;return r.push(q.DOCTYPE_DECL_START," ",e.name),tr?(r.push(" ",q.PUBLIC," ",tr),qe&&qe!=="."&&r.push(" ",qe)):qe&&qe!=="."&&r.push(" ",q.SYSTEM," ",qe),e.internalSubset&&r.push(" [",e.internalSubset,"]"),void r.push(">");case w:return r.push("<?",e.target," ",e.data,"?>");case D:return r.push("&",e.nodeName,";");default:r.push("??",e.nodeName)}}function er(e,r,t){var n;switch(r.nodeType){case d:(n=r.cloneNode(!1)).ownerDocument=e;case C:break;case N:t=!0}if(n||(n=r.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,t)for(var s=r.firstChild;s;)n.appendChild(er(e,s,t)),s=s.nextSibling;return n}function We(e,r,t){var n=new r.constructor(a);for(var s in r)if(_(r,s)){var b=r[s];typeof b!="object"&&b!=n[s]&&(n[s]=b)}switch(r.childNodes&&(n.childNodes=new M),n.ownerDocument=e,n.nodeType){case d:var U=r.attributes,R=n.attributes=new Y,B=U.length;R._ownerElement=n;for(var W=0;W<B;W++)n.setAttributeNode(We(e,U.item(W),!0));break;case N:t=!0}if(t)for(var z=r.firstChild;z;)n.appendChild(We(e,z,t)),z=z.nextSibling;return n}function rr(e,r,t){e[r]=t}M.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e){for(var r=[],t=0;t<this.length;t++)Le(this[t],r,e);return r.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},M.prototype[Symbol.iterator]=function(){var e=this,r=0;return{next:function(){return r<e.length?{value:e[r++],done:!1}:{done:!0}},return:function(){return{done:!0}}}},K.prototype.item=function(e){return G(this),this[e]||null},o(K,M),Y.prototype={length:0,item:M.prototype.item,getNamedItem:function(e){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());for(var r=0;r<this.length;){var t=this[r];if(t.nodeName===e)return t;r++}return null},setNamedItem:function(e){var r=e.ownerElement;if(r&&r!==this._ownerElement)throw new p(p.INUSE_ATTRIBUTE_ERR);var t=this.getNamedItemNS(e.namespaceURI,e.localName);return t===e?e:((function(n,s,b,U){if(U?s[ve(s,U)]=b:(s[s.length]=b,s.length++),n){b.ownerElement=n;var R=n.ownerDocument;R&&(U&&Re(R,n,U),W=n,z=b,(B=R)&&B._inc++,z.namespaceURI===j.XMLNS&&(W._nsMap[z.prefix?z.localName:""]=z.value))}var B,W,z})(this._ownerElement,this,e,t),t)},setNamedItemNS:function(e){return this.setNamedItem(e)},removeNamedItem:function(e){var r=this.getNamedItem(e);if(!r)throw new p(p.NOT_FOUND_ERR,e);return Ne(this._ownerElement,this,r),r},removeNamedItemNS:function(e,r){var t=this.getNamedItemNS(e,r);if(!t)throw new p(p.NOT_FOUND_ERR,e?e+" : "+r:r);return Ne(this._ownerElement,this,t),t},getNamedItemNS:function(e,r){e||(e=null);for(var t=0;t<this.length;){var n=this[t];if(n.localName===r&&n.namespaceURI===e)return n;t++}return null}},Y.prototype[Symbol.iterator]=function(){var e=this,r=0;return{next:function(){return r<e.length?{value:e[r++],done:!1}:{done:!0}},return:function(){return{done:!0}}}},fe.prototype={hasFeature:function(e,r){return!0},createDocument:function(e,r,t){var n=$.XML_APPLICATION;e===j.HTML?n=$.XML_XHTML_APPLICATION:e===j.SVG&&(n=$.XML_SVG_IMAGE);var s=new se(a,{contentType:n});if(s.implementation=this,s.childNodes=new M,s.doctype=t||null,t&&s.appendChild(t),r){var b=s.createElementNS(e,r);s.appendChild(b)}return s},createDocumentType:function(e,r,t,n){ie(e);var s=new Be(a);return s.name=e,s.nodeName=e,s.publicId=r||"",s.systemId=t||"",s.internalSubset=n||"",s.childNodes=new M,s},createHTMLDocument:function(e){var r=new se(a,{contentType:$.HTML});if(r.implementation=this,r.childNodes=new M,e!==!1){r.doctype=this.createDocumentType("html"),r.doctype.ownerDocument=r,r.appendChild(r.doctype);var t=r.createElement("html");r.appendChild(t);var n=r.createElement("head");if(t.appendChild(n),typeof e=="string"){var s=r.createElement("title");s.appendChild(r.createTextNode(e)),n.appendChild(s)}t.appendChild(r.createElement("body"))}return r}},v.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,parentNode:null,get parentElement(){return this.parentNode&&this.parentNode.nodeType===this.ELEMENT_NODE?this.parentNode:null},childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,baseURI:"about:blank",get isConnected(){var e=this.getRootNode();return e&&e.nodeType===e.DOCUMENT_NODE},contains:function(e){if(!e)return!1;var r=e;do{if(this===r)return!0;r=e.parentNode}while(r);return!1},getRootNode:function(e){var r=this;do{if(!r.parentNode)return r;r=r.parentNode}while(r)},isEqualNode:function(e){if(!e||this.nodeType!==e.nodeType)return!1;switch(this.nodeType){case this.DOCUMENT_TYPE_NODE:if(this.name!==e.name||this.publicId!==e.publicId||this.systemId!==e.systemId)return!1;break;case this.ELEMENT_NODE:if(this.namespaceURI!==e.namespaceURI||this.prefix!==e.prefix||this.localName!==e.localName||this.attributes.length!==e.attributes.length)return!1;for(var r=0;r<this.attributes.length;r++){var t=this.attributes.item(r);if(!t.isEqualNode(e.getAttributeNodeNS(t.namespaceURI,t.localName)))return!1}break;case this.ATTRIBUTE_NODE:if(this.namespaceURI!==e.namespaceURI||this.localName!==e.localName||this.value!==e.value)return!1;break;case this.PROCESSING_INSTRUCTION_NODE:if(this.target!==e.target||this.data!==e.data)return!1;break;case this.TEXT_NODE:case this.COMMENT_NODE:if(this.data!==e.data)return!1}if(this.childNodes.length!==e.childNodes.length)return!1;for(r=0;r<this.childNodes.length;r++)if(!this.childNodes[r].isEqualNode(e.childNodes[r]))return!1;return!0},isSameNode:function(e){return this===e},insertBefore:function(e,r){return L(this,e,r)},replaceChild:function(e,r){L(this,e,r,Ie),r&&this.removeChild(r)},removeChild:function(e){return De(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(e){return We(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var r=e.nextSibling;r&&r.nodeType==T&&e.nodeType==T?(this.removeChild(r),e.appendData(r.data)):(e.normalize(),e=r)}},isSupported:function(e,r){return this.ownerDocument.implementation.hasFeature(e,r)},lookupPrefix:function(e){for(var r=this;r;){var t=r._nsMap;if(t){for(var n in t)if(_(t,n)&&t[n]===e)return n}r=r.nodeType==N?r.ownerDocument:r.parentNode}return null},lookupNamespaceURI:function(e){for(var r=this;r;){var t=r._nsMap;if(t&&_(t,e))return t[e];r=r.nodeType==N?r.ownerDocument:r.parentNode}return null},isDefaultNamespace:function(e){return this.lookupPrefix(e)==null},compareDocumentPosition:function(e){if(this===e)return 0;var r=e,t=this,n=null,s=null;if(r instanceof k&&(r=(n=r).ownerElement),t instanceof k&&(t=(s=t).ownerElement,n&&r&&t===r))for(var b,U=0;b=t.attributes[U];U++){if(b===n)return P.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+P.DOCUMENT_POSITION_PRECEDING;if(b===s)return P.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+P.DOCUMENT_POSITION_FOLLOWING}if(!r||!t||t.ownerDocument!==r.ownerDocument)return P.DOCUMENT_POSITION_DISCONNECTED+P.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(re(t.ownerDocument)>re(r.ownerDocument)?P.DOCUMENT_POSITION_FOLLOWING:P.DOCUMENT_POSITION_PRECEDING);if(s&&r===t)return P.DOCUMENT_POSITION_CONTAINS+P.DOCUMENT_POSITION_PRECEDING;if(n&&r===t)return P.DOCUMENT_POSITION_CONTAINED_BY+P.DOCUMENT_POSITION_FOLLOWING;for(var R=[],B=r.parentNode;B;){if(!s&&B===t)return P.DOCUMENT_POSITION_CONTAINED_BY+P.DOCUMENT_POSITION_FOLLOWING;R.push(B),B=B.parentNode}R.reverse();for(var W=[],z=t.parentNode;z;){if(!n&&z===r)return P.DOCUMENT_POSITION_CONTAINS+P.DOCUMENT_POSITION_PRECEDING;W.push(z),z=z.parentNode}W.reverse();var de=ee(R,W);for(var te in de.childNodes){var he=de.childNodes[te];if(he===t)return P.DOCUMENT_POSITION_FOLLOWING;if(he===r)return P.DOCUMENT_POSITION_PRECEDING;if(W.indexOf(he)>=0)return P.DOCUMENT_POSITION_FOLLOWING;if(R.indexOf(he)>=0)return P.DOCUMENT_POSITION_PRECEDING}return 0}},y(i,v),y(i,v.prototype),y(P,v),y(P,v.prototype),se.prototype={implementation:null,nodeName:"#document",nodeType:f,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,r){if(e.nodeType===C){for(var t=e.firstChild;t;){var n=t.nextSibling;this.insertBefore(t,r),t=n}return e}return L(this,e,r),e.ownerDocument=this,this.documentElement===null&&e.nodeType===d&&(this.documentElement=e),e},removeChild:function(e){var r=De(this,e);return r===this.documentElement&&(this.documentElement=null),r},replaceChild:function(e,r){L(this,e,r,Ie),e.ownerDocument=this,r&&this.removeChild(r),X(e)&&(this.documentElement=e)},importNode:function(e,r){return er(this,e,r)},getElementById:function(e){var r=null;return me(this.documentElement,function(t){if(t.nodeType==d&&t.getAttribute("id")==e)return r=t,!0}),r},createElement:function(e){var r=new J(a);return r.ownerDocument=this,this.type==="html"&&(e=e.toLowerCase()),I(this.contentType)&&(r.namespaceURI=j.HTML),r.nodeName=e,r.tagName=e,r.localName=e,r.childNodes=new M,(r.attributes=new Y)._ownerElement=r,r},createDocumentFragment:function(){var e=new He(a);return e.ownerDocument=this,e.childNodes=new M,e},createTextNode:function(e){var r=new le(a);return r.ownerDocument=this,r.childNodes=new M,r.appendData(e),r},createComment:function(e){var r=new be(a);return r.ownerDocument=this,r.childNodes=new M,r.appendData(e),r},createCDATASection:function(e){var r=new xe(a);return r.ownerDocument=this,r.childNodes=new M,r.appendData(e),r},createProcessingInstruction:function(e,r){var t=new Ge(a);return t.ownerDocument=this,t.childNodes=new M,t.nodeName=t.target=e,t.nodeValue=t.data=r,t},createAttribute:function(e){if(!q.QName_exact.test(e))throw new p(p.INVALID_CHARACTER_ERR,'invalid character in name "'+e+'"');return this.type==="html"&&(e=e.toLowerCase()),this._createAttribute(e)},_createAttribute:function(e){var r=new k(a);return r.ownerDocument=this,r.childNodes=new M,r.name=e,r.nodeName=e,r.localName=e,r.specified=!0,r},createEntityReference:function(e){if(!q.Name.test(e))throw new p(p.INVALID_CHARACTER_ERR,'not a valid xml name "'+e+'"');if(this.type==="html")throw new p("document is an html document",ae.NotSupportedError);var r=new Fe(a);return r.ownerDocument=this,r.childNodes=new M,r.nodeName=e,r},createElementNS:function(e,r){var t=l(e,r),n=new J(a),s=n.attributes=new Y;return n.childNodes=new M,n.ownerDocument=this,n.nodeName=r,n.tagName=r,n.namespaceURI=t[0],n.prefix=t[1],n.localName=t[2],s._ownerElement=n,n},createAttributeNS:function(e,r){var t=l(e,r),n=new k(a);return n.ownerDocument=this,n.childNodes=new M,n.nodeName=r,n.name=r,n.specified=!0,n.namespaceURI=t[0],n.prefix=t[1],n.localName=t[2],n}},o(se,v),J.prototype={nodeType:d,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return this.ownerDocument.type==="html"&&this.namespaceURI===j.HTML},hasAttributes:function(){return!(!this.attributes||!this.attributes.length)},hasAttribute:function(e){return!!this.getAttributeNode(e)},getAttribute:function(e){var r=this.getAttributeNode(e);return r?r.value:null},getAttributeNode:function(e){return this._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase()),this.attributes.getNamedItem(e)},setAttribute:function(e,r){this._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());var t=this.getAttributeNode(e);t?t.value=t.nodeValue=""+r:((t=this.ownerDocument._createAttribute(e)).value=t.nodeValue=""+r,this.setAttributeNode(t))},removeAttribute:function(e){var r=this.getAttributeNode(e);r&&this.removeAttributeNode(r)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,r){var t=this.getAttributeNodeNS(e,r);t&&this.removeAttributeNode(t)},hasAttributeNS:function(e,r){return this.getAttributeNodeNS(e,r)!=null},getAttributeNS:function(e,r){var t=this.getAttributeNodeNS(e,r);return t?t.value:null},setAttributeNS:function(e,r,t){var n=l(e,r)[2],s=this.getAttributeNodeNS(e,n);s?s.value=s.nodeValue=""+t:((s=this.ownerDocument.createAttributeNS(e,r)).value=s.nodeValue=""+t,this.setAttributeNode(s))},getAttributeNodeNS:function(e,r){return this.attributes.getNamedItemNS(e,r)},getElementsByClassName:function(e){var r=ce(e);return new K(this,function(t){var n=[];return r.length>0&&me(t,function(s){if(s!==t&&s.nodeType===d){var b=s.getAttribute("class");if(b){var U=e===b;if(!U){var R=ce(b);U=r.every((B=R,function(W){return B&&B.indexOf(W)!==-1}))}U&&n.push(s)}}var B}),n})},getElementsByTagName:function(e){var r=(this.nodeType===f?this:this.ownerDocument).type==="html",t=e.toLowerCase();return new K(this,function(n){var s=[];return me(n,function(b){b!==n&&b.nodeType===d&&(e==="*"||b.getQualifiedName()===(r&&b.namespaceURI===j.HTML?t:e))&&s.push(b)}),s})},getElementsByTagNameNS:function(e,r){return new K(this,function(t){var n=[];return me(t,function(s){s===t||s.nodeType!==d||e!=="*"&&s.namespaceURI!==e||r!=="*"&&s.localName!=r||n.push(s)}),n})}},se.prototype.getElementsByClassName=J.prototype.getElementsByClassName,se.prototype.getElementsByTagName=J.prototype.getElementsByTagName,se.prototype.getElementsByTagNameNS=J.prototype.getElementsByTagNameNS,o(J,v),k.prototype.nodeType=N,o(k,v),V.prototype={data:"",substringData:function(e,r){return this.data.substring(e,e+r)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,r){this.replaceData(e,0,r)},deleteData:function(e,r){this.replaceData(e,r,"")},replaceData:function(e,r,t){t=this.data.substring(0,e)+t+this.data.substring(e+r),this.nodeValue=this.data=t,this.length=t.length}},o(V,v),le.prototype={nodeName:"#text",nodeType:T,splitText:function(e){var r=this.data,t=r.substring(e);r=r.substring(0,e),this.data=this.nodeValue=r,this.length=r.length;var n=this.ownerDocument.createTextNode(t);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},o(le,V),be.prototype={nodeName:"#comment",nodeType:A},o(be,V),xe.prototype={nodeName:"#cdata-section",nodeType:u},o(xe,le),Be.prototype.nodeType=F,o(Be,v),ze.prototype.nodeType=oe,o(ze,v),je.prototype.nodeType=E,o(je,v),Fe.prototype.nodeType=D,o(Fe,v),He.prototype.nodeName="#document-fragment",He.prototype.nodeType=C,o(He,v),Ge.prototype.nodeType=w,o(Ge,V),$e.prototype.serializeToString=function(e,r){return Je.call(e,r)},v.prototype.toString=Je;try{if(Object.defineProperty){let e=function(r){switch(r.nodeType){case d:case C:var t=[];for(r=r.firstChild;r;)r.nodeType!==7&&r.nodeType!==8&&t.push(e(r)),r=r.nextSibling;return t.join("");default:return r.nodeValue}};Object.defineProperty(K.prototype,"length",{get:function(){return G(this),this.$$length}}),Object.defineProperty(v.prototype,"textContent",{get:function(){return e(this)},set:function(r){switch(this.nodeType){case d:case C:for(;this.firstChild;)this.removeChild(this.firstChild);(r||String(r))&&this.appendChild(this.ownerDocument.createTextNode(r));break;default:this.data=r,this.value=r,this.nodeValue=r}}}),rr=function(r,t,n){r["$$"+t]=n}}}catch{}return Z._updateLiveList=G,Z.Attr=k,Z.CDATASection=xe,Z.CharacterData=V,Z.Comment=be,Z.Document=se,Z.DocumentFragment=He,Z.DocumentType=Be,Z.DOMImplementation=fe,Z.Element=J,Z.Entity=je,Z.EntityReference=Fe,Z.LiveNodeList=K,Z.NamedNodeMap=Y,Z.Node=v,Z.NodeList=M,Z.Notation=ze,Z.Text=le,Z.ProcessingInstruction=Ge,Z.XMLSerializer=$e,Z}var sr,Ce={},lr={},cr,ur,pr,Ve={};function hr(){if(cr)return Ve;cr=1;var S=ke(),c=fr(),I=Xe(),_=S.isHTMLEscapableRawTextElement,g=S.isHTMLMimeType,h=S.isHTMLRawTextElement,H=S.hasOwn,$=S.NAMESPACE,j=I.ParseError,a=I.DOMException;function m(){}m.prototype={parse:function(o,i,d){var N=this.domBuilder;N.startDocument(),ue(i,i=Object.create(null)),(function(T,u,D,E,w){var A=g(E.mimeType);function f(L){var J=L[L.length-1]===";"?L:L+";";if(!A&&J!==L)return w.error("EntityRef: expecting ;"),L;var k=c.Reference.exec(J);if(!k||k[0].length!==J.length)return w.error("entity not matching Reference production: "+L),L;var V=J.slice(1,-1);return H(D,V)?D[V]:V.charAt(0)==="#"?(function(le){if(le>65535){var be=55296+((le-=65536)>>10),xe=56320+(1023&le);return String.fromCharCode(be,xe)}return String.fromCharCode(le)})(parseInt(V.substring(1).replace("x","0x"))):(w.error("entity not found:"+L),L)}function F(L){if(L>G){var J=T.substring(G,L).replace(p,f);ee&&re(G),E.characters(J,0,L-G),G=L}}T.indexOf(c.UNICODE_REPLACEMENT_CHARACTER)>=0&&w.warning("Unicode replacement character detected, source encoding issues?");var C=0,oe=0,P=/\r\n?|\n|$/g,ee=E.locator;function re(L,J){for(;L>=oe&&(J=P.exec(T));)C=oe,oe=J.index+J[0].length,ee.lineNumber++;ee.columnNumber=L-C+1}for(var M=[{currentNSMap:u}],K=[],G=0;;){try{var Y=T.indexOf("<",G);if(Y<0){if(!A&&K.length>0)return w.fatalError("unclosed xml tag(s): "+K.join(", "));if(!T.substring(G).match(/^\s*$/)){var ve=E.doc,Ne=ve.createTextNode(T.substring(G));if(ve.documentElement)return w.error("Extra content at the end of the document");ve.appendChild(Ne),E.currentElement=Ne}return}if(Y>G){var fe=T.substring(G,Y);A||K.length!==0||(fe=fe.replace(new RegExp(c.S_OPT.source,"g"),""))&&w.error("Unexpected content outside root element: '"+fe+"'"),F(Y)}switch(T.charAt(Y+1)){case"/":var v=T.indexOf(">",Y+2),Te=T.substring(Y+2,v>0?v:void 0);if(!Te)return w.fatalError("end tag name missing");var me=v>0&&c.reg("^",c.QName_group,c.S_OPT,"$").exec(Te);if(!me)return w.fatalError('end tag name contains invalid characters: "'+Te+'"');if(!E.currentElement&&!E.doc.documentElement)return;var se=K[K.length-1]||E.currentElement.tagName||E.doc.documentElement.tagName||"";if(se!==me[1]){var Re=me[1].toLowerCase();if(!A||se.toLowerCase()!==Re)return w.fatalError('Opening and ending tag mismatch: "'+se+'" != "'+Te+'"')}var ye=M.pop();K.pop();var De=ye.localNSMap;if(E.endElement(ye.uri,ye.localName,se),De)for(var pe in De)H(De,pe)&&E.endPrefixMapping(pe);v++;break;case"?":ee&&re(Y),v=l(T,Y,E,w);break;case"!":ee&&re(Y),v=ie(T,Y,E,w,A);break;default:ee&&re(Y);var X=new y,ge=M[M.length-1].currentNSMap,Se=(v=q(T,Y,X,ge,f,w,A),X.length);if(X.closed||(A&&S.isHTMLVoidElement(X.tagName)?X.closed=!0:K.push(X.tagName)),ee&&Se){for(var _e=ae(ee,{}),Ae=0;Ae<Se;Ae++){var Ie=X[Ae];re(Ie.offset),Ie.locator=ae(ee,{})}E.locator=_e,Q(X,E,ge)&&M.push(X),E.locator=ee}else Q(X,E,ge)&&M.push(X);A&&!X.closed?v=Ee(T,v,X.tagName,f,E):v++}}catch(L){if(L instanceof j)throw L;if(L instanceof a)throw new j(L.name+": "+L.message,E.locator,L);w.error("element parse error: "+L),v=-1}v>G?G=v:F(Math.max(Y,G)+1)}})(o,i,d,N,this.errorHandler),N.endDocument()}};var p=/&#?\w+;?/g;function ae(o,i){return i.lineNumber=o.lineNumber,i.columnNumber=o.columnNumber,i}function q(o,i,d,N,T,u,D){function E(oe,P,ee){return H(d.attributeNames,oe)?u.fatalError("Attribute "+oe+" redefined"):!D&&P.indexOf("<")>=0?u.fatalError("Unescaped '<' not allowed in attributes values"):void d.addValue(oe,P.replace(/[\t\n\r]/g," ").replace(p,T),ee)}for(var w,A=++i,f=0;;){var F=o.charAt(A);switch(F){case"=":if(f===1)w=o.slice(i,A),f=3;else{if(f!==2)throw new Error("attribute equal must after attrName");f=3}break;case"'":case'"':if(f===3||f===1){if(f===1&&(u.warning('attribute value must after "="'),w=o.slice(i,A)),i=A+1,!((A=o.indexOf(F,i))>0))throw new Error("attribute value no end '"+F+"' match");E(w,C=o.slice(i,A),i-1),f=5}else{if(f!=4)throw new Error('attribute value must after "="');E(w,C=o.slice(i,A),i),u.warning('attribute "'+w+'" missed start quot('+F+")!!"),i=A+1,f=5}break;case"/":switch(f){case 0:d.setTagName(o.slice(i,A));case 5:case 6:case 7:f=7,d.closed=!0;case 4:case 1:break;case 2:d.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return u.error("unexpected end of input"),f==0&&d.setTagName(o.slice(i,A)),A;case">":switch(f){case 0:d.setTagName(o.slice(i,A));case 5:case 6:case 7:break;case 4:case 1:(C=o.slice(i,A)).slice(-1)==="/"&&(d.closed=!0,C=C.slice(0,-1));case 2:f===2&&(C=w),f==4?(u.warning('attribute "'+C+'" missed quot(")!'),E(w,C,i)):(D||u.warning('attribute "'+C+'" missed value!! "'+C+'" instead!!'),E(C,C,i));break;case 3:if(!D)return u.fatalError(`AttValue: ' or " expected`)}return A;case"":F=" ";default:if(F<=" ")switch(f){case 0:d.setTagName(o.slice(i,A)),f=6;break;case 1:w=o.slice(i,A),f=2;break;case 4:var C=o.slice(i,A);u.warning('attribute "'+C+'" missed quot(")!!'),E(w,C,i);case 5:f=6}else switch(f){case 2:D||u.warning('attribute "'+w+'" missed value!! "'+w+'" instead2!!'),E(w,w,i),i=A,f=1;break;case 5:u.warning('attribute space is required"'+w+'"!!');case 6:f=1,i=A;break;case 3:f=4,i=A;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}A++}}function Q(o,i,d){for(var N=o.tagName,T=null,u=o.length;u--;){var D=o[u],E=D.qName,w=D.value;if((C=E.indexOf(":"))>0)var A=D.prefix=E.slice(0,C),f=E.slice(C+1),F=A==="xmlns"&&f;else f=E,A=null,F=E==="xmlns"&&"";D.localName=f,F!==!1&&(T==null&&(T=Object.create(null),ue(d,d=Object.create(null))),d[F]=T[F]=w,D.uri=$.XMLNS,i.startPrefixMapping(F,w))}for(u=o.length;u--;)(D=o[u]).prefix&&(D.prefix==="xml"&&(D.uri=$.XML),D.prefix!=="xmlns"&&(D.uri=d[D.prefix]));var C;(C=N.indexOf(":"))>0?(A=o.prefix=N.slice(0,C),f=o.localName=N.slice(C+1)):(A=null,f=o.localName=N);var oe=o.uri=d[A||""];if(i.startElement(oe,f,N,o),!o.closed)return o.currentNSMap=d,o.localNSMap=T,!0;if(i.endElement(oe,f,N),T)for(A in T)H(T,A)&&i.endPrefixMapping(A)}function Ee(o,i,d,N,T){var u=_(d);if(u||h(d)){var D=o.indexOf("</"+d+">",i),E=o.substring(i+1,D);return u&&(E=E.replace(p,N)),T.characters(E,0,E.length),D}return i+1}function ue(o,i){for(var d in o)H(o,d)&&(i[d]=o[d])}function ce(o,i){var d=i;function N(D){return D=D||0,o.charAt(d+D)}function T(D){d+=D=D||1}function u(){return o.substring(d)}return{char:N,getIndex:function(){return d},getMatch:function(D){var E=c.reg("^",D).exec(u());return E?(T(E[0].length),E[0]):null},getSource:function(){return o},skip:T,skipBlanks:function(){for(var D=0;d<o.length;){var E=N();if(E!==" "&&E!==`
`&&E!==" "&&E!=="\r")return D;D++,T()}return-1},substringFromIndex:u,substringStartsWith:function(D){return o.substring(d,d+D.length)===D},substringStartsWithCaseInsensitive:function(D){return o.substring(d,d+D.length).toUpperCase()===D.toUpperCase()}}}function ie(o,i,d,N,T){var u=ce(o,i);switch(T?u.char(2).toUpperCase():u.char(2)){case"-":var D=u.getMatch(c.Comment);return D?(d.comment(D,c.COMMENT_START.length,D.length-c.COMMENT_START.length-c.COMMENT_END.length),u.getIndex()):N.fatalError("comment is not well-formed at position "+u.getIndex());case"[":var E=u.getMatch(c.CDSect);return E?T||d.currentElement?(d.startCDATA(),d.characters(E,c.CDATA_START.length,E.length-c.CDATA_START.length-c.CDATA_END.length),d.endCDATA(),u.getIndex()):N.fatalError("CDATA outside of element"):N.fatalError("Invalid CDATA starting at position "+i);case"D":if(d.doc&&d.doc.documentElement)return N.fatalError("Doctype not allowed inside or after documentElement at position "+u.getIndex());if(T?!u.substringStartsWithCaseInsensitive(c.DOCTYPE_DECL_START):!u.substringStartsWith(c.DOCTYPE_DECL_START))return N.fatalError("Expected "+c.DOCTYPE_DECL_START+" at position "+u.getIndex());if(u.skip(c.DOCTYPE_DECL_START.length),u.skipBlanks()<1)return N.fatalError("Expected whitespace after "+c.DOCTYPE_DECL_START+" at position "+u.getIndex());var w={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(w.name=u.getMatch(c.Name),!w.name)return N.fatalError("doctype name missing or contains unexpected characters at position "+u.getIndex());if(T&&w.name.toLowerCase()!=="html"&&N.warning("Unexpected DOCTYPE in HTML document at position "+u.getIndex()),u.skipBlanks(),u.substringStartsWith(c.PUBLIC)||u.substringStartsWith(c.SYSTEM)){var A=c.ExternalID_match.exec(u.substringFromIndex());if(!A)return N.fatalError("doctype external id is not well-formed at position "+u.getIndex());A.groups.SystemLiteralOnly!==void 0?w.systemId=A.groups.SystemLiteralOnly:(w.systemId=A.groups.SystemLiteral,w.publicId=A.groups.PubidLiteral),u.skip(A[0].length)}else if(T&&u.substringStartsWithCaseInsensitive(c.SYSTEM)){if(u.skip(c.SYSTEM.length),u.skipBlanks()<1)return N.fatalError("Expected whitespace after "+c.SYSTEM+" at position "+u.getIndex());if(w.systemId=u.getMatch(c.ABOUT_LEGACY_COMPAT_SystemLiteral),!w.systemId)return N.fatalError("Expected "+c.ABOUT_LEGACY_COMPAT+" in single or double quotes after "+c.SYSTEM+" at position "+u.getIndex())}return T&&w.systemId&&!c.ABOUT_LEGACY_COMPAT_SystemLiteral.test(w.systemId)&&N.warning("Unexpected doctype.systemId in HTML document at position "+u.getIndex()),T||(u.skipBlanks(),w.internalSubset=(function(f,F){function C(M,K){var G=c.PI.exec(M.substringFromIndex());return G?G[1].toLowerCase()==="xml"?K.fatalError("xml declaration is only allowed at the start of the document, but found at position "+M.getIndex()):(M.skip(G[0].length),G[0]):K.fatalError("processing instruction is not well-formed at position "+M.getIndex())}var oe=f.getSource();if(f.char()==="["){f.skip(1);for(var P=f.getIndex();f.getIndex()<oe.length;){if(f.skipBlanks(),f.char()==="]"){var ee=oe.substring(P,f.getIndex());return f.skip(1),ee}var re=null;if(f.char()==="<"&&f.char(1)==="!")switch(f.char(2)){case"E":f.char(3)==="L"?re=f.getMatch(c.elementdecl):f.char(3)==="N"&&(re=f.getMatch(c.EntityDecl));break;case"A":re=f.getMatch(c.AttlistDecl);break;case"N":re=f.getMatch(c.NotationDecl);break;case"-":re=f.getMatch(c.Comment)}else if(f.char()==="<"&&f.char(1)==="?")re=C(f,F);else{if(f.char()!=="%")return F.fatalError("Error detected in Markup declaration");re=f.getMatch(c.PEReference)}if(!re)return F.fatalError("Error in internal subset at position "+f.getIndex())}return F.fatalError("doctype internal subset is not well-formed, missing ]")}})(u,N)),u.skipBlanks(),u.char()!==">"?N.fatalError("doctype not terminated with > at position "+u.getIndex()):(u.skip(1),d.startDTD(w.name,w.publicId,w.systemId,w.internalSubset),d.endDTD(),u.getIndex());default:return N.fatalError('Not well-formed XML starting with "<!" at position '+i)}}function l(o,i,d,N){var T=o.substring(i).match(c.PI);if(!T)return N.fatalError("Invalid processing instruction starting at position "+i);if(T[1].toLowerCase()==="xml"){if(i>0)return N.fatalError("processing instruction at position "+i+" is an xml declaration which is only at the start of the document");if(!c.XMLDecl.test(o.substring(i)))return N.fatalError("xml declaration is not well-formed")}return d.processingInstruction(T[1],T[2]),i+T[0].length}function y(){this.attributeNames=Object.create(null)}return y.prototype={setTagName:function(o){if(!c.QName_exact.test(o))throw new Error("invalid tagName:"+o);this.tagName=o},addValue:function(o,i,d){if(!c.QName_exact.test(o))throw new Error("invalid attribute:"+o);this.attributeNames[o]=this.length,this[this.length++]={qName:o,value:i,offset:d}},length:0,getLocalName:function(o){return this[o].localName},getLocator:function(o){return this[o].locator},getQName:function(o){return this[o].qName},getURI:function(o){return this[o].uri},getValue:function(o){return this[o].value}},Ve.XMLReader=m,Ve.parseUtils=ce,Ve.parseDoctypeCommentOrCData=ie,Ve}function Er(){if(ur)return Ce;ur=1;var S=ke(),c=mr(),I=Xe(),_=(function(){return sr||(sr=1,l=lr,y=ke().freeze,l.XML_ENTITIES=y({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),l.HTML_ENTITIES=y({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDou