Fix: update minified files

This commit is contained in:
jcorporation 2019-02-04 23:39:33 +00:00
parent 707cbb934b
commit cc68e21943
3 changed files with 60 additions and 55 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,42 +1,44 @@
(function(z,g){"function"===typeof define&&define.amd?define([],g):"object"===typeof module&&module.exports?module.exports=g():(g=g(),z.Alert=g.Alert,z.Button=g.Button,z.Carousel=g.Carousel,z.Collapse=g.Collapse,z.Dropdown=g.Dropdown,z.Modal=g.Modal,z.Popover=g.Popover,z.ScrollSpy=g.ScrollSpy,z.Tab=g.Tab,z.Tooltip=g.Tooltip)})(this,function(){var z="undefined"!==typeof global?global:this||window,g=document,E=g.documentElement,Q=z.BSN={},D=Q.supports=[],K="onmouseleave"in g?["mouseenter","mouseleave"]:
["mouseover","mouseout"],ja=/\b(top|bottom|left|right)+/,P=0,N="WebkitTransition"in E.style||"transition"in E.style,S="WebkitTransition"in E.style?"webkitTransitionEnd":"transitionend",ka="WebkitDuration"in E.style?"webkitTransitionDuration":"transitionDuration",O=function(a){a.focus?a.focus():a.setActive()},w=function(a,c){a.classList.add(c)},y=function(a,c){a.classList.remove(c)},p=function(a,c){return a.classList.contains(c)},I=function(a,c){return[].slice.call(a.getElementsByClassName(c))},q=
function(a,c){c=c?c:g;return"object"===typeof a?a:c.querySelector(a)},G=function(a,c){var d=c.charAt(0),b=c.substr(1);if("."===d)for(;a&&a!==g;a=a.parentNode){if(null!==q(c,a.parentNode)&&p(a,b))return a}else if("#"===d)for(;a&&a!==g;a=a.parentNode)if(a.id===b)return a;return!1},u=function(a,c,d){a.addEventListener(c,d,!1)},L=function(a,c,d){a.removeEventListener(c,d,!1)},T=function(a,c,d){u(a,c,function f(m){d(m);L(a,c,f)})},R=function(a){a=z.getComputedStyle(a)[ka];a=parseFloat(a);a="number"!==
typeof a||isNaN(a)?0:1E3*a;return a+50},H=function(a,c){var d=0,b=R(a);N&&T(a,S,function(a){c(a);d=1});setTimeout(function(){!d&&c()},b)},x=function(a,c,d){a=new CustomEvent(a+".bs."+c);a.relatedTarget=d;this.dispatchEvent(a)},U=function(){return{y:z.pageYOffset||E.scrollTop,x:z.pageXOffset||E.scrollLeft}},W=function(a,c,d,b){var m=c.offsetWidth,f=c.offsetHeight,h=E.clientWidth||g.body.clientWidth,n=E.clientHeight||g.body.clientHeight;a=a.getBoundingClientRect();b=b===g.body?U():{x:b.offsetLeft+b.scrollLeft,
y:b.offsetTop+b.scrollTop};var v=a.right-a.left,k=a.bottom-a.top,e=p(c,"popover"),A=q(".arrow",c),l=0>a.top+k/2-f/2,r=0>a.left+v/2-m/2,x=a.left+m/2+v/2>=h,t=a.top+f/2+k/2>=n;var C=0>a.top-f;var F=0>a.left-m;n=a.top+f+k>=n;var M=a.left+m+v>=h;d=("left"===d||"right"===d)&&F&&M?"top":d;d="top"===d&&C?"bottom":d;d="bottom"===d&&n?"top":d;d="left"===d&&F?"right":d;d="right"===d&&M?"left":d;-1===c.className.indexOf(d)&&(c.className=c.className.replace(ja,d));n=A.offsetWidth;C=A.offsetHeight;if("left"===
d||"right"===d){var J="left"===d?a.left+b.x-m-(e?n:0):a.left+b.x+v;if(l){var w=a.top+b.y;var u=k/2-n}else t?(w=a.top+b.y-f+k,u=f-k/2-n):(w=a.top+b.y-f/2+k/2,u=f/2-(e?.9*C:C/2))}else if("top"===d||"bottom"===d)if(w="top"===d?a.top+b.y-f-(e?C:0):a.top+b.y+k,r){J=0;var y=a.left+v/2-n}else x?(J=h-1.01*m,y=m-(h-a.left)+v/2-n/2):(J=a.left+b.x-m/2+v/2,y=m/2-n/2);c.style.top=w+"px";c.style.left=J+"px";u&&(A.style.top=u+"px");y&&(A.style.left=y+"px")};Q.version="2.0.24";var X=function(a){a=q(a);var c=this,
d=G(a,".alert"),b=function(b){d=G(b.target,".alert");(a=q('[data-dismiss="alert"]',d))&&d&&(a===b.target||a.contains(b.target))&&c.close()},m=function(){x.call(d,"closed","alert");L(a,"click",b);d.parentNode.removeChild(d)};this.close=function(){d&&a&&p(d,"show")&&(x.call(d,"close","alert"),y(d,"show"),d&&(p(d,"fade")?H(d,m):m()))};"Alert"in a||u(a,"click",b);a.Alert=c};D.push(["Alert",X,'[data-dismiss="alert"]']);var Y=function(a){a=q(a);var c=!1,d=function(a){32===(a.which||a.keyCode)&&a.target===
g.activeElement&&m(a)},b=function(a){32===(a.which||a.keyCode)&&a.preventDefault()},m=function(b){var d="LABEL"===b.target.tagName?b.target:"LABEL"===b.target.parentNode.tagName?b.target.parentNode:null;if(d){b=I(b.target.parentNode,"btn");var f=d.getElementsByTagName("INPUT")[0];if(f){"checkbox"===f.type&&(f.checked?(y(d,"active"),f.getAttribute("checked"),f.removeAttribute("checked"),f.checked=!1):(w(d,"active"),f.getAttribute("checked"),f.setAttribute("checked","checked"),f.checked=!0),c||(c=!0,
x.call(f,"change","button"),x.call(a,"change","button")));if("radio"===f.type&&!c&&!f.checked){w(d,"active");f.setAttribute("checked","checked");f.checked=!0;x.call(f,"change","button");x.call(a,"change","button");c=!0;f=0;for(var h=b.length;f<h;f++){var e=b[f],m=e.getElementsByTagName("INPUT")[0];e!==d&&p(e,"active")&&(y(e,"active"),m.removeAttribute("checked"),m.checked=!1,x.call(m,"change","button"))}}setTimeout(function(){c=!1},50)}}};"Button"in a||(u(a,"click",m),q("[tabindex]",a)&&u(a,"keyup",
d),u(a,"keydown",b));d=I(a,"btn");b=d.length;for(var f=0;f<b;f++)!p(d[f],"active")&&q("input:checked",d[f])&&w(d[f],"active");a.Button=this};D.push(["Button",Y,'[data-toggle="buttons"]']);var Z=function(a,c){a=q(a);c=c||{};var d=a.getAttribute("data-interval"),b=c.interval;d="false"===d?0:parseInt(d);var m="hover"===a.getAttribute("data-pause")||!1,f="true"===a.getAttribute("data-keyboard")||!1;this.keyboard=!0===c.keyboard||f;this.pause="hover"===c.pause||m?"hover":!1;this.interval="number"===typeof b?
b:!1===b||0===d||!1===d?0:isNaN(d)?5E3:d;var h=this,n=a.index=0,v=a.timer=0,k=!1,e=I(a,"carousel-item"),A=e.length,l=this.direction="left",r=I(a,"carousel-control-prev")[0],B=I(a,"carousel-control-next")[0],t=(c=q(".carousel-indicators",a))&&c.getElementsByTagName("LI")||[];b=function(){!1===h.interval||p(a,"paused")||(w(a,"paused"),!k&&clearInterval(v))};d=function(){!1!==h.interval&&p(a,"paused")&&(y(a,"paused"),!k&&clearInterval(v),!k&&h.cycle())};m=function(a){a.preventDefault();if(!k){if((a=
a.target)&&!p(a,"active")&&a.getAttribute("data-slide-to"))n=parseInt(a.getAttribute("data-slide-to"),10);else return!1;h.slideTo(n)}};f=function(a){a.preventDefault();k||(a=a.currentTarget||a.srcElement,a===B?n++:a===r&&n--,h.slideTo(n))};var C=function(a){if(!k){switch(a.which){case 39:n++;break;case 37:n--;break;default:return}h.slideTo(n)}},F=function(a){for(var e=0,b=t.length;e<b;e++)y(t[e],"active");t[a]&&w(t[a],"active")};this.cycle=function(){v=setInterval(function(){var e=a.getBoundingClientRect();
e.top<=(z.innerHeight||E.clientHeight)&&0<=e.bottom&&(n++,h.slideTo(n))},this.interval)};this.slideTo=function(b){if(!k){var c=this.getActiveIndex();if(c!==b){if(c<b||0===c&&b===A-1)l=h.direction="left";else if(c>b||c===A-1&&0===b)l=h.direction="right";0>b?b=A-1:b===A&&(b=0);n=b;var d="left"===l?"next":"prev";x.call(a,"slide","carousel",e[b]);k=!0;clearInterval(v);F(b);N&&p(a,"slide")?(w(e[b],"carousel-item-"+d),e[b].offsetWidth,w(e[b],"carousel-item-"+l),w(e[c],"carousel-item-"+l),T(e[b],S,function(f){f=
f.target!==e[b]?1E3*f.elapsedTime+100:20;k&&setTimeout(function(){k=!1;w(e[b],"active");y(e[c],"active");y(e[b],"carousel-item-"+d);y(e[b],"carousel-item-"+l);y(e[c],"carousel-item-"+l);x.call(a,"slid","carousel",e[b]);g.hidden||!h.interval||p(a,"paused")||h.cycle()},f)})):(w(e[b],"active"),e[b].offsetWidth,y(e[c],"active"),setTimeout(function(){k=!1;h.interval&&!p(a,"paused")&&h.cycle();x.call(a,"slid","carousel",e[b])},100))}}};this.getActiveIndex=function(){return e.indexOf(I(a,"carousel-item active")[0])||
0};"Carousel"in a||(h.pause&&h.interval&&(u(a,K[0],b),u(a,K[1],d),u(a,"touchstart",b),u(a,"touchend",d)),B&&u(B,"click",f),r&&u(r,"click",f),c&&u(c,"click",m),!0===h.keyboard&&u(z,"keydown",C));0>h.getActiveIndex()&&(e.length&&w(e[0],"active"),t.length&&F(0));h.interval&&h.cycle();a.Carousel=h};D.push(["Carousel",Z,'[data-ride="carousel"]']);var aa=function(a,c){a=q(a);c=c||{};var d=null,b=null,m=this,f=a.getAttribute("data-parent"),h,g,v=function(a,b){x.call(a,"show","collapse");a.isAnimating=!0;
w(a,"collapsing");y(a,"collapse");a.style.height=a.scrollHeight+"px";H(a,function(){a.isAnimating=!1;a.setAttribute("aria-expanded","true");b.setAttribute("aria-expanded","true");y(a,"collapsing");w(a,"collapse");w(a,"show");a.style.height="";x.call(a,"shown","collapse")})},k=function(a,b){x.call(a,"hide","collapse");a.isAnimating=!0;a.style.height=a.scrollHeight+"px";y(a,"collapse");y(a,"show");w(a,"collapsing");a.offsetWidth;a.style.height="0px";H(a,function(){a.isAnimating=!1;a.setAttribute("aria-expanded",
"false");b.setAttribute("aria-expanded","false");y(a,"collapsing");w(a,"collapse");a.style.height="";x.call(a,"hidden","collapse")})};this.toggle=function(a){a.preventDefault();p(b,"show")?m.hide():m.show()};this.hide=function(){b.isAnimating||(k(b,a),w(a,"collapsed"))};this.show=function(){d&&(g=(h=q(".collapse.show",d))&&(q('[data-toggle="collapse"][data-target="#'+h.id+'"]',d)||q('[data-toggle="collapse"][href="#'+h.id+'"]',d)));if(!b.isAnimating||h&&!h.isAnimating)g&&h!==b&&(k(h,g),w(g,"collapsed")),
v(b,a),y(a,"collapsed")};"Collapse"in a||u(a,"click",m.toggle);b=function(){var b=a.href&&a.getAttribute("href"),c=a.getAttribute("data-target");return(b=b||c&&"#"===c.charAt(0)&&c)&&q(b)}();b.isAnimating=!1;d=q(c.parent)||f&&G(a,f);a.Collapse=m};D.push(["Collapse",aa,'[data-toggle="collapse"]']);var ba=function(a,c){a=q(a);this.persist=!0===c||"true"===a.getAttribute("data-persist")||!1;var d=this,b=a.parentNode,m=null,f=q(".dropdown-menu",b),h=function(){for(var a=f.children,b=[],c=0;c<a.length;c++){if(a[c].children.length)for(var d=
0;d<a[c].children.length;d++)"A"===a[c].children[d].tagName&&b.push(a[c].children[d]);"A"===a[c].tagName&&b.push(a[c])}return b}(),n=function(a){(a.href&&"#"===a.href.slice(-1)||a.parentNode&&a.parentNode.href&&"#"===a.parentNode.href.slice(-1))&&this.preventDefault()},v=function(){var b=a.open?u:L;b(g,"click",k);b(g,"keydown",A);b(g,"keyup",l)},k=function(b){var c=b.target,e=c&&("Dropdown"in c||"Dropdown"in c.parentNode);if(c!==f&&!f.contains(c)||!d.persist&&!e)m=c===a||a.contains(c)?a:null,B(),
n.call(b,c)},e=function(b){m=a;r();n.call(b,b.target)},A=function(a){var b=a.which||a.keyCode;38!==b&&40!==b||a.preventDefault()},l=function(b){b=b.which||b.keyCode;var c=g.activeElement,e=h.indexOf(c),l=c===a,n=f.contains(c);if((c=c.parentNode===f||c.parentNode.parentNode===f)||l){do if(e=l?0:38===b?1<e?e-1:0:40===b?e<h.length-1?e+1:e:e,0==e||e==h.length-1)break;while(!h[e].offsetHeight);h[e]&&O(h[e])}(h.length&&c||!h.length&&(n||l)||!n)&&a.open&&27===b&&(d.toggle(),m=null)},r=function(){x.call(b,
"show","dropdown",m);w(f,"show");w(b,"show");f.setAttribute("aria-expanded",!0);x.call(b,"shown","dropdown",m);a.open=!0;L(a,"click",e);setTimeout(function(){O(f.getElementsByTagName("INPUT")[0]||a);v()},1)},B=function(){x.call(b,"hide","dropdown",m);y(f,"show");y(b,"show");f.setAttribute("aria-expanded",!1);x.call(b,"hidden","dropdown",m);a.open=!1;v();O(a);setTimeout(function(){u(a,"click",e)},1)};a.open=!1;this.toggle=function(){p(b,"show")&&a.open?B():r()};"Dropdown"in a||(!1 in f&&f.setAttribute("tabindex",
"0"),u(a,"click",e));a.Dropdown=d};D.push(["Dropdown",ba,'[data-toggle="dropdown"]']);var ca=function(a,c){a=q(a);var d=a.getAttribute("data-target")||a.getAttribute("href");d=q(d);var b=p(a,"modal")?a:d,m;p(a,"modal")&&(a=null);if(b){c=c||{};this.keyboard=!1===c.keyboard||"false"===b.getAttribute("data-keyboard")?!1:!0;this.backdrop="static"===c.backdrop||"static"===b.getAttribute("data-backdrop")?"static":!0;this.backdrop=!1===c.backdrop||"false"===b.getAttribute("data-backdrop")?!1:this.backdrop;
this.content=c.content;var f=this,h=null,n,v,k,e,A=I(E,"fixed-top").concat(I(E,"fixed-bottom")),l=function(){var a=z.getComputedStyle(g.body);a=parseInt(a.paddingRight,10);if(n&&(g.body.style.paddingRight=a+k+"px",A.length))for(var b=0;b<A.length;b++)a=z.getComputedStyle(A[b]).paddingRight,A[b].style.paddingRight=parseInt(a)+k+"px"},r=function(){var a=g.body.clientWidth,c=E.getBoundingClientRect();n=a<(z.innerWidth||c.right-Math.abs(c.left));v=b.scrollHeight>E.clientHeight;a=g.createElement("div");
a.className="modal-scrollbar-measure";g.body.appendChild(a);c=a.offsetWidth-a.clientWidth;g.body.removeChild(a);k=c},B=function(){b.style.paddingLeft=!n&&v?k+"px":"";b.style.paddingRight=n&&!v?k+"px":""},t=function(){P=1;var a=g.createElement("div");e=q(".modal-backdrop");null===e&&(a.setAttribute("class","modal-backdrop fade"),e=a,g.body.appendChild(e))},C=function(){(e=q(".modal-backdrop"))&&null!==e&&"object"===typeof e&&(P=0,g.body.removeChild(e),e=null);x.call(b,"hidden","modal")},F=function(){p(b,
"show")?u(g,"keydown",V):L(g,"keydown",V)},M=function(){p(b,"show")?u(z,"resize",f.update):L(z,"resize",f.update)},J=function(){p(b,"show")?u(b,"click",K):L(b,"click",K)},D=function(){O(b);x.call(b,"shown","modal",h)},G=function(){b.style.display="";a&&O(a);if(!I(g,"modal show")[0]){b.style.paddingLeft="";b.style.paddingRight="";g.body.style.paddingRight="";if(A.length)for(var c=0;c<A.length;c++)A[c].style.paddingRight="";y(g.body,"modal-open");e&&p(e,"fade")?(y(e,"show"),H(e,C)):C();M();J();F()}};
c=function(c){var d=c.target;d=d.hasAttribute("data-target")||d.hasAttribute("href")?d:d.parentNode;d!==a||p(b,"show")||(h=b.modalTrigger=a,f.show(),c.preventDefault())};var V=function(a){f.keyboard&&27==a.which&&p(b,"show")&&f.hide()},K=function(a){var c=a.target;p(b,"show")&&("modal"===c.parentNode.getAttribute("data-dismiss")||"modal"===c.getAttribute("data-dismiss")||c===b&&"static"!==f.backdrop)&&(f.hide(),h=null,a.preventDefault())};this.toggle=function(){p(b,"show")?this.hide():this.show()};
this.show=function(){x.call(b,"show","modal",h);var a=I(g,"modal show")[0];a&&a!==b&&a.modalTrigger.Modal.hide();this.backdrop&&!P&&t();e&&P&&!p(e,"show")&&(e.offsetWidth,m=R(e),w(e,"show"));setTimeout(function(){b.style.display="block";r();l();B();w(g.body,"modal-open");w(b,"show");b.setAttribute("aria-hidden",!1);M();J();F();p(b,"fade")?H(b,D):D()},N&&e?m:0)};this.hide=function(){x.call(b,"hide","modal");m=(e=q(".modal-backdrop"))&&R(e);y(b,"show");b.setAttribute("aria-hidden",!0);setTimeout(function(){p(b,
"fade")?H(b,G):G()},N&&e?m:0)};this.setContent=function(a){q(".modal-content",b).innerHTML=a};this.update=function(){p(b,"show")&&(r(),l(),B())};!a||"Modal"in a||u(a,"click",c);f.content&&f.setContent(f.content);a&&(a.Modal=f)}};D.push(["Modal",ca,'[data-toggle="modal"]']);var da=function(a,c){a=q(a);c=c||{};var d=a.getAttribute("data-trigger"),b=a.getAttribute("data-animation"),m=a.getAttribute("data-placement"),f=a.getAttribute("data-dismissible"),h=a.getAttribute("data-delay"),n=a.getAttribute("data-container"),
v=q(c.container);n=q(n);var k=G(a,".modal"),e=G(a,".fixed-top"),A=G(a,".fixed-bottom");this.template=c.template?c.template:null;this.trigger=c.trigger?c.trigger:d||"hover";this.animation=c.animation&&"fade"!==c.animation?c.animation:b||"fade";this.placement=c.placement?c.placement:m||"top";this.delay=parseInt(c.delay||h)||200;this.dismissible=c.dismissible||"true"===f?!0:!1;this.container=v?v:n?n:e?e:A?A:k?k:g.body;var l=this,r=a.getAttribute("data-title")||null,B=a.getAttribute("data-content")||
null;if(B||this.template){var t=null,C=0,F=this.placement,M=function(a){null!==t&&a.target===q(".close",t)&&l.hide()},J=function(b){"click"!=l.trigger&&"focus"!=l.trigger||l.dismissible||b(a,"blur",l.hide);l.dismissible&&b(g,"click",M);b(z,"resize",l.hide)},D=function(){J(u);x.call(a,"shown","popover")},E=function(){J(L);l.container.removeChild(t);t=C=null;x.call(a,"hidden","popover")};this.toggle=function(){null===t?l.show():l.hide()};this.show=function(){clearTimeout(C);C=setTimeout(function(){if(null===
t){F=l.placement;r=a.getAttribute("data-title");B=a.getAttribute("data-content");t=g.createElement("div");var b=g.createElement("div");b.setAttribute("class","arrow");t.appendChild(b);null!==B&&null===l.template?(t.setAttribute("role","tooltip"),null!==r&&(b=g.createElement("h3"),b.setAttribute("class","popover-header"),b.innerHTML=l.dismissible?r+'<button type="button" class="close">\u00d7</button>':r,t.appendChild(b)),b=g.createElement("div"),b.setAttribute("class","popover-body"),b.innerHTML=l.dismissible&&
null===r?B+'<button type="button" class="close">\u00d7</button>':B,t.appendChild(b)):(b=g.createElement("div"),b.innerHTML=l.template,t.innerHTML=b.firstChild.innerHTML);l.container.appendChild(t);t.style.display="block";t.setAttribute("class","popover bs-popover-"+F+" "+l.animation);W(a,t,F,l.container);!p(t,"show")&&w(t,"show");x.call(a,"show","popover");l.animation?H(t,D):D()}},20)};this.hide=function(){clearTimeout(C);C=setTimeout(function(){t&&null!==t&&p(t,"show")&&(x.call(a,"hide","popover"),
y(t,"show"),l.animation?H(t,E):E())},l.delay)};"Popover"in a||("hover"===l.trigger?(u(a,K[0],l.show),l.dismissible||u(a,K[1],l.hide)):"click"!=l.trigger&&"focus"!=l.trigger||u(a,l.trigger,l.toggle));a.Popover=l}};D.push(["Popover",da,'[data-toggle="popover"]']);var ea=function(a,c){a=q(a);var d=q(a.getAttribute("data-target")),b=a.getAttribute("data-offset");c=c||{};if(c.target||d){d=(d=c.target&&q(c.target)||d)&&d.getElementsByTagName("A");var m=parseInt(b||c.offset)||10,f=[],h=[],g;c=a.offsetHeight<
a.scrollHeight?a:z;var v=c===z;b=0;for(var k=d.length;b<k;b++){var e=d[b].getAttribute("href");if(e=e&&"#"===e.charAt(0)&&"#"!==e.slice(-1)&&q(e))f.push(d[b]),h.push(e)}this.refresh=function(){g=v?U().y:a.scrollTop;for(var b=0,c=f.length;b<c;b++){var d=b,e=f[d],n=h[d],k=e.parentNode.parentNode;k=p(k,"dropdown")&&k.getElementsByTagName("A")[0];var q=v&&n.getBoundingClientRect(),u=p(e,"active")||!1,z=v?q.bottom+g-m:h[d+1]?h[d+1].offsetTop-m:a.scrollHeight;n=g>=(v?q.top+g:n.offsetTop)-m&&z>g;!u&&n?p(e,
"active")||(w(e,"active"),k&&!p(k,"active")&&w(k,"active"),x.call(a,"activate","scrollspy",f[d])):!n&&p(e,"active")&&(y(e,"active"),k&&p(k,"active")&&!I(e.parentNode,"active").length&&y(k,"active"))}};"ScrollSpy"in a||(u(c,"scroll",this.refresh),u(z,"resize",this.refresh));this.refresh();a.ScrollSpy=this}};D.push(["ScrollSpy",ea,'[data-spy="scroll"]']);var fa=function(a,c){a=q(a);var d=a.getAttribute("data-height");c=c||{};this.height=N?c.height||"true"===d:!1;var b=this,g,f=G(a,".nav"),h=!1,n=f&&
q(".dropdown-toggle",f),v,k,e,A,l,r,z=function(){h.style.height="";y(h,"collapsing");f.isAnimating=!1},t=function(){h?l?z():setTimeout(function(){h.style.height=r+"px";h.offsetWidth;H(h,z)},50):f.isAnimating=!1;x.call(g,"shown","tab",v)},C=function(){h&&(k.style["float"]="left",e.style["float"]="left",A=k.scrollHeight);w(e,"active");x.call(g,"show","tab",v);y(k,"active");x.call(v,"hidden","tab",g);h&&(r=e.scrollHeight,l=r===A,w(h,"collapsing"),h.style.height=A+"px",h.offsetHeight,k.style["float"]=
"",e.style["float"]="");p(e,"fade")?setTimeout(function(){w(e,"show");H(e,t)},20):t()};if(f){f.isAnimating=!1;var F=function(){var a=I(f,"active"),b;1!==a.length||p(a[0].parentNode,"dropdown")?1<a.length&&(b=a[a.length-1]):b=a[0];return b};c=function(a){var c=a.target.getAttribute("href");a.preventDefault();g="tab"===a.target.getAttribute("data-toggle")||c&&"#"===c.charAt(0)?a.target:a.target.parentNode;f.isAnimating||p(g,"active")||b.show()};this.show=function(){g=g||a;e=q(g.getAttribute("href"));
v=F();k=q(F().getAttribute("href"));f.isAnimating=!0;y(v,"active");w(g,"active");n&&(p(a.parentNode,"dropdown-menu")?p(n,"active")||w(n,"active"):p(n,"active")&&y(n,"active"));x.call(v,"hide","tab",g);p(k,"fade")?(y(k,"show"),H(k,C)):C()};"Tab"in a||u(a,"click",c);b.height&&(h=q(F().getAttribute("href")).parentNode);a.Tab=b}};D.push(["Tab",fa,'[data-toggle="tab"]']);var ha=function(a,c){a=q(a);c=c||{};var d=a.getAttribute("data-animation"),b=a.getAttribute("data-placement"),m=a.getAttribute("data-delay"),
f=a.getAttribute("data-container"),h=q(c.container);f=q(f);var n=G(a,".modal"),v=G(a,".fixed-top"),k=G(a,".fixed-bottom");this.animation=c.animation&&"fade"!==c.animation?c.animation:d||"fade";this.placement=c.placement?c.placement:b||"top";this.delay=parseInt(c.delay||m)||200;this.container=h?h:f?f:v?v:k?k:n?n:g.body;var e=this,A=0,l=this.placement,r=null,B=a.getAttribute("title")||a.getAttribute("data-title")||a.getAttribute("data-original-title");if(B&&""!=B){var t=function(){u(z,"resize",e.hide);
x.call(a,"shown","tooltip")},C=function(){L(z,"resize",e.hide);e.container.removeChild(r);A=r=null;x.call(a,"hidden","tooltip")};this.show=function(){clearTimeout(A);A=setTimeout(function(){if(null===r){l=e.placement;if((B=a.getAttribute("title")||a.getAttribute("data-title")||a.getAttribute("data-original-title"))&&""!=B){r=g.createElement("div");r.setAttribute("role","tooltip");var b=g.createElement("div");b.setAttribute("class","arrow");r.appendChild(b);b=g.createElement("div");b.setAttribute("class",
"tooltip-inner");r.appendChild(b);b.innerHTML=B;e.container.appendChild(r);r.setAttribute("class","tooltip bs-tooltip-"+l+" "+e.animation);b=void 0}else b=!1;0!=b&&(W(a,r,l,e.container),!p(r,"show")&&w(r,"show"),x.call(a,"show","tooltip"),e.animation?H(r,t):t())}},20)};this.hide=function(){clearTimeout(A);A=setTimeout(function(){r&&p(r,"show")&&(x.call(a,"hide","tooltip"),y(r,"show"),e.animation?H(r,C):C())},e.delay)};this.toggle=function(){r?e.hide():e.show()};"Tooltip"in a||(a.setAttribute("data-original-title",
B),a.removeAttribute("title"),u(a,K[0],e.show),u(a,K[1],e.hide));a.Tooltip=e}};D.push(["Tooltip",ha,'[data-toggle="tooltip"]']);var ia=Q.initCallback=function(a){a=a||g;for(var c=0,d=D.length;c<d;c++)for(var b=D[c][1],m=a.querySelectorAll(D[c][2]),f=0,h=m.length;f<h;f++)new b(m[f])};g.body?ia():u(g,"DOMContentLoaded",function(){ia()});return{Alert:X,Button:Y,Carousel:Z,Collapse:aa,Dropdown:ba,Modal:ca,Popover:da,ScrollSpy:ea,Tab:fa,Tooltip:ha}});
(function(z,g){"function"===typeof define&&define.amd?define([],g):"object"===typeof module&&module.exports?module.exports=g():(g=g(),z.Alert=g.Alert,z.Button=g.Button,z.Carousel=g.Carousel,z.Collapse=g.Collapse,z.Dropdown=g.Dropdown,z.Modal=g.Modal,z.Popover=g.Popover,z.ScrollSpy=g.ScrollSpy,z.Tab=g.Tab,z.Toast=g.Toast,z.Tooltip=g.Tooltip)})(this,function(){var z="undefined"!==typeof global?global:this||window,g=document,G=g.documentElement,Q=z.BSN={},D=Q.supports=[],K="onmouseleave"in g?["mouseenter",
"mouseleave"]:["mouseover","mouseout"],ha=/\b(top|bottom|left|right)+/,O=0,M="WebkitTransition"in G.style||"transition"in G.style,ia="WebkitTransition"in G.style?"webkitTransitionEnd":"transitionend",ja="WebkitDuration"in G.style?"webkitTransitionDuration":"transitionDuration",N=function(a){a.focus?a.focus():a.setActive()},t=function(a,b){a.classList.add(b)},x=function(a,b){a.classList.remove(b)},p=function(a,b){return a.classList.contains(b)},H=function(a,b){return[].slice.call(a.getElementsByClassName(b))},
r=function(a,b){b=b?b:g;return"object"===typeof a?a:b.querySelector(a)},I=function(a,b){var d=b.charAt(0),c=b.substr(1);if("."===d)for(;a&&a!==g;a=a.parentNode){if(null!==r(b,a.parentNode)&&p(a,c))return a}else if("#"===d)for(;a&&a!==g;a=a.parentNode)if(a.id===c)return a;return!1},w=function(a,b,d){a.addEventListener(b,d,!1)},J=function(a,b,d){a.removeEventListener(b,d,!1)},ka=function(a,b,d){w(a,b,function k(m){d(m);J(a,b,k)})},R=function(a){a=M?z.getComputedStyle(a)[ja]:0;a=parseFloat(a);return a=
"number"!==typeof a||isNaN(a)?0:1E3*a},E=function(a,b){var d=0;R(a)?ka(a,ia,function(a){!d&&b(a);d=1}):setTimeout(function(){!d&&b();d=1},17)},u=function(a,b,d){a=new CustomEvent(a+".bs."+b);a.relatedTarget=d;this.dispatchEvent(a)},S=function(){return{y:z.pageYOffset||G.scrollTop,x:z.pageXOffset||G.scrollLeft}},T=function(a,b,d,c){var m=b.offsetWidth,k=b.offsetHeight,l=G.clientWidth||g.body.clientWidth,h=G.clientHeight||g.body.clientHeight;a=a.getBoundingClientRect();c=c===g.body?S():{x:c.offsetLeft+
c.scrollLeft,y:c.offsetTop+c.scrollTop};var e=a.right-a.left,q=a.bottom-a.top,f=p(b,"popover"),B=r(".arrow",b),n=0>a.top+q/2-k/2,y=0>a.left+e/2-m/2,u=a.left+m/2+e/2>=l,v=a.top+k/2+q/2>=h;var C=0>a.top-k;var F=0>a.left-m;h=a.top+k+q>=h;var L=a.left+m+e>=l;d=("left"===d||"right"===d)&&F&&L?"top":d;d="top"===d&&C?"bottom":d;d="bottom"===d&&h?"top":d;d="left"===d&&F?"right":d;d="right"===d&&L?"left":d;-1===b.className.indexOf(d)&&(b.className=b.className.replace(ha,d));h=B.offsetWidth;C=B.offsetHeight;
if("left"===d||"right"===d){var t="left"===d?a.left+c.x-m-(f?h:0):a.left+c.x+e;if(n){var x=a.top+c.y;var w=q/2-h}else v?(x=a.top+c.y-k+q,w=k-q/2-h):(x=a.top+c.y-k/2+q/2,w=k/2-(f?.9*C:C/2))}else if("top"===d||"bottom"===d)if(x="top"===d?a.top+c.y-k-(f?C:0):a.top+c.y+q,y){t=0;var P=a.left+e/2-h}else u?(t=l-1.01*m,P=m-(l-a.left)+e/2-h/2):(t=a.left+c.x-m/2+e/2,P=m/2-h/2);b.style.top=x+"px";b.style.left=t+"px";w&&(B.style.top=w+"px");P&&(B.style.left=P+"px")};Q.version="2.0.26";var U=function(a){a=r(a);
var b=this,d=I(a,".alert"),c=function(c){d=I(c.target,".alert");(a=r('[data-dismiss="alert"]',d))&&d&&(a===c.target||a.contains(c.target))&&b.close()},m=function(){u.call(d,"closed","alert");J(a,"click",c);d.parentNode.removeChild(d)};this.close=function(){d&&a&&p(d,"show")&&(u.call(d,"close","alert"),x(d,"show"),d&&(p(d,"fade")?E(d,m):m()))};"Alert"in a||w(a,"click",c);a.Alert=b};D.push(["Alert",U,'[data-dismiss="alert"]']);var V=function(a){a=r(a);var b=!1,d=function(a){32===(a.which||a.keyCode)&&
a.target===g.activeElement&&m(a)},c=function(a){32===(a.which||a.keyCode)&&a.preventDefault()},m=function(c){var d="LABEL"===c.target.tagName?c.target:"LABEL"===c.target.parentNode.tagName?c.target.parentNode:null;if(d){c=H(c.target.parentNode,"btn");var e=d.getElementsByTagName("INPUT")[0];if(e){"checkbox"===e.type&&(e.checked?(x(d,"active"),e.getAttribute("checked"),e.removeAttribute("checked"),e.checked=!1):(t(d,"active"),e.getAttribute("checked"),e.setAttribute("checked","checked"),e.checked=
!0),b||(b=!0,u.call(e,"change","button"),u.call(a,"change","button")));if("radio"===e.type&&!b&&!e.checked){t(d,"active");e.setAttribute("checked","checked");e.checked=!0;u.call(e,"change","button");u.call(a,"change","button");b=!0;e=0;for(var k=c.length;e<k;e++){var f=c[e],l=f.getElementsByTagName("INPUT")[0];f!==d&&p(f,"active")&&(x(f,"active"),l.removeAttribute("checked"),l.checked=!1,u.call(l,"change","button"))}}setTimeout(function(){b=!1},50)}}};"Button"in a||(w(a,"click",m),r("[tabindex]",
a)&&w(a,"keyup",d),w(a,"keydown",c));d=H(a,"btn");c=d.length;for(var k=0;k<c;k++)!p(d[k],"active")&&r("input:checked",d[k])&&t(d[k],"active");a.Button=this};D.push(["Button",V,'[data-toggle="buttons"]']);var W=function(a,b){a=r(a);b=b||{};var d=a.getAttribute("data-interval"),c=b.interval;d="false"===d?0:parseInt(d);var m="hover"===a.getAttribute("data-pause")||!1,k="true"===a.getAttribute("data-keyboard")||!1;this.keyboard=!0===b.keyboard||k;this.pause="hover"===b.pause||m?"hover":!1;this.interval=
"number"===typeof c?c:!1===c||0===d||!1===d?0:isNaN(d)?5E3:d;var l=this,h=a.index=0,e=a.timer=0,q=!1,f=H(a,"carousel-item"),B=f.length,n=this.direction="left",y=H(a,"carousel-control-prev")[0],A=H(a,"carousel-control-next")[0],v=(b=r(".carousel-indicators",a))&&b.getElementsByTagName("LI")||[];if(!(2>B)){c=function(){!1===l.interval||p(a,"paused")||(t(a,"paused"),!q&&(clearInterval(e),e=null))};d=function(){!1!==l.interval&&p(a,"paused")&&(x(a,"paused"),!q&&(clearInterval(e),e=null),!q&&l.cycle())};
m=function(a){a.preventDefault();if(!q){if((a=a.target)&&!p(a,"active")&&a.getAttribute("data-slide-to"))h=parseInt(a.getAttribute("data-slide-to"),10);else return!1;l.slideTo(h)}};k=function(a){a.preventDefault();q||(a=a.currentTarget||a.srcElement,a===A?h++:a===y&&h--,l.slideTo(h))};var C=function(a){if(!q){switch(a.which){case 39:h++;break;case 37:h--;break;default:return}l.slideTo(h)}},F=function(a){for(var b=0,c=v.length;b<c;b++)x(v[b],"active");v[a]&&t(v[a],"active")};this.cycle=function(){e&&
(clearInterval(e),e=null);e=setInterval(function(){var b=a.getBoundingClientRect();b.top<=(z.innerHeight||G.clientHeight)&&0<=b.bottom&&(h++,l.slideTo(h))},this.interval)};this.slideTo=function(b){if(!q){var c=this.getActiveIndex();if(c!==b){if(c<b||0===c&&b===B-1)n=l.direction="left";else if(c>b||c===B-1&&0===b)n=l.direction="right";0>b?b=B-1:b>=B&&(b=0);h=b;var d="left"===n?"next":"prev";u.call(a,"slide","carousel",f[b]);q=!0;clearInterval(e);e=null;F(b);M&&p(a,"slide")?(t(f[b],"carousel-item-"+
d),f[b].offsetWidth,t(f[b],"carousel-item-"+n),t(f[c],"carousel-item-"+n),E(f[b],function(e){e=e&&e.target!==f[b]?1E3*e.elapsedTime+100:20;q&&setTimeout(function(){q=!1;t(f[b],"active");x(f[c],"active");x(f[b],"carousel-item-"+d);x(f[b],"carousel-item-"+n);x(f[c],"carousel-item-"+n);u.call(a,"slid","carousel",f[b]);g.hidden||!l.interval||p(a,"paused")||l.cycle()},e)})):(t(f[b],"active"),f[b].offsetWidth,x(f[c],"active"),setTimeout(function(){q=!1;l.interval&&!p(a,"paused")&&l.cycle();u.call(a,"slid",
"carousel",f[b])},100))}}};this.getActiveIndex=function(){return f.indexOf(H(a,"carousel-item active")[0])||0};"Carousel"in a||(l.pause&&l.interval&&(w(a,K[0],c),w(a,K[1],d),w(a,"touchstart",c),w(a,"touchend",d)),A&&w(A,"click",k),y&&w(y,"click",k),b&&w(b,"click",m),!0===l.keyboard&&w(z,"keydown",C));0>l.getActiveIndex()&&(f.length&&t(f[0],"active"),v.length&&F(0));l.interval&&l.cycle();a.Carousel=l}};D.push(["Carousel",W,'[data-ride="carousel"]']);var X=function(a,b){a=r(a);b=b||{};var d=null,c=
null,m=this,k=a.getAttribute("data-parent"),l,h,e=function(a,b){u.call(a,"show","collapse");a.isAnimating=!0;t(a,"collapsing");x(a,"collapse");a.style.height=a.scrollHeight+"px";E(a,function(){a.isAnimating=!1;a.setAttribute("aria-expanded","true");b.setAttribute("aria-expanded","true");x(a,"collapsing");t(a,"collapse");t(a,"show");a.style.height="";u.call(a,"shown","collapse")})},g=function(a,b){u.call(a,"hide","collapse");a.isAnimating=!0;a.style.height=a.scrollHeight+"px";x(a,"collapse");x(a,"show");
t(a,"collapsing");a.offsetWidth;a.style.height="0px";E(a,function(){a.isAnimating=!1;a.setAttribute("aria-expanded","false");b.setAttribute("aria-expanded","false");x(a,"collapsing");t(a,"collapse");a.style.height="";u.call(a,"hidden","collapse")})};this.toggle=function(a){a.preventDefault();p(c,"show")?m.hide():m.show()};this.hide=function(){c.isAnimating||(g(c,a),t(a,"collapsed"))};this.show=function(){d&&(h=(l=r(".collapse.show",d))&&(r('[data-toggle="collapse"][data-target="#'+l.id+'"]',d)||r('[data-toggle="collapse"][href="#'+
l.id+'"]',d)));if(!c.isAnimating||l&&!l.isAnimating)h&&l!==c&&(g(l,h),t(h,"collapsed")),e(c,a),x(a,"collapsed")};"Collapse"in a||w(a,"click",m.toggle);c=function(){var b=a.href&&a.getAttribute("href"),c=a.getAttribute("data-target");return(b=b||c&&"#"===c.charAt(0)&&c)&&r(b)}();c.isAnimating=!1;d=r(b.parent)||k&&I(a,k);a.Collapse=m};D.push(["Collapse",X,'[data-toggle="collapse"]']);var Y=function(a,b){a=r(a);this.persist=!0===b||"true"===a.getAttribute("data-persist")||!1;var d=this,c=a.parentNode,
m=null,k=r(".dropdown-menu",c),l=function(){for(var a=k.children,b=[],c=0;c<a.length;c++){if(a[c].children.length)for(var d=0;d<a[c].children.length;d++)"A"===a[c].children[d].tagName&&b.push(a[c].children[d]);"A"===a[c].tagName&&b.push(a[c])}return b}(),h=function(a){(a.href&&"#"===a.href.slice(-1)||a.parentNode&&a.parentNode.href&&"#"===a.parentNode.href.slice(-1))&&this.preventDefault()},e=function(){var b=a.open?w:J;b(g,"click",q);b(g,"keydown",B);b(g,"keyup",n)},q=function(b){var c=b.target,
e=c&&("Dropdown"in c||"Dropdown"in c.parentNode);if(c!==k&&!k.contains(c)||!d.persist&&!e)m=c===a||a.contains(c)?a:null,A(),h.call(b,c)},f=function(b){m=a;y();h.call(b,b.target)},B=function(a){var b=a.which||a.keyCode;38!==b&&40!==b||a.preventDefault()},n=function(b){b=b.which||b.keyCode;var c=g.activeElement,e=l.indexOf(c),f=c===a,h=k.contains(c);if((c=c.parentNode===k||c.parentNode.parentNode===k)||f){do if(e=f?0:38===b?1<e?e-1:0:40===b?e<l.length-1?e+1:e:e,0===e||e===l.length-1)break;while(!l[e].offsetHeight);
l[e]&&N(l[e])}(l.length&&c||!l.length&&(h||f)||!h)&&a.open&&27===b&&(d.toggle(),m=null)},y=function(){u.call(c,"show","dropdown",m);t(k,"show");t(c,"show");a.setAttribute("aria-expanded",!0);u.call(c,"shown","dropdown",m);a.open=!0;J(a,"click",f);setTimeout(function(){N(k.getElementsByTagName("INPUT")[0]||a);e()},1)},A=function(){u.call(c,"hide","dropdown",m);x(k,"show");x(c,"show");a.setAttribute("aria-expanded",!1);u.call(c,"hidden","dropdown",m);a.open=!1;e();N(a);setTimeout(function(){w(a,"click",
f)},1)};a.open=!1;this.toggle=function(){p(c,"show")&&a.open?A():y()};"Dropdown"in a||(!1 in k&&k.setAttribute("tabindex","0"),w(a,"click",f));a.Dropdown=d};D.push(["Dropdown",Y,'[data-toggle="dropdown"]']);var Z=function(a,b){a=r(a);var d=a.getAttribute("data-target")||a.getAttribute("href");d=r(d);var c=p(a,"modal")?a:d;p(a,"modal")&&(a=null);if(c){b=b||{};this.keyboard=!1===b.keyboard||"false"===c.getAttribute("data-keyboard")?!1:!0;this.backdrop="static"===b.backdrop||"static"===c.getAttribute("data-backdrop")?
"static":!0;this.backdrop=!1===b.backdrop||"false"===c.getAttribute("data-backdrop")?!1:this.backdrop;this.content=b.content;var m=this,k=null,l,h,e,q,f=H(G,"fixed-top").concat(H(G,"fixed-bottom")),B=function(){var a=z.getComputedStyle(g.body);a=parseInt(a.paddingRight,10);if(l&&(g.body.style.paddingRight=a+h+"px",c.style.paddingRight=h+"px",f.length))for(var b=0;b<f.length;b++)a=z.getComputedStyle(f[b]).paddingRight,f[b].style.paddingRight=parseInt(a)+h+"px"},n=function(){var a=g.body.clientWidth,
b=G.getBoundingClientRect();l=a<(z.innerWidth||b.right-Math.abs(b.left));a=g.createElement("div");a.className="modal-scrollbar-measure";g.body.appendChild(a);b=a.offsetWidth-a.clientWidth;g.body.removeChild(a);h=b},y=function(){O=1;var a=g.createElement("div");e=r(".modal-backdrop");null===e&&(a.setAttribute("class","modal-backdrop fade"),e=a,g.body.appendChild(e))},A=function(){(e=r(".modal-backdrop"))&&null!==e&&"object"===typeof e&&(O=0,g.body.removeChild(e),e=null);u.call(c,"hidden","modal")},
v=function(){p(c,"show")?w(g,"keydown",I):J(g,"keydown",I)},C=function(){p(c,"show")?w(z,"resize",m.update):J(z,"resize",m.update)},F=function(){p(c,"show")?w(c,"click",K):J(c,"click",K)},L=function(){C();F();v();N(c);u.call(c,"shown","modal",k)},D=function(){c.style.display="";a&&N(a);if(!H(g,"modal show")[0]){g.body.style.paddingRight="";c.style.paddingRight="";if(f.length)for(var b=0;b<f.length;b++)f[b].style.paddingRight="";x(g.body,"modal-open");e&&p(e,"fade")?(x(e,"show"),E(e,A)):A();C();F();
v()}};b=function(b){var d=b.target;d=d.hasAttribute("data-target")||d.hasAttribute("href")?d:d.parentNode;d!==a||p(c,"show")||(k=c.modalTrigger=a,m.show(),b.preventDefault())};var I=function(a){m.keyboard&&27==a.which&&p(c,"show")&&m.hide()},K=function(a){var b=a.target;p(c,"show")&&("modal"===b.parentNode.getAttribute("data-dismiss")||"modal"===b.getAttribute("data-dismiss")||b===c&&"static"!==m.backdrop)&&(m.hide(),k=null,a.preventDefault())};this.toggle=function(){p(c,"show")?this.hide():this.show()};
this.show=function(){u.call(c,"show","modal",k);var a=H(g,"modal show")[0];a&&a!==c&&("modalTrigger"in a&&a.modalTrigger.Modal.hide(),"Modal"in a&&a.Modal.hide());this.backdrop&&!O&&y();e&&O&&!p(e,"show")&&(e.offsetWidth,q=R(e),t(e,"show"));setTimeout(function(){c.style.display="block";n();B();t(g.body,"modal-open");t(c,"show");c.setAttribute("aria-hidden",!1);p(c,"fade")?E(c,L):L()},M&&e?q:0)};this.hide=function(){u.call(c,"hide","modal");q=(e=r(".modal-backdrop"))&&R(e);x(c,"show");c.setAttribute("aria-hidden",
!0);setTimeout(function(){p(c,"fade")?E(c,D):D()},M&&e?q:0)};this.setContent=function(a){r(".modal-content",c).innerHTML=a};this.update=function(){p(c,"show")&&(n(),B())};!a||"Modal"in a||w(a,"click",b);m.content&&m.setContent(m.content);a?(a.Modal=m,c.modalTrigger=a):c.Modal=m}};D.push(["Modal",Z,'[data-toggle="modal"]']);var aa=function(a,b){a=r(a);b=b||{};var d=a.getAttribute("data-trigger"),c=a.getAttribute("data-animation"),m=a.getAttribute("data-placement"),k=a.getAttribute("data-dismissible"),
l=a.getAttribute("data-delay"),h=a.getAttribute("data-container"),e=r(b.container);h=r(h);var q=I(a,".modal"),f=I(a,".fixed-top"),B=I(a,".fixed-bottom");this.template=b.template?b.template:null;this.trigger=b.trigger?b.trigger:d||"hover";this.animation=b.animation&&"fade"!==b.animation?b.animation:c||"fade";this.placement=b.placement?b.placement:m||"top";this.delay=parseInt(b.delay||l)||200;this.dismissible=b.dismissible||"true"===k?!0:!1;this.container=e?e:h?h:f?f:B?B:q?q:g.body;var n=this,y=a.getAttribute("data-title")||
null,A=a.getAttribute("data-content")||null;if(A||this.template){var v=null,C=0,F=this.placement,L=function(a){null!==v&&a.target===r(".close",v)&&n.hide()},D=function(b){"click"!=n.trigger&&"focus"!=n.trigger||n.dismissible||b(a,"blur",n.hide);n.dismissible&&b(g,"click",L);b(z,"resize",n.hide)},G=function(){D(w);u.call(a,"shown","popover")},H=function(){D(J);n.container.removeChild(v);v=C=null;u.call(a,"hidden","popover")};this.toggle=function(){null===v?n.show():n.hide()};this.show=function(){clearTimeout(C);
C=setTimeout(function(){if(null===v){F=n.placement;y=a.getAttribute("data-title");A=a.getAttribute("data-content");v=g.createElement("div");var b=g.createElement("div");b.setAttribute("class","arrow");v.appendChild(b);null!==A&&null===n.template?(v.setAttribute("role","tooltip"),null!==y&&(b=g.createElement("h3"),b.setAttribute("class","popover-header"),b.innerHTML=n.dismissible?y+'<button type="button" class="close">\u00d7</button>':y,v.appendChild(b)),b=g.createElement("div"),b.setAttribute("class",
"popover-body"),b.innerHTML=n.dismissible&&null===y?A+'<button type="button" class="close">\u00d7</button>':A,v.appendChild(b)):(b=g.createElement("div"),b.innerHTML=n.template,v.innerHTML=b.firstChild.innerHTML);n.container.appendChild(v);v.style.display="block";v.setAttribute("class","popover bs-popover-"+F+" "+n.animation);T(a,v,F,n.container);!p(v,"show")&&t(v,"show");u.call(a,"show","popover");n.animation?E(v,G):G()}},20)};this.hide=function(){clearTimeout(C);C=setTimeout(function(){v&&null!==
v&&p(v,"show")&&(u.call(a,"hide","popover"),x(v,"show"),n.animation?E(v,H):H())},n.delay)};"Popover"in a||("hover"===n.trigger?(w(a,K[0],n.show),n.dismissible||w(a,K[1],n.hide)):"click"!=n.trigger&&"focus"!=n.trigger||w(a,n.trigger,n.toggle));a.Popover=n}};D.push(["Popover",aa,'[data-toggle="popover"]']);var ba=function(a,b){a=r(a);var d=r(a.getAttribute("data-target")),c=a.getAttribute("data-offset");b=b||{};if(b.target||d){d=(d=b.target&&r(b.target)||d)&&d.getElementsByTagName("A");var m=parseInt(c||
b.offset)||10,k=[],l=[],h;b=a.offsetHeight<a.scrollHeight?a:z;var e=b===z;c=0;for(var g=d.length;c<g;c++){var f=d[c].getAttribute("href");if(f=f&&"#"===f.charAt(0)&&"#"!==f.slice(-1)&&r(f))k.push(d[c]),l.push(f)}this.refresh=function(){h=e?S().y:a.scrollTop;for(var b=0,c=k.length;b<c;b++){var d=b,f=k[d],g=l[d],q=f.parentNode.parentNode;q=p(q,"dropdown")&&q.getElementsByTagName("A")[0];var r=e&&g.getBoundingClientRect(),w=p(f,"active")||!1,z=e?r.bottom+h-m:l[d+1]?l[d+1].offsetTop-m:a.scrollHeight;
g=h>=(e?r.top+h:g.offsetTop)-m&&z>h;!w&&g?p(f,"active")||(t(f,"active"),q&&!p(q,"active")&&t(q,"active"),u.call(a,"activate","scrollspy",k[d])):!g&&p(f,"active")&&(x(f,"active"),q&&p(q,"active")&&!H(f.parentNode,"active").length&&x(q,"active"))}};"ScrollSpy"in a||(w(b,"scroll",this.refresh),w(z,"resize",this.refresh));this.refresh();a.ScrollSpy=this}};D.push(["ScrollSpy",ba,'[data-spy="scroll"]']);var ca=function(a,b){a=r(a);var d=a.getAttribute("data-height");b=b||{};this.height=M?b.height||"true"===
d:!1;var c=this,m,k=I(a,".nav"),l=!1,h=k&&r(".dropdown-toggle",k),e,g,f,z,n,y,A=function(){l.style.height="";x(l,"collapsing");k.isAnimating=!1},v=function(){l?n?A():setTimeout(function(){l.style.height=y+"px";l.offsetWidth;E(l,A)},50):k.isAnimating=!1;u.call(m,"shown","tab",e)},C=function(){l&&(g.style["float"]="left",f.style["float"]="left",z=g.scrollHeight);t(f,"active");u.call(m,"show","tab",e);x(g,"active");u.call(e,"hidden","tab",m);l&&(y=f.scrollHeight,n=y===z,t(l,"collapsing"),l.style.height=
z+"px",l.offsetHeight,g.style["float"]="",f.style["float"]="");p(f,"fade")?setTimeout(function(){t(f,"show");E(f,v)},20):v()};if(k){k.isAnimating=!1;var F=function(){var a=H(k,"active"),b;1!==a.length||p(a[0].parentNode,"dropdown")?1<a.length&&(b=a[a.length-1]):b=a[0];return b};b=function(a){a.preventDefault();m=a.currentTarget;k.isAnimating||p(m,"active")||c.show()};this.show=function(){m=m||a;f=r(m.getAttribute("href"));e=F();g=r(F().getAttribute("href"));k.isAnimating=!0;x(e,"active");e.setAttribute("aria-selected",
"false");t(m,"active");m.setAttribute("aria-selected","true");h&&(p(a.parentNode,"dropdown-menu")?p(h,"active")||t(h,"active"):p(h,"active")&&x(h,"active"));u.call(e,"hide","tab",m);p(g,"fade")?(x(g,"show"),E(g,C)):C()};"Tab"in a||w(a,"click",b);c.height&&(l=r(F().getAttribute("href")).parentNode);a.Tab=c}};D.push(["Tab",ca,'[data-toggle="tab"]']);var da=function(a,b){a=r(a);b=b||{};var d=a.getAttribute("data-animation"),c=a.getAttribute("data-autohide"),g=a.getAttribute("data-delay");this.animation=
!1===b.animation||"false"===d?0:1;this.autohide=!1===b.autohide||"false"===c?0:1;this.delay=parseInt(b.delay||g)||500;var k=this,l=0,h=I(a,".toast"),e=function(){x(h,"showing");t(h,"show");u.call(h,"shown","toast");k.autohide&&k.hide()},q=function(){t(h,"hide");u.call(h,"hidden","toast")},f=function(){x(h,"show");k.animation?E(h,q):q()},z=function(){clearTimeout(l);l=null;t(h,"hide");J(a,"click",k.hide);h=a=a.Toast=null};this.show=function(){h&&(u.call(h,"show","toast"),k.animation&&t(h,"fade"),x(h,
"hide"),t(h,"showing"),k.animation?E(h,e):e())};this.hide=function(a){h&&p(h,"show")&&(u.call(h,"hide","toast"),a?f():l=setTimeout(f,k.delay))};this.dispose=function(){h&&p(h,"show")&&(x(h,"show"),k.animation?E(h,z):z())};"Toast"in a||w(a,"click",k.hide);a.Toast=k};D.push(["Toast",da,'[data-dismiss="toast"]']);var ea=function(a,b){a=r(a);b=b||{};var d=a.getAttribute("data-animation"),c=a.getAttribute("data-placement"),m=a.getAttribute("data-delay"),k=a.getAttribute("data-container"),l=r(b.container);
k=r(k);var h=I(a,".modal"),e=I(a,".fixed-top"),q=I(a,".fixed-bottom");this.animation=b.animation&&"fade"!==b.animation?b.animation:d||"fade";this.placement=b.placement?b.placement:c||"top";this.delay=parseInt(b.delay||m)||200;this.container=l?l:k?k:e?e:q?q:h?h:g.body;var f=this,B=0,n=this.placement,y=null,A=a.getAttribute("title")||a.getAttribute("data-title")||a.getAttribute("data-original-title");if(A&&""!=A){var v=function(){w(z,"resize",f.hide);u.call(a,"shown","tooltip")},C=function(){J(z,"resize",
f.hide);f.container.removeChild(y);B=y=null;u.call(a,"hidden","tooltip")};this.show=function(){clearTimeout(B);B=setTimeout(function(){if(null===y){n=f.placement;if((A=a.getAttribute("title")||a.getAttribute("data-title")||a.getAttribute("data-original-title"))&&""!=A){y=g.createElement("div");y.setAttribute("role","tooltip");var b=g.createElement("div");b.setAttribute("class","arrow");y.appendChild(b);b=g.createElement("div");b.setAttribute("class","tooltip-inner");y.appendChild(b);b.innerHTML=A;
f.container.appendChild(y);y.setAttribute("class","tooltip bs-tooltip-"+n+" "+f.animation);b=void 0}else b=!1;0!=b&&(T(a,y,n,f.container),!p(y,"show")&&t(y,"show"),u.call(a,"show","tooltip"),f.animation?E(y,v):v())}},20)};this.hide=function(){clearTimeout(B);B=setTimeout(function(){y&&p(y,"show")&&(u.call(a,"hide","tooltip"),x(y,"show"),f.animation?E(y,C):C())},f.delay)};this.toggle=function(){y?f.hide():f.show()};"Tooltip"in a||(a.setAttribute("data-original-title",A),a.removeAttribute("title"),
w(a,K[0],f.show),w(a,K[1],f.hide));a.Tooltip=f}};D.push(["Tooltip",ea,'[data-toggle="tooltip"]']);var fa=Q.initCallback=function(a){a=a||g;for(var b=0,d=D.length;b<d;b++)for(var c=D[b][1],m=a.querySelectorAll(D[b][2]),k=0,l=m.length;k<l;k++)new c(m[k])};g.body?fa():w(g,"DOMContentLoaded",function(){fa()});return{Alert:U,Button:V,Carousel:W,Collapse:X,Dropdown:Y,Modal:Z,Popover:aa,ScrollSpy:ba,Tab:ca,Toast:da,Tooltip:ea}});

View File

@ -3,11 +3,11 @@ $jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Sym
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.iterator;a||(a=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(a){var b=0;return $jscomp.iteratorPrototype(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})};
$jscomp.iteratorPrototype=function(a){$jscomp.initSymbolIterator();a={next:a};a[$jscomp.global.Symbol.iterator]=function(){return this};return a};$jscomp.makeIterator=function(a){$jscomp.initSymbolIterator();var b=a[Symbol.iterator];return b?b.call(a):$jscomp.arrayIterator(a)};$jscomp.arrayFromIterator=function(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c};$jscomp.arrayFromIterable=function(a){return a instanceof Array?a:$jscomp.arrayFromIterator($jscomp.makeIterator(a))};
$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};$jscomp.polyfill("Object.is",function(a){return a?a:function(a,c){return a===c?0!==a||1/a===1/c:a!==a&&c!==c}},"es6","es3");
$jscomp.polyfill("Array.prototype.includes",function(a){return a?a:function(a,c){var d=this;d instanceof String&&(d=String(d));var b=d.length;c=c||0;for(0>c&&(c=Math.max(c+b,0));c<b;c++){var f=d[c];if(f===a||Object.is(f,a))return!0}return!1}},"es7","es3");
$jscomp.polyfill("Array.prototype.includes",function(a){return a?a:function(a,c){var b=this;b instanceof String&&(b=String(b));var e=b.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=b[c];if(f===a||Object.is(f,a))return!0}return!1}},"es7","es3");
$jscomp.checkStringArgs=function(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""};$jscomp.polyfill("String.prototype.includes",function(a){return a?a:function(a,c){return-1!==$jscomp.checkStringArgs(this,a,"includes").indexOf(a,c||0)}},"es6","es3");
$jscomp.polyfill("String.prototype.repeat",function(a){return a?a:function(a){var b=$jscomp.checkStringArgs(this,null,"repeat");if(0>a||1342177279<a)throw new RangeError("Invalid count value");a|=0;for(var d="";a;)if(a&1&&(d+=b),a>>>=1)b+=b;return d}},"es6","es3");$jscomp.owns=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};
$jscomp.assign="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)$jscomp.owns(d,e)&&(a[e]=d[e])}return a};$jscomp.polyfill("Object.assign",function(a){return a||$jscomp.assign},"es6","es3");
var socket,lastSong="",lastSongObj={},lastState,currentSong={},playstate="",settingsLock=!1,settingsParsed=!1,settingsNew={},settings={},alertTimeout,progressTimer,deferredPrompt,dragEl,playlistEl,websocketConnected=!1,websocketTimer=null,appInited=!1,app={apps:{Playback:{state:"0/-/-/",scrollPos:0},Queue:{active:"Current",tabs:{Current:{state:"0/any/-/",scrollPos:0},LastPlayed:{state:"0/any/-/",scrollPos:0}}},Browse:{active:"Database",tabs:{Filesystem:{state:"0/-/-/",scrollPos:0},Playlists:{active:"All",
var socket,lastSong="",lastSongObj={},lastState,currentSong={},playstate="",settingsLock=!1,settingsParsed="false",settingsNew={},settings={},alertTimeout,progressTimer,deferredPrompt,dragEl,playlistEl,websocketConnected=!1,websocketTimer=null,appInited=!1,app={apps:{Playback:{state:"0/-/-/",scrollPos:0},Queue:{active:"Current",tabs:{Current:{state:"0/any/-/",scrollPos:0},LastPlayed:{state:"0/any/-/",scrollPos:0}}},Browse:{active:"Database",tabs:{Filesystem:{state:"0/-/-/",scrollPos:0},Playlists:{active:"All",
views:{All:{state:"0/-/-/",scrollPos:0},Detail:{state:"0/-/-/",scrollPos:0}}},Database:{active:"AlbumArtist",views:{}}}},Search:{state:"0/any/-/",scrollPos:0}},current:{app:"Playback",tab:void 0,view:void 0,page:0,filter:"",search:"",sort:"",scrollPos:0},last:{app:void 0,tab:void 0,view:void 0,filter:"",search:"",sort:"",scrollPos:0}},domCache={};domCache.navbarBottomBtns=document.getElementById("navbar-bottom").getElementsByTagName("div");domCache.navbarBottomBtnsLen=domCache.navbarBottomBtns.length;
domCache.cardHeaderBrowse=document.getElementById("cardHeaderBrowse").getElementsByTagName("a");domCache.cardHeaderBrowseLen=domCache.cardHeaderBrowse.length;domCache.cardHeaderQueue=document.getElementById("cardHeaderQueue").getElementsByTagName("a");domCache.cardHeaderQueueLen=domCache.cardHeaderQueue.length;domCache.counter=document.getElementById("counter");domCache.volumePrct=document.getElementById("volumePrct");domCache.volumeControl=document.getElementById("volumeControl");
domCache.volumeMenu=document.getElementById("volumeMenu");domCache.btnsPlay=document.getElementsByClassName("btnPlay");domCache.btnsPlayLen=domCache.btnsPlay.length;domCache.btnPrev=document.getElementById("btnPrev");domCache.btnNext=document.getElementById("btnNext");domCache.progressBar=document.getElementById("progressBar");domCache.volumeBar=document.getElementById("volumeBar");domCache.outputs=document.getElementById("outputs");domCache.btnAdd=document.getElementById("nav-add2homescreen");
@ -19,7 +19,7 @@ for(b=0;b<domCache.cardHeaderQueueLen;b++)domCache.cardHeaderQueue[b].classList.
document.getElementById("nav"+app.current.app)&&document.getElementById("nav"+app.current.app).classList.add("active");void 0!=app.current.tab&&(document.getElementById("card"+app.current.app+app.current.tab).classList.remove("hide"),document.getElementById("card"+app.current.app+"Nav"+app.current.tab).classList.add("active"));scrollTo(a)}(a=document.getElementById(app.current.app+(void 0==app.current.tab?"":app.current.tab)+(void 0==app.current.view?"":app.current.view)+"List"))&&a.classList.add("opacity05")}
function appGoto(a,b,c,d){var e=document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop;void 0!=app.apps[app.current.app].scrollPos?app.apps[app.current.app].scrollPos=e:void 0!=app.apps[app.current.app].tabs[app.current.tab].scrollPos?app.apps[app.current.app].tabs[app.current.tab].scrollPos=e:void 0!=app.apps[app.current.app].tabs[app.current.tab].views[app.current.view].scrollPos&&(app.apps[app.current.app].tabs[app.current.tab].views[app.current.view].scrollPos=e);app.apps[a].tabs?
(void 0==b&&(b=app.apps[a].active),app.apps[a].tabs[b].views?(void 0==c&&(c=app.apps[a].tabs[b].active),a="/"+a+"/"+b+"/"+c+"!"+(void 0==d?app.apps[a].tabs[b].views[c].state:d)):a="/"+a+"/"+b+"!"+(void 0==d?app.apps[a].tabs[b].state:d)):a="/"+a+"!"+(void 0==d?app.apps[a].state:d);location.hash=a}
function appRoute(){if(0==settingsParsed)appInitStart();else{var a;if(a=decodeURI(location.hash).match(/^#\/(\w+)\/?(\w+)?\/?(\w+)?!((\d+)\/([^\/]+)\/([^\/]+)\/(.*))$/)){app.current.app=a[1];app.current.tab=a[2];app.current.view=a[3];app.apps[app.current.app].state?(app.apps[app.current.app].state=a[4],app.current.scrollPos=app.apps[app.current.app].scrollPos):app.apps[app.current.app].tabs[app.current.tab].state?(app.apps[app.current.app].tabs[app.current.tab].state=a[4],app.apps[app.current.app].active=
function appRoute(){if("false"==settingsParsed)appInitStart();else{var a;if(a=decodeURI(location.hash).match(/^#\/(\w+)\/?(\w+)?\/?(\w+)?!((\d+)\/([^\/]+)\/([^\/]+)\/(.*))$/)){app.current.app=a[1];app.current.tab=a[2];app.current.view=a[3];app.apps[app.current.app].state?(app.apps[app.current.app].state=a[4],app.current.scrollPos=app.apps[app.current.app].scrollPos):app.apps[app.current.app].tabs[app.current.tab].state?(app.apps[app.current.app].tabs[app.current.tab].state=a[4],app.apps[app.current.app].active=
app.current.tab,app.current.scrollPos=app.apps[app.current.app].tabs[app.current.tab].scrollPos):app.apps[app.current.app].tabs[app.current.tab].views[app.current.view].state&&(app.apps[app.current.app].tabs[app.current.tab].views[app.current.view].state=a[4],app.apps[app.current.app].active=app.current.tab,app.apps[app.current.app].tabs[app.current.tab].active=app.current.view,app.current.scrollPos=app.apps[app.current.app].tabs[app.current.tab].views[app.current.view].scrollPos);app.current.page=
parseInt(a[5]);app.current.filter=a[6];app.current.sort=a[7];app.current.search=a[8];appPrepare(app.current.scrollPos);if("Playback"==app.current.app)sendAPI({cmd:"MPD_API_PLAYER_CURRENT_SONG"},songChange);else if("Queue"==app.current.app&&"Current"==app.current.tab)selectTag("searchqueuetags","searchqueuetagsdesc",app.current.filter),getQueue();else if("Queue"==app.current.app&&"LastPlayed"==app.current.tab)sendAPI({cmd:"MPD_API_QUEUE_LAST_PLAYED",data:{offset:app.current.page}},parseLastPlayed);
else if("Browse"==app.current.app&&"Playlists"==app.current.tab&&"All"==app.current.view)sendAPI({cmd:"MPD_API_PLAYLIST_LIST",data:{offset:app.current.page,filter:app.current.filter}},parsePlaylists),doSetFilterLetter("BrowsePlaylistsFilter");else if("Browse"==app.current.app&&"Playlists"==app.current.tab&&"Detail"==app.current.view)sendAPI({cmd:"MPD_API_PLAYLIST_CONTENT_LIST",data:{offset:app.current.page,filter:app.current.filter,uri:app.current.search}},parsePlaylists),doSetFilterLetter("BrowsePlaylistsFilter");
@ -32,9 +32,11 @@ d+'<span class="ml-2 badge badge-secondary">&times</span></button>';domCache.sea
settings.featAdvsearch?(a=app.current.sort,b=!1,"-"==a?(a=settings.tags.includes("Title")?"Title":"-",document.getElementById("SearchList").setAttribute("data-sort",a)):0==a.indexOf("-")&&(b=!0,a=a.substring(1)),sendAPI({cmd:"MPD_API_DATABASE_SEARCH_ADV",data:{plist:"",offset:app.current.page,sort:a,sortdesc:b,expression:app.current.search}},parseSearch)):sendAPI({cmd:"MPD_API_DATABASE_SEARCH",data:{plist:"",offset:app.current.page,filter:app.current.filter,searchstr:app.current.search}},parseSearch):
(document.getElementById("SearchList").getElementsByTagName("tbody")[0].innerHTML="",document.getElementById("searchAddAllSongs").setAttribute("disabled","disabled"),document.getElementById("searchAddAllSongsBtn").setAttribute("disabled","disabled"),document.getElementById("panel-heading-search").innerText="",document.getElementById("cardFooterSearch").innerText="",document.getElementById("SearchList").classList.remove("opacity05"),setPagination(0,0));selectTag("searchtags","searchtagsdesc",app.current.filter)}else appGoto("Playback");
app.last.app=app.current.app;app.last.tab=app.current.tab;app.last.view=app.current.view}else appGoto("Playback")}}
function appInitStart(){appInited=!1;document.getElementsByTagName("header")[0].classList.add("hide");document.getElementsByTagName("main")[0].classList.add("hide");document.getElementsByTagName("footer")[0].classList.add("hide");document.getElementById("appInitSettings").classList.add("unvisible");document.getElementById("appInitWebsocket").classList.add("unvisible");document.getElementById("appInitApply").classList.add("unvisible");modalAppInit.show();getSettings();appInitWait()}
function appInitWait(){setTimeout(function(){1==settingsParsed&&1==websocketConnected?(document.getElementById("appInitWebsocket").classList.remove("unvisible"),appInit(),document.getElementById("appInitApply").classList.remove("unvisible"),document.getElementsByTagName("header")[0].classList.remove("hide"),document.getElementsByTagName("main")[0].classList.remove("hide"),document.getElementsByTagName("footer")[0].classList.remove("hide"),modalAppInit.hide(),appInited=!0):(1==settingsParsed&&(document.getElementById("appInitSettings").classList.remove("unvisible"),
webSocketConnect()),appInitWait())},500)}
function initState(a,b){a=document.getElementById(a);a.classList.remove("text-success","text-danger","spinner-border","spinner-border-sm");a.innerHTML="";"blank"==b?a.innerHTML="":"load"==b?(a.innerHTML="",a.classList.add("spinner-border","spinner-border-sm")):"ok"==b?(a.innerHTML="check",a.classList.add("material-icons","text-success")):"error"==b&&(a.innerHTML="error_outline",a.classList.add("material-icons","text-danger"))}
function showAppInitAlert(a){var b=document.getElementById("modalAppInitAlert");b.innerHTML="<p>"+a+'</p><a id ="appReloadBtn"class="btn btn-danger text-light">Reload</a>';b.classList.remove("hide");document.getElementById("appReloadBtn").addEventListener("click",function(){location.reload()},!1)}
function appInitStart(){appInited=!1;document.getElementsByTagName("header")[0].classList.add("hide");document.getElementsByTagName("main")[0].classList.add("hide");document.getElementsByTagName("footer")[0].classList.add("hide");initState("appInitSettings","load");initState("appInitWebsocket","blank");initState("appInitApply","blank");var a=document.getElementById("modalAppInitAlert");a.classList.add("hide");a.innerText="";modalAppInit.show();getSettings(!0);appInitWait()}
function appInitWait(){setTimeout(function(){if("true"==settingsParsed&&1==websocketConnected)initState("appInitWebsocket","ok"),initState("appInitApply","load"),appInit(),initState("appInitApply","ok"),document.getElementsByTagName("header")[0].classList.remove("hide"),document.getElementsByTagName("main")[0].classList.remove("hide"),document.getElementsByTagName("footer")[0].classList.remove("hide"),modalAppInit.hide(),appInited=!0;else{if("true"==settingsParsed)initState("appInitSettings","ok"),
initState("appInitWebsocket","load"),webSocketConnect();else if("error"==settingsParsed){initState("appInitSettings","error");return}appInitWait()}},500)}
function appInit(){document.getElementById("btnChVolumeDown").addEventListener("click",function(a){a.stopPropagation()},!1);document.getElementById("btnChVolumeUp").addEventListener("click",function(a){a.stopPropagation()},!1);domCache.volumeBar.addEventListener("click",function(a){a.stopPropagation()},!1);domCache.volumeBar.addEventListener("change",function(a){sendAPI({cmd:"MPD_API_PLAYER_VOLUME_SET",data:{volume:domCache.volumeBar.value}})},!1);domCache.progressBar.value=0;domCache.progressBar.addEventListener("change",
function(a){currentSong&&0<=currentSong.currentSongId&&sendAPI({cmd:"MPD_API_PLAYER_SEEK",data:{songid:currentSong.currentSongId,seek:Math.ceil(domCache.progressBar.value/1E3*currentSong.totalTime)}})},!1);document.getElementById("navDBupdate").addEventListener("click",function(a){a.stopPropagation();a.preventDefault();a=this.getElementsByTagName("span")[0];a.innerText="keyboard_arrow_right"==a.innerText?"keyboard_arrow_down":"keyboard_arrow_right"},!1);document.getElementById("volumeMenu").parentNode.addEventListener("show.bs.dropdown",
function(){sendAPI({cmd:"MPD_API_PLAYER_OUTPUT_LIST"},parseOutputs)});document.getElementById("modalAbout").addEventListener("shown.bs.modal",function(){sendAPI({cmd:"MPD_API_DATABASE_STATS"},parseStats)});document.getElementById("modalAddToPlaylist").addEventListener("shown.bs.modal",function(){document.getElementById("addStreamFrm").classList.contains("hide")?document.getElementById("addToPlaylistPlaylist").focus():document.getElementById("streamUrl").focus()});document.getElementById("modalHelp").addEventListener("show.bs.modal",
@ -76,7 +78,8 @@ c.target);c=b.getElementsByClassName("dragover-th");for(var d=c.length,e=0;e<d;e
function webSocketConnect(){var a=getWsUrl();socket=new WebSocket(a);try{socket.onopen=function(){console.log("Websocket is connected")},socket.onmessage=function(b){try{var c=JSON.parse(b.data)}catch(d){console.log("Invalid JSON data received: "+b.data)}switch(c.type){case "welcome":websocketConnected=!0;showNotification("Connected to myMPD: "+a,"","","success");modalConnectionError.hide();appRoute();sendAPI({cmd:"MPD_API_PLAYER_STATE"},parseState);break;case "update_state":parseState(c);break;case "disconnected":showNotification("Lost connection to myMPD: "+
a,"","","danger");break;case "update_queue":"Queue"===app.current.app&&getQueue();sendAPI({cmd:"MPD_API_PLAYER_STATE"},parseState);break;case "update_options":getSettings();break;case "update_outputs":sendAPI({cmd:"MPD_API_PLAYER_OUTPUT_LIST"},parseOutputs);break;case "update_started":updateDBstarted(!1);break;case "update_database":case "update_finished":updateDBfinished(c.type);break;case "update_volume":parseVolume(c);break;case "update_stored_playlist":"Browse"==app.current.app&&"Playlists"==
app.current.tab&&"All"==app.current.view?sendAPI({cmd:"MPD_API_PLAYLIST_LIST",data:{offset:app.current.page,filter:app.current.filter}},parsePlaylists):"Browse"==app.current.app&&"Playlists"==app.current.tab&&"Detail"==app.current.view&&sendAPI({cmd:"MPD_API_PLAYLIST_CONTENT_LIST",data:{offset:app.current.page,filter:app.current.filter,uri:app.current.search}},parsePlaylists);break;case "error":showNotification(c.data,"","","danger")}},socket.onclose=function(){console.log("Websocket is disconnected");
1==appInited&&modalConnectionError.show();websocketConnected=!1;null!=websocketTimer&&clearTimeout(websocketTimer);websocketTimer=setTimeout(function(){console.log("Reconnecting websocket");webSocketConnect()},3E3)}}catch(b){alert("Error: "+b)}}function getWsUrl(){var a=window.location.hostname,b=window.location.protocol,c=window.location.port;a=("https:"==b?"wss://":"ws://")+a+(""!=c?":"+c:"")+"/ws";return document.getElementById("wsUrl").innerText=a}
1==appInited?modalConnectionError.show():showAppInitAlert("Websocket connection failed.");websocketConnected=!1;null!=websocketTimer&&clearTimeout(websocketTimer);websocketTimer=setTimeout(function(){console.log("Reconnecting websocket");webSocketConnect()},3E3)}}catch(b){alert("Error: "+b)}}
function getWsUrl(){var a=window.location.hostname,b=window.location.protocol,c=window.location.port;a=("https:"==b?"wss://":"ws://")+a+(""!=c?":"+c:"")+"/ws";return document.getElementById("wsUrl").innerText=a}
function parseStats(a){document.getElementById("mpdstats_artists").innerText=a.data.artists;document.getElementById("mpdstats_albums").innerText=a.data.albums;document.getElementById("mpdstats_songs").innerText=a.data.songs;document.getElementById("mpdstats_dbPlaytime").innerText=beautifyDuration(a.data.dbPlaytime);document.getElementById("mpdstats_playtime").innerText=beautifyDuration(a.data.playtime);document.getElementById("mpdstats_uptime").innerText=beautifyDuration(a.data.uptime);var b=new Date(1E3*
a.data.dbUpdated);document.getElementById("mpdstats_dbUpdated").innerText=b.toUTCString();document.getElementById("mympdVersion").innerText=a.data.mympdVersion;document.getElementById("mpdVersion").innerText=a.data.mpdVersion;document.getElementById("libmpdclientVersion").innerText=a.data.libmpdclientVersion}function toggleBtn(a,b){if(a=document.getElementById(a))void 0==b&&(b=a.classList.contains("active")?0:1),1==b||1==b?a.classList.add("active"):a.classList.remove("active")}
function filterCols(a){var b=settings.tags.slice();0==settings.featTags&&b.push("Title");b.push("Duration");"colsQueueCurrent"==a||"colsBrowsePlaylistsDetail"==a||"colsQueueLastPlayed"==a?b.push("Pos"):"colsBrowseFilesystem"==a&&b.push("Type");"colsQueueLastPlayed"==a&&b.push("LastPlayed");for(var c=[],d=0;d<settings[a].length;d++)b.includes(settings[a][d])&&c.push(settings[a][d]);settings[a]=c}
@ -91,11 +94,11 @@ app.apps.Browse.tabs.Database.active="Artist":app.apps.Browse.tabs.Database.acti
filterCols("colsQueueCurrent");filterCols("colsQueueLastPlayed");filterCols("colsBrowsePlaylistsDetail");filterCols("colsBrowseFilesystem");filterCols("colsBrowseDatabase");filterCols("colsPlayback");settings.featLocalplayer&&(""==settings.streamurl?(settings.mpdstream="http://",settings.mpdstream="127.0.0.1"==settings.mpdhost||"localhost"==settings.mpdhost?settings.mpdstream+window.location.hostname:settings.mpdstream+settings.mpdhost,settings.mpdstream+=":"+settings.streamport+"/"):settings.mpdstream=
settings.streamurl);addTagList("BrowseDatabaseByTagDropdown","browsetags");addTagList("searchqueuetags","searchtags");addTagList("searchtags","searchtags");for(a=0;a<settings.tags.length;a++)app.apps.Browse.tabs.Database.views[settings.tags[a]]={state:"0/-/-/",scrollPos:0};if(settings.featSyscmds){document.getElementById("mainMenuDropdown");b="";c=settings.syscmdList.length;if(0<c)for(b='<div class="dropdown-divider"></div>',a=0;a<c;a++)b+='<a class="dropdown-item text-light bg-dark" href="#" data-href=\'{"cmd": "execSyscmd", "options": ["'+
settings.syscmdList[a]+"\"]}'>"+settings.syscmdList[a]+"</a>";document.getElementById("syscmds").innerHTML=b}else document.getElementById("syscmds").innerHTML="";dropdownMainMenu=new Dropdown(document.getElementById("mainMenu"));setCols("QueueCurrent");setCols("Search");setCols("QueueLastPlayed");setCols("BrowseFilesystem");setCols("BrowsePlaylistsDetail");setCols("BrowseDatabase",".tblAlbumTitles");setCols("Playback");"Queue"==app.current.app&&"Current"==app.current.tab?getQueue():"Queue"==app.current.app&&
"LastPlayed"==app.current.tab?appRoute():"Search"==app.current.app?appRoute():"Browse"==app.current.app&&"Filesystem"==app.current.tab?appRoute():"Browse"==app.current.app&&"Playlists"==app.current.tab&&"Detail"==app.current.view?appRoute():"Browse"==app.current.app&&"Database"==app.current.tab&&""!=app.current.search&&appRoute();settingsParsed=!0}
"LastPlayed"==app.current.tab?appRoute():"Search"==app.current.app?appRoute():"Browse"==app.current.app&&"Filesystem"==app.current.tab?appRoute():"Browse"==app.current.app&&"Playlists"==app.current.tab&&"Detail"==app.current.view?appRoute():"Browse"==app.current.app&&"Database"==app.current.tab&&""!=app.current.search&&appRoute();settingsParsed="true"}
function setCols(a,b){var c="",d=settings.tags.slice();0==settings.featTags&&d.push("Title");d.push("Duration");"QueueCurrent"!=a&&"BrowsePlaylistsDetail"!=a&&"QueueLastPlayed"!=a||d.push("Pos");"BrowseFilesystem"==a&&d.push("Type");"QueueLastPlayed"==a&&d.push("LastPlayed");d.sort();for(var e=0;e<d.length;e++)if("Playback"!=a||"Title"!=d[e])c+='<div class="form-check"><input class="form-check-input" type="checkbox" value="1" name="'+d[e]+'"',settings["cols"+a].includes(d[e])&&(c+="checked"),c+='><label class="form-check-label text-light" for="'+
d[e]+'">&nbsp;&nbsp;'+d[e]+"</label></div>";document.getElementById(a+"ColsDropdown").firstChild.innerHTML=c;d=app.current.sort;"Search"==a&&"0/any/Title/"==app.apps.Search.state&&(d=settings.tags.includes("Title")?"Title":0==settings.featTags?"Filename":"-");if("Playback"!=a){c="";for(e=0;e<settings["cols"+a].length;e++){var f=settings["cols"+a][e];c+='<th draggable="true" data-col="'+f+'">';if("Track"==f||"Pos"==f)f="#";c+=f;"Search"!=a||f!=d&&"-"+f!=d||(f=!1,0==app.current.sort.indexOf("-")&&(f=
!0),c+='<span class="sort-dir material-icons pull-right">'+(1==f?"arrow_drop_up":"arrow_drop_down")+"</span>");c+="</th>"}c+="<th></th>";if(void 0==b)document.getElementById(a+"List").getElementsByTagName("tr")[0].innerHTML=c;else for(a=document.querySelectorAll(b),e=0;e<a.length;e++)a[e].getElementsByTagName("tr")[0].innerHTML=c}}function getSettings(){0==settingsLock&&(settingsLock=!0,sendAPI({cmd:"MYMPD_API_SETTINGS_GET"},getMpdSettings))}
function getMpdSettings(a){settingsNew=a.data;sendAPI({cmd:"MPD_API_SETTINGS_GET"},joinSettings)}function joinSettings(a){for(var b in a.data)settingsNew[b]=a.data[b];settings=Object.assign({},settingsNew);settingsLock=!1;parseSettings()}
!0),c+='<span class="sort-dir material-icons pull-right">'+(1==f?"arrow_drop_up":"arrow_drop_down")+"</span>");c+="</th>"}c+="<th></th>";if(void 0==b)document.getElementById(a+"List").getElementsByTagName("tr")[0].innerHTML=c;else for(a=document.querySelectorAll(b),e=0;e<a.length;e++)a[e].getElementsByTagName("tr")[0].innerHTML=c}}function getSettings(a){0==settingsLock&&(settingsLock=!0,sendAPI({cmd:"MYMPD_API_SETTINGS_GET"},getMpdSettings,a))}
function getMpdSettings(a){if("error"==a.type)return settingsParsed="error",0==appInited&&showAppInitAlert(a.data),!1;settingsNew=a.data;sendAPI({cmd:"MPD_API_SETTINGS_GET"},joinSettings,!0)}function joinSettings(a){if("error"==a.type)return settingsParsed="error",0==appInited&&showAppInitAlert(a.data),!1;for(var b in a.data)settingsNew[b]=a.data[b];settings=Object.assign({},settingsNew);settingsLock=!1;parseSettings()}
function saveCols(a,b){var c=document.getElementById(a+"ColsDropdown").firstChild.getElementsByTagName("input");var d=void 0==b?document.getElementById(a+"List").getElementsByTagName("tr")[0]:"string"==typeof b?document.querySelector(b).getElementsByTagName("tr")[0]:b.getElementsByTagName("tr")[0];for(b=0;b<c.length;b++){var e=d.querySelector("[data-col="+c[b].name+"]");0==c[b].checked?e&&e.remove():e||(e=document.createElement("th"),e.innerText=c[b].name,e.setAttribute("data-col",c[b].name),d.appendChild(e))}a=
{cmd:"MYMPD_API_COLS_SAVE",data:{table:"cols"+a,cols:[]}};c=d.getElementsByTagName("th");for(b=0;b<c.length;b++)(d=c[b].getAttribute("data-col"))&&a.data.cols.push(d);sendAPI(a,getSettings)}
function saveColsPlayback(a){for(var b=document.getElementById(a+"ColsDropdown").firstChild.getElementsByTagName("input"),c=document.getElementById("cardPlaybackTags"),d=0;d<b.length;d++){var e=document.getElementById("current"+b[d].name);0==b[d].checked?e&&e.remove():e||(e=document.createElement("div"),e.innerHTML="<small>"+b[d].name+"</small><h4></h4>",e.setAttribute("id","current"+b[d].name),e.setAttribute("data-tag",b[d].name),c.appendChild(e))}a={cmd:"MYMPD_API_COLS_SAVE",data:{table:"cols"+
@ -188,8 +191,8 @@ options:["single",a.parentNode.parentNode.getAttribute("data-trackid")]},"Remove
addMenuItem({cmd:"appendQueue",options:[b,c,d]},"Append to queue")+addMenuItem({cmd:"replaceQueue",options:[b,c,d]},"Replace queue")+addMenuItem({cmd:"showAddToPlaylist",options:[c]},"Add to playlist")+(-1==c.indexOf("http")?addMenuItem({cmd:"songDetails",options:[c]},"Songdetails"):""));new Popover(a,{trigger:"click",delay:0,dismissible:!0,template:'<div class="popover" role="tooltip"><div class="arrow"></div><div class="popover-content">'+f+"</div></div>"});b=a.Popover;a.setAttribute("data-init",
"true");a.addEventListener("shown.bs.popover",function(a){a.target.setAttribute("data-popover","true");document.getElementsByClassName("popover-content")[0].addEventListener("click",function(a){a.preventDefault();a.stopPropagation();if("A"==a.target.nodeName){var b=a.target.getAttribute("data-href");b&&(b=JSON.parse(b64DecodeUnicode(b)),parseCmd(a,b),hideMenu())}},!1);if(a=document.getElementById("advancedMenuLink"))a.addEventListener("click",function(a){a=this.getElementsByTagName("span")[0];a.innerText=
"keyboard_arrow_right"==a.innerText?"keyboard_arrow_down":"keyboard_arrow_right"},!1),new Collapse(a)},!1);b.show()}}
function sendAPI(a,b){var c=new XMLHttpRequest;c.open("POST","/api",!0);c.setRequestHeader("Content-type","application/json");c.onreadystatechange=function(){if(4==c.readyState)if(""!=c.responseText){var d=JSON.parse(c.responseText);"error"==d.type?(showNotification("Error",d.data,d.data,"danger"),console.log("Error: "+d.data)):"result"==d.type&&"ok"!=d.data?showNotification(d.data,"","","success"):void 0!=b&&"function"==typeof b&&b(d)}else console.log("Empty response for request: "+JSON.stringify(a))};
c.send(JSON.stringify(a))}function openLocalPlayer(){window.open("/player.html#"+settings.mpdstream,"LocalPlayer")}function updateDB(){sendAPI({cmd:"MPD_API_DATABASE_UPDATE"});updateDBstarted(!0)}function rescanDB(){sendAPI({cmd:"MPD_API_DATABASE_RESCAN"});updateDBstarted(!0)}
function sendAPI(a,b,c){var d=new XMLHttpRequest;d.open("POST","/api",!0);d.setRequestHeader("Content-type","application/json");d.onreadystatechange=function(){if(4==d.readyState)if(""!=d.responseText){var e=JSON.parse(d.responseText);"error"==e.type?(showNotification("Error",e.data,e.data,"danger"),console.log("Error: "+e.data),1==c&&void 0!=b&&"function"==typeof b&&b(e)):"result"==e.type&&"ok"!=e.data?showNotification(e.data,"","","success"):void 0!=b&&"function"==typeof b&&b(e)}else console.log("Empty response for request: "+
JSON.stringify(a))};d.send(JSON.stringify(a))}function openLocalPlayer(){window.open("/player.html#"+settings.mpdstream,"LocalPlayer")}function updateDB(){sendAPI({cmd:"MPD_API_DATABASE_UPDATE"});updateDBstarted(!0)}function rescanDB(){sendAPI({cmd:"MPD_API_DATABASE_RESCAN"});updateDBstarted(!0)}
function updateDBstarted(a){1==a?(document.getElementById("updateDBfinished").innerText="",document.getElementById("updateDBfooter").classList.add("hide"),updateDBprogress.style.width="20px",updateDBprogress.style.marginLeft="-20px",modalUpdateDB.show(),document.getElementById("updateDBprogress").classList.add("updateDBprogressAnimate")):showNotification("Database update started","","","success")}
function updateDBfinished(a){document.getElementById("modalUpdateDB").classList.contains("show")?("update_database"==a?document.getElementById("updateDBfinished").innerText="Database successfully updated.":"update_finished"==a&&(document.getElementById("updateDBfinished").innerText="Database update finished."),a=document.getElementById("updateDBprogress"),a.classList.remove("updateDBprogressAnimate"),a.style.width="100%",a.style.marginLeft="0px",document.getElementById("updateDBfooter").classList.remove("hide")):
"update_database"==a?showNotification("Database successfully updated.","","","success"):"update_finished"==a&&showNotification("Database update finished.","","","success")}function clickPlay(){"play"!=playstate?sendAPI({cmd:"MPD_API_PLAYER_PLAY"}):sendAPI({cmd:"MPD_API_PLAYER_PAUSE"})}function clickStop(){sendAPI({cmd:"MPD_API_PLAYER_STOP"})}function clickPrev(){sendAPI({cmd:"MPD_API_PLAYER_PREV"})}function clickNext(){sendAPI({cmd:"MPD_API_PLAYER_NEXT"})}