(function(){if("undefined"!==typeof document.querySelector){var e,k,p,f;e=function(h){f="undefined"===typeof h?"undefined"!==typeof e.el?e.el:document.documentElement:"object"!==typeof h?k(h):h;e.prototype.el=f;var h=p(e),i;for(i in h)"object"===typeof h[i]&&(h[i].el=f);h.el=f;return h};k=function(h,e){var f;if("string"!=typeof h||"undefined"===typeof h)return h;f=null!=e&&1===e.nodeType?e:document;if(h.match(/^#([\w\-]+$)/))return document.getElementById(h.split("#")[1]);f=f.querySelectorAll(h); return 1===f.length?f[0]:f};p=function(e){var f;if("undefined"!==typeof e){if("undefined"!==typeof Object.create)return Object.create(e);f=typeof e;if(!("object"!==f&&"function"!==f))return f=function(){},f.prototype=e,new f}};e.ext=function(h,i){i.el=f;e[h]=i};e.ext("each",function(e){if("undefined"!==typeof f.length&&f!==window)if("undefined"!==typeof Array.prototype.forEach)[].forEach.call(f,e);else{var i=f.length;if(0!==i)for(var l,j=0;j1&&typeof b==="undefined"){console.log(c);console.log("Must be a singular element")}else if(c.length> 1&&typeof b!=="undefined")e.each(function(c){return k(c,a,b)});else return k(c,a,b)},text:function(a){var b,c,d;d=this.el;c=typeof d.textContent!=="undefined"?"textContent":typeof d.innerText!=="undefined"?"innerText":"innerHTML";b=d[c];if(typeof a!=="undefined")return d[c]=a;return b},css:function(a,b){if(typeof b==="undefined")return f(this.el,a);e.each(function(c){f(c,a,b)})},append:function(a){typeof document.insertAdjacentHTML!=="undefined"?this.el.insertAdjacentHTML("beforeend",a):this.el.innerHTML= this.el.innerHTML+a},prepend:function(a){typeof document.insertAdjacentHTML!=="undefined"?this.el.insertAdjacentHTML("afterbegin",a):this.el.innerHTML=a+this.el.innerHTML},html:function(a){if(typeof a!=="undefined")this.el.innerHTML=a;return this.el.innerHTML}});if(typeof window.XMLHttpRequest!=="undefined"){var h={_do:function(a,b,c,d){var g=new XMLHttpRequest;typeof c==="undefined"&&(c=function(){});d=d?"POST":"GET";a=a+(d==="GET"?"?"+this._serialize(b):"");g.open(d,a);g.onreadystatechange=function(){g.readyState=== 4&&c(g.responseText)};if(d==="POST"){g.setRequestHeader("Content-Type","application/x-www-form-urlencoded");g.send(this._serialize(b))}else g.send(null)},_serialize:function(a){var b,c,d=[];for(b in a)if(a.hasOwnProperty(b)&&typeof a[b]!=="function"){c=a[b].toString();b=encodeURIComponent(b);c=encodeURIComponent(c);d.push(b+"="+c)}return d.join("&")}};e.ext("get",function(a,b,c){h._do(a,b,c,false)});e.ext("post",function(a,b,c){h._do(a,b,c,true)});e.ext("sse",function(a,b){var c;if(typeof EventSource!== "undefined"){c=new EventSource(a);c.onmessage=function(a){b.call(a.data,a.data)}}});var i,l,j,q;if(typeof document.addEventListener!=="undefined"){i=function(a,b,c){typeof a.addEventListener!=="undefined"&&a.addEventListener(b,c,false)};l=function(a,b,c){typeof a.removeEventListener!=="undefined"&&a.removeEventListener(b,c,false)}}else if(typeof document.attachEvent!=="undefined"){i=function(a,b,c){function d(a){c.apply(a)}if(typeof a.attachEvent!=="undefined"){l(b,c);a.attachEvent("on"+b,d);a=a.KIS_0_6_0= a.KIS_0_6_0||{};a.listeners=a.listeners||{};a.listeners[b]=a.listeners[b]||[];a.listeners[b].push({callback:c,_listener:d})}else console.log("Failed to _attach event:"+b+" on "+a)};l=function(a,b,c){if(typeof a.detachEvent!=="undefined"){var d=a.KIS_0_6_0;if(d&&d.listeners&&d.listeners[b])for(var g=d.listeners[b],e=g.length,f=0;fd?1:ca?1:b