future-charts-example
Version:
Future Charts - Example
1 lines • 25.8 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.DonutChart=t():e.DonutChart=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(1),i=r(o),a=n(1),u=r(a),c=n(2),l=r(c);jQuery.fn.extend({DonutChart:function(e){this.each(function(){u.default.render(i.default.createElement(l.default,e),this)})}})},function(e,t,n){(function(t){!function(t,r){e.exports=r(n(5),n(3))}(this,function(e,n){function r(e){var t=e.nodeName,n=e.attributes;e.attributes={},t.defaultProps&&x(e.attributes,t.defaultProps),n&&x(e.attributes,n),n=e.attributes,e.children&&!e.children.length&&(e.children=void 0),e.children&&(n.children=e.children)}function o(e,t){var n,r,o;if(t){for(o in t)if(n=z.test(o))break;if(n){r=e.attributes={};for(o in t)t.hasOwnProperty(o)&&(r[z.test(o)?o.replace(/([A-Z0-9])/,"-$1").toLowerCase():o]=t[o])}}}function i(e,t,r){var o=t&&t._preactCompatRendered;o&&o.parentNode!==t&&(o=null),o||(o=t.children[0]);for(var i=t.childNodes.length;i--;)t.childNodes[i]!==o&&t.removeChild(t.childNodes[i]);var a=n.render(e,t,o);return t&&(t._preactCompatRendered=a),"function"==typeof r&&r(),a&&a._component||a.base}function a(e,t,r,o){var a=n.h(q,{context:e.context},t),u=i(a,r);return o&&o(u),u}function u(e){var t=e._preactCompatRendered;return!(!t||t.parentNode!==e)&&(n.render(n.h(V),e,t),!0)}function c(e){return d.bind(null,e)}function l(e,t){for(var n=t||0;n<e.length;n++){var r=e[n];Array.isArray(r)?l(r):r&&"object"==typeof r&&!v(r)&&(r.props&&r.type||r.attributes&&r.nodeName||r.children)&&(e[n]=d(r.type||r.nodeName,r.props||r.attributes,r.children))}}function f(e){return"function"==typeof e&&!(e.prototype&&e.prototype.render)}function s(e){return N({displayName:e.displayName||e.name,render:function(t,n,r){return e(t,r)}})}function p(e){var t=e[K];return t?t===!0?e:t:(t=s(e),Object.defineProperty(t,K,{configurable:!0,value:!0}),t.displayName=e.displayName,t.propTypes=e.propTypes,t.defaultProps=e.defaultProps,Object.defineProperty(e,K,{configurable:!0,value:t}),t)}function d(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return l(e,2),h(n.h.apply(void 0,e))}function h(e){e.preactCompatNormalized=!0,g(e),f(e.nodeName)&&(e.nodeName=p(e.nodeName));var t=e.attributes.ref,n=t&&typeof t;return!F||"string"!==n&&"number"!==n||(e.attributes.ref=y(t,F)),b(e),e}function m(e,t){for(var r=[],o=arguments.length-2;o-- >0;)r[o]=arguments[o+2];if(!v(e))return e;var i=e.attributes||e.props,a=n.h(e.nodeName||e.type,i,e.children||i&&i.children);return h(n.cloneElement.apply(void 0,[a,t].concat(r)))}function v(e){return e&&(e instanceof $||e.$$typeof===M)}function y(e,t){return t._refProxies[e]||(t._refProxies[e]=function(n){t&&t.refs&&(t.refs[e]=n,null===n&&(delete t._refProxies[e],t=null))})}function b(e){var t=e.nodeName,n=e.attributes;if(n&&"string"==typeof t){var r={};for(var o in n)r[o.toLowerCase()]=o;if(r.onchange){t=t.toLowerCase();var i="input"===t&&"checkbox"===String(n.type).toLowerCase()?"onclick":"oninput",a=r[i]||i;n[a]||(n[a]=S([n[r[i]],n[r.onchange]]))}}}function g(e){var t=e.attributes;if(t){var n=t.className||t.class;n&&(t.className=n)}}function x(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function _(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}function C(){}function N(e){function t(t,r){x(this,e),n&&E(this,n),P(this),U.call(this,t,r,L),T.call(this,t,r)}var n=e.mixins&&w(e.mixins);return e.statics&&x(t,e.statics),e.propTypes&&(t.propTypes=e.propTypes),e.defaultProps&&(t.defaultProps=e.defaultProps),e.getDefaultProps&&(t.defaultProps=e.getDefaultProps()),C.prototype=U.prototype,t.prototype=new C,t.prototype.constructor=t,t.displayName=e.displayName||"Component",t}function w(e){for(var t={},n=0;n<e.length;n++){var r=e[n];for(var o in r)r.hasOwnProperty(o)&&"function"==typeof r[o]&&(t[o]||(t[o]=[])).push(r[o])}return t}function E(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=S(t[n].concat(e[n]||n)))}function P(e){for(var t in e){var n=e[t];"function"!=typeof n||n.__bound||I.hasOwnProperty(t)||((e[t]=n.bind(e)).__bound=!0)}}function k(e,t,n){if("string"==typeof t&&(t=e.constructor.prototype[t]),"function"==typeof t)return t.apply(e,n)}function S(e){return function(){for(var t,n=arguments,r=this,o=0;o<e.length;o++){var i=k(r,e[o],n);"undefined"!=typeof i&&(t=i)}return t}}function T(e,t){A.call(this,e,t),this.componentWillReceiveProps=S([A,this.componentWillReceiveProps||"componentWillReceiveProps"]),this.render=S([A,O,this.render||"render",j])}function A(e,t){var n=this;if(e){var r=e.children;if(r&&Array.isArray(r)&&1===r.length&&(e.children=r[0],e.children&&"object"==typeof e.children&&(e.children.length=1,e.children[0]=e.children)),B){var o="function"==typeof this?this:this.constructor,i=this.propTypes||o.propTypes;if(i)for(var a in i)if(i.hasOwnProperty(a)&&"function"==typeof i[a]){var u=n.displayName||o.name,c=i[a](e,a,u,"prop");c&&console.error(new Error(c.message||c))}}}}function O(e){F=this}function j(){F===this&&(F=null)}function U(e,t,r){n.Component.call(this,e,t),this.getInitialState&&(this.state=this.getInitialState()),this.refs={},this._refProxies={},r!==L&&T.call(this,e,t)}function R(e,t){U.call(this,e,t)}e="default"in e?e.default:e;var W="15.1.0",D="a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan".split(" "),M="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,I={constructor:1,render:1,shouldComponentUpdate:1,componentWillReceiveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1},z=/^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vert|word|writing|x)[A-Z]/,L={},B="undefined"!=typeof t&&t.env&&!1,V=function(){return null},$=n.h("").constructor;$.prototype.$$typeof=M,$.prototype.preactCompatUpgraded=!1,$.prototype.preactCompatNormalized=!1,Object.defineProperty($.prototype,"type",{get:function(){return this.nodeName},set:function(e){this.nodeName=e},configurable:!0}),Object.defineProperty($.prototype,"props",{get:function(){return this.attributes},set:function(e){this.attributes=e},configurable:!0});var G=n.options.vnode;n.options.vnode=function(e){if(!e.preactCompatUpgraded){e.preactCompatUpgraded=!0;var t=e.nodeName,n=e.attributes;n||(n=e.attributes={}),"function"==typeof t?(t[K]===!0||t.prototype&&"isReactComponent"in t.prototype)&&(e.preactCompatNormalized||h(e),r(e)):n&&o(e,n)}G&&G(e)};var q=function(){};q.prototype.getChildContext=function(){return this.props.context},q.prototype.render=function(e){return e.children[0]};for(var F,H=[],Z={map:function(e,t,n){return e=Z.toArray(e),n&&n!==e&&(t=t.bind(n)),e.map(t)},forEach:function(e,t,n){e=Z.toArray(e),n&&n!==e&&(t=t.bind(n)),e.forEach(t)},count:function(e){return e=Z.toArray(e),e.length},only:function(e){if(e=Z.toArray(e),1!==e.length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:function(e){return Array.isArray&&Array.isArray(e)?e:H.concat(e)}},J={},Q=D.length;Q--;)J[D[Q]]=c(D[Q]);var K="undefined"!=typeof Symbol?Symbol.for("__preactCompatWrapper"):"__preactCompatWrapper",X=function(e){return e&&e.base||e};U.prototype=new n.Component,x(U.prototype,{constructor:U,isReactComponent:{},replaceState:function(e,t){var n=this;this.setState(e,t);for(var r in this.state)r in e||delete n.state[r]},getDOMNode:function(){return this.base},isMounted:function(){return!!this.base}}),R.prototype=new U({},{},L),R.prototype.shouldComponentUpdate=function(e,t){return _(this.props,e)||_(this.state,t)};var Y={version:W,DOM:J,PropTypes:e,Children:Z,render:i,createClass:N,createFactory:c,createElement:d,cloneElement:m,isValidElement:v,findDOMNode:X,unmountComponentAtNode:u,Component:U,PureComponent:R,unstable_renderSubtreeIntoContainer:a};return Y})}).call(t,n(4))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),l=r(c),f=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.radius,n=e.holeSize,r=e.text,o=e.value,i=e.total,a=e.backgroundColor,u=e.valueColor,c=t*(1-(1-n)/2),f=t*(1-n),s=2*Math.PI*c,p=o*s/i+" "+s,d="rotate(-90 "+t+","+t+")",h=c*n*.6;return l.default.createElement("div",{style:{textAlign:"center",fontFamily:"sans-serif"}},l.default.createElement("svg",{width:2*t+"px",height:2*t+"px"},l.default.createElement("circle",{r:c+"px",cx:t+"px",cy:t+"px",transform:d,strokeWidth:f,stroke:a,fill:"none"}),l.default.createElement("circle",{r:c+"px",cx:t+"px",cy:t+"px",transform:d,strokeWidth:f,strokeDasharray:p,fill:"none",stroke:u}),l.default.createElement("text",{x:t+"px",y:t+"px",dy:h/3+"px",textAnchor:"middle",fill:u,fontSize:h+"px"},~~(1e3*o/i)/10,"%")),l.default.createElement("div",{style:{marginTop:"10px"}},r))}}]),t}(l.default.Component);t.default=f,f.defaultProps={holeSize:.8,radius:65,backgroundColor:"#d1d8e7",valueColor:"#49649f"}},function(e,t,n){!function(e,n){n(t)}(this,function(e){function t(e,t,n){this.nodeName=e,this.attributes=t,this.children=n,this.key=t&&t.key}function n(e,n){var r,o,i,a,u=[];for(a=arguments.length;a-- >2;)L.push(arguments[a]);for(n&&n.children&&(L.length||L.push(n.children),delete n.children);L.length;)if((o=L.pop())instanceof Array)for(a=o.length;a--;)L.push(o[a]);else null!=o&&o!==!1&&("number"!=typeof o&&o!==!0||(o=String(o)),i="string"==typeof o,i&&r?u[u.length-1]+=o:(u.push(o),r=i));var c=new t(e,n||void 0,u);return z.vnode&&z.vnode(c),c}function r(e,t){if(t)for(var n in t)e[n]=t[n];return e}function o(e){return r({},e)}function i(e,t){for(var n=t.split("."),r=0;r<n.length&&e;r++)e=e[n[r]];return e}function a(e){return"function"==typeof e}function u(e){return"string"==typeof e}function c(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}function l(e,t){return n(e.nodeName,r(o(e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}function f(e,t,n){var r=t.split(".");return function(t){for(var o=t&&t.target||this,a={},c=a,l=u(n)?i(t,n):o.nodeName?o.type.match(/^che|rad/)?o.checked:o.value:t,f=0;f<r.length-1;f++)c=c[r[f]]||(c[r[f]]=!f&&e.state[r[f]]||{});c[r[f]]=l,e.setState(a)}}function s(e){!e._dirty&&(e._dirty=!0)&&1==J.push(e)&&(z.debounceRendering||G)(p)}function p(){var e,t=J;for(J=[];e=t.pop();)e._dirty&&R(e)}function d(e){var t=e&&e.nodeName;return t&&a(t)&&!(t.prototype&&t.prototype.render)}function h(e,t){return e.nodeName(y(e),t||q)}function m(e,t){return u(t)?e instanceof Text:u(t.nodeName)?v(e,t.nodeName):a(t.nodeName)?e._componentConstructor===t.nodeName||d(t):void 0}function v(e,t){return e.normalizedNodeName===t||V(e.nodeName)===V(t)}function y(e){var t=o(e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function b(e){var t=e.parentNode;t&&t.removeChild(e)}function g(e,t,n,r,o){if("className"===t&&(t="class"),"class"===t&&r&&"object"==typeof r&&(r=c(r)),"key"===t);else if("class"!==t||o)if("style"===t){if((!r||u(r)||u(n))&&(e.style.cssText=r||""),r&&"object"==typeof r){if(!u(n))for(var i in n)i in r||(e.style[i]="");for(var i in r)e.style[i]="number"!=typeof r[i]||H[i]?r[i]:r[i]+"px"}}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html);else if("o"==t[0]&&"n"==t[1]){var l=e._listeners||(e._listeners={});t=V(t.substring(2)),r?l[t]||e.addEventListener(t,_,!!Z[t]):l[t]&&e.removeEventListener(t,_,!!Z[t]),l[t]=r}else if("list"!==t&&"type"!==t&&!o&&t in e)x(e,t,null==r?"":r),null!=r&&r!==!1||e.removeAttribute(t);else{var f=o&&t.match(/^xlink\:?(.+)/);null==r||r===!1?f?e.removeAttributeNS("http://www.w3.org/1999/xlink",V(f[1])):e.removeAttribute(t):"object"==typeof r||a(r)||(f?e.setAttributeNS("http://www.w3.org/1999/xlink",V(f[1]),r):e.setAttribute(t,r))}else e.className=r||""}function x(e,t,n){try{e[t]=n}catch(e){}}function _(e){return this._listeners[e.type](z.event&&z.event(e)||e)}function C(e){if(b(e),e instanceof Element){e._component=e._componentConstructor=null;var t=e.normalizedNodeName||V(e.nodeName);(Q[t]||(Q[t]=[])).push(e)}}function N(e,t){var n=V(e),r=Q[n]&&Q[n].pop()||(t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e));return r.normalizedNodeName=n,r}function w(){for(var e;e=K.pop();)z.afterMount&&z.afterMount(e),e.componentDidMount&&e.componentDidMount()}function E(e,t,n,r,o,i){X++||(Y=o instanceof SVGElement);var a=P(e,t,n,r);return o&&a.parentNode!==o&&o.appendChild(a),--X||i||w(),a}function P(e,t,n,r){for(var o=t&&t.attributes;d(t);)t=h(t,n);if(null==t&&(t=""),u(t)){if(e){if(e instanceof Text&&e.parentNode)return e.nodeValue!=t&&(e.nodeValue=t),e;T(e)}return document.createTextNode(t)}if(a(t.nodeName))return W(e,t,n,r);var i=e,c=t.nodeName,l=Y,f=t.children;if(u(c)||(c=String(c)),Y="svg"===c||"foreignObject"!==c&&Y,e){if(!v(e,c)){for(i=N(c,Y);e.firstChild;)i.appendChild(e.firstChild);T(e)}}else i=N(c,Y);f&&1===f.length&&"string"==typeof f[0]&&1===i.childNodes.length&&i.firstChild instanceof Text?i.firstChild.nodeValue!=f[0]&&(i.firstChild.nodeValue=f[0]):(f&&f.length||i.firstChild)&&k(i,f,n,r);var s=i[F];if(!s){i[F]=s={};for(var p=i.attributes,m=p.length;m--;)s[p[m].name]=p[m].value}return A(i,t.attributes,s),o&&"function"==typeof o.ref&&(s.ref=o.ref)(i),Y=l,i}function k(e,t,n,r){var o,i,u,c,l=e.childNodes,f=[],s={},p=0,d=0,h=l.length,v=0,y=t&&t.length;if(h)for(var b=0;b<h;b++){var g=l[b],x=y?(i=g._component)?i.__key:(i=g[F])?i.key:null:null;x||0===x?(p++,s[x]=g):f[v++]=g}if(y)for(var b=0;b<y;b++){u=t[b],c=null;var x=u.key;if(null!=x)p&&x in s&&(c=s[x],s[x]=void 0,p--);else if(!c&&d<v){for(o=d;o<v;o++)if(i=f[o],i&&m(i,u)){c=i,f[o]=void 0,o===v-1&&v--,o===d&&d++;break}!c&&d<v&&a(u.nodeName)&&r&&(c=f[d],f[d++]=void 0)}c=P(c,u,n,r),c&&c!==e&&c!==l[b]&&e.insertBefore(c,l[b]||null)}if(p)for(var b in s)s[b]&&T(s[b]);d<v&&S(f)}function S(e,t){for(var n=e.length;n--;)e[n]&&T(e[n],t)}function T(e,t){var n=e._component;n?D(n,!t):(e[F]&&e[F].ref&&e[F].ref(null),t||C(e),e.childNodes&&e.childNodes.length&&S(e.childNodes,t))}function A(e,t,n){for(var r in n)t&&r in t||null==n[r]||g(e,r,n[r],n[r]=void 0,Y);if(t)for(var o in t)"children"===o||"innerHTML"===o||o in n&&t[o]===("value"===o||"checked"===o?e[o]:n[o])||g(e,o,n[o],n[o]=t[o],Y)}function O(e){var t=e.constructor.name,n=ee[t];n?n.push(e):ee[t]=[e]}function j(e,t,n){var r=new e(t,n),o=ee[e.name];if(M.call(r,t,n),o)for(var i=o.length;i--;)if(o[i].constructor===e){r.nextBase=o[i].nextBase,o.splice(i,1);break}return r}function U(e,t,n,r,o){e._disable||(e._disable=!0,(e.__ref=t.ref)&&delete t.ref,(e.__key=t.key)&&delete t.key,!e.base||o?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,r),r&&r!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=r),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,0!==n&&(1!==n&&z.syncComponentUpdates===!1&&e.base?s(e):R(e,1,o)),e.__ref&&e.__ref(e))}function R(e,t,n,i){if(!e._disable){var u,c,l,f,s=e.props,p=e.state,m=e.context,v=e.prevProps||s,b=e.prevState||p,g=e.prevContext||m,x=e.base,_=e.nextBase,C=x||_,N=e._component;if(x&&(e.props=v,e.state=b,e.context=g,2!==t&&e.shouldComponentUpdate&&e.shouldComponentUpdate(s,p,m)===!1?u=!0:e.componentWillUpdate&&e.componentWillUpdate(s,p,m),e.props=s,e.state=p,e.context=m),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!u){for(e.render&&(c=e.render(s,p,m)),e.getChildContext&&(m=r(o(m),e.getChildContext()));d(c);)c=h(c,m);var P,k,S=c&&c.nodeName;if(a(S)){l=N;var A=y(c);l&&l.constructor===S?U(l,A,1,m):(P=l,l=j(S,A,m),l.nextBase=l.nextBase||_,l._parentComponent=e,e._component=l,U(l,A,0,m),R(l,1,n,!0)),k=l.base}else f=C,P=N,P&&(f=e._component=null),(C||1===t)&&(f&&(f._component=null),k=E(f,c,m,n||!x,C&&C.parentNode,!0));if(C&&k!==C&&l!==N){var O=C.parentNode;O&&k!==O&&(O.replaceChild(k,C),P||(C._component=null,T(C)))}if(P&&D(P,k!==C),e.base=k,k&&!i){for(var W=e,M=e;M=M._parentComponent;)(W=M).base=k;k._component=W,k._componentConstructor=W.constructor}}!x||n?K.unshift(e):u||(e.componentDidUpdate&&e.componentDidUpdate(v,b,g),z.afterUpdate&&z.afterUpdate(e));var I,L=e._renderCallbacks;if(L)for(;I=L.pop();)I.call(e);X||i||w()}}function W(e,t,n,r){for(var o=e&&e._component,i=e,a=o&&e._componentConstructor===t.nodeName,u=a,c=y(t);o&&!u&&(o=o._parentComponent);)u=o.constructor===t.nodeName;return o&&u&&(!r||o._component)?(U(o,c,3,n,r),e=o.base):(o&&!a&&(D(o,!0),e=i=null),o=j(t.nodeName,c,n),e&&!o.nextBase&&(o.nextBase=e,i=null),U(o,c,1,n,r),e=o.base,i&&e!==i&&(i._component=null,T(i))),e}function D(e,t){z.beforeUnmount&&z.beforeUnmount(e);var n=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var r=e._component;r?D(r,t):n&&(n[F]&&n[F].ref&&n[F].ref(null),e.nextBase=n,t&&(b(n),O(e)),S(n.childNodes,!t)),e.__ref&&e.__ref(null),e.componentDidUnmount&&e.componentDidUnmount()}function M(e,t){this._dirty=!0,this.context=t,this.props=e,this.state||(this.state={})}function I(e,t,n){return E(n,e,{},!1,t)}var z={},L=[],B={},V=function(e){return B[e]||(B[e]=e.toLowerCase())},$="undefined"!=typeof Promise&&Promise.resolve(),G=$?function(e){$.then(e)}:setTimeout,q={},F="undefined"!=typeof Symbol?Symbol.for("preactattr"):"__preactattr_",H={boxFlex:1,boxFlexGroup:1,columnCount:1,fillOpacity:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,fontWeight:1,lineClamp:1,lineHeight:1,opacity:1,order:1,orphans:1,strokeOpacity:1,widows:1,zIndex:1,zoom:1},Z={blur:1,error:1,focus:1,load:1,resize:1,scroll:1},J=[],Q={},K=[],X=0,Y=!1,ee={};r(M.prototype,{linkState:function(e,t){var n=this._linkedStates||(this._linkedStates={});return n[e+t]||(n[e+t]=f(this,e,t))},setState:function(e,t){var n=this.state;this.prevState||(this.prevState=o(n)),r(n,a(e)?e(n,this.props):e),t&&(this._renderCallbacks=this._renderCallbacks||[]).push(t),s(this)},forceUpdate:function(){R(this,2)},render:function(){}}),e.h=n,e.cloneElement=l,e.Component=M,e.render=I,e.rerender=p,e.options=z})},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(f===setTimeout)return setTimeout(e,0);if((f===n||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function i(e){if(s===clearTimeout)return clearTimeout(e);if((s===r||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(e);try{return s(e)}catch(t){try{return s.call(null,e)}catch(t){return s.call(this,e)}}}function a(){m&&d&&(m=!1,d.length?h=d.concat(h):v=-1,h.length&&u())}function u(){if(!m){var e=o(a);m=!0;for(var t=h.length;t;){for(d=h,h=[];++v<t;)d&&d[v].run();v=-1,t=h.length}d=null,m=!1,i(e)}}function c(e,t){this.fun=e,this.array=t}function l(){}var f,s,p=e.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:n}catch(e){f=n}try{s="function"==typeof clearTimeout?clearTimeout:r}catch(e){s=r}}();var d,h=[],m=!1,v=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new c(e,t)),1!==h.length||m||o(u)},c.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=l,p.addListener=l,p.once=l,p.off=l,p.removeListener=l,p.removeAllListeners=l,p.emit=l,p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t,n){var r,o,i;!function(n,a){o=[t,e],r=a,i="function"==typeof r?r.apply(t,o):r,!(void 0!==i&&(e.exports=i))}(this,function(e,t){"use strict";function n(e){var t=e&&(C&&e[C]||e[N]);if("function"==typeof t)return t}function r(e){function t(t,n,r,o,i,a){if(o=o||w,a=a||r,null==n[r]){var u=x[i];return t?new Error("Required "+u+" `"+a+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,i,a)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function o(e){function t(t,n,r,o,i){var a=t[n],u=m(a);if(u!==e){var c=x[o],l=v(a);return new Error("Invalid "+c+" `"+i+"` of type "+("`"+l+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return r(t)}function i(){return r(_.thatReturns(null))}function a(e){function t(t,n,r,o,i){var a=t[n];if(!Array.isArray(a)){var u=x[o],c=m(a);return new Error("Invalid "+u+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<a.length;l++){var f=e(a,l,r,o,i+"["+l+"]");if(f instanceof Error)return f}return null}return r(t)}function u(){function e(e,t,n,r,o){if(!g.isValidElement(e[t])){var i=x[r];return new Error("Invalid "+i+" `"+o+"` supplied to "+("`"+n+"`, expected a single ReactElement."))}return null}return r(e)}function c(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var a=x[o],u=e.name||w,c=y(t[n]);return new Error("Invalid "+a+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("instance of `"+u+"`."))}return null}return r(t)}function l(e){function t(t,n,r,o,i){for(var a=t[n],u=0;u<e.length;u++)if(a===e[u])return null;var c=x[o],l=JSON.stringify(e);return new Error("Invalid "+c+" `"+i+"` of value `"+a+"` "+("supplied to `"+r+"`, expected one of "+l+"."))}return r(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOf, expected an instance of array.")})}function f(e){function t(t,n,r,o,i){var a=t[n],u=m(a);if("object"!==u){var c=x[o];return new Error("Invalid "+c+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected an object."))}for(var l in a)if(a.hasOwnProperty(l)){var f=e(a,l,r,o,i+"."+l);if(f instanceof Error)return f}return null}return r(t)}function s(e){function t(t,n,r,o,i){for(var a=0;a<e.length;a++){var u=e[a];if(null==u(t,n,r,o,i))return null}var c=x[o];return new Error("Invalid "+c+" `"+i+"` supplied to "+("`"+r+"`."))}return r(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOfType, expected an instance of array.")})}function p(){function e(e,t,n,r,o){if(!h(e[t])){var i=x[r];return new Error("Invalid "+i+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return r(e)}function d(e){function t(t,n,r,o,i){var a=t[n],u=m(a);if("object"!==u){var c=x[o];return new Error("Invalid "+c+" `"+i+"` of type `"+u+"` "+("supplied to `"+r+"`, expected `object`."))}for(var l in e){var f=e[l];if(f){var s=f(a,l,r,o,i+"."+l);if(s)return s}}return null}return r(t)}function h(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(h);if(null===e||g.isValidElement(e))return!0;var t=n(e);if(!t)return!1;var r,o=t.call(e);if(t!==e.entries){for(;!(r=o.next()).done;)if(!h(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!h(i[1]))return!1}return!0;default:return!1}}function m(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function v(e){var t=m(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){return e.constructor&&e.constructor.name?e.constructor.name:w}var b="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,g={};g.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===b};var x={prop:"prop",context:"context",childContext:"child context"},_={thatReturns:function(e){return function(){return e}}},C="function"==typeof Symbol&&Symbol.iterator,N="@@iterator",w="<<anonymous>>",E={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:i(),arrayOf:a,element:u(),instanceOf:c,node:p(),objectOf:f,oneOf:l,oneOfType:s,shape:d};t.exports=E})}])});