New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

inferno

Package Overview
Dependencies
Maintainers
3
Versions
340
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inferno - npm Package Compare versions

Comparing version 0.7.3 to 0.7.4

50

dist/inferno-component.js
/*!
* inferno-component v0.7.3
* inferno-component v0.7.4
* (c) 2016 Dominic Gannaway

@@ -59,2 +59,24 @@ * Released under the MPL-2.0 License.

function isNullOrUndefined(obj) {
return obj === void 0 || obj === null;
}
function constructDefaults(string, object, value) {
/* eslint no-return-assign: 0 */
string.split(',').forEach(function (i) {
return object[i] = value;
});
}
var xlinkNS = 'http://www.w3.org/1999/xlink';
var xmlNS = 'http://www.w3.org/XML/1998/namespace';
var strictProps = {};
var booleanProps = {};
var namespaces = {};
constructDefaults('xlink:href,xlink:arcrole,xlink:actuate,xlink:role,xlink:titlef,xlink:type', namespaces, xlinkNS);
constructDefaults('xml:base,xml:lang,xml:space', namespaces, xmlNS);
constructDefaults('volume,value', strictProps, true);
constructDefaults('muted,scoped,loop,open,checked,default,capture,disabled,selected,readonly,multiple,required,autoplay,controls,seamless,reversed,allowfullscreen,novalidate', booleanProps, true);
var screenWidth = window.screen.width;

@@ -64,2 +86,3 @@ var screenHeight = window.screen.height;

var scrollY = 0;
var lastScrollTime = 0;

@@ -69,2 +92,3 @@ window.onscroll = function (e) {

scrollY = window.scrollY;
lastScrollTime = performance.now();
};

@@ -77,2 +101,3 @@

screenHeight = window.screen.height;
lastScrollTime = performance.now();
};

@@ -103,8 +128,4 @@

function isNullOrUndefined(obj) {
return obj === void 0 || obj === null;
}
var noOp = 'Inferno Error: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.';
var noOp = 'Inferno Warning: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.';
// Copy of the util from dom/util, otherwise it makes massive bundles

@@ -126,5 +147,11 @@ function getActiveNode() {

}
if (component._pendingSetState === false) {
if (!component._pendingSetState) {
component._pendingSetState = true;
applyState(component, false, callback);
} else {
var pendingState = component._pendingState;
var oldState = component.state;
component.state = babelHelpers.extends({}, oldState, pendingState);
component._pendingState = {};
}

@@ -134,3 +161,3 @@ }

function applyState(component, force, callback) {
if (component._deferSetState === false || force) {
if (!component._deferSetState || force) {
(function () {

@@ -177,3 +204,3 @@ component._pendingSetState = false;

this._lastNode = null;
this._unmounted = false;
this._unmounted = true;
this.context = {};

@@ -189,3 +216,3 @@ this._patch = null;

value: function forceUpdate(callback) {
if (this._unmounted === true) {
if (this._unmounted) {
throw Error(noOp);

@@ -198,3 +225,3 @@ }

value: function setState(newState, callback) {
if (this._unmounted === true) {
if (this._unmounted) {
throw Error(noOp);

@@ -264,2 +291,3 @@ }

}
return false;
}

@@ -266,0 +294,0 @@ }]);

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.InfernoComponent=e()}(this,function(){"use strict";function t(){this._listeners=[],this.scrollX=null,this.scrollY=null,this.screenHeight=c,this.screenWidth=l}function e(t){return void 0===t||null===t}function n(){return document.activeElement}function o(t){t!==document.body&&document.activeElement!==t&&t.focus()}function i(t,e,n){for(var o in e)t._pendingState[o]=e[o];t._pendingSetState===!1&&(t._pendingSetState=!0,r(t,!1,n))}function r(e,i,r){(e._deferSetState===!1||i)&&!function(){e._pendingSetState=!1;var l=e._pendingState,c=e.state,u=s.extends({},c,l);e._pendingState={};var a=e._updateComponent(c,u,e.props,e.props,i),d=e._lastNode,f=d.dom.parentNode,p=n(),h=new t;e._patch(d,a,f,h,e.context,null,!1),e._lastNode=a,h.addListener(function(){h.trigger(),r&&r()}),o(p)}()}var s={};s.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s.classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},s.createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s.extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};var l=window.screen.width,c=window.screen.height,u=0,a=0;window.onscroll=function(t){u=window.scrollX,a=window.scrollY},window.resize=function(t){u=window.scrollX,a=window.scrollY,l=window.screen.width,c=window.screen.height},t.prototype={refresh:function(){this.scrollX=window.scrollX,this.scrollY=window.scrollY},addListener:function(t){this._listeners.push(t)},trigger:function(){for(var t=0;t<this._listeners.length;t++)this._listeners[t]()}};var d="Inferno Warning: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.",f=function(){function t(e){s.classCallCheck(this,t),this.props=e||{},this.state={},this.refs={},this._blockSetState=!1,this._deferSetState=!1,this._pendingSetState=!1,this._pendingState={},this._lastNode=null,this._unmounted=!1,this.context={},this._patch=null}return s.createClass(t,[{key:"render",value:function(){}},{key:"forceUpdate",value:function(t){if(this._unmounted===!0)throw Error(d);r(this,!0,t)}},{key:"setState",value:function(t,e){if(this._unmounted===!0)throw Error(d);if(this._blockSetState!==!1)throw Error("Inferno Warning: Cannot update state via setState() in componentWillUpdate()");i(this,t,e)}},{key:"componentDidMount",value:function(){}},{key:"componentWillMount",value:function(){}},{key:"componentWillUnmount",value:function(){}},{key:"componentDidUpdate",value:function(){}},{key:"shouldComponentUpdate",value:function(){return!0}},{key:"componentWillReceiveProps",value:function(){}},{key:"componentWillUpdate",value:function(){}},{key:"getChildContext",value:function(){}},{key:"_updateComponent",value:function(t,n,o,i,r){if(this._unmounted===!0)return this._unmounted=!1,!1;if(!e(i)&&e(i.children)&&(i.children=o.children),o!==i||t!==n||r){o!==i&&(this._blockSetState=!0,this.componentWillReceiveProps(i),this._blockSetState=!1);var s=this.shouldComponentUpdate(i,n);if(s!==!1){this._blockSetState=!0,this.componentWillUpdate(i,n),this._blockSetState=!1,this.props=i,this.state=n;var l=this.render();return this.componentDidUpdate(o,t),l}}}}]),t}();return f});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.InfernoComponent=t()}(this,function(){"use strict";function e(e){return void 0===e||null===e}function t(e,t,n){e.split(",").forEach(function(e){return t[e]=n})}function n(){this._listeners=[],this.scrollX=null,this.scrollY=null,this.screenHeight=h,this.screenWidth=f}function o(){return document.activeElement}function i(e){e!==document.body&&document.activeElement!==e&&e.focus()}function r(e,t,n){for(var o in t)e._pendingState[o]=t[o];if(e._pendingSetState){var i=e._pendingState,r=e.state;e.state=s.extends({},r,i),e._pendingState={}}else e._pendingSetState=!0,l(e,!1,n)}function l(e,t,r){e._deferSetState&&!t||!function(){e._pendingSetState=!1;var l=e._pendingState,a=e.state,c=s.extends({},a,l);e._pendingState={};var u=e._updateComponent(a,c,e.props,e.props,t),d=e._lastNode,p=d.dom.parentNode,f=o(),h=new n;e._patch(d,u,p,h,e.context,null,!1),e._lastNode=u,h.addListener(function(){h.trigger(),r&&r()}),i(f)}()}var s={};s.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},s.classCallCheck=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},s.createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s.extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e};var a="http://www.w3.org/1999/xlink",c="http://www.w3.org/XML/1998/namespace",u={},d={},p={};t("xlink:href,xlink:arcrole,xlink:actuate,xlink:role,xlink:titlef,xlink:type",p,a),t("xml:base,xml:lang,xml:space",p,c),t("volume,value",u,!0),t("muted,scoped,loop,open,checked,default,capture,disabled,selected,readonly,multiple,required,autoplay,controls,seamless,reversed,allowfullscreen,novalidate",d,!0);var f=window.screen.width,h=window.screen.height,m=0,w=0,y=0;window.onscroll=function(e){m=window.scrollX,w=window.scrollY,y=performance.now()},window.resize=function(e){m=window.scrollX,w=window.scrollY,f=window.screen.width,h=window.screen.height,y=performance.now()},n.prototype={refresh:function(){this.scrollX=window.scrollX,this.scrollY=window.scrollY},addListener:function(e){this._listeners.push(e)},trigger:function(){for(var e=0;e<this._listeners.length;e++)this._listeners[e]()}};var v="Inferno Error: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.",S=function(){function t(e){s.classCallCheck(this,t),this.props=e||{},this.state={},this.refs={},this._blockSetState=!1,this._deferSetState=!1,this._pendingSetState=!1,this._pendingState={},this._lastNode=null,this._unmounted=!0,this.context={},this._patch=null}return s.createClass(t,[{key:"render",value:function(){}},{key:"forceUpdate",value:function(e){if(this._unmounted)throw Error(v);l(this,!0,e)}},{key:"setState",value:function(e,t){if(this._unmounted)throw Error(v);if(this._blockSetState!==!1)throw Error("Inferno Warning: Cannot update state via setState() in componentWillUpdate()");r(this,e,t)}},{key:"componentDidMount",value:function(){}},{key:"componentWillMount",value:function(){}},{key:"componentWillUnmount",value:function(){}},{key:"componentDidUpdate",value:function(){}},{key:"shouldComponentUpdate",value:function(){return!0}},{key:"componentWillReceiveProps",value:function(){}},{key:"componentWillUpdate",value:function(){}},{key:"getChildContext",value:function(){}},{key:"_updateComponent",value:function(t,n,o,i,r){if(this._unmounted===!0)return this._unmounted=!1,!1;if(!e(i)&&e(i.children)&&(i.children=o.children),o!==i||t!==n||r){o!==i&&(this._blockSetState=!0,this.componentWillReceiveProps(i),this._blockSetState=!1);var l=this.shouldComponentUpdate(i,n);if(l!==!1){this._blockSetState=!0,this.componentWillUpdate(i,n),this._blockSetState=!1,this.props=i,this.state=n;var s=this.render();return this.componentDidUpdate(o,t),s}}return!1}}]),t}();return S});
/*!
* inferno-create-element v0.7.3
* inferno-create-element v0.7.4
* (c) 2016 Dominic Gannaway

@@ -68,3 +68,3 @@ * Released under the MPL-2.0 License.

function isInvalidNode(obj) {
return obj === void 0 || obj === null || obj === false;
return obj === null || obj === false || obj === void 0;
}

@@ -222,6 +222,6 @@

vNode.hooks = attrsAndEvents.hooks || null;
vNode.children = children !== void 0 ? children : null;
vNode.key = key !== void 0 ? key : null;
vNode.className = className !== void 0 ? className : null;
vNode.style = style !== void 0 ? style : null;
vNode.children = children === void 0 ? null : children;
vNode.key = key === void 0 ? null : key;
vNode.className = className === void 0 ? null : className;
vNode.style = style === void 0 ? null : style;

@@ -228,0 +228,0 @@ return vNode;

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

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):t.InfernoCreateElement=n()}(this,function(){"use strict";function t(t){return t instanceof Array}function n(t){return void 0===t||null===t}function e(t){return void 0===t||null===t||t===!1}function o(t){return"function"==typeof t}function l(t){return"o"===t[0]&&"n"===t[1]&&t.length>3}function r(t){return"onCreated"===t||"onAttached"===t||"onWillDetach"===t||"onWillUpdate"===t||"onDidUpdate"===t}function i(t){return"onComponentWillMount"===t||"onComponentDidMount"===t||"onComponentWillUnmount"===t||"onComponentShouldUpdate"===t||"onComponentWillUpdate"===t||"onComponentDidUpdate"===t}function u(t){this.bp=t,this.dom=null,this.instance=null,this.tag=null,this.children=null,this.style=null,this.className=null,this.attrs=null,this.events=null,this.hooks=null,this.key=null,this.clipData=null}function s(t){return new u(t)}function a(e,u){var s=null,a=null,f=null,c=null,h=null;if(!n(e)){if(t(e))return e;for(var d in e)"className"===d?c=e[d]:"style"===d?h=e[d]:r(d)&&!o(u)?(n(a)&&(a={}),a[d.substring(2).toLowerCase()]=e[d],delete e[d]):l(d)&&!o(u)?(n(s)&&(s={}),s[d.toLowerCase()]=e[d],delete e[d]):i(d)&&o(u)?(n(a)&&(a={}),a["c"+d.substring(3)]=e[d],delete e[d]):o(u)?f=e:(n(f)&&(f={}),f[d]=e[d])}return{attrs:f,events:s,className:c,style:h,hooks:a}}function f(o){var l=o.tag,r=o.attrs,i=o.children,u=o.className,f=o.style;o.events,o.hooks;if(void 0===l&&!n(r)&&!r.tpl&&!n(i)&&0===i.length)return null;var h=n(r)||n(r.key)?void 0:r.key;n(i)||0!==i.length?e(i)||(i=c(t(i)&&1===i.length?i[0]:i)):i=null,void 0!==h&&delete r.key;var d=a(r,l),y=s();return u=u||d.className,f=f||d.style,y.tag=l||null,y.attrs=d.attrs||null,y.events=d.events||null,y.hooks=d.hooks||null,y.children=void 0!==i?i:null,y.key=void 0!==h?h:null,y.className=void 0!==u?u:null,y.style=void 0!==f?f:null,y}function c(e){var o=!n(e);if(o&&t(e)){for(var l=[],r=0;r<e.length;r++){var i=e[r];n(i)||"object"!==("undefined"==typeof i?"undefined":d.typeof(i))?l.push(i):t(i)?i.length>0?l.push(c(i)):l.push(null):l.push(f(i))}return l}return o&&"object"===("undefined"==typeof e?"undefined":d.typeof(e))&&void 0===e.dom?f(e):e}function h(t,n){for(var e=arguments.length,o=Array(e>2?e-2:0),l=2;e>l;l++)o[l-2]=arguments[l];return f({tag:t,attrs:n,children:o})}var d={};return d.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},d.classCallCheck=function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")},d.createClass=function(){function t(t,n){for(var e=0;e<n.length;e++){var o=n[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(n,e,o){return e&&t(n.prototype,e),o&&t(n,o),n}}(),d.extends=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},u.prototype={setAttrs:function(t){return this.attrs=t,this},setTag:function(t){return this.tag=t,this},setStyle:function(t){return this.style=t,this},setClassName:function(t){return this.className=t,this},setChildren:function(t){return this.children=t,this},setHooks:function(t){return this.hooks=t,this},setEvents:function(t){return this.events=t,this},setKey:function(t){return this.key=t,this}},h});
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):t.InfernoCreateElement=n()}(this,function(){"use strict";function t(t){return t instanceof Array}function n(t){return void 0===t||null===t}function e(t){return null===t||t===!1||void 0===t}function o(t){return"function"==typeof t}function l(t){return"o"===t[0]&&"n"===t[1]&&t.length>3}function r(t){return"onCreated"===t||"onAttached"===t||"onWillDetach"===t||"onWillUpdate"===t||"onDidUpdate"===t}function i(t){return"onComponentWillMount"===t||"onComponentDidMount"===t||"onComponentWillUnmount"===t||"onComponentShouldUpdate"===t||"onComponentWillUpdate"===t||"onComponentDidUpdate"===t}function u(t){this.bp=t,this.dom=null,this.instance=null,this.tag=null,this.children=null,this.style=null,this.className=null,this.attrs=null,this.events=null,this.hooks=null,this.key=null,this.clipData=null}function s(t){return new u(t)}function a(e,u){var s=null,a=null,f=null,c=null,h=null;if(!n(e)){if(t(e))return e;for(var d in e)"className"===d?c=e[d]:"style"===d?h=e[d]:r(d)&&!o(u)?(n(a)&&(a={}),a[d.substring(2).toLowerCase()]=e[d],delete e[d]):l(d)&&!o(u)?(n(s)&&(s={}),s[d.toLowerCase()]=e[d],delete e[d]):i(d)&&o(u)?(n(a)&&(a={}),a["c"+d.substring(3)]=e[d],delete e[d]):o(u)?f=e:(n(f)&&(f={}),f[d]=e[d])}return{attrs:f,events:s,className:c,style:h,hooks:a}}function f(o){var l=o.tag,r=o.attrs,i=o.children,u=o.className,f=o.style;o.events,o.hooks;if(void 0===l&&!n(r)&&!r.tpl&&!n(i)&&0===i.length)return null;var h=n(r)||n(r.key)?void 0:r.key;n(i)||0!==i.length?e(i)||(i=c(t(i)&&1===i.length?i[0]:i)):i=null,void 0!==h&&delete r.key;var d=a(r,l),y=s();return u=u||d.className,f=f||d.style,y.tag=l||null,y.attrs=d.attrs||null,y.events=d.events||null,y.hooks=d.hooks||null,y.children=void 0===i?null:i,y.key=void 0===h?null:h,y.className=void 0===u?null:u,y.style=void 0===f?null:f,y}function c(e){var o=!n(e);if(o&&t(e)){for(var l=[],r=0;r<e.length;r++){var i=e[r];n(i)||"object"!==("undefined"==typeof i?"undefined":d.typeof(i))?l.push(i):t(i)?i.length>0?l.push(c(i)):l.push(null):l.push(f(i))}return l}return o&&"object"===("undefined"==typeof e?"undefined":d.typeof(e))&&void 0===e.dom?f(e):e}function h(t,n){for(var e=arguments.length,o=Array(e>2?e-2:0),l=2;e>l;l++)o[l-2]=arguments[l];return f({tag:t,attrs:n,children:o})}var d={};return d.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},d.classCallCheck=function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")},d.createClass=function(){function t(t,n){for(var e=0;e<n.length;e++){var o=n[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(n,e,o){return e&&t(n.prototype,e),o&&t(n,o),n}}(),d.extends=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},u.prototype={setAttrs:function(t){return this.attrs=t,this},setTag:function(t){return this.tag=t,this},setStyle:function(t){return this.style=t,this},setClassName:function(t){return this.className=t,this},setChildren:function(t){return this.children=t,this},setHooks:function(t){return this.hooks=t,this},setEvents:function(t){return this.events=t,this},setKey:function(t){return this.key=t,this}},h});
/*!
* inferno-dom v0.7.3
* inferno-dom v0.7.4
* (c) 2016 Dominic Gannaway

@@ -59,42 +59,2 @@ * Released under the MPL-2.0 License.

var screenWidth = window.screen.width;
var screenHeight = window.screen.height;
var scrollX = 0;
var scrollY = 0;
window.onscroll = function (e) {
scrollX = window.scrollX;
scrollY = window.scrollY;
};
window.resize = function (e) {
scrollX = window.scrollX;
scrollY = window.scrollY;
screenWidth = window.screen.width;
screenHeight = window.screen.height;
};
function Lifecycle() {
this._listeners = [];
this.scrollX = null;
this.scrollY = null;
this.screenHeight = screenHeight;
this.screenWidth = screenWidth;
}
Lifecycle.prototype = {
refresh: function refresh() {
this.scrollX = window.scrollX;
this.scrollY = window.scrollY;
},
addListener: function addListener(callback) {
this._listeners.push(callback);
},
trigger: function trigger() {
for (var i = 0; i < this._listeners.length; i++) {
this._listeners[i]();
}
}
};
function addChildrenToProps(children, props) {

@@ -133,3 +93,3 @@ if (!isNullOrUndefined(children)) {

function isInvalidNode(obj) {
return obj === void 0 || obj === null || obj === false;
return obj === null || obj === false || obj === void 0;
}

@@ -153,2 +113,360 @@

var recyclingEnabled = true;
function recycle(node, bp, lifecycle, context, instance) {
if (bp !== void 0) {
var key = node.key;
var _pool = key === null ? bp.pools.nonKeyed : bp.pools.keyed[key];
if (!isNullOrUndefined(_pool)) {
var recycledNode = _pool.pop();
if (!isNullOrUndefined(recycledNode)) {
patch(recycledNode, node, null, lifecycle, context, instance, true, bp.isSVG);
return node.dom;
}
}
}
return null;
}
function pool(node) {
var bp = node.bp;
if (!isNullOrUndefined(bp)) {
var key = node.key;
var pools = bp.pools;
if (key === null) {
var _pool2 = pools.nonKeyed;
_pool2 && _pool2.push(node);
} else {
var _pool3 = pools.keyed;
(_pool3[key] || (_pool3[key] = [])).push(node);
}
return true;
}
return false;
}
function mount(input, parentDom, lifecycle, context, instance, isSVG) {
if (isArray(input)) {
return placeholder(input, parentDom);
}
if (isInvalidNode(input)) {
return null;
}
var bp = input.bp;
if (recyclingEnabled) {
var dom = recycle(input, bp, lifecycle, context, instance);
if (dom !== null) {
if (parentDom !== null) {
parentDom.appendChild(dom);
}
return dom;
}
}
if (bp === void 0) {
return appendNode(input, parentDom, lifecycle, context, instance, isSVG);
} else {
return appendNodeWithTemplate(input, bp, parentDom, lifecycle, context, instance);
}
}
function handleSelects(node) {
if (node.tag === 'select') {
selectValue(node);
}
}
function appendNodeWithTemplate(node, bp, parentDom, lifecycle, context, instance) {
var tag = node.tag;
if (bp.isComponent === true) {
return mountComponent(node, tag, node.attrs || {}, node.hooks, node.children, instance, parentDom, lifecycle, context);
}
var dom = documentCreateElement(bp.tag, bp.isSVG);
node.dom = dom;
if (bp.hasHooks === true) {
handleAttachedHooks(node.hooks, lifecycle, dom);
}
if (bp.lazy === true) {
handleLazyAttached(node, lifecycle, dom);
}
// bp.childrenType:
// 0: no children
// 1: text node
// 2: single child
// 3: multiple children
// 4: multiple children (keyed)
// 5: variable children (defaults to no optimisation)
switch (bp.childrenType) {
case 1:
appendText(node.children, dom, true);
break;
case 2:
mount(node.children, dom, lifecycle, context, instance);
break;
case 3:
mountArrayChildren(node, node.children, dom, lifecycle, context, instance);
break;
case 4:
mountArrayChildrenWithKeys(node.children, dom, lifecycle, context, instance);
break;
case 5:
mountChildren(node, node.children, dom, lifecycle, context, instance);
break;
default:
break;
}
if (bp.hasAttrs === true) {
handleSelects(node);
var attrs = node.attrs;
if (bp.attrKeys === null) {
var newKeys = Object.keys(attrs);
bp.attrKeys = bp.attrKeys ? bp.attrKeys.concat(newKeys) : newKeys;
}
var attrKeys = bp.attrKeys;
mountAttributes(attrs, attrKeys, dom, instance);
}
if (bp.hasClassName === true) {
dom.className = node.className;
}
if (bp.hasStyle === true) {
patchStyle(null, node.style, dom);
}
if (bp.hasEvents === true) {
var events = node.events;
if (bp.eventKeys === null) {
bp.eventKeys = Object.keys(events);
}
var eventKeys = bp.eventKeys;
mountEvents(events, eventKeys, dom);
}
if (parentDom !== null) {
parentDom.appendChild(dom);
}
return dom;
}
function appendNode(node, parentDom, lifecycle, context, instance, isSVG) {
var tag = node.tag;
if (tag === null) {
return placeholder(node, parentDom);
}
if (isFunction(tag)) {
return mountComponent(node, tag, node.attrs || {}, node.hooks, node.children, instance, parentDom, lifecycle, context);
}
if (!isString(tag) || tag === '') {
throw Error('Inferno Error: Expected function or string for element tag type');
}
if (tag === 'svg') {
isSVG = true;
}
var dom = documentCreateElement(tag, isSVG);
var children = node.children;
var attrs = node.attrs;
var events = node.events;
var hooks = node.hooks;
var className = node.className;
var style = node.style;
node.dom = dom;
if (!isNullOrUndefined(hooks)) {
handleAttachedHooks(hooks, lifecycle, dom);
}
if (!isInvalidNode(children)) {
mountChildren(node, children, dom, lifecycle, context, instance, isSVG);
}
if (!isNullOrUndefined(attrs)) {
handleSelects(node);
mountAttributes(attrs, Object.keys(attrs), dom, instance);
}
if (!isNullOrUndefined(className)) {
dom.className = className;
}
if (!isNullOrUndefined(style)) {
patchStyle(null, style, dom);
}
if (!isNullOrUndefined(events)) {
mountEvents(events, Object.keys(events), dom);
}
if (parentDom !== null) {
parentDom.appendChild(dom);
}
return dom;
}
function appendPromise(child, parentDom, domChildren, lifecycle, context, instance, isSVG) {
var placeholder = createEmptyTextNode();
domChildren && domChildren.push(placeholder);
child.then(function (node) {
// TODO check for text nodes and arrays
var dom = mount(node, null, lifecycle, context, instance, isSVG);
if (parentDom !== null && !isInvalidNode(dom)) {
parentDom.replaceChild(dom, placeholder);
}
domChildren && replaceInArray(domChildren, placeholder, dom);
});
parentDom.appendChild(placeholder);
}
function mountArrayChildrenWithKeys(children, parentDom, lifecycle, context, instance) {
for (var i = 0; i < children.length; i++) {
mount(children[i], parentDom, lifecycle, context, instance);
}
}
function mountArrayChildren(node, children, parentDom, lifecycle, context, instance, isSVG) {
var domChildren = null;
var isNonKeyed = false;
var hasKeyedAssumption = false;
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (isStringOrNumber(child)) {
isNonKeyed = true;
domChildren = domChildren || [];
domChildren.push(appendText(child, parentDom, false));
} else if (!isNullOrUndefined(child) && isArray(child)) {
var virtualFragment = createVirtualFragment();
isNonKeyed = true;
mountArrayChildren(node, child, virtualFragment, lifecycle, context, instance, isSVG);
insertOrAppendNonKeyed(parentDom, virtualFragment);
domChildren = domChildren || [];
domChildren.push(virtualFragment);
} else if (isPromise(child)) {
appendPromise(child, parentDom, domChildren, lifecycle, context, instance, isSVG);
} else {
var domNode = mount(child, parentDom, lifecycle, context, instance, isSVG);
if (isNonKeyed || !hasKeyedAssumption && !isNullOrUndefined(child) && isNullOrUndefined(child.key)) {
isNonKeyed = true;
domChildren = domChildren || [];
domChildren.push(domNode);
} else if (isInvalidNode(child)) {
isNonKeyed = true;
domChildren = domChildren || [];
domChildren.push(domNode);
} else if (hasKeyedAssumption === false) {
hasKeyedAssumption = true;
}
}
}
if (domChildren !== null && domChildren.length > 1 && isNonKeyed === true) {
node.domChildren = domChildren;
}
}
function mountChildren(node, children, parentDom, lifecycle, context, instance, isSVG) {
if (isArray(children)) {
mountArrayChildren(node, children, parentDom, lifecycle, context, instance, isSVG);
} else if (isStringOrNumber(children)) {
appendText(children, parentDom, true);
} else if (isPromise(children)) {
appendPromise(children, parentDom, null, lifecycle, context, instance, isSVG);
} else {
mount(children, parentDom, lifecycle, context, instance, isSVG);
}
}
function mountRef(instance, value, refValue) {
if (!isInvalidNode(instance) && isString(value)) {
instance.refs[value] = refValue;
}
}
function mountEvents(events, eventKeys, dom) {
for (var i = 0; i < eventKeys.length; i++) {
var event = eventKeys[i];
dom[event] = events[event];
}
}
function mountComponent(parentNode, Component, props, hooks, children, lastInstance, parentDom, lifecycle, context) {
props = addChildrenToProps(children, props);
var dom = void 0;
if (isStatefulComponent(Component)) {
var instance = new Component(props);
instance._patch = patch;
if (!isNullOrUndefined(lastInstance) && props.ref) {
mountRef(lastInstance, props.ref, instance);
}
var childContext = instance.getChildContext();
if (!isNullOrUndefined(childContext)) {
context = babelHelpers.extends({}, context, childContext);
}
instance.context = context;
instance._unmounted = false;
instance._pendingSetState = true;
instance.componentWillMount();
var node = instance.render();
instance._pendingSetState = false;
if (!isInvalidNode(node)) {
dom = mount(node, null, lifecycle, context, instance, false);
instance._lastNode = node;
if (parentDom !== null && !isInvalidNode(dom)) {
parentDom.appendChild(dom);
}
instance.componentDidMount();
}
parentNode.dom = dom;
parentNode.instance = instance;
} else {
if (!isNullOrUndefined(hooks)) {
if (!isNullOrUndefined(hooks.componentWillMount)) {
hooks.componentWillMount(null, props);
}
if (!isNullOrUndefined(hooks.componentDidMount)) {
lifecycle.addListener(function () {
hooks.componentDidMount(dom, props);
});
}
}
/* eslint new-cap: 0 */
var _node = Component(props);
dom = mount(_node, null, lifecycle, context, null);
parentNode.instance = _node;
if (parentDom !== null && !isInvalidNode(dom)) {
parentDom.appendChild(dom);
}
parentNode.dom = dom;
}
return dom;
}
function mountAttributes(attrs, attrKeys, dom, instance) {
for (var i = 0; i < attrKeys.length; i++) {
var attr = attrKeys[i];
if (attr === 'ref') {
mountRef(instance, attrs[attr], dom);
} else {
patchAttribute(attr, attrs[attr], dom);
}
}
}
function isVirtualFragment(obj) {

@@ -196,6 +514,9 @@ return !isNullOrUndefined(obj.append);

function appendText(text, parentDom, singleChild) {
if (parentDom !== null) {
if (parentDom === null) {
return document.createTextNode(text);
} else {
if (singleChild) {
if (text !== '') {
parentDom.textContent = text;
return parentDom.firstChild;
} else {

@@ -213,8 +534,6 @@ var textNode = document.createTextNode('');

}
} else {
return document.createTextNode(text);
}
}
function replaceWithNewNode(lastNode, nextNode, parentDom, namespace, lifecycle, context, instance, isSVG) {
function replaceWithNewNode(lastNode, nextNode, parentDom, lifecycle, context, instance, isSVG) {
var lastInstance = null;

@@ -227,3 +546,3 @@ var instanceLastNode = lastNode._lastNode;

}
var dom = mount(nextNode, null, namespace, lifecycle, context, instance, isSVG);
var dom = mount(nextNode, null, lifecycle, context, instance, isSVG);

@@ -420,4 +739,4 @@ nextNode.dom = dom;

function isKeyed(lastChildren, nextChildren) {
return nextChildren.length && !isNullOrUndefined(nextChildren[0]) && !isNullOrUndefined(nextChildren[0].key) && !isNullOrUndefined(nextChildren[1]) && !isNullOrUndefined(nextChildren[1].key);
function isKeyed(nextChildren) {
return nextChildren.length && !isNullOrUndefined(nextChildren[0]) && !isNullOrUndefined(nextChildren[0].key);
}

@@ -487,17 +806,21 @@

function handleLazyAttached(node, lifecycle, dom) {
lifecycle.addListener(function () {
var rect = dom.getBoundingClientRect();
function setValueProperty(nextNode) {
var value = nextNode.attrs.value;
if (!isNullOrUndefined(value)) {
nextNode.dom.value = value;
}
}
if (lifecycle.scrollY === null) {
lifecycle.refresh();
function setFormElementProperties(nextTag, nextNode) {
if (nextTag === 'input') {
var inputType = nextNode.attrs.type;
if (inputType === 'text') {
setValueProperty(nextNode);
} else if (inputType === 'checkbox' || inputType === 'radio') {
var checked = nextNode.attrs.checked;
nextNode.dom.checked = !!checked;
}
node.clipData = {
top: rect.top + lifecycle.scrollY,
left: rect.left + lifecycle.scrollX,
bottom: rect.bottom + lifecycle.scrollY,
right: rect.right + lifecycle.scrollX,
pending: false
};
});
} else if (nextTag === 'textarea') {
setValueProperty(nextNode);
}
}

@@ -537,3 +860,3 @@

} else {
if (isKeyed(lastChildren, nextChildren)) {
if (isKeyed(nextChildren)) {
patchKeyedChildren(lastChildren, nextChildren, dom, lifecycle, context, instance, isSVG);

@@ -635,39 +958,2 @@ } else {

var lazyNodeMap = new Map();
var lazyCheckRunning = false;
function patchLazyNode(value) {
patchNode(value.lastNode, value.nextNode, value.parentDom, value.lifecycle, null, null, false, true);
value.clipData.pending = false;
}
function runPatchLazyNodes() {
lazyCheckRunning = true;
if (typeof requestIdleCallback !== 'undefined') {
requestIdleCallback(patchLazyNodes);
} else {
setTimeout(patchLazyNodes, 100);
}
}
function patchLazyNodes() {
lazyNodeMap.forEach(patchLazyNode);
lazyNodeMap.clear();
lazyCheckRunning = false;
}
function setClipNode(clipData, dom, lastNode, nextNode, parentDom, lifecycle) {
var lazyNodeEntry = lazyNodeMap.get(dom);
if (lazyNodeEntry === void 0) {
lazyNodeMap.set(dom, { lastNode: lastNode, nextNode: nextNode, parentDom: parentDom, clipData: clipData, lifecycle: lifecycle });
} else {
lazyNodeEntry.nextNode = nextNode;
}
clipData.pending = true;
if (lazyCheckRunning === false) {
runPatchLazyNodes();
}
}
function diffNodesWithTemplate(lastNode, nextNode, lastBp, nextBp, parentDom, lifecycle, context, instance, skipLazyCheck) {

@@ -686,3 +972,3 @@ var nextHooks = void 0;

if (lastTag !== nextTag) {
if (lastNode.bp.isComponent === true) {
if (lastBp.isComponent === true) {
var lastNodeInstance = lastNode.instance;

@@ -694,8 +980,8 @@

} else if (isStatefulComponent(lastTag)) {
diffNodes(lastNodeInstance._lastNode, nextNode, parentDom, lifecycle, context, instance, true);
diffNodes(lastNodeInstance._lastNode, nextNode, parentDom, lifecycle, context, instance, nextBp.isSVG);
} else {
diffNodes(lastNodeInstance, nextNode, parentDom, lifecycle, context, instance, true);
diffNodes(lastNodeInstance, nextNode, parentDom, lifecycle, context, instance, nextBp.isSVG);
}
} else {
replaceWithNewNode(lastNode, nextNode, parentDom, lifecycle, context, instance, false);
replaceWithNewNode(lastNode, nextNode, parentDom, lifecycle, context, instance, nextBp.isSVG);
}

@@ -707,5 +993,14 @@ } else if (isNullOrUndefined(lastTag)) {

if (nextBp.isComponent === true) {
nextNode.instance = lastNode.instance;
nextNode.dom = lastNode.dom;
patchComponent(true, nextNode, nextNode.tag, lastBp, nextBp, nextNode.instance, lastNode.attrs || {}, nextNode.attrs || {}, nextNode.hooks, nextNode.children, parentDom, lifecycle, context);
var _instance = lastNode.instance;
if (!isNullOrUndefined(_instance) && _instance._unmounted) {
var newDom = mountComponent(nextNode, lastTag, nextNode.attrs || {}, nextNode.hooks, nextNode.children, _instance, parentDom, lifecycle, context);
if (parentDom !== null) {
replaceNode(parentDom, newDom, lastNode.dom);
}
} else {
nextNode.instance = _instance;
nextNode.dom = lastNode.dom;
patchComponent(true, nextNode, nextNode.tag, lastBp, nextBp, _instance, lastNode.attrs || {}, nextNode.attrs || {}, nextNode.hooks, nextNode.children, parentDom, lifecycle, context);
}
}

@@ -727,8 +1022,10 @@ } else {

if (clipData.pending === true || clipData.top - lifecycle.scrollY > lifecycle.screenHeight) {
setClipNode(clipData, dom, lastNode, nextNode, parentDom, lifecycle);
return;
if (setClipNode(clipData, dom, lastNode, nextNode, parentDom, lifecycle)) {
return;
}
}
if (clipData.bottom < lifecycle.scrollY) {
setClipNode(clipData, dom, lastNode, nextNode, parentDom, lifecycle);
return;
if (setClipNode(clipData, dom, lastNode, nextNode, parentDom, lifecycle)) {
return;
}
}

@@ -798,2 +1095,3 @@ }

}
setFormElementProperties(nextTag, nextNode);
}

@@ -815,4 +1113,4 @@ }

}
var nextTag = nextNode.tag || (!isNullOrUndefined(nextNode.bp) ? nextNode.bp.tag : null);
var lastTag = lastNode.tag || (!isNullOrUndefined(lastNode.bp) ? lastNode.bp.tag : null);
var nextTag = nextNode.tag || (isNullOrUndefined(nextNode.bp) ? null : nextNode.bp.tag);
var lastTag = lastNode.tag || (isNullOrUndefined(lastNode.bp) ? null : lastNode.bp.tag);

@@ -830,5 +1128,5 @@ if (nextTag === 'svg') {

} else if (isStatefulComponent(lastTag)) {
diffNodes(lastNodeInstance._lastNode, nextNode, parentDom, lifecycle, context, instance, true, isSVG);
diffNodes(lastNodeInstance._lastNode, nextNode, parentDom, lifecycle, context, instance, isSVG);
} else {
diffNodes(lastNodeInstance, nextNode, parentDom, lifecycle, context, instance, true, isSVG);
diffNodes(lastNodeInstance, nextNode, parentDom, lifecycle, context, instance, isSVG);
}

@@ -843,5 +1141,14 @@ } else {

if (isFunction(nextTag)) {
nextNode.instance = lastNode.instance;
nextNode.dom = lastNode.dom;
patchComponent(false, nextNode, nextNode.tag, null, null, nextNode.instance, lastNode.attrs || {}, nextNode.attrs || {}, nextNode.hooks, nextNode.children, parentDom, lifecycle, context);
var _instance2 = lastNode._instance;
if (!isNullOrUndefined(_instance2) && _instance2._unmounted) {
var newDom = mountComponent(nextNode, lastTag, nextNode.attrs || {}, nextNode.hooks, nextNode.children, _instance2, parentDom, lifecycle, context);
if (parentDom !== null) {
replaceNode(parentDom, newDom, lastNode.dom);
}
} else {
nextNode.instance = lastNode.instance;
nextNode.dom = lastNode.dom;
patchComponent(false, nextNode, nextNode.tag, null, null, nextNode.instance, lastNode.attrs || {}, nextNode.attrs || {}, nextNode.hooks, nextNode.children, parentDom, lifecycle, context);
}
}

@@ -872,2 +1179,3 @@ } else {

}
setFormElementProperties(nextTag, nextNode);
}

@@ -878,14 +1186,7 @@ }

// Checks if property is boolean type
function booleanProps(prop) {
switch (prop.length) {
case 5:
return prop === 'value';
case 7:
return prop === 'checked';
case 8:
return prop === 'disabled' || prop === 'selected';
default:
return false;
}
function constructDefaults(string, object, value) {
/* eslint no-return-assign: 0 */
string.split(',').forEach(function (i) {
return object[i] = value;
});
}

@@ -895,15 +1196,10 @@

var xmlNS = 'http://www.w3.org/XML/1998/namespace';
var strictProps = {};
var booleanProps = {};
var namespaces = {};
var namespaces = {
'xlink:href': xlinkNS,
'xlink:arcrole': xlinkNS,
'xlink:actuate': xlinkNS,
'xlink:role': xlinkNS,
'xlink:row': xlinkNS,
'xlink:titlef': xlinkNS,
'xlink:type': xlinkNS,
'xml:base': xmlNS,
'xml:lang': xmlNS,
'xml:space': xmlNS
};
constructDefaults('xlink:href,xlink:arcrole,xlink:actuate,xlink:role,xlink:titlef,xlink:type', namespaces, xlinkNS);
constructDefaults('xml:base,xml:lang,xml:space', namespaces, xmlNS);
constructDefaults('volume,value', strictProps, true);
constructDefaults('muted,scoped,loop,open,checked,default,capture,disabled,selected,readonly,multiple,required,autoplay,controls,seamless,reversed,allowfullscreen,novalidate', booleanProps, true);

@@ -929,22 +1225,22 @@ function updateTextNode(dom, lastChildren, nextChildren) {

function patch(lastNode, nextNode, parentDom, lifecycle, context, instance, isNode, isSVG) {
function patch(lastInput, nextInput, parentDom, lifecycle, context, instance, isNode, isSVG) {
if (isNode !== null) {
patchNode(lastNode, nextNode, parentDom, lifecycle, context, instance, isSVG, false);
} else if (isInvalidNode(lastNode)) {
mount(nextNode, parentDom, lifecycle, context, instance, isSVG);
} else if (isInvalidNode(nextNode)) {
remove(lastNode, parentDom);
} else if (isStringOrNumber(lastNode)) {
if (isStringOrNumber(nextNode)) {
parentDom.firstChild.nodeValue = nextNode;
patchNode(lastInput, nextInput, parentDom, lifecycle, context, instance, isSVG, false);
} else if (isInvalidNode(lastInput)) {
mount(nextInput, parentDom, lifecycle, context, instance, isSVG);
} else if (isInvalidNode(nextInput)) {
remove(lastInput, parentDom);
} else if (isStringOrNumber(lastInput)) {
if (isStringOrNumber(nextInput)) {
parentDom.firstChild.nodeValue = nextInput;
} else {
var dom = mount(nextNode, null, lifecycle, context, instance, isSVG);
nextNode.dom = dom;
var dom = mount(nextInput, null, lifecycle, context, instance, isSVG);
nextInput.dom = dom;
replaceNode(parentDom, dom, parentDom.firstChild);
}
} else if (isStringOrNumber(nextNode)) {
var textNode = document.createTextNode(nextNode);
replaceNode(parentDom, textNode, lastNode.dom);
} else if (isStringOrNumber(nextInput)) {
var textNode = document.createTextNode(nextInput);
replaceNode(parentDom, textNode, lastInput.dom);
} else {
patchNode(lastNode, nextNode, parentDom, lifecycle, context, instance, isSVG, false);
patchNode(lastInput, nextInput, parentDom, lifecycle, context, instance, isSVG, false);
}

@@ -1013,17 +1309,22 @@ }

function patchAttribute(attrName, nextAttrValue, dom) {
if (booleanProps(attrName)) {
// We need to manually handle null 'value' for IE and Edge
if (attrName === 'value') {
dom.value = nextAttrValue === null ? '' : nextAttrValue;
} else {
dom[attrName] = nextAttrValue;
}
if (strictProps[attrName]) {
dom[attrName] = nextAttrValue === null ? '' : nextAttrValue;
} else {
if (nextAttrValue === false || isNullOrUndefined(nextAttrValue)) {
dom.removeAttribute(attrName);
if (booleanProps[attrName]) {
dom[attrName] = nextAttrValue ? true : false;
} else {
if (namespaces[attrName]) {
dom.setAttributeNS(namespaces[attrName], attrName, nextAttrValue === true ? attrName : nextAttrValue);
var ns = namespaces[attrName];
if (nextAttrValue === false || isNullOrUndefined(nextAttrValue)) {
if (ns !== void 0) {
dom.removeAttributeNS(ns, attrName);
} else {
dom.removeAttribute(attrName);
}
} else {
dom.setAttribute(attrName, nextAttrValue === true ? attrName : nextAttrValue);
if (ns !== void 0) {
dom.setAttributeNS(ns, attrName, nextAttrValue === true ? attrName : nextAttrValue);
} else {
dom.setAttribute(attrName, nextAttrValue === true ? attrName : nextAttrValue);
}
}

@@ -1050,3 +1351,3 @@ }

if (!isInvalidNode(nextNode)) {
patch(lastNode, nextNode, parentDom, lifecycle, context, instance, false, false);
patch(instance._lastNode, nextNode, parentDom, lifecycle, context, instance, null, false);
lastNode.dom = nextNode.dom;

@@ -1073,3 +1374,3 @@ instance._lastNode = nextNode;

_nextNode.dom = dom;
patch(instance, _nextNode, dom, lifecycle, context, null, false, false);
patch(instance, _nextNode, parentDom, lifecycle, context, null, null, false);
lastNode.instance = _nextNode;

@@ -1117,3 +1418,5 @@ if (nextHooksDefined && !isNullOrUndefined(nextHooks.componentDidUpdate)) {

insertOrAppendNonKeyed(dom, domNode);
if (!isInvalidNode(domNode)) {
insertOrAppendNonKeyed(dom, domNode);
}
if (isNotVirtualFragment) {

@@ -1161,6 +1464,3 @@ if (lastChildrenLength === 1) {

if (!isNullOrUndefined(domChild)) {
insertOrAppendNonKeyed(dom, textNode, domChild);
isNotVirtualFragment && domChildren.splice(index, 0, textNode);
} else {
if (isNullOrUndefined(domChild)) {
// TODO move to next node if need be

@@ -1170,11 +1470,11 @@ var _nextChild2 = domChildren[index + 1];

isNotVirtualFragment && domChildren.splice(index, 1, textNode);
} else {
insertOrAppendNonKeyed(dom, textNode, domChild);
isNotVirtualFragment && domChildren.splice(index, 0, textNode);
}
} else if (sameLength === true) {
} else {
var _domNode = mount(_nextChild, null, lifecycle, context, instance, isSVG);
var _domChild = domChildren[index];
if (!isNullOrUndefined(_domChild)) {
insertOrAppendNonKeyed(dom, _domNode, _domChild);
isNotVirtualFragment && domChildren.splice(index, 0, _domNode);
} else {
if (isNullOrUndefined(_domChild)) {
// TODO move to next node if need be

@@ -1184,2 +1484,5 @@ var _nextChild3 = domChildren[index + 1];

isNotVirtualFragment && domChildren.splice(index, 1, _domNode);
} else {
insertOrAppendNonKeyed(dom, _domNode, _domChild);
isNotVirtualFragment && domChildren.splice(index, 0, _domNode);
}

@@ -1190,6 +1493,6 @@ }

if (isStringOrNumber(_lastChild)) {
if (dom.getElementsByTagName !== void 0) {
if (dom.getElementsByTagName === void 0) {
dom.nodeValue = _nextChild;
} else {
dom.firstChild.nodeValue = _nextChild;
} else {
dom.nodeValue = _nextChild;
}

@@ -1225,3 +1528,3 @@ } else {

} else if (isArray(_nextChild)) {
if (isKeyed(_lastChild, _nextChild)) {
if (isKeyed(_nextChild)) {
patchKeyedChildren(_lastChild, _nextChild, domChildren[index], lifecycle, context, instance, isSVG);

@@ -1506,362 +1809,101 @@ } else {

var recyclingEnabled = true;
var screenWidth = window.screen.width;
var screenHeight = window.screen.height;
var scrollX = 0;
var scrollY = 0;
var lastScrollTime = 0;
function recycle(node, bp, lifecycle, context, instance) {
if (bp !== void 0) {
var key = node.key;
var _pool = key === null ? bp.pools.nonKeyed : bp.pools.keyed[key];
if (!isNullOrUndefined(_pool)) {
var recycledNode = _pool.pop();
if (!isNullOrUndefined(recycledNode)) {
patch(recycledNode, node, null, null, lifecycle, context, instance, true);
return node.dom;
}
}
}
return null;
}
window.onscroll = function (e) {
scrollX = window.scrollX;
scrollY = window.scrollY;
lastScrollTime = performance.now();
};
function pool(node) {
var bp = node.bp;
window.resize = function (e) {
scrollX = window.scrollX;
scrollY = window.scrollY;
screenWidth = window.screen.width;
screenHeight = window.screen.height;
lastScrollTime = performance.now();
};
if (!isNullOrUndefined(bp)) {
var key = node.key;
var pools = bp.pools;
if (key === null) {
var _pool2 = pools.nonKeyed;
_pool2 && _pool2.push(node);
} else {
var _pool3 = pools.keyed;
(_pool3[key] || (_pool3[key] = [])).push(node);
}
return true;
}
return false;
function Lifecycle() {
this._listeners = [];
this.scrollX = null;
this.scrollY = null;
this.screenHeight = screenHeight;
this.screenWidth = screenWidth;
}
function mount(node, parentDom, lifecycle, context, instance, isSVG) {
if (isArray(node)) {
return placeholder(node, parentDom);
}
if (isInvalidNode(node)) {
return null;
}
var bp = node.bp;
if (recyclingEnabled) {
var dom = recycle(node, bp, lifecycle, context, instance);
if (dom !== null) {
if (parentDom !== null) {
parentDom.appendChild(dom);
}
return dom;
Lifecycle.prototype = {
refresh: function refresh() {
this.scrollX = window.scrollX;
this.scrollY = window.scrollY;
},
addListener: function addListener(callback) {
this._listeners.push(callback);
},
trigger: function trigger() {
for (var i = 0; i < this._listeners.length; i++) {
this._listeners[i]();
}
}
};
if (bp === void 0) {
return appendNode(node, parentDom, lifecycle, context, instance, isSVG);
} else {
return appendNodeWithTemplate(node, bp, parentDom, lifecycle, context, instance);
}
}
function handleSelects(node) {
if (node.tag === 'select') {
selectValue(node);
}
}
var lazyNodeMap = new Map();
var lazyCheckRunning = false;
function appendNodeWithTemplate(node, bp, parentDom, lifecycle, context, instance) {
var tag = node.tag;
function handleLazyAttached(node, lifecycle, dom) {
lifecycle.addListener(function () {
var rect = dom.getBoundingClientRect();
if (bp.isComponent === true) {
return mountComponent(node, tag, node.attrs || {}, node.hooks, node.children, parentDom, lifecycle, context);
}
var dom = documentCreateElement(bp.tag, bp.isSVG);
node.dom = dom;
if (bp.hasHooks === true) {
handleAttachedHooks(node.hooks, lifecycle, dom);
}
if (bp.lazy === true) {
handleLazyAttached(node, lifecycle, dom);
}
// bp.childrenType:
// 0: no children
// 1: text node
// 2: single child
// 3: multiple children
// 4: multiple children (keyed)
// 5: variable children (defaults to no optimisation)
switch (bp.childrenType) {
case 1:
appendText(node.children, dom, true);
break;
case 2:
mount(node.children, dom, lifecycle, context, instance);
break;
case 3:
mountArrayChildren(node, node.children, dom, lifecycle, context, instance);
break;
case 4:
mountArrayChildrenWithKeys(node.children, dom, lifecycle, context, instance);
break;
case 5:
mountChildren(node, node.children, dom, lifecycle, context, instance);
break;
default:
break;
}
if (bp.hasAttrs === true) {
handleSelects(node);
var attrs = node.attrs;
if (bp.attrKeys === null) {
var newKeys = Object.keys(attrs);
bp.attrKeys = bp.attrKeys ? bp.attrKeys.concat(newKeys) : newKeys;
if (lifecycle.scrollY === null) {
lifecycle.refresh();
}
var attrKeys = bp.attrKeys;
mountAttributes(attrs, attrKeys, dom, instance);
}
if (bp.hasClassName === true) {
dom.className = node.className;
}
if (bp.hasStyle === true) {
patchStyle(null, node.style, dom);
}
if (bp.hasEvents === true) {
var events = node.events;
if (bp.eventKeys === null) {
bp.eventKeys = Object.keys(events);
}
var eventKeys = bp.eventKeys;
mountEvents(events, eventKeys, dom);
}
if (parentDom !== null) {
parentDom.appendChild(dom);
}
return dom;
node.clipData = {
top: rect.top + lifecycle.scrollY,
left: rect.left + lifecycle.scrollX,
bottom: rect.bottom + lifecycle.scrollY,
right: rect.right + lifecycle.scrollX,
pending: false
};
});
}
function appendNode(node, parentDom, lifecycle, context, instance, isSVG) {
var tag = node.tag;
if (tag === null) {
return placeholder(node, parentDom);
}
if (isFunction(tag)) {
return mountComponent(node, tag, node.attrs || {}, node.hooks, node.children, parentDom, lifecycle, context);
}
if (!isString(tag) || tag === '') {
throw Error('Inferno Error: Expected function or string for element tag type');
}
if (tag === 'svg') {
isSVG = true;
}
var dom = documentCreateElement(tag, isSVG);
var children = node.children;
var attrs = node.attrs;
var events = node.events;
var hooks = node.hooks;
var className = node.className;
var style = node.style;
node.dom = dom;
if (!isNullOrUndefined(hooks)) {
handleAttachedHooks(hooks, lifecycle, dom);
}
if (!isInvalidNode(children)) {
mountChildren(node, children, dom, lifecycle, context, instance, isSVG);
}
if (!isNullOrUndefined(attrs)) {
handleSelects(node);
mountAttributes(attrs, Object.keys(attrs), dom, instance);
}
if (!isNullOrUndefined(className)) {
dom.className = className;
}
if (!isNullOrUndefined(style)) {
patchStyle(null, style, dom);
}
if (!isNullOrUndefined(events)) {
mountEvents(events, Object.keys(events), dom);
}
if (parentDom !== null) {
parentDom.appendChild(dom);
}
return dom;
function patchLazyNode(value) {
patchNode(value.lastNode, value.nextNode, value.parentDom, value.lifecycle, null, null, false, true);
value.clipData.pending = false;
}
function appendPromise(child, parentDom, domChildren, lifecycle, context, instance, isSVG) {
var placeholder = createEmptyTextNode();
domChildren && domChildren.push(placeholder);
child.then(function (node) {
// TODO check for text nodes and arrays
var dom = mount(node, null, lifecycle, context, instance, isSVG);
parentDom.replaceChild(dom, placeholder);
domChildren && replaceInArray(domChildren, placeholder, dom);
});
parentDom.appendChild(placeholder);
function runPatchLazyNodes() {
lazyCheckRunning = true;
setTimeout(patchLazyNodes, 100);
}
function mountArrayChildrenWithKeys(children, parentDom, lifecycle, context, instance) {
for (var i = 0; i < children.length; i++) {
mount(children[i], parentDom, lifecycle, context, instance);
}
function patchLazyNodes() {
lazyNodeMap.forEach(patchLazyNode);
lazyNodeMap.clear();
lazyCheckRunning = false;
}
function mountArrayChildren(node, children, parentDom, lifecycle, context, instance, isSVG) {
var domChildren = null;
var isNonKeyed = false;
var hasKeyedAssumption = false;
function setClipNode(clipData, dom, lastNode, nextNode, parentDom, lifecycle) {
if (performance.now() > lastScrollTime + 2000) {
var lazyNodeEntry = lazyNodeMap.get(dom);
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (isStringOrNumber(child)) {
isNonKeyed = true;
domChildren = domChildren || [];
domChildren.push(appendText(child, parentDom, false));
} else if (!isNullOrUndefined(child) && isArray(child)) {
var virtualFragment = createVirtualFragment();
isNonKeyed = true;
mountArrayChildren(node, child, virtualFragment, lifecycle, context, instance, isSVG);
insertOrAppendNonKeyed(parentDom, virtualFragment);
domChildren = domChildren || [];
domChildren.push(virtualFragment);
} else if (isPromise(child)) {
appendPromise(child, parentDom, domChildren, lifecycle, context, instance, isSVG);
if (lazyNodeEntry === void 0) {
lazyNodeMap.set(dom, { lastNode: lastNode, nextNode: nextNode, parentDom: parentDom, clipData: clipData, lifecycle: lifecycle });
} else {
var domNode = mount(child, parentDom, lifecycle, context, instance, isSVG);
if (isNonKeyed || !hasKeyedAssumption && child && isNullOrUndefined(child.key)) {
isNonKeyed = true;
domChildren = domChildren || [];
domChildren.push(domNode);
} else if (isInvalidNode(child)) {
isNonKeyed = true;
domChildren = domChildren || [];
domChildren.push(domNode);
} else if (hasKeyedAssumption === false) {
hasKeyedAssumption = true;
}
lazyNodeEntry.nextNode = nextNode;
}
}
if (domChildren !== null && domChildren.length > 1 && isNonKeyed === true) {
node.domChildren = domChildren;
}
}
function mountChildren(node, children, parentDom, lifecycle, context, instance, isSVG) {
if (isArray(children)) {
mountArrayChildren(node, children, parentDom, lifecycle, context, instance, isSVG);
} else if (isStringOrNumber(children)) {
appendText(children, parentDom, true);
} else if (isPromise(children)) {
appendPromise(children, parentDom, null, lifecycle, context, instance, isSVG);
} else {
mount(children, parentDom, lifecycle, context, instance, isSVG);
}
}
function mountRef(instance, value, dom) {
if (!isInvalidNode(instance) && isString(value)) {
instance.refs[value] = dom;
}
}
function mountEvents(events, eventKeys, dom) {
for (var i = 0; i < eventKeys.length; i++) {
var event = eventKeys[i];
dom[event] = events[event];
}
}
function mountComponent(parentNode, Component, props, hooks, children, parentDom, lifecycle, context) {
props = addChildrenToProps(children, props);
var dom = void 0;
if (isStatefulComponent(Component)) {
var instance = new Component(props);
instance._patch = patch;
var childContext = instance.getChildContext();
if (!isNullOrUndefined(childContext)) {
context = babelHelpers.extends({}, context, childContext);
clipData.pending = true;
if (lazyCheckRunning === false) {
runPatchLazyNodes();
}
instance.context = context;
// Block setting state - we should render only once, using latest state
instance._pendingSetState = true;
instance.componentWillMount();
var shouldUpdate = instance.shouldComponentUpdate();
if (shouldUpdate) {
instance.componentWillUpdate();
var pendingState = instance._pendingState;
var oldState = instance.state;
instance.state = babelHelpers.extends({}, oldState, pendingState);
}
var node = instance.render();
instance._pendingSetState = false;
if (!isNullOrUndefined(node)) {
dom = mount(node, null, lifecycle, context, instance);
instance._lastNode = node;
if (parentDom !== null) {
parentDom.appendChild(dom);
}
instance.componentDidMount();
instance.componentDidUpdate();
}
parentNode.dom = dom;
parentNode.instance = instance;
return true;
} else {
if (!isNullOrUndefined(hooks)) {
if (!isNullOrUndefined(hooks.componentWillMount)) {
hooks.componentWillMount(null, props);
}
if (!isNullOrUndefined(hooks.componentDidMount)) {
lifecycle.addListener(function () {
hooks.componentDidMount(dom, props);
});
}
}
/* eslint new-cap: 0 */
var _node = Component(props);
dom = mount(_node, null, lifecycle, context, null);
parentNode.instance = _node;
if (parentDom !== null) {
parentDom.appendChild(dom);
}
parentNode.dom = dom;
patchLazyNodes();
}
return dom;
return false;
}
function mountAttributes(attrs, attrKeys, dom, instance) {
for (var i = 0; i < attrKeys.length; i++) {
var attr = attrKeys[i];
if (attr === 'ref') {
mountRef(instance, attrs[attr], dom);
} else {
patchAttribute(attr, attrs[attr], dom);
}
}
}
var roots = [];

@@ -1868,0 +1910,0 @@

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

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.InfernoDOM=n()}(this,function(){"use strict";function e(){this._listeners=[],this.scrollX=null,this.scrollY=null,this.screenHeight=Ce,this.screenWidth=ye}function n(e,n){if(!o(e)){var l=t(e);(l&&e.length>0||!l)&&(n?n.children=e:n={children:e})}return n}function t(e){return e instanceof Array}function l(e){return void 0!==e.prototype.render}function r(e){return"string"==typeof e||"number"==typeof e}function o(e){return void 0===e||null===e}function i(e){return void 0===e||null===e||e===!1}function a(e){return"function"==typeof e}function s(e){return"string"==typeof e}function d(e){return e instanceof Promise}function c(e,n,t){e.splice(e.indexOf(n),1,t)}function u(e){return!o(e.append)}function f(e,n,t){o(t)?u(n)?n.append(e):e.appendChild(n):u(n)?n.insert(e,t):u(t)?e.insertBefore(n,t.childNodes[0]||t.dom):e.insertBefore(n,t)}function h(e,n,t){o(t)?e.appendChild(n):e.insertBefore(n,t)}function v(e,n){var t=void 0;return t=n===!0?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}function p(e,n,t){if(null===n)return document.createTextNode(e);if(!t){var l=document.createTextNode(e);return n.appendChild(l),l}if(""===e){var r=document.createTextNode("");return n.appendChild(r),r}n.textContent=e}function m(e,n,t,l,r,i,a,s){var d=null,c=e._lastNode;o(c)||(d=e,e=c);var u=te(n,null,l,r,i,a,s);n.dom=u,g(t,u,e.dom),null!==d&&(d._lastNode=n),y(e)}function g(e,n,t){u(t)?t.replaceWith(n):e.replaceChild(n,t)}function y(e){if(!i(e)&&!r(e)){var n=e.instance,l=null,a=null;o(n)||(l=n.hooks,a=n.children,void 0!==n.render&&(n.componentWillUnmount(),n._unmounted=!0));var s=e.hooks||l;o(s)||(o(s.willDetach)||s.willDetach(e.dom),o(s.componentWillUnmount)||s.componentWillUnmount(e.dom,s));var d=e.children||a;if(!o(d))if(t(d))for(var c=0;c<d.length;c++)y(d[c]);else y(d)}}function C(){return document.createTextNode("")}function k(e,n){var t=e.dom;t===n?t.innerHTML="":(n.removeChild(t),je&&ne(e)),y(e)}function w(e,n,t){for(var l=n||Object.keys(e),r=0;r<l.length;r++){var o=l[r];t[o]=null}}function b(e,n,t){for(var l=0;l<n.length;l++)e.insertBefore(n[l],t)}function N(){return document.activeElement}function x(e,n){if(je){var t=n.length;if(t>5)for(var l=0;t>l;l++){var r=n[l];i(r)||ne(r)}}e.textContent=""}function O(e){e!==document.body&&document.activeElement!==e&&e.focus()}function U(){var e=[],n=document.createTextNode(""),t=null,l={dom:n,childNodes:e,appendChild:function(l){e.push(l),t&&t.insertBefore(l,n)},removeChild:function(n){t&&t.removeChild(n),e.splice(e.indexOf(n),1)},insertBefore:function(n,l){t&&t.insertBefore(n,l),e.splice(e.indexOf(l),0,n)},replaceChild:function(n,l){t.replaceChild(n,l),c(e,l,n)},append:function(l){l.appendChild(n),t=l,b(t,e,n)},insert:function(l,r){l.insertBefore(n,r),t=l,b(t,e,n)},remove:function(){t.removeChild(n);for(var l=0;l<e.length;l++)t.removeChild(e[l]);t=null},replaceWith:function(l){t.replaceChild(l,n);for(var r=0;r<e.length;r++)t.removeChild(e[r]);t=null},getElementsByTagName:null};return Object.defineProperty(l,"parentNode",{get:function(){return t}}),Object.defineProperty(l,"firstChild",{get:function(){return e[0]}}),l}function j(e,n){return n.length&&!o(n[0])&&!o(n[0].key)&&!o(n[1])&&!o(n[1].key)}function T(e,n){if("option"===e.tag){var t=e.attrs&&e.attrs.value;n[t]?(e.attrs=e.attrs||{},e.attrs.selected="selected",e.dom.selected=!0):e.dom.selected=!1}else for(var l=0,r=e.children.length;r>l;l++)T(e.children[l],n)}function S(e){var n=e.attrs&&e.attrs.value,l={};if(t(n))for(var r=0,o=n.length;o>r;r++)l[n[r]]=n[r];else l[n]=n;for(var i=0,a=e.children.length;a>i;i++)T(e.children[i],l);e.attrs&&e.attrs[n]&&delete e.attrs.value}function D(e,n){var t=C();return null!==n&&n.appendChild(t),i(e)||(e.dom=t),t}function _(e,n,t){o(e.created)||e.created(t),o(e.attached)||n.addListener(function(){e.attached(t)})}function E(e,n,t){n.addListener(function(){var l=t.getBoundingClientRect();null===n.scrollY&&n.refresh(),e.clipData={top:l.top+n.scrollY,left:l.left+n.scrollX,bottom:l.bottom+n.scrollY,right:l.right+n.scrollX,pending:!1}})}function K(e,n,l,a,s,d,c){var u=n.children,f=e.children;if(f!==u){var h=null;e.domChildren&&(h=n.domChildren=e.domChildren),i(f)?r(u)?I(l,f,u):o(u)||(t(u)?se(n,u,l,a,s,d,c):te(u,l,a,s,d,c)):i(u)?x(l,f):t(f)?t(u)?null===h&&f.length>1?Z(f,u,l,a,s,d,c):j(f,u)?Z(f,u,l,a,s,d,c):Q(f,u,l,h||(n.domChildren=[]),a,s,d,0,c):Q(f,[u],l,h||[],a,s,d,0):t(u)?Q([f],u,l,h||(n.domChildren=[l.firstChild]),a,s,d,0,c):r(u)?I(l,f,u):r(f)?q(f,u,l,a,s,d,null,c):q(f,u,l,a,s,d,!0,c)}}function A(e,n,t,l){e&&(s(n)&&delete e.refs[n],s(t)&&(e.refs[t]=l))}function W(e,n,t,l,r){var i=n.events,a=e.events,s=!o(i),d=!o(a);s?d?R(a,i,t,l,r):ue(i,l,r):d&&w(a,t,r)}function B(e,n,t,l,r,i){"select"===e.tag&&S(n);var a=n.attrs,s=e.attrs,d=o(a),c=!o(s);if(!d)for(var u=l||Object.keys(a),f=u.length,h=0;f>h;h++){var v=u[h],p=c&&s[v],m=a[v];p!==m&&("ref"===v?A(i,p,m,r):F(v,m,r))}if(c)for(var g=t||Object.keys(s),y=g.length,C=0;y>C;C++){var k=g[C];(d||o(a[k]))&&("ref"===k?A(i,s[k],null,r):r.removeAttribute(k))}}function M(e){z(e.lastNode,e.nextNode,e.parentDom,e.lifecycle,null,null,!1,!0),e.clipData.pending=!1}function Y(){Ne=!0,"undefined"!=typeof requestIdleCallback?requestIdleCallback(V):setTimeout(V,100)}function V(){be.forEach(M),be.clear(),Ne=!1}function X(e,n,t,l,r,o){var i=be.get(n);void 0===i?be.set(n,{lastNode:t,nextNode:l,parentDom:r,clipData:e,lifecycle:o}):i.nextNode=l,e.pending=!0,Ne===!1&&Y()}function H(e,n,t,r,a,s,d,c,u){var f=void 0;n.hasHooks===!0&&(f=n.hooks&&!o(f.willUpdate))&&f.willUpdate(e.dom);var h=n.tag||r.tag,v=e.tag||t.tag;if(v!==h)if(e.bp.isComponent===!0){var p=e.instance;r.isComponent===!0?(m(p||e,n,a,s,d,c,!1),y(e)):l(v)?L(p._lastNode,n,a,s,d,c,!0):L(p,n,a,s,d,c,!0)}else m(e,n,a,s,d,c,!1);else if(o(v))n.dom=e.dom;else if(t.isComponent===!0)r.isComponent===!0&&(n.instance=e.instance,n.dom=e.dom,J(!0,n,n.tag,t,r,n.instance,e.attrs||{},n.attrs||{},n.hooks,n.children,a,s,d));else{var g=e.dom,C=t.childrenType,w=r.childrenType;if(n.dom=g,r.lazy===!0&&u===!1){var b=e.clipData;if(null===s.scrollY&&s.refresh(),n.clipData=b,b.pending===!0||b.top-s.scrollY>s.screenHeight)return void X(b,g,e,n,a,s);if(b.bottom<s.scrollY)return void X(b,g,e,n,a,s)}if(C>0||w>0)if(5===w||5===C)K(e,n,g,s,d,c);else{var N=e.children,O=n.children;0===C||i(N)?w>2?se(n,O,g,s,d,c):te(O,g,s,d,c):0===w||i(O)?C>2?x(g,N):k(N,g):N!==O&&(4===C&&4===w?Z(N,O,g,s,d,c):2===C&&2===w?q(N,O,g,s,d,c,!0,!1):1===C&&1===w?I(g,N,O):K(e,n,g,s,d,c))}if(t.hasAttrs!==!0&&r.hasAttrs!==!0||B(e,n,t.attrKeys,r.attrKeys,g,c),t.hasEvents!==!0&&r.hasEvents!==!0||W(e,n,t.eventKeys,r.eventKeys,g),t.hasClassName===!0||r.hasClassName===!0){var U=n.className;e.className!==U&&(o(U)?g.removeAttribute("class"):g.className=U)}if(t.hasStyle===!0||r.hasStyle===!0){var j=n.style;e.style!==j&&G(e.style,j,g)}n.hasHooks!==!0||o(f.didUpdate)||f.didUpdate(g)}}function L(e,n,t,r,i,s,c){if(d(n))n.then(function(n){q(e,n,t,r,i,s,null,!1)});else{var u=n.hooks,f=!o(u);f&&!o(u.willUpdate)&&u.willUpdate(e.dom);var h=n.tag||(o(n.bp)?null:n.bp.tag),v=e.tag||(o(e.bp)?null:e.bp.tag);if("svg"===h&&(c=!0),v!==h){var p=e.instance;a(v)?a(h)?m(p||e,n,t,r,i,s,c):l(v)?L(p._lastNode,n,t,r,i,s,!0,c):L(p,n,t,r,i,s,!0,c):m(p||e,n,t,r,i,s,c)}else if(o(v))n.dom=e.dom;else if(a(v))a(h)&&(n.instance=e.instance,n.dom=e.dom,J(!1,n,n.tag,null,null,n.instance,e.attrs||{},n.attrs||{},n.hooks,n.children,t,r,i));else{var g=e.dom,y=n.className,C=n.style;n.dom=g,K(e,n,g,r,i,s,c),B(e,n,null,null,g,s),W(e,n,null,null,g),e.className!==y&&(o(y)?g.removeAttribute("class"):g.className=y),e.style!==C&&G(e.style,C,g),f&&!o(u.didUpdate)&&u.didUpdate(g)}}}function P(e){switch(e.length){case 5:return"value"===e;case 7:return"checked"===e;case 8:return"disabled"===e||"selected"===e;default:return!1}}function I(e,n,t){r(n)?e.firstChild.nodeValue=t:e.textContent=t}function z(e,n,t,l,r,o,i,a){var s=e.bp,d=n.bp;void 0===s||void 0===d?L(e,n,t,l,r,o,i):H(e,n,s,d,t,l,r,o,a)}function q(e,n,t,l,o,a,s,d){if(null!==s)z(e,n,t,l,o,a,d,!1);else if(i(e))te(n,t,l,o,a,d);else if(i(n))k(e,t);else if(r(e))if(r(n))t.firstChild.nodeValue=n;else{var c=te(n,null,l,o,a,d);n.dom=c,g(t,c,t.firstChild)}else if(r(n)){var u=document.createTextNode(n);g(t,u,e.dom)}else z(e,n,t,l,o,a,d,!1)}function G(e,n,t){if(s(n))t.style.cssText=n;else if(o(e)){if(!o(n))for(var l=Object.keys(n),r=0;r<l.length;r++){var i=l[r];t.style[i]=n[i]}}else if(o(n))t.removeAttribute("style");else{for(var a=Object.keys(n),d=0;d<a.length;d++){var c=a[d];t.style[c]=n[c]}for(var u=Object.keys(e),f=0;f<u.length;f++){var h=u[f];o(n[h])&&(t.style[h]="")}}}function R(e,n,t,l,r){for(var i=l||Object.keys(n),a=0;a<i.length;a++){var s=i[a],d=e[s],c=n[s];d!==c&&(r[s]=c)}for(var u=t||Object.keys(e),f=0;f<u.length;f++){var h=u[f];o(n[h])&&(r[h]=null)}}function F(e,n,t){P(e)?"value"===e?t.value=null===n?"":n:t[e]=n:n===!1||o(n)?t.removeAttribute(e):Ue[e]?t.setAttributeNS(Ue[e],e,n===!0?e:n):t.setAttribute(e,n===!0?e:n)}function J(e,t,r,a,s,d,c,u,f,h,v,p,m){if(u=n(h,u),l(r)){var g=d.props,y=d.state,C=d.state,k=d.getChildContext();o(k)||(m=ge.extends({},m,k)),d.context=m;var w=d._updateComponent(y,C,g,u);i(w)||(q(t,w,v,p,m,d,!1,!1),t.dom=w.dom,d._lastNode=w)}else{var b=!0,N=e&&s.hasHooks===!0||!o(f);if(N&&!o(f.componentShouldUpdate)&&(b=f.componentShouldUpdate(t.dom,c,u)),b!==!1){N&&!o(f.componentWillUpdate)&&f.componentWillUpdate(t.dom,c,u);var x=r(u);if(!i(x)){var O=t.dom;x.dom=O,q(d,x,O,p,m,null,!1,!1),t.instance=x,N&&!o(f.componentDidUpdate)&&f.componentDidUpdate(t.dom,c,u)}}}}function Q(e,n,l,a,s,d,c,u,h){var v=void 0===l.append,p=e.length,m=n.length,C=p===m;if(C===!1)if(p>m)for(;p!==m;){var w=e[p-1];i(w)||(l.removeChild(a[p-1+u]),v&&a.splice(p-1+u,1),y(w),p--,e.pop())}else for(;p!==m;){var b=n[p],N=void 0;e.push(b),N=r(b)?document.createTextNode(b):te(b,null,d,c,h),f(l,N),v&&(1===p&&a.push(l.firstChild),v&&a.splice(p+u,0,N)),p++}for(var x=0;m>x;x++){var O=e[x],T=n[x],S=x+u;if(O!==T)if(i(T)){if(!i(O))if(t(O)&&0===O.length)for(var D=0;D<O.length;D++)k(O[D],l);else{var _=a[S];o(_)&&S--,l.removeChild(a[S]),v&&(a.splice(S,1),u--),y(O)}}else if(i(O)){if(r(T)){var E=document.createTextNode(T),K=a[S];if(o(K)){var A=a[S+1];f(l,E,A),v&&a.splice(S,1,E)}else f(l,E,K),v&&a.splice(S,0,E)}else if(C===!0){var W=te(T,null,s,d,c,h),B=a[S];if(o(B)){var M=a[S+1];f(l,W,M),v&&a.splice(S,1,W)}else f(l,W,B),v&&a.splice(S,0,W)}}else if(r(T))if(1===p)r(O)?void 0!==l.getElementsByTagName?l.firstChild.nodeValue=T:l.nodeValue=T:(y(O),l.textContent=T);else{var Y=document.createTextNode(T),V=a[S];o(V)?l.nodeValue=Y.nodeValue:r(O)?V.nodeValue=T:void 0===V.append?(v&&a.splice(S,1,Y),g(l,Y,V)):(f(l,Y,V.firstChild),V.remove(),a.splice(0,a.length,Y)),y(O)}else if(t(T))if(j(O,T))Z(O,T,a[S],s,d,c,h);else if(t(O)){var X=a[S];if(void 0===X.append)if(T.length>1&&1===O.length){var H=U();H.insert(l,X),H.appendChild(X),v&&a.splice(S,1,H),Q(O,T,H,H.childNodes,s,d,c,0,h)}else Q(O,T,l,a,s,d,c,0,h);else Q(O,T,a[S],a[S].childNodes,s,d,c,0,h)}else if(T.length>1){var L=U();L.appendChild(l.firstChild),f(l,L,l.firstChild),v&&a.splice(S,1,L),Q([O],T,L,L.childNodes,s,d,c,x,h)}else Q([O],T,l,a,s,d,c,x,h);else t(O)?Q(O,[T],a,a[S].childNodes,s,d,c,0,h):q(O,T,l,s,d,c,null,h)}}function Z(e,n,t,l,r,o,i){for(var a=e.length,s=n.length,d=void 0,c=a-1,u=s-1,f=0,v=0,p=null,m=null,g=null,y=null,C=void 0,w=void 0,b=0,N=void 0,x=void 0;c>=f&&u>=v&&(m=n[v],p=e[f],m.key===p.key);)q(p,m,t,l,r,o,!0,i),v++,f++;for(;c>=f&&u>=v&&(g=n[u],y=e[c],g.key===y.key);)q(y,g,t,l,r,o,!0,i),u--,c--;for(;c>=f&&u>=v&&(g=n[u],p=e[f],g.key===p.key);)w=s>u+1?n[u+1].dom:null,q(p,g,t,l,r,o,!0,i),h(t,g.dom,w),u--,f++;for(;c>=f&&u>=v&&(m=n[v],y=e[c],m.key===y.key);)w=e[f].dom,q(y,m,t,l,r,o,!0,i),h(t,m.dom,w),v++,c--;if(f>c){if(u>=v)for(w=s>u+1?n[u+1].dom:null;u>=v;v++)h(t,te(n[v],null,l,r,o,i),w)}else if(v>u)for(;c>=f;)k(e[f++],t);else{var O=c-f+1,U=u-v+1,j=new Array(U);for(d=0;U>d;d++)j[d]=-1;var T=!1,S=0;if(16>=O*U)for(d=f;c>=d;d++){var D=!0;for(y=e[d],C=v;u>=C;C++)if(g=n[C],y.key===g.key){j[C-v]=d,b>C?T=!0:b=C,q(y,g,t,l,r,o,!0,i),D=!1;break}D&&(k(y,t),S++)}else{var _=new Map;for(d=v;u>=d;d++)x=n[d],_.set(x.key,d);for(d=c;d>=f;d--)y=e[d],C=_.get(y.key),void 0===C?(k(y,t),S++):(g=n[C],j[C-v]=d,b>C?T=!0:b=C,q(y,g,t,l,r,o,!0,i))}if(T){var E=$(j);for(C=E.length-1,d=U-1;d>=0;d--)-1===j[d]?(N=d+v,w=s>N+1?n[N+1].dom:null,h(t,te(n[N],null,l,r,o,i),w)):0>C||d!==E[C]?(N=d+v,w=s>N+1?n[N+1].dom:null,h(t,n[N].dom,w)):C--}else if(O-S!==U)for(d=U-1;d>=0;d--)-1===j[d]&&(N=d+v,w=s>N+1?n[N+1].dom:null,h(t,te(n[N],null,l,r,o,i),w))}}function $(e){var n=e.slice(0),t=[];t.push(0);var l=void 0,r=void 0,o=void 0,i=void 0,a=void 0;for(l=0;l<e.length;l++)if(-1!==e[l])if(r=t[t.length-1],e[r]<e[l])n[l]=r,t.push(l);else{for(o=0,i=t.length-1;i>o;)a=(o+i)/2|0,e[t[a]]<e[l]?o=a+1:i=a;e[l]<e[t[o]]&&(o>0&&(n[l]=t[o-1]),t[o]=l)}for(o=t.length,i=t[o-1];o-- >0;)t[o]=i,i=n[i];return t}function ee(e,n,t,l,r){if(void 0!==n){var i=e.key,a=null===i?n.pools.nonKeyed:n.pools.keyed[i];if(!o(a)){var s=a.pop();if(!o(s))return q(s,e,null,null,t,l,r,!0),e.dom}}return null}function ne(e){var n=e.bp;if(!o(n)){var t=e.key,l=n.pools;if(null===t){var r=l.nonKeyed;r&&r.push(e)}else{var i=l.keyed;(i[t]||(i[t]=[])).push(e)}return!0}return!1}function te(e,n,l,r,o,a){if(t(e))return D(e,n);if(i(e))return null;var s=e.bp;if(je){var d=ee(e,s,l,r,o);if(null!==d)return null!==n&&n.appendChild(d),d}return void 0===s?oe(e,n,l,r,o,a):re(e,s,n,l,r,o)}function le(e){"select"===e.tag&&S(e)}function re(e,n,t,l,r,o){var i=e.tag;if(n.isComponent===!0)return fe(e,i,e.attrs||{},e.hooks,e.children,t,l,r);var a=v(n.tag,n.isSVG);switch(e.dom=a,n.hasHooks===!0&&_(e.hooks,l,a),n.lazy===!0&&E(e,l,a),n.childrenType){case 1:p(e.children,a,!0);break;case 2:te(e.children,a,l,r,o);break;case 3:se(e,e.children,a,l,r,o);break;case 4:ae(e.children,a,l,r,o);break;case 5:de(e,e.children,a,l,r,o)}if(n.hasAttrs===!0){le(e);var s=e.attrs;if(null===n.attrKeys){var d=Object.keys(s);n.attrKeys=n.attrKeys?n.attrKeys.concat(d):d}var c=n.attrKeys;he(s,c,a,o)}if(n.hasClassName===!0&&(a.className=e.className),n.hasStyle===!0&&G(null,e.style,a),n.hasEvents===!0){var u=e.events;null===n.eventKeys&&(n.eventKeys=Object.keys(u));var f=n.eventKeys;ue(u,f,a)}return null!==t&&t.appendChild(a),a}function oe(e,n,t,l,r,d){var c=e.tag;if(null===c)return D(e,n);if(a(c))return fe(e,c,e.attrs||{},e.hooks,e.children,n,t,l);if(!s(c)||""===c)throw Error("Inferno Error: Expected function or string for element tag type");"svg"===c&&(d=!0);var u=v(c,d),f=e.children,h=e.attrs,p=e.events,m=e.hooks,g=e.className,y=e.style;return e.dom=u,o(m)||_(m,t,u),i(f)||de(e,f,u,t,l,r,d),o(h)||(le(e),he(h,Object.keys(h),u,r)),o(g)||(u.className=g),o(y)||G(null,y,u),o(p)||ue(p,Object.keys(p),u),null!==n&&n.appendChild(u),u}function ie(e,n,t,l,r,o,i){var a=C();t&&t.push(a),e.then(function(e){var s=te(e,null,l,r,o,i);n.replaceChild(s,a),t&&c(t,a,s)}),n.appendChild(a)}function ae(e,n,t,l,r){for(var o=0;o<e.length;o++)te(e[o],n,t,l,r)}function se(e,n,l,a,s,c,u){for(var h=null,v=!1,m=!1,g=0;g<n.length;g++){var y=n[g];if(r(y))v=!0,h=h||[],h.push(p(y,l,!1));else if(!o(y)&&t(y)){var C=U();v=!0,se(e,y,C,a,s,c,u),f(l,C),h=h||[],h.push(C)}else if(d(y))ie(y,l,h,a,s,c,u);else{var k=te(y,l,a,s,c,u);v||!m&&y&&o(y.key)?(v=!0,h=h||[],h.push(k)):i(y)?(v=!0,h=h||[],h.push(k)):m===!1&&(m=!0)}}null!==h&&h.length>1&&v===!0&&(e.domChildren=h)}function de(e,n,l,o,i,a,s){t(n)?se(e,n,l,o,i,a,s):r(n)?p(n,l,!0):d(n)?ie(n,l,null,o,i,a,s):te(n,l,o,i,a,s)}function ce(e,n,t){!i(e)&&s(n)&&(e.refs[n]=t)}function ue(e,n,t){for(var l=0;l<n.length;l++){var r=n[l];t[r]=e[r]}}function fe(e,t,r,i,a,s,d,c){r=n(a,r);var u=void 0;if(l(t)){var f=new t(r);f._patch=q;var h=f.getChildContext();o(h)||(c=ge.extends({},c,h)),f.context=c,f._pendingSetState=!0,f.componentWillMount();var v=f.shouldComponentUpdate();if(v){f.componentWillUpdate();var p=f._pendingState,m=f.state;f.state=ge.extends({},m,p)}var g=f.render();f._pendingSetState=!1,o(g)||(u=te(g,null,d,c,f),f._lastNode=g,null!==s&&s.appendChild(u),f.componentDidMount(),f.componentDidUpdate()),e.dom=u,e.instance=f}else{o(i)||(o(i.componentWillMount)||i.componentWillMount(null,r),o(i.componentDidMount)||d.addListener(function(){i.componentDidMount(u,r)}));var y=t(r);u=te(y,null,d,c,null),e.instance=y,null!==s&&s.appendChild(u),e.dom=u}return u}function he(e,n,t,l){for(var r=0;r<n.length;r++){var o=n[r];"ref"===o?ce(l,e[o],t):F(o,e[o],t)}}function ve(e){for(var n=0;n<Te.length;n++){var t=Te[n];if(t.dom===e)return t}return null}function pe(e){for(var n=0;n<Te.length;n++){var t=Te[n];if(t===e)return void Te.splice(n,1)}}function me(n,t){var l=ve(t),r=new e;if(null===l)te(n,t,r,{},null,!1),r.trigger(),Te.push({node:n,dom:t});else{var o=N();q(l.node,n,t,r,{},null,null,!1),r.trigger(),null===n&&pe(l),l.node=n,window.node=n,O(o)}}var ge={};ge.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},ge.classCallCheck=function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")},ge.createClass=function(){function e(e,n){for(var t=0;t<n.length;t++){var l=n[t];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}return function(n,t,l){return t&&e(n.prototype,t),l&&e(n,l),n}}(),ge.extends=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e};var ye=window.screen.width,Ce=window.screen.height,ke=0,we=0;window.onscroll=function(e){ke=window.scrollX,we=window.scrollY},window.resize=function(e){ke=window.scrollX,we=window.scrollY,ye=window.screen.width,Ce=window.screen.height},e.prototype={refresh:function(){this.scrollX=window.scrollX,this.scrollY=window.scrollY},addListener:function(e){this._listeners.push(e)},trigger:function(){for(var e=0;e<this._listeners.length;e++)this._listeners[e]()}};var be=new Map,Ne=!1,xe="http://www.w3.org/1999/xlink",Oe="http://www.w3.org/XML/1998/namespace",Ue={"xlink:href":xe,"xlink:arcrole":xe,"xlink:actuate":xe,"xlink:role":xe,"xlink:row":xe,"xlink:titlef":xe,"xlink:type":xe,"xml:base":Oe,"xml:lang":Oe,"xml:space":Oe},je=!0,Te=[],Se={render:me};return Se});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.InfernoDOM=n()}(this,function(){"use strict";function e(e,t){if(!r(e)){var l=n(e);(l&&e.length>0||!l)&&(t?t.children=e:t={children:e})}return t}function n(e){return e instanceof Array}function t(e){return void 0!==e.prototype.render}function l(e){return"string"==typeof e||"number"==typeof e}function r(e){return void 0===e||null===e}function o(e){return null===e||e===!1||void 0===e}function i(e){return"function"==typeof e}function a(e){return"string"==typeof e}function s(e){return e instanceof Promise}function d(e,n,t){e.splice(e.indexOf(n),1,t)}function c(e,n,t,l,o){if(void 0!==n){var i=e.key,a=null===i?n.pools.nonKeyed:n.pools.keyed[i];if(!r(a)){var s=a.pop();if(!r(s))return te(s,e,null,t,l,o,!0,n.isSVG),e.dom}}return null}function u(e){var n=e.bp;if(!r(n)){var t=e.key,l=n.pools;if(null===t){var o=l.nonKeyed;o&&o.push(e)}else{var i=l.keyed;(i[t]||(i[t]=[])).push(e)}return!0}return!1}function f(e,t,l,r,i,a){if(n(e))return G(e,t);if(o(e))return null;var s=e.bp;if(ke){var d=c(e,s,l,r,i);if(null!==d)return null!==t&&t.appendChild(d),d}return void 0===s?p(e,t,l,r,i,a):h(e,s,t,l,r,i)}function v(e){"select"===e.tag&&L(e)}function h(e,n,t,l,r,o){var i=e.tag;if(n.isComponent===!0)return b(e,i,e.attrs||{},e.hooks,e.children,o,t,l,r);var a=_(n.tag,n.isSVG);switch(e.dom=a,n.hasHooks===!0&&P(e.hooks,l,a),n.lazy===!0&&ue(e,l,a),n.childrenType){case 1:j(e.children,a,!0);break;case 2:f(e.children,a,l,r,o);break;case 3:g(e,e.children,a,l,r,o);break;case 4:y(e.children,a,l,r,o);break;case 5:C(e,e.children,a,l,r,o)}if(n.hasAttrs===!0){v(e);var s=e.attrs;if(null===n.attrKeys){var d=Object.keys(s);n.attrKeys=n.attrKeys?n.attrKeys.concat(d):d}var c=n.attrKeys;N(s,c,a,o)}if(n.hasClassName===!0&&(a.className=e.className),n.hasStyle===!0&&le(null,e.style,a),n.hasEvents===!0){var u=e.events;null===n.eventKeys&&(n.eventKeys=Object.keys(u));var h=n.eventKeys;w(u,h,a)}return null!==t&&t.appendChild(a),a}function p(e,n,t,l,s,d){var c=e.tag;if(null===c)return G(e,n);if(i(c))return b(e,c,e.attrs||{},e.hooks,e.children,s,n,t,l);if(!a(c)||""===c)throw Error("Inferno Error: Expected function or string for element tag type");"svg"===c&&(d=!0);var u=_(c,d),f=e.children,h=e.attrs,p=e.events,m=e.hooks,y=e.className,g=e.style;return e.dom=u,r(m)||P(m,t,u),o(f)||C(e,f,u,t,l,s,d),r(h)||(v(e),N(h,Object.keys(h),u,s)),r(y)||(u.className=y),r(g)||le(null,g,u),r(p)||w(p,Object.keys(p),u),null!==n&&n.appendChild(u),u}function m(e,n,t,l,r,i,a){var s=E();t&&t.push(s),e.then(function(e){var c=f(e,null,l,r,i,a);null===n||o(c)||n.replaceChild(c,s),t&&d(t,s,c)}),n.appendChild(s)}function y(e,n,t,l,r){for(var o=0;o<e.length;o++)f(e[o],n,t,l,r)}function g(e,t,i,a,d,c,u){for(var v=null,h=!1,p=!1,y=0;y<t.length;y++){var C=t[y];if(l(C))h=!0,v=v||[],v.push(j(C,i,!1));else if(!r(C)&&n(C)){var k=Y();h=!0,g(e,C,k,a,d,c,u),O(i,k),v=v||[],v.push(k)}else if(s(C))m(C,i,v,a,d,c,u);else{var w=f(C,i,a,d,c,u);h||!p&&!r(C)&&r(C.key)?(h=!0,v=v||[],v.push(w)):o(C)?(h=!0,v=v||[],v.push(w)):p===!1&&(p=!0)}}null!==v&&v.length>1&&h===!0&&(e.domChildren=v)}function C(e,t,r,o,i,a,d){n(t)?g(e,t,r,o,i,a,d):l(t)?j(t,r,!0):s(t)?m(t,r,null,o,i,a,d):f(t,r,o,i,a,d)}function k(e,n,t){!o(e)&&a(n)&&(e.refs[n]=t)}function w(e,n,t){for(var l=0;l<n.length;l++){var r=n[l];t[r]=e[r]}}function b(n,l,i,a,s,d,c,u,v){i=e(s,i);var h=void 0;if(t(l)){var p=new l(i);p._patch=te,!r(d)&&i.ref&&k(d,i.ref,p);var m=p.getChildContext();r(m)||(v=Ce.extends({},v,m)),p.context=v,p._unmounted=!1,p._pendingSetState=!0,p.componentWillMount();var y=p.render();p._pendingSetState=!1,o(y)||(h=f(y,null,u,v,p,!1),p._lastNode=y,null===c||o(h)||c.appendChild(h),p.componentDidMount()),n.dom=h,n.instance=p}else{r(a)||(r(a.componentWillMount)||a.componentWillMount(null,i),r(a.componentDidMount)||u.addListener(function(){a.componentDidMount(h,i)}));var g=l(i);h=f(g,null,u,v,null),n.instance=g,null===c||o(h)||c.appendChild(h),n.dom=h}return h}function N(e,n,t,l){for(var r=0;r<n.length;r++){var o=n[r];"ref"===o?k(l,e[o],t):oe(o,e[o],t)}}function x(e){return!r(e.append)}function O(e,n,t){r(t)?x(n)?n.append(e):e.appendChild(n):x(n)?n.insert(e,t):x(t)?e.insertBefore(n,t.childNodes[0]||t.dom):e.insertBefore(n,t)}function S(e,n,t){r(t)?e.appendChild(n):e.insertBefore(n,t)}function _(e,n){var t=void 0;return t=n===!0?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}function j(e,n,t){if(null===n)return document.createTextNode(e);if(t){if(""!==e)return n.textContent=e,n.firstChild;var l=document.createTextNode("");return n.appendChild(l),l}var r=document.createTextNode(e);return n.appendChild(r),r}function T(e,n,t,l,o,i,a){var s=null,d=e._lastNode;r(d)||(s=e,e=d);var c=f(n,null,l,o,i,a);n.dom=c,U(t,c,e.dom),null!==s&&(s._lastNode=n),D(e)}function U(e,n,t){x(t)?t.replaceWith(n):e.replaceChild(n,t)}function D(e){if(!o(e)&&!l(e)){var t=e.instance,i=null,a=null;r(t)||(i=t.hooks,a=t.children,void 0!==t.render&&(t.componentWillUnmount(),t._unmounted=!0));var s=e.hooks||i;r(s)||(r(s.willDetach)||s.willDetach(e.dom),r(s.componentWillUnmount)||s.componentWillUnmount(e.dom,s));var d=e.children||a;if(!r(d))if(n(d))for(var c=0;c<d.length;c++)D(d[c]);else D(d)}}function E(){return document.createTextNode("")}function K(e,n){var t=e.dom;t===n?t.innerHTML="":(n.removeChild(t),ke&&u(e)),D(e)}function A(e,n,t){for(var l=n||Object.keys(e),r=0;r<l.length;r++){var o=l[r];t[o]=null}}function V(e,n,t){for(var l=0;l<n.length;l++)e.insertBefore(n[l],t)}function B(){return document.activeElement}function M(e,n){if(ke){var t=n.length;if(t>5)for(var l=0;t>l;l++){var r=n[l];o(r)||u(r)}}e.textContent=""}function W(e){e!==document.body&&document.activeElement!==e&&e.focus()}function Y(){var e=[],n=document.createTextNode(""),t=null,l={dom:n,childNodes:e,appendChild:function(l){e.push(l),t&&t.insertBefore(l,n)},removeChild:function(n){t&&t.removeChild(n),e.splice(e.indexOf(n),1)},insertBefore:function(n,l){t&&t.insertBefore(n,l),e.splice(e.indexOf(l),0,n)},replaceChild:function(n,l){t.replaceChild(n,l),d(e,l,n)},append:function(l){l.appendChild(n),t=l,V(t,e,n)},insert:function(l,r){l.insertBefore(n,r),t=l,V(t,e,n)},remove:function(){t.removeChild(n);for(var l=0;l<e.length;l++)t.removeChild(e[l]);t=null},replaceWith:function(l){t.replaceChild(l,n);for(var r=0;r<e.length;r++)t.removeChild(e[r]);t=null},getElementsByTagName:null};return Object.defineProperty(l,"parentNode",{get:function(){return t}}),Object.defineProperty(l,"firstChild",{get:function(){return e[0]}}),l}function X(e){return e.length&&!r(e[0])&&!r(e[0].key)}function H(e,n){if("option"===e.tag){var t=e.attrs&&e.attrs.value;n[t]?(e.attrs=e.attrs||{},e.attrs.selected="selected",e.dom.selected=!0):e.dom.selected=!1}else for(var l=0,r=e.children.length;r>l;l++)H(e.children[l],n)}function L(e){var t=e.attrs&&e.attrs.value,l={};if(n(t))for(var r=0,o=t.length;o>r;r++)l[t[r]]=t[r];else l[t]=t;for(var i=0,a=e.children.length;a>i;i++)H(e.children[i],l);e.attrs&&e.attrs[t]&&delete e.attrs.value}function G(e,n){var t=E();return null!==n&&n.appendChild(t),o(e)||(e.dom=t),t}function P(e,n,t){r(e.created)||e.created(t),r(e.attached)||n.addListener(function(){e.attached(t)})}function z(e){var n=e.attrs.value;r(n)||(e.dom.value=n)}function I(e,n){if("input"===e){var t=n.attrs.type;if("text"===t)z(n);else if("checkbox"===t||"radio"===t){var l=n.attrs.checked;n.dom.checked=!!l}}else"textarea"===e&&z(n)}function q(e,t,i,a,s,d,c){var u=t.children,v=e.children;if(v!==u){var h=null;e.domChildren&&(h=t.domChildren=e.domChildren),o(v)?l(u)?ee(i,v,u):r(u)||(n(u)?g(t,u,i,a,s,d,c):f(u,i,a,s,d,c)):o(u)?M(i,v):n(v)?n(u)?null===h&&v.length>1?se(v,u,i,a,s,d,c):X(u)?se(v,u,i,a,s,d,c):ae(v,u,i,h||(t.domChildren=[]),a,s,d,0,c):ae(v,[u],i,h||[],a,s,d,0):n(u)?ae([v],u,i,h||(t.domChildren=[i.firstChild]),a,s,d,0,c):l(u)?ee(i,v,u):l(v)?te(v,u,i,a,s,d,null,c):te(v,u,i,a,s,d,!0,c)}}function R(e,n,t,l){e&&(a(n)&&delete e.refs[n],a(t)&&(e.refs[t]=l))}function F(e,n,t,l,o){var i=n.events,a=e.events,s=!r(i),d=!r(a);s?d?re(a,i,t,l,o):w(i,l,o):d&&A(a,t,o)}function J(e,n,t,l,o,i){"select"===e.tag&&L(n);var a=n.attrs,s=e.attrs,d=r(a),c=!r(s);if(!d)for(var u=l||Object.keys(a),f=u.length,v=0;f>v;v++){var h=u[v],p=c&&s[h],m=a[h];p!==m&&("ref"===h?R(i,p,m,o):oe(h,m,o))}if(c)for(var y=t||Object.keys(s),g=y.length,C=0;g>C;C++){var k=y[C];(d||r(a[k]))&&("ref"===k?R(i,s[k],null,o):o.removeAttribute(k))}}function Q(e,n,l,i,a,s,d,c,u){var v=void 0;n.hasHooks===!0&&(v=n.hooks&&!r(v.willUpdate))&&v.willUpdate(e.dom);var h=n.tag||i.tag,p=e.tag||l.tag;if(p!==h)if(l.isComponent===!0){var m=e.instance;i.isComponent===!0?(T(m||e,n,a,s,d,c,!1),D(e)):t(p)?Z(m._lastNode,n,a,s,d,c,i.isSVG):Z(m,n,a,s,d,c,i.isSVG)}else T(e,n,a,s,d,c,i.isSVG);else if(r(p))n.dom=e.dom;else if(l.isComponent===!0){if(i.isComponent===!0){var y=e.instance;if(!r(y)&&y._unmounted){var C=b(n,p,n.attrs||{},n.hooks,n.children,y,a,s,d);null!==a&&U(a,C,e.dom)}else n.instance=y,n.dom=e.dom,ie(!0,n,n.tag,l,i,y,e.attrs||{},n.attrs||{},n.hooks,n.children,a,s,d)}}else{var k=e.dom,w=l.childrenType,N=i.childrenType;if(n.dom=k,i.lazy===!0&&u===!1){var x=e.clipData;if(null===s.scrollY&&s.refresh(),n.clipData=x,(x.pending===!0||x.top-s.scrollY>s.screenHeight)&&pe(x,k,e,n,a,s))return;if(x.bottom<s.scrollY&&pe(x,k,e,n,a,s))return}if(w>0||N>0)if(5===N||5===w)q(e,n,k,s,d,c);else{var O=e.children,S=n.children;0===w||o(O)?N>2?g(n,S,k,s,d,c):f(S,k,s,d,c):0===N||o(S)?w>2?M(k,O):K(O,k):O!==S&&(4===w&&4===N?se(O,S,k,s,d,c):2===w&&2===N?te(O,S,k,s,d,c,!0,!1):1===w&&1===N?ee(k,O,S):q(e,n,k,s,d,c))}if(l.hasAttrs!==!0&&i.hasAttrs!==!0||J(e,n,l.attrKeys,i.attrKeys,k,c),l.hasEvents!==!0&&i.hasEvents!==!0||F(e,n,l.eventKeys,i.eventKeys,k),l.hasClassName===!0||i.hasClassName===!0){var _=n.className;e.className!==_&&(r(_)?k.removeAttribute("class"):k.className=_)}if(l.hasStyle===!0||i.hasStyle===!0){var j=n.style;e.style!==j&&le(e.style,j,k)}n.hasHooks!==!0||r(v.didUpdate)||v.didUpdate(k),I(h,n)}}function Z(e,n,l,o,a,d,c){if(s(n))n.then(function(n){te(e,n,l,o,a,d,null,!1)});else{var u=n.hooks,f=!r(u);f&&!r(u.willUpdate)&&u.willUpdate(e.dom);var v=n.tag||(r(n.bp)?null:n.bp.tag),h=e.tag||(r(e.bp)?null:e.bp.tag);if("svg"===v&&(c=!0),h!==v){var p=e.instance;i(h)?i(v)?T(p||e,n,l,o,a,d,c):t(h)?Z(p._lastNode,n,l,o,a,d,c):Z(p,n,l,o,a,d,c):T(p||e,n,l,o,a,d,c)}else if(r(h))n.dom=e.dom;else if(i(h)){if(i(v)){var m=e._instance;if(!r(m)&&m._unmounted){var y=b(n,h,n.attrs||{},n.hooks,n.children,m,l,o,a);null!==l&&U(l,y,e.dom)}else n.instance=e.instance,n.dom=e.dom,ie(!1,n,n.tag,null,null,n.instance,e.attrs||{},n.attrs||{},n.hooks,n.children,l,o,a)}}else{var g=e.dom,C=n.className,k=n.style;n.dom=g,q(e,n,g,o,a,d,c),J(e,n,null,null,g,d),F(e,n,null,null,g),e.className!==C&&(r(C)?g.removeAttribute("class"):g.className=C),e.style!==k&&le(e.style,k,g),f&&!r(u.didUpdate)&&u.didUpdate(g),I(v,n)}}}function $(e,n,t){e.split(",").forEach(function(e){return n[e]=t})}function ee(e,n,t){l(n)?e.firstChild.nodeValue=t:e.textContent=t}function ne(e,n,t,l,r,o,i,a){var s=e.bp,d=n.bp;void 0===s||void 0===d?Z(e,n,t,l,r,o,i):Q(e,n,s,d,t,l,r,o,a)}function te(e,n,t,r,i,a,s,d){if(null!==s)ne(e,n,t,r,i,a,d,!1);else if(o(e))f(n,t,r,i,a,d);else if(o(n))K(e,t);else if(l(e))if(l(n))t.firstChild.nodeValue=n;else{var c=f(n,null,r,i,a,d);n.dom=c,U(t,c,t.firstChild)}else if(l(n)){var u=document.createTextNode(n);U(t,u,e.dom)}else ne(e,n,t,r,i,a,d,!1)}function le(e,n,t){if(a(n))t.style.cssText=n;else if(r(e)){if(!r(n))for(var l=Object.keys(n),o=0;o<l.length;o++){var i=l[o];t.style[i]=n[i]}}else if(r(n))t.removeAttribute("style");else{for(var s=Object.keys(n),d=0;d<s.length;d++){var c=s[d];t.style[c]=n[c]}for(var u=Object.keys(e),f=0;f<u.length;f++){var v=u[f];r(n[v])&&(t.style[v]="")}}}function re(e,n,t,l,o){for(var i=l||Object.keys(n),a=0;a<i.length;a++){var s=i[a],d=e[s],c=n[s];d!==c&&(o[s]=c)}for(var u=t||Object.keys(e),f=0;f<u.length;f++){var v=u[f];r(n[v])&&(o[v]=null)}}function oe(e,n,t){if(Ne[e])t[e]=null===n?"":n;else if(xe[e])t[e]=!!n;else{var l=Oe[e];n===!1||r(n)?void 0!==l?t.removeAttributeNS(l,e):t.removeAttribute(e):void 0!==l?t.setAttributeNS(l,e,n===!0?e:n):t.setAttribute(e,n===!0?e:n)}}function ie(n,l,i,a,s,d,c,u,f,v,h,p,m){if(u=e(v,u),t(i)){var y=d.props,g=d.state,C=d.state,k=d.getChildContext();r(k)||(m=Ce.extends({},m,k)),d.context=m;var w=d._updateComponent(g,C,y,u);o(w)||(te(d._lastNode,w,h,p,m,d,null,!1),l.dom=w.dom,d._lastNode=w)}else{var b=!0,N=n&&s.hasHooks===!0||!r(f);if(N&&!r(f.componentShouldUpdate)&&(b=f.componentShouldUpdate(l.dom,c,u)),b!==!1){N&&!r(f.componentWillUpdate)&&f.componentWillUpdate(l.dom,c,u);var x=i(u);if(!o(x)){var O=l.dom;x.dom=O,te(d,x,h,p,m,null,null,!1),l.instance=x,N&&!r(f.componentDidUpdate)&&f.componentDidUpdate(l.dom,c,u)}}}}function ae(e,t,i,a,s,d,c,u,v){var h=void 0===i.append,p=e.length,m=t.length,y=p===m;if(y===!1)if(p>m)for(;p!==m;){var g=e[p-1];o(g)||(i.removeChild(a[p-1+u]),h&&a.splice(p-1+u,1),D(g),p--,e.pop())}else for(;p!==m;){var C=t[p],k=void 0;e.push(C),k=l(C)?document.createTextNode(C):f(C,null,d,c,v),o(k)||O(i,k),h&&(1===p&&a.push(i.firstChild),h&&a.splice(p+u,0,k)),p++}for(var w=0;m>w;w++){var b=e[w],N=t[w],x=w+u;if(b!==N)if(o(N)){if(!o(b))if(n(b)&&0===b.length)for(var S=0;S<b.length;S++)K(b[S],i);else{var _=a[x];r(_)&&x--,i.removeChild(a[x]),h&&(a.splice(x,1),u--),D(b)}}else if(o(b))if(l(N)){var j=document.createTextNode(N),T=a[x];if(r(T)){var E=a[x+1];O(i,j,E),h&&a.splice(x,1,j)}else O(i,j,T),h&&a.splice(x,0,j)}else{var A=f(N,null,s,d,c,v),V=a[x];if(r(V)){var B=a[x+1];O(i,A,B),h&&a.splice(x,1,A)}else O(i,A,V),h&&a.splice(x,0,A)}else if(l(N))if(1===p)l(b)?void 0===i.getElementsByTagName?i.nodeValue=N:i.firstChild.nodeValue=N:(D(b),i.textContent=N);else{var M=document.createTextNode(N),W=a[x];r(W)?i.nodeValue=M.nodeValue:l(b)?W.nodeValue=N:void 0===W.append?(h&&a.splice(x,1,M),U(i,M,W)):(O(i,M,W.firstChild),W.remove(),a.splice(0,a.length,M)),D(b)}else if(n(N))if(X(N))se(b,N,a[x],s,d,c,v);else if(n(b)){var H=a[x];if(void 0===H.append)if(N.length>1&&1===b.length){var L=Y();L.insert(i,H),L.appendChild(H),h&&a.splice(x,1,L),ae(b,N,L,L.childNodes,s,d,c,0,v)}else ae(b,N,i,a,s,d,c,0,v);else ae(b,N,a[x],a[x].childNodes,s,d,c,0,v)}else if(N.length>1){var G=Y();G.appendChild(i.firstChild),O(i,G,i.firstChild),h&&a.splice(x,1,G),ae([b],N,G,G.childNodes,s,d,c,w,v)}else ae([b],N,i,a,s,d,c,w,v);else n(b)?ae(b,[N],a,a[x].childNodes,s,d,c,0,v):te(b,N,i,s,d,c,null,v)}}function se(e,n,t,l,r,o,i){for(var a=e.length,s=n.length,d=void 0,c=a-1,u=s-1,v=0,h=0,p=null,m=null,y=null,g=null,C=void 0,k=void 0,w=0,b=void 0,N=void 0;c>=v&&u>=h&&(m=n[h],p=e[v],m.key===p.key);)te(p,m,t,l,r,o,!0,i),h++,v++;for(;c>=v&&u>=h&&(y=n[u],g=e[c],y.key===g.key);)te(g,y,t,l,r,o,!0,i),u--,c--;for(;c>=v&&u>=h&&(y=n[u],p=e[v],y.key===p.key);)k=s>u+1?n[u+1].dom:null,te(p,y,t,l,r,o,!0,i),S(t,y.dom,k),u--,v++;for(;c>=v&&u>=h&&(m=n[h],g=e[c],m.key===g.key);)k=e[v].dom,te(g,m,t,l,r,o,!0,i),S(t,m.dom,k),h++,c--;if(v>c){if(u>=h)for(k=s>u+1?n[u+1].dom:null;u>=h;h++)S(t,f(n[h],null,l,r,o,i),k)}else if(h>u)for(;c>=v;)K(e[v++],t);else{var x=c-v+1,O=u-h+1,_=new Array(O);for(d=0;O>d;d++)_[d]=-1;var j=!1,T=0;if(16>=x*O)for(d=v;c>=d;d++){var U=!0;for(g=e[d],C=h;u>=C;C++)if(y=n[C],g.key===y.key){_[C-h]=d,w>C?j=!0:w=C,te(g,y,t,l,r,o,!0,i),U=!1;break}U&&(K(g,t),T++)}else{var D=new Map;for(d=h;u>=d;d++)N=n[d],D.set(N.key,d);for(d=c;d>=v;d--)g=e[d],C=D.get(g.key),void 0===C?(K(g,t),T++):(y=n[C],_[C-h]=d,w>C?j=!0:w=C,te(g,y,t,l,r,o,!0,i))}if(j){var E=de(_);for(C=E.length-1,d=O-1;d>=0;d--)-1===_[d]?(b=d+h,k=s>b+1?n[b+1].dom:null,S(t,f(n[b],null,l,r,o,i),k)):0>C||d!==E[C]?(b=d+h,k=s>b+1?n[b+1].dom:null,S(t,n[b].dom,k)):C--}else if(x-T!==O)for(d=O-1;d>=0;d--)-1===_[d]&&(b=d+h,k=s>b+1?n[b+1].dom:null,S(t,f(n[b],null,l,r,o,i),k))}}function de(e){var n=e.slice(0),t=[];t.push(0);var l=void 0,r=void 0,o=void 0,i=void 0,a=void 0;for(l=0;l<e.length;l++)if(-1!==e[l])if(r=t[t.length-1],e[r]<e[l])n[l]=r,t.push(l);else{for(o=0,i=t.length-1;i>o;)a=(o+i)/2|0,e[t[a]]<e[l]?o=a+1:i=a;e[l]<e[t[o]]&&(o>0&&(n[l]=t[o-1]),t[o]=l)}for(o=t.length,i=t[o-1];o-- >0;)t[o]=i,i=n[i];return t}function ce(){this._listeners=[],this.scrollX=null,this.scrollY=null,this.screenHeight=_e,this.screenWidth=Se}function ue(e,n,t){n.addListener(function(){var l=t.getBoundingClientRect();null===n.scrollY&&n.refresh(),e.clipData={top:l.top+n.scrollY,left:l.left+n.scrollX,bottom:l.bottom+n.scrollY,right:l.right+n.scrollX,pending:!1}})}function fe(e){ne(e.lastNode,e.nextNode,e.parentDom,e.lifecycle,null,null,!1,!0),e.clipData.pending=!1}function ve(){Ee=!0,setTimeout(he,100)}function he(){De.forEach(fe),De.clear(),Ee=!1}function pe(e,n,t,l,r,o){if(performance.now()>Ue+2e3){var i=De.get(n);return void 0===i?De.set(n,{lastNode:t,nextNode:l,parentDom:r,clipData:e,lifecycle:o}):i.nextNode=l,e.pending=!0,Ee===!1&&ve(),!0}return he(),!1}function me(e){for(var n=0;n<Ke.length;n++){var t=Ke[n];if(t.dom===e)return t}return null}function ye(e){for(var n=0;n<Ke.length;n++){var t=Ke[n];if(t===e)return void Ke.splice(n,1)}}function ge(e,n){var t=me(n),l=new ce;if(null===t)f(e,n,l,{},null,!1),l.trigger(),Ke.push({node:e,dom:n});else{var r=B();te(t.node,e,n,l,{},null,null,!1),l.trigger(),null===e&&ye(t),t.node=e,window.node=e,W(r)}}var Ce={};Ce.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},Ce.classCallCheck=function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")},Ce.createClass=function(){function e(e,n){for(var t=0;t<n.length;t++){var l=n[t];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}return function(n,t,l){return t&&e(n.prototype,t),l&&e(n,l),n}}(),Ce.extends=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e};var ke=!0,we="http://www.w3.org/1999/xlink",be="http://www.w3.org/XML/1998/namespace",Ne={},xe={},Oe={};$("xlink:href,xlink:arcrole,xlink:actuate,xlink:role,xlink:titlef,xlink:type",Oe,we),$("xml:base,xml:lang,xml:space",Oe,be),$("volume,value",Ne,!0),$("muted,scoped,loop,open,checked,default,capture,disabled,selected,readonly,multiple,required,autoplay,controls,seamless,reversed,allowfullscreen,novalidate",xe,!0);var Se=window.screen.width,_e=window.screen.height,je=0,Te=0,Ue=0;window.onscroll=function(e){je=window.scrollX,Te=window.scrollY,Ue=performance.now()},window.resize=function(e){je=window.scrollX,Te=window.scrollY,Se=window.screen.width,_e=window.screen.height,Ue=performance.now()},ce.prototype={refresh:function(){this.scrollX=window.scrollX,this.scrollY=window.scrollY},addListener:function(e){this._listeners.push(e)},trigger:function(){for(var e=0;e<this._listeners.length;e++)this._listeners[e]()}};var De=new Map,Ee=!1,Ke=[],Ae={render:ge};return Ae});
/*!
* inferno-server v0.7.3
* inferno-server v0.7.4
* (c) 2016 Dominic Gannaway

@@ -68,3 +68,3 @@ * Released under the MPL-2.0 License.

function isInvalidNode(obj) {
return obj === void 0 || obj === null || obj === false;
return obj === null || obj === false || obj === void 0;
}

@@ -90,9 +90,2 @@

instance.componentWillMount();
var shouldUpdate = instance.shouldComponentUpdate();
if (shouldUpdate) {
instance.componentWillUpdate();
var pendingState = instance._pendingState;
var oldState = instance.state;
instance.state = babelHelpers.extends({}, oldState, pendingState);
}
var node = instance.render();

@@ -99,0 +92,0 @@ instance._pendingSetState = false;

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

!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.InfernoServer=t()}(this,function(){"use strict";function n(n,e){if(!o(n)){var r=t(n);(r&&n.length>0||!r)&&(e?e.children=n:e={children:n})}return e}function t(n){return n instanceof Array}function e(n){return void 0!==n.prototype.render}function r(n){return"string"==typeof n||"number"==typeof n}function o(n){return void 0===n||null===n}function u(n){return void 0===n||null===n||n===!1}function i(n){return"function"==typeof n}function f(t,r,u,i){if(r=n(u,r),e(t)){var f=new t(r),c=f.getChildContext();o(c)||(i=l.extends({},i,c)),f.context=i,f._pendingSetState=!0,f.componentWillMount();var p=f.shouldComponentUpdate();if(p){f.componentWillUpdate();var s=f._pendingState,d=f.state;f.state=l.extends({},d,s)}var v=f.render();return f._pendingSetState=!1,a(v,i)}var y=t(r);return a(y,i)}function c(n,e){if(n&&t(n)){for(var o=[],i=!1,f=0;f<n.length;f++){var c=n[f];r(c)?(i===!0&&o.push("<!-- -->"),o.push(c),i=!0):(i=!1,o.push(a(c,e)))}return o.join("")}return u(n)?"":r(n)?n:a(n,e)||""}function a(n,t){if(!u(n)){var e=function(){var e=n.tag,r=[];if(i(e))return{v:f(e,n.attrs,n.children,t)};o(n.className)||r.push('class="'+n.className+'"');var u=n.attrs;return o(u)||!function(){var n=Object.keys(u);n.forEach(function(t,e){var o=n[e];r.push(o+'="'+u[o]+'"')})}(),{v:"<"+e+(r.length>0?" "+r.join(" "):"")+">"+c(n.children,t)+"</"+e+">"}}();if("object"===("undefined"==typeof e?"undefined":l.typeof(e)))return e.v}}function p(n){return a(n,null)}var l={};l.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n},l.extends=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n};var s={renderToString:p};return s});
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):n.InfernoServer=e()}(this,function(){"use strict";function n(n,t){if(!o(n)){var r=e(n);(r&&n.length>0||!r)&&(t?t.children=n:t={children:n})}return t}function e(n){return n instanceof Array}function t(n){return void 0!==n.prototype.render}function r(n){return"string"==typeof n||"number"==typeof n}function o(n){return void 0===n||null===n}function u(n){return null===n||n===!1||void 0===n}function i(n){return"function"==typeof n}function f(e,r,u,i){if(r=n(u,r),t(e)){var f=new e(r),c=f.getChildContext();o(c)||(i=s.extends({},i,c)),f.context=i,f._pendingSetState=!0,f.componentWillMount();var l=f.render();return f._pendingSetState=!1,a(l,i)}var p=e(r);return a(p,i)}function c(n,t){if(n&&e(n)){for(var o=[],i=!1,f=0;f<n.length;f++){var c=n[f];r(c)?(i===!0&&o.push("<!-- -->"),o.push(c),i=!0):(i=!1,o.push(a(c,t)))}return o.join("")}return u(n)?"":r(n)?n:a(n,t)||""}function a(n,e){if(!u(n)){var t=function(){var t=n.tag,r=[];if(i(t))return{v:f(t,n.attrs,n.children,e)};o(n.className)||r.push('class="'+n.className+'"');var u=n.attrs;return o(u)||!function(){var n=Object.keys(u);n.forEach(function(e,t){var o=n[t];r.push(o+'="'+u[o]+'"')})}(),{v:"<"+t+(r.length>0?" "+r.join(" "):"")+">"+c(n.children,e)+"</"+t+">"}}();if("object"===("undefined"==typeof t?"undefined":s.typeof(t)))return t.v}}function l(n){return a(n,null)}var s={};s.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n},s.classCallCheck=function(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")},s.createClass=function(){function n(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}}(),s.extends=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n};var p={renderToString:l};return p});
/*!
* inferno-test-utils v0.7.3
* inferno-test-utils v0.7.4
* (c) 2016 Dominic Gannaway

@@ -4,0 +4,0 @@ * Released under the MPL-2.0 License.

/*!
* inferno v0.7.3
* inferno v0.7.4
* (c) 2016 Dominic Gannaway

@@ -125,3 +125,3 @@ * Released under the MPL-2.0 License.

var children = !isNullOrUndefined(shape.children) ? shape.children : null;
var children = isNullOrUndefined(shape.children) ? null : shape.children;
var childrenIsDynamic = children && children.arg !== void 0 ? true : false;

@@ -138,3 +138,3 @@

var key = shape.key !== void 0 ? shape.key : null;
var key = shape.key === void 0 ? null : shape.key;
var keyIsDynamic = !isNullOrUndefined(key) && !isNullOrUndefined(key.arg);

@@ -145,3 +145,3 @@

var className = shape.className !== void 0 ? shape.className : null;
var className = shape.className === void 0 ? null : shape.className;
var classNameIsDynamic = className && className.arg !== void 0 ? true : false;

@@ -156,3 +156,3 @@

},
tag: !tagIsDynamic ? tag : null,
tag: tagIsDynamic ? null : tag,
className: className !== '' && className ? className : null,

@@ -159,0 +159,0 @@ style: style !== '' && style ? style : null,

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Inferno=e()}(this,function(){"use strict";function t(t){return void 0===t||null===t}function e(t){return"o"===t[0]&&"n"===t[1]&&t.length>3}function n(t){this.bp=t,this.dom=null,this.instance=null,this.tag=null,this.children=null,this.style=null,this.className=null,this.attrs=null,this.events=null,this.hooks=null,this.key=null,this.clipData=null}function r(t){return new n(t)}function s(e,r){var s=e.tag||null,l=!(!s||void 0===s.arg),o=t(e.children)?null:e.children,i=!(!o||void 0===o.arg),a=e.attrs||null,u=!(!a||void 0===a.arg),c=e.hooks||null,f=!(!c||void 0===c.arg),h=e.events||null,y=!(!h||void 0===h.arg),d=void 0!==e.key?e.key:null,v=!t(d)&&!t(d.arg),m=e.style||null,g=!(!m||void 0===m.arg),p=void 0!==e.className?e.className:null,b=!(!p||void 0===p.arg),k={lazy:e.lazy||!1,dom:null,pools:{keyed:{},nonKeyed:[]},tag:l?null:s,className:""!==p&&p?p:null,style:""!==m&&m?m:null,isComponent:l,hasAttrs:u||!!a,hasHooks:f,hasEvents:y,hasStyle:g||!(""===m||!m),hasClassName:b||!(""===p||!p),childrenType:void 0===r?o?5:0:r,attrKeys:null,eventKeys:null,isSVG:e.isSVG||!1};return function(){var t=new n(k);return l===!0&&(t.tag=arguments[s.arg]),i===!0&&(t.children=arguments[o.arg]),u===!0?t.attrs=arguments[a.arg]:t.attrs=a,f===!0&&(t.hooks=arguments[c.arg]),y===!0&&(t.events=arguments[h.arg]),v===!0&&(t.key=arguments[d.arg]),g===!0?t.style=arguments[m.arg]:t.style=k.style,b===!0?t.className=arguments[p.arg]:t.className=k.className,t}}function l(t,e){var n=void 0;return n=e===!0?document.createElementNS("http://www.w3.org/2000/svg",t):document.createElement(t)}function o(t,e,n){if(u){var r=l(t,n);return e&&i(e,r),r}return null}function i(n,r){for(var s=Object.keys(n),l=0;l<s.length;l++){var o=s[l],i=n[o];"className"===o?r.className=i:i===!0?r.setAttribute(o,o):t(i)||i===!1||e(o)||r.setAttribute(o,i)}}var a={};a.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a.classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a.createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a.extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},n.prototype={setAttrs:function(t){return this.attrs=t,this},setTag:function(t){return this.tag=t,this},setStyle:function(t){return this.style=t,this},setClassName:function(t){return this.className=t,this},setChildren:function(t){return this.children=t,this},setHooks:function(t){return this.hooks=t,this},setEvents:function(t){return this.events=t,this},setKey:function(t){return this.key=t,this}};var u="undefined"!=typeof window&&window.document,c={createBlueprint:s,createVNode:r,universal:{createElement:o}};return c});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Inferno=e()}(this,function(){"use strict";function t(t){return void 0===t||null===t}function e(t){return"o"===t[0]&&"n"===t[1]&&t.length>3}function n(t){this.bp=t,this.dom=null,this.instance=null,this.tag=null,this.children=null,this.style=null,this.className=null,this.attrs=null,this.events=null,this.hooks=null,this.key=null,this.clipData=null}function r(t){return new n(t)}function s(e,r){var s=e.tag||null,l=!(!s||void 0===s.arg),o=t(e.children)?null:e.children,i=!(!o||void 0===o.arg),a=e.attrs||null,u=!(!a||void 0===a.arg),c=e.hooks||null,f=!(!c||void 0===c.arg),h=e.events||null,y=!(!h||void 0===h.arg),d=void 0===e.key?null:e.key,v=!t(d)&&!t(d.arg),m=e.style||null,g=!(!m||void 0===m.arg),p=void 0===e.className?null:e.className,b=!(!p||void 0===p.arg),k={lazy:e.lazy||!1,dom:null,pools:{keyed:{},nonKeyed:[]},tag:l?null:s,className:""!==p&&p?p:null,style:""!==m&&m?m:null,isComponent:l,hasAttrs:u||!!a,hasHooks:f,hasEvents:y,hasStyle:g||!(""===m||!m),hasClassName:b||!(""===p||!p),childrenType:void 0===r?o?5:0:r,attrKeys:null,eventKeys:null,isSVG:e.isSVG||!1};return function(){var t=new n(k);return l===!0&&(t.tag=arguments[s.arg]),i===!0&&(t.children=arguments[o.arg]),u===!0?t.attrs=arguments[a.arg]:t.attrs=a,f===!0&&(t.hooks=arguments[c.arg]),y===!0&&(t.events=arguments[h.arg]),v===!0&&(t.key=arguments[d.arg]),g===!0?t.style=arguments[m.arg]:t.style=k.style,b===!0?t.className=arguments[p.arg]:t.className=k.className,t}}function l(t,e){var n=void 0;return n=e===!0?document.createElementNS("http://www.w3.org/2000/svg",t):document.createElement(t)}function o(t,e,n){if(u){var r=l(t,n);return e&&i(e,r),r}return null}function i(n,r){for(var s=Object.keys(n),l=0;l<s.length;l++){var o=s[l],i=n[o];"className"===o?r.className=i:i===!0?r.setAttribute(o,o):t(i)||i===!1||e(o)||r.setAttribute(o,i)}}var a={};a.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a.classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a.createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a.extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},n.prototype={setAttrs:function(t){return this.attrs=t,this},setTag:function(t){return this.tag=t,this},setStyle:function(t){return this.style=t,this},setClassName:function(t){return this.className=t,this},setChildren:function(t){return this.children=t,this},setHooks:function(t){return this.hooks=t,this},setEvents:function(t){return this.events=t,this},setKey:function(t){return this.key=t,this}};var u="undefined"!=typeof window&&window.document,c={createBlueprint:s,createVNode:r,universal:{createElement:o}};return c});
{
"name": "inferno",
"version": "0.7.3",
"version": "0.7.4",
"license": "MPL-2.0",

@@ -29,4 +29,3 @@ "description": "An extremely fast, isomorphic JavaScript library for building modern user interfaces",

"main": "inferno.js",
"jsnext:main": "dist/inferno.es2015.js",
"repository": "https://github.com/trueadm/inferno"
}
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