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

react-htmlcontent

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-htmlcontent - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

webpack.config.js

95

dist/index.js

@@ -1,81 +0,14 @@

"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "enhanceTypo", {
enumerable: true,
get: function get() {
return _enhanceTypo.default;
}
});
exports.default = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var React = _interopRequireWildcard(require("react"));
var _propTypes = require("prop-types");
var _enhanceTypo = _interopRequireDefault(require("./enhanceTypo"));
/**
* Component for displaying HTML content
* @param {Object} props
*/
var HTMLContent =
/*#__PURE__*/
function (_React$PureComponent) {
(0, _inherits2.default)(HTMLContent, _React$PureComponent);
function HTMLContent() {
(0, _classCallCheck2.default)(this, HTMLContent);
return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(HTMLContent).apply(this, arguments));
}
(0, _createClass2.default)(HTMLContent, [{
key: "render",
// shouldComponentUpdate(nextProps: string) {
// return this.props.children === nextProps.children
// }
value: function render() {
var _this$props = this.props,
children = _this$props.children,
tagName = _this$props.tagName,
_this$props$locale = _this$props.locale,
locale = _this$props$locale === void 0 ? 'cs' : _this$props$locale,
rest = (0, _objectWithoutProperties2.default)(_this$props, ["children", "tagName", "locale"]);
if (typeof children !== 'string') throw new Error('You can pass only string as a children.');
var Tag = tagName;
return React.createElement(Tag, (0, _extends2.default)({
dangerouslySetInnerHTML: {
__html: (0, _enhanceTypo.default)(children, locale)
}
}, rest));
}
}]);
return HTMLContent;
}(React.PureComponent);
HTMLContent.defaultProps = {
tagName: 'div',
locale: 'cs'
};
var _default = HTMLContent;
exports.default = _default;
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=25)}([function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";function r(e){return"number"==typeof e&&isNaN(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.startsWith=function(e,t,n){return e.substr(n||0,t.length)===t},t.endsWith=function(e,t,n){var r=(n||e.length)-t.length,o=e.lastIndexOf(t,r);return-1!==o&&o===r},t.stringIncludes=function(e,t,n){return-1!==e.indexOf(t,n||0)},t.isRealNaN=r,t.arrayIncludes=function(e,t,n){var o=e.length;if(0===o)return!1;var i=0|n,a=r(t),s=i>=0?i:o+i;for(;s<o;){var c=e[s++];if(c===t)return!0;if(a&&r(c))return!0}return!1}},function(e,t,n){"use strict";e.exports=n(15)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseDefaults=void 0,t.parse=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,n=(0,r.default)(e,t),a=(0,o.default)(n,t);return(0,i.format)(a,t)},t.stringify=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;return(0,a.toHTML)(e,t)};var r=c(n(20)),o=c(n(21)),i=n(22),a=n(23),s=n(24);function c(e){return e&&e.__esModule?e:{default:e}}var u=t.parseDefaults={voidTags:s.voidTags,closingTags:s.closingTags,childlessTags:s.childlessTags,closingTagAncestorBreakers:s.closingTagAncestorBreakers,includePositions:!1}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){var r=n(11);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(12),o=n(13);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(14);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){e.exports=function(){"use strict";var e=Object.freeze||function(e){return e},t=e(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),n=e(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"]),r=e(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),o=e(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),i=e(["#text"]),a=Object.freeze||function(e){return e},s=a(["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"]),c=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),u=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),l=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),p=Object.hasOwnProperty,f=Object.setPrototypeOf,d=("undefined"!=typeof Reflect&&Reflect).apply;function g(e,t){f&&f(e,null);for(var n=t.length;n--;){var r=t[n];if("string"==typeof r){var o=r.toLowerCase();o!==r&&(Object.isFrozen(t)||(t[n]=o),r=o)}e[r]=!0}return e}function h(e){var t={},n=void 0;for(n in e)d(p,e,[n])&&(t[n]=e[n]);return t}d||(d=function(e,t,n){return e.apply(t,n)});var m=Object.seal||function(e){return e},y=m(/\{\{[\s\S]*|[\s\S]*\}\}/gm),v=m(/<%[\s\S]*|[\s\S]*%>/gm),b=m(/^data-[\-\w.\u00B7-\uFFFF]/),x=m(/^aria-[\-\w]+$/),_=m(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),w=m(/^(?:\w+script|data):/i),E=m(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g),k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function R(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var S=("undefined"!=typeof Reflect&&Reflect).apply,T=Array.prototype.slice,$=Object.freeze,A=function(){return"undefined"==typeof window?null:window};S||(S=function(e,t,n){return e.apply(t,n)});var O=function(e,t){if("object"!==(void 0===e?"undefined":k(e))||"function"!=typeof e.createPolicy)return null;var n=null;t.currentScript&&t.currentScript.hasAttribute("data-tt-policy-suffix")&&(n=t.currentScript.getAttribute("data-tt-policy-suffix"));var r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};return function e(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A(),p=function(t){return e(t)};if(p.version="1.0.11",p.removed=[],!a||!a.document||9!==a.document.nodeType)return p.isSupported=!1,p;var f=a.document,d=!1,m=!1,C=a.document,P=a.DocumentFragment,N=a.HTMLTemplateElement,L=a.Node,D=a.NodeFilter,j=a.NamedNodeMap,M=void 0===j?a.NamedNodeMap||a.MozNamedAttrMap:j,q=a.Text,I=a.Comment,z=a.DOMParser,Q=a.TrustedTypes;if("function"==typeof N){var F=C.createElement("template");F.content&&F.content.ownerDocument&&(C=F.content.ownerDocument)}var H=O(Q,f),B=H?H.createHTML(""):"",U=C,W=U.implementation,Z=U.createNodeIterator,G=U.getElementsByTagName,V=U.createDocumentFragment,Y=f.importNode,X={};p.isSupported=W&&void 0!==W.createHTMLDocument&&9!==C.documentMode;var K=y,J=v,ee=b,te=x,ne=w,re=E,oe=_,ie=null,ae=g({},[].concat(R(t),R(n),R(r),R(o),R(i))),se=null,ce=g({},[].concat(R(s),R(c),R(u),R(l))),ue=null,le=null,pe=!0,fe=!0,de=!1,ge=!1,he=!1,me=!1,ye=!1,ve=!1,be=!1,xe=!1,_e=!1,we=!0,Ee=!0,ke=!1,Re={},Se=g({},["audio","head","math","script","style","template","svg","video"]),Te=g({},["audio","video","img","source","image"]),$e=null,Ae=g({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Oe=null,Ce=C.createElement("form"),Pe=function(e){Oe&&Oe===e||(e&&"object"===(void 0===e?"undefined":k(e))||(e={}),ie="ALLOWED_TAGS"in e?g({},e.ALLOWED_TAGS):ae,se="ALLOWED_ATTR"in e?g({},e.ALLOWED_ATTR):ce,$e="ADD_URI_SAFE_ATTR"in e?g({},e.ADD_URI_SAFE_ATTR):Ae,ue="FORBID_TAGS"in e?g({},e.FORBID_TAGS):{},le="FORBID_ATTR"in e?g({},e.FORBID_ATTR):{},Re="USE_PROFILES"in e&&e.USE_PROFILES,pe=!1!==e.ALLOW_ARIA_ATTR,fe=!1!==e.ALLOW_DATA_ATTR,de=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ge=e.SAFE_FOR_JQUERY||!1,he=e.SAFE_FOR_TEMPLATES||!1,me=e.WHOLE_DOCUMENT||!1,be=e.RETURN_DOM||!1,xe=e.RETURN_DOM_FRAGMENT||!1,_e=e.RETURN_DOM_IMPORT||!1,ve=e.FORCE_BODY||!1,we=!1!==e.SANITIZE_DOM,Ee=!1!==e.KEEP_CONTENT,ke=e.IN_PLACE||!1,oe=e.ALLOWED_URI_REGEXP||oe,he&&(fe=!1),xe&&(be=!0),Re&&(ie=g({},[].concat(R(i))),se=[],!0===Re.html&&(g(ie,t),g(se,s)),!0===Re.svg&&(g(ie,n),g(se,c),g(se,l)),!0===Re.svgFilters&&(g(ie,r),g(se,c),g(se,l)),!0===Re.mathMl&&(g(ie,o),g(se,u),g(se,l))),e.ADD_TAGS&&(ie===ae&&(ie=h(ie)),g(ie,e.ADD_TAGS)),e.ADD_ATTR&&(se===ce&&(se=h(se)),g(se,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&g($e,e.ADD_URI_SAFE_ATTR),Ee&&(ie["#text"]=!0),me&&g(ie,["html","head","body"]),ie.table&&g(ie,["tbody"]),$&&$(e),Oe=e)},Ne=function(e){p.removed.push({element:e});try{e.parentNode.removeChild(e)}catch(t){e.outerHTML=B}},Le=function(e,t){try{p.removed.push({attribute:t.getAttributeNode(e),from:t})}catch(e){p.removed.push({attribute:null,from:t})}t.removeAttribute(e)},De=function(e){var t=void 0,n=void 0;if(ve)e="<remove></remove>"+e;else{var r=e.match(/^[\s]+/);(n=r&&r[0])&&(e=e.slice(n.length))}if(d)try{t=(new z).parseFromString(e,"text/html")}catch(e){}if(m&&g(ue,["title"]),!t||!t.documentElement){var o=(t=W.createHTMLDocument("")).body;o.parentNode.removeChild(o.parentNode.firstElementChild),o.outerHTML=H?H.createHTML(e):e}return n&&t.body.insertBefore(C.createTextNode(n),t.body.childNodes[0]||null),G.call(t,me?"html":"body")[0]};p.isSupported&&(function(){try{De('<svg><p><style><img src="</style><img src=x onerror=1//">').querySelector("svg img")&&(d=!0)}catch(e){}}(),function(){try{De("<x/><title>&lt;/title&gt;&lt;img&gt;").querySelector("title").innerHTML.match(/<\/title/)&&(m=!0)}catch(e){}}());var je=function(e){return Z.call(e.ownerDocument||e,e,D.SHOW_ELEMENT|D.SHOW_COMMENT|D.SHOW_TEXT,(function(){return D.FILTER_ACCEPT}),!1)},Me=function(e){return"object"===(void 0===L?"undefined":k(L))?e instanceof L:e&&"object"===(void 0===e?"undefined":k(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},qe=function(e,t,n){X[e]&&X[e].forEach((function(e){e.call(p,t,n,Oe)}))},Ie=function(e){var t,n=void 0;if(qe("beforeSanitizeElements",e,null),!((t=e)instanceof q||t instanceof I||"string"==typeof t.nodeName&&"string"==typeof t.textContent&&"function"==typeof t.removeChild&&t.attributes instanceof M&&"function"==typeof t.removeAttribute&&"function"==typeof t.setAttribute))return Ne(e),!0;var r=e.nodeName.toLowerCase();if(qe("uponSanitizeElement",e,{tagName:r,allowedTags:ie}),!ie[r]||ue[r]){if(Ee&&!Se[r]&&"function"==typeof e.insertAdjacentHTML)try{var o=e.innerHTML;e.insertAdjacentHTML("AfterEnd",H?H.createHTML(o):o)}catch(e){}return Ne(e),!0}return"noscript"===r&&e.innerHTML.match(/<\/noscript/i)?(Ne(e),!0):"noembed"===r&&e.innerHTML.match(/<\/noembed/i)?(Ne(e),!0):(!ge||e.firstElementChild||e.content&&e.content.firstElementChild||!/</g.test(e.textContent)||(p.removed.push({element:e.cloneNode()}),e.innerHTML?e.innerHTML=e.innerHTML.replace(/</g,"&lt;"):e.innerHTML=e.textContent.replace(/</g,"&lt;")),he&&3===e.nodeType&&(n=(n=(n=e.textContent).replace(K," ")).replace(J," "),e.textContent!==n&&(p.removed.push({element:e.cloneNode()}),e.textContent=n)),qe("afterSanitizeElements",e,null),!1)},ze=function(e,t,n){if(we&&("id"===t||"name"===t)&&(n in C||n in Ce))return!1;if(fe&&ee.test(t));else if(pe&&te.test(t));else{if(!se[t]||le[t])return!1;if($e[t]);else if(oe.test(n.replace(re,"")));else if("src"!==t&&"xlink:href"!==t||"script"===e||0!==n.indexOf("data:")||!Te[e])if(de&&!ne.test(n.replace(re,"")));else if(n)return!1}return!0},Qe=function(e){var t=void 0,n=void 0,r=void 0,o=void 0,i=void 0;qe("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:se};for(i=a.length;i--;){var c=t=a[i],u=c.name,l=c.namespaceURI;if(n=t.value.trim(),r=u.toLowerCase(),s.attrName=r,s.attrValue=n,s.keepAttr=!0,qe("uponSanitizeAttribute",e,s),n=s.attrValue,"name"===r&&"IMG"===e.nodeName&&a.id)o=a.id,a=S(T,a,[]),Le("id",e),Le(u,e),a.indexOf(o)>i&&e.setAttribute("id",o.value);else{if("INPUT"===e.nodeName&&"type"===r&&"file"===n&&s.keepAttr&&(se[r]||!le[r]))continue;"id"===u&&e.setAttribute(u,""),Le(u,e)}if(s.keepAttr){he&&(n=(n=n.replace(K," ")).replace(J," "));var f=e.nodeName.toLowerCase();if(ze(f,r,n))try{l?e.setAttributeNS(l,u,n):e.setAttribute(u,n),p.removed.pop()}catch(e){}}}qe("afterSanitizeAttributes",e,null)}},Fe=function e(t){var n=void 0,r=je(t);for(qe("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)qe("uponSanitizeShadowNode",n,null),Ie(n)||(n.content instanceof P&&e(n.content),Qe(n));qe("afterSanitizeShadowDOM",t,null)};return p.sanitize=function(e,t){var n=void 0,r=void 0,o=void 0,i=void 0,s=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!Me(e)){if("function"!=typeof e.toString)throw new TypeError("toString is not a function");if("string"!=typeof(e=e.toString()))throw new TypeError("dirty is not a string, aborting")}if(!p.isSupported){if("object"===k(a.toStaticHTML)||"function"==typeof a.toStaticHTML){if("string"==typeof e)return a.toStaticHTML(e);if(Me(e))return a.toStaticHTML(e.outerHTML)}return e}if(ye||Pe(t),p.removed=[],ke);else if(e instanceof L)1===(r=(n=De("\x3c!--\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===r.nodeName?n=r:"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!be&&!he&&!me&&-1===e.indexOf("<"))return H?H.createHTML(e):e;if(!(n=De(e)))return be?null:B}n&&ve&&Ne(n.firstChild);for(var c=je(ke?e:n);o=c.nextNode();)3===o.nodeType&&o===i||Ie(o)||(o.content instanceof P&&Fe(o.content),Qe(o),i=o);if(i=null,ke)return e;if(be){if(xe)for(s=V.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return _e&&(s=Y.call(f,s,!0)),s}var u=me?n.outerHTML:n.innerHTML;return he&&(u=(u=u.replace(K," ")).replace(J," ")),H?H.createHTML(u):u},p.setConfig=function(e){Pe(e),ye=!0},p.clearConfig=function(){Oe=null,ye=!1},p.isValidAttribute=function(e,t,n){Oe||Pe({});var r=e.toLowerCase(),o=t.toLowerCase();return ze(r,o,n)},p.addHook=function(e,t){"function"==typeof t&&(X[e]=X[e]||[],X[e].push(t))},p.removeHook=function(e){X[e]&&X[e].pop()},p.removeHooks=function(e){X[e]&&(X[e]=[])},p.removeAllHooks=function(){X={}},p}()}()},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";
/** @license React v16.8.6
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var r=n(16),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,u=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,p=o?Symbol.for("react.context"):60110,f=o?Symbol.for("react.concurrent_mode"):60111,d=o?Symbol.for("react.forward_ref"):60112,g=o?Symbol.for("react.suspense"):60113,h=o?Symbol.for("react.memo"):60115,m=o?Symbol.for("react.lazy"):60116,y="function"==typeof Symbol&&Symbol.iterator;function v(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);!function(e,t,n,r,o,i,a,s){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,s],u=0;(e=Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x={};function _(e,t,n){this.props=e,this.context=t,this.refs=x,this.updater=n||b}function w(){}function E(e,t,n){this.props=e,this.context=t,this.refs=x,this.updater=n||b}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&v("85"),this.updater.enqueueSetState(this,e,t,"setState")},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=_.prototype;var k=E.prototype=new w;k.constructor=E,r(k,_.prototype),k.isPureReactComponent=!0;var R={current:null},S={current:null},T=Object.prototype.hasOwnProperty,$={key:!0,ref:!0,__self:!0,__source:!0};function A(e,t,n){var r=void 0,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)T.call(t,r)&&!$.hasOwnProperty(r)&&(o[r]=t[r]);var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){for(var u=Array(c),l=0;l<c;l++)u[l]=arguments[l+2];o.children=u}if(e&&e.defaultProps)for(r in c=e.defaultProps)void 0===o[r]&&(o[r]=c[r]);return{$$typeof:i,type:e,key:a,ref:s,props:o,_owner:S.current}}function O(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var C=/\/+/g,P=[];function N(e,t,n,r){if(P.length){var o=P.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function L(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>P.length&&P.push(e)}function D(e,t,n){return null==e?0:function e(t,n,r,o){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var c=!1;if(null===t)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case i:case a:c=!0}}if(c)return r(o,t,""===n?"."+j(t,0):n),1;if(c=0,n=""===n?".":n+":",Array.isArray(t))for(var u=0;u<t.length;u++){var l=n+j(s=t[u],u);c+=e(s,l,r,o)}else if(null===t||"object"!=typeof t?l=null:l="function"==typeof(l=y&&t[y]||t["@@iterator"])?l:null,"function"==typeof l)for(t=l.call(t),u=0;!(s=t.next()).done;)c+=e(s=s.value,l=n+j(s,u++),r,o);else"object"===s&&v("31","[object Object]"===(r=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":r,"");return c}(e,"",t,n)}function j(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function M(e,t){e.func.call(e.context,t,e.count++)}function q(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?I(e,r,n,(function(e){return e})):null!=e&&(O(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(C,"$&/")+"/")+n)),r.push(e))}function I(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(C,"$&/")+"/"),D(e,q,t=N(t,i,r,o)),L(t)}function z(){var e=R.current;return null===e&&v("321"),e}var Q={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return I(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;D(e,M,t=N(null,null,t,n)),L(t)},count:function(e){return D(e,(function(){return null}),null)},toArray:function(e){var t=[];return I(e,t,null,(function(e){return e})),t},only:function(e){return O(e)||v("143"),e}},createRef:function(){return{current:null}},Component:_,PureComponent:E,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:p,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:d,render:e}},lazy:function(e){return{$$typeof:m,_ctor:e,_status:-1,_result:null}},memo:function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return z().useCallback(e,t)},useContext:function(e,t){return z().useContext(e,t)},useEffect:function(e,t){return z().useEffect(e,t)},useImperativeHandle:function(e,t,n){return z().useImperativeHandle(e,t,n)},useDebugValue:function(){},useLayoutEffect:function(e,t){return z().useLayoutEffect(e,t)},useMemo:function(e,t){return z().useMemo(e,t)},useReducer:function(e,t,n){return z().useReducer(e,t,n)},useRef:function(e){return z().useRef(e)},useState:function(e){return z().useState(e)},Fragment:s,StrictMode:c,Suspense:g,createElement:A,cloneElement:function(e,t,n){null==e&&v("267",e);var o=void 0,a=r({},e.props),s=e.key,c=e.ref,u=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,u=S.current),void 0!==t.key&&(s=""+t.key);var l=void 0;for(o in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),t)T.call(t,o)&&!$.hasOwnProperty(o)&&(a[o]=void 0===t[o]&&void 0!==l?l[o]:t[o])}if(1===(o=arguments.length-2))a.children=n;else if(1<o){l=Array(o);for(var p=0;p<o;p++)l[p]=arguments[p+2];a.children=l}return{$$typeof:i,type:e.type,key:s,ref:c,props:a,_owner:u}},createFactory:function(e){var t=A.bind(null,e);return t.type=e,t},isValidElement:O,version:"16.8.6",unstable_ConcurrentMode:f,unstable_Profiler:u,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:R,ReactCurrentOwner:S,assign:r}},F={default:Q},H=F&&Q||F;e.exports=H.default||H},function(e,t,n){"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,c=a(e),u=1;u<arguments.length;u++){for(var l in n=Object(arguments[u]))o.call(n,l)&&(c[l]=n[l]);if(r){s=r(n);for(var p=0;p<s.length;p++)i.call(n,s[p])&&(c[s[p]]=n[s[p]])}}return c}},function(e,t,n){e.exports=n(18)()},function(e,t,n){"use strict";var r=n(19);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.feedPosition=o,t.jumpPosition=i,t.makeInitialPosition=a,t.copyPosition=s,t.default=function(e,t){var n={str:e,options:t,position:{index:0,column:0,line:0},tokens:[]};return c(n),n.tokens},t.lex=c,t.findTextEnd=l,t.lexText=p,t.lexComment=f,t.lexTag=d,t.isWhitespaceChar=h,t.lexTagName=m,t.lexTagAttributes=y,t.lexSkipTag=b;var r=n(1);function o(e,t,n){for(var r=e.index,o=e.index=r+n,i=r;i<o;i++){"\n"===t.charAt(i)?(e.line++,e.column=0):e.column++}}function i(e,t,n){return o(e,t,n-e.index)}function a(){return{index:0,column:0,line:0}}function s(e){return{index:e.index,line:e.line,column:e.column}}function c(e){for(var t=e.str,n=e.options.childlessTags,o=t.length;e.position.index<o;){var i=e.position.index;if(p(e),e.position.index===i)if((0,r.startsWith)(t,"!--",i+1))f(e);else{var a=d(e),s=a.toLowerCase();(0,r.arrayIncludes)(n,s)&&b(a,e)}}}var u=/[A-Za-z0-9]/;function l(e,t){for(;;){var n=e.indexOf("<",t);if(-1===n)return n;var r=e.charAt(n+1);if("/"===r||"!"===r||u.test(r))return n;t=n+1}}function p(e){var t=e.str,n=e.position,r=l(t,n.index);if(r!==n.index){-1===r&&(r=t.length);var o=s(n),a=t.slice(n.index,r);i(n,t,r);var c=s(n);e.tokens.push({type:"text",content:a,position:{start:o,end:c}})}}function f(e){var t=e.str,n=e.position,r=s(n);o(n,t,4);var a=t.indexOf("--\x3e",n.index),c=a+3;-1===a&&(a=c=t.length);var u=t.slice(n.index,a);i(n,t,c),e.tokens.push({type:"comment",content:u,position:{start:r,end:s(n)}})}function d(e){var t=e.str,n=e.position,r="/"===t.charAt(n.index+1),i=s(n);o(n,t,r?2:1),e.tokens.push({type:"tag-start",close:r,position:{start:i}});var a=m(e);y(e);var c="/"===t.charAt(n.index);o(n,t,c?2:1);var u=s(n);return e.tokens.push({type:"tag-end",close:c,position:{end:u}}),a}var g=/\s/;function h(e){return g.test(e)}function m(e){for(var t=e.str,n=e.position,r=t.length,o=n.index;o<r;){var a=t.charAt(o);if(!(h(a)||"/"===a||">"===a))break;o++}for(var s=o+1;s<r;){var c=t.charAt(s);if(!!(h(c)||"/"===c||">"===c))break;s++}i(n,t,s);var u=t.slice(o,s);return e.tokens.push({type:"tag",content:u}),u}function y(e){for(var t=e.str,n=e.position,o=e.tokens,a=n.index,s=null,c=a,u=[],l=t.length;a<l;){var p=t.charAt(a);if(s){p===s&&(s=null),a++}else{if("/"===p||">"===p){a!==c&&u.push(t.slice(c,a));break}if(h(p))a!==c&&u.push(t.slice(c,a)),c=a+1,a++;else"'"===p||'"'===p?(s=p,a++):a++}}i(n,t,a);for(var f=u.length,d="attribute",g=0;g<f;g++){var m=u[g];if(-1===m.indexOf("=")){var y=u[g+1];if(y&&(0,r.startsWith)(y,"=")){if(y.length>1){var v=m+y;o.push({type:d,content:v}),g+=1;continue}var b=u[g+2];if(g+=1,b){var x=m+"="+b;o.push({type:d,content:x}),g+=1;continue}}}if((0,r.endsWith)(m,"=")){var _=u[g+1];if(_&&!(0,r.stringIncludes)(_,"=")){var w=m+_;o.push({type:d,content:w}),g+=1;continue}var E=m.slice(0,-1);o.push({type:d,content:E})}else o.push({type:d,content:m})}}var v=[].push;function b(e,t){for(var n=t.str,r=t.position,o=t.tokens,a=e.toLowerCase(),c=n.length,u=r.index;u<c;){var l=n.indexOf("</",u);if(-1===l){p(t);break}var f=s(r);i(f,n,l);var g={str:n,position:f,tokens:[]};if(a===d(g).toLowerCase()){if(l!==r.index){var h=s(r);i(r,n,l),o.push({type:"text",content:n.slice(h.index,l),position:{start:h,end:s(r)}})}v.apply(o,g.tokens),i(r,n,g.position.index);break}u=g.position.index}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n={tagName:null,children:[]};return a({tokens:e,options:t,cursor:0,stack:[n]}),n.children},t.hasTerminalParent=o,t.rewindStack=i,t.parse=a;var r=n(1);function o(e,t,n){var o=n[e];if(o)for(var i=t.length-1;i>=0;){var a=t[i].tagName;if(a===e)break;if((0,r.arrayIncludes)(o,a))return!0;i--}return!1}function i(e,t,n,r){e[t].position.end=r;for(var o=t+1,i=e.length;o<i;o++)e[o].position.end=n;e.splice(t)}function a(e){for(var t=e.tokens,n=e.options,s=e.stack,c=s[s.length-1].children,u=t.length,l=e.cursor;l<u;){var p=t[l];if("tag-start"===p.type){var f=t[++l];l++;var d=f.content.toLowerCase();if(p.close){for(var g=s.length,h=!1;--g>-1;)if(s[g].tagName===d){h=!0;break}for(;l<u;){if("tag-end"!==t[l].type)break;l++}if(h){i(s,g,p.position.start,t[l-1].position.end);break}}else{var m=(0,r.arrayIncludes)(n.closingTags,d);if(m)m=!o(d,s,n.closingTagAncestorBreakers);if(m)for(var y=s.length-1;y>0;){if(d===s[y].tagName){i(s,y,p.position.start,p.position.start),c=s[y-1].children;break}y-=1}for(var v=[],b=void 0;l<u&&"tag-end"!==(b=t[l]).type;)v.push(b.content),l++;l++;var x=[],_={start:p.position.start,end:b.position.end},w={type:"element",tagName:f.content,attributes:v,children:x,position:_};if(c.push(w),!(b.close||(0,r.arrayIncludes)(n.voidTags,d))){var E=s.push({tagName:d,children:x,position:_}),k={tokens:t,options:n,cursor:l,stack:s};a(k),l=k.cursor,s.length===E&&(w.position.end=t[l-1].position.end)}}}else c.push(p),l++}e.cursor=l}},function(e,t,n){"use strict";function r(e,t){var n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}function o(e){var t=e.charAt(0),n=e.length-1;return('"'===t||"'"===t)&&t===e.charAt(n)?e.slice(1,n):e}function i(e){return e.map((function(e){var t=r(e.trim(),"=");return{key:t[0],value:"string"==typeof t[1]?o(t[1]):null}}))}Object.defineProperty(t,"__esModule",{value:!0}),t.splitHead=r,t.unquote=o,t.format=function e(t,n){return t.map((function(t){var r=t.type,o="element"===r?{type:r,tagName:t.tagName.toLowerCase(),attributes:i(t.attributes),children:e(t.children,n)}:{type:r,content:t.content};return n.includePositions&&(o.position=t.position),o}))},t.formatAttributes=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=o,t.toHTML=i;var r=n(1);function o(e){return e.reduce((function(e,t){var n=t.key,r=t.value;if(null===r)return e+" "+n;var o=-1!==r.indexOf("'")?'"':"'";return e+" "+n+"="+o+r+o}),"")}function i(e,t){return e.map((function(e){if("text"===e.type)return e.content;if("comment"===e.type)return"\x3c!--"+e.content+"--\x3e";var n=e.tagName,a=e.attributes,s=e.children;return(0,r.arrayIncludes)(t.voidTags,n.toLowerCase())?"<"+n+o(a)+">":"<"+n+o(a)+">"+i(s,t)+"</"+n+">"})).join("")}t.default={toHTML:i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.childlessTags=["style","script","template"],t.closingTags=["html","head","body","p","dt","dd","li","option","thead","th","tbody","tr","td","tfoot","colgroup"],t.closingTagAncestorBreakers={li:["ul","ol","menu"],dt:["dl"],dd:["dl"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table"],td:["table"]},t.voidTags=["!doctype","area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]},function(e,t,n){"use strict";n.r(t);var r=n(4),o=n.n(r),i=n(5),a=n.n(i),s=n(0),c=n.n(s),u=n(6),l=n.n(u),p=n(7),f=n.n(p),d=n(8),g=n.n(d),h=n(9),m=n.n(h),y=n(2),v=(n(17),{cs:{quotes:{leftDoubleQuote:"„",rightDoubleQuote:"“",leftSingleQuote:"‚",rightSingleQuote:"‘"},numbers:{ordinalIndicator:"\\.",romanOrdinalIndicator:"\\."},abbreviationsForNbsp:["č.","s.","fol.","str.","r.","par.","odst.","např.","sv.","tj.","tzv.","čl.","hl.","m.","hl.&nbsp;m."]},"en-us":{quotes:{leftDoubleQuote:"“",rightDoubleQuote:"”",leftSingleQuote:"‘",rightSingleQuote:"’"},numbers:{ordinalIndicator:"st|nd|rd|th",romanOrdinalIndicator:""},abbreviationsForNbsp:["e.g.","i.e.","p.","pp."]},rue:{quotes:{leftDoubleQuote:"«",rightDoubleQuote:"»",leftSingleQuote:"‹",rightSingleQuote:"›"},numbers:{ordinalIndicator:"\\.",romanOrdinalIndicator:"\\."},abbreviationsForNbsp:[]},sk:{quotes:{leftDoubleQuote:"„",rightDoubleQuote:"“",leftSingleQuote:"‚",rightSingleQuote:"‘"},numbers:{ordinalIndicator:"\\.",romanOrdinalIndicator:"\\."},abbreviationsForNbsp:["č.","s.","fol.","str.","r.","par.","odst.","napr.","sv.","tj.","tzv.","čl.","hl.","m."]}}),b=function e(t){for(t in c()(this,e),this.locale=t,this.nonLatinLowercase="áäčďéěíĺľňóôöőŕřšťúüűůýžабвгґдезіийклмнопрстуфъыьцчжшїщёєюях",this.nonLatinUppercase="ÁÄČĎÉĚÍĹĽŇÓÔÖŐŔŘŠŤÚÜŰŮÝŽАБВГҐДЕЗІИЙКЛМНОПРСТУФЪЫЬЦЧЖШЇЩЁЄЮЯХ",this.nonLatinChars=this.nonLatinLowercase+this.nonLatinUppercase,this.lowercaseChars="a-z"+this.nonLatinLowercase,this.uppercaseChars="A-Z"+this.nonLatinUppercase,this.allChars=this.lowercaseChars+this.uppercaseChars,this.singleQuoteAdepts="‚|'|‘|’|ʼ|‛|′|‹|›",this.leftSingleQuote=v[t].quotes.leftSingleQuote,this.rightSingleQuote=v[t].quotes.rightSingleQuote,this.apostrophe="’",this.singlePrime="′",this.doubleQuoteAdepts="„|“|”|\"|«|»|″|,{2,}|‘{2,}|’{2,}|'{2,}|‹{2,}|›{2,}|′{2,}",this.leftDoubleQuote=v[t].quotes.leftDoubleQuote,this.rightDoubleQuote=v[t].quotes.rightDoubleQuote,this.doublePrime="″",this.space=" ",this.nbsp=" ",this.nbspEntity="&nbsp;",this.hairSpace=" ",this.narrowNbsp=" ",this.spaces=this.space+this.nbsp+this.hairSpace+this.narrowNbsp,this.terminalPunctuation=".!?",this.sentencePausePunctuation=",:;",this.sentencePunctuation=this.sentencePausePunctuation+this.terminalPunctuation,this.openingBrackets="\\(\\[\\{",this.closingBrackets="\\)\\]\\}",this.ellipsis="…",this.hyphen="-",this.enDash="–",this.emDash="—",this.slash="/",this.degree="°",this.multiplicationSign="×",this.ampersand="&",this.sectionSign="§",this.copyright="©",this.registeredTrademark="®",this.soundRecordingCopyright="℗",this.trademark="™",this.plusMinus="±",this.webUrlPattern="((?:(http|https|Http|Https|rtsp|Rtsp):\\/\\/(?:(?:[a-zA-Z0-9\\$\\-\\_\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,64}(?:\\:(?:[a-zA-Z0-9\\$\\-\\_\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,25})?\\@)?)?((?:(?:[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}\\.)+(?:(?:aero|arpa|asia|a[cdefgilmnoqrstuwxz])|(?:biz|b[abdefghijmnorstvwyz])|(?:cat|com|coop|c[acdfghiklmnoruvxyz])|d[ejkmoz]|(?:edu|e[cegrstu])|f[ijkmor]|(?:gov|g[abdefghilmnpqrstuwy])|h[kmnrtu]|(?:info|int|i[delmnoqrst])|(?:jobs|j[emop])|k[eghimnrwyz]|l[abcikrstuvy]|(?:mil|mobi|museum|m[acdghklmnopqrstuvwxyz])|(?:name|net|n[acefgilopruz])|(?:org|om)|(?:pro|p[aefghklmnrstwy])|qa|r[eouw]|s[abcdeghijklmnortuvyz]|(?:tel|travel|t[cdfghjklmnoprtvwz])|u[agkmsyz]|v[aceginu]|w[fs]|y[etu]|z[amw]))|(?:(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9])\\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[0-9])))(?:\\:\\d{1,5})?)(\\/(?:(?:[a-zA-Z0-9\\;\\/\\?\\:\\@\\&\\=\\#\\~\\-\\.\\+\\!\\*\\'\\(\\)\\,\\_])|(?:\\%[a-fA-F0-9]{2}))*)?(?:\\b|$)",this.emailAddressPattern="[a-zA-Z0-9\\+\\.\\_\\%\\-]{1,256}\\@[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,25})+",this.cardinalNumber="\\d+",this.ordinalIndicator=v[t].numbers.ordinalIndicator,this.romanNumerals="IVXLCDM",this.romanOrdinalIndicator=v[t].numbers.romanOrdinalIndicator,this.abbreviationsForNbsp={},v)for(var n=v[t].abbreviationsForNbsp,r=0;r<n.length;r++){var o=new RegExp("\\.","g"),i=n[r].replace(o,"\\.");this.abbreviationsForNbsp[n[r]]=i}};function x(e){return e.replace(/^\s+/gm,"")}function _(e,t){var n="(["+t.spaces+"])(["+t.terminalPunctuation+t.closingBrackets+t.degree+"])",r=new RegExp(n,"g");return e.replace(r,"$2")}function w(e,t){var n="(["+t.openingBrackets+"])(["+t.spaces+"])",r=new RegExp(n,"g");return e.replace(r,"$1")}function E(e,t){return e.trim()}function k(e,t,n){var r="([^"+t.spaces+t.openingBrackets+"])("+n+")",o=new RegExp(r,"g"),i="$1"+t.space+"$2";return e.replace(o,i)}function R(e,t){return e=E(e=function(e,t){var n="(["+t.lowercaseChars+t.uppercaseChars+"]{2,})(["+t.sentencePunctuation+t.closingBrackets+"])(["+t.lowercaseChars+t.uppercaseChars+"])",r=new RegExp(n,"g");return e.replace(r,"$1$2 $3")}(e=function(e,t){var n="(["+t.lowercaseChars+t.uppercaseChars+"])(["+t.openingBrackets+"])(["+t.lowercaseChars+t.uppercaseChars+"])",r=new RegExp(n,"g");return e.replace(r,"$1 $2$3")}(e=w(e=_(e=function(e,t){var n="(["+t.spaces+"])(["+t.sentencePausePunctuation+"])([^\\-\\)]|$)",r=new RegExp(n,"g");return e.replace(r,"$2$3")}(e=function(e,t){for(var n=e.split(/\r?\n/),r=0;r<n.length;r++)n[r]=n[r].replace(/^\s+/,"");return n.join("\n")}(e=function(e,t){var n="["+t.spaces+"]{2,}",r=new RegExp(n,"g");return e.replace(r," ")}(e,t)),t),t),t),t),t))}function S(e,t,n){var r="("+n+")([^"+t.spaces+"])",o=new RegExp(r,"g"),i="$1"+t.nbspEntity+"$2";return e.replace(o,i)}function T(e,t,n){var r="("+n+")(["+t.spaces+"])",o=new RegExp(r,"g"),i="$1"+t.nbspEntity;return e.replace(o,i)}function $(e,t){return e=function(e,t){var n=t.abbreviationsForNbsp;for(var r in n){var o="(^|[^"+t.allChars+t.sentencePunctuation+"\\n])("+n[r]+")(["+t.spaces+"])(["+t.allChars+"]|"+t.cardinalNumber+")",i=new RegExp(o,"gi"),a="$1"+r+t.nbspEntity+"$4";e=e.replace(i,a)}for(var r in n){var s="(^|[^"+t.allChars+t.sentencePunctuation+"\\n])("+n[r]+"["+t.spaces+"]?)(["+t.allChars+"][^\\.]|"+t.cardinalNumber+")",c=new RegExp(s,"gi"),u="$1"+r+t.nbspEntity+"$3";e=e.replace(c,u)}return E(e)}(e=function(e,t){var n="(["+t.uppercaseChars+"]\\.)(["+t.spaces+"])",r=new RegExp(n,"g"),o="$1"+t.nbspEntity;return e.replace(r,o)}(e=function(e,t){if(""!=t.romanOrdinalIndicator){var n="(\\b["+t.romanNumerals+"]+)("+t.romanOrdinalIndicator+")(["+t.spaces+"]?)",r=new RegExp(n,"g"),o="$1$2"+t.nbspEntity;return e.replace(r,o)}return e}(e=function(e,t){var n="("+t.cardinalNumber+")("+t.ordinalIndicator+")(["+t.spaces+"]?)("+t.cardinalNumber+")("+t.ordinalIndicator+")(["+t.spaces+"]?)("+t.cardinalNumber+")",r=new RegExp(n,"g"),o="$1$2"+t.nbspEntity+"$4$5"+t.nbspEntity+"$7";return e.replace(r,o)}(e=function(e,t){var n="("+t.cardinalNumber+")("+t.ordinalIndicator+")(["+t.spaces+"]?)(["+t.allChars+"]+)",r=new RegExp(n,"g"),o="$1$2"+t.nbspEntity+"$4";return e.replace(r,o)}(e=function(e,t){var n="("+t.cardinalNumber+")( )(["+t.allChars+"]+)",r=new RegExp(n,"g"),o="$1"+t.nbspEntity+"$3";return e.replace(r,o)}(e=function(e,t){var n="(["+t.spaces+"])("+t.ampersand+")(["+t.spaces+"])",r=new RegExp(n,"g"),o=" $2"+t.nbspEntity;return e.replace(r,o)}(e=function(e,t){var n="(^|["+t.space+"]|[^"+t.allChars+t.apostrophe+"])(["+t.allChars+"])(["+t.space+"])",r=new RegExp(n,"g"),o="$1$2"+t.nbspEntity;return e=(e=e.replace(r,o)).replace(r,o)}(e=function(e,t){return e.replace(/([0-9]{1,})\s+([0-9]{3})/gim,"$1"+t.nbspEntity+"$2")}(e=function(e,t){var n="(["+t.lowercaseChars+t.uppercaseChars+"]{2,})(["+t.nbsp+t.narrowNbsp+"])(["+t.lowercaseChars+t.uppercaseChars+"]{2,})",r=new RegExp(n,"g");return e=(e=e.replace(r,"$1 $3")).replace(r,"$1 $3")}(e,t),t),t),t),t),t),t),t),t),t)}function A(e){return e.replace(/\.{2}/g,".")}function O(e){return A(e)}function C(e,t){return e=function(e,t){var n=",["+t.spaces+"]?"+t.ellipsis+"["+t.spaces+"]?,",r=new RegExp(n,"g");return e=e.replace(r,", …,"),n="(["+t.lowercaseChars+"])(["+t.spaces+"])("+t.ellipsis+"["+t.spaces+"]["+t.uppercaseChars+"])",r=new RegExp(n,"g"),e=e.replace(r,"$1$3"),n="(["+t.sentencePunctuation+"]["+t.spaces+"]"+t.ellipsis+")(["+t.spaces+"])(["+t.lowercaseChars+"])",r=new RegExp(n,"g"),e=e.replace(r,"$1$3"),n="(^…)(["+t.spaces+"])(["+t.lowercaseChars+t.uppercaseChars+"])",r=new RegExp(n,"gm"),e=e.replace(r,"$1$3"),n="(["+t.lowercaseChars+t.sentencePunctuation+"])(["+t.spaces+"])("+t.ellipsis+")(?![ "+t.sentencePunctuation+t.lowercaseChars+t.uppercaseChars+"])",r=new RegExp(n,"g"),e=e.replace(r,"$1$3")}(e=function(e,t){var n="["+t.ellipsis+"\\.]{3,}",r=new RegExp(n,"g"),o=t.ellipsis;return e=e.replace(r,o),n="["+t.spaces+"]\\.{2}["+t.spaces+"]",r=new RegExp(n,"g"),o=t.space+t.ellipsis+t.space,e=e.replace(r,o),n=t.ellipsis+"\\.+",r=new RegExp(n,"g"),o=t.ellipsis,e=e.replace(r,o),n="\\.+"+t.ellipsis,r=new RegExp(n,"g"),o=t.ellipsis,e=e.replace(r,o),n=t.ellipsis+"{2,}",r=new RegExp(n,"g"),o=t.ellipsis,e=e.replace(r,o)}(e,t),t)}function P(e,t){return e=function(e,t){var n="(["+t.allChars+"])(-)(["+t.spaces+"])(["+t.allChars+"])",r=new RegExp(n,"g");return e=e.replace(r,"$1-$4"),n="(["+t.allChars+"])(["+t.spaces+"])(-)(["+t.allChars+"])",r=new RegExp(n,"g"),e=e.replace(r,"$1-$4")}(e,t)}function N(e,t){return e=function(e,t){var n="("+t.cardinalNumber+")("+t.ordinalIndicator+")(["+t.spaces+"]?["+t.hyphen+t.enDash+t.emDash+"]["+t.spaces+"]?)("+t.cardinalNumber+")("+t.ordinalIndicator+")",r=new RegExp(n,"gi"),o="$1$2"+t.enDash+"$4$5";return e.replace(r,o)}(e=function(e,t){var n="("+t.cardinalNumber+")(["+t.spaces+"]?["+t.hyphen+t.enDash+t.emDash+"]["+t.spaces+"]?)("+t.cardinalNumber+")",r=new RegExp(n,"g"),o="$1"+t.enDash+"$3";return e.replace(r,o)}(e=function(e,t){var n="["+t.spaces+"]?["+t.emDash+"]["+t.spaces+"]?",r=new RegExp(n,"g"),o="";switch(t.locale){case"en-us":o=t.emDash;break;case"rue":case"sk":case"cs":o=t.narrowNbsp+t.emDash+t.hairSpace}return e.replace(r,o)}(e=function(e,t){var n="["+t.spaces+"]["+t.enDash+"]["+t.spaces+"]",r=new RegExp(n,"g"),o=t.space+t.emDash+t.space;return e.replace(r,o)}(e=function(e,t){var n="["+t.spaces+"]["+t.hyphen+"]["+t.spaces+"]",r=new RegExp(n,"g"),o=t.space+t.emDash+t.space;return e.replace(r,o)}(e=function(e,t){return e.replace(/(--)/g,"–")}(e=function(e,t){return e.replace(/(---)/g,"—")}(e)),t),t),t),t),t)}function L(e,t){var n="(["+t.sentencePunctuation+"])("+t.doubleQuoteAdepts+")(["+t.sentencePunctuation+"])",r=new RegExp(n,"g");return e=e.replace(r,"$1$2"),n="("+t.doubleQuoteAdepts+")(["+t.terminalPunctuation+"])",r=new RegExp(n,"g"),e=e.replace(r,"$2$1"),n="(\\d["+t.spaces+"]?)(“|”|\"|″|‘{2,}|’{2,}|'{2,}|′{2,})",r=new RegExp(n,"g"),e=e.replace(r,"$1{{typopo__double-prime}}"),n="("+t.doubleQuoteAdepts+")(.*?)("+t.doubleQuoteAdepts+")",r=new RegExp(n,"g"),e=e.replace(r,"{{typopo__left-double-quote}}$2{{typopo__right-double-quote}}"),n="("+t.doubleQuoteAdepts+")(["+t.lowercaseChars+t.uppercaseChars+"])",r=new RegExp(n,"g"),e=e.replace(r,"{{typopo__left-double-quote--unclosed}}$2"),n="(["+t.lowercaseChars+t.uppercaseChars+t.sentencePunctuation+t.ellipsis+"])("+t.doubleQuoteAdepts+")",r=new RegExp(n,"g"),e=e.replace(r,"$1{{typopo__right-double-quote--unclosed}}"),n="(["+t.spaces+"])("+t.doubleQuoteAdepts+")(["+t.spaces+"])",r=new RegExp(n,"g"),e=e.replace(r,"$1$3"),n="({{typopo__left-double-quote--unclosed}})(.*?)({{typopo__double-prime}})",r=new RegExp(n,"g"),e=(e=(e=(e=e.replace(r,"{{typopo__left-double-quote}}$2{{typopo__right-double-quote}}")).replace(/({{typopo__left-double-quote}})( )/g,"$1")).replace(/( )({{typopo__right-double-quote}})/g,"$2")).replace(/( )({{typopo__double-prime}})/g,"$2"),n="([^"+t.sentencePunctuation+"]["+t.spaces+"]{{typopo__left-double-quote}}.+?)(["+t.terminalPunctuation+"])({{typopo__right-double-quote}})",r=new RegExp(n,"g"),e=e.replace(r,"$1$3$2"),n="(?![.])(["+t.sentencePunctuation+"])([,])",r=new RegExp(n,"g"),e=e.replace(r,"$1"),n="(["+t.sentencePunctuation+t.allChars+"])({{typopo__left-double-quote}})",r=new RegExp(n,"g"),e=e.replace(r,"$1 $2"),n="({{typopo__right-double-quote}})(["+t.allChars+"])",r=new RegExp(n,"g"),e=(e=(e=(e=e.replace(r,"$1 $2")).replace(/({{typopo__double-prime}})/g,t.doublePrime)).replace(/({{typopo__left-double-quote}}|{{typopo__left-double-quote--unclosed}})/g,t.leftDoubleQuote)).replace(/({{typopo__right-double-quote}}|{{typopo__right-double-quote--unclosed}})/g,t.rightDoubleQuote)}function D(e,t){var n="("+t.singleQuoteAdepts+")(n)("+t.singleQuoteAdepts+")",r=new RegExp(n,"gi");e=e.replace(r,"{{typopo__apostrophe}}$2{{typopo__apostrophe}}");n="("+t.singleQuoteAdepts+")(em|cause|twas|tis|til|round)",r=new RegExp(n,"gi"),e=e.replace(r,"{{typopo__apostrophe}}$2");var o=t.cardinalNumber+t.allChars;return n="(["+o+"])("+t.singleQuoteAdepts+t.doubleQuoteAdepts+")+(["+o+"])",r=new RegExp(n,"g"),e=e.replace(r,"$1{{typopo__apostrophe}}$3"),n="("+t.singleQuoteAdepts+")([0-9]{2})",r=new RegExp(n,"g"),e=e.replace(r,"{{typopo__apostrophe}}$2"),n="("+t.doubleQuoteAdepts+")(.*?)("+t.doubleQuoteAdepts+")",r=new RegExp(n,"g"),e=(e=e.replace(r,(function(e,n,r,o){var i="( )("+t.singleQuoteAdepts+")(["+t.allChars+"])",a=new RegExp(i,"g");return r=r.replace(a,"$1{{typopo__left-single-quote--adept}}$3"),i="(["+t.allChars+"])([.,!?])?("+t.singleQuoteAdepts+")([ ]|[.,!?])",a=new RegExp(i,"g"),r=r.replace(a,"$1$2{{typopo__right-single-quote--adept}}$4"),i="({{typopo__left-single-quote--adept}})(["+t.allChars+"]+)({{typopo__right-single-quote--adept}})",a=new RegExp(i,"g"),r=r.replace(a,"{{typopo__left-single-quote}}$2{{typopo__right-single-quote}}"),i="({{typopo__left-single-quote--adept}})(.*)({{typopo__right-single-quote--adept}})",a=new RegExp(i,"g"),n+(r=r.replace(a,"{{typopo__left-single-quote}}$2{{typopo__right-single-quote}}"))+o}))).replace(/(\d)( ?)('|‘|’|‛|′)/g,"$1{{typopo__single-prime}}"),n="({{typopo__left-single-quote--adept}})(.*?)({{typopo__single-prime}})",r=new RegExp(n,"g"),e=e.replace(r,"{{typopo__left-single-quote}}$2{{typopo__right-single-quote}}"),n="("+t.singleQuoteAdepts+")",r=new RegExp(n,"g"),e=(e=(e=(e=(e=e.replace(r,"{{typopo__apostrophe}}")).replace(/({{typopo__single-prime}})/g,t.singlePrime)).replace(/{{typopo__apostrophe}}|{{typopo__left-single-quote--adept}}|{{typopo__right-single-quote--adept}}/g,t.apostrophe)).replace(/{{typopo__left-single-quote}}/g,t.leftSingleQuote)).replace(/{{typopo__right-single-quote}}/g,t.rightSingleQuote)}function j(e,t){var n="([1-9]+[ ]{0,1}[a-wz"+t.singlePrime+t.doublePrime+"]*)(["+t.spaces+"]{0,1}[x|×]["+t.spaces+"]{0,1})([1-9]+[ ]{0,1}[a-wz]*)",r=new RegExp(n,"gi"),o="$1 "+t.multiplicationSign+" $3";return e=e.replace(r,o),n="(["+t.cardinalNumber+"])(["+t.spaces+"]{0,1})([x|×])([ ])([a-wz]+)",r=new RegExp(n,"gi"),o="$1$2"+t.multiplicationSign+t.nbsp+"$5",e=e.replace(r,o),n="(["+t.spaces+"]+)("+t.multiplicationSign+")(["+t.spaces+"]+)",r=new RegExp(n,"g"),o=t.nbsp+t.multiplicationSign+t.nbsp,e=e.replace(r,o)}function M(e,t){return e=function(e,t){var n="("+t.sectionSign+")(["+t.spaces+"])",r=new RegExp(n,"g"),o="$1"+t.nbsp;return e.replace(r,o)}(e=function(e,t){var n="("+t.sectionSign+")([^"+t.spaces+t.sectionSign+"])",r=new RegExp(n,"g"),o="$1"+t.nbsp+"$2";return e.replace(r,o)}(e=function(e,t){var n="([^"+t.spaces+t.sectionSign+t.openingBrackets+"])("+t.sectionSign+")",r=new RegExp(n,"g"),o="$1"+t.space+"$2";return e.replace(r,o)}(e,t),t),t)}function q(e,t){return e=T(e=S(e=k(e=function(e,t){var n="(\\(c\\))(["+t.spaces+"]?)("+t.cardinalNumber+")",r=new RegExp(n,"gi"),o=t.copyright+"$2$3";return e.replace(r,o)}(e=_(e=w(e,t),t),t),t,t.copyright),t,t.copyright),t,t.copyright)}function I(e,t){return e=T(e=S(e=k(e=function(e,t){var n="(\\(p\\))(["+t.spaces+"]?)("+t.cardinalNumber+")",r=new RegExp(n,"gi"),o=t.soundRecordingCopyright+"$2$3";return e.replace(r,o)}(e,t),t,t.soundRecordingCopyright),t,t.soundRecordingCopyright),t,t.soundRecordingCopyright)}function z(e,t){var n=new RegExp("(\\+\\-)|(\\-\\+)","g"),r=t.plusMinus;return e.replace(n,r)}function Q(e,t){return e=function(e,t){var n="([^0-9]|^)(["+t.spaces+"]*)(\\(r\\)|"+t.registeredTrademark+")",r=new RegExp(n,"gi"),o="$1"+t.registeredTrademark;return e.replace(r,o)}(e=_(e=w(e,t),t),t)}function F(e,t){return e=function(e,t){var n="(["+t.spaces+"]*)(\\(tm\\)|"+t.trademark+")",r=new RegExp(n,"gi"),o=t.trademark;return e.replace(r,o)}(e=_(e=w(e,t),t),t)}function H(e,t,n,r){var o="(["+t.spaces+t.slash+"])(m|dam|hm|km|Mm|Gm|Tm|Pm|Em|Zm|Ym|m|dm|cm|mm|µm|nm|pm|fm|am|zm|ym)("+n+")",i=new RegExp(o,"g"),a="$1$2"+r;return e.replace(i,a)}function B(e,t){return e=function(e,t){return H(e,t,"3","³")}(e=function(e,t){return H(e,t,"2","²")}(e,t),t)}function U(e,t){return function(e,t){for(var n=["eg","ie"],r=0;r<n.length;r++){var o="(^|["+t.spaces+t.openingBrackets+t.leftDoubleQuote+t.leftSingleQuote+"])(["+n[r][0]+"]\\.?["+t.spaces+"]*["+n[r][1]+"]\\.?)(["+t.spaces+"]*)(["+t.closingBrackets+t.rightDoubleQuote+t.rightSingleQuote+t.sentencePausePunctuation+"])",i=new RegExp(o,"gi"),a="$1{{typopo__"+n[r]+"}}$4";e=e.replace(i,a)}n=["eg","ie"];for(var s=0;s<n.length;s++){var c="(^|\\s|["+t.openingBrackets+"])(["+n[s][0]+"]\\.?["+t.spaces+"]*["+n[s][1]+"]\\.?)(["+t.spaces+"]?)([^"+t.allChars+t.cardinalNumber+"\\n])",u=new RegExp(c,"gi"),l="$1{{typopo__"+n[s]+"}} ";e=e.replace(u,l)}n=["am","pm"];for(var p=0;p<n.length;p++){var f="(^|["+t.openingBrackets+t.leftDoubleQuote+t.leftSingleQuote+"])(["+n[p][0]+"]\\.?["+t.spaces+"]*["+n[p][1]+"]\\.?)(["+t.spaces+"]*)(["+t.closingBrackets+t.rightDoubleQuote+t.rightSingleQuote+"]|$)",d=new RegExp(f,"gi"),g="$1{{typopo__"+n[p]+"}}$4";e=e.replace(d,g)}n=["am","pm"];for(var h=0;h<n.length;h++){var m="(\\d)(["+t.spaces+"]?)(["+n[h][0]+"]\\.?["+t.spaces+"]*["+n[h][1]+"]\\.?)(["+t.spaces+"]?)(\\b)",y=new RegExp(m,"gi"),v="$1 {{typopo__"+n[h]+"}}$4";e=e.replace(y,v)}n=["eg","ie","am","pm"];for(var b=0;b<n.length;b++){var x="(["+t.nonLatinChars+"])({{typopo__"+n[b]+"}})",_=new RegExp(x,"g"),w="$1"+n[b];e=e.replace(_,w),x="({{typopo__"+n[b]+"}})(["+t.spaces+"]?)(["+t.nonLatinChars+"])",_=new RegExp(x,"g"),w=n[b]+"$3",e=e.replace(_,w)}for(var k=0;k<n.length;k++){var R="{{typopo__"+n[k]+"}}",S=new RegExp(R,"g"),T=n[k][0]+"."+n[k][1]+".";e=e.replace(S,T)}return e=A(e=E(e))}(e,t)}function W(e,t){var n="([^"+t.allChars+"]|^)(["+t.uppercaseChars+"]{2})(["+t.lowercaseChars+"]{2,})",r=new RegExp(n,"g");return e=e.replace(r,(function(e,t,n,r){return t+n.substring(0,1)+n.substring(1).toLowerCase()+r})),n="["+t.lowercaseChars+"]["+t.uppercaseChars+"]\\b",r=new RegExp(n,"g"),e=e.replace(r,(function(e){return e.substring(0,1)+e.substring(1).toLowerCase()})),n="(\\b)(["+t.lowercaseChars+"])(["+t.uppercaseChars+"]{2,})",r=new RegExp(n,"g"),e=e.replace(r,(function(e,t,n,r){return t+n+r.toLowerCase()}))}var Z=[];function G(e,t){V(e,t.emailAddressPattern),V(e,t.webUrlPattern);for(var n=0;n<Z.length;n++){var r="{{typopo__exception-"+n+"}}";e=e.replace(Z[n],r)}return e}function V(e,t){var n=new RegExp(t,"g"),r=e.match(n);null!=r&&(Z=Z.concat(r))}function Y(e){for(var t=0;t<Z.length;t++){var n=new RegExp("{{typopo__exception-"+t+"}}","g"),r=Z[t];e=e.replace(n,r)}return e}var X=n(10),K=n.n(X),J=n(3),ee=function(e){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"cs",n=arguments.length>2?arguments[2]:void 0,r=new b(t);return n=void 0===n?{removeLines:!1}:n,e=G(e=e.replace(/[\s]{2,}/gi," "),r),n.removeLines&&(e=x(e)),e=(e=(e=Y(e=$(e=U(e=W(e=B(e=F(e=Q(e=z(e=I(e=q(e=M(e=j(e=L(e=D(e=P(e=N(e=O(e=R(e=C(e,r),r)),r),r),r),r),r),r),r),r),r),r),r),r),r),r),r))).replace(/(&nbsp;)\s/gim,"$1")).replace(/ios/gi,"iOS")}(e,"cs")},te=function(e){return"text"===e.type},ne=function(e){if(Array.isArray(e)&&e.length>0)return e[0];throw new Error("Bad input. Expected array.")},re=function(e){if(Array.isArray(e)&&e.length>0)return e[e.length-1];throw new Error("Bad input. Expected array.")};function oe(e){var t=K.a.sanitize(e,{ADD_ATTR:["target"],USE_PROFILES:{html:!0}});return function e(t,n){var r;if(Array.isArray(t)?r=t:(n(t),r=t.children),r)for(var o=r[0],i=0;o;)e(o,n),o=r[++i]}(t=Object(J.parse)(t),(function(e){if(te(e)){var t=""===ne(e.content.split(/\s/))?" ":"",n=""===re(e.content.split(/\s/))?" ":"";console.log('"'.concat(e.content,'" -> before: "').concat(t,'" after: "').concat(n,'"')),e.content="".concat(t).concat(ee(e.content).replace("Po (d)klady","Po(d)klady")).concat(n)}})),t=Object(J.stringify)(t)}n.d(t,"enhanceTypo",(function(){return oe}));var ie=function(e){function t(){return c()(this,t),f()(this,g()(t).apply(this,arguments))}return m()(t,e),l()(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.tagName,r=(e.locale,a()(e,["children","tagName","locale"]));if("string"!=typeof t)throw new Error("You can pass only string as a children.");var i=n;return y.createElement(i,o()({dangerouslySetInnerHTML:{__html:oe(t)}},r))}}]),t}(y.PureComponent);ie.defaultProps={tagName:"div",locale:"cs"};t.default=ie}]);
{
"name": "react-htmlcontent",
"version": "2.0.0",
"version": "2.0.1",
"description": "React HTMLContent Component",

@@ -11,3 +11,3 @@ "repository": {

"scripts": {
"prepublish": ". ./.scripts/prepublish.sh",
"prepublish": "rm -fr dist && webpack",
"lint": "eslint src",

@@ -34,3 +34,3 @@ "lintfix": "eslint src --fix",

"babel-eslint": "^10.0.2",
"babel-loader": "^8.0.6",
"babel-loader": "8.0.6",
"chai": "^4.2.0",

@@ -40,3 +40,3 @@ "core-js": "3.1.4",

"eslint": "^6.0.1",
"eslint-config-frack": "^2.2.3",
"eslint-config-react-app": "5.0.1",
"git-url-parse": "^11.1.2",

@@ -48,4 +48,6 @@ "jest": "^24.8.0",

"react-addons-test-utils": "^15.6.2",
"react-dom": "^16.8.6",
"sinon": "^7.3.2"
"react-dom": "^16.9.0",
"sinon": "^7.4.2",
"webpack": "4.39.3",
"webpack-cli": "^3.3.8"
},

@@ -56,4 +58,4 @@ "peerDependencies": {

"dependencies": {
"himalaya": "^1.1.0",
"dompurify": "1.0.11"
"dompurify": "1.0.11",
"himalaya": "^1.1.0"
},

@@ -60,0 +62,0 @@ "main": "dist/index.js",

@@ -19,2 +19,8 @@ import enhanceTypo from '../src/enhanceTypo'

test('Měna v HTML', () => {
expect(enhanceTypo('<p>Je to <b>99 999 Kč</b>. </p>', 'cs', {})).toEqual(
'<p>Je to <b>99 999&nbsp;Kč</b>. </p>',
)
})
test('Simple HTML', () => {

@@ -21,0 +27,0 @@ expect(

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