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

rnd-helmet

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rnd-helmet - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

lib/index.modern.js

85

index.d.ts
declare module 'react-helmet-async' {
import * as React from 'react';
import { Helmet, HelmetData } from 'react-helmet';
export { Helmet };
export type FilledContext = {
interface OtherElementAttributes {
[key: string]: string | number | boolean | null | undefined;
}
type HtmlProps = JSX.IntrinsicElements['html'] & OtherElementAttributes;
type BodyProps = JSX.IntrinsicElements['body'] & OtherElementAttributes;
type LinkProps = JSX.IntrinsicElements['link'];
type MetaProps = JSX.IntrinsicElements['meta'];
export interface HelmetTags {
baseTag: Array<any>;
linkTags: Array<HTMLLinkElement>;
metaTags: Array<HTMLMetaElement>;
noscriptTags: Array<any>;
scriptTags: Array<HTMLScriptElement>;
styleTags: Array<HTMLStyleElement>;
}
export interface HelmetProps {
async?: boolean;
base?: any;
bodyAttributes?: BodyProps;
defaultTitle?: string;
defer?: boolean;
encodeSpecialCharacters?: boolean;
htmlAttributes?: HtmlProps;
onChangeClientState?: (newState: any, addedTags: HelmetTags, removedTags: HelmetTags) => void;
link?: LinkProps[];
meta?: MetaProps[];
noscript?: Array<any>;
script?: Array<any>;
style?: Array<any>;
title?: string;
titleAttributes?: Object;
titleTemplate?: string;
}
export class Helmet extends React.Component<HelmetProps> {
}
export interface HelmetData {
base: HelmetDatum;
bodyAttributes: HelmetHTMLBodyDatum;
htmlAttributes: HelmetHTMLElementDatum;
link: HelmetDatum;
meta: HelmetDatum;
noscript: HelmetDatum;
script: HelmetDatum;
style: HelmetDatum;
title: HelmetDatum;
titleAttributes: HelmetDatum;
}
export interface HelmetDatum {
toString(): string;
toComponent(): React.Component<any>;
}
export interface HelmetHTMLBodyDatum {
toString(): string;
toComponent(): React.HTMLAttributes<HTMLBodyElement>;
}
export interface HelmetHTMLElementDatum {
toString(): string;
toComponent(): React.HTMLAttributes<HTMLHtmlElement>;
}
export interface FilledContext {
helmet: HelmetData;
};
}
type ProviderProps = {
interface ProviderProps {
context?: {};
};
}
export const HelmetProvider: React.ComponentClass<ProviderProps>;
export class HelmetProvider extends React.Component<ProviderProps> {
static canUseDOM: boolean;
}
}

2

lib/index.js

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

