UNPKG

quialaboriosam

Version:

microbe.js - A modular JS library for DOM manipulation, and more

3 lines 47.2 kB
/*! Microbe v0.4.15 | (c) 2014-2015 Sociomantic Labs | http://m.icro.be/license */ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.µ=e()}}(function(){return function e(t,n,r){function o(a,u){if(!n[a]){if(!t[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[a]={exports:{}};t[a][0].call(f.exports,function(e){var n=t[a][1][e];return o(n?n:e)},f,f.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){"use strict";var r="[object Microbe]",o="0.4.15",i=function(e,t,n){return new i.core.__init__(e,t,n)};e("./selectorEngine/init")(i,r,o),e("./modules/tools")(i),e("./modules/pageStyles")(i),e("./modules/dom")(i),e("./modules/elements")(i),e("./modules/http")(i),e("./modules/observe")(i),e("./modules/events")(i),t.exports=i.core.constructor=i},{"./modules/dom":12,"./modules/elements":13,"./modules/events":14,"./modules/http":15,"./modules/observe":16,"./modules/pageStyles":17,"./modules/tools":18,"./selectorEngine/init":22}],2:[function(e,t,n){function r(){}var o=t.exports={};o.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var n=[];return window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(e){n.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),o.title="browser",o.browser=!0,o.env={},o.argv=[],o.on=r,o.addListener=r,o.once=r,o.off=r,o.removeListener=r,o.removeAllListeners=r,o.emit=r,o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")}},{}],3:[function(e,t,n){(function(e){!function(e){"use strict";function t(){l(g),g=f(c)}function n(e,t){var n=Object.getNotifier(e),r=j.get(n),o=j.get(n)[t];r[t]="undefined"==typeof o?1:o+1}function r(e,t){var n=Object.getNotifier(e),r=j.get(n),o=j.get(n)[t];r[t]=o>0?o-1:0}function o(e,t,n){var r=!1;if(t)for(var o=0,i=t.length;i>o;o++){var a=t[o];if(e[a]>0)return!1;a===n&&(r=!0)}return r}function i(e){if(!w.has(e)){var t=Object.create(b);Object.defineProperty(t,"__target",{value:e}),O.set(t,[]),j.set(t,{}),w.set(e,t)}return w.get(e)}function a(e,n){for(var r=Object.getNotifier(e),i=n.type,a=j.get(r),u=O.get(r),s=0,c=u.length;c>s;s++){var f=u[s],l=f.accept;if(o(a,l,i)){var d=f.callback,p=[];x.has(d)?p=x.get(d):x.set(d,p),p.push(n)}}t()}function u(e){if(!_.get(e)&&!x.has(e)){_["delete"](e);var t=m.indexOf(e);-1!==t&&m.splice(t,1)}}function s(e){var t=x.get(e);if(x["delete"](e),!t||0===t.length)return!1;try{e.call(void 0,t)}catch(n){}return u(e),!0}function c(){for(var e=m.slice(),t=!1,n=0,r=e.length;r>n;n++){var o=e[n];s(o)&&(t=!0)}return t}var f=e.setImmediate||e.msSetImmediate,l=e.clearImmediate||e.msClearImmediate;f||(f=function(e,t){return setTimeout(e,0,t)},l=function(e){clearTimeout(e)});var d;if("undefined"!=typeof WeakMap)d=WeakMap;else{var p="__weakmap:"+(1e9*Math.random()>>>0),h=(new Date).getTime()%1e9,v={};d=function(){this.name=p+(1e9*Math.random()>>>0)+(h++ +"__")},d.prototype={has:function(e){return e&&e.hasOwnProperty(this.name)},get:function(e){var t=e&&e[this.name];return t===v?void 0:t},set:function(e,t){Object.defineProperty(e,this.name,{value:"undefined"==typeof t?v:t,enumerable:!1,writable:!0,configurable:!0})},"delete":function(e){return delete e[this.name]}};var y=Object.getOwnPropertyNames;Object.defineProperty(Object,"getOwnPropertyNames",{value:function(e){return y(e).filter(function(e){return e.substr(0,p.length)!==p})},writable:!0,enumerable:!1,configurable:!0})}var g,m=[],b=Object.create(Object.prototype);Object.defineProperty(b,"notify",{value:function(e){var t=this;if(Object(t)!==t)throw new TypeError("this must be an Object, given "+t);if(t.__target){if(Object(e)!==e)throw new TypeError("changeRecord must be an Object, given "+e);var n=e.type;if("string"!=typeof n)throw new TypeError("changeRecord.type must be a string, given "+n);var r=O.get(t);if(r&&0!==r.length){var o=t.__target,i=Object.create(Object.prototype,{object:{value:o,writable:!1,enumerable:!0,configurable:!1}});for(var u in e)if("object"!==u){var s=e[u];Object.defineProperty(i,u,{value:s,writable:!1,enumerable:!0,configurable:!1})}Object.preventExtensions(i),a(t.__target,i)}}},writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(b,"performChange",{value:function(e,t){var o=this;if(Object(o)!==o)throw new TypeError("this must be an Object, given "+o);if(o.__target){if("string"!=typeof e)throw new TypeError("changeType must be a string given "+o);if("function"!=typeof t)throw new TypeError("changeFn must be a function, given "+t);n(o.__target,e);var i,u;try{u=t.call(void 0)}catch(s){i=s}if(r(o.__target,e),"undefined"!=typeof i)throw i;var c=O.get(o);if(0!==c.length){var f=o.__target,l=Object.create(Object.prototype,{object:{value:f,writable:!1,enumerable:!0,configurable:!1},type:{value:e,writable:!1,enumerable:!0,configurable:!1}});if("undefined"!=typeof u)for(var d in u)if("object"!==d&&"type"!==d){var p=u[d];Object.defineProperty(l,d,{value:p,writable:!1,enumerable:!0,configurable:!1})}Object.preventExtensions(l),a(o.__target,l)}}},writable:!0,enumerable:!1,configurable:!0});var w=new d,O=new d,j=new d,x=new d,_=new d;Object.defineProperties(Object,{observe:{value:function(e,t,n){if(Object(e)!==e)throw new TypeError("target must be an Object, given "+e);if("function"!=typeof t)throw new TypeError("observer must be a function, given "+t);if(Object.isFrozen(t))throw new TypeError("observer cannot be frozen");var r;if("undefined"==typeof n)r=["add","update","delete","reconfigure","setPrototype","preventExtensions"];else{if(Object(n)!==n)throw new TypeError("accept must be an object, given "+n);var o=n.length;if("number"!=typeof o||o>>>0!==o||1>o)throw new TypeError("the 'length' property of accept must be a positive integer, given "+o);var a=0;for(r=[];o>a;){var u=n[a];if("string"!=typeof u)throw new TypeError("accept must contains only string, given"+u);r.push(u),a++}}for(var s=i(e),c=O.get(s),f=0,l=c.length;l>f;f++)if(c[f].callback===t)return c[f].accept=r,e;return c.push({callback:t,accept:r}),-1===m.indexOf(t)&&m.push(t),_.has(t)?_.set(t,_.get(t)+1):_.set(t,1),e},writable:!0,configurable:!0},unobserve:{value:function(e,t){if(Object(e)!==e)throw new TypeError("target must be an Object, given "+e);if("function"!=typeof t)throw new TypeError("observer must be a function, given "+t);for(var n=i(e),r=O.get(n),o=0,a=r.length;a>o;o++)if(r[o].callback===t){r.splice(o,1),_.set(t,_.get(t)-1),u(t);break}return e},writable:!0,configurable:!0},deliverChangeRecords:{value:function(e){if("function"!=typeof e)throw new TypeError("callback must be a function, given "+e);for(;s(e););},writable:!0,configurable:!0},getNotifier:{value:function(e){if(Object(e)!==e)throw new TypeError("target must be an Object, given "+e);return Object.isFrozen(e)?null:i(e)},writable:!0,configurable:!0}})}("undefined"!=typeof e?e:this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(e,t,n){!function(e){"use strict";function r(e){return"undefined"==typeof e?!1:"get"in e||"set"in e}function o(e,t){for(var n=Object.getOwnPropertyDescriptor(e,t),r=Object.getPrototypeOf(e);"undefined"==typeof n&&null!==r;)n=Object.getOwnPropertyDescriptor(r,t),r=Object.getPrototypeOf(r);return n}function i(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function a(e,t){if(e=Number(e),isNaN(e)||!isFinite(e)||0>e||e%1!==0)throw new RangeError(t.replace("$",e));return e}function u(e,t,n){var r="_"+d++ +t;e.hasOwnProperty(t)&&Object.defineProperty(e,r,{value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,t,{get:function(){return this[r]},set:function(e){if(!i(e,this[r])){var n=this[r];Object.defineProperty(this,r,{value:e,writable:!0,enumerable:!1,configurable:!0});var o=Object.getNotifier(this);o.notify({type:"update",name:t,oldValue:n})}},enumerable:!0,configurable:!0})}function s(e){if(0===arguments.length&&(e=0),arguments.length<=1&&"number"==typeof e){if(!(this instanceof s))return new s(e);this.length=e}else{if(!(this instanceof s))return s.fromArray(f(arguments));for(var t=0,n=arguments.length;n>t;t++)this[t]=arguments[t];this.length=arguments.length}}var c={};"object"==typeof t&&"undefined"!=typeof n?t.exports=c:e.ObserveUtils=c;var f=Function.call.bind(Array.prototype.slice),l=Function.call.bind(Array.prototype.map),d=0;c.defineObservableProperties=function(e,t){if(Object(e)!==e)throw new TypeError("target must be an Object, given "+e);for(t=f(arguments,1);t.length>0;){var n=t.shift(),i=o(e,n);if(!i||!r(i)){var a=i&&i.value;u(e,n,a)}}return e},s.observe=function(e,t){Object.observe(e,t,["add","update","delete","splice"])},s.unobserve=function(e,t){Object.unobserve(e,t)},s.fromArray=function(e){if(!Array.isArray(e))throw new Error;for(var t=new s,n=0,r=e.length;r>n;n++)t[n]=e[n];return t.length=e.length,t},Object.defineProperties(s.prototype,{_length:{value:0,enumerable:!1,configurable:!0,writable:!0},length:{get:function(){return this._length},set:function(e){e=a(e,"Invalid list length : $");var t=Object.getNotifier(this),n=this._length,r=[],o=this;e!==n&&t.performChange("splice",function(){Object.defineProperty(o,"_length",{value:e,enumerable:!1,configurable:!0,writable:!0});var i;if(n>e){for(var a=e;n>a;a++)r.push(o[a]),o["delete"](a);i={index:e,removed:r,addedCount:0}}else i={index:n,removed:r,addedCount:e-n};return t.notify({type:"update",name:"length",oldValue:n}),i})},enumerable:!0,configurable:!0}}),s.prototype.toArray=function(){return f(this)},s.prototype.toString=function(){return this.toArray().toString()},s.prototype.toJSON=function(){return this.toArray()},s.prototype.set=function(e,t){e=a(e,"Invalid index : $");var n=Object.getNotifier(this),r=this.length,o=this;if(e>=r)n.performChange("splice",function(){return o[e]=t,n.notify({type:"add",name:e}),Object.defineProperty(o,"_length",{value:e+1,enumerable:!1,configurable:!0,writable:!0}),n.notify({type:"update",name:"length",oldValue:r}),{index:r,removed:[],addedCount:o.length-r}});else if(!i(t,this[e])){var u=this[e];this[e]=t,n.notify({type:"update",name:e,oldValue:u})}return t},s.prototype["delete"]=function(e){if(e=a(e,"Invalid index : $"),this.hasOwnProperty(e)){var t=this[e];if(delete this[e]){var n=Object.getNotifier(this);return n.notify({type:"delete",name:e,oldValue:t}),!0}}return!1},s.prototype.concat=function(e){return e=l(arguments,function(e){return e instanceof s?e.toArray():e}),s.fromArray(Array.prototype.concat.apply(this.toArray(),e))},s.prototype.join=function(e){return this.toArray().join(e)},s.prototype.pop=function(){if(Object(this)!==this)throw new TypeError("this mus be an object given : "+this);var e=a(this.length,"this must have a finite integer property 'length', given : $");if(0!==e){var t=e-1,n=this[t],r=Object.getNotifier(this),o=this;return r.performChange("splice",function(){return delete o[t],r.notify({type:"delete",name:t,oldValue:n}),Object.defineProperty(o,"_length",{value:t,enumerable:!1,configurable:!0,writable:!0}),r.notify({type:"update",name:"length",oldValue:e}),{index:t,removed:[n],addedCount:0}}),n}},s.prototype.push=function(){if(arguments.length>0){var e,t,n=arguments.length,r=arguments,o=this.length,i=Object.getNotifier(this),a=this;i.performChange("splice",function(){for(e=0;n>e;e++)t=o+e,a[t]=r[e],i.notify({type:"add",name:t});return Object.defineProperty(a,"_length",{value:o+n,enumerable:!1,configurable:!0,writable:!0}),i.notify({type:"update",name:"length",oldValue:o}),{index:o,removed:[],addedCount:n}})}return this.length},s.prototype.reverse=function(){for(var e=this.toArray(),t=e.slice().reverse(),n=0,r=t.length;r>n;n++)this.set(n,t[n]);return this},s.prototype.shift=function(){if(0!==this.length){var e=this.toArray(),t=e.shift(),n=Object.getNotifier(this),r=this,o=this.length;return n.performChange("splice",function(){for(var i=0,a=e.length;a>i;i++)r.set(i,e[i]);return r["delete"](o-1),Object.defineProperty(r,"_length",{value:o-1,enumerable:!1,configurable:!0,writable:!0}),n.notify({type:"update",name:"length",oldValue:o}),{index:0,removed:[t],addedCount:0}}),t}},s.prototype.slice=function(e,t){return s.fromArray(this.toArray().slice(e,t))},s.prototype.sort=function(e){for(var t=this.toArray(),n=t.slice().sort(e),r=0,o=n.length;o>r;r++)this.set(r,n[r]);return this},s.prototype.splice=function(){var e=[],t=arguments.length;if(t>0){var n,r,o=this.toArray(),a=Object.getNotifier(this),u=this.length,c=this,f=arguments[0];e=Array.prototype.splice.apply(o,arguments),a.performChange("splice",function(){for(n=0,r=o.length;r>n;n++){var s=c[n];i(s,o[n])||(c[n]=o[n],a.notify(n>=u?{type:"add",name:n}:{type:"update",name:n,oldValue:s}))}if(u!==o.length){if(u>o.length)for(n=o.length;u>n;n++)c["delete"](n);Object.defineProperty(c,"_length",{value:o.length,enumerable:!1,configurable:!0,writable:!0}),a.notify({type:"update",name:"length",oldValue:u})}return{index:f,removed:e,addedCount:t>=2?t-2:0}})}return s.fromArray(e)},s.prototype.unshift=function(){var e=arguments.length;if(e>0){var t=this.toArray(),n=Object.getNotifier(this),r=this.length,o=this;Array.prototype.unshift.apply(t,arguments),n.performChange("splice",function(){for(var a=0,u=t.length;u>a;a++){var s=o[a];i(s,t[a])||(o[a]=t[a],n.notify(a>=r?{type:"add",name:a}:{type:"update",name:a,oldValue:s}))}if(r!==t.length){if(r>t.length)for(a=t.length;r>a;a++)o["delete"](a);Object.defineProperty(o,"_length",{value:t.length,enumerable:!1,configurable:!0,writable:!0}),n.notify({type:"update",name:"length",oldValue:r})}return{index:0,removed:[],addedCount:e}})}return this.length},s.prototype.reduce=Array.prototype.reduce,s.prototype.reduceRight=Array.prototype.reduceRight,s.prototype.indexOf=Array.prototype.indexOf,s.prototype.lastIndexOf=Array.prototype.lastIndexOf,s.prototype.every=Array.prototype.every,s.prototype.filter=function(e,t){return s.fromArray(this.toArray().filter(e,t))},s.prototype.forEach=Array.prototype.forEach,s.prototype.map=function(e,t){return s.fromArray(this.toArray().map(e,t))},s.prototype.some=Array.prototype.some,c.List=s}(this)},{}],5:[function(e,t,n){"use strict";t.exports=e("./lib/core.js"),e("./lib/done.js"),e("./lib/es6-extensions.js"),e("./lib/node-extensions.js")},{"./lib/core.js":6,"./lib/done.js":7,"./lib/es6-extensions.js":8,"./lib/node-extensions.js":9}],6:[function(e,t,n){"use strict";function r(e){function t(e){return null===s?void f.push(e):void a(function(){var t=s?e.onFulfilled:e.onRejected;if(null===t)return void(s?e.resolve:e.reject)(c);var n;try{n=t(c)}catch(r){return void e.reject(r)}e.resolve(n)})}function n(e){try{if(e===l)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void i(t.bind(e),n,r)}s=!0,c=e,u()}catch(o){r(o)}}function r(e){s=!1,c=e,u()}function u(){for(var e=0,n=f.length;n>e;e++)t(f[e]);f=null}if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");var s=null,c=null,f=[],l=this;this.then=function(e,n){return new l.constructor(function(r,i){t(new o(e,n,r,i))})},i(e,n,r)}function o(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function i(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(o){if(r)return;r=!0,n(o)}}var a=e("asap");t.exports=r},{asap:10}],7:[function(e,t,n){"use strict";var r=e("./core.js"),o=e("asap");t.exports=r,r.prototype.done=function(e,t){var n=arguments.length?this.then.apply(this,arguments):this;n.then(null,function(e){o(function(){throw e})})}},{"./core.js":6,asap:10}],8:[function(e,t,n){"use strict";function r(e){this.then=function(t){return"function"!=typeof t?this:new o(function(n,r){i(function(){try{n(t(e))}catch(o){r(o)}})})}}var o=e("./core.js"),i=e("asap");t.exports=o,r.prototype=o.prototype;var a=new r(!0),u=new r(!1),s=new r(null),c=new r(void 0),f=new r(0),l=new r("");o.resolve=function(e){if(e instanceof o)return e;if(null===e)return s;if(void 0===e)return c;if(e===!0)return a;if(e===!1)return u;if(0===e)return f;if(""===e)return l;if("object"==typeof e||"function"==typeof e)try{var t=e.then;if("function"==typeof t)return new o(t.bind(e))}catch(n){return new o(function(e,t){t(n)})}return new r(e)},o.all=function(e){var t=Array.prototype.slice.call(e);return new o(function(e,n){function r(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,function(e){r(i,e)},n)}t[i]=a,0===--o&&e(t)}catch(s){n(s)}}if(0===t.length)return e([]);for(var o=t.length,i=0;i<t.length;i++)r(i,t[i])})},o.reject=function(e){return new o(function(t,n){n(e)})},o.race=function(e){return new o(function(t,n){e.forEach(function(e){o.resolve(e).then(t,n)})})},o.prototype["catch"]=function(e){return this.then(null,e)}},{"./core.js":6,asap:10}],9:[function(e,t,n){"use strict";var r=e("./core.js"),o=e("asap");t.exports=r,r.denodeify=function(e,t){return t=t||1/0,function(){var n=this,o=Array.prototype.slice.call(arguments);return new r(function(r,i){for(;o.length&&o.length>t;)o.pop();o.push(function(e,t){e?i(e):r(t)});var a=e.apply(n,o);!a||"object"!=typeof a&&"function"!=typeof a||"function"!=typeof a.then||r(a)})}},r.nodeify=function(e){return function(){var t=Array.prototype.slice.call(arguments),n="function"==typeof t[t.length-1]?t.pop():null,i=this;try{return e.apply(this,arguments).nodeify(n,i)}catch(a){if(null===n||"undefined"==typeof n)return new r(function(e,t){t(a)});o(function(){n.call(i,a)})}}},r.prototype.nodeify=function(e,t){return"function"!=typeof e?this:void this.then(function(n){o(function(){e.call(t,null,n)})},function(n){o(function(){e.call(t,n)})})}},{"./core.js":6,asap:10}],10:[function(e,t,n){(function(e){function n(){for(;o.next;){o=o.next;var e=o.task;o.task=void 0;var t=o.domain;t&&(o.domain=void 0,t.enter());try{e()}catch(r){if(s)throw t&&t.exit(),setTimeout(n,0),t&&t.enter(),r;setTimeout(function(){throw r},0)}t&&t.exit()}a=!1}function r(t){i=i.next={task:t,domain:s&&e.domain,next:null},a||(a=!0,u())}var o={task:void 0,next:null},i=o,a=!1,u=void 0,s=!1;if("undefined"!=typeof e&&e.nextTick)s=!0,u=function(){e.nextTick(n)};else if("function"==typeof setImmediate)u="undefined"!=typeof window?setImmediate.bind(window,n):function(){setImmediate(n)};else if("undefined"!=typeof MessageChannel){var c=new MessageChannel;c.port1.onmessage=n,u=function(){c.port2.postMessage(0)}}else u=function(){setTimeout(n,0)};t.exports=r}).call(this,e("_process"))},{_process:2}],11:[function(e,t,n){(function(e,t){!function(t,n){"use strict";function r(e){return v[h]=o.apply(n,e),h++}function o(e){var t=[].slice.call(arguments,1);return function(){"function"==typeof e?e.apply(n,t):new Function(""+e)()}}function i(e){if(y)setTimeout(o(i,e),0);else{var t=v[e];if(t){y=!0;try{t()}finally{a(e),y=!1}}}}function a(e){delete v[e]}function u(){p=function(){var t=r(arguments);return e.nextTick(o(i,t)),t}}function s(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}function c(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"==typeof n.data&&0===n.data.indexOf(e)&&i(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),p=function(){var n=r(arguments);return t.postMessage(e+n,"*"),n}}function f(){var e=new MessageChannel;e.port1.onmessage=function(e){var t=e.data;i(t)},p=function(){var t=r(arguments);return e.port2.postMessage(t),t}}function l(){var e=g.documentElement;p=function(){var t=r(arguments),n=g.createElement("script");return n.onreadystatechange=function(){i(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n),t}}function d(){p=function(){var e=r(arguments);return setTimeout(o(i,e),0),e}}if(!t.setImmediate){var p,h=1,v={},y=!1,g=t.document,m=Object.getPrototypeOf&&Object.getPrototypeOf(t);m=m&&m.setTimeout?m:t,"[object process]"==={}.toString.call(t.process)?u():s()?c():t.MessageChannel?f():g&&"onreadystatechange"in g.createElement("script")?l():d(),m.setImmediate=p,m.clearImmediate=a}}("undefined"==typeof self?"undefined"==typeof t?this:t:self)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:2}],12:[function(e,t,n){t.exports=function(e){"use strict";e.core.append=function(){var t=function(e,t){for(var n,r=0,o=this.length;o>r;r++)n=this[r],t?n.innerHTML=e+n.innerHTML:n.innerHTML+=e;return this},n=function(e,t){e.appendChild(t)},r=function(t){return"string"==typeof t?new e(t):t.length?t:[t]},o=function(e,t){var n=e.firstElementChild;e.insertBefore(t,n)};return function(e,i,a){var u,s=i?o:n,c=[];e=r(e);var f=a?e:this;return e=a?this:e,-1!==e.indexOf("/")?t.call(f,e,i):(f.forEach(function(t,n){e.forEach(function(e,t){u=0===n?e:e.cloneNode(!0),c.push(u),s(f[n],u)})}),this.constructor(c))}}(),e.core.appendTo=function(e){return this.append(e,!1,!0)},e.core.insertAfter=function(t){var n=[],r=function(e,r){for(var o,i=Array.prototype.slice.call(e.parentNode.children),a=i.indexOf(e)+1,u=e.parentNode.children[a],s=0,c=t.length;c>s;s++)o=0===r?t[s]:t[s].cloneNode(!0),n.push(o),u?u.parentNode.insertBefore(o,u):e.parentNode.appendChild(o)};"string"==typeof t?t=new e(t):t.length||(t=[t]);var o,i;for(o=0,i=this.length;i>o;o++)r(this[o],o);return this.constructor(n)},e.core.prepend=function(e){return this.append(e,!0)},e.core.prependTo=function(e){return this.append(e,!0,!0)},e.ready=function(e,t){return"complete"===document.readyState?e.apply(this,t):void(window.addEventListener?window.addEventListener("load",e,!1):window.attachEvent?window.attachEvent("onload",e):window.onload=e)},e.core.remove=function(){return this.off&&this.off(),this.forEach(function(e){e.remove()}),this},"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentElement.removeChild(this)})}},{}],13:[function(e,t,n){t.exports=function(e){"use strict";var t=e.type;e.core.addClass=function(e){var t=function(t){for(var n=0,r=e.length;r>n;n++)for(var o=e[n].split(" "),i=0,a=o.length;a>i;i++)""!==o[i]&&t.classList.add(o[i]);t.data=t.data||{},t.data["class"]=t.data["class"]||{},t.data["class"]["class"]=t.className};return"string"==typeof e&&(e=[e]),this.each(t),this},e.core.attr=function(t,n){var r=!!e.isObject(t),o=function(e){var o=function(t,n){e.getAttribute?e.setAttribute(t,n):e[t]=n,e.data=e.data||{},e.data.attr=e.data.attr||{},e.data.attr.attr=e.data.attr.attr||{},e.data.attr.attr[t]=n};if(null===n)a(e);else{var i;if(r)for(i in t)n=t[i],o(i,n);else o(t,n)}},i=function(e){return e.getAttribute(t)},a=function(e){null===e.getAttribute(t)?delete e[t]:e.removeAttribute(t),delete e.data.attr.attr[t]};return void 0!==n||r?(this.each(o),this):this.map(i)},e.core.css=function(t,n){var r=e.isObject(t),o=function(e,r){e.data=e.data||{},e.data.css=e.data.css||{},e.data.css[t]=r||n,e.style[t]=e.data.css[t]},i=function(e){return window.getComputedStyle(e).getPropertyValue(t)};if(n||null===n||""===n||r){if(r){for(var a in t)this.css(a,t[a]);return this}return n=null===n?"":n,this.each(o),this}return this.map(i)},e.core.getParentIndex=function(){var e=function(e){return Array.prototype.indexOf.call(e.parentNode.children,e)};return this.map(e)},e.core.hasClass=function(e){var t=function(t){return t.classList.contains(e)};return this.map(t)},e.core.height=function(e){return e?this.css("height",e):this.css("height")},e.core.html=function(e){var n;e&&e.type===t&&(n=e,e="");var r=function(e){return e.innerHTML};if(e&&1===e.nodeType)return r(e);if(e||""===e||0===e){var o=function(t){t.data=t.data||{},t.data.html=t.data.html||{},t.data.html.html=e,t.innerHTML=e};return this.each(o),n?this.append(n):this}return this.map(r)},e.core.offset=function(){var e=this.length,t=Array(e),n=Array(e),r=function(e,r){var o=t[r]=e.offsetTop,i=n[r]=e.offsetLeft;return{top:o,left:i}},o=this.map(r);return o.top=t,o.left=n,o},e.core.position=function(){var e=this.length,t=Array(e),n=Array(e),r=function(e,r){for(var o=0,i=0;e;)o+=e.offsetTop,i+=e.offsetLeft,e=e.offsetParent;return t[r]=o,n[r]=i,{top:o,left:i}},o=this.map(r);return o.top=t,o.left=n,o},e.core.removeClass=function(e){var t=function(t){for(var n=0,r=e.length;r>n;n++)for(var o=e[n].split(" "),i=0,a=o.length;a>i;i++)""!==o[i]&&t.classList.remove(o[i]);t.data=t.data||{},t.data["class"]=t.data["class"]||{},t.data["class"]["class"]=t.className};return"string"==typeof e&&(e=[e]),this.each(t),this},e.core.scroll=function(){var e=this.length,t=Array(e),n=Array(e),r=function(e,r){var o=t[r]=e.scrollTop,i=n[r]=e.scrollLeft;return{top:o,left:i}},o=this.map(r);return o.top=t,o.left=n,o},e.core.text=function(e){var t=function(t){document.all?t.innerText=e:t.textContent=e,t.data=t.data||{},t.data.text=t.data.text||{},t.data.text.text=e},n=function(e){return document.all?e.innerText:e.textContent};return e||""===e||0===e?(this.each(t),this):this.map(n)},e.core.toggleClass=function(e){var t;Array.isArray(e)||(e=[e]);for(var n=function(e){e.classList.contains(t)?e.classList.remove(t):e.classList.add(t),e.data=e.data||{},e.data["class"]=e.data["class"]||{},e.data["class"]["class"]=e.className},r=0,o=e.length;o>r;r++)t=e[r],this.each(n);return this},e.core.width=function(e){return e?this.css("width",e):this.css("width")}}},{}],14:[function(e,t,n){t.exports=function(e){"use strict";e.core.emit=function(e,t,n,r){n=n||!1,r=r||!1;var o=function(o){var i=new CustomEvent(e,{detail:t,cancelable:r,bubbles:n});o.dispatchEvent(i)};return this.each(o),this},e.core.off=function(t,n){var r=function(e){return e},o=function(t,o){var i=n,a="_"+o+"-bound-function";if(!i&&t.data&&t.data[a]&&t.data[a][a])i=t.data[a][a];else if(!(t.data&&t.data[a]&&t.data[a][a]))return t.data=t.data||{},t.data[a]=t.data[a]||{},t.data[a][a]=t.data[a][a]||[],null;if(i){e.isArray(i)||(i=[i]);for(var u,s,c=0,f=i.length;f>c;c++)s=t.data[a][a],u=s.indexOf(i[c]),-1!==u&&(t.removeEventListener(o,i[c]),s[u]=null);t.data[a][a]=t.data[a][a].filter(r)}},i=function(n){!t&&n.data&&n.data.__boundEvents&&n.data.__boundEvents.__boundEvents?t=n.data.__boundEvents.__boundEvents:(n.data=n.data||{},n.data.__boundEvents=n.data.__boundEvents||{}),e.isArray(t)||(t=[t]);for(var i=0,a=t.length;a>i;i++)o(n,t[i]);n.data.__boundEvents.__boundEvents=t.filter(r)};return this.each(i),this},e.core.on=function(e,t){var n=function(n){var r="_"+e+"-bound-function";n.data=n.data||{},n.data[r]=n.data[r]||{},n.data[r][r]=n.data[r][r]||[],n.data.__boundEvents=n.data.__boundEvents||{},n.data.__boundEvents.__boundEvents=n.data.__boundEvents.__boundEvents||[],n.addEventListener(e,t),n.data[r][r].push(t),n.data.__boundEvents.__boundEvents.push(e)};return this.each(n),this},"function"!=typeof CustomEvent&&!function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}()}},{}],15:[function(e,t,n){t.exports=function(t){"use strict";var n=e("promise");t.http=function(e){var t,r,o,i,a,u,s,c;if(!e)return new Error("No parameters given");if("string"==typeof e&&(e={url:e}),t=new XMLHttpRequest,r=e.method||"GET",o=e.url,i=JSON.stringify(e.data)||null,a=e.user||"",u=e.password||"",s=e.headers||null,c="boolean"==typeof e.async?e.async:!0,t.onreadystatechange=function(){return 4===t.readyState?t:void 0},t.open(r,o,c,a,u),"POST"===r&&t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s)for(var f in s)t.setRequestHeader(f,s[f]);if(c)return new n(function(e,n){t.onerror=function(){n(new Error("Network error!"))},t.send(i),t.onload=function(){200===t.status?e(t.response):n(new Error(t.status))}});var l=function(e){var t={then:function(n){return 200===e.status&&n(e.responseText),t},"catch":function(n){return 200!==e.status&&n({status:e.status,statusText:e.statusText}),t}};return t};return t.send(i),t.onloadend=function(){return t.onreadystatechange(),l(t)},t.onloadend()},t.http.get=function(e){return this({url:e,method:"GET"})},t.http.post=function(e,t){return this({url:e,data:t,method:"POST"})}}},{promise:5}],16:[function(e,t,n){t.exports=function(t){"use strict";if(!Object.observe){e("setimmediate"),e("observe-shim");var n=e("observe-utils")}t.core.get=function(e){var t=function(t){return e?t.data&&t.data[e]&&t.data[e][e]?t.data[e][e]:!1:t.data};return this.map(t)},t.core.observe=function(e,t,r){var o=function(o){var i=function(e){if(r===!0){var t=function(n){e._observeFunc(n),Object.unobserve(e,t)}.bind(this);Object.observe(e,t)}else Object.observe(e,e._observeFunc)},a=function(e){return e._observeFunc&&Object.unobserve(e,e._observeFunc),e._observeFunc=t,e};o.data=o.data||{};var u=o.data;t=t.bind(this);var s=null;if(e)u[e]=u[e]||{},n&&n.defineObservableProperties(u[e],e),s=a(u[e]),i(s);else{for(var c=["attr","text","css","html","class"],f=0,l=c.length;l>f;f++)u[c[f]]=u[c[f]]||{},s=a(u[c[f]]),i(s,c[f]);s=a(u),i(s,null)}}.bind(this);return"function"==typeof e&&(t=e,e=null),this.each(o),this},t.core.observeOnce=function(e,t){this.observe(e,t,!0)},t.core.set=function(e,r){var o=function(o){o.data=o.data||{},n&&!o.data[e]&&n.defineObservableProperties(o.data,e),t.isArray(r)?r=t.extend([],r):t.isObject(r)&&(r=t.extend({},r)),o.data[e]=o.data[e]||{},o.data[e][e]=r};return this.each(o),this},t.core.unobserve=function(e){var t=function(t){var n=t.data;if(n)if(e&&n[e]&&n[e]._observeFunc)Object.unobserve(n[e],n[e]._observeFunc);else if(!e){n._observeFunc&&Object.unobserve(n,n._observeFunc);for(var r in n)n[r]._observeFunc&&Object.unobserve(n[r],n[r]._observeFunc)}}.bind(this);return this.each(t),this}}},{"observe-shim":3,"observe-utils":4,setimmediate:11}],17:[function(e,t,n){t.exports=function(e){"use strict";e.insertStyle=function(t,n,r){var o=t.replace(/ /g,"-"),i=r?o+r.replace(/[\s:\/\[\]\(\)]+/g,"-"):o;r=r||"none";var a,u,s=function(){var e=document.createElement("style");return e.className="microbe--inserted--style__"+i,r&&"none"!==r&&e.setAttribute("media",r),document.head.appendChild(e),e},c=e.__customCSSRules[o];if(c&&c[r]){a=c[r].el;var f=c[r].obj;for(u in n)f[u]=n[u];n=f}else a=s();var l=t+"{";for(u in n)l+=u+" : "+n[u]+";";return l+="}",a.innerHTML=l,e.__customCSSRules[o]=e.__customCSSRules[o]||{},e.__customCSSRules[o][r]={el:a,obj:n},a},e.__customCSSRules={},e.removeStyle=function(t,n,r){r||"string"!=typeof n||"all"===n||(r=n,n=null),r=r||"none";var o=function(n,r){n.parentNode.removeChild(n),delete e.__customCSSRules[t][r]},i=e.__customCSSRules[t];if(!i)return!1;if("all"===n)for(var a in i)o(i[a].el,a);else{if(i=i[r],!i)return!1;if(e.isArray(n)&&!e.isEmpty(n)){for(var u=0,s=n.length;s>u;u++)i.obj[n[u]]&&delete i.obj[n[u]];e.isEmpty(i.obj)?o(i.el,r):e.insertStyle(t,i.obj,r)}else o(i.el,r)}return!0},e.removeStyles=function(t){return e.removeStyle(t,"all")}}},{}],18:[function(e,t,n){t.exports=function(t){"use strict";window.Promise=window.Promise||e("promise");var n=e("./types");t.capitalize=function(e){var n=t.isArray(e);e=n?e:[e];for(var r,o=[],i=0,a=e.length;a>i;i++){r=e[i].split(" ");for(var u=0,s=r.length;s>u;u++)r[u]=r[u][0].toUpperCase()+r[u].slice(1);o.push(r.join(" "))}return n?o:o[0]},t.capitalise=t.capitalize,t.debounce=function(e,t,n){var r;return function(){var o=this,i=arguments,a=function(){ r=null,n||e.apply(o,i)},u=n&&!r;clearTimeout(r),r=setTimeout(a,t),u&&e.apply(o,i)}},t.extend=function(){var e=t.isObject,n=t.isArray,r=arguments[0]||{},o=1,i=arguments.length,a=!1;"boolean"==typeof r&&(a=r,r=arguments[o]||{},o++),"object"==typeof r||t.isFunction(r)||(r={}),o===i&&(r=this,o--);for(var u,s,c,f,l,d;i>o;o++)if(u=arguments[o],null!==u&&void 0!==u)for(s in u)c=r[s],f=u[s],r!==f&&(a&&f&&(e(f)||(l=n(f)))?(l?(l=!1,d=c&&n(c)?c:[]):d=c&&e(c)?c:{},r[s]=t.extend(a,d,f)):void 0!==f&&(r[s]=f));return r},t.core.extend=t.extend,t.identity=function(e){return e},t.isArray=Array.isArray,t.isEmpty=function(e){var t;for(t in e)return!1;return!0},t.isFunction=function(e){return"function"===t.type(e)},t.isObject=function(e){return"object"!==t.type(e)||e.nodeType||t.isWindow(e)?!1:!0},t.isUndefined=function(e,t){return t&&"object"!=typeof t?!0:t?!(e in t):void 0===e},t.isWindow=function(e){return null!==e&&e===e.window},t.merge=function(e,t,n){"boolean"==typeof t&&(n=t,t=null),t||(t=e,e=this);var r=e.length;if("number"==typeof r){for(var o=0,i=t.length;i>o;o++)n&&-1!==e.indexOf(t[o])||(e[r++]=t[o]);e.length=r}return e},t.core.merge=t.merge,t.noop=function(){},t.once=function(e,t){var n;return function(){return e&&(n=e.apply(t||this,arguments),e=null),n}},t.poll=function(e,t,n,r,o){var i=Number(new Date)+(r||2e3);o=o||100,function a(){if(e())try{t()}catch(r){throw"No argument given for success function"}else if(Number(new Date)<i)setTimeout(a,o);else try{n(new Error("timed out for "+e+": "+arguments))}catch(r){throw"No argument given for error function."}}()},t.toArray=function(e){return Array.prototype.slice.call(e||this)},t.core.toArray=t.toArray,t.type=function(e){if(null===e)return e+"";var t=n[Object.prototype.toString.call(e)];return t=t?t:n[e.toString()],t=t||typeof e,"object"===t&&e instanceof Promise&&(t="promise"),t},t.xyzzy=t.noop}},{"./types":19,promise:5}],19:[function(e,t,n){"use strict";t.exports={"[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Error]":"error","[object Promise]":"promise","[object Microbe]":"microbe"}},{}],20:[function(e,t,n){"use strict";var r=function(){var e=arguments[0],t=arguments[1]>>0,n=Object(this),r=this.length>>0;if(0===r)return!1;for(t=t>=0?t:t+r,t=0>t?0:t;r>t;){if(e===n[t]||n[t]!==n[t]&&e!==e)return!0;t++}return!1};t.exports=function(e){e.core.every=Array.prototype.every,e.core.findIndex=Array.prototype.findIndex,e.core.each=Array.prototype.forEach,e.core.forEach=Array.prototype.forEach,e.core.includes=Array.prototype.includes?Array.prototype.includes:r,e.core.indexOf=Array.prototype.indexOf,e.core.lastIndexOf=Array.prototype.lastIndexOf,e.core.map=Array.prototype.map,e.core.pop=Array.prototype.pop,e.core.push=Array.prototype.push,e.core.reverse=Array.prototype.reverse,e.core.shift=Array.prototype.shift,e.core.slice=Array.prototype.slice,e.core.some=Array.prototype.some,e.core.sort=Array.prototype.sort,e.core.unshift=Array.prototype.unshift,e.core.splice=function(e,t){return this.constructor(Array.prototype.splice.call(this,e,t))}}},{}],21:[function(e,t,n){var r=function(e){return!!e};t.exports=function(e){"use strict";e.core.children=function(e){var t=this.constructor,n=function(n){return n=t(n.children),"string"==typeof e?n.filter(e):n};return this.map(n)},e.core.childrenFlat=function(e){var t=0,n=[],r=function(e){for(var r=e.children,o=r.length,i=0;o>i;i++)n[t]=r[i],t++};this.each(r);var o=this.constructor(n);return"string"==typeof e?o.filter(e):o},e.core.filter=function(t){var n,o,i,a=this;if(0===this.length)return this;if("function"==typeof t){for(var u=[],s=0,c=this.length;c>s;s++)u[s]=t.call(this[s],s)?this[s]:null;return u=u.filter(r),this.constructor(u)}var f=function(t,n,o){if(e.pseudo[t[0]])return e.pseudo[t[0]](n,t[1]);var a,u=[];if(a=0===o?t[0]:":"+t[0],""!==a){""!==t[1]&&(a+="("+t[1]+")");for(var s=0,c=n.length;c>s;s++)i=n[s],u[s]=e.matches(i,a)===!0?i:null;u=u.filter(r)}return new e(u)};if(t&&-1!==t.indexOf(":")){n=t.split(":"),o=[[n.splice(0,1).toString(),""]];for(var l,d=0,p=n.length;p>d;d++)l=n[d],-1!==l.indexOf("(")?(l=l.split("("),l[1]=l[1].replace(")","")):l=[l,""],o.push(l)}else{if(!t)return this;o=[[t,""]]}for(var h=0,v=o.length;v>h;h++){if(0===a.length)return a;""!==o[h][0]&&(a=f(o[h],a,h))}return a},e.core.find=function(t){var n=t[0];if(" "===n&&(t=t.trim(),n=t[0]),">"===n)return t=t.slice(1).trim(),this.childrenFlat().filter(t);if("~"===n)return t=t.slice(1).trim(),this.siblingsFlat().filter(t);if("!"===n)return this.parent();if("+"===n){t=t.slice(1).trim();for(var o,i=[],a=this.children(),u=0,s=a.length;s>u;u++)o=a[u][0],i[u]=o?o:null;return i.filter(r),new e(i).filter(t)}if(-1!==t.indexOf(":"))return this.constructor(t,this);for(var c=new e(t),f=[],l=0,d=0,p=this.length;p>d;d++)for(var h=0,v=c.length;v>h;h++)e.contains(c[h],this[d])&&(f[l]=c[h],l++);return this.constructor(f)},e.core.first=function(){return 0!==this.length?this.constructor(this[0]):this.constructor([])},e.core.last=function(){var e=this.length;return 1===e?this:0!==e?this.constructor(this[e-1]):this.constructor([])},e.core.parent=function(){var e,t,n=function(e){return e.parentNode},r=new Array(this.length);for(e=0,t=this.length;t>e;e++)r[e]=n(this[e]);return this.constructor(r)},e.core.siblings=function(e){var t=this.constructor,n=function(n){for(var r=[],o=0,i=n.parentNode.firstElementChild;i;)if(i!==n&&(r[o]=i,o++),i=i.nextElementSibling,!i)return r=t(r),"string"==typeof e?r.filter(e):r};return this.map(n)},e.core.siblingsFlat=function(e){var t=0,n=[],r="+"===e||"~"===e,o=function(o){var i=o;for(i=r?o.nextElementSibling:o.parentNode.firstElementChild;i&&(i!==o&&-1===n.indexOf(i)&&(n[t]=i,t++),i=i.nextElementSibling,i&&"+"!==e););};this.each(o);var i=this.constructor(n);return"string"!=typeof e||r?i:i.filter(e)},e.core.toString=function(){return this.type}}},{}],22:[function(e,t,n){var r=Array.prototype.slice;t.exports=function(t,n,o){"use strict";function i(e,t){for(var n=0,r=e.length;r>n;n++)t[n]=e[n];return t.length=n,t}function a(e,t){for(var n=e.match(d),r="",o="",a="",u=0,s=n.length;s>u;u++){var c=n[u][0];switch(c){case"#":r+=n[u];break;case".":a+=n[u];break;default:o+=n[u]}}if("string"==typeof o&&(e=document.createElement(o),r&&(e.id=r.slice(1)),a))for(a=a.split("."),u=1,s=a.length;s>u;u++)e.classList.add(a[u]);return i([e],t)}function u(e,t){var n=document.createElement("div");n.innerHTML=e,e=r.call(n.children);for(var o=0,a=e.length;a>o;o++)n.removeChild(e[o]);return i(e,t)}function s(e){return-1!==e.indexOf(">>")&&(e=e.replace(/>>/g," ")),-1!==e.indexOf("!")&&(e=e.replace(/!/g,":parent")),e}function c(e,n){if("string"==typeof e&&-1===e.indexOf(":")&&-1===e.indexOf("!")&&-1===e.indexOf(" "))switch(e[0]){case"#":if(-1===e.indexOf(".")){var o=document.getElementById(e.slice(1));return null===o?i([],n):i([o],n)}break;case".":if(-1===e.indexOf("#")){var a=e.slice(1);if(-1===a.indexOf("."))return i(document.getElementsByClassName(a),n);a=a.split(".");for(var u,s,c=document.getElementsByClassName(a[0]),f=1,l=a.length;l>f;f++){u=r.call(document.getElementsByClassName(a[f]));for(var d=0,p=c.length;p>d;d++)s=c[d],-1===u.indexOf(s)&&(c[d]=null)}return i(c,n).filter(function(e){return null!==e})}break;default:if(e&&-1===e.indexOf("[")&&-1===e.indexOf("<")&&-1===e.indexOf("#")&&-1===e.indexOf("."))return i(document.getElementsByTagName(e),n)}else"function"==typeof e&&t&&"function"==typeof t.ready&&t.ready(e);return!1}t.core={get type(){return n},get isMicrobe(){return!0},get version(){return o}},Object.defineProperty(t,"version",{get:function(){return o}});var f,l,d=t.prototype.__selectorRegex=/(?:[\s]*\.([\w-_\.]+)|#([\w-_]+)|([^#\.:<][\w-_]*)|(<[\w-_#\.]+>)|:([^#\.<][\w-()_]*))/g,p=t.core.__init__=function(e,t,r){var o;if(!t&&(o=c(e,this)))return o;if("string"==typeof e&&(e=s(e)),"string"==typeof t&&(t=s(t)),e=e||"",t&&t.type===n){o=i([],this);for(var v,y=0,g=t.length;g>y;y++){v=new p(e,t[y]);for(var m=0,b=v.length;b>m;m++)-1===Array.prototype.indexOf.call(o,v[m])&&(o[o.length]=v[m],o.length++)}return o}var w,O;if(1===e.nodeType||(w=Array.isArray(e)||e.jquery)||e===window||e===document||(O="[object HTMLCollection]"===e.toString()))return w||O||(e=[e]),i(e,this);if(t=void 0===t?document:t,t!==document&&"string"==typeof t&&"string"==typeof e)return this.constructor(t).find(e);var j=t.nodeType;if(!e||"string"!=typeof e||1!==j&&9!==j)return i([],this);var x=e.match(d);if(x&&1===x.length&&":"!==x[0][0])switch(f=x[0][0],l=e.slice(1),f){case".":var _=(e||"").slice(1).split(".").length;if(1===_)return i(t.getElementsByClassName(l),this);break;case"#":var E=document.getElementById(l);return t.ownerDocument&&this.contains(E,t)?i([E],this):i([],this);case"<":return a(e.substring(1,e.length-1),this);default:return i(t.getElementsByTagName(e),this)}return this instanceof p?-1!==e.indexOf(":")&&h?h(this,e,t,i):-1!==e.indexOf("/")?u(e,this):i(t.querySelectorAll(e),this):new p(e,t,r)};t.core.__init__.prototype=t.core,e("./core")(t),e("./root")(t),e("./pseudo")(t),e("./array")(t);var h=t.constructor.pseudo}},{"./array":20,"./core":21,"./pseudo":23,"./root":24}],23:[function(e,t,n){t.exports=function(e){"use strict";function t(e,t,n){for(var r,o=[],i=0,a=0,u=e.length;u>a;a++)r=t(e[a],o,a),r&&(o[i]=r,i++);return n?o:e.constructor(o)}var n=function(t,n,r){if("odd"===n?n="2n":"even"===n&&(n="2n1"),-1===n.indexOf("n")){switch(r){case!0:case"last":return new e(t[t.length-parseInt(n)])}return new e(t[parseInt(n)-1])}n=n.split("n");var o,i=parseInt(n[0])||1,a=parseInt(n[1]);(r===!0||"last"===r)&&(o=t.length-parseInt(n[1]),a=o%i);for(var u,s=[],c=a||0,f=o||t.length;f>c;)u=t[c],u&&s.push(u),c+=i;return new e(s)},r=function(t,n,o,i){function a(e){for(var n,a=[],u=0,s=e.length;s>u;u++)if(0===u)a=r(t,e[u],o,i);else{n=r(t,e[u],o,i);for(var c=0,f=n.length;f>c;c++)-1===Array.prototype.indexOf.call(a,n[c])&&(a[a.length]=n[c],a.length++)}return a}function u(){var r=c(f),a=i(o.querySelectorAll(r[0]),t);r=r[1];for(var u,s,l=0,d=r.length;d>l;l++)u=r[l].split("("),s=u[1],s&&(s=s.slice(0,s.length-1)),u=u[0],e.constructor.pseudo[u]&&(a=e.constructor.pseudo[u](a,s,n));return a}function s(n){for(var r,a=e.constructor.pseudo(t,n[0],o,i),u=!1,s=1,c=n.length;c>s;s++)if(r=n[s].trim(),"~"===r[0]?(a=a.siblingsFlat("~"),u=!0):"+"===r[0]?(a=a.siblingsFlat("+"),u=!0):u?(a=a.filter(r),u=!1):(a=a.find(r),u=!1),0===a.length)return a;return a}function c(t){var n,r=t.split(":");t=r[0],r.splice(0,1);for(var o=0,i=r.length;i>o;o++)n=r[o].split("("),e.constructor.pseudo[n[0]]||(t+=":"+r[o],r.splice(o,1));return[t,r]}if(-1!==n.indexOf(",")){if(n=n.split(/,(?![a-zA-Z0-9-#.,\s]+\))/g),n.length>1)return a(n);n=n[0]}var f=n;if(":"===f[0]&&(f="*"+f),-1!==f.trim().indexOf(" ")){var l=function(e){return" "===e?!1:e},d=f.split(/((?:[A-Za-z0-9.#*\-_]+)?(?:\:[A-Za-z\-]+(?:\([\s\S]+\))?)?)?( )?/);if(d=d.filter(l),d.length>1)return s(d);f=d[0]}return u()};r["any-link"]=function(e){return e.filter("a")},r.blank=function(e){var n=function(e,t){var n=e.textContent;return-1===t.indexOf(e)&&/^\s*$/.test(n||e.value)?e:void 0};return t(e,n)},r.column=function(e,t){return e.filter("col").filter(t)},r.contains=function(e,n){n=n.toLowerCase();var r=function(e){var t=function(e){return document.all?e.innerText:e.textContent},r=t(e);return-1!==r.toLowerCase().indexOf(n)?e:void 0};return t(e,r)},r["default"]=function(e){e=e.filter("input, option");var n=function(e){return e.defaultChecked===!0?e:void 0};return t(e,n)},r.dir=function(e,n){var r=function(e){return getComputedStyle(e).direction===n?e:void 0};return t(e,r)},r.drop=function(e,t){if(e=e.filter("[dropzone]"),!t)return e;switch(t){case"active":return e.filter(":active");case"invalid":return e.filter();case"valid":return e.filter()}},r.even=function(e){var n=function(e,t,n){return(n+1)%2===0?e:void 0};return t(e,n)},r.first=function(e){return e.first()},r.gt=function(e,t){return e.splice(t,e.length)},r.has=function(e,n){var r=function(e){return e.querySelector(n)?e:void 0};return t(e,r)},r["in-range"]=function(e){e=e.filter("[max],[min]");var n=function(e){var t=e.getAttribute("min"),n=e.getAttribute("max"),r=parseInt(e.value);if(r)if(t&&n){if(r>t&&n>r)return e}else if(t&&r>t||n&&n>r)return e};return t(e,n)},r.lang=function(e,n){if(n){e=e.filter("[lang]"),n=n.replace("*","");var r=function(e){return-1!==e.getAttribute("lang").indexOf(n)?e:void 0};return t(e,r)}return e.constructor([])},r.last=function(e){return e.last()},r["local-link"]=function(e,n){e=e.filter("a");var r=document.location,o=function(e){var t=e.href,o=t.replace(r.protocol+"//","").replace(r.host,"");o="/"===o[0]?o.slice(1):o;var i=o.split("/").length-1;return/^https?:\/\//.test(o)||n&&parseInt(n)!==i?void 0:e};return t(e,o)},r.lt=function(e,t){return e.splice(0,t)},r.matches=function(e,t,n){var r=e.constructor,o=":matches("+t+")";t=t.split(","),n=n.replace(o,""),n="*"===n?"":n;for(var i=r(n+t[0].trim()),a=1,u=t.length;u>a;a++)i.merge(r(n+t[a].trim()),!0);return i},r.not=function(n,r,o,i){if(-1!==r.indexOf(",")){var a=n.constructor;r=r.split(",");for(var u=0,s=r.length;s>u;u++)n=this.not(n,r[u].trim(),o,!0);return a(n)}var c=function(t){return e.matches(t,r)?void 0:t};return t(n,c,i)},r["nth-column"]=function(e,t){return e=e.filter("col"),n(e,t)},r["nth-last-column"]=function(e,t){return e=e.filter("col"),n(e,t,!0)},r["nth-last-match"]=function(e,t){return n(e,t,!0)},r["nth-match"]=function(e,t){return n(e,t)},r.odd=function(e){var n=function(e,t,n){return(n+1)%2!==0?e:void 0};return t(e,n)},r.optional=function(e){return e.filter("input:not([required=required]), textfield:not([required=required]), [required=optional], [optional]")},r["out-of-range"]=function(e){e=e.filter("[max],[min]");var n=function(e){var t=e.getAttribute("min"),n=e.getAttribute("max"),r=parseInt(e.value);if(r)if(t&&n){if(t>r||r>n)return e}else if(t&&t>r||n&&r>n)return e};return t(e,n)},r.parent=function(e){e=e.parent();var n=function(e,t,n){return-1===t.indexOf(e)?e:void 0};return t(e,n)},r["read-only"]=function(e){return e.filter(":not(input,textfield,[contenteditable=false])")},r["read-write"]=function(e){return e.filter("input,textfield,[contenteditable=true]")},r.required=function(e){return e.filter("[required=required]")},r.root=function(e){return e.constructor(document.body.parentNode)},e.constructor.prototype.pseudo=r}},{}],24:[function(e,t,n){t.exports=function(e){"use strict";e.contains=function(e,t){for(var n=e.parentNode;n!==document&&n!==t;)n=n.parentNode||t.parentNode;return n===document?!1:!0},e.matches=function(e,t){var n=this.matches.__matchesMethod,r="string"!=typeof e&&!!e.length&&"[object HTMLFormElement]"!==e.toString(),o=Array.isArray(e)||r?!0:!1;o||r||(e=[e]),!n&&e[0]&&(e[0].matches?n=this.matches.__matchesMethod="matches":e[0].msMatchesSelector?n=this.matches.__matchesMethod="msMatchesSelector":e[0].mozMatchesSelector?n=this.matches.__matchesMethod="mozMatchesSelector":e[0].webkitMatchesSelector&&(n=this.matches.__matchesMethod="webkitMatchesSelector"));for(var i=[],a=0,u=e.length;u>a;a++)i.push(e[a][n](t));return o?i:i[0]}}},{}]},{},[1])(1)});