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 1.2.7 to 1.2.8

10

CHANGELOG.md

@@ -5,4 +5,12 @@ # Changelog

### [1.2.7](https://github.com/remarkablemark/html-react-parser/compare/v1.2.6...v1.2.7) (2021-06-19)
### [1.2.8](https://github.com/remarkablemark/html-react-parser/compare/v1.2.7...v1.2.8) (2021-08-12)
### Bug Fixes
* rename unit test per feedback ([f39cf38](https://github.com/remarkablemark/html-react-parser/commit/f39cf387cdf1d4866b7ff9538189cb1e1c862199))
* **utilities:** skip corrupted style attributes ([509486e](https://github.com/remarkablemark/html-react-parser/commit/509486e94a45477b17630850b35c0db1faf0a31e)), closes [#256](https://github.com/remarkablemark/html-react-parser/issues/256)
## [1.2.7](https://github.com/remarkablemark/html-react-parser/compare/v1.2.6...v1.2.7) (2021-06-19)
## [1.2.6](https://github.com/remarkablemark/html-react-parser/compare/v1.2.5...v1.2.6) (2021-04-18)

@@ -9,0 +17,0 @@

@@ -1057,3 +1057,7 @@ (function (global, factory) {

}
props.style = styleToJS(style, styleToJSOptions);
try {
props.style = styleToJS(style, styleToJSOptions);
} catch (err) {
props.style = {};
}
}

@@ -1060,0 +1064,0 @@

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

@@ -86,3 +86,7 @@ var React = require('react');

}
props.style = styleToJS(style, styleToJSOptions);
try {
props.style = styleToJS(style, styleToJSOptions);
} catch (err) {
props.style = {};
}
}

@@ -89,0 +93,0 @@

{
"name": "html-react-parser",
"version": "1.2.7",
"version": "1.2.8",
"description": "HTML to React parser.",

@@ -46,5 +46,5 @@ "author": "Mark <mark@remarkablemark.org>",

"devDependencies": {
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@rollup/plugin-commonjs": "^19.0.0",
"@commitlint/cli": "^13.1.0",
"@commitlint/config-conventional": "^13.1.0",
"@rollup/plugin-commonjs": "^20.0.0",
"@rollup/plugin-node-resolve": "^13.0.0",

@@ -58,3 +58,3 @@ "@size-limit/preset-big-lib": "^4.12.0",

"eslint-plugin-prettier": "^3.4.0",
"husky": "^6.0.0",
"husky": "^7.0.0",
"jest": "^27.0.4",

@@ -61,0 +61,0 @@ "lint-staged": "^11.0.0",

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