Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

html-react-parser

Package Overview
Dependencies
Maintainers
1
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-react-parser - npm Package Compare versions

Comparing version 5.1.11 to 5.1.12

2

dist/html-react-parser.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).HTMLReactParser=t(e.React)}(this,(function(e){"use strict";function t(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o={},i={},a={};Object.defineProperty(a,"__esModule",{value:!0});var l="html",s="head",c="body",u=/<([a-zA-Z]+[0-9]?)/,d=/<head[^]*>/i,p=/<body[^]*>/i,f=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},h=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},m="object"==typeof window&&window.DOMParser;if("function"==typeof m){var y=new m;f=h=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),y.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var g=document.implementation.createHTMLDocument();f=function(e,t){if(t){var n=g.documentElement.querySelector(t);return n&&(n.innerHTML=e),g}return g.documentElement.innerHTML=e,g}}var v,b="object"==typeof document&&document.createElement("template");b&&b.content&&(v=function(e){return b.innerHTML=e,b.content.childNodes}),a.default=function(e){var t,n,r=e.match(u),o=r&&r[1]?r[1].toLowerCase():"";switch(o){case l:var i=h(e);if(!d.test(e))null===(t=null==(m=i.querySelector(s))?void 0:m.parentNode)||void 0===t||t.removeChild(m);if(!p.test(e))null===(n=null==(m=i.querySelector(c))?void 0:m.parentNode)||void 0===n||n.removeChild(m);return i.querySelectorAll(l);case s:case c:var a=f(e).querySelectorAll(o);return p.test(e)&&d.test(e)?a[0].parentNode.childNodes:a;default:return v?v(e):(m=f(e,c).querySelector(c)).childNodes;var m}};var x={},E={},T={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(t=e.ElementType||(e.ElementType={})),e.isTag=function(e){return e.type===t.Tag||e.type===t.Script||e.type===t.Style},e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype}(T);var k,w={},S=n&&n.__extends||(k=function(e,t){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},k(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}k(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),C=n&&n.__assign||function(){return C=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},C.apply(this,arguments)};Object.defineProperty(w,"__esModule",{value:!0}),w.cloneNode=w.hasChildren=w.isDocument=w.isDirective=w.isComment=w.isText=w.isCDATA=w.isTag=w.Element=w.Document=w.CDATA=w.NodeWithChildren=w.ProcessingInstruction=w.Comment=w.Text=w.DataNode=w.Node=void 0;var _=T,O=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),U(this,e)},e}();w.Node=O;var A=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return S(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(O);w.DataNode=A;var P=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=_.ElementType.Text,t}return S(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(A);w.Text=P;var N=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=_.ElementType.Comment,t}return S(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(A);w.Comment=N;var M=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=_.ElementType.Directive,r}return S(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(A);w.ProcessingInstruction=M;var I=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return S(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(O);w.NodeWithChildren=I;var D=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=_.ElementType.CDATA,t}return S(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(I);w.CDATA=D;var R=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=_.ElementType.Root,t}return S(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(I);w.Document=R;var j=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?_.ElementType.Script:"style"===t?_.ElementType.Style:_.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return S(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(I);function L(e){return(0,_.isTag)(e)}function F(e){return e.type===_.ElementType.CDATA}function H(e){return e.type===_.ElementType.Text}function z(e){return e.type===_.ElementType.Comment}function B(e){return e.type===_.ElementType.Directive}function V(e){return e.type===_.ElementType.Root}function U(e,t){var n;if(void 0===t&&(t=!1),H(e))n=new P(e.data);else if(z(e))n=new N(e.data);else if(L(e)){var r=t?q(e.children):[],o=new j(e.name,C({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=C({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=C({},e["x-attribsPrefix"])),n=o}else if(F(e)){r=t?q(e.children):[];var i=new D(r);r.forEach((function(e){return e.parent=i})),n=i}else if(V(e)){r=t?q(e.children):[];var a=new R(r);r.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!B(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new M(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function q(e){for(var t=e.map((function(e){return U(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}w.Element=j,w.isTag=L,w.isCDATA=F,w.isText=H,w.isComment=z,w.isDirective=B,w.isDocument=V,w.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},w.cloneNode=U,function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=n&&n.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var o=T,i=w;r(w,e);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?o.ElementType.Tag:void 0,r=new i.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===o.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new i.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===o.ElementType.Comment)this.lastNode.data+=e;else{var t=new i.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(""),t=new i.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new i.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();e.DomHandler=l,e.default=l}(E);var W={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES=void 0,e.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})}(W),Object.defineProperty(x,"__esModule",{value:!0}),x.formatDOM=x.formatAttributes=void 0;var X=E,G=W;function Y(e){for(var t={},n=0,r=e.length;n<r;n++){var o=e[n];t[o.name]=o.value}return t}function Z(e){var t=function(e){return G.CASE_SENSITIVE_TAG_NAMES_MAP[e]}(e=e.toLowerCase());return t||e}x.formatAttributes=Y,x.formatDOM=function e(t,n,r){void 0===n&&(n=null);for(var o,i=[],a=0,l=t.length;a<l;a++){var s=t[a];switch(s.nodeType){case 1:var c=Z(s.nodeName);(o=new X.Element(c,Y(s.attributes))).children=e("template"===c?s.content.childNodes:s.childNodes,o);break;case 3:o=new X.Text(s.nodeValue);break;case 8:o=new X.Comment(s.nodeValue);break;default:continue}var u=i[a-1]||null;u&&(u.next=o),o.parent=n,o.prev=u,o.next=null,i.push(o)}return r&&((o=new X.ProcessingInstruction(r.substring(0,r.indexOf(" ")).toLowerCase(),r)).next=i[0]||null,o.parent=n,i.unshift(o),i[1]&&(i[1].prev=i[0])),i};var $=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});var K=$(a),J=x,Q=/<(![a-zA-Z\s]+)>/;i.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(Q),n=t?t[1]:void 0;return(0,J.formatDOM)((0,K.default)(e),null,n)};var ee={},te={},ne={};ne.SAME=0;ne.CAMELCASE=1,ne.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1};function re(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}const oe={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{oe[e]=new re(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{oe[e]=new re(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{oe[e]=new re(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{oe[e]=new re(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{oe[e]=new re(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{oe[e]=new re(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{oe[e]=new re(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{oe[e]=new re(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{oe[e]=new re(e,5,!1,e.toLowerCase(),null,!1,!1)}));const ie=/[\-\:]([a-z])/g,ae=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(ie,ae);oe[t]=new re(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(ie,ae);oe[t]=new re(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(ie,ae);oe[t]=new re(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{oe[e]=new re(e,1,!1,e.toLowerCase(),null,!1,!1)}));oe.xlinkHref=new re("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{oe[e]=new re(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:le,SAME:se,possibleStandardNames:ce}=ne,ue=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),de=Object.keys(ce).reduce(((e,t)=>{const n=ce[t];return n===se?e[t]=t:n===le?e[t.toLowerCase()]=t:e[t]=n,e}),{});te.BOOLEAN=3,te.BOOLEANISH_STRING=2,te.NUMERIC=5,te.OVERLOADED_BOOLEAN=4,te.POSITIVE_NUMERIC=6,te.RESERVED=0,te.STRING=1,te.getPropertyInfo=function(e){return oe.hasOwnProperty(e)?oe[e]:null},te.isCustomAttribute=ue,te.possibleStandardNames=de;var pe={},fe={},he=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,me=/\n/g,ye=/^\s*/,ge=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ve=/^:\s*/,be=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,xe=/^[;\s]*/,Ee=/^\s+|\s+$/g,Te="";function ke(e){return e?e.replace(Ee,Te):Te}var we=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fe,"__esModule",{value:!0});var Se=we((function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(e){var t=e.match(me);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function i(){var e={line:n,column:r};return function(t){return t.position=new a(e),c(),t}}function a(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function l(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i}function s(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function c(){s(ye)}function u(e){var t;for(e=e||[];t=d();)!1!==t&&e.push(t);return e}function d(){var t=i();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;Te!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,Te===e.charAt(n-1))return l("End of comment missing");var a=e.slice(2,n-2);return r+=2,o(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function p(){var e=i(),t=s(ge);if(t){if(d(),!s(ve))return l("property missing ':'");var n=s(be),r=e({type:"declaration",property:ke(t[0].replace(he,Te)),value:n?ke(n[0].replace(he,Te)):Te});return s(xe),r}}return a.prototype.content=e,c(),function(){var e,t=[];for(u(t);e=p();)!1!==e&&(t.push(e),u(t));return t}()}));fe.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,Se.default)(e),o="function"==typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,i=e.value;o?t(r,i,e):i&&((n=n||{})[r]=i)}})),n};var Ce={};Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.camelCase=void 0;var _e=/^--[a-zA-Z0-9-]+$/,Oe=/-([a-z])/g,Ae=/^[^-]+$/,Pe=/^-(webkit|moz|ms|o|khtml)-/,Ne=/^-(ms)-/,Me=function(e,t){return t.toUpperCase()},Ie=function(e,t){return"".concat(t,"-")};Ce.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||Ae.test(e)||_e.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(Ne,Ie):e.replace(Pe,Ie)).replace(Oe,Me))};var De=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(fe),Re=Ce;function je(e,t){var n={};return e&&"string"==typeof e?((0,De.default)(e,(function(e,r){e&&r&&(n[(0,Re.camelCase)(e,t)]=r)})),n):n}je.default=je;var Le=je;!function(t){var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){if(!e.includes("-"))return Boolean(t&&"string"==typeof t.is);if(a.has(e))return!1;return!0},t.setStyleProp=function(e,t){if("string"!=typeof e)return;if(!e.trim())return void(t.style={});try{t.style=(0,i.default)(e,l)}catch(e){t.style={}}};var o=e,i=r(Le),a=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);var l={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(o.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)};t.returnFirstArg=function(e){return e}}(pe),Object.defineProperty(ee,"__esModule",{value:!0}),ee.default=function(e,t){void 0===e&&(e={});var n={},r=Boolean(e.type&&Ve[e.type]);for(var o in e){var i=e[o];if((0,Fe.isCustomAttribute)(o))n[o]=i;else{var a=o.toLowerCase(),l=Ue(a);if(l){var s=(0,Fe.getPropertyInfo)(l);switch(ze.includes(l)&&Be.includes(t)&&!r&&(l=Ue("default"+a)),n[l]=i,s&&s.type){case Fe.BOOLEAN:n[l]=!0;break;case Fe.OVERLOADED_BOOLEAN:""===i&&(n[l]=!0)}}else He.PRESERVE_CUSTOM_ATTRIBUTES&&(n[o]=i)}}return(0,He.setStyleProp)(e.style,n),n};var Fe=te,He=pe,ze=["checked","value"],Be=["input","select","textarea"],Ve={reset:!0,submit:!0};function Ue(e){return Fe.possibleStandardNames[e]}var qe={},We=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qe,"__esModule",{value:!0}),qe.default=function e(t,n){void 0===n&&(n={});for(var r=[],o="function"==typeof n.replace,i=n.transform||Ye.returnFirstArg,a=n.library||Ze,l=a.cloneElement,s=a.createElement,c=a.isValidElement,u=t.length,d=0;d<u;d++){var p=t[d];if(o){var f=n.replace(p,d);if(c(f)){u>1&&(f=l(f,{key:f.key||d})),r.push(i(f,p,d));continue}}if("text"!==p.type){var h=p,m={};$e(h)?((0,Ye.setStyleProp)(h.attribs.style,h.attribs),m=h.attribs):h.attribs&&(m=(0,Ge.default)(h.attribs,h.name));var y=void 0;switch(p.type){case"script":case"style":p.children[0]&&(m.dangerouslySetInnerHTML={__html:p.children[0].data});break;case"tag":"textarea"===p.name&&p.children[0]?m.defaultValue=p.children[0].data:p.children&&p.children.length&&(y=e(p.children,n));break;default:continue}u>1&&(m.key=d),r.push(i(s(p.name,m,y),p,d))}else{var g=!p.data.trim().length;if(g&&p.parent&&!(0,Ye.canTextBeChildOfNode)(p.parent))continue;if(n.trim&&g)continue;r.push(i(p.data,p,d))}}return 1===r.length?r[0]:r};var Xe=e,Ge=We(ee),Ye=pe,Ze={cloneElement:Xe.cloneElement,createElement:Xe.createElement,isValidElement:Xe.isValidElement};function $e(e){return Ye.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,Ye.isCustomComponent)(e.name,e.attribs)}!function(e){var t=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];return(0,a.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||s),t)};var r=t(i);e.htmlToDOM=r.default;var o=t(ee);e.attributesToProps=o.default;var a=t(qe);e.domToReact=a.default;var l=E;Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return l.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return l.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return l.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return l.Text}});var s={lowerCaseAttributeNames:!1}}(o);var Ke=r(o),Je=t({__proto__:null,default:Ke},[o]);const Qe=Ke;return Object.assign(Qe,Je),Qe}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).HTMLReactParser=t(e.React)}(this,(function(e){"use strict";function t(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o={},i={},a={};Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(e){var t,n,r=e.match(u),o=r&&r[1]?r[1].toLowerCase():"";switch(o){case l:var i=h(e);if(!p.test(e))null===(t=null==(m=i.querySelector(s))?void 0:m.parentNode)||void 0===t||t.removeChild(m);if(!d.test(e))null===(n=null==(m=i.querySelector(c))?void 0:m.parentNode)||void 0===n||n.removeChild(m);return i.querySelectorAll(l);case s:case c:var a=f(e).querySelectorAll(o);return d.test(e)&&p.test(e)?a[0].parentNode.childNodes:a;default:return v?v(e):(m=f(e,c).querySelector(c)).childNodes;var m}};var l="html",s="head",c="body",u=/<([a-zA-Z]+[0-9]?)/,p=/<head[^]*>/i,d=/<body[^]*>/i,f=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},h=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},m="object"==typeof window&&window.DOMParser;if("function"==typeof m){var y=new m;f=h=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),y.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var g=document.implementation.createHTMLDocument();f=function(e,t){if(t){var n=g.documentElement.querySelector(t);return n&&(n.innerHTML=e),g}return g.documentElement.innerHTML=e,g}}var v,b="object"==typeof document&&document.createElement("template");b&&b.content&&(v=function(e){return b.innerHTML=e,b.content.childNodes});var x={},E={},T={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(t=e.ElementType||(e.ElementType={})),e.isTag=function(e){return e.type===t.Tag||e.type===t.Script||e.type===t.Style},e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype}(T);var k,w={},S=n&&n.__extends||(k=function(e,t){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},k(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}k(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),C=n&&n.__assign||function(){return C=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},C.apply(this,arguments)};Object.defineProperty(w,"__esModule",{value:!0}),w.cloneNode=w.hasChildren=w.isDocument=w.isDirective=w.isComment=w.isText=w.isCDATA=w.isTag=w.Element=w.Document=w.CDATA=w.NodeWithChildren=w.ProcessingInstruction=w.Comment=w.Text=w.DataNode=w.Node=void 0;var _=T,O=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),U(this,e)},e}();w.Node=O;var A=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return S(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(O);w.DataNode=A;var P=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=_.ElementType.Text,t}return S(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(A);w.Text=P;var N=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=_.ElementType.Comment,t}return S(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(A);w.Comment=N;var M=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=_.ElementType.Directive,r}return S(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(A);w.ProcessingInstruction=M;var I=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return S(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(O);w.NodeWithChildren=I;var D=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=_.ElementType.CDATA,t}return S(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(I);w.CDATA=D;var R=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=_.ElementType.Root,t}return S(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(I);w.Document=R;var j=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?_.ElementType.Script:"style"===t?_.ElementType.Style:_.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return S(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(I);function L(e){return(0,_.isTag)(e)}function F(e){return e.type===_.ElementType.CDATA}function H(e){return e.type===_.ElementType.Text}function z(e){return e.type===_.ElementType.Comment}function B(e){return e.type===_.ElementType.Directive}function V(e){return e.type===_.ElementType.Root}function U(e,t){var n;if(void 0===t&&(t=!1),H(e))n=new P(e.data);else if(z(e))n=new N(e.data);else if(L(e)){var r=t?q(e.children):[],o=new j(e.name,C({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=C({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=C({},e["x-attribsPrefix"])),n=o}else if(F(e)){r=t?q(e.children):[];var i=new D(r);r.forEach((function(e){return e.parent=i})),n=i}else if(V(e)){r=t?q(e.children):[];var a=new R(r);r.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!B(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new M(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function q(e){for(var t=e.map((function(e){return U(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}w.Element=j,w.isTag=L,w.isCDATA=F,w.isText=H,w.isComment=z,w.isDirective=B,w.isDocument=V,w.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},w.cloneNode=U,function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=n&&n.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var o=T,i=w;r(w,e);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?o.ElementType.Tag:void 0,r=new i.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===o.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new i.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===o.ElementType.Comment)this.lastNode.data+=e;else{var t=new i.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(""),t=new i.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new i.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();e.DomHandler=l,e.default=l}(E);var W={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES=void 0,e.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})}(W),Object.defineProperty(x,"__esModule",{value:!0}),x.formatAttributes=Y,x.formatDOM=function e(t,n,r){void 0===n&&(n=null);for(var o,i=[],a=0,l=t.length;a<l;a++){var s=t[a];switch(s.nodeType){case 1:var c=Z(s.nodeName);(o=new X.Element(c,Y(s.attributes))).children=e("template"===c?s.content.childNodes:s.childNodes,o);break;case 3:o=new X.Text(s.nodeValue);break;case 8:o=new X.Comment(s.nodeValue);break;default:continue}var u=i[a-1]||null;u&&(u.next=o),o.parent=n,o.prev=u,o.next=null,i.push(o)}r&&((o=new X.ProcessingInstruction(r.substring(0,r.indexOf(" ")).toLowerCase(),r)).next=i[0]||null,o.parent=n,i.unshift(o),i[1]&&(i[1].prev=i[0]));return i};var X=E,G=W;function Y(e){for(var t={},n=0,r=e.length;n<r;n++){var o=e[n];t[o.name]=o.value}return t}function Z(e){var t=function(e){return G.CASE_SENSITIVE_TAG_NAMES_MAP[e]}(e=e.toLowerCase());return t||e}var $=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(Q),n=t?t[1]:void 0;return(0,J.formatDOM)((0,K.default)(e),null,n)};var K=$(a),J=x,Q=/<(![a-zA-Z\s]+)>/;var ee={},te={},ne={};ne.SAME=0;ne.CAMELCASE=1,ne.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1};function re(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}const oe={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{oe[e]=new re(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{oe[e]=new re(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{oe[e]=new re(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{oe[e]=new re(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{oe[e]=new re(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{oe[e]=new re(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{oe[e]=new re(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{oe[e]=new re(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{oe[e]=new re(e,5,!1,e.toLowerCase(),null,!1,!1)}));const ie=/[\-\:]([a-z])/g,ae=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(ie,ae);oe[t]=new re(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(ie,ae);oe[t]=new re(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(ie,ae);oe[t]=new re(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{oe[e]=new re(e,1,!1,e.toLowerCase(),null,!1,!1)}));oe.xlinkHref=new re("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{oe[e]=new re(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:le,SAME:se,possibleStandardNames:ce}=ne,ue=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),pe=Object.keys(ce).reduce(((e,t)=>{const n=ce[t];return n===se?e[t]=t:n===le?e[t.toLowerCase()]=t:e[t]=n,e}),{});te.BOOLEAN=3,te.BOOLEANISH_STRING=2,te.NUMERIC=5,te.OVERLOADED_BOOLEAN=4,te.POSITIVE_NUMERIC=6,te.RESERVED=0,te.STRING=1,te.getPropertyInfo=function(e){return oe.hasOwnProperty(e)?oe[e]:null},te.isCustomAttribute=ue,te.possibleStandardNames=pe;var de={},fe={},he=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,me=/\n/g,ye=/^\s*/,ge=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ve=/^:\s*/,be=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,xe=/^[;\s]*/,Ee=/^\s+|\s+$/g,Te="";function ke(e){return e?e.replace(Ee,Te):Te}var we=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fe,"__esModule",{value:!0});var Se=we((function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(e){var t=e.match(me);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function i(){var e={line:n,column:r};return function(t){return t.position=new a(e),c(),t}}function a(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function l(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i}function s(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function c(){s(ye)}function u(e){var t;for(e=e||[];t=p();)!1!==t&&e.push(t);return e}function p(){var t=i();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;Te!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,Te===e.charAt(n-1))return l("End of comment missing");var a=e.slice(2,n-2);return r+=2,o(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function d(){var e=i(),t=s(ge);if(t){if(p(),!s(ve))return l("property missing ':'");var n=s(be),r=e({type:"declaration",property:ke(t[0].replace(he,Te)),value:n?ke(n[0].replace(he,Te)):Te});return s(xe),r}}return a.prototype.content=e,c(),function(){var e,t=[];for(u(t);e=d();)!1!==e&&(t.push(e),u(t));return t}()}));fe.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,Se.default)(e),o="function"==typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,i=e.value;o?t(r,i,e):i&&((n=n||{})[r]=i)}})),n};var Ce={};Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.camelCase=void 0;var _e=/^--[a-zA-Z0-9-]+$/,Oe=/-([a-z])/g,Ae=/^[^-]+$/,Pe=/^-(webkit|moz|ms|o|khtml)-/,Ne=/^-(ms)-/,Me=function(e,t){return t.toUpperCase()},Ie=function(e,t){return"".concat(t,"-")};Ce.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||Ae.test(e)||_e.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(Ne,Ie):e.replace(Pe,Ie)).replace(Oe,Me))};var De=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(fe),Re=Ce;function je(e,t){var n={};return e&&"string"==typeof e?((0,De.default)(e,(function(e,r){e&&r&&(n[(0,Re.camelCase)(e,t)]=r)})),n):n}je.default=je;var Le=je;!function(t){var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){if(!e.includes("-"))return Boolean(t&&"string"==typeof t.is);if(a.has(e))return!1;return!0},t.setStyleProp=function(e,t){if("string"!=typeof e)return;if(!e.trim())return void(t.style={});try{t.style=(0,i.default)(e,l)}catch(e){t.style={}}};var o=e,i=r(Le),a=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);var l={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(o.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)};t.returnFirstArg=function(e){return e}}(de),Object.defineProperty(ee,"__esModule",{value:!0}),ee.default=function(e,t){void 0===e&&(e={});var n={},r=Boolean(e.type&&Ve[e.type]);for(var o in e){var i=e[o];if((0,Fe.isCustomAttribute)(o))n[o]=i;else{var a=o.toLowerCase(),l=Ue(a);if(l){var s=(0,Fe.getPropertyInfo)(l);switch(ze.includes(l)&&Be.includes(t)&&!r&&(l=Ue("default"+a)),n[l]=i,s&&s.type){case Fe.BOOLEAN:n[l]=!0;break;case Fe.OVERLOADED_BOOLEAN:""===i&&(n[l]=!0)}}else He.PRESERVE_CUSTOM_ATTRIBUTES&&(n[o]=i)}}return(0,He.setStyleProp)(e.style,n),n};var Fe=te,He=de,ze=["checked","value"],Be=["input","select","textarea"],Ve={reset:!0,submit:!0};function Ue(e){return Fe.possibleStandardNames[e]}var qe={},We=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qe,"__esModule",{value:!0}),qe.default=function e(t,n){void 0===n&&(n={});for(var r=[],o="function"==typeof n.replace,i=n.transform||Ye.returnFirstArg,a=n.library||Ze,l=a.cloneElement,s=a.createElement,c=a.isValidElement,u=t.length,p=0;p<u;p++){var d=t[p];if(o){var f=n.replace(d,p);if(c(f)){u>1&&(f=l(f,{key:f.key||p})),r.push(i(f,d,p));continue}}if("text"!==d.type){var h=d,m={};$e(h)?((0,Ye.setStyleProp)(h.attribs.style,h.attribs),m=h.attribs):h.attribs&&(m=(0,Ge.default)(h.attribs,h.name));var y=void 0;switch(d.type){case"script":case"style":d.children[0]&&(m.dangerouslySetInnerHTML={__html:d.children[0].data});break;case"tag":"textarea"===d.name&&d.children[0]?m.defaultValue=d.children[0].data:d.children&&d.children.length&&(y=e(d.children,n));break;default:continue}u>1&&(m.key=p),r.push(i(s(d.name,m,y),d,p))}else{var g=!d.data.trim().length;if(g&&d.parent&&!(0,Ye.canTextBeChildOfNode)(d.parent))continue;if(n.trim&&g)continue;r.push(i(d.data,d,p))}}return 1===r.length?r[0]:r};var Xe=e,Ge=We(ee),Ye=de,Ze={cloneElement:Xe.cloneElement,createElement:Xe.createElement,isValidElement:Xe.isValidElement};function $e(e){return Ye.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,Ye.isCustomComponent)(e.name,e.attribs)}!function(e){var t=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];return(0,a.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||s),t)};var r=t(i);e.htmlToDOM=r.default;var o=t(ee);e.attributesToProps=o.default;var a=t(qe);e.domToReact=a.default;var l=E;Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return l.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return l.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return l.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return l.Text}});var s={lowerCaseAttributeNames:!1}}(o);var Ke=r(o),Je=t({__proto__:null,default:Ke},[o]);const Qe=Ke;return Object.assign(Qe,Je),Qe}));
//# sourceMappingURL=html-react-parser.min.js.map
{
"name": "html-react-parser",
"version": "5.1.11",
"version": "5.1.12",
"description": "HTML to React parser.",

@@ -52,3 +52,3 @@ "author": "Mark <mark@remarkablemark.org> (https://remarkablemark.org)",

"domhandler": "5.0.3",
"html-dom-parser": "5.0.8",
"html-dom-parser": "5.0.9",
"react-property": "2.0.2",

@@ -74,3 +74,3 @@ "style-to-js": "1.1.12"

"eslint-plugin-prettier": "5.2.1",
"husky": "9.1.0",
"husky": "9.1.1",
"jest": "29.7.0",

@@ -85,3 +85,3 @@ "jest-environment-jsdom": "29.7.0",

"size-limit": "11.1.4",
"ts-jest": "29.2.2",
"ts-jest": "29.2.3",
"typescript": "5.5.3"

@@ -88,0 +88,0 @@ },

@@ -404,3 +404,3 @@ # html-react-parser

> [!WARNING]
> `htmlparser2` options _**don't work** on the client-side_ (browser) and they _**only work** on the server-side_ (Node.js). By overriding the options, it can break universal rendering.
> `htmlparser2` options _**don't work** on the client-side_ (browser); they _**only work** on the server-side_ (Node.js). By overriding the options, it can break universal rendering.

@@ -407,0 +407,0 @@ Default [htmlparser2 options](https://github.com/fb55/htmlparser2/wiki/Parser-options#option-xmlmode) can be overridden in >=[0.12.0](https://github.com/remarkablemark/html-react-parser/tree/v0.12.0).

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc