rmwc
Version:
A thin React wrapper for Material Design (Web) Components
38 lines (37 loc) • 15.6 kB
JavaScript
/** @license React v16.3.2
* react-dom-server.browser.production.min.js
*
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
;(function(u,t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t(require("react")):"function"===typeof define&&define.amd?define(["react"],t):u.ReactDOMServer=t(u.React)})(this,function(u){function t(a){for(var b=arguments.length-1,d="http://reactjs.org/docs/error-decoder.html?invariant\x3d"+a,c=0;c<b;c++)d+="\x26args[]\x3d"+encodeURIComponent(arguments[c+1]);Q(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",
d)}function B(a){return function(){return a}}function R(a){if(E.hasOwnProperty(a))return!0;if(F.hasOwnProperty(a))return!1;if(S.test(a))return E[a]=!0;F[a]=!0;return!1}function T(a,b,d,c){if(null!==d&&0===d.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(c)return!1;if(null!==d)return!d.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}function U(a,b,d,c){if(null===b||"undefined"===typeof b||T(a,b,d,c))return!0;if(null!==
d)switch(d.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function r(a,b,d,c,n){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=c;this.attributeNamespace=n;this.mustUseProperty=d;this.propertyName=a;this.type=b}function z(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=V.exec(a);if(b){var d="",c,n=0;for(c=b.index;c<a.length;c++){switch(a.charCodeAt(c)){case 34:b="\x26quot;";break;case 38:b="\x26amp;";break;
case 39:b="\x26#x27;";break;case 60:b="\x26lt;";break;case 62:b="\x26gt;";break;default:continue}n!==c&&(d+=a.substring(n,c));n=c+1;d+=b}a=n!==c?d+a.substring(n,c):d}return a}function G(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function H(a){return"string"===typeof a?a:"function"===typeof a?a.displayName||a.name:null}function W(a){var b="";u.Children.forEach(a,function(a){null==a||
"string"!==typeof a&&"number"!==typeof a||(b+=a)});return b}function X(a,b){if(a=a.contextTypes){var d={},c;for(c in a)d[c]=b[c];b=d}else b=I;return b}function J(a,b){void 0===a&&t("152",H(b)||"Component")}function Y(a,b){function d(c,d){var n=X(d,b),f=[],h=!1,g={isMounted:function(a){return!1},enqueueForceUpdate:function(a){if(null===f)return null},enqueueReplaceState:function(a,b){h=!0;f=[b]},enqueueSetState:function(a,b){if(null===f)return null;f.push(b)}},e=void 0;if(d.prototype&&d.prototype.isReactComponent){if(e=
new d(c.props,n,g),"function"===typeof d.getDerivedStateFromProps){var k=d.getDerivedStateFromProps.call(null,c.props,e.state);null!=k&&(e.state=x({},e.state,k))}}else if(e=d(c.props,n,g),null==e||null==e.render){a=e;J(a,d);return}e.props=c.props;e.context=n;e.updater=g;g=e.state;void 0===g&&(e.state=g=null);if("function"===typeof e.UNSAFE_componentWillMount||"function"===typeof e.componentWillMount)if("function"===typeof e.componentWillMount&&"function"!==typeof d.getDerivedStateFromProps&&e.componentWillMount(),
"function"===typeof e.UNSAFE_componentWillMount&&"function"!==typeof d.getDerivedStateFromProps&&e.UNSAFE_componentWillMount(),f.length){g=f;var p=h;f=null;h=!1;if(p&&1===g.length)e.state=g[0];else{k=p?g[0]:e.state;var m=!0;for(p=p?1:0;p<g.length;p++){var q=g[p];q="function"===typeof q?q.call(e,k,c.props,n):q;null!=q&&(m?(m=!1,k=x({},k,q)):x(k,q))}e.state=k}}else f=null;a=e.render();J(a,d);c=void 0;if("function"===typeof e.getChildContext&&(n=d.childContextTypes,"object"===typeof n)){c=e.getChildContext();
for(var v in c)v in n?void 0:t("108",H(d)||"Unknown",v)}c&&(b=x({},b,c))}for(;u.isValidElement(a);){var c=a,n=c.type;if("function"!==typeof n)break;d(c,n)}return{child:a,context:b}}var Q=function(a,b,d,c,n,f,h,l){if(!a){if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var k=[d,c,n,f,h,l],p=0;a=Error(b.replace(/%s/g,function(){return k[p++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;
}},x=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,k=function(){};k.thatReturns=B;k.thatReturnsFalse=B(!1);k.thatReturnsTrue=B(!0);k.thatReturnsNull=B(null);k.thatReturnsThis=function(){return this};k.thatReturnsArgument=function(a){return a};var I={},Z=/([A-Z])/g,aa=/^ms-/,w="function"===typeof Symbol&&Symbol["for"],ba=w?Symbol["for"]("react.call"):60104,ca=w?Symbol["for"]("react.return"):60105,da=w?Symbol["for"]("react.portal"):60106,K=w?Symbol["for"]("react.fragment"):60107,ea=w?
Symbol["for"]("react.strict_mode"):60108,L=w?Symbol["for"]("react.provider"):60109,fa=w?Symbol["for"]("react.context"):60110,ha=w?Symbol["for"]("react.async_mode"):60111,ia=w?Symbol["for"]("react.forward_ref"):60112,S=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,
F={},E={},p={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){p[a]=new r(a,0,!1,a,null)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];p[b]=new r(b,1,!1,a[1],null)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){p[a]=new r(a,2,!1,a.toLowerCase(),null)});["autoReverse",
"externalResourcesRequired","preserveAlpha"].forEach(function(a){p[a]=new r(a,2,!1,a,null)});"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){p[a]=new r(a,3,!1,a.toLowerCase(),null)});["checked","multiple","muted","selected"].forEach(function(a){p[a]=new r(a,3,!0,a.toLowerCase(),null)});["capture","download"].forEach(function(a){p[a]=
new r(a,4,!1,a.toLowerCase(),null)});["cols","rows","size","span"].forEach(function(a){p[a]=new r(a,6,!1,a.toLowerCase(),null)});["rowSpan","start"].forEach(function(a){p[a]=new r(a,5,!1,a.toLowerCase(),null)});var C=/[\-:]([a-z])/g,D=function(a){return a[1].toUpperCase()};"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=
a.replace(C,D);p[b]=new r(b,1,!1,a,null)});"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(C,D);p[b]=new r(b,1,!1,a,"http://www.w3.org/1999/xlink")});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(C,D);p[b]=new r(b,1,!1,a,"http://www.w3.org/XML/1998/namespace")});p.tabIndex=new r("tabIndex",1,!1,"tabindex",null);var V=/["'&<>]/,M={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,
keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},ja=x({menuitem:!0},M),A={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,
order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ka=["Webkit","ms","Moz","O"];Object.keys(A).forEach(function(a){ka.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);A[b]=A[a]})});var y=u.Children.toArray,N=k.thatReturns("");k.thatReturns("");var la={listing:!0,pre:!0,textarea:!0},ma=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,O={},na=function(a){var b=
{};return function(d){b.hasOwnProperty(d)||(b[d]=a.call(this,d));return b[d]}}(function(a){return a.replace(Z,"-$1").toLowerCase().replace(aa,"-ms-")}),oa={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null},P=function(){function a(b,d){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");u.isValidElement(b)?b.type!==K?b=[b]:(b=b.props.children,b=u.isValidElement(b)?[b]:y(b)):b=y(b);this.stack=[{type:null,domNamespace:"http://www.w3.org/1999/xhtml",
children:b,childIndex:0,context:I,footer:""}];this.exhausted=!1;this.currentSelectValue=null;this.previousWasTextNode=!1;this.makeStaticMarkup=d;this.providerStack=[];this.providerIndex=-1}a.prototype.pushProvider=function(a){this.providerIndex+=1;this.providerStack[this.providerIndex]=a;a.type._context._currentValue=a.props.value};a.prototype.popProvider=function(a){this.providerStack[this.providerIndex]=null;--this.providerIndex;a=a.type._context;a._currentValue=0>this.providerIndex?a._defaultValue:
this.providerStack[this.providerIndex].props.value};a.prototype.read=function(a){if(this.exhausted)return null;for(var b="";b.length<a;){if(0===this.stack.length){this.exhausted=!0;break}var c=this.stack[this.stack.length-1];if(c.childIndex>=c.children.length){var n=c.footer;b+=n;""!==n&&(this.previousWasTextNode=!1);this.stack.pop();"select"===c.type?this.currentSelectValue=null:null!=c.type&&null!=c.type.type&&c.type.type.$$typeof===L&&this.popProvider(c.type)}else n=c.children[c.childIndex++],
b+=this.render(n,c.context,c.domNamespace)}return b};a.prototype.render=function(a,d,c){if("string"===typeof a||"number"===typeof a){c=""+a;if(""===c)return"";if(this.makeStaticMarkup)return z(c);if(this.previousWasTextNode)return"\x3c!-- --\x3e"+z(c);this.previousWasTextNode=!0;return z(c)}d=Y(a,d);a=d.child;d=d.context;if(null===a||!1===a)return"";if(!u.isValidElement(a)){if(null!=a&&null!=a.$$typeof){var b=a.$$typeof;b===da?t("257"):void 0;t("258",b.toString())}a=y(a);this.stack.push({type:null,
domNamespace:c,children:a,childIndex:0,context:d,footer:""});return""}b=a.type;if("string"===typeof b)return this.renderDOM(a,d,c);switch(b){case ea:case ha:case K:return a=y(a.props.children),this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:d,footer:""}),"";case ba:case ca:t("259")}if("object"===typeof b&&null!==b)switch(b.$$typeof){case ia:return a=y(b.render(a.props,a.ref)),this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:d,footer:""}),"";case L:return b=
y(a.props.children),c={type:a,domNamespace:c,children:b,childIndex:0,context:d,footer:""},this.pushProvider(a),this.stack.push(c),"";case fa:return b=y(a.props.children(a.type._currentValue)),this.stack.push({type:a,domNamespace:c,children:b,childIndex:0,context:d,footer:""}),""}t("130",null==b?b:typeof b,"")};a.prototype.renderDOM=function(a,d,c){var b=a.type.toLowerCase();"http://www.w3.org/1999/xhtml"===c&&G(b);O.hasOwnProperty(b)||(ma.test(b)?void 0:t("65",b),O[b]=!0);var f=a.props;if("input"===
b)f=x({type:void 0},f,{defaultChecked:void 0,defaultValue:void 0,value:null!=f.value?f.value:f.defaultValue,checked:null!=f.checked?f.checked:f.defaultChecked});else if("textarea"===b){var h=f.value;if(null==h){h=f.defaultValue;var l=f.children;null!=l&&(null!=h?t("92"):void 0,Array.isArray(l)&&(1>=l.length?void 0:t("93"),l=l[0]),h=""+l);null==h&&(h="")}f=x({},f,{value:void 0,children:""+h})}else if("select"===b)this.currentSelectValue=null!=f.value?f.value:f.defaultValue,f=x({},f,{value:void 0});
else if("option"===b){l=this.currentSelectValue;var k=W(f.children);if(null!=l){var r=null!=f.value?f.value+"":k;h=!1;if(Array.isArray(l))for(var g=0;g<l.length;g++){if(""+l[g]===r){h=!0;break}}else h=""+l===r;f=x({selected:void 0,children:void 0},f,{selected:h,children:k})}}if(h=f)ja[b]&&(null!=h.children||null!=h.dangerouslySetInnerHTML?t("137",b,N()):void 0),null!=h.dangerouslySetInnerHTML&&(null!=h.children?t("60"):void 0,"object"===typeof h.dangerouslySetInnerHTML&&"__html"in h.dangerouslySetInnerHTML?
void 0:t("61")),null!=h.style&&"object"!==typeof h.style?t("62",N()):void 0;h=f;l=this.makeStaticMarkup;k=1===this.stack.length;r="\x3c"+a.type;for(v in h)if(h.hasOwnProperty(v)){var e=h[v];if(null!=e){if("style"===v){g=void 0;var w="",u="";for(g in e)if(e.hasOwnProperty(g)){var m=0===g.indexOf("--"),q=e[g];null!=q&&(w+=u+na(g)+":",u=g,m=null==q||"boolean"===typeof q||""===q?"":m||"number"!==typeof q||0===q||A.hasOwnProperty(u)&&A[u]?(""+q).trim():q+"px",w+=m,u=";")}e=w||null}g=null;b:if(m=b,q=h,
-1===m.indexOf("-"))m="string"===typeof q.is;else switch(m){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":m=!1;break b;default:m=!0}if(m)oa.hasOwnProperty(v)||(g=v,g=R(g)&&null!=e?g+"\x3d"+('"'+z(e)+'"'):"");else{m=v;g=e;e=p.hasOwnProperty(m)?p[m]:null;if(q="style"!==m)q=null!==e?0===e.type:!(2<m.length)||"o"!==m[0]&&"O"!==m[0]||"n"!==m[1]&&"N"!==m[1]?!1:!0;q||U(m,g,e,!1)?g="":
null!==e?(m=e.attributeName,e=e.type,g=3===e||4===e&&!0===g?m+'\x3d""':m+"\x3d"+('"'+z(g)+'"')):g=m+"\x3d"+('"'+z(g)+'"')}g&&(r+=" "+g)}}l||k&&(r+=' data-reactroot\x3d""');var v=r;h="";M.hasOwnProperty(b)?v+="/\x3e":(v+="\x3e",h="\x3c/"+a.type+"\x3e");a:{l=f.dangerouslySetInnerHTML;if(null!=l){if(null!=l.__html){l=l.__html;break a}}else if(l=f.children,"string"===typeof l||"number"===typeof l){l=z(l);break a}l=null}null!=l?(f=[],la[b]&&"\n"===l.charAt(0)&&(v+="\n"),v+=l):f=y(f.children);a=a.type;
c=null==c||"http://www.w3.org/1999/xhtml"===c?G(a):"http://www.w3.org/2000/svg"===c&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":c;this.stack.push({domNamespace:c,type:b,children:f,childIndex:0,context:d,footer:h});this.previousWasTextNode=!1;return v};return a}();k={renderToString:function(a){return(new P(a,!1)).read(Infinity)},renderToStaticMarkup:function(a){return(new P(a,!0)).read(Infinity)},renderToNodeStream:function(){t("207")},renderToStaticNodeStream:function(){t("208")},version:"16.3.2"};
k=(w=Object.freeze({default:k}))&&k||w;return k["default"]?k["default"]:k});