/**
 * data-components v0.1.0 <https://github.com/rafaelrinaldi/data-components>
 * Released under MIT license
 * Author: Rafael Rinaldi <http://rinaldi.io>
 **/
!function(exports){"use strict";function $(selector){var query=exports.document.querySelectorAll;return[].slice.call(query(selector))}function mount(properties,options){var id=properties.id,sandbox=properties.sandbox,node=properties.node,exports=options&&options.exports;if(!isRegisteredComponent(id))return console.warn('No implementation found for component "'+id+'"'),null;var Component=store[id],instance=new Component(node,options);return sandbox[exports?exports:id]=instance,instance}function isRegisteredComponent(component){return Object.keys(store).some(function(id){return id===component})}function components(){var selector="[data-component]",sandbox={get:function(id){return sandbox[id]}};return $(selector).forEach(function(node,index){mount({sandbox:sandbox,node:node,index:index,id:node.dataset.component,options:node.dataset})}),sandbox}var store={};"function"==typeof define&&define.amd?define(function(){return components}):"undefined"!=typeof module&&module.exports?module.exports=components:exports.components=components}(this);
/**
 * data-components v0.1.0 <https://github.com/rafaelrinaldi/data-components>
 * Released under MIT license
 * Author: Rafael Rinaldi <http://rinaldi.io>
 **/
!function(exports){"use strict";function $(selector){var lookup=exports.document.querySelectorAll(selector);return[].slice.call(lookup)}function mixin(target){for(var from,to=target,index=0,total=arguments.length,hasOwnProperty=Object.prototype.hasOwnProperty;++index<total;)if(from=arguments[index],null!==from)for(var key in from)hasOwnProperty.call(from,key)&&(to[key]=from[key]);return to}function register(component,implementation){var newItem={};return newItem[component]=implementation,mixin(store,newItem)}function mount(properties,options){var id=properties.id,node=properties.node,exports=options&&options.exports;if(!isRegisteredComponent(id))return console.warn('No implementation found for component "'+id+'"'),null;var Component=store[id],instance=new Component(node,options);properties.sandbox[exports?exports:id]=instance}function isRegisteredComponent(component){return Object.keys(store).some(function(id){return id===component})}function update(sandbox){var selector="[data-component]";return $(selector).forEach(function(node,index){var options=mixin({},node.dataset);mount({sandbox:sandbox,node:node,index:index,id:options.component},options)}),sandbox}function components(presets){presets&&"object"==typeof presets&&(store=mixin(store,presets));var sandbox={get:function(id){return this[id]},set:function(id,value){store=register(id,value),update(sandbox)}};return update(sandbox)}var store={};"function"==typeof define&&define.amd?define(function(){return components}):"undefined"!=typeof module&&module.exports?module.exports=components:exports.components=components}(this);
update minified bundle