!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():(t.tethys=e(),t.$=t.$||t.tethys)}(this,function(){"use strict";function t(t){return t.replace(/(-([a-z]))/g,function(t,e,n){return n.toUpperCase()})}function e(t,e,n){var r,c={},o=t[0],i=t[1];if("object"==typeof o)c=o;else{if(!(t.length>1))return this[0]&&o?e(this[0],o):null;c[o]=i}return r=Object.keys(c),this.each(function(t){r.forEach(function(e){n(t,e,c[e])})})}function n(t,e){return(window.getComputedStyle(t)||{})[e]}function r(t){return+t.replace(/\D*/g,"")}function c(t,e){if("function"!=typeof t.dispatchEvent)return!1;var n=function(n,r){var c;return"string"==typeof n?(c=document.createEvent(n),c.initEvent(e,!0,!0),c.synthetic=!0):c=new n(e,o.extend({view:window,bubbles:!0,cancelable:!0},r)),t.dispatchEvent(c,!0)};switch(e){case"mousedown":case"mouseup":case"mousemove":case"click":case"dblclick":case"mouseover":case"mouseout":case"mouseenter":case"mouseleave":case"contextmenu":return n(MouseEvent);case"focus":case"blur":return n(FocusEvent);case"select":case"change":return n("HTMLEvents");default:throw"trigger: Couldn't find an event class for event \""+e+'"'}}function o(t,e){var n=[];return t.each&&t.on?t:(n="string"==typeof t?t.match(/^[^\b\B]*\