/* * renga v1.0.3 (https://github.com/l4nk332/renga) * Copyright (c) 2019 Ian Jabour * Licensed under MIT (https://github.com/l4nk332/renga/blob/master/LICENSE) */ function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function n(t,e){return o(t)||function(t,e){var n=[],r=!0,o=!1,u=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,u=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw u}}return n}(t,e)||u()}function r(t){return o(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||u()}function o(t){if(Array.isArray(t))return t}function u(){throw new TypeError("Invalid attempt to destructure non-iterable instance")} // TODO: Possibly need to remove the ^ and $ to make less strict var a=/^[a-z]+(-+[a-z]+)+$/i,c=/^[a-z]+([A-Z][a-z]*)+$/,i=/([A-Z][a-z]*)/g;function l(t){if(!function(t){return a.test(t)}(t))return t;var e=r(t.split("-")),n=e[0],o=e.slice(1).filter(function(t){return t.length}).map(function(t){return"".concat(t[0].toUpperCase()).concat(t.slice(1).toLowerCase())}).join("");return"".concat(n).concat(o)}function f(t){return function(t){return c.test(t)}(t)?t.split(i).filter(function(t){return t.length}).map(function(t){return t.toLowerCase()}).join("-"):t}function s(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r={},o=e.replace(/\.([a-z-_]+)/gi,function(e,o){var u=l(o),a=n?"__".concat(n):n,c="".concat(t,"__").concat(u).concat(a);return r[u]=c,".".concat(c)});return{classNames:r,styles:o}}var m="fragment",p="text";function d(t){return null===t||!1===t}function y(e){return n=e,["string","number"].some(function(e){return t(n)===e})||!1===e||null===e||b(e)&&"nodeName"in e&&"nodeType"in e;var n}function b(e){return"object"===t(e)&&!Array.isArray(e)&&null!==e}function v(t,e){Object.entries(e).filter(function(t){var e=n(t,2);e[0];return!1!==e[1]}).map(function(t){var e,r=n(t,2),o=r[0],u=r[1];return[f(o),(e=u,e&&"boolean"==typeof e?"":e)]}).forEach(function(e){var r=n(e,2),o=r[0],u=r[1];"events"===o&&b(u)?function(t,e){Object.entries(e).forEach(function(e){var r=n(e,2),o=r[0],u=r[1];t.addEventListener(o,u)})}(t,u):"style"===o&&b(u)?function(t,e){Object.entries(e).forEach(function(e){var r=n(e,2),o=r[0],u=r[1];t.style[f(o)]=u})}(t,u):t.setAttribute(o,u)})}function h(t,e){d(e)||t.appendChild("string"==typeof e?document.createTextNode(e):e)}function g(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(function(t){return Array.isArray(t)?t.every(y):y(t)})(e)&&(n=e,e=null);var r=t===m?document.createDocumentFragment():t===p?document.createTextNode(d(n)?"":n):document.createElement(t);return![m,p].includes(t)&&e&&v(r,e),t!==p&&n&&function(t,e){Array.isArray(e)?e.forEach(function(e){return h(t,e)}):h(t,e)}(r,n),r}}var j=["a","abbr","address","area","article","aside","audio","base","bdi","bdo","blockquote","body","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template",p,"textarea","tfoot","th","thead","time","tr","track","u","ul","var","video",m].reduce(function(t,n){return function(t){for(var n=1;n