function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("react-fast-compare")),r=e(require("invariant")),n=e(require("prop-types")),i=require("react"),o=e(i),a=e(require("shallowequal")),s={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)",HEADER:"header",BREADCRUMB:"breadcrumb"},c=Object.keys(s).map(function(e){return s[e]}),u={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},l=Object.keys(u).reduce(function(e,t){return e[u[t]]=t,e},{}),p=function(e,t){for(var r=e.length-1;r>=0;r-=1){var n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},d=function(e){var t=p(e,s.TITLE),r=p(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,function(){return t});var n=p(e,"defaultTitle");return t||n||void 0},f=function(e){return p(e,"onChangeClientState")||function(){}},h=function(e,t){return t.filter(function(t){return void 0!==t[e]}).map(function(t){return t[e]}).reduce(function(e,t){return Object.assign({},e,t)},{})},b=function(e,t){return t.filter(function(e){return void 0!==e[s.BASE]}).map(function(e){return e[s.BASE]}).reverse().reduce(function(t,r){if(!t.length)for(var n=Object.keys(r),i=0;i<n.length;i+=1){var o=n[i].toLowerCase();if(-1!==e.indexOf(o)&&r[o])return t.concat(r)}return t},[])},m=function(e,t,r){var n={};return r.filter(function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&console&&"function"==typeof console.warn&&console.warn("Helmet: "+e+' should be of type "Array". Instead found type "'+typeof t[e]+'"'),!1)}).map(function(t){return t[e]}).reverse().reduce(function(e,r){var i={};r.filter(function(e){for(var r,o=Object.keys(e),a=0;a<o.length;a+=1){var s=o[a],c=s.toLowerCase();-1===t.indexOf(c)||"rel"===r&&"canonical"===e[r].toLowerCase()||"rel"===c&&"stylesheet"===e[c].toLowerCase()||(r=c),-1===t.indexOf(s)||"innerHTML"!==s&&"cssText"!==s&&"itemprop"!==s||(r=s)}if(!r||!e[r])return!1;var u=e[r].toLowerCase();return n[r]||(n[r]={}),i[r]||(i[r]={}),!n[r][u]&&(i[r][u]=!0,!0)}).reverse().forEach(function(t){return e.push(t)});for(var o=Object.keys(i),a=0;a<o.length;a+=1){var s=o[a],c=Object.assign({},n[s],i[s]);n[s]=c}return e},[]).reverse()},y=function(e){return Array.isArray(e)?e.join(""):e},T=[s.NOSCRIPT,s.SCRIPT,s.STYLE],g=function(e,t){return void 0===t&&(t=!0),!1===t?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},A=function(e){return Object.keys(e).reduce(function(t,r){var n=void 0!==e[r]?r+'="'+e[r]+'"':""+r;return t?t+" "+n:n},"")},v=function(e,t){return void 0===t&&(t={}),Object.keys(e).reduce(function(t,r){return t[u[r]||r]=e[r],t},t)},O=function(e,t,r){switch(e){case s.TITLE:return{toComponent:function(){return r=v(t.titleAttributes,{key:e=t.title,"data-rh":!0}),[o.createElement(s.TITLE,r,e)];var e,r},toString:function(){return function(e,r,n,i){var o=A(t.titleAttributes),a=y(r);return o?"<"+e+' data-rh="true" '+o+">"+g(a,i)+"</"+e+">":"<"+e+' data-rh="true">'+g(a,i)+"</"+e+">"}(e,t.title,0,r)}};case"bodyAttributes":case"htmlAttributes":case"headerAttributes":case"breadcrumbAttributes":return{toComponent:function(){return v(t)},toString:function(){return A(t)}};default:return{toComponent:function(){return function(e,t){return t.map(function(t,r){var n={key:r,"data-rh":!0};return Object.keys(t).forEach(function(e){var r=u[e]||e;"innerHTML"===r||"cssText"===r?n.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:n[r]=t[e]}),o.createElement(e,n)})}(e,t)},toString:function(){return function(e,t,r){return t.reduce(function(t,n){var i=Object.keys(n).filter(function(e){return!("innerHTML"===e||"cssText"===e)}).reduce(function(e,t){var i=void 0===n[t]?t:t+'="'+g(n[t],r)+'"';return e?e+" "+i:i},""),o=n.innerHTML||n.cssText||"",a=-1===T.indexOf(e);return t+"<"+e+' data-rh="true" '+i+(a?"/>":">"+o+"</"+e+">")},"")}(e,t,r)}}}},C=function(e){var t=e.bodyAttributes,r=e.encode,n=e.htmlAttributes,i=e.linkTags,o=e.metaTags,a=e.noscriptTags,c=e.scriptTags,u=e.styleTags,l=e.title;void 0===l&&(l="");var p=e.titleAttributes,d=e.headerAttributes,f=e.breadcrumbAttributes;return{base:O(s.BASE,e.baseTag,r),bodyAttributes:O("bodyAttributes",t,r),htmlAttributes:O("htmlAttributes",n,r),link:O(s.LINK,i,r),meta:O(s.META,o,r),noscript:O(s.NOSCRIPT,a,r),script:O(s.SCRIPT,c,r),style:O(s.STYLE,u,r),title:O(s.TITLE,{title:l,titleAttributes:p},r),headerAttributes:O("headerAttributes",d,r),breadcrumbAttributes:O("breadcrumbAttributes",f,r)}},j=o.createContext({}),E=n.shape({setHelmet:n.func,helmetInstances:n.shape({get:n.func,add:n.func,remove:n.func})}),S="undefined"!=typeof document,I=function(e){function t(r){var n=this;e.call(this,r),this.instances=[],this.value={setHelmet:function(e){n.props.context.helmet=e},helmetInstances:{get:function(){return n.instances},add:function(e){n.instances.push(e)},remove:function(e){var t=n.instances.indexOf(e);n.instances.splice(t,1)}}},t.canUseDOM||(r.context.helmet=C({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{},headerAttributes:{},breadcrumbAttributes:{}}))}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.render=function(){return o.createElement(j.Provider,{value:this.value},this.props.children)},t}(i.Component);I.canUseDOM=S,I.propTypes={context:n.shape({helmet:n.shape()}),children:n.node.isRequired},I.defaultProps={context:{}},I.displayName="HelmetProvider";var P=function(e,t){var r,n=document.head||document.querySelector(s.HEAD),i=n.querySelectorAll(e+"[data-rh]"),o=[].slice.call(i),a=[];return t&&t.length&&t.forEach(function(t){var n=document.createElement(e);for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&("innerHTML"===i?n.innerHTML=t.innerHTML:"cssText"===i?n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText)):n.setAttribute(i,void 0===t[i]?"":t[i]));n.setAttribute("data-rh","true"),o.some(function(e,t){return r=t,n.isEqualNode(e)})?o.splice(r,1):a.push(n)}),o.forEach(function(e){return e.parentNode.removeChild(e)}),a.forEach(function(e){return n.appendChild(e)}),{oldTags:o,newTags:a}},x=function(e,t){var r=document.getElementsByTagName(e)[0];if(r){for(var n=r.getAttribute("data-rh"),i=n?n.split(","):[],o=[].concat(i),a=Object.keys(t),s=0;s<a.length;s+=1){var c=a[s],u=t[c]||"";r.getAttribute(c)!==u&&r.setAttribute(c,u),-1===i.indexOf(c)&&i.push(c);var l=o.indexOf(c);-1!==l&&o.splice(l,1)}for(var p=o.length-1;p>=0;p-=1)r.removeAttribute(o[p]);i.length===o.length?r.removeAttribute("data-rh"):r.getAttribute("data-rh")!==a.join(",")&&r.setAttribute("data-rh",a.join(","))}},L=function(e,t){var r=e.baseTag,n=e.htmlAttributes,i=e.linkTags,o=e.metaTags,a=e.noscriptTags,c=e.onChangeClientState,u=e.scriptTags,l=e.styleTags,p=e.title,d=e.titleAttributes,f=e.headerAttributes,h=e.breadcrumbAttributes;x(s.BODY,e.bodyAttributes),x(s.HTML,n),x(s.HEADER,f),x(s.BREADCRUMB,h),function(e,t){void 0!==e&&document.title!==e&&(document.title=y(e)),x(s.TITLE,t)}(p,d);var b={baseTag:P(s.BASE,r),linkTags:P(s.LINK,i),metaTags:P(s.META,o),noscriptTags:P(s.NOSCRIPT,a),scriptTags:P(s.SCRIPT,u),styleTags:P(s.STYLE,l)},m={},T={};Object.keys(b).forEach(function(e){var t=b[e],r=t.newTags,n=t.oldTags;r.length&&(m[e]=r),n.length&&(T[e]=b[e].oldTags)}),t&&t(),c(e,m,T)},w=null,H=function(e){function t(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];e.apply(this,t),this.rendered=!1}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.shouldComponentUpdate=function(e){return!a(e,this.props)},t.prototype.componentDidUpdate=function(){this.emitChange()},t.prototype.componentWillUnmount=function(){this.props.context.helmetInstances.remove(this),this.emitChange()},t.prototype.emitChange=function(){var e,t,r=this.props.context,n=r.setHelmet,i=null,o=(e=r.helmetInstances.get().map(function(e){var t=Object.assign({},e.props);return delete t.context,t}),{baseTag:b(["href"],e),bodyAttributes:h("bodyAttributes",e),defer:p(e,"defer"),encode:p(e,"encodeSpecialCharacters"),htmlAttributes:h("htmlAttributes",e),linkTags:m(s.LINK,["rel","href"],e),metaTags:m(s.META,["name","charset","http-equiv","property","itemprop"],e),noscriptTags:m(s.NOSCRIPT,["innerHTML"],e),onChangeClientState:f(e),scriptTags:m(s.SCRIPT,["src","innerHTML"],e),styleTags:m(s.STYLE,["cssText"],e),title:d(e),titleAttributes:h("titleAttributes",e),headerAttributes:h("headerAttributes",e),breadcrumbAttributes:h("breadcrumbAttributes",e)});I.canUseDOM?(t=o,w&&cancelAnimationFrame(w),t.defer?w=requestAnimationFrame(function(){L(t,function(){w=null})}):(L(t),w=null)):C&&(i=C(o)),n(i)},t.prototype.init=function(){this.rendered||(this.rendered=!0,this.props.context.helmetInstances.add(this),this.emitChange())},t.prototype.render=function(){return this.init(),null},t}(i.Component);function R(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(r[n]=e[n]);return r}H.propTypes={context:E.isRequired},H.displayName="HelmetDispatcher";var M=function(e){function n(){e.apply(this,arguments)}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.shouldComponentUpdate=function(e){return!t(this.props,e)},n.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case s.SCRIPT:case s.NOSCRIPT:return{innerHTML:t};case s.STYLE:return{cssText:t};default:throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")}},n.prototype.flattenArrayTypeChildren=function(e){var t,r=e.child,n=e.arrayTypeChildren;return Object.assign({},n,((t={})[r.type]=(n[r.type]||[]).concat([Object.assign({},e.newChildProps,this.mapNestedChildrenToProps(r,e.nestedChildren))]),t))},n.prototype.mapObjectTypeChildren=function(e){var t,r,n=e.child,i=e.newProps,o=e.newChildProps,a=e.nestedChildren;switch(n.type){case s.TITLE:return Object.assign({},i,((t={})[n.type]=a,t),{titleAttributes:Object.assign({},o)});case s.BODY:return Object.assign({},i,{bodyAttributes:Object.assign({},o)});case s.HTML:return Object.assign({},i,{htmlAttributes:Object.assign({},o)});case s.HEADER:return Object.assign({},i,{headerAttributes:Object.assign({},o)});case s.BREADCRUMB:return Object.assign({},i,{breadcrumbAttributes:Object.assign({},o)});default:return Object.assign({},i,((r={})[n.type]=Object.assign({},o),r))}},n.prototype.mapArrayTypeChildrenToProps=function(e,t){var r=Object.assign({},t);return Object.keys(e).forEach(function(t){var n;r=Object.assign({},r,((n={})[t]=e[t],n))}),r},n.prototype.warnOnInvalidChildren=function(e,t){return r(c.some(function(t){return e.type===t}),"function"==typeof e.type?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+c.join(", ")+" are allowed. Helmet does not support rendering <"+e.type+"> elements. Refer to our API for more information."),r(!t||"string"==typeof t||Array.isArray(t)&&!t.some(function(e){return"string"!=typeof e}),"Helmet expects a string as a child of <"+e.type+">. Did you forget to wrap your children in braces? ( <"+e.type+">{``}</"+e.type+"> ) Refer to our API for more information."),!0},n.prototype.mapChildrenToProps=function(e,t){var r=this,n={};return o.Children.forEach(e,function(e){if(e&&e.props){var i=e.props,o=i.children,a=R(i,["children"]),c=Object.keys(a).reduce(function(e,t){return e[l[t]||t]=a[t],e},{}),u=e.type;switch("symbol"==typeof u?u=u.toString():r.warnOnInvalidChildren(e,o),u){case s.FRAGMENT:t=r.mapChildrenToProps(o,t);break;case s.LINK:case s.META:case s.NOSCRIPT:case s.SCRIPT:case s.STYLE:n=r.flattenArrayTypeChildren({child:e,arrayTypeChildren:n,newChildProps:c,nestedChildren:o});break;default:t=r.mapObjectTypeChildren({child:e,newProps:t,newChildProps:c,nestedChildren:o})}}}),this.mapArrayTypeChildrenToProps(n,t)},n.prototype.render=function(){var e=this.props,t=e.children,r=R(e,["children"]),n=Object.assign({},r);return t&&(n=this.mapChildrenToProps(t,n)),o.createElement(j.Consumer,null,function(e){return o.createElement(H,Object.assign({},n,{context:e}))})},n}(i.Component);M.propTypes={base:n.object,bodyAttributes:n.object,children:n.oneOfType([n.arrayOf(n.node),n.node]),defaultTitle:n.string,defer:n.bool,encodeSpecialCharacters:n.bool,htmlAttributes:n.object,link:n.arrayOf(n.object),meta:n.arrayOf(n.object),noscript:n.arrayOf(n.object),onChangeClientState:n.func,script:n.arrayOf(n.object),style:n.arrayOf(n.object),title:n.string,titleAttributes:n.object,headerAttributes:n.object,breadcrumbAttributes:n.object,titleTemplate:n.string},M.defaultProps={defer:!0,encodeSpecialCharacters:!0},M.displayName="Helmet",exports.Helmet=M,exports.HelmetProvider=I;
function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=require("react"),r=e(t),n=e(require("prop-types")),i=e(require("react-fast-compare")),o=e(require("invariant")),a=e(require("shallowequal"));function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function c(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function u(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}var l={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)",HEADER:"header",BREADCRUMB:"breadcrumb"},p=Object.keys(l).map(function(e){return l[e]}),d={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},f=Object.keys(d).reduce(function(e,t){return e[d[t]]=t,e},{}),h=function(e,t){for(var r=e.length-1;r>=0;r-=1){var n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},b=function(e){var t=h(e,l.TITLE),r=h(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,function(){return t});var n=h(e,"defaultTitle");return t||n||void 0},m=function(e){return h(e,"onChangeClientState")||function(){}},y=function(e,t){return t.filter(function(t){return void 0!==t[e]}).map(function(t){return t[e]}).reduce(function(e,t){return s({},e,t)},{})},T=function(e,t){return t.filter(function(e){return void 0!==e[l.BASE]}).map(function(e){return e[l.BASE]}).reverse().reduce(function(t,r){if(!t.length)for(var n=Object.keys(r),i=0;i<n.length;i+=1){var o=n[i].toLowerCase();if(-1!==e.indexOf(o)&&r[o])return t.concat(r)}return t},[])},A=function(e,t,r){var n={};return r.filter(function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&console&&"function"==typeof console.warn&&console.warn("Helmet: "+e+' should be of type "Array". Instead found type "'+typeof t[e]+'"'),!1)}).map(function(t){return t[e]}).reverse().reduce(function(e,r){var i={};r.filter(function(e){for(var r,o=Object.keys(e),a=0;a<o.length;a+=1){var s=o[a],c=s.toLowerCase();-1===t.indexOf(c)||"rel"===r&&"canonical"===e[r].toLowerCase()||"rel"===c&&"stylesheet"===e[c].toLowerCase()||(r=c),-1===t.indexOf(s)||"innerHTML"!==s&&"cssText"!==s&&"itemprop"!==s||(r=s)}if(!r||!e[r])return!1;var u=e[r].toLowerCase();return n[r]||(n[r]={}),i[r]||(i[r]={}),!n[r][u]&&(i[r][u]=!0,!0)}).reverse().forEach(function(t){return e.push(t)});for(var o=Object.keys(i),a=0;a<o.length;a+=1){var c=o[a],u=s({},n[c],i[c]);n[c]=u}return e},[]).reverse()},g=function(e){return Array.isArray(e)?e.join(""):e},v=[l.NOSCRIPT,l.SCRIPT,l.STYLE],C=function(e,t){return void 0===t&&(t=!0),!1===t?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},E=function(e){return Object.keys(e).reduce(function(t,r){var n=void 0!==e[r]?r+'="'+e[r]+'"':""+r;return t?t+" "+n:n},"")},O=function(e,t){return void 0===t&&(t={}),Object.keys(e).reduce(function(t,r){return t[d[r]||r]=e[r],t},t)},S=function(e,t,n){switch(e){case l.TITLE:return{toComponent:function(){return n=t.titleAttributes,(i={key:e=t.title})["data-rh"]=!0,o=O(n,i),[r.createElement(l.TITLE,o,e)];var e,n,i,o},toString:function(){return function(e,t,r,n){var i=E(r),o=g(t);return i?"<"+e+' data-rh="true" '+i+">"+C(o,n)+"</"+e+">":"<"+e+' data-rh="true">'+C(o,n)+"</"+e+">"}(e,t.title,t.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":case"headerAttributes":case"breadcrumbAttributes":return{toComponent:function(){return O(t)},toString:function(){return E(t)}};default:return{toComponent:function(){return function(e,t){return t.map(function(t,n){var i,o=((i={key:n})["data-rh"]=!0,i);return Object.keys(t).forEach(function(e){var r=d[e]||e;"innerHTML"===r||"cssText"===r?o.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:o[r]=t[e]}),r.createElement(e,o)})}(e,t)},toString:function(){return function(e,t,r){return t.reduce(function(t,n){var i=Object.keys(n).filter(function(e){return!("innerHTML"===e||"cssText"===e)}).reduce(function(e,t){var i=void 0===n[t]?t:t+'="'+C(n[t],r)+'"';return e?e+" "+i:i},""),o=n.innerHTML||n.cssText||"",a=-1===v.indexOf(e);return t+"<"+e+' data-rh="true" '+i+(a?"/>":">"+o+"</"+e+">")},"")}(e,t,n)}}}},I=function(e){var t=e.bodyAttributes,r=e.encode,n=e.htmlAttributes,i=e.linkTags,o=e.metaTags,a=e.noscriptTags,s=e.scriptTags,c=e.styleTags,u=e.title,p=void 0===u?"":u,d=e.titleAttributes,f=e.headerAttributes,h=e.breadcrumbAttributes;return{base:S(l.BASE,e.baseTag,r),bodyAttributes:S("bodyAttributes",t,r),htmlAttributes:S("htmlAttributes",n,r),link:S(l.LINK,i,r),meta:S(l.META,o,r),noscript:S(l.NOSCRIPT,a,r),script:S(l.SCRIPT,s,r),style:S(l.STYLE,c,r),title:S(l.TITLE,{title:p,titleAttributes:d},r),headerAttributes:S("headerAttributes",f,r),breadcrumbAttributes:S("breadcrumbAttributes",h,r)}},P=r.createContext({}),x=n.shape({setHelmet:n.func,helmetInstances:n.shape({get:n.func,add:n.func,remove:n.func})}),L="undefined"!=typeof document,j=function(e){function t(r){var n;return(n=e.call(this,r)||this).instances=[],n.value={setHelmet:function(e){n.props.context.helmet=e},helmetInstances:{get:function(){return n.instances},add:function(e){n.instances.push(e)},remove:function(e){var t=n.instances.indexOf(e);n.instances.splice(t,1)}}},t.canUseDOM||(r.context.helmet=I({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{},headerAttributes:{},breadcrumbAttributes:{}})),n}return c(t,e),t.prototype.render=function(){return r.createElement(P.Provider,{value:this.value},this.props.children)},t}(t.Component);j.canUseDOM=L,j.propTypes={context:n.shape({helmet:n.shape()}),children:n.node.isRequired},j.defaultProps={context:{}},j.displayName="HelmetProvider";var w=function(e,t){var r,n=document.querySelectorAll(e+"[data-rh]"),i=[].slice.call(n),o=[];return t&&t.length&&t.forEach(function(t){var n=document.createElement(e);for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&("innerHTML"===a?n.innerHTML=t.innerHTML:"cssText"===a?n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText)):n.setAttribute(a,void 0===t[a]?"":t[a]));n.setAttribute("data-rh","true"),i.some(function(e,t){return r=t,n.isEqualNode(e)})?i.splice(r,1):o.push(n)}),i.forEach(function(e){return e.parentNode.removeChild(e)}),o.forEach(function(e){return e.parentNode.appendChild(e)}),{oldTags:i,newTags:o}},H=function(e,t){var r=document.getElementsByTagName(e)[0];if(r){for(var n=r.getAttribute("data-rh"),i=n?n.split(","):[],o=[].concat(i),a=Object.keys(t),s=0;s<a.length;s+=1){var c=a[s],u=t[c]||"";r.getAttribute(c)!==u&&r.setAttribute(c,u),-1===i.indexOf(c)&&i.push(c);var l=o.indexOf(c);-1!==l&&o.splice(l,1)}for(var p=o.length-1;p>=0;p-=1)r.removeAttribute(o[p]);i.length===o.length?r.removeAttribute("data-rh"):r.getAttribute("data-rh")!==a.join(",")&&r.setAttribute("data-rh",a.join(","))}},R=function(e,t){var r=e.baseTag,n=e.htmlAttributes,i=e.linkTags,o=e.metaTags,a=e.noscriptTags,s=e.onChangeClientState,c=e.scriptTags,u=e.styleTags,p=e.title,d=e.titleAttributes,f=e.headerAttributes,h=e.breadcrumbAttributes;H(l.BODY,e.bodyAttributes),H(l.HTML,n),H(l.HEADER,f),H(l.BREADCRUMB,h),function(e,t){void 0!==e&&document.title!==e&&(document.title=g(e)),H(l.TITLE,t)}(p,d);var b={baseTag:w(l.BASE,r),linkTags:w(l.LINK,i),metaTags:w(l.META,o),noscriptTags:w(l.NOSCRIPT,a),scriptTags:w(l.SCRIPT,c),styleTags:w(l.STYLE,u)},m={},y={};Object.keys(b).forEach(function(e){var t=b[e],r=t.newTags,n=t.oldTags;r.length&&(m[e]=r),n.length&&(y[e]=b[e].oldTags)}),t&&t(),s(e,m,y)},M=null,k=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(t=e.call.apply(e,[this].concat(n))||this).rendered=!1,t}c(t,e);var r=t.prototype;return r.shouldComponentUpdate=function(e){return!a(e,this.props)},r.componentDidUpdate=function(){this.emitChange()},r.componentWillUnmount=function(){this.props.context.helmetInstances.remove(this),this.emitChange()},r.emitChange=function(){var e,t,r=this.props.context,n=r.setHelmet,i=null,o=(e=r.helmetInstances.get().map(function(e){var t=s({},e.props);return delete t.context,t}),{baseTag:T(["href"],e),bodyAttributes:y("bodyAttributes",e),defer:h(e,"defer"),encode:h(e,"encodeSpecialCharacters"),htmlAttributes:y("htmlAttributes",e),linkTags:A(l.LINK,["rel","href"],e),metaTags:A(l.META,["name","charset","http-equiv","property","itemprop"],e),noscriptTags:A(l.NOSCRIPT,["innerHTML"],e),onChangeClientState:m(e),scriptTags:A(l.SCRIPT,["src","innerHTML"],e),styleTags:A(l.STYLE,["cssText"],e),title:b(e),titleAttributes:y("titleAttributes",e),headerAttributes:y("headerAttributes",e),breadcrumbAttributes:y("breadcrumbAttributes",e)});j.canUseDOM?(t=o,M&&cancelAnimationFrame(M),t.defer?M=requestAnimationFrame(function(){R(t,function(){M=null})}):(R(t),M=null)):I&&(i=I(o)),n(i)},r.init=function(){this.rendered||(this.rendered=!0,this.props.context.helmetInstances.add(this),this.emitChange())},r.render=function(){return this.init(),null},t}(t.Component);k.propTypes={context:x.isRequired},k.displayName="HelmetDispatcher";var N=function(e){function t(){return e.apply(this,arguments)||this}c(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return!i(this.props,e)},n.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case l.SCRIPT:case l.NOSCRIPT:return{innerHTML:t};case l.STYLE:return{cssText:t};default:throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")}},n.flattenArrayTypeChildren=function(e){var t,r=e.child,n=e.arrayTypeChildren;return s({},n,((t={})[r.type]=[].concat(n[r.type]||[],[s({},e.newChildProps,this.mapNestedChildrenToProps(r,e.nestedChildren))]),t))},n.mapObjectTypeChildren=function(e){var t,r,n=e.child,i=e.newProps,o=e.newChildProps,a=e.nestedChildren;switch(n.type){case l.TITLE:return s({},i,((t={})[n.type]=a,t.titleAttributes=s({},o),t));case l.BODY:return s({},i,{bodyAttributes:s({},o)});case l.HTML:return s({},i,{htmlAttributes:s({},o)});case l.HEADER:return s({},i,{headerAttributes:s({},o)});case l.BREADCRUMB:return s({},i,{breadcrumbAttributes:s({},o)});default:return s({},i,((r={})[n.type]=s({},o),r))}},n.mapArrayTypeChildrenToProps=function(e,t){var r=s({},t);return Object.keys(e).forEach(function(t){var n;r=s({},r,((n={})[t]=e[t],n))}),r},n.warnOnInvalidChildren=function(e,t){return o(p.some(function(t){return e.type===t}),"function"==typeof e.type?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+p.join(", ")+" are allowed. Helmet does not support rendering <"+e.type+"> elements. Refer to our API for more information."),o(!t||"string"==typeof t||Array.isArray(t)&&!t.some(function(e){return"string"!=typeof e}),"Helmet expects a string as a child of <"+e.type+">. Did you forget to wrap your children in braces? ( <"+e.type+">{``}</"+e.type+"> ) Refer to our API for more information."),!0},n.mapChildrenToProps=function(e,t){var n=this,i={};return r.Children.forEach(e,function(e){if(e&&e.props){var r=e.props,o=r.children,a=u(r,["children"]),s=Object.keys(a).reduce(function(e,t){return e[f[t]||t]=a[t],e},{}),c=e.type;switch("symbol"==typeof c?c=c.toString():n.warnOnInvalidChildren(e,o),c){case l.FRAGMENT:t=n.mapChildrenToProps(o,t);break;case l.LINK:case l.META:case l.NOSCRIPT:case l.SCRIPT:case l.STYLE:i=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:i,newChildProps:s,nestedChildren:o});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:s,nestedChildren:o})}}}),this.mapArrayTypeChildrenToProps(i,t)},n.render=function(){var e=this.props,t=e.children,n=s({},u(e,["children"]));return t&&(n=this.mapChildrenToProps(t,n)),r.createElement(P.Consumer,null,function(e){return r.createElement(k,s({},n,{context:e}))})},t}(t.Component);N.propTypes={base:n.object,bodyAttributes:n.object,children:n.oneOfType([n.arrayOf(n.node),n.node]),defaultTitle:n.string,defer:n.bool,encodeSpecialCharacters:n.bool,htmlAttributes:n.object,link:n.arrayOf(n.object),meta:n.arrayOf(n.object),noscript:n.arrayOf(n.object),onChangeClientState:n.func,script:n.arrayOf(n.object),style:n.arrayOf(n.object),title:n.string,titleAttributes:n.object,headerAttributes:n.object,breadcrumbAttributes:n.object,titleTemplate:n.string},N.defaultProps={defer:!0,encodeSpecialCharacters:!0},N.displayName="Helmet",exports.Helmet=N,exports.HelmetProvider=j;
//# sourceMappingURL=index.js.map

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

import t from"react-fast-compare";import e from"invariant";import r from"prop-types";import n,{Component as i}from"react";import o from"shallowequal";var a={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)",HEADER:"header",BREADCRUMB:"breadcrumb"},s=Object.keys(a).map(function(t){return a[t]}),c={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},u=Object.keys(c).reduce(function(t,e){return t[c[e]]=e,t},{}),l=function(t,e){for(var r=t.length-1;r>=0;r-=1){var n=t[r];if(Object.prototype.hasOwnProperty.call(n,e))return n[e]}return null},p=function(t){var e=l(t,a.TITLE),r=l(t,"titleTemplate");if(Array.isArray(e)&&(e=e.join("")),r&&e)return r.replace(/%s/g,function(){return e});var n=l(t,"defaultTitle");return e||n||void 0},d=function(t){return l(t,"onChangeClientState")||function(){}},f=function(t,e){return e.filter(function(e){return void 0!==e[t]}).map(function(e){return e[t]}).reduce(function(t,e){return Object.assign({},t,e)},{})},h=function(t,e){return e.filter(function(t){return void 0!==t[a.BASE]}).map(function(t){return t[a.BASE]}).reverse().reduce(function(e,r){if(!e.length)for(var n=Object.keys(r),i=0;i<n.length;i+=1){var o=n[i].toLowerCase();if(-1!==t.indexOf(o)&&r[o])return e.concat(r)}return e},[])},b=function(t,e,r){var n={};return r.filter(function(e){return!!Array.isArray(e[t])||(void 0!==e[t]&&console&&"function"==typeof console.warn&&console.warn("Helmet: "+t+' should be of type "Array". Instead found type "'+typeof e[t]+'"'),!1)}).map(function(e){return e[t]}).reverse().reduce(function(t,r){var i={};r.filter(function(t){for(var r,o=Object.keys(t),a=0;a<o.length;a+=1){var s=o[a],c=s.toLowerCase();-1===e.indexOf(c)||"rel"===r&&"canonical"===t[r].toLowerCase()||"rel"===c&&"stylesheet"===t[c].toLowerCase()||(r=c),-1===e.indexOf(s)||"innerHTML"!==s&&"cssText"!==s&&"itemprop"!==s||(r=s)}if(!r||!t[r])return!1;var u=t[r].toLowerCase();return n[r]||(n[r]={}),i[r]||(i[r]={}),!n[r][u]&&(i[r][u]=!0,!0)}).reverse().forEach(function(e){return t.push(e)});for(var o=Object.keys(i),a=0;a<o.length;a+=1){var s=o[a],c=Object.assign({},n[s],i[s]);n[s]=c}return t},[]).reverse()},m=function(t){return Array.isArray(t)?t.join(""):t},y=[a.NOSCRIPT,a.SCRIPT,a.STYLE],T=function(t,e){return void 0===e&&(e=!0),!1===e?String(t):String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},g=function(t){return Object.keys(t).reduce(function(e,r){var n=void 0!==t[r]?r+'="'+t[r]+'"':""+r;return e?e+" "+n:n},"")},A=function(t,e){return void 0===e&&(e={}),Object.keys(t).reduce(function(e,r){return e[c[r]||r]=t[r],e},e)},v=function(t,e,r){switch(t){case a.TITLE:return{toComponent:function(){return r=A(e.titleAttributes,{key:t=e.title,"data-rh":!0}),[n.createElement(a.TITLE,r,t)];var t,r},toString:function(){return function(t,r,n,i){var o=g(e.titleAttributes),a=m(r);return o?"<"+t+' data-rh="true" '+o+">"+T(a,i)+"</"+t+">":"<"+t+' data-rh="true">'+T(a,i)+"</"+t+">"}(t,e.title,0,r)}};case"bodyAttributes":case"htmlAttributes":case"headerAttributes":case"breadcrumbAttributes":return{toComponent:function(){return A(e)},toString:function(){return g(e)}};default:return{toComponent:function(){return function(t,e){return e.map(function(e,r){var i={key:r,"data-rh":!0};return Object.keys(e).forEach(function(t){var r=c[t]||t;"innerHTML"===r||"cssText"===r?i.dangerouslySetInnerHTML={__html:e.innerHTML||e.cssText}:i[r]=e[t]}),n.createElement(t,i)})}(t,e)},toString:function(){return function(t,e,r){return e.reduce(function(e,n){var i=Object.keys(n).filter(function(t){return!("innerHTML"===t||"cssText"===t)}).reduce(function(t,e){var i=void 0===n[e]?e:e+'="'+T(n[e],r)+'"';return t?t+" "+i:i},""),o=n.innerHTML||n.cssText||"",a=-1===y.indexOf(t);return e+"<"+t+' data-rh="true" '+i+(a?"/>":">"+o+"</"+t+">")},"")}(t,e,r)}}}},O=function(t){var e=t.bodyAttributes,r=t.encode,n=t.htmlAttributes,i=t.linkTags,o=t.metaTags,s=t.noscriptTags,c=t.scriptTags,u=t.styleTags,l=t.title;void 0===l&&(l="");var p=t.titleAttributes,d=t.headerAttributes,f=t.breadcrumbAttributes;return{base:v(a.BASE,t.baseTag,r),bodyAttributes:v("bodyAttributes",e,r),htmlAttributes:v("htmlAttributes",n,r),link:v(a.LINK,i,r),meta:v(a.META,o,r),noscript:v(a.NOSCRIPT,s,r),script:v(a.SCRIPT,c,r),style:v(a.STYLE,u,r),title:v(a.TITLE,{title:l,titleAttributes:p},r),headerAttributes:v("headerAttributes",d,r),breadcrumbAttributes:v("breadcrumbAttributes",f,r)}},C=n.createContext({}),j=r.shape({setHelmet:r.func,helmetInstances:r.shape({get:r.func,add:r.func,remove:r.func})}),E="undefined"!=typeof document,S=function(t){function e(r){var n=this;t.call(this,r),this.instances=[],this.value={setHelmet:function(t){n.props.context.helmet=t},helmetInstances:{get:function(){return n.instances},add:function(t){n.instances.push(t)},remove:function(t){var e=n.instances.indexOf(t);n.instances.splice(e,1)}}},e.canUseDOM||(r.context.helmet=O({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{},headerAttributes:{},breadcrumbAttributes:{}}))}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.render=function(){return n.createElement(C.Provider,{value:this.value},this.props.children)},e}(i);S.canUseDOM=E,S.propTypes={context:r.shape({helmet:r.shape()}),children:r.node.isRequired},S.defaultProps={context:{}},S.displayName="HelmetProvider";var I=function(t,e){var r,n=document.head||document.querySelector(a.HEAD),i=n.querySelectorAll(t+"[data-rh]"),o=[].slice.call(i),s=[];return e&&e.length&&e.forEach(function(e){var n=document.createElement(t);for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&("innerHTML"===i?n.innerHTML=e.innerHTML:"cssText"===i?n.styleSheet?n.styleSheet.cssText=e.cssText:n.appendChild(document.createTextNode(e.cssText)):n.setAttribute(i,void 0===e[i]?"":e[i]));n.setAttribute("data-rh","true"),o.some(function(t,e){return r=e,n.isEqualNode(t)})?o.splice(r,1):s.push(n)}),o.forEach(function(t){return t.parentNode.removeChild(t)}),s.forEach(function(t){return n.appendChild(t)}),{oldTags:o,newTags:s}},P=function(t,e){var r=document.getElementsByTagName(t)[0];if(r){for(var n=r.getAttribute("data-rh"),i=n?n.split(","):[],o=[].concat(i),a=Object.keys(e),s=0;s<a.length;s+=1){var c=a[s],u=e[c]||"";r.getAttribute(c)!==u&&r.setAttribute(c,u),-1===i.indexOf(c)&&i.push(c);var l=o.indexOf(c);-1!==l&&o.splice(l,1)}for(var p=o.length-1;p>=0;p-=1)r.removeAttribute(o[p]);i.length===o.length?r.removeAttribute("data-rh"):r.getAttribute("data-rh")!==a.join(",")&&r.setAttribute("data-rh",a.join(","))}},L=function(t,e){var r=t.baseTag,n=t.htmlAttributes,i=t.linkTags,o=t.metaTags,s=t.noscriptTags,c=t.onChangeClientState,u=t.scriptTags,l=t.styleTags,p=t.title,d=t.titleAttributes,f=t.headerAttributes,h=t.breadcrumbAttributes;P(a.BODY,t.bodyAttributes),P(a.HTML,n),P(a.HEADER,f),P(a.BREADCRUMB,h),function(t,e){void 0!==t&&document.title!==t&&(document.title=m(t)),P(a.TITLE,e)}(p,d);var b={baseTag:I(a.BASE,r),linkTags:I(a.LINK,i),metaTags:I(a.META,o),noscriptTags:I(a.NOSCRIPT,s),scriptTags:I(a.SCRIPT,u),styleTags:I(a.STYLE,l)},y={},T={};Object.keys(b).forEach(function(t){var e=b[t],r=e.newTags,n=e.oldTags;r.length&&(y[t]=r),n.length&&(T[t]=b[t].oldTags)}),e&&e(),c(t,y,T)},x=null,w=function(t){function e(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];t.apply(this,e),this.rendered=!1}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.shouldComponentUpdate=function(t){return!o(t,this.props)},e.prototype.componentDidUpdate=function(){this.emitChange()},e.prototype.componentWillUnmount=function(){this.props.context.helmetInstances.remove(this),this.emitChange()},e.prototype.emitChange=function(){var t,e,r=this.props.context,n=r.setHelmet,i=null,o=(t=r.helmetInstances.get().map(function(t){var e=Object.assign({},t.props);return delete e.context,e}),{baseTag:h(["href"],t),bodyAttributes:f("bodyAttributes",t),defer:l(t,"defer"),encode:l(t,"encodeSpecialCharacters"),htmlAttributes:f("htmlAttributes",t),linkTags:b(a.LINK,["rel","href"],t),metaTags:b(a.META,["name","charset","http-equiv","property","itemprop"],t),noscriptTags:b(a.NOSCRIPT,["innerHTML"],t),onChangeClientState:d(t),scriptTags:b(a.SCRIPT,["src","innerHTML"],t),styleTags:b(a.STYLE,["cssText"],t),title:p(t),titleAttributes:f("titleAttributes",t),headerAttributes:f("headerAttributes",t),breadcrumbAttributes:f("breadcrumbAttributes",t)});S.canUseDOM?(e=o,x&&cancelAnimationFrame(x),e.defer?x=requestAnimationFrame(function(){L(e,function(){x=null})}):(L(e),x=null)):O&&(i=O(o)),n(i)},e.prototype.init=function(){this.rendered||(this.rendered=!0,this.props.context.helmetInstances.add(this),this.emitChange())},e.prototype.render=function(){return this.init(),null},e}(i);function H(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&-1===e.indexOf(n)&&(r[n]=t[n]);return r}w.propTypes={context:j.isRequired},w.displayName="HelmetDispatcher";var R=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype.shouldComponentUpdate=function(e){return!t(this.props,e)},i.prototype.mapNestedChildrenToProps=function(t,e){if(!e)return null;switch(t.type){case a.SCRIPT:case a.NOSCRIPT:return{innerHTML:e};case a.STYLE:return{cssText:e};default:throw new Error("<"+t.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")}},i.prototype.flattenArrayTypeChildren=function(t){var e,r=t.child,n=t.arrayTypeChildren;return Object.assign({},n,((e={})[r.type]=(n[r.type]||[]).concat([Object.assign({},t.newChildProps,this.mapNestedChildrenToProps(r,t.nestedChildren))]),e))},i.prototype.mapObjectTypeChildren=function(t){var e,r,n=t.child,i=t.newProps,o=t.newChildProps,s=t.nestedChildren;switch(n.type){case a.TITLE:return Object.assign({},i,((e={})[n.type]=s,e),{titleAttributes:Object.assign({},o)});case a.BODY:return Object.assign({},i,{bodyAttributes:Object.assign({},o)});case a.HTML:return Object.assign({},i,{htmlAttributes:Object.assign({},o)});case a.HEADER:return Object.assign({},i,{headerAttributes:Object.assign({},o)});case a.BREADCRUMB:return Object.assign({},i,{breadcrumbAttributes:Object.assign({},o)});default:return Object.assign({},i,((r={})[n.type]=Object.assign({},o),r))}},i.prototype.mapArrayTypeChildrenToProps=function(t,e){var r=Object.assign({},e);return Object.keys(t).forEach(function(e){var n;r=Object.assign({},r,((n={})[e]=t[e],n))}),r},i.prototype.warnOnInvalidChildren=function(t,r){return e(s.some(function(e){return t.type===e}),"function"==typeof t.type?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+s.join(", ")+" are allowed. Helmet does not support rendering <"+t.type+"> elements. Refer to our API for more information."),e(!r||"string"==typeof r||Array.isArray(r)&&!r.some(function(t){return"string"!=typeof t}),"Helmet expects a string as a child of <"+t.type+">. Did you forget to wrap your children in braces? ( <"+t.type+">{``}</"+t.type+"> ) Refer to our API for more information."),!0},i.prototype.mapChildrenToProps=function(t,e){var r=this,i={};return n.Children.forEach(t,function(t){if(t&&t.props){var n=t.props,o=n.children,s=H(n,["children"]),c=Object.keys(s).reduce(function(t,e){return t[u[e]||e]=s[e],t},{}),l=t.type;switch("symbol"==typeof l?l=l.toString():r.warnOnInvalidChildren(t,o),l){case a.FRAGMENT:e=r.mapChildrenToProps(o,e);break;case a.LINK:case a.META:case a.NOSCRIPT:case a.SCRIPT:case a.STYLE:i=r.flattenArrayTypeChildren({child:t,arrayTypeChildren:i,newChildProps:c,nestedChildren:o});break;default:e=r.mapObjectTypeChildren({child:t,newProps:e,newChildProps:c,nestedChildren:o})}}}),this.mapArrayTypeChildrenToProps(i,e)},i.prototype.render=function(){var t=this.props,e=t.children,r=H(t,["children"]),i=Object.assign({},r);return e&&(i=this.mapChildrenToProps(e,i)),n.createElement(C.Consumer,null,function(t){return n.createElement(w,Object.assign({},i,{context:t}))})},i}(i);R.propTypes={base:r.object,bodyAttributes:r.object,children:r.oneOfType([r.arrayOf(r.node),r.node]),defaultTitle:r.string,defer:r.bool,encodeSpecialCharacters:r.bool,htmlAttributes:r.object,link:r.arrayOf(r.object),meta:r.arrayOf(r.object),noscript:r.arrayOf(r.object),onChangeClientState:r.func,script:r.arrayOf(r.object),style:r.arrayOf(r.object),title:r.string,titleAttributes:r.object,headerAttributes:r.object,breadcrumbAttributes:r.object,titleTemplate:r.string},R.defaultProps={defer:!0,encodeSpecialCharacters:!0},R.displayName="Helmet";export{R as Helmet,S as HelmetProvider};
import e,{Component as t}from"react";import r from"prop-types";import n from"react-fast-compare";import i from"invariant";import o from"shallowequal";function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function c(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}var u={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)",HEADER:"header",BREADCRUMB:"breadcrumb"},l=Object.keys(u).map(function(e){return u[e]}),p={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},d=Object.keys(p).reduce(function(e,t){return e[p[t]]=t,e},{}),f=function(e,t){for(var r=e.length-1;r>=0;r-=1){var n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},h=function(e){var t=f(e,u.TITLE),r=f(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,function(){return t});var n=f(e,"defaultTitle");return t||n||void 0},m=function(e){return f(e,"onChangeClientState")||function(){}},b=function(e,t){return t.filter(function(t){return void 0!==t[e]}).map(function(t){return t[e]}).reduce(function(e,t){return a({},e,t)},{})},T=function(e,t){return t.filter(function(e){return void 0!==e[u.BASE]}).map(function(e){return e[u.BASE]}).reverse().reduce(function(t,r){if(!t.length)for(var n=Object.keys(r),i=0;i<n.length;i+=1){var o=n[i].toLowerCase();if(-1!==e.indexOf(o)&&r[o])return t.concat(r)}return t},[])},y=function(e,t,r){var n={};return r.filter(function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&console&&"function"==typeof console.warn&&console.warn("Helmet: "+e+' should be of type "Array". Instead found type "'+typeof t[e]+'"'),!1)}).map(function(t){return t[e]}).reverse().reduce(function(e,r){var i={};r.filter(function(e){for(var r,o=Object.keys(e),a=0;a<o.length;a+=1){var s=o[a],c=s.toLowerCase();-1===t.indexOf(c)||"rel"===r&&"canonical"===e[r].toLowerCase()||"rel"===c&&"stylesheet"===e[c].toLowerCase()||(r=c),-1===t.indexOf(s)||"innerHTML"!==s&&"cssText"!==s&&"itemprop"!==s||(r=s)}if(!r||!e[r])return!1;var u=e[r].toLowerCase();return n[r]||(n[r]={}),i[r]||(i[r]={}),!n[r][u]&&(i[r][u]=!0,!0)}).reverse().forEach(function(t){return e.push(t)});for(var o=Object.keys(i),s=0;s<o.length;s+=1){var c=o[s],u=a({},n[c],i[c]);n[c]=u}return e},[]).reverse()},A=function(e){return Array.isArray(e)?e.join(""):e},g=[u.NOSCRIPT,u.SCRIPT,u.STYLE],v=function(e,t){return void 0===t&&(t=!0),!1===t?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},C=function(e){return Object.keys(e).reduce(function(t,r){var n=void 0!==e[r]?r+'="'+e[r]+'"':""+r;return t?t+" "+n:n},"")},E=function(e,t){return void 0===t&&(t={}),Object.keys(e).reduce(function(t,r){return t[p[r]||r]=e[r],t},t)},O=function(t,r,n){switch(t){case u.TITLE:return{toComponent:function(){return n=r.titleAttributes,(i={key:t=r.title})["data-rh"]=!0,o=E(n,i),[e.createElement(u.TITLE,o,t)];var t,n,i,o},toString:function(){return function(e,t,r,n){var i=C(r),o=A(t);return i?"<"+e+' data-rh="true" '+i+">"+v(o,n)+"</"+e+">":"<"+e+' data-rh="true">'+v(o,n)+"</"+e+">"}(t,r.title,r.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":case"headerAttributes":case"breadcrumbAttributes":return{toComponent:function(){return E(r)},toString:function(){return C(r)}};default:return{toComponent:function(){return function(t,r){return r.map(function(r,n){var i,o=((i={key:n})["data-rh"]=!0,i);return Object.keys(r).forEach(function(e){var t=p[e]||e;"innerHTML"===t||"cssText"===t?o.dangerouslySetInnerHTML={__html:r.innerHTML||r.cssText}:o[t]=r[e]}),e.createElement(t,o)})}(t,r)},toString:function(){return function(e,t,r){return t.reduce(function(t,n){var i=Object.keys(n).filter(function(e){return!("innerHTML"===e||"cssText"===e)}).reduce(function(e,t){var i=void 0===n[t]?t:t+'="'+v(n[t],r)+'"';return e?e+" "+i:i},""),o=n.innerHTML||n.cssText||"",a=-1===g.indexOf(e);return t+"<"+e+' data-rh="true" '+i+(a?"/>":">"+o+"</"+e+">")},"")}(t,r,n)}}}},S=function(e){var t=e.bodyAttributes,r=e.encode,n=e.htmlAttributes,i=e.linkTags,o=e.metaTags,a=e.noscriptTags,s=e.scriptTags,c=e.styleTags,l=e.title,p=void 0===l?"":l,d=e.titleAttributes,f=e.headerAttributes,h=e.breadcrumbAttributes;return{base:O(u.BASE,e.baseTag,r),bodyAttributes:O("bodyAttributes",t,r),htmlAttributes:O("htmlAttributes",n,r),link:O(u.LINK,i,r),meta:O(u.META,o,r),noscript:O(u.NOSCRIPT,a,r),script:O(u.SCRIPT,s,r),style:O(u.STYLE,c,r),title:O(u.TITLE,{title:p,titleAttributes:d},r),headerAttributes:O("headerAttributes",f,r),breadcrumbAttributes:O("breadcrumbAttributes",h,r)}},I=e.createContext({}),P=r.shape({setHelmet:r.func,helmetInstances:r.shape({get:r.func,add:r.func,remove:r.func})}),L="undefined"!=typeof document,x=function(t){function r(e){var n;return(n=t.call(this,e)||this).instances=[],n.value={setHelmet:function(e){n.props.context.helmet=e},helmetInstances:{get:function(){return n.instances},add:function(e){n.instances.push(e)},remove:function(e){var t=n.instances.indexOf(e);n.instances.splice(t,1)}}},r.canUseDOM||(e.context.helmet=S({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{},headerAttributes:{},breadcrumbAttributes:{}})),n}return s(r,t),r.prototype.render=function(){return e.createElement(I.Provider,{value:this.value},this.props.children)},r}(t);x.canUseDOM=L,x.propTypes={context:r.shape({helmet:r.shape()}),children:r.node.isRequired},x.defaultProps={context:{}},x.displayName="HelmetProvider";var j=function(e,t){var r,n=document.querySelectorAll(e+"[data-rh]"),i=[].slice.call(n),o=[];return t&&t.length&&t.forEach(function(t){var n=document.createElement(e);for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&("innerHTML"===a?n.innerHTML=t.innerHTML:"cssText"===a?n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText)):n.setAttribute(a,void 0===t[a]?"":t[a]));n.setAttribute("data-rh","true"),i.some(function(e,t){return r=t,n.isEqualNode(e)})?i.splice(r,1):o.push(n)}),i.forEach(function(e){return e.parentNode.removeChild(e)}),o.forEach(function(e){return e.parentNode.appendChild(e)}),{oldTags:i,newTags:o}},w=function(e,t){var r=document.getElementsByTagName(e)[0];if(r){for(var n=r.getAttribute("data-rh"),i=n?n.split(","):[],o=[].concat(i),a=Object.keys(t),s=0;s<a.length;s+=1){var c=a[s],u=t[c]||"";r.getAttribute(c)!==u&&r.setAttribute(c,u),-1===i.indexOf(c)&&i.push(c);var l=o.indexOf(c);-1!==l&&o.splice(l,1)}for(var p=o.length-1;p>=0;p-=1)r.removeAttribute(o[p]);i.length===o.length?r.removeAttribute("data-rh"):r.getAttribute("data-rh")!==a.join(",")&&r.setAttribute("data-rh",a.join(","))}},R=function(e,t){var r=e.baseTag,n=e.htmlAttributes,i=e.linkTags,o=e.metaTags,a=e.noscriptTags,s=e.onChangeClientState,c=e.scriptTags,l=e.styleTags,p=e.title,d=e.titleAttributes,f=e.headerAttributes,h=e.breadcrumbAttributes;w(u.BODY,e.bodyAttributes),w(u.HTML,n),w(u.HEADER,f),w(u.BREADCRUMB,h),function(e,t){void 0!==e&&document.title!==e&&(document.title=A(e)),w(u.TITLE,t)}(p,d);var m={baseTag:j(u.BASE,r),linkTags:j(u.LINK,i),metaTags:j(u.META,o),noscriptTags:j(u.NOSCRIPT,a),scriptTags:j(u.SCRIPT,c),styleTags:j(u.STYLE,l)},b={},T={};Object.keys(m).forEach(function(e){var t=m[e],r=t.newTags,n=t.oldTags;r.length&&(b[e]=r),n.length&&(T[e]=m[e].oldTags)}),t&&t(),s(e,b,T)},H=null,M=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(t=e.call.apply(e,[this].concat(n))||this).rendered=!1,t}s(t,e);var r=t.prototype;return r.shouldComponentUpdate=function(e){return!o(e,this.props)},r.componentDidUpdate=function(){this.emitChange()},r.componentWillUnmount=function(){this.props.context.helmetInstances.remove(this),this.emitChange()},r.emitChange=function(){var e,t,r=this.props.context,n=r.setHelmet,i=null,o=(e=r.helmetInstances.get().map(function(e){var t=a({},e.props);return delete t.context,t}),{baseTag:T(["href"],e),bodyAttributes:b("bodyAttributes",e),defer:f(e,"defer"),encode:f(e,"encodeSpecialCharacters"),htmlAttributes:b("htmlAttributes",e),linkTags:y(u.LINK,["rel","href"],e),metaTags:y(u.META,["name","charset","http-equiv","property","itemprop"],e),noscriptTags:y(u.NOSCRIPT,["innerHTML"],e),onChangeClientState:m(e),scriptTags:y(u.SCRIPT,["src","innerHTML"],e),styleTags:y(u.STYLE,["cssText"],e),title:h(e),titleAttributes:b("titleAttributes",e),headerAttributes:b("headerAttributes",e),breadcrumbAttributes:b("breadcrumbAttributes",e)});x.canUseDOM?(t=o,H&&cancelAnimationFrame(H),t.defer?H=requestAnimationFrame(function(){R(t,function(){H=null})}):(R(t),H=null)):S&&(i=S(o)),n(i)},r.init=function(){this.rendered||(this.rendered=!0,this.props.context.helmetInstances.add(this),this.emitChange())},r.render=function(){return this.init(),null},t}(t);M.propTypes={context:P.isRequired},M.displayName="HelmetDispatcher";var k=function(t){function r(){return t.apply(this,arguments)||this}s(r,t);var o=r.prototype;return o.shouldComponentUpdate=function(e){return!n(this.props,e)},o.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case u.SCRIPT:case u.NOSCRIPT:return{innerHTML:t};case u.STYLE:return{cssText:t};default:throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")}},o.flattenArrayTypeChildren=function(e){var t,r=e.child,n=e.arrayTypeChildren;return a({},n,((t={})[r.type]=[].concat(n[r.type]||[],[a({},e.newChildProps,this.mapNestedChildrenToProps(r,e.nestedChildren))]),t))},o.mapObjectTypeChildren=function(e){var t,r,n=e.child,i=e.newProps,o=e.newChildProps,s=e.nestedChildren;switch(n.type){case u.TITLE:return a({},i,((t={})[n.type]=s,t.titleAttributes=a({},o),t));case u.BODY:return a({},i,{bodyAttributes:a({},o)});case u.HTML:return a({},i,{htmlAttributes:a({},o)});case u.HEADER:return a({},i,{headerAttributes:a({},o)});case u.BREADCRUMB:return a({},i,{breadcrumbAttributes:a({},o)});default:return a({},i,((r={})[n.type]=a({},o),r))}},o.mapArrayTypeChildrenToProps=function(e,t){var r=a({},t);return Object.keys(e).forEach(function(t){var n;r=a({},r,((n={})[t]=e[t],n))}),r},o.warnOnInvalidChildren=function(e,t){return i(l.some(function(t){return e.type===t}),"function"==typeof e.type?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+l.join(", ")+" are allowed. Helmet does not support rendering <"+e.type+"> elements. Refer to our API for more information."),i(!t||"string"==typeof t||Array.isArray(t)&&!t.some(function(e){return"string"!=typeof e}),"Helmet expects a string as a child of <"+e.type+">. Did you forget to wrap your children in braces? ( <"+e.type+">{``}</"+e.type+"> ) Refer to our API for more information."),!0},o.mapChildrenToProps=function(t,r){var n=this,i={};return e.Children.forEach(t,function(e){if(e&&e.props){var t=e.props,o=t.children,a=c(t,["children"]),s=Object.keys(a).reduce(function(e,t){return e[d[t]||t]=a[t],e},{}),l=e.type;switch("symbol"==typeof l?l=l.toString():n.warnOnInvalidChildren(e,o),l){case u.FRAGMENT:r=n.mapChildrenToProps(o,r);break;case u.LINK:case u.META:case u.NOSCRIPT:case u.SCRIPT:case u.STYLE:i=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:i,newChildProps:s,nestedChildren:o});break;default:r=n.mapObjectTypeChildren({child:e,newProps:r,newChildProps:s,nestedChildren:o})}}}),this.mapArrayTypeChildrenToProps(i,r)},o.render=function(){var t=this.props,r=t.children,n=a({},c(t,["children"]));return r&&(n=this.mapChildrenToProps(r,n)),e.createElement(I.Consumer,null,function(t){return e.createElement(M,a({},n,{context:t}))})},r}(t);k.propTypes={base:r.object,bodyAttributes:r.object,children:r.oneOfType([r.arrayOf(r.node),r.node]),defaultTitle:r.string,defer:r.bool,encodeSpecialCharacters:r.bool,htmlAttributes:r.object,link:r.arrayOf(r.object),meta:r.arrayOf(r.object),noscript:r.arrayOf(r.object),onChangeClientState:r.func,script:r.arrayOf(r.object),style:r.arrayOf(r.object),title:r.string,titleAttributes:r.object,headerAttributes:r.object,breadcrumbAttributes:r.object,titleTemplate:r.string},k.defaultProps={defer:!0,encodeSpecialCharacters:!0},k.displayName="Helmet";export{k as Helmet,x as HelmetProvider};
//# sourceMappingURL=index.module.js.map

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react-fast-compare"),require("invariant"),require("prop-types"),require("react"),require("shallowequal")):"function"==typeof define&&define.amd?define(["exports","react-fast-compare","invariant","prop-types","react","shallowequal"],t):t(e.rndHelmet={},e.fastCompare,e.invariant,e.PropTypes,e.react,e.shallowequal)}(this,function(e,t,r,n,i,o){t=t&&t.hasOwnProperty("default")?t.default:t,r=r&&r.hasOwnProperty("default")?r.default:r,n=n&&n.hasOwnProperty("default")?n.default:n;var a="default"in i?i.default:i;o=o&&o.hasOwnProperty("default")?o.default:o;var s={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)",HEADER:"header",BREADCRUMB:"breadcrumb"},c=Object.keys(s).map(function(e){return s[e]}),u={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},l=Object.keys(u).reduce(function(e,t){return e[u[t]]=t,e},{}),p=function(e,t){for(var r=e.length-1;r>=0;r-=1){var n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},d=function(e){var t=p(e,s.TITLE),r=p(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,function(){return t});var n=p(e,"defaultTitle");return t||n||void 0},f=function(e){return p(e,"onChangeClientState")||function(){}},h=function(e,t){return t.filter(function(t){return void 0!==t[e]}).map(function(t){return t[e]}).reduce(function(e,t){return Object.assign({},e,t)},{})},b=function(e,t){return t.filter(function(e){return void 0!==e[s.BASE]}).map(function(e){return e[s.BASE]}).reverse().reduce(function(t,r){if(!t.length)for(var n=Object.keys(r),i=0;i<n.length;i+=1){var o=n[i].toLowerCase();if(-1!==e.indexOf(o)&&r[o])return t.concat(r)}return t},[])},y=function(e,t,r){var n={};return r.filter(function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&console&&"function"==typeof console.warn&&console.warn("Helmet: "+e+' should be of type "Array". Instead found type "'+typeof t[e]+'"'),!1)}).map(function(t){return t[e]}).reverse().reduce(function(e,r){var i={};r.filter(function(e){for(var r,o=Object.keys(e),a=0;a<o.length;a+=1){var s=o[a],c=s.toLowerCase();-1===t.indexOf(c)||"rel"===r&&"canonical"===e[r].toLowerCase()||"rel"===c&&"stylesheet"===e[c].toLowerCase()||(r=c),-1===t.indexOf(s)||"innerHTML"!==s&&"cssText"!==s&&"itemprop"!==s||(r=s)}if(!r||!e[r])return!1;var u=e[r].toLowerCase();return n[r]||(n[r]={}),i[r]||(i[r]={}),!n[r][u]&&(i[r][u]=!0,!0)}).reverse().forEach(function(t){return e.push(t)});for(var o=Object.keys(i),a=0;a<o.length;a+=1){var s=o[a],c=Object.assign({},n[s],i[s]);n[s]=c}return e},[]).reverse()},m=function(e){return Array.isArray(e)?e.join(""):e},T=[s.NOSCRIPT,s.SCRIPT,s.STYLE],g=function(e,t){return void 0===t&&(t=!0),!1===t?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},A=function(e){return Object.keys(e).reduce(function(t,r){var n=void 0!==e[r]?r+'="'+e[r]+'"':""+r;return t?t+" "+n:n},"")},v=function(e,t){return void 0===t&&(t={}),Object.keys(e).reduce(function(t,r){return t[u[r]||r]=e[r],t},t)},O=function(e,t,r){switch(e){case s.TITLE:return{toComponent:function(){return r=v(t.titleAttributes,{key:e=t.title,"data-rh":!0}),[a.createElement(s.TITLE,r,e)];var e,r},toString:function(){return function(e,r,n,i){var o=A(t.titleAttributes),a=m(r);return o?"<"+e+' data-rh="true" '+o+">"+g(a,i)+"</"+e+">":"<"+e+' data-rh="true">'+g(a,i)+"</"+e+">"}(e,t.title,0,r)}};case"bodyAttributes":case"htmlAttributes":case"headerAttributes":case"breadcrumbAttributes":return{toComponent:function(){return v(t)},toString:function(){return A(t)}};default:return{toComponent:function(){return function(e,t){return t.map(function(t,r){var n={key:r,"data-rh":!0};return Object.keys(t).forEach(function(e){var r=u[e]||e;"innerHTML"===r||"cssText"===r?n.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:n[r]=t[e]}),a.createElement(e,n)})}(e,t)},toString:function(){return function(e,t,r){return t.reduce(function(t,n){var i=Object.keys(n).filter(function(e){return!("innerHTML"===e||"cssText"===e)}).reduce(function(e,t){var i=void 0===n[t]?t:t+'="'+g(n[t],r)+'"';return e?e+" "+i:i},""),o=n.innerHTML||n.cssText||"",a=-1===T.indexOf(e);return t+"<"+e+' data-rh="true" '+i+(a?"/>":">"+o+"</"+e+">")},"")}(e,t,r)}}}},C=function(e){var t=e.bodyAttributes,r=e.encode,n=e.htmlAttributes,i=e.linkTags,o=e.metaTags,a=e.noscriptTags,c=e.scriptTags,u=e.styleTags,l=e.title;void 0===l&&(l="");var p=e.titleAttributes,d=e.headerAttributes,f=e.breadcrumbAttributes;return{base:O(s.BASE,e.baseTag,r),bodyAttributes:O("bodyAttributes",t,r),htmlAttributes:O("htmlAttributes",n,r),link:O(s.LINK,i,r),meta:O(s.META,o,r),noscript:O(s.NOSCRIPT,a,r),script:O(s.SCRIPT,c,r),style:O(s.STYLE,u,r),title:O(s.TITLE,{title:l,titleAttributes:p},r),headerAttributes:O("headerAttributes",d,r),breadcrumbAttributes:O("breadcrumbAttributes",f,r)}},j=a.createContext({}),E=n.shape({setHelmet:n.func,helmetInstances:n.shape({get:n.func,add:n.func,remove:n.func})}),S="undefined"!=typeof document,P=function(e){function t(r){var n=this;e.call(this,r),this.instances=[],this.value={setHelmet:function(e){n.props.context.helmet=e},helmetInstances:{get:function(){return n.instances},add:function(e){n.instances.push(e)},remove:function(e){var t=n.instances.indexOf(e);n.instances.splice(t,1)}}},t.canUseDOM||(r.context.helmet=C({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{},headerAttributes:{},breadcrumbAttributes:{}}))}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.render=function(){return a.createElement(j.Provider,{value:this.value},this.props.children)},t}(i.Component);P.canUseDOM=S,P.propTypes={context:n.shape({helmet:n.shape()}),children:n.node.isRequired},P.defaultProps={context:{}},P.displayName="HelmetProvider";var x=function(e,t){var r,n=document.head||document.querySelector(s.HEAD),i=n.querySelectorAll(e+"[data-rh]"),o=[].slice.call(i),a=[];return t&&t.length&&t.forEach(function(t){var n=document.createElement(e);for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&("innerHTML"===i?n.innerHTML=t.innerHTML:"cssText"===i?n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText)):n.setAttribute(i,void 0===t[i]?"":t[i]));n.setAttribute("data-rh","true"),o.some(function(e,t){return r=t,n.isEqualNode(e)})?o.splice(r,1):a.push(n)}),o.forEach(function(e){return e.parentNode.removeChild(e)}),a.forEach(function(e){return n.appendChild(e)}),{oldTags:o,newTags:a}},I=function(e,t){var r=document.getElementsByTagName(e)[0];if(r){for(var n=r.getAttribute("data-rh"),i=n?n.split(","):[],o=[].concat(i),a=Object.keys(t),s=0;s<a.length;s+=1){var c=a[s],u=t[c]||"";r.getAttribute(c)!==u&&r.setAttribute(c,u),-1===i.indexOf(c)&&i.push(c);var l=o.indexOf(c);-1!==l&&o.splice(l,1)}for(var p=o.length-1;p>=0;p-=1)r.removeAttribute(o[p]);i.length===o.length?r.removeAttribute("data-rh"):r.getAttribute("data-rh")!==a.join(",")&&r.setAttribute("data-rh",a.join(","))}},L=function(e,t){var r=e.baseTag,n=e.htmlAttributes,i=e.linkTags,o=e.metaTags,a=e.noscriptTags,c=e.onChangeClientState,u=e.scriptTags,l=e.styleTags,p=e.title,d=e.titleAttributes,f=e.headerAttributes,h=e.breadcrumbAttributes;I(s.BODY,e.bodyAttributes),I(s.HTML,n),I(s.HEADER,f),I(s.BREADCRUMB,h),function(e,t){void 0!==e&&document.title!==e&&(document.title=m(e)),I(s.TITLE,t)}(p,d);var b={baseTag:x(s.BASE,r),linkTags:x(s.LINK,i),metaTags:x(s.META,o),noscriptTags:x(s.NOSCRIPT,a),scriptTags:x(s.SCRIPT,u),styleTags:x(s.STYLE,l)},y={},T={};Object.keys(b).forEach(function(e){var t=b[e],r=t.newTags,n=t.oldTags;r.length&&(y[e]=r),n.length&&(T[e]=b[e].oldTags)}),t&&t(),c(e,y,T)},w=null,H=function(e){function t(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];e.apply(this,t),this.rendered=!1}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.shouldComponentUpdate=function(e){return!o(e,this.props)},t.prototype.componentDidUpdate=function(){this.emitChange()},t.prototype.componentWillUnmount=function(){this.props.context.helmetInstances.remove(this),this.emitChange()},t.prototype.emitChange=function(){var e,t,r=this.props.context,n=r.setHelmet,i=null,o=(e=r.helmetInstances.get().map(function(e){var t=Object.assign({},e.props);return delete t.context,t}),{baseTag:b(["href"],e),bodyAttributes:h("bodyAttributes",e),defer:p(e,"defer"),encode:p(e,"encodeSpecialCharacters"),htmlAttributes:h("htmlAttributes",e),linkTags:y(s.LINK,["rel","href"],e),metaTags:y(s.META,["name","charset","http-equiv","property","itemprop"],e),noscriptTags:y(s.NOSCRIPT,["innerHTML"],e),onChangeClientState:f(e),scriptTags:y(s.SCRIPT,["src","innerHTML"],e),styleTags:y(s.STYLE,["cssText"],e),title:d(e),titleAttributes:h("titleAttributes",e),headerAttributes:h("headerAttributes",e),breadcrumbAttributes:h("breadcrumbAttributes",e)});P.canUseDOM?(t=o,w&&cancelAnimationFrame(w),t.defer?w=requestAnimationFrame(function(){L(t,function(){w=null})}):(L(t),w=null)):C&&(i=C(o)),n(i)},t.prototype.init=function(){this.rendered||(this.rendered=!0,this.props.context.helmetInstances.add(this),this.emitChange())},t.prototype.render=function(){return this.init(),null},t}(i.Component);function R(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(r[n]=e[n]);return r}H.propTypes={context:E.isRequired},H.displayName="HelmetDispatcher";var M=function(e){function n(){e.apply(this,arguments)}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.shouldComponentUpdate=function(e){return!t(this.props,e)},n.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case s.SCRIPT:case s.NOSCRIPT:return{innerHTML:t};case s.STYLE:return{cssText:t};default:throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")}},n.prototype.flattenArrayTypeChildren=function(e){var t,r=e.child,n=e.arrayTypeChildren;return Object.assign({},n,((t={})[r.type]=(n[r.type]||[]).concat([Object.assign({},e.newChildProps,this.mapNestedChildrenToProps(r,e.nestedChildren))]),t))},n.prototype.mapObjectTypeChildren=function(e){var t,r,n=e.child,i=e.newProps,o=e.newChildProps,a=e.nestedChildren;switch(n.type){case s.TITLE:return Object.assign({},i,((t={})[n.type]=a,t),{titleAttributes:Object.assign({},o)});case s.BODY:return Object.assign({},i,{bodyAttributes:Object.assign({},o)});case s.HTML:return Object.assign({},i,{htmlAttributes:Object.assign({},o)});case s.HEADER:return Object.assign({},i,{headerAttributes:Object.assign({},o)});case s.BREADCRUMB:return Object.assign({},i,{breadcrumbAttributes:Object.assign({},o)});default:return Object.assign({},i,((r={})[n.type]=Object.assign({},o),r))}},n.prototype.mapArrayTypeChildrenToProps=function(e,t){var r=Object.assign({},t);return Object.keys(e).forEach(function(t){var n;r=Object.assign({},r,((n={})[t]=e[t],n))}),r},n.prototype.warnOnInvalidChildren=function(e,t){return r(c.some(function(t){return e.type===t}),"function"==typeof e.type?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+c.join(", ")+" are allowed. Helmet does not support rendering <"+e.type+"> elements. Refer to our API for more information."),r(!t||"string"==typeof t||Array.isArray(t)&&!t.some(function(e){return"string"!=typeof e}),"Helmet expects a string as a child of <"+e.type+">. Did you forget to wrap your children in braces? ( <"+e.type+">{``}</"+e.type+"> ) Refer to our API for more information."),!0},n.prototype.mapChildrenToProps=function(e,t){var r=this,n={};return a.Children.forEach(e,function(e){if(e&&e.props){var i=e.props,o=i.children,a=R(i,["children"]),c=Object.keys(a).reduce(function(e,t){return e[l[t]||t]=a[t],e},{}),u=e.type;switch("symbol"==typeof u?u=u.toString():r.warnOnInvalidChildren(e,o),u){case s.FRAGMENT:t=r.mapChildrenToProps(o,t);break;case s.LINK:case s.META:case s.NOSCRIPT:case s.SCRIPT:case s.STYLE:n=r.flattenArrayTypeChildren({child:e,arrayTypeChildren:n,newChildProps:c,nestedChildren:o});break;default:t=r.mapObjectTypeChildren({child:e,newProps:t,newChildProps:c,nestedChildren:o})}}}),this.mapArrayTypeChildrenToProps(n,t)},n.prototype.render=function(){var e=this.props,t=e.children,r=R(e,["children"]),n=Object.assign({},r);return t&&(n=this.mapChildrenToProps(t,n)),a.createElement(j.Consumer,null,function(e){return a.createElement(H,Object.assign({},n,{context:e}))})},n}(i.Component);M.propTypes={base:n.object,bodyAttributes:n.object,children:n.oneOfType([n.arrayOf(n.node),n.node]),defaultTitle:n.string,defer:n.bool,encodeSpecialCharacters:n.bool,htmlAttributes:n.object,link:n.arrayOf(n.object),meta:n.arrayOf(n.object),noscript:n.arrayOf(n.object),onChangeClientState:n.func,script:n.arrayOf(n.object),style:n.arrayOf(n.object),title:n.string,titleAttributes:n.object,headerAttributes:n.object,breadcrumbAttributes:n.object,titleTemplate:n.string},M.defaultProps={defer:!0,encodeSpecialCharacters:!0},M.displayName="Helmet",e.Helmet=M,e.HelmetProvider=P});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("react-fast-compare"),require("invariant"),require("shallowequal")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","react-fast-compare","invariant","shallowequal"],t):t((e=e||self).rndHelmet={},e.react,e.propTypes,e.reactFastCompare,e.invariant,e.shallowequal)}(this,function(e,t,r,n,i,a){var o="default"in t?t.default:t;function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function c(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function u(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)t.indexOf(r=a[n])>=0||(i[r]=e[r]);return i}r=r&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r,n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n,i=i&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i,a=a&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a;var l={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)",HEADER:"header",BREADCRUMB:"breadcrumb"},p=Object.keys(l).map(function(e){return l[e]}),d={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},f=Object.keys(d).reduce(function(e,t){return e[d[t]]=t,e},{}),h=function(e,t){for(var r=e.length-1;r>=0;r-=1){var n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},b=function(e){var t=h(e,l.TITLE),r=h(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,function(){return t});var n=h(e,"defaultTitle");return t||n||void 0},m=function(e){return h(e,"onChangeClientState")||function(){}},y=function(e,t){return t.filter(function(t){return void 0!==t[e]}).map(function(t){return t[e]}).reduce(function(e,t){return s({},e,t)},{})},T=function(e,t){return t.filter(function(e){return void 0!==e[l.BASE]}).map(function(e){return e[l.BASE]}).reverse().reduce(function(t,r){if(!t.length)for(var n=Object.keys(r),i=0;i<n.length;i+=1){var a=n[i].toLowerCase();if(-1!==e.indexOf(a)&&r[a])return t.concat(r)}return t},[])},A=function(e,t,r){var n={};return r.filter(function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&console&&"function"==typeof console.warn&&console.warn("Helmet: "+e+' should be of type "Array". Instead found type "'+typeof t[e]+'"'),!1)}).map(function(t){return t[e]}).reverse().reduce(function(e,r){var i={};r.filter(function(e){for(var r,a=Object.keys(e),o=0;o<a.length;o+=1){var s=a[o],c=s.toLowerCase();-1===t.indexOf(c)||"rel"===r&&"canonical"===e[r].toLowerCase()||"rel"===c&&"stylesheet"===e[c].toLowerCase()||(r=c),-1===t.indexOf(s)||"innerHTML"!==s&&"cssText"!==s&&"itemprop"!==s||(r=s)}if(!r||!e[r])return!1;var u=e[r].toLowerCase();return n[r]||(n[r]={}),i[r]||(i[r]={}),!n[r][u]&&(i[r][u]=!0,!0)}).reverse().forEach(function(t){return e.push(t)});for(var a=Object.keys(i),o=0;o<a.length;o+=1){var c=a[o],u=s({},n[c],i[c]);n[c]=u}return e},[]).reverse()},g=function(e){return Array.isArray(e)?e.join(""):e},v=[l.NOSCRIPT,l.SCRIPT,l.STYLE],C=function(e,t){return void 0===t&&(t=!0),!1===t?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},O=function(e){return Object.keys(e).reduce(function(t,r){var n=void 0!==e[r]?r+'="'+e[r]+'"':""+r;return t?t+" "+n:n},"")},E=function(e,t){return void 0===t&&(t={}),Object.keys(e).reduce(function(t,r){return t[d[r]||r]=e[r],t},t)},S=function(e,t,r){switch(e){case l.TITLE:return{toComponent:function(){return r=t.titleAttributes,(n={key:e=t.title})["data-rh"]=!0,i=E(r,n),[o.createElement(l.TITLE,i,e)];var e,r,n,i},toString:function(){return function(e,t,r,n){var i=O(r),a=g(t);return i?"<"+e+' data-rh="true" '+i+">"+C(a,n)+"</"+e+">":"<"+e+' data-rh="true">'+C(a,n)+"</"+e+">"}(e,t.title,t.titleAttributes,r)}};case"bodyAttributes":case"htmlAttributes":case"headerAttributes":case"breadcrumbAttributes":return{toComponent:function(){return E(t)},toString:function(){return O(t)}};default:return{toComponent:function(){return function(e,t){return t.map(function(t,r){var n,i=((n={key:r})["data-rh"]=!0,n);return Object.keys(t).forEach(function(e){var r=d[e]||e;"innerHTML"===r||"cssText"===r?i.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:i[r]=t[e]}),o.createElement(e,i)})}(e,t)},toString:function(){return function(e,t,r){return t.reduce(function(t,n){var i=Object.keys(n).filter(function(e){return!("innerHTML"===e||"cssText"===e)}).reduce(function(e,t){var i=void 0===n[t]?t:t+'="'+C(n[t],r)+'"';return e?e+" "+i:i},""),a=n.innerHTML||n.cssText||"",o=-1===v.indexOf(e);return t+"<"+e+' data-rh="true" '+i+(o?"/>":">"+a+"</"+e+">")},"")}(e,t,r)}}}},P=function(e){var t=e.bodyAttributes,r=e.encode,n=e.htmlAttributes,i=e.linkTags,a=e.metaTags,o=e.noscriptTags,s=e.scriptTags,c=e.styleTags,u=e.title,p=void 0===u?"":u,d=e.titleAttributes,f=e.headerAttributes,h=e.breadcrumbAttributes;return{base:S(l.BASE,e.baseTag,r),bodyAttributes:S("bodyAttributes",t,r),htmlAttributes:S("htmlAttributes",n,r),link:S(l.LINK,i,r),meta:S(l.META,a,r),noscript:S(l.NOSCRIPT,o,r),script:S(l.SCRIPT,s,r),style:S(l.STYLE,c,r),title:S(l.TITLE,{title:p,titleAttributes:d},r),headerAttributes:S("headerAttributes",f,r),breadcrumbAttributes:S("breadcrumbAttributes",h,r)}},j=o.createContext({}),x=r.shape({setHelmet:r.func,helmetInstances:r.shape({get:r.func,add:r.func,remove:r.func})}),I="undefined"!=typeof document,w=function(e){function t(r){var n;return(n=e.call(this,r)||this).instances=[],n.value={setHelmet:function(e){n.props.context.helmet=e},helmetInstances:{get:function(){return n.instances},add:function(e){n.instances.push(e)},remove:function(e){var t=n.instances.indexOf(e);n.instances.splice(t,1)}}},t.canUseDOM||(r.context.helmet=P({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{},headerAttributes:{},breadcrumbAttributes:{}})),n}return c(t,e),t.prototype.render=function(){return o.createElement(j.Provider,{value:this.value},this.props.children)},t}(t.Component);w.canUseDOM=I,w.propTypes={context:r.shape({helmet:r.shape()}),children:r.node.isRequired},w.defaultProps={context:{}},w.displayName="HelmetProvider";var L=function(e,t){var r,n=document.querySelectorAll(e+"[data-rh]"),i=[].slice.call(n),a=[];return t&&t.length&&t.forEach(function(t){var n=document.createElement(e);for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&("innerHTML"===o?n.innerHTML=t.innerHTML:"cssText"===o?n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText)):n.setAttribute(o,void 0===t[o]?"":t[o]));n.setAttribute("data-rh","true"),i.some(function(e,t){return r=t,n.isEqualNode(e)})?i.splice(r,1):a.push(n)}),i.forEach(function(e){return e.parentNode.removeChild(e)}),a.forEach(function(e){return e.parentNode.appendChild(e)}),{oldTags:i,newTags:a}},H=function(e,t){var r=document.getElementsByTagName(e)[0];if(r){for(var n=r.getAttribute("data-rh"),i=n?n.split(","):[],a=[].concat(i),o=Object.keys(t),s=0;s<o.length;s+=1){var c=o[s],u=t[c]||"";r.getAttribute(c)!==u&&r.setAttribute(c,u),-1===i.indexOf(c)&&i.push(c);var l=a.indexOf(c);-1!==l&&a.splice(l,1)}for(var p=a.length-1;p>=0;p-=1)r.removeAttribute(a[p]);i.length===a.length?r.removeAttribute("data-rh"):r.getAttribute("data-rh")!==o.join(",")&&r.setAttribute("data-rh",o.join(","))}},R=function(e,t){var r=e.baseTag,n=e.htmlAttributes,i=e.linkTags,a=e.metaTags,o=e.noscriptTags,s=e.onChangeClientState,c=e.scriptTags,u=e.styleTags,p=e.title,d=e.titleAttributes,f=e.headerAttributes,h=e.breadcrumbAttributes;H(l.BODY,e.bodyAttributes),H(l.HTML,n),H(l.HEADER,f),H(l.BREADCRUMB,h),function(e,t){void 0!==e&&document.title!==e&&(document.title=g(e)),H(l.TITLE,t)}(p,d);var b={baseTag:L(l.BASE,r),linkTags:L(l.LINK,i),metaTags:L(l.META,a),noscriptTags:L(l.NOSCRIPT,o),scriptTags:L(l.SCRIPT,c),styleTags:L(l.STYLE,u)},m={},y={};Object.keys(b).forEach(function(e){var t=b[e],r=t.newTags,n=t.oldTags;r.length&&(m[e]=r),n.length&&(y[e]=b[e].oldTags)}),t&&t(),s(e,m,y)},M=null,k=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(t=e.call.apply(e,[this].concat(n))||this).rendered=!1,t}c(t,e);var r=t.prototype;return r.shouldComponentUpdate=function(e){return!a(e,this.props)},r.componentDidUpdate=function(){this.emitChange()},r.componentWillUnmount=function(){this.props.context.helmetInstances.remove(this),this.emitChange()},r.emitChange=function(){var e,t,r=this.props.context,n=r.setHelmet,i=null,a=(e=r.helmetInstances.get().map(function(e){var t=s({},e.props);return delete t.context,t}),{baseTag:T(["href"],e),bodyAttributes:y("bodyAttributes",e),defer:h(e,"defer"),encode:h(e,"encodeSpecialCharacters"),htmlAttributes:y("htmlAttributes",e),linkTags:A(l.LINK,["rel","href"],e),metaTags:A(l.META,["name","charset","http-equiv","property","itemprop"],e),noscriptTags:A(l.NOSCRIPT,["innerHTML"],e),onChangeClientState:m(e),scriptTags:A(l.SCRIPT,["src","innerHTML"],e),styleTags:A(l.STYLE,["cssText"],e),title:b(e),titleAttributes:y("titleAttributes",e),headerAttributes:y("headerAttributes",e),breadcrumbAttributes:y("breadcrumbAttributes",e)});w.canUseDOM?(t=a,M&&cancelAnimationFrame(M),t.defer?M=requestAnimationFrame(function(){R(t,function(){M=null})}):(R(t),M=null)):P&&(i=P(a)),n(i)},r.init=function(){this.rendered||(this.rendered=!0,this.props.context.helmetInstances.add(this),this.emitChange())},r.render=function(){return this.init(),null},t}(t.Component);k.propTypes={context:x.isRequired},k.displayName="HelmetDispatcher";var N=function(e){function t(){return e.apply(this,arguments)||this}c(t,e);var r=t.prototype;return r.shouldComponentUpdate=function(e){return!n(this.props,e)},r.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case l.SCRIPT:case l.NOSCRIPT:return{innerHTML:t};case l.STYLE:return{cssText:t};default:throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")}},r.flattenArrayTypeChildren=function(e){var t,r=e.child,n=e.arrayTypeChildren;return s({},n,((t={})[r.type]=[].concat(n[r.type]||[],[s({},e.newChildProps,this.mapNestedChildrenToProps(r,e.nestedChildren))]),t))},r.mapObjectTypeChildren=function(e){var t,r,n=e.child,i=e.newProps,a=e.newChildProps,o=e.nestedChildren;switch(n.type){case l.TITLE:return s({},i,((t={})[n.type]=o,t.titleAttributes=s({},a),t));case l.BODY:return s({},i,{bodyAttributes:s({},a)});case l.HTML:return s({},i,{htmlAttributes:s({},a)});case l.HEADER:return s({},i,{headerAttributes:s({},a)});case l.BREADCRUMB:return s({},i,{breadcrumbAttributes:s({},a)});default:return s({},i,((r={})[n.type]=s({},a),r))}},r.mapArrayTypeChildrenToProps=function(e,t){var r=s({},t);return Object.keys(e).forEach(function(t){var n;r=s({},r,((n={})[t]=e[t],n))}),r},r.warnOnInvalidChildren=function(e,t){return i(p.some(function(t){return e.type===t}),"function"==typeof e.type?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+p.join(", ")+" are allowed. Helmet does not support rendering <"+e.type+"> elements. Refer to our API for more information."),i(!t||"string"==typeof t||Array.isArray(t)&&!t.some(function(e){return"string"!=typeof e}),"Helmet expects a string as a child of <"+e.type+">. Did you forget to wrap your children in braces? ( <"+e.type+">{``}</"+e.type+"> ) Refer to our API for more information."),!0},r.mapChildrenToProps=function(e,t){var r=this,n={};return o.Children.forEach(e,function(e){if(e&&e.props){var i=e.props,a=i.children,o=u(i,["children"]),s=Object.keys(o).reduce(function(e,t){return e[f[t]||t]=o[t],e},{}),c=e.type;switch("symbol"==typeof c?c=c.toString():r.warnOnInvalidChildren(e,a),c){case l.FRAGMENT:t=r.mapChildrenToProps(a,t);break;case l.LINK:case l.META:case l.NOSCRIPT:case l.SCRIPT:case l.STYLE:n=r.flattenArrayTypeChildren({child:e,arrayTypeChildren:n,newChildProps:s,nestedChildren:a});break;default:t=r.mapObjectTypeChildren({child:e,newProps:t,newChildProps:s,nestedChildren:a})}}}),this.mapArrayTypeChildrenToProps(n,t)},r.render=function(){var e=this.props,t=e.children,r=s({},u(e,["children"]));return t&&(r=this.mapChildrenToProps(t,r)),o.createElement(j.Consumer,null,function(e){return o.createElement(k,s({},r,{context:e}))})},t}(t.Component);N.propTypes={base:r.object,bodyAttributes:r.object,children:r.oneOfType([r.arrayOf(r.node),r.node]),defaultTitle:r.string,defer:r.bool,encodeSpecialCharacters:r.bool,htmlAttributes:r.object,link:r.arrayOf(r.object),meta:r.arrayOf(r.object),noscript:r.arrayOf(r.object),onChangeClientState:r.func,script:r.arrayOf(r.object),style:r.arrayOf(r.object),title:r.string,titleAttributes:r.object,headerAttributes:r.object,breadcrumbAttributes:r.object,titleTemplate:r.string},N.defaultProps={defer:!0,encodeSpecialCharacters:!0},N.displayName="Helmet",e.Helmet=N,e.HelmetProvider=w});
//# sourceMappingURL=index.umd.js.map
{
"name": "rnd-helmet",
"version": "1.0.6",
"version": "1.0.7",
"description": "Thread-safe Helmet for React 16+ and friends",

@@ -19,37 +19,39 @@ "main": "lib/index.js",

"dependencies": {
"@babel/runtime": "^7.3.4",
"@babel/runtime": "^7.11.2",
"invariant": "^2.2.4",
"prop-types": "^15.7.2",
"react-fast-compare": "^2.0.4",
"react-fast-compare": "^3.2.0",
"shallowequal": "^1.1.0"
},
"devDependencies": {
"@babel/cli": "7.6.2",
"@babel/core": "7.6.2",
"@babel/plugin-proposal-class-properties": "7.5.5",
"babel-eslint": "10.0.1",
"babel-preset-kyt-react": "1.0.0-alpha.8d1d2ff9",
"enzyme": "3.10.0",
"enzyme-adapter-react-16": "1.15.1",
"enzyme-to-json": "3.4.2",
"eslint": "5.16.0",
"eslint-config-airbnb": "17.1.0",
"eslint-config-kyt": "1.0.0-alpha.8d1d2ff9",
"eslint-config-prettier": "4.2.0",
"eslint-plugin-import": "2.17.2",
"eslint-plugin-jest": "22.3.0",
"eslint-plugin-json": "1.4.0",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-kyt": "1.0.0-alpha.8d1d2ff9",
"eslint-plugin-prettier": "3.1.0",
"eslint-plugin-react": "7.13.0",
"eslint-plugin-react-hooks": "1.6.0",
"jest": "24.5.0",
"jsdom": "15.2.0",
"microbundle": "^0.11.0",
"prettier": "1.17.1",
"@babel/cli": "7.11.6",
"@babel/core": "7.11.6",
"@commitlint/cli": "11.0.0",
"@commitlint/config-conventional": "11.0.0",
"babel-eslint": "10.1.0",
"babel-preset-kyt-react": "1.0.5",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.4",
"enzyme-to-json": "3.5.0",
"eslint": "7.9.0",
"eslint-config-airbnb": "18.2.0",
"eslint-config-kyt": "1.0.8",
"eslint-config-prettier": "6.11.0",
"eslint-plugin-import": "2.22.0",
"eslint-plugin-jest": "24.0.1",
"eslint-plugin-jest-formatting": "2.0.0",
"eslint-plugin-json": "2.1.2",
"eslint-plugin-jsx-a11y": "6.3.1",
"eslint-plugin-prettier": "3.1.4",
"eslint-plugin-react": "7.20.6",
"eslint-plugin-react-hooks": "4.1.2",
"husky": "4.3.0",
"jest": "26.4.2",
"jsdom": "16.4.0",
"microbundle": "0.12.3",
"prettier": "2.1.1",
"raf": "3.4.1",
"react": "16.8.4",
"react-dom": "16.8.4",
"rimraf": "^2.6.3"
"react": "16.13.1",
"react-dom": "16.13.1",
"rimraf": "3.0.2"
},

@@ -62,25 +64,15 @@ "peerDependencies": {

"clean": "rimraf lib",
"lint": "eslint .",
"lint": "eslint . --report-unused-disable-directives",
"lint-fix": "eslint . --fix",
"test": "KYT_ENV_TYPE=test jest --no-cache",
"test-watch": "npm run test -- --watch",
"test-update": "npm run test -- -u",
"compile": "npm run clean && KYT_ENV_TYPE=client NODE_ENV=production microbundle --jsx React.createElement",
"prepare": "npm run compile"
"test": "NODE_ENV=test BABEL_ENV=test jest",
"test-watch": "yarn test --watch",
"test-update": "yarn test -u",
"compile": "yarn run clean && KYT_ENV_TYPE=client NODE_ENV=production microbundle --jsx React.createElement",
"prepare": "yarn compile"
},
"jest": {
"setupFilesAfterEnv": [
"<rootDir>/jest.setup.js"
],
"testEnvironment": "node",
"testMatch": [
"**/__tests__/**/*.test.js"
],
"testPathIgnorePatterns": [
"/node_modules/",
"/src/",
"/lib/",
"/es/"
]
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
}
}

@@ -123,3 +123,3 @@ # react-helmet-async

```
```javascript
import { HelmetProvider } from 'react-helmet-async';

@@ -126,0 +126,0 @@

@@ -5,4 +5,3 @@ import { HELMET_ATTRIBUTE, TAG_NAMES, TAG_PROPERTIES } from './constants';

const updateTags = (type, tags) => {
const headElement = document.head || document.querySelector(TAG_NAMES.HEAD);
const tagNodes = headElement.querySelectorAll(`${type}[${HELMET_ATTRIBUTE}]`);
const tagNodes = document.querySelectorAll(`${type}[${HELMET_ATTRIBUTE}]`);
const oldTags = [].slice.call(tagNodes);

@@ -51,3 +50,3 @@ const newTags = [];

oldTags.forEach(tag => tag.parentNode.removeChild(tag));
newTags.forEach(tag => headElement.appendChild(tag));
newTags.forEach(tag => tag.parentNode.appendChild(tag));

@@ -54,0 +53,0 @@ return {

@@ -52,3 +52,2 @@ export const TAG_PROPERTIES = {

export const HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce((obj, key) => {
// eslint-disable-next-line no-param-reassign
obj[REACT_TAG_MAP[key]] = key;

@@ -55,0 +54,0 @@ return obj;

@@ -31,3 +31,3 @@ import React, { Component } from 'react';

*/
/* eslint-disable react/prop-types, react/forbid-prop-types, react/require-default-props */
/* eslint-disable react/forbid-prop-types, react/require-default-props */
static propTypes = {

@@ -84,5 +84,3 @@ base: PropTypes.object,

throw new Error(
`<${
child.type
} /> elements are self-closing and can not contain children. Refer to our API for more information.`
`<${child.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`
);

@@ -174,7 +172,3 @@ }

!nestedChildren.some(nestedChild => typeof nestedChild !== 'string')),
`Helmet expects a string as a child of <${
child.type
}>. Did you forget to wrap your children in braces? ( <${child.type}>{\`\`}</${
child.type
}> ) Refer to our API for more information.`
`Helmet expects a string as a child of <${child.type}>. Did you forget to wrap your children in braces? ( <${child.type}>{\`\`}</${child.type}> ) Refer to our API for more information.`
);

@@ -196,3 +190,2 @@

const newChildProps = Object.keys(childProps).reduce((obj, key) => {
// eslint-disable-next-line no-param-reassign
obj[HTML_TAG_MAP[key] || key] = childProps[key];

@@ -211,3 +204,2 @@ return obj;

case TAG_NAMES.FRAGMENT:
// eslint-disable-next-line no-param-reassign
newProps = this.mapChildrenToProps(nestedChildren, newProps);

@@ -230,3 +222,2 @@ break;

default:
// eslint-disable-next-line no-param-reassign
newProps = this.mapObjectTypeChildren({

@@ -255,3 +246,5 @@ child,

<Context.Consumer>
{context => <Dispatcher {...newProps} context={context} />}
{(
context // eslint-disable-next-line react/jsx-props-no-spreading
) => <Dispatcher {...newProps} context={context} />}
</Context.Consumer>

@@ -258,0 +251,0 @@ );

@@ -40,3 +40,2 @@ import React, { Component } from 'react';

setHelmet: serverState => {
// eslint-disable-next-line react/prop-types
this.props.context.helmet = serverState;

@@ -60,3 +59,2 @@ },

if (!Provider.canUseDOM) {
// eslint-disable-next-line no-param-reassign
props.context.helmet = mapStateOnServer({

@@ -63,0 +61,0 @@ baseTag: [],

@@ -72,3 +72,2 @@ import React from 'react';

Object.keys(attributes).reduce((obj, key) => {
// eslint-disable-next-line no-param-reassign
obj[REACT_TAG_MAP[key] || key] = attributes[key];

@@ -75,0 +74,0 @@ return obj;

Sorry, the diff of this file is not supported yet

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