text: "use strict";(()=>{const t=window,n=document,e=n.querySelectorAll.bind(n),[o]=e("html"),r=Node,s=Element,i=NodeList,c=(t,n,e)=>{Object.defineProperty(t,n,{value:e})},f=t.parseInt,u=t=>{t instanceof Set==!1&&(t=new Set(t)),t=[...t];const e=n.createDocumentFragment().childNodes,o={};for(const n in t)o[n]={value:t[n],enumerable:!0};return o.length={value:t.length},o.item={value:function(t){return this[+t||0]},enumerable:!0},Object.create(e,o)},l=t=>{const e=n.createElement("div");e.innerHTML=t;for(const t of e.$find("script")){const e=n.createElement("script");{const n=t.$attrAll();for(const t in n)e.$attr(t,n[t])}e.innerHTML=t.innerHTML,t.$replaceWith(e)}return e.childNodes.$freeze()},h=(t,...n)=>{for(const e of n)t.add(e)},a=(t,...n)=>{const e=new Set(t.split(" "));let o=null,r=null,s={};if("function"==typeof n[0]?[r,s]=n:"string"==typeof n[0]&&"function"==typeof n[1]&&([o,r,s]=n),null===r)throw new Error("Invalid arguments.");return{events:e,selector:o,callback_given:r,options:s}},d={},p={},g={};{const t=(t,n)=>void 0===n||(t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector).call(t,n),o=(t,o=0)=>{const c=[];Array.isArray(t[0])&&(t=t[0]);for(const f of t)f instanceof s||f instanceof r?c.push(f):f instanceof i?c.push(...f):"string"==typeof f&&("<"===f[0]?c.push(...l(f)):1===o?c.push(n.createTextNode(f)):c.push(...e(f)));return c},c=t=>t.replace(/-([a-z])/,(t,n)=>n.toUpperCase());{p.is=function(n){return!!this[0]&&t(this[0],n)},p.add=function(...t){return u([...this,...o(t)])};const n=(n,e,o=!0)=>{const r=[];for(const s of n)t(s,e)===o&&r.push(s);return u(r)};p.filter=function(t){return n(this,t)},p.not=function(t){return n(this,t,!1)}}{d.find=function(t){return this.querySelectorAll(t)},p.find=function(t){const n=[];for(const e of this)n.push(...e.querySelectorAll(t));return u(n)},p.childs=p.children=function(n){const e=void 0!==n,o=[];for(const r of this)if(e)for(const e of r.children)t(e,n)&&o.push(e);else o.push(...r.children);return u(o)};const e=(o,r,s={})=>{const{until:i=null,recursive:c=!0}=s,f=new Set,u=o.parentNode;return u&&u!==n&&(null!==i&&t(u,i)||(t(u,r)&&f.add(u),c&&h(f,...e(u,r,s)))),f};p.parent=function(t){const n=new Set;for(const o of this)h(n,...e(o,t,{recursive:!1}));return u(n)},p.parents=function(t){const n=new Set;for(const o of this)h(n,...e(o,t));return u(n)},p.parentsUntil=function(t,n){const o=new Set;for(const r of this)h(o,...e(r,n,{until:t}));return u(o)};const o=(n,e,o={})=>{const r=[];for(;null!==(n=n[(!0===o.prev?"previous":"next")+"ElementSibling"])&&void 0!==n&&(void 0!==e&&!t(n,e)||(r.push(n),!0!==o.one)););return r};p.next=function(t){const n=[];for(const e of this){const r=o(e,t,{one:!0});r.length>0&&n.push(r[0])}return u(n)},p.nextAll=function(t){const n=[];for(const e of this){const r=o(e,t);n.push(...r)}return u(n)},p.prev=function(t){const n=[];for(const e of this){const r=o(e,t,{prev:!0,one:!0});r.length>0&&n.push(r[0])}return u(n)},p.prevAll=function(t){const n=[];for(const e of this){const r=o(e,t,{prev:!0});n.push(...r)}return u(n)},p.siblings=function(n){const e=new Set;for(const o of this)for(const r of o.parentNode.children)r===o||void 0!==n&&!t(r,n)||e.add(r);return u(e)},p.index=function(){return this[0]?this[0].$prevAll().length:null},p.contains=function(t){return!!this[0]&&null!==this[0].querySelector(t)}}{{const t=[(t,n)=>{t.appendChild(n)},(t,n)=>{t.insertBefore(n,t.firstChild)},(t,n)=>{t.parentNode.insertBefore(n,t)},(n,e)=>{const o=n.parentNode,r=n.nextSibling;r?o.insertBefore(e,r):t[0](o,e)}],n=(n,e,r,s=0)=>{const i=t[n];r=o(r,+!s);const c=u(e),f=[];for(const t of c){f[s]=t;for(const t of r)f[+!s]=t,i(...f)}return c};p.append=function(...t){return n(0,this,t)},p.appendTo=function(...t){return n(0,this,t,1)},p.prepend=function(...t){return n(1,this,t)},p.prependTo=function(...t){return n(1,this,t,1)},p.before=function(...t){return n(2,this,t)},p.insertBefore=function(...t){return n(2,this,t,1)},p.after=function(...t){return n(3,this,t)},p.insertAfter=function(...t){return n(3,this,t,1)},p.replaceWith=function(t){if("string"==typeof t)for(const n of this)n.outerHTML=t;else if(t instanceof s||t instanceof i)return n(3,this,[t]),this.$detach();return this}}const t=t=>t.parentNode.removeChild(t);d.detach=d.remove=function(){return t(this)},p.detach=p.remove=function(){const n=[];for(const e of this)n.push(t(e));return u(n)},d.clone=function(){return this.cloneNode(!0)},p.clone=function(){const t=[];for(const n of this)t.push(n.cloneNode(!0));return u(t)}}{const t=t=>t?t.clientWidth:void 0;p.width=function(){const n=this[0];if(!n)return;const e=getComputedStyle(n);return t(n)-f(e.paddingLeft)-f(e.paddingRight)},p.innerWidth=function(){return t(this[0])},p.outerWidth=function(t){const n=this[0];if(!n)return;let e=n.offsetWidth;if(!0===t){const t=getComputedStyle(n);e+=f(t.marginLeft)+f(t.marginRight)}return e};const e=t=>t?t.clientHeight:void 0;p.height=function(){const t=this[0];if(!t)return;const n=getComputedStyle(t);return e(t)-f(n.paddingTop)-f(n.paddingBottom)},p.innerHeight=function(){return e(this[0])},p.outerHeight=function(t){const n=this[0];if(!n)return;let e=n.offsetHeight;if(!0===t){const t=getComputedStyle(n);e+=f(t.marginTop)+f(t.marginBottom)}return e},p.offset=function(){if(!this[0])return;const t=this[0].getBoundingClientRect();return{top:t.top+n.body.scrollTop,left:t.left+n.body.scrollLeft}},p.position=function(){const t=this[0];if(t)return{left:t.offsetLeft,top:t.offsetTop}}}p.html=function(...t){if(0===t.length)return this.length>0?this[0].innerHTML:void 0;for(const n of this)n.innerHTML=t[0];return this},p.text=function(...t){if(0===t.length)return this.length>0?this[0].textContent:void 0;for(const n of this)n.textContent=t[0];return this},p.empty=function(){for(const t of this)t.innerHTML="";return this},p.classAdd=p.addClass=function(...t){for(const n of this)n.classList.add(...t);return this},p.classRemove=p.removeClass=function(...t){for(const n of this)n.classList.remove(...t);return this},p.classAdded=p.hasClass=function(t){return!!this[0]&&this[0].classList.contains(t)},p.css=function(...t){let n=null;if(1===t.length){if(null!==t[0]&&"object"==typeof t[0])n=t[0];else if("string"==typeof t[0])return getComputedStyle(this[0])[t[0]]}else 2===t.length&&"string"==typeof t[0]&&(n={[t[0]]:t[1]});if(null===n)throw new Error("Invalid arguments.");for(const t in n){let e=n[t];"number"==typeof e&&(e+="px");const o=c(t);for(const t of this)t.style[o]=e}return this},p.hide=function(){for(const t of this)t.style.display="none";return this},p.unhide=function(){for(const t of this)t.style.display="";return this};{const t=(t,n)=>t.hasAttribute(n)?t.getAttribute(n):null;p.attr=function(...n){let e={};if(n[0]instanceof Object)e=n[0];else{if("string"!=typeof n[0])throw 0;{const[o,r]=n;if(1===n.length)return this.length>0?t(this[0],o):null;e[o]=r}}for(const t of this)for(const n in e)t.setAttribute(n,e[n]);return this},p.attrAll=function(){const n=this[0],e={};for(const o of n.getAttributeNames()){const r=t(n,o);r&&(e[o]=r)}return e},p.attrRemove=p.removeAttr=function(t){for(const n of this)n.removeAttribute(t);return this},p.prop=function(...t){const[n,e]=t;if(1===t.length)return this.length>0?this[0][n]:void 0;for(const t of this)t[n]=e;return this};{const t="$_datastorage";p.data=function(...n){let e={};if(n[0]instanceof Object)e=n[0];else{if("string"!=typeof n[0])throw 0;{const[o,r]=n;if(1===n.length)return this.length>0&&this[0][t]?this[0][t].get(c(o)):void 0;e[o]=r}}for(const n of this){n[t]||(n[t]=new Map);for(const o in e)n[t].set(c(o),e[o])}return this},p.dataRemove=p.removeData=function(n){for(const e of this)e[t]&&e[t].delete(n);return this}}p.value=p.val=function(...t){if(0===t.length)return this.length>0?this[0].value:void 0;for(const n of this)n.value=t[0];return this}}{const e=new Map,o=(n,s,i)=>{const{events:c,selector:f,callback_given:u,options:l={}}=a(...i);let h=null;return"off"===n?(h=e.get(u),e.delete(u)):h=function(e){if(null===f)u.call(this,e);else{const n=new Set;t(e.target,f)&&n.add(e.target);for(const t of e.target.$parents(f))n.add(t);for(const t of n)u.call(t,e,{currentTarget:t})}"one"===n&&o("off",s,i)},e.set(u,h),r(s,"off"===n?"remove":"add",c,h,l),s},r=(t,n,e,o,r)=>{for(const s of t)for(const t of e)s[n+"EventListener"](t,o,r)};g.on=function(...t){return o("on",this,t)},g.one=function(...t){return o("one",this,t)},g.off=function(...t){return o("off",this,t)};const s=(()=>{try{return new Event("load"),new CustomEvent("a"),!0}catch(t){return!1}})(),i=new Set(Object.keys(HTMLElement.prototype).filter(t=>"on"===t.substr(0,2)).map(t=>t.substr(2))),c=(t,e={},o={})=>{const r=i.has(t.toLowerCase()),{bubbles:c=!0,cancelable:f=!0}=o;let u;return r?s?u=new Event(t,{bubbles:c,cancelable:f}):(u=n.createEvent("HTMLEvents")).initEvent(t,c,f):s?u=new CustomEvent(t,{bubbles:c,cancelable:f,detail:e}):(u=n.createEvent("CustomEvent")).initCustomEvent(t,c,f,e),u};g.trigger=function(t,n){const e=c(t,n);for(const t of this)t.dispatchEvent(e)}}p.freeze=function(){return u(this)}}const v=t=>{if("string"==typeof t)return"<"===(t=t.trim())[0]?l(t):e(t);if("function"==typeof t)(n.attachEvent?"complete"===n.readyState:"loading"!==n.readyState)?t():n.addEventListener("DOMContentLoaded",t);else{if(t instanceof s)return u([t]);if(t instanceof i)return t}},m=(t,n)=>{Object.defineProperty(v,t,{get:n})};m("parseHTML",()=>l),m("head",()=>n.head),m("body",()=>n.body);const b=(e,r,f,l)=>{e="$"+e,r=r||l,f||(f=function(...t){return r.apply(u([this]),t)}),c(s.prototype,e,f),c(v,e,f.bind(o)),c(i.prototype,e,r),l&&(c(t,e,f.bind(t)),c(n,e,f.bind(n)))};for(const t in p)b(t,p[t],d[t]);for(const t in g)b(t,p[t],d[t],g[t]);m("extend",()=>(t,n,e)=>{b(t,n,e)});{const t=(t,n)=>t&&t.$is?t.$is(n)?t:t.$parents(n)[0]:void 0,n=(n,e,...o)=>{const{selector:r,callback_given:s,options:i}=a("",...o),c=n=>{const e=t(n.target,r),o=t(n.relatedTarget,r);e&&e!==o&&s(n)};for(const t of n)t.addEventListener("mouse"+e,c,i);return n};b("onmouseenter",function(...t){return n(this,"over",...t)}),b("onmouseleave",function(...t){return n(this,"out",...t)})}t.$man=v})();