mathpix-markdown-it
Version:
Mathpix-markdown-it is an open source implementation of the mathpix-markdown spec written in Typescript. It relies on the following open source libraries: MathJax v3 (to render math with SVGs), markdown-it (for standard Markdown parsing)
1 lines • 4.69 MB
JavaScript
(()=>{var e={58055:(e,t,n)=>{"use strict";var r=n(68555);function i(e){this._element=e}function a(e){var t=new r.css.Parser,n={property:Object.create(null),priority:Object.create(null)};return t.addListener("property",(function(e){e.invalid||(n.property[e.property.text]=e.value.text,e.important&&(n.priority[e.property.text]="important"))})),e=(""+e).replace(/^;/,""),t.parseStyleAttribute(e),n}e.exports=i;var o={};i.prototype=Object.create(Object.prototype,{_parsed:{get:function(){if(!this._parsedStyles||this.cssText!==this._lastParsedText){var e=this.cssText;this._parsedStyles=a(e),this._lastParsedText=e,delete this._names}return this._parsedStyles}},_serialize:{value:function(){var e=this._parsed,t="";for(var n in e.property)t&&(t+=" "),t+=n+": "+e.property[n],e.priority[n]&&(t+=" !"+e.priority[n]),t+=";";this.cssText=t,this._lastParsedText=t,delete this._names}},cssText:{get:function(){return this._element.getAttribute("style")},set:function(e){this._element.setAttribute("style",e)}},length:{get:function(){return this._names||(this._names=Object.getOwnPropertyNames(this._parsed.property)),this._names.length}},item:{value:function(e){return this._names||(this._names=Object.getOwnPropertyNames(this._parsed.property)),this._names[e]}},getPropertyValue:{value:function(e){return e=e.toLowerCase(),this._parsed.property[e]||""}},getPropertyPriority:{value:function(e){return e=e.toLowerCase(),this._parsed.priority[e]||""}},setProperty:{value:function(e,t,n){if(e=e.toLowerCase(),null==t&&(t=""),null==n&&(n=""),t!==o&&(t=""+t),""!==t){if(""===n||n===o||/^important$/i.test(n)){var r=this._parsed;if(t===o){if(!r.property[e])return;""!==n?r.priority[e]="important":delete r.priority[e]}else{if(-1!==t.indexOf(";"))return;var i=a(e+":"+t);if(0===Object.getOwnPropertyNames(i.property).length)return;if(0!==Object.getOwnPropertyNames(i.priority).length)return;for(var s in i.property)r.property[s]=i.property[s],n!==o&&(""!==n?r.priority[s]="important":r.priority[s]&&delete r.priority[s])}this._serialize()}}else this.removeProperty(e)}},setPropertyValue:{value:function(e,t){return this.setProperty(e,t,o)}},setPropertyPriority:{value:function(e,t){return this.setProperty(e,o,t)}},removeProperty:{value:function(e){e=e.toLowerCase();var t=this._parsed;e in t.property&&(delete t.property[e],delete t.priority[e],this._serialize())}}});var s={alignContent:"align-content",alignItems:"align-items",alignmentBaseline:"alignment-baseline",alignSelf:"align-self",animation:"animation",animationDelay:"animation-delay",animationDirection:"animation-direction",animationDuration:"animation-duration",animationFillMode:"animation-fill-mode",animationIterationCount:"animation-iteration-count",animationName:"animation-name",animationPlayState:"animation-play-state",animationTimingFunction:"animation-timing-function",backfaceVisibility:"backface-visibility",background:"background",backgroundAttachment:"background-attachment",backgroundClip:"background-clip",backgroundColor:"background-color",backgroundImage:"background-image",backgroundOrigin:"background-origin",backgroundPosition:"background-position",backgroundPositionX:"background-position-x",backgroundPositionY:"background-position-y",backgroundRepeat:"background-repeat",backgroundSize:"background-size",baselineShift:"baseline-shift",border:"border",borderBottom:"border-bottom",borderBottomColor:"border-bottom-color",borderBottomLeftRadius:"border-bottom-left-radius",borderBottomRightRadius:"border-bottom-right-radius",borderBottomStyle:"border-bottom-style",borderBottomWidth:"border-bottom-width",borderCollapse:"border-collapse",borderColor:"border-color",borderImage:"border-image",borderImageOutset:"border-image-outset",borderImageRepeat:"border-image-repeat",borderImageSlice:"border-image-slice",borderImageSource:"border-image-source",borderImageWidth:"border-image-width",borderLeft:"border-left",borderLeftColor:"border-left-color",borderLeftStyle:"border-left-style",borderLeftWidth:"border-left-width",borderRadius:"border-radius",borderRight:"border-right",borderRightColor:"border-right-color",borderRightStyle:"border-right-style",borderRightWidth:"border-right-width",borderSpacing:"border-spacing",borderStyle:"border-style",borderTop:"border-top",borderTopColor:"border-top-color",borderTopLeftRadius:"border-top-left-radius",borderTopRightRadius:"border-top-right-radius",borderTopStyle:"border-top-style",borderTopWidth:"border-top-width",borderWidth:"border-width",bottom:"bottom",boxShadow:"box-shadow",boxSizing:"box-sizing",breakAfter:"break-after",breakBefore:"break-before",breakInside:"break-inside",captionSide:"caption-side",clear:"clear",clip:"clip",clipPath:"clip-path",clipRule:"clip-rule",color:"color",colorInterpolationFilters:"color-interpolation-filters",columnCount:"column-count",columnFill:"column-fill",columnGap:"column-gap",columnRule:"column-rule",columnRuleColor:"column-rule-color",columnRuleStyle:"column-rule-style",columnRuleWidth:"column-rule-width",columns:"columns",columnSpan:"column-span",columnWidth:"column-width",content:"content",counterIncrement:"counter-increment",counterReset:"counter-reset",cssFloat:"float",cursor:"cursor",direction:"direction",display:"display",dominantBaseline:"dominant-baseline",emptyCells:"empty-cells",enableBackground:"enable-background",fill:"fill",fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:"filter",flex:"flex",flexBasis:"flex-basis",flexDirection:"flex-direction",flexFlow:"flex-flow",flexGrow:"flex-grow",flexShrink:"flex-shrink",flexWrap:"flex-wrap",floodColor:"flood-color",floodOpacity:"flood-opacity",font:"font",fontFamily:"font-family",fontFeatureSettings:"font-feature-settings",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",grid:"grid",gridArea:"grid-area",gridAutoColumns:"grid-auto-columns",gridAutoFlow:"grid-auto-flow",gridAutoRows:"grid-auto-rows",gridColumn:"grid-column",gridColumnEnd:"grid-column-end",gridColumnGap:"grid-column-gap",gridColumnStart:"grid-column-start",gridGap:"grid-gap",gridRow:"grid-row",gridRowEnd:"grid-row-end",gridRowGap:"grid-row-gap",gridRowStart:"grid-row-start",gridTemplate:"grid-template",gridTemplateAreas:"grid-template-areas",gridTemplateColumns:"grid-template-columns",gridTemplateRows:"grid-template-rows",height:"height",imeMode:"ime-mode",justifyContent:"justify-content",kerning:"kerning",layoutGrid:"layout-grid",layoutGridChar:"layout-grid-char",layoutGridLine:"layout-grid-line",layoutGridMode:"layout-grid-mode",layoutGridType:"layout-grid-type",left:"left",letterSpacing:"letter-spacing",lightingColor:"lighting-color",lineBreak:"line-break",lineHeight:"line-height",listStyle:"list-style",listStyleImage:"list-style-image",listStylePosition:"list-style-position",listStyleType:"list-style-type",margin:"margin",marginBottom:"margin-bottom",marginLeft:"margin-left",marginRight:"margin-right",marginTop:"margin-top",marker:"marker",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",mask:"mask",maxHeight:"max-height",maxWidth:"max-width",minHeight:"min-height",minWidth:"min-width",msContentZoomChaining:"-ms-content-zoom-chaining",msContentZooming:"-ms-content-zooming",msContentZoomLimit:"-ms-content-zoom-limit",msContentZoomLimitMax:"-ms-content-zoom-limit-max",msContentZoomLimitMin:"-ms-content-zoom-limit-min",msContentZoomSnap:"-ms-content-zoom-snap",msContentZoomSnapPoints:"-ms-content-zoom-snap-points",msContentZoomSnapType:"-ms-content-zoom-snap-type",msFlowFrom:"-ms-flow-from",msFlowInto:"-ms-flow-into",msFontFeatureSettings:"-ms-font-feature-settings",msGridColumn:"-ms-grid-column",msGridColumnAlign:"-ms-grid-column-align",msGridColumns:"-ms-grid-columns",msGridColumnSpan:"-ms-grid-column-span",msGridRow:"-ms-grid-row",msGridRowAlign:"-ms-grid-row-align",msGridRows:"-ms-grid-rows",msGridRowSpan:"-ms-grid-row-span",msHighContrastAdjust:"-ms-high-contrast-adjust",msHyphenateLimitChars:"-ms-hyphenate-limit-chars",msHyphenateLimitLines:"-ms-hyphenate-limit-lines",msHyphenateLimitZone:"-ms-hyphenate-limit-zone",msHyphens:"-ms-hyphens",msImeAlign:"-ms-ime-align",msOverflowStyle:"-ms-overflow-style",msScrollChaining:"-ms-scroll-chaining",msScrollLimit:"-ms-scroll-limit",msScrollLimitXMax:"-ms-scroll-limit-x-max",msScrollLimitXMin:"-ms-scroll-limit-x-min",msScrollLimitYMax:"-ms-scroll-limit-y-max",msScrollLimitYMin:"-ms-scroll-limit-y-min",msScrollRails:"-ms-scroll-rails",msScrollSnapPointsX:"-ms-scroll-snap-points-x",msScrollSnapPointsY:"-ms-scroll-snap-points-y",msScrollSnapType:"-ms-scroll-snap-type",msScrollSnapX:"-ms-scroll-snap-x",msScrollSnapY:"-ms-scroll-snap-y",msScrollTranslation:"-ms-scroll-translation",msTextCombineHorizontal:"-ms-text-combine-horizontal",msTextSizeAdjust:"-ms-text-size-adjust",msTouchAction:"-ms-touch-action",msTouchSelect:"-ms-touch-select",msUserSelect:"-ms-user-select",msWrapFlow:"-ms-wrap-flow",msWrapMargin:"-ms-wrap-margin",msWrapThrough:"-ms-wrap-through",opacity:"opacity",order:"order",orphans:"orphans",outline:"outline",outlineColor:"outline-color",outlineOffset:"outline-offset",outlineStyle:"outline-style",outlineWidth:"outline-width",overflow:"overflow",overflowX:"overflow-x",overflowY:"overflow-y",padding:"padding",paddingBottom:"padding-bottom",paddingLeft:"padding-left",paddingRight:"padding-right",paddingTop:"padding-top",page:"page",pageBreakAfter:"page-break-after",pageBreakBefore:"page-break-before",pageBreakInside:"page-break-inside",perspective:"perspective",perspectiveOrigin:"perspective-origin",pointerEvents:"pointer-events",position:"position",quotes:"quotes",right:"right",rotate:"rotate",rubyAlign:"ruby-align",rubyOverhang:"ruby-overhang",rubyPosition:"ruby-position",scale:"scale",size:"size",stopColor:"stop-color",stopOpacity:"stop-opacity",stroke:"stroke",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tableLayout:"table-layout",textAlign:"text-align",textAlignLast:"text-align-last",textAnchor:"text-anchor",textDecoration:"text-decoration",textIndent:"text-indent",textJustify:"text-justify",textKashida:"text-kashida",textKashidaSpace:"text-kashida-space",textOverflow:"text-overflow",textShadow:"text-shadow",textTransform:"text-transform",textUnderlinePosition:"text-underline-position",top:"top",touchAction:"touch-action",transform:"transform",transformOrigin:"transform-origin",transformStyle:"transform-style",transition:"transition",transitionDelay:"transition-delay",transitionDuration:"transition-duration",transitionProperty:"transition-property",transitionTimingFunction:"transition-timing-function",translate:"translate",unicodeBidi:"unicode-bidi",verticalAlign:"vertical-align",visibility:"visibility",webkitAlignContent:"-webkit-align-content",webkitAlignItems:"-webkit-align-items",webkitAlignSelf:"-webkit-align-self",webkitAnimation:"-webkit-animation",webkitAnimationDelay:"-webkit-animation-delay",webkitAnimationDirection:"-webkit-animation-direction",webkitAnimationDuration:"-webkit-animation-duration",webkitAnimationFillMode:"-webkit-animation-fill-mode",webkitAnimationIterationCount:"-webkit-animation-iteration-count",webkitAnimationName:"-webkit-animation-name",webkitAnimationPlayState:"-webkit-animation-play-state",webkitAnimationTimingFunction:"-webkit-animation-timing-funciton",webkitAppearance:"-webkit-appearance",webkitBackfaceVisibility:"-webkit-backface-visibility",webkitBackgroundClip:"-webkit-background-clip",webkitBackgroundOrigin:"-webkit-background-origin",webkitBackgroundSize:"-webkit-background-size",webkitBorderBottomLeftRadius:"-webkit-border-bottom-left-radius",webkitBorderBottomRightRadius:"-webkit-border-bottom-right-radius",webkitBorderImage:"-webkit-border-image",webkitBorderRadius:"-webkit-border-radius",webkitBorderTopLeftRadius:"-webkit-border-top-left-radius",webkitBorderTopRightRadius:"-webkit-border-top-right-radius",webkitBoxAlign:"-webkit-box-align",webkitBoxDirection:"-webkit-box-direction",webkitBoxFlex:"-webkit-box-flex",webkitBoxOrdinalGroup:"-webkit-box-ordinal-group",webkitBoxOrient:"-webkit-box-orient",webkitBoxPack:"-webkit-box-pack",webkitBoxSizing:"-webkit-box-sizing",webkitColumnBreakAfter:"-webkit-column-break-after",webkitColumnBreakBefore:"-webkit-column-break-before",webkitColumnBreakInside:"-webkit-column-break-inside",webkitColumnCount:"-webkit-column-count",webkitColumnGap:"-webkit-column-gap",webkitColumnRule:"-webkit-column-rule",webkitColumnRuleColor:"-webkit-column-rule-color",webkitColumnRuleStyle:"-webkit-column-rule-style",webkitColumnRuleWidth:"-webkit-column-rule-width",webkitColumns:"-webkit-columns",webkitColumnSpan:"-webkit-column-span",webkitColumnWidth:"-webkit-column-width",webkitFilter:"-webkit-filter",webkitFlex:"-webkit-flex",webkitFlexBasis:"-webkit-flex-basis",webkitFlexDirection:"-webkit-flex-direction",webkitFlexFlow:"-webkit-flex-flow",webkitFlexGrow:"-webkit-flex-grow",webkitFlexShrink:"-webkit-flex-shrink",webkitFlexWrap:"-webkit-flex-wrap",webkitJustifyContent:"-webkit-justify-content",webkitOrder:"-webkit-order",webkitPerspective:"-webkit-perspective-origin",webkitPerspectiveOrigin:"-webkit-perspective-origin",webkitTapHighlightColor:"-webkit-tap-highlight-color",webkitTextFillColor:"-webkit-text-fill-color",webkitTextSizeAdjust:"-webkit-text-size-adjust",webkitTextStroke:"-webkit-text-stroke",webkitTextStrokeColor:"-webkit-text-stroke-color",webkitTextStrokeWidth:"-webkit-text-stroke-width",webkitTransform:"-webkit-transform",webkitTransformOrigin:"-webkit-transform-origin",webkitTransformStyle:"-webkit-transform-style",webkitTransition:"-webkit-transition",webkitTransitionDelay:"-webkit-transition-delay",webkitTransitionDuration:"-webkit-transition-duration",webkitTransitionProperty:"-webkit-transition-property",webkitTransitionTimingFunction:"-webkit-transition-timing-function",webkitUserModify:"-webkit-user-modify",webkitUserSelect:"-webkit-user-select",webkitWritingMode:"-webkit-writing-mode",whiteSpace:"white-space",widows:"widows",width:"width",wordBreak:"word-break",wordSpacing:"word-spacing",wordWrap:"word-wrap",writingMode:"writing-mode",zIndex:"z-index",zoom:"zoom",resize:"resize",userSelect:"user-select"};for(var l in s)c(l);function c(e){var t=s[e];Object.defineProperty(i.prototype,e,{get:function(){return this.getPropertyValue(t)},set:function(e){this.setProperty(t,e)}}),i.prototype.hasOwnProperty(t)||Object.defineProperty(i.prototype,t,{get:function(){return this.getPropertyValue(t)},set:function(e){this.setProperty(t,e)}})}},62792:(e,t,n)=>{"use strict";e.exports=s;var r=n(27795),i=n(1330),a=n(93033),o=n(8339);function s(){r.call(this)}s.prototype=Object.create(r.prototype,{substringData:{value:function(e,t){if(arguments.length<2)throw new TypeError("Not enough arguments");return t>>>=0,((e>>>=0)>this.data.length||e<0||t<0)&&i.IndexSizeError(),this.data.substring(e,e+t)}},appendData:{value:function(e){if(arguments.length<1)throw new TypeError("Not enough arguments");this.data+=String(e)}},insertData:{value:function(e,t){return this.replaceData(e,0,t)}},deleteData:{value:function(e,t){return this.replaceData(e,t,"")}},replaceData:{value:function(e,t,n){var r=this.data,a=r.length;e>>>=0,t>>>=0,n=String(n),(e>a||e<0)&&i.IndexSizeError(),e+t>a&&(t=a-e);var o=r.substring(0,e),s=r.substring(e+t);this.data=o+n+s}},isEqual:{value:function(e){return this._data===e._data}},length:{get:function(){return this.data.length}}}),Object.defineProperties(s.prototype,a),Object.defineProperties(s.prototype,o)},93033:(e,t,n)=>{"use strict";var r=n(79543),i=n(42242),a=function(e,t){for(var n=e.createDocumentFragment(),i=0;i<t.length;i++){var a=t[i],o=a instanceof r;n.appendChild(o?a:e.createTextNode(String(a)))}return n},o={after:{value:function(){var e=Array.prototype.slice.call(arguments),t=this.parentNode,n=this.nextSibling;if(null!==t){for(;n&&e.some((function(e){return e===n}));)n=n.nextSibling;var r=a(this.doc,e);t.insertBefore(r,n)}}},before:{value:function(){var e=Array.prototype.slice.call(arguments),t=this.parentNode,n=this.previousSibling;if(null!==t){for(;n&&e.some((function(e){return e===n}));)n=n.previousSibling;var r=a(this.doc,e),i=n?n.nextSibling:t.firstChild;t.insertBefore(r,i)}}},remove:{value:function(){null!==this.parentNode&&(this.doc&&(this.doc._preremoveNodeIterators(this),this.rooted&&this.doc.mutateRemove(this)),this._remove(),this.parentNode=null)}},_remove:{value:function(){var e=this.parentNode;null!==e&&(e._childNodes?e._childNodes.splice(this.index,1):e._firstChild===this&&(this._nextSibling===this?e._firstChild=null:e._firstChild=this._nextSibling),i.remove(this),e.modify())}},replaceWith:{value:function(){var e=Array.prototype.slice.call(arguments),t=this.parentNode,n=this.nextSibling;if(null!==t){for(;n&&e.some((function(e){return e===n}));)n=n.nextSibling;var r=a(this.doc,e);this.parentNode===t?t.replaceChild(r,this):t.insertBefore(r,n)}}}};e.exports=o},64890:(e,t,n)=>{"use strict";e.exports=a;var r=n(79543),i=n(62792);function a(e,t){i.call(this),this.nodeType=r.COMMENT_NODE,this.ownerDocument=e,this._data=t}var o={get:function(){return this._data},set:function(e){e=null==e?"":String(e),this._data=e,this.rooted&&this.ownerDocument.mutateValue(this)}};a.prototype=Object.create(i.prototype,{nodeName:{value:"#comment"},nodeValue:o,textContent:o,data:{get:o.get,set:function(e){o.set.call(this,null===e?"":String(e))}},clone:{value:function(){return new a(this.ownerDocument,this._data)}}})},10072:(e,t,n)=>{"use strict";e.exports=a;var r=n(79543),i=n(11999);function a(){r.call(this),this._firstChild=this._childNodes=null}a.prototype=Object.create(r.prototype,{hasChildNodes:{value:function(){return this._childNodes?this._childNodes.length>0:null!==this._firstChild}},childNodes:{get:function(){return this._ensureChildNodes(),this._childNodes}},firstChild:{get:function(){return this._childNodes?0===this._childNodes.length?null:this._childNodes[0]:this._firstChild}},lastChild:{get:function(){var e,t=this._childNodes;return t?0===t.length?null:t[t.length-1]:null===(e=this._firstChild)?null:e._previousSibling}},_ensureChildNodes:{value:function(){if(!this._childNodes){var e=this._firstChild,t=e,n=this._childNodes=new i;if(e)do{n.push(t),t=t._nextSibling}while(t!==e);this._firstChild=null}}},removeChildren:{value:function(){for(var e,t=this.rooted?this.ownerDocument:null,n=this.firstChild;null!==n;)n=(e=n).nextSibling,t&&t.mutateRemove(e),e.parentNode=null;this._childNodes?this._childNodes.length=0:this._firstChild=null,this.modify()}}})},39110:(e,t,n)=>{"use strict";e.exports=i;var r=n(80795);function i(e,t){r.call(this,e,t)}i.prototype=Object.create(r.prototype,{constructor:{value:i}})},32914:e=>{"use strict";e.exports=i;var t=[null,"INDEX_SIZE_ERR",null,"HIERARCHY_REQUEST_ERR","WRONG_DOCUMENT_ERR","INVALID_CHARACTER_ERR",null,"NO_MODIFICATION_ALLOWED_ERR","NOT_FOUND_ERR","NOT_SUPPORTED_ERR","INUSE_ATTRIBUTE_ERR","INVALID_STATE_ERR","SYNTAX_ERR","INVALID_MODIFICATION_ERR","NAMESPACE_ERR","INVALID_ACCESS_ERR",null,"TYPE_MISMATCH_ERR","SECURITY_ERR","NETWORK_ERR","ABORT_ERR","URL_MISMATCH_ERR","QUOTA_EXCEEDED_ERR","TIMEOUT_ERR","INVALID_NODE_TYPE_ERR","DATA_CLONE_ERR"],n=[null,"INDEX_SIZE_ERR (1): the index is not in the allowed range",null,"HIERARCHY_REQUEST_ERR (3): the operation would yield an incorrect nodes model","WRONG_DOCUMENT_ERR (4): the object is in the wrong Document, a call to importNode is required","INVALID_CHARACTER_ERR (5): the string contains invalid characters",null,"NO_MODIFICATION_ALLOWED_ERR (7): the object can not be modified","NOT_FOUND_ERR (8): the object can not be found here","NOT_SUPPORTED_ERR (9): this operation is not supported","INUSE_ATTRIBUTE_ERR (10): setAttributeNode called on owned Attribute","INVALID_STATE_ERR (11): the object is in an invalid state","SYNTAX_ERR (12): the string did not match the expected pattern","INVALID_MODIFICATION_ERR (13): the object can not be modified in this way","NAMESPACE_ERR (14): the operation is not allowed by Namespaces in XML","INVALID_ACCESS_ERR (15): the object does not support the operation or argument",null,"TYPE_MISMATCH_ERR (17): the type of the object does not match the expected type","SECURITY_ERR (18): the operation is insecure","NETWORK_ERR (19): a network error occurred","ABORT_ERR (20): the user aborted an operation","URL_MISMATCH_ERR (21): the given URL does not match another URL","QUOTA_EXCEEDED_ERR (22): the quota has been exceeded","TIMEOUT_ERR (23): a timeout occurred","INVALID_NODE_TYPE_ERR (24): the supplied node is invalid or has an invalid ancestor for this operation","DATA_CLONE_ERR (25): the object can not be cloned."],r={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};function i(e){Error.call(this),Error.captureStackTrace(this,this.constructor),this.code=e,this.message=n[e],this.name=t[e]}for(var a in i.prototype.__proto__=Error.prototype,r){var o={value:r[a]};Object.defineProperty(i,a,o),Object.defineProperty(i.prototype,a,o)}},16333:(e,t,n)=>{"use strict";e.exports=l;var r=n(67350),i=n(75678),a=n(22033),o=n(1330),s=n(11852);function l(e){this.contextObject=e}var c={xml:{"":!0,"1.0":!0,"2.0":!0},core:{"":!0,"2.0":!0},html:{"":!0,"1.0":!0,"2.0":!0},xhtml:{"":!0,"1.0":!0,"2.0":!0}};l.prototype={hasFeature:function(e,t){var n=c[(e||"").toLowerCase()];return n&&n[t||""]||!1},createDocumentType:function(e,t,n){return s.isValidQName(e)||o.InvalidCharacterError(),new i(this.contextObject,e,t,n)},createDocument:function(e,t,n){var i,a=new r(!1,null);return i=t?a.createElementNS(e,t):null,n&&a.appendChild(n),i&&a.appendChild(i),e===o.NAMESPACE.HTML?a._contentType="application/xhtml+xml":e===o.NAMESPACE.SVG?a._contentType="image/svg+xml":a._contentType="application/xml",a},createHTMLDocument:function(e){var t=new r(!0,null);t.appendChild(new i(t,"html"));var n=t.createElement("html");t.appendChild(n);var a=t.createElement("head");if(n.appendChild(a),void 0!==e){var o=t.createElement("title");a.appendChild(o),o.appendChild(t.createTextNode(e))}return n.appendChild(t.createElement("body")),t.modclock=1,t},mozSetOutputMutationHandler:function(e,t){e.mutationHandler=t},mozGetInputMutationHandler:function(e){o.nyi()},mozHTMLParser:a}},28250:(e,t,n)=>{"use strict";var r=n(1330);function i(e,t){this._getString=e,this._setString=t,this._length=0,this._lastStringValue="",this._update()}function a(e,t){var n,r=e._length;for(e._length=t.length,n=0;n<t.length;n++)e[n]=t[n];for(;n<r;n++)e[n]=void 0}function o(e){return""===(e=String(e))&&r.SyntaxError(),/[ \t\r\n\f]/.test(e)&&r.InvalidCharacterError(),e}function s(e){var t=e._getString();if(t===e._lastStringValue)return function(e){for(var t=e._length,n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}(e);var n=t.replace(/(^[ \t\r\n\f]+)|([ \t\r\n\f]+$)/g,"");if(""===n)return[];var r=Object.create(null);return n.split(/[ \t\r\n\f]+/g).filter((function(e){var t="$"+e;return!r[t]&&(r[t]=!0,!0)}))}e.exports=i,Object.defineProperties(i.prototype,{length:{get:function(){return this._length}},item:{value:function(e){var t=s(this);return e<0||e>=t.length?null:t[e]}},contains:{value:function(e){return e=String(e),s(this).indexOf(e)>-1}},add:{value:function(){for(var e=s(this),t=0,n=arguments.length;t<n;t++){var r=o(arguments[t]);e.indexOf(r)<0&&e.push(r)}this._update(e)}},remove:{value:function(){for(var e=s(this),t=0,n=arguments.length;t<n;t++){var r=o(arguments[t]),i=e.indexOf(r);i>-1&&e.splice(i,1)}this._update(e)}},toggle:{value:function(e,t){return e=o(e),this.contains(e)?void 0!==t&&!1!==t||(this.remove(e),!1):(void 0===t||!0===t)&&(this.add(e),!0)}},replace:{value:function(e,t){""===String(t)&&r.SyntaxError(),e=o(e),t=o(t);var n=s(this),i=n.indexOf(e);if(i<0)return!1;var a=n.indexOf(t);return a<0?n[i]=t:i<a?(n[i]=t,n.splice(a,1)):n.splice(i,1),this._update(n),!0}},toString:{value:function(){return this._getString()}},value:{get:function(){return this._getString()},set:function(e){this._setString(e),this._update()}},_update:{value:function(e){e?(a(this,e),this._setString(e.join(" ").trim())):a(this,s(this)),this._lastStringValue=this._getString()}}})},67350:(e,t,n)=>{"use strict";e.exports=L;var r=n(79543),i=n(11999),a=n(10072),o=n(69595),s=n(42984),l=n(64890),c=n(80795),u=n(13310),d=n(77622),p=n(16333),h=n(42089),T=n(61621),m=n(54461),f=n(85934),g=n(99819),Q=n(15022),_=n(11852),y=n(40438),b=n(54205),v=n(1330),E=n(89507),S=v.NAMESPACE,x=n(35245).h;function L(e,t){a.call(this),this.nodeType=r.DOCUMENT_NODE,this.isHTML=e,this._address=t||"about:blank",this.readyState="loading",this.implementation=new p(this),this.ownerDocument=null,this._contentType=e?"text/html":"application/xml",this.doctype=null,this.documentElement=null,this._templateDocCache=null,this._nodeIterators=null,this._nid=1,this._nextnid=2,this._nodes=[null,this],this.byId=Object.create(null),this.modclock=0}var w={event:"Event",customevent:"CustomEvent",uievent:"UIEvent",mouseevent:"MouseEvent"},O={events:"event",htmlevents:"event",mouseevents:"mouseevent",mutationevents:"mutationevent",uievents:"uievent"},C=function(e,t,n){return{get:function(){var r=e.call(this);return r?r[t]:n},set:function(n){var r=e.call(this);r&&(r[t]=n)}}};function A(e,t){var n,r,i;return""===e&&(e=null),_.isValidQName(t)||v.InvalidCharacterError(),n=null,r=t,(i=t.indexOf(":"))>=0&&(n=t.substring(0,i),r=t.substring(i+1)),null!==n&&null===e&&v.NamespaceError(),"xml"===n&&e!==S.XML&&v.NamespaceError(),"xmlns"!==n&&"xmlns"!==t||e===S.XMLNS||v.NamespaceError(),e===S.XMLNS&&"xmlns"!==n&&"xmlns"!==t&&v.NamespaceError(),{namespace:e,prefix:n,localName:r}}L.prototype=Object.create(a.prototype,{_setMutationHandler:{value:function(e){this.mutationHandler=e}},_dispatchRendererEvent:{value:function(e,t,n){var r=this._nodes[e];r&&r._dispatchEvent(new c(t,n),!0)}},nodeName:{value:"#document"},nodeValue:{get:function(){return null},set:function(){}},documentURI:{get:function(){return this._address},set:v.nyi},compatMode:{get:function(){return this._quirks?"BackCompat":"CSS1Compat"}},createTextNode:{value:function(e){return new s(this,String(e))}},createComment:{value:function(e){return new l(this,e)}},createDocumentFragment:{value:function(){return new u(this)}},createProcessingInstruction:{value:function(e,t){return _.isValidName(e)&&-1===t.indexOf("?>")||v.InvalidCharacterError(),new d(this,e,t)}},createAttribute:{value:function(e){return e=String(e),_.isValidName(e)||v.InvalidCharacterError(),this.isHTML&&(e=v.toASCIILowerCase(e)),new o._Attr(null,e,null,null,"")}},createAttributeNS:{value:function(e,t){var n=A(e=null==e||""===e?null:String(e),t=String(t));return new o._Attr(null,n.localName,n.prefix,n.namespace,"")}},createElement:{value:function(e){return e=String(e),_.isValidName(e)||v.InvalidCharacterError(),this.isHTML?(/[A-Z]/.test(e)&&(e=v.toASCIILowerCase(e)),y.createElement(this,e,null)):"application/xhtml+xml"===this.contentType?y.createElement(this,e,null):new o(this,e,null,null)},writable:x},createElementNS:{value:function(e,t){var n=A(e=null==e||""===e?null:String(e),t=String(t));return this._createElementNS(n.localName,n.namespace,n.prefix)},writable:x},_createElementNS:{value:function(e,t,n){return t===S.HTML?y.createElement(this,e,n):t===S.SVG?b.createElement(this,e,n):new o(this,e,t,n)}},createEvent:{value:function(e){e=e.toLowerCase();var t=Q[w[O[e]||e]];if(t){var n=new t;return n._initialized=!1,n}v.NotSupportedError()}},createTreeWalker:{value:function(e,t,n){if(!e)throw new TypeError("root argument is required");if(!(e instanceof r))throw new TypeError("root not a node");return t=void 0===t?m.SHOW_ALL:+t,new h(e,t,n=void 0===n?null:n)}},createNodeIterator:{value:function(e,t,n){if(!e)throw new TypeError("root argument is required");if(!(e instanceof r))throw new TypeError("root not a node");return t=void 0===t?m.SHOW_ALL:+t,new T(e,t,n=void 0===n?null:n)}},_attachNodeIterator:{value:function(e){this._nodeIterators||(this._nodeIterators=[]),this._nodeIterators.push(e)}},_detachNodeIterator:{value:function(e){var t=this._nodeIterators.indexOf(e);this._nodeIterators.splice(t,1)}},_preremoveNodeIterators:{value:function(e){this._nodeIterators&&this._nodeIterators.forEach((function(t){t._preremove(e)}))}},_updateDocTypeElement:{value:function(){this.doctype=this.documentElement=null;for(var e=this.firstChild;null!==e;e=e.nextSibling)e.nodeType===r.DOCUMENT_TYPE_NODE?this.doctype=e:e.nodeType===r.ELEMENT_NODE&&(this.documentElement=e)}},insertBefore:{value:function(e,t){return r.prototype.insertBefore.call(this,e,t),this._updateDocTypeElement(),e}},replaceChild:{value:function(e,t){return r.prototype.replaceChild.call(this,e,t),this._updateDocTypeElement(),t}},removeChild:{value:function(e){return r.prototype.removeChild.call(this,e),this._updateDocTypeElement(),e}},getElementById:{value:function(e){var t=this.byId[e];return t?t instanceof k?t.getFirst():t:null}},_hasMultipleElementsWithId:{value:function(e){return this.byId[e]instanceof k}},getElementsByName:{value:o.prototype.getElementsByName},getElementsByTagName:{value:o.prototype.getElementsByTagName},getElementsByTagNameNS:{value:o.prototype.getElementsByTagNameNS},getElementsByClassName:{value:o.prototype.getElementsByClassName},adoptNode:{value:function(e){return e.nodeType===r.DOCUMENT_NODE&&v.NotSupportedError(),e.nodeType===r.ATTRIBUTE_NODE||(e.parentNode&&e.parentNode.removeChild(e),e.ownerDocument!==this&&I(e,this)),e}},importNode:{value:function(e,t){return this.adoptNode(e.cloneNode(t))},writable:x},origin:{get:function(){return null}},characterSet:{get:function(){return"UTF-8"}},contentType:{get:function(){return this._contentType}},URL:{get:function(){return this._address}},domain:{get:v.nyi,set:v.nyi},referrer:{get:v.nyi},cookie:{get:v.nyi,set:v.nyi},lastModified:{get:v.nyi},location:{get:function(){return this.defaultView?this.defaultView.location:null},set:v.nyi},_titleElement:{get:function(){return this.getElementsByTagName("title").item(0)||null}},title:{get:function(){var e=this._titleElement;return(e?e.textContent:"").replace(/[ \t\n\r\f]+/g," ").replace(/(^ )|( $)/g,"")},set:function(e){var t=this._titleElement,n=this.head;(t||n)&&(t||(t=this.createElement("title"),n.appendChild(t)),t.textContent=e)}},dir:C((function(){var e=this.documentElement;if(e&&"HTML"===e.tagName)return e}),"dir",""),fgColor:C((function(){return this.body}),"text",""),linkColor:C((function(){return this.body}),"link",""),vlinkColor:C((function(){return this.body}),"vLink",""),alinkColor:C((function(){return this.body}),"aLink",""),bgColor:C((function(){return this.body}),"bgColor",""),charset:{get:function(){return this.characterSet}},inputEncoding:{get:function(){return this.characterSet}},scrollingElement:{get:function(){return this._quirks?this.body:this.documentElement}},body:{get:function(){return M(this.documentElement,"body")},set:v.nyi},head:{get:function(){return M(this.documentElement,"head")}},images:{get:v.nyi},embeds:{get:v.nyi},plugins:{get:v.nyi},links:{get:v.nyi},forms:{get:v.nyi},scripts:{get:v.nyi},applets:{get:function(){return[]}},activeElement:{get:function(){return null}},innerHTML:{get:function(){return this.serialize()},set:v.nyi},outerHTML:{get:function(){return this.serialize()},set:v.nyi},write:{value:function(e){if(this.isHTML||v.InvalidStateError(),this._parser){this._parser;var t=arguments.join("");this._parser.parse(t)}}},writeln:{value:function(e){this.write(Array.prototype.join.call(arguments,"")+"\n")}},open:{value:function(){this.documentElement=null}},close:{value:function(){this.readyState="interactive",this._dispatchEvent(new c("readystatechange"),!0),this._dispatchEvent(new c("DOMContentLoaded"),!0),this.readyState="complete",this._dispatchEvent(new c("readystatechange"),!0),this.defaultView&&this.defaultView._dispatchEvent(new c("load"),!0)}},clone:{value:function(){var e=new L(this.isHTML,this._address);return e._quirks=this._quirks,e._contentType=this._contentType,e}},cloneNode:{value:function(e){var t=r.prototype.cloneNode.call(this,!1);if(e)for(var n=this.firstChild;null!==n;n=n.nextSibling)t._appendChild(t.importNode(n,!0));return t._updateDocTypeElement(),t}},isEqual:{value:function(e){return!0}},mutateValue:{value:function(e){this.mutationHandler&&this.mutationHandler({type:E.VALUE,target:e,data:e.data})}},mutateAttr:{value:function(e,t){this.mutationHandler&&this.mutationHandler({type:E.ATTR,target:e.ownerElement,attr:e})}},mutateRemoveAttr:{value:function(e){this.mutationHandler&&this.mutationHandler({type:E.REMOVE_ATTR,target:e.ownerElement,attr:e})}},mutateRemove:{value:function(e){this.mutationHandler&&this.mutationHandler({type:E.REMOVE,target:e.parentNode,node:e}),R(e)}},mutateInsert:{value:function(e){N(e),this.mutationHandler&&this.mutationHandler({type:E.INSERT,target:e.parentNode,node:e})}},mutateMove:{value:function(e){this.mutationHandler&&this.mutationHandler({type:E.MOVE,target:e})}},addId:{value:function(e,t){var n=this.byId[e];n?(n instanceof k||(n=new k(n),this.byId[e]=n),n.add(t)):this.byId[e]=t}},delId:{value:function(e,t){var n=this.byId[e];v.assert(n),n instanceof k?(n.del(t),1===n.length&&(this.byId[e]=n.downgrade())):this.byId[e]=void 0}},_resolve:{value:function(e){return new f(this._documentBaseURL).resolve(e)}},_documentBaseURL:{get:function(){var e=this._address;"about:blank"===e&&(e="/");var t=this.querySelector("base[href]");return t?new f(e).resolve(t.getAttribute("href")):e}},_templateDoc:{get:function(){if(!this._templateDocCache){var e=new L(this.isHTML,this._address);this._templateDocCache=e._templateDocCache=e}return this._templateDocCache}},querySelector:{value:function(e){return g(e,this)[0]}},querySelectorAll:{value:function(e){var t=g(e,this);return t.item?t:new i(t)}}});function M(e,t){if(e&&e.isHTML)for(var n=e.firstChild;null!==n;n=n.nextSibling)if(n.nodeType===r.ELEMENT_NODE&&n.localName===t&&n.namespaceURI===S.HTML)return n;return null}function N(e){if(function(e){if(e._nid=e.ownerDocument._nextnid++,e.ownerDocument._nodes[e._nid]=e,e.nodeType===r.ELEMENT_NODE){var t=e.getAttribute("id");t&&e.ownerDocument.addId(t,e),e._roothook&&e._roothook()}}(e),e.nodeType===r.ELEMENT_NODE)for(var t=e.firstChild;null!==t;t=t.nextSibling)N(t)}function R(e){!function(e){if(e.nodeType===r.ELEMENT_NODE){var t=e.getAttribute("id");t&&e.ownerDocument.delId(t,e)}e.ownerDocument._nodes[e._nid]=void 0,e._nid=void 0}(e);for(var t=e.firstChild;null!==t;t=t.nextSibling)R(t)}function I(e,t){e.ownerDocument=t,e._lastModTime=void 0,Object.prototype.hasOwnProperty.call(e,"_tagName")&&(e._tagName=void 0);for(var n=e.firstChild;null!==n;n=n.nextSibling)I(n,t)}function k(e){this.nodes=Object.create(null),this.nodes[e._nid]=e,this.length=1,this.firstNode=void 0}["abort","canplay","canplaythrough","change","click","contextmenu","cuechange","dblclick","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","ended","input","invalid","keydown","keypress","keyup","loadeddata","loadedmetadata","loadstart","mousedown","mousemove","mouseout","mouseover","mouseup","mousewheel","pause","play","playing","progress","ratechange","readystatechange","reset","seeked","seeking","select","show","stalled","submit","suspend","timeupdate","volumechange","waiting","blur","error","focus","load","scroll"].forEach((function(e){Object.defineProperty(L.prototype,"on"+e,{get:function(){return this._getEventHandler(e)},set:function(t){this._setEventHandler(e,t)}})})),k.prototype.add=function(e){this.nodes[e._nid]||(this.nodes[e._nid]=e,this.length++,this.firstNode=void 0)},k.prototype.del=function(e){this.nodes[e._nid]&&(delete this.nodes[e._nid],this.length--,this.firstNode=void 0)},k.prototype.getFirst=function(){var e;if(!this.firstNode)for(e in this.nodes)(void 0===this.firstNode||this.firstNode.compareDocumentPosition(this.nodes[e])&r.DOCUMENT_POSITION_PRECEDING)&&(this.firstNode=this.nodes[e]);return this.firstNode},k.prototype.downgrade=function(){var e;if(1===this.length)for(e in this.nodes)return this.nodes[e];return this}},13310:(e,t,n)=>{"use strict";e.exports=c;var r=n(79543),i=n(11999),a=n(10072),o=n(69595),s=n(99819),l=n(1330);function c(e){a.call(this),this.nodeType=r.DOCUMENT_FRAGMENT_NODE,this.ownerDocument=e}c.prototype=Object.create(a.prototype,{nodeName:{value:"#document-fragment"},nodeValue:{get:function(){return null},set:function(){}},textContent:Object.getOwnPropertyDescriptor(o.prototype,"textContent"),querySelector:{value:function(e){var t=this.querySelectorAll(e);return t.length?t[0]:null}},querySelectorAll:{value:function(e){var t=Object.create(this);t.isHTML=!0,t.getElementsByTagName=o.prototype.getElementsByTagName,t.nextElement=Object.getOwnPropertyDescriptor(o.prototype,"firstElementChild").get;var n=s(e,t);return n.item?n:new i(n)}},clone:{value:function(){return new c(this.ownerDocument)}},isEqual:{value:function(e){return!0}},innerHTML:{get:function(){return this.serialize()},set:l.nyi},outerHTML:{get:function(){return this.serialize()},set:l.nyi}})},75678:(e,t,n)=>{"use strict";e.exports=o;var r=n(79543),i=n(27795),a=n(93033);function o(e,t,n,a){i.call(this),this.nodeType=r.DOCUMENT_TYPE_NODE,this.ownerDocument=e||null,this.name=t,this.publicId=n||"",this.systemId=a||""}o.prototype=Object.create(i.prototype,{nodeName:{get:function(){return this.name}},nodeValue:{get:function(){return null},set:function(){}},clone:{value:function(){return new o(this.ownerDocument,this.name,this.publicId,this.systemId)}},isEqual:{value:function(e){return this.name===e.name&&this.publicId===e.publicId&&this.systemId===e.systemId}}}),Object.defineProperties(o.prototype,a)},69595:(e,t,n)=>{"use strict";e.exports=_;var r=n(11852),i=n(1330),a=i.NAMESPACE,o=n(38902),s=n(79543),l=n(11999),c=n(22054),u=n(62126),d=n(32914),p=n(28250),h=n(99819),T=n(10072),m=n(93033),f=n(8339),g=n(24646),Q=Object.create(null);function _(e,t,n,r){T.call(this),this.nodeType=s.ELEMENT_NODE,this.ownerDocument=e,this.localName=t,this.namespaceURI=n,this.prefix=r,this._tagName=void 0,this._attrsByQName=Object.create(null),this._attrsByLName=Object.create(null),this._attrKeys=[]}function y(e,t){if(e.nodeType===s.TEXT_NODE)t.push(e._data);else for(var n=0,r=e.childNodes.length;n<r;n++)y(e.childNodes[n],t)}function b(e,t,n,r,i){this.localName=t,this.prefix=null===n||""===n?null:""+n,this.namespaceURI=null===r||""===r?null:""+r,this.data=i,this._setOwnerElement(e)}function v(e){for(var t in g.call(this,e),e._attrsByQName)this[t]=e._attrsByQName[t];for(var n=0;n<e._attrKeys.length;n++)this[n]=e._attrsByLName[e._attrKeys[n]]}function E(e){this.element=e,this.updateCache()}function S(e){return function(t){return t.localName===e}}_.prototype=Object.create(T.prototype,{isHTML:{get:function(){return this.namespaceURI===a.HTML&&this.ownerDocument.isHTML}},tagName:{get:function(){if(void 0===this._tagName){var e;if(e=null===this.prefix?this.localName:this.prefix+":"+this.localName,this.isHTML){var t=Q[e];t||(Q[e]=t=i.toASCIIUpperCase(e)),e=t}this._tagName=e}return this._tagName}},nodeName:{get:function(){return this.tagName}},nodeValue:{get:function(){return null},set:function(){}},textContent:{get:function(){var e=[];return y(this,e),e.join("")},set:function(e){this.removeChildren(),null!=e&&""!==e&&this._appendChild(this.ownerDocument.createTextNode(e))}},innerHTML:{get:function(){return this.serialize()},set:i.nyi},outerHTML:{get:function(){return c.serializeOne(this,{nodeType:0})},set:function(e){var t=this.ownerDocument,n=this.parentNode;if(null!==n){n.nodeType===s.DOCUMENT_NODE&&i.NoModificationAllowedError(),n.nodeType===s.DOCUMENT_FRAGMENT_NODE&&(n=n.ownerDocument.createElement("body"));var r=t.implementation.mozHTMLParser(t._address,n);r.parse(null===e?"":String(e),!0),this.replaceWith(r._asDocumentFragment())}}},_insertAdjacent:{value:function(e,t){var n=!1;switch(e){case"beforebegin":n=!0;case"afterend":var r=this.parentNode;return null===r?null:r.insertBefore(t,n?this:this.nextSibling);case"afterbegin":n=!0;case"beforeend":return this.insertBefore(t,n?this.firstChild:null);default:return i.SyntaxError()}}},insertAdjacentElement:{value:function(e,t){if(t.nodeType!==s.ELEMENT_NODE)throw new TypeError("not an element");return e=i.toASCIILowerCase(String(e)),this._insertAdjacent(e,t)}},insertAdjacentText:{value:function(e,t){var n=this.ownerDocument.createTextNode(t);e=i.toASCIILowerCase(String(e)),this._insertAdjacent(e,n)}},insertAdjacentHTML:{value:function(e,t){var n;switch(e=i.toASCIILowerCase(String(e)),t=String(t),e){case"beforebegin":case"afterend":null!==(n=this.parentNode)&&n.nodeType!==s.DOCUMENT_NODE||i.NoModificationAllowedError();break;case"afterbegin":case"beforeend":n=this;break;default:i.SyntaxError()}n instanceof _&&(!n.ownerDocument.isHTML||"html"!==n.localName||n.namespaceURI!==a.HTML)||(n=n.ownerDocument.createElementNS(a.HTML,"body"));var r=this.ownerDocument.implementation.mozHTMLParser(this.ownerDocument._address,n);r.parse(t,!0),this._insertAdjacent(e,r._asDocumentFragment())}},children:{get:function(){return this._children||(this._children=new E(this)),this._children}},attributes:{get:function(){return this._attributes||(this._attributes=new v(this)),this._attributes}},firstElementChild:{get:function(){for(var e=this.firstChild;null!==e;e=e.nextSibling)if(e.nodeType===s.ELEMENT_NODE)return e;return null}},lastElementChild:{get:function(){for(var e=this.lastChild;null!==e;e=e.previousSibling)if(e.nodeType===s.ELEMENT_NODE)return e;return null}},childElementCount:{get:function(){return this.children.length}},nextElement:{value:function(e){e||(e=this.ownerDocument.documentElement);var t=this.firstElementChild;if(!t){if(this===e)return null;t=this.nextElementSibling}if(t)return t;for(var n=this.parentElement;n&&n!==e;n=n.parentElement)if(t=n.nextElementSibling)return t;return null}},getElementsByTagName:{value:function(e){var t;return e?(t="*"===e?function(){return!0}:this.isHTML?function(e){var t=i.toASCIILowerCase(e);return t===e?S(e):function(n){return n.isHTML?n.localName===t:n.localName===e}}(e):S(e),new u(this,t)):new l}},getElementsByTagNameNS:{value:function(e,t){var n;return n="*"===e&&"*"===t?function(){return!0}:"*"===e?S(t):"*"===t?function(e){return function(t){return t.namespaceURI===e}}(e):function(e,t){return function(n){return n.namespaceURI===e&&n.localName===t}}(e,t),new u(this,n)}},getElementsByClassName:{value:function(e){return""===(e=String(e).trim())?new l:(e=e.split(/[ \t\r\n\f]+/),new u(this,function(e){return function(t){return e.every((function(e){return t.classList.contains(e)}))}}(e)))}},getElementsByName:{value:function(e){return new u(this,function(e){return function(t){return t.namespaceURI===a.HTML&&t.getAttribute("name")===e}}(String(e)))}},clone:{value:function(){var e;e=this.namespaceURI!==a.HTML||this.prefix||!this.ownerDocument.isHTML?this.ownerDocument.createElementNS(this.namespaceURI,null!==this.prefix?this.prefix+":"+this.localName:this.localName):this.ownerDocument.createElement(this.localName);for(var t=0,n=this._attrKeys.length;t<n;t++){var r=this._attrKeys[t],i=this._attrsByLName[r].cloneNode();i._setOwnerElement(e),e._attrsByLName[r]=i,e._addQName(i)}return e._attrKeys=this._attrKeys.concat(),e}},isEqual:{value:function(e){if(this.localName!==e.localName||this.namespaceURI!==e.namespaceURI||this.prefix!==e.prefix||this._numattrs!==e._numattrs)return!1;for(var t=0,n=this._numattrs;t<n;t++){var r=this._attr(t);if(!e.hasAttributeNS(r.namespaceURI,r.localName))return!1;if(e.getAttributeNS(r.namespaceURI,r.localName)!==r.value)return!1}return!0}},_lookupNamespacePrefix:{value:function(e,t){if(this.namespaceURI&&this.namespaceURI===e&&null!==this.prefix&&t.lookupNamespaceURI(this.prefix)===e)return this.prefix;for(var n=0,r=this._numattrs;n<r;n++){var i=this._attr(n);if("xmlns"===i.prefix&&i.value===e&&t.lookupNamespaceURI(i.localName)===e)return i.localName}var a=this.parentElement;return a?a._lookupNamespacePrefix(e,t):null}},lookupNamespaceURI:{value:function(e){if(""!==e&&void 0!==e||(e=null),null!==this.namespaceURI&&this.prefix===e)return this.namespaceURI;for(var t=0,n=this._numattrs;t<n;t++){var r=this._attr(t);if(r.namespaceURI===a.XMLNS&&("xmlns"===r.prefix&&r.localName===e||null===e&&null===r.prefix&&"xmlns"===r.localName))return r.value||null}var i=this.parentElement;return i?i.lookupNamespaceURI(e):null}},getAttribute:{value:function(e){var t=this.getAttributeNode(e);return t?t.value:null}},getAttributeNS:{value:function(e,t){var n=this.getAttributeNodeNS(e,t);return n?n.value:null}},getAttributeNode:{value:function(e){e=String(e),/[A-Z]/.test(e)&&this.isHTML&&(e=i.toASCIILowerCase(e));var t=this._attrsByQName[e];return t?(Array.isArray(t)&&(t=t[0]),t):null}},getAttributeNodeNS:{value:function(e,t){e=null==e?"":String(e),t=String(t);var n=this._attrsByLName[e+"|"+t];return n||null}},hasAttribute:{value:function(e){return e=String(e),/[A-Z]/.test(e)&&this.isHTML&&(e=i.toASCIILowerCase(e)),void 0!==this._attrsByQName[e]}},hasAttributeNS:{value:function(e,t){var n=(e=null==e?"":String(e))+"|"+(t=String(t));return void 0!==this._attrsByLName[n]}},hasAttributes:{value:function(){return this._numattrs>0}},toggleAttribute:{value:function(e,t){return e=String(e),r.isValidName(e)||i.InvalidCharacterError(),/[A-Z]/.test(e)&&this.isHTML&&(e=i.toASCIILowerCase(e)),void 0===this._attrsByQName[e]?(void 0===t||!0===t)&&(this._setAttribute(e,""),!0):void 0!==t&&!1!==t||(this.removeAttribute(e),!1)}},_setAttribute:{value:function(e,t){var n,r=this._attrsByQName[e];r?Array.isArray(r)&&(r=r[0]):(r=this._newattr(e),n=!0),r.value=t,this._attributes&&(this._attributes[e]=r),n&&this._newattrhook&&this._newattrhook(e,t)}},setAttribute:{value:function(e,t){e=String(e),r.isValidName(e)||i.InvalidCharacterError(),/[A-Z]/.test(e)&&this.isHTML&&(e=i.toASCIILowerCase(e)),this._setAttribute(e,String(t))}},_setAttributeNS:{value:function(e,t,n){var r,i,a=t.indexOf(":");a<0?(r=null,i=t):(r=t.substring(0,a),i=t.substring(a+1)),""!==e&&void 0!==e||(e=null);var o,s=(null===e?"":e)+"|"+i,l=this._attrsByLName[s];l||(l=new b(this,i,r,e),o=!0,this._attrsByLName[s]=l,this._attributes&&(this._attributes[this._attrKeys.length]=l),this._attrKeys.push(s),this._addQName(l)),l.value=n,o&&this._newattrhook&&this._newattrhook(t,n)}},setAttributeNS:{value:function(e,t,n){e=null==e||""===e?null:String(e),t=String(t),r.isValidQName(t)||i.InvalidCharacterError();var o=t.indexOf(":"),s=o<0?null:t.substring(0,o);(null!==s&&null===e||"xml"===s&&e!==a.XML||("xmlns"===t||"xmlns"===s)&&e!==a.XMLNS||e===a.XMLNS&&"xmlns"!==t&&"xmlns"!==s)&&i.NamespaceError(),this._setAttributeNS(e,t,String(n))}},setAttributeNode:{value:function(e){if(null!==e.ownerElement&&e.ownerElement!==this)throw new d(d.INUSE_ATTRIBUTE_ERR);var t=null,n=this._attrsByQName[e.name];if(n){if(Array.isArray(n)||(n=[n]),n.some((function(t){return t===e})))return e;if(null!==e.ownerElement)throw new d(d.INUSE_ATTRIBUTE_ERR);n.forEach((function(e){this.removeAttributeNode(e)}),this),t=n[0]}return this.setAttributeNodeNS(e),t}},setAttributeNodeNS:{value:function(e){if(null!==e.ownerElement)throw new d(d.INUSE_ATTRIBUTE_ERR);var t=e.namespaceURI,n=(null===t?"":t)+"|"+e.localName,r=this._attrsByLName[n];return r&&this.removeAttributeNode(r),e._setOwnerElement(this),this._attrsByLName[n]=e,this._attributes&&(this._attributes[this._attrKeys.length]=e),this._attrKeys.push(n),this._addQName(e),this._newattrhook&&this._newattrhook(e.name,e.value),r||null}},removeAttribute:{value:function(e){e=String(e),/[A-Z]/.test(e)&&this.isHTML&&(e=i.toASCIILowerCase(e));var t=this._attrsByQName[e];if(t){Array.isArray(t)?t.length>2?t=t.shift():(this._attrsByQName[e]=t[1],t=t[0]):this._attrsByQName[e]=void 0;var n=t.namespaceURI,r=(null===n?"":n)+"|"+t.localName;this._attrsByLName[r]=void 0;var a=this._attrKeys.indexOf(r);this._attributes&&(Array.prototype.splice.call(this._attributes,a,1),this._attributes[e]=void 0),this._attrKeys.splice(a,1);var o=t.onchange;t._setOwnerElement(null),o&&o.call(t,this,t.localName,t.value,null),this.rooted&&this.ownerDocument.mutateRemoveAttr(t)}}},removeAttributeNS:{value:function(e,t){var n=(e=null==e?"":String(e))+"|"+(t=String(t)),r=this._attrsByLName[n];if(r){this._attrsByLName[n]=void 0;var i=this._attrKeys.indexOf(n);this._attributes&&Array.prototype.splice.call(this._attributes,i,1),this._attrKeys.splice(i,1),this._removeQName(r);var a=r.onchange;r._setOwnerElement(null),a&&a.call(r,this,r.localName,r.value,null),this.rooted&&this.ownerDocument.mutateRemoveAttr(r)}}},removeAttributeNode:{value:function(e){var t=e.namespaceURI,n=(null===t?"":t)+"|"+e.localName;return this._attrsByLName[n]!==e&&i.NotFoundError(),this.removeAttributeNS(t,e.localName),e}},getAttributeNames:{value:function(){var e=this;return this._attrKeys.map((function(t){return e._attrsByLName[t].name}))}},_getattr:{value:function(e){var t=this._attrsByQName[e];return t?t.value:null}},_setattr:{value:function(e,t){var n,r=this._attrsByQName[e];r||(r=this._newattr(e),n=!0),r.value=String(t),this._attributes&&(this._attributes[e]=r),n&&this._newattrhook&&this._newattrhook(e,t)}},_newattr:{value:function(e){var t=new b(this,e,null,null),n="|"+e;return this._attrsByQName[e]=t,this._attrsByLName[n]=t,this._attributes&&(this._attributes[this._attrKeys.length]=t),this._attrKeys.push(n),t}},_addQName:{value:function(e){var t=e.name,n=this._attrsByQName[t];n?Array.isArray(n)?n.push(e):this._attrsB