bootstrap.native
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -1,2 +0,2 @@ | ||
// Native JavaScript for Bootstrap v3.0.1 | 2020 © dnp_theme | MIT-License | ||
function t(t,e){return t.classList.contains(e)}function e(t,e){t.classList.remove(e)}function i(t,e,i,n){n=n||!1,t.addEventListener(e,i,n)}function n(t,e,i,n){n=n||!1,t.removeEventListener(e,i,n)}function o(t,e,o,a){i(t,e,(function i(l){l.target===t&&(o(l),n(t,e,i,a))}),a)}var a="webkitTransition"in document.body.style?"webkitTransitionEnd":"transitionend",l="webkitTransition"in document.body.style||"transition"in document.body.style,r="webkitTransition"in document.body.style?"webkitTransitionDuration":"transitionDuration";function c(t){var e=l?window.getComputedStyle(t)[r]:0;return e="number"!=typeof(e=parseFloat(e))||isNaN(e)?0:1e3*e}function s(t,e){var i=0;c(t)?o(t,a,(function(t){!i&&e(t),i=1})):setTimeout((function(){!i&&e(),i=1}),17)}function d(t,e){var i=e&&e instanceof Element?e:document;return t instanceof Element?t:i.querySelector(t)}function u(t,e){try{t()}catch(t){console.error(e+": "+t)}}function f(t,e,i){var n=new CustomEvent(t+".bs."+e,{cancelable:!0});return n.relatedTarget=i,n}function m(t){this&&this.dispatchEvent(t)}function p(o){var a,l=this,r=f("close","alert"),c=f("closed","alert");function p(t){a=t&&t.target.closest(".alert"),(o=d('[data-dismiss="alert"]',a))&&a&&(o===t.target||o.contains(t.target))&&l.close()}function g(){n(o,"click",p),a.parentNode.removeChild(a),m.call(a,c)}l.close=function(){if(a&&o&&t(a,"show")){if(m.call(a,r),r.defaultPrevented)return;l.dispose(),e(a,"show"),t(a,"fade")?s(a,g):g()}},l.dispose=function(){n(o,"click",p),delete o.Alert},u((function(){o=d(o),a=o.closest(".alert"),o.Alert&&o.Alert.dispose(),o.Alert||i(o,"click",p),l.element=o,o.Alert=l}),"BSN.Alert")}function g(t,e){t.classList.add(e)}function h(o){var a,l=this,r=f("change","button");function c(i){var n,l="LABEL"===i.target.tagName?i.target:i.target.closest("LABEL")?i.target.closest("LABEL"):null;if(n=l&&l.getElementsByTagName("INPUT")[0]){if(m.call(n,r),m.call(o,r),"checkbox"===n.type){if(r.defaultPrevented)return;n.checked?(e(l,"active"),n.getAttribute("checked"),n.removeAttribute("checked"),n.checked=!1):(g(l,"active"),n.getAttribute("checked"),n.setAttribute("checked","checked"),n.checked=!0),o.toggled||(o.toggled=!0)}if("radio"===n.type&&!o.toggled){if(r.defaultPrevented)return;(!n.checked||0===i.screenX&&0==i.screenY)&&(g(l,"active"),g(l,"focus"),n.setAttribute("checked","checked"),n.checked=!0,o.toggled=!0,Array.from(a).map((function(i){var n=i.getElementsByTagName("INPUT")[0];i!==l&&t(i,"active")&&(m.call(n,r),e(i,"active"),n.removeAttribute("checked"),n.checked=!1)})))}setTimeout((function(){o.toggled=!1}),50)}}function s(t){32===(t.which||t.keyCode)&&t.target===document.activeElement&&c(t)}function p(t){32===(t.which||t.keyCode)&&t.preventDefault()}function h(t){var i="focusin"===t.type?g:e;"INPUT"===t.target.tagName&&i(t.target.closest(".btn"),"focus")}function v(t){t(o,"click",c),t(o,"keyup",s),t(o,"keydown",p),t(o,"focusin",h),t(o,"focusout",h)}l.dispose=function(){v(n),delete o.Button},u((function(){(o=d(o)).Button&&o.Button.dispose(),(a=o.getElementsByClassName("btn")).length&&(o.Button||v(i),o.toggled=!1,o.Button=l,Array.from(a).map((function(i){!t(i,"active")&&d("input:checked",i)&&g(i,"active"),t(i,"active")&&!d("input:checked",i)&&e(i,"active")})))}),"BSN.Button")}var v="touchstart",b="touchend",y="touchmove",w="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],A=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});o(document,"DOMContentLoaded",(function(){}),e)}catch(t){}return t}()&&{passive:!0};function T(o,a){a=a||{};var l,r,p,h,T,k,N,C,x=this,E={};function P(){!1===E.interval||t(o,"paused")||(g(o,"paused"),!l.isSliding&&(clearInterval(l.timer),l.timer=null))}function S(){!1!==E.interval&&t(o,"paused")&&(e(o,"paused"),!l.isSliding&&(clearInterval(l.timer),l.timer=null),!l.isSliding&&x.cycle())}function B(e){if(e.preventDefault(),!l.isSliding){var i=e.target;if(!i||t(i,"active")||!i.getAttribute("data-slide-to"))return!1;l.index=parseInt(i.getAttribute("data-slide-to"),10),x.slideTo(l.index)}}function M(t){if(t.preventDefault(),!l.isSliding){var e=t.currentTarget||t.srcElement;e===k?l.index++:e===T&&l.index--,x.slideTo(l.index)}}function L(t){var e=t.which;if(!l.isSliding){switch(e){case 39:l.index++;break;case 37:l.index--;break;default:return}x.slideTo(l.index)}}function H(t){E.pause&&E.interval&&(t(o,w[0],P),t(o,w[1],S),t(o,v,P,A),t(o,b,S,A)),h.length>1&&t(o,v,D,A),k&&t(k,"click",M),T&&t(T,"click",M),N&&t(N,"click",B),E.keyboard&&t(window,"keydown",L)}function I(t){t(o,y,X,A),t(o,b,W,A)}function D(t){l.isTouch||(l.touchPosition.startX=t.changedTouches[0].pageX,o.contains(t.target)&&(l.isTouch=!0,I(i)))}function X(t){if(l.isTouch)return l.touchPosition.currentX=t.changedTouches[0].pageX,"touchmove"===t.type&&t.changedTouches.length>1?(t.preventDefault(),!1):void 0;t.preventDefault()}function W(t){if(l.isTouch&&!l.isSliding&&(l.touchPosition.endX=l.touchPosition.currentX||t.changedTouches[0].pageX,l.isTouch)){if((!o.contains(t.target)||!o.contains(t.relatedTarget))&&Math.abs(l.touchPosition.startX-l.touchPosition.endX)<75)return!1;l.touchPosition.currentX<l.touchPosition.startX?l.index++:l.touchPosition.currentX>l.touchPosition.startX&&l.index--,l.isTouch=!1,x.slideTo(l.index),I(n)}}function O(t){Array.from(C).map((function(t){e(t,"active")})),C[t]&&g(C[t],"active")}function R(i){if(l.touchPosition){var n=l.index,a=i&&i.target!==h[n]?1e3*i.elapsedTime+100:20,r=x.getActiveIndex(),c="left"===l.direction?"next":"prev";l.isSliding&&setTimeout((function(){l.touchPosition&&(l.isSliding=!1,g(h[n],"active"),e(h[r],"active"),e(h[n],"carousel-item-"+c),e(h[n],"carousel-item-"+l.direction),e(h[r],"carousel-item-"+l.direction),m.call(o,p),document.hidden||!E.interval||t(o,"paused")||x.cycle())}),a)}}x.cycle=function(){l.timer&&(clearInterval(l.timer),l.timer=null),l.timer=setInterval((function(){var t=l.index||x.getActiveIndex();(function(t){var e=t.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight;return e.top<=i&&e.bottom>=0})(o)&&(t++,x.slideTo(t))}),E.interval)},x.slideTo=function(i){if(!l.isSliding){var n,a=x.getActiveIndex();a!==i&&(a<i||0===a&&i===h.length-1?l.direction="left":(a>i||a===h.length-1&&0===i)&&(l.direction="right"),i<0?i=h.length-1:i>=h.length&&(i=0),n="left"===l.direction?"next":"prev",r=f("slide","carousel",h[i]),p=f("slid","carousel",h[i]),m.call(o,r),r.defaultPrevented||(l.index=i,l.isSliding=!0,clearInterval(l.timer),l.timer=null,O(i),c(h[i])&&t(o,"slide")?(g(h[i],"carousel-item-"+n),h[i].offsetWidth,g(h[i],"carousel-item-"+l.direction),g(h[a],"carousel-item-"+l.direction),s(h[i],R)):(g(h[i],"active"),h[i].offsetWidth,e(h[a],"active"),setTimeout((function(){l.isSliding=!1,E.interval&&o&&!t(o,"paused")&&x.cycle(),m.call(o,p)}),100))))}},x.getActiveIndex=function(){return Array.from(h).indexOf(o.getElementsByClassName("carousel-item active")[0])||0},x.dispose=function(){var i=["left","right","prev","next"];Array.from(h).map((function(n,o){t(n,"active")&&O(o),i.map((function(t){return e(n,"carousel-item-"+t)}))})),clearInterval(l.timer),H(n),l={},delete o.Carousel},(l={}).direction="left",l.index=0,l.timer=null,l.isSliding=!1,l.isTouch=!1,l.touchPosition={startX:0,currentX:0,endX:0},u((function(){(o=d(o)).Carousel&&o.Carousel.dispose();var t=o.getAttribute("data-interval"),e=a.interval,n="false"===t?0:parseInt(t),l="hover"===o.getAttribute("data-pause")||!1,r="true"===o.getAttribute("data-keyboard")||!1;h=o.getElementsByClassName("carousel-item"),T=o.getElementsByClassName("carousel-control-prev")[0],k=o.getElementsByClassName("carousel-control-next")[0],N=o.getElementsByClassName("carousel-indicators")[0],C=N&&N.getElementsByTagName("LI")||[],E.keyboard=!0===a.keyboard||r,E.pause=!("hover"!==a.pause&&!l)&&"hover",E.interval="number"==typeof e?e:!1===e||0===n||!1===n?0:isNaN(n)?5e3:n,h.length<2||(o.Carousel||H(i),x.getActiveIndex()<0&&(h.length&&g(h[0],"active"),C.length&&O(0)),E.interval&&x.cycle(),o.Carousel=x)}),"BSN.Carousel")}function k(o,a){a=a||{};var l,r,c,p,h,v,b=this,y=null,w=null;function A(t,i){m.call(t,h),h.defaultPrevented||(t.isAnimating=!0,t.style.height=t.scrollHeight+"px",e(t,"collapse"),e(t,"show"),g(t,"collapsing"),t.offsetWidth,t.style.height="0px",s(t,(function(){t.isAnimating=!1,t.setAttribute("aria-expanded","false"),i.setAttribute("aria-expanded","false"),e(t,"collapsing"),g(t,"collapse"),t.style.height="",m.call(t,v)})))}b.toggle=function(e){(e&&"A"===e.target.tagName||"A"===o.tagName)&&e.preventDefault(),(o.contains(e.target)||e.target===o)&&(t(w,"show")?b.hide():b.show())},b.hide=function(){w.isAnimating||(A(w,o),g(o,"collapsed"))},b.show=function(){var t,i;y&&(l=y.getElementsByClassName("collapse show")[0],r=l&&(d('[data-target="#'+l.id+'"]',y)||d('[href="#'+l.id+'"]',y))),w.isAnimating||(r&&l!==w&&(A(l,r),g(r,"collapsed")),t=w,i=o,m.call(t,c),c.defaultPrevented||(t.isAnimating=!0,g(t,"collapsing"),e(t,"collapse"),t.style.height=t.scrollHeight+"px",s(t,(function(){t.isAnimating=!1,t.setAttribute("aria-expanded","true"),i.setAttribute("aria-expanded","true"),e(t,"collapsing"),g(t,"collapse"),g(t,"show"),t.style.height="",m.call(t,p)}))),e(o,"collapsed"))},b.dispose=function(){n(o,"click",b.toggle),delete o.Collapse},u((function(){(o=d(o)).Collapse&&o.Collapse.dispose();var t=o.getAttribute("data-parent");c=f("show","collapse"),p=f("shown","collapse"),h=f("hide","collapse"),v=f("hidden","collapse"),(w=d(a.target||o.getAttribute("data-target")||o.getAttribute("href"))).isAnimating=!1,y=o.closest(a.parent||t),o.Collapse||i(o,"click",b.toggle),o.Collapse=b}),"BSN.Collapse")}var N="mousedown";"webkitPerspective"in document.body.style||document.body.style,"webkitTransform"in document.body.style||document.body.style;function C(t){t.focus?t.focus():t.setActive()}function x(){return{y:window.pageYOffset||document.documentElement.scrollTop,x:window.pageXOffset||document.documentElement.scrollLeft}}function E(e,i,n,o){var a,l,r,c,s,u,f=i.offsetWidth,m=i.offsetHeight,p=document.documentElement.clientWidth||document.body.clientWidth,g=document.documentElement.clientHeight||document.body.clientHeight,h=e.getBoundingClientRect(),v=o===document.body?x():{x:o.offsetLeft+o.scrollLeft,y:o.offsetTop+o.scrollTop},b=h.right-h.left,y=h.bottom-h.top,w=t(i,"popover"),A=d(".arrow",i),T=h.top+y/2-m/2<0,k=h.left+b/2-f/2<0,N=h.left+f/2+b/2>=p,C=h.top+m/2+y/2>=g,E=h.top-m<0,P=h.left-f<0,S=h.top+m+y>=g,B=h.left+f+b>=p;n="right"===(n="left"===(n="bottom"===(n="top"===(n=("left"===n||"right"===n)&&P&&B?"top":n)&&E?"bottom":n)&&S?"top":n)&&P?"right":n)&&B?"left":n,-1===i.className.indexOf(n)&&(i.className=i.className.replace(/\b(top|bottom|left|right)+/,n)),s=A.offsetWidth,u=A.offsetHeight,"left"===n||"right"===n?(l="left"===n?h.left+v.x-f-(w?s:0):h.left+v.x+b,T?(a=h.top+v.y,r=y/2-s):C?(a=h.top+v.y-m+y,r=m-y/2-s):(a=h.top+v.y-m/2+y/2,r=m/2-(w?.9*u:u/2))):"top"!==n&&"bottom"!==n||(a="top"===n?h.top+v.y-m-(w?u:0):h.top+v.y+y,k?(l=0,c=h.left+b/2-s):N?(l=p-1.01*f,c=f-(p-h.left)+b/2-s/2):(l=h.left+v.x-f/2+b/2,c=f/2-(w?s:s/2))),i.style.top=a+"px",i.style.left=l+"px",r&&(A.style.top=r+"px"),c&&(A.style.left=c+"px")}function P(o,a){var l,r,c,s,p,h,v,b=this,y=null,w=[];function A(t){(t.href&&"#"===t.href.slice(-1)||t.parentNode&&t.parentNode.href&&"#"===t.parentNode.href.slice(-1))&&this.preventDefault()}function T(){var t=o.open?i:n;t(document,"click",k),t(document,"keydown",x),t(document,"keyup",E),t(document,"focus",k,!0)}function k(t){var e=t.target,i=e&&(e.getAttribute("data-toggle")||e.parentNode&&e.parentNode.getAttribute&&e.parentNode.getAttribute("data-toggle"));("focus"!==t.type||e!==o&&e!==h&&!h.contains(e))&&(e!==h&&!h.contains(e)||!v&&!i)&&(y=e===o||o.contains(e)?o:null,b.hide(),A.call(t,e))}function N(t){y=o,b.show(),A.call(t,t.target)}function x(t){var e=t.which||t.keyCode;38!==e&&40!==e||t.preventDefault()}function E(t){var e=t.which,i=t.keyCode,n=e||i,a=document.activeElement,l=a===o,r=h.contains(a),c=a.parentNode===h||a.parentNode.parentNode===h,s=w.indexOf(a);c&&(s=l?0:38===n?s>1?s-1:0:40===n&&s<w.length-1?s+1:s,w[s]&&C(w[s])),(w.length&&c||!w.length&&(r||l)||!r)&&o.open&&27===n&&(b.toggle(),y=null)}b.show=function(){l=f("show","dropdown",y),m.call(p,l),l.defaultPrevented||(g(h,"show"),g(p,"show"),o.setAttribute("aria-expanded",!0),o.open=!0,n(o,"click",N),setTimeout((function(){C(h.getElementsByTagName("INPUT")[0]||o),T(),r=f("shown","dropdown",y),m.call(p,r)}),1))},b.hide=function(){c=f("hide","dropdown",y),m.call(p,c),c.defaultPrevented||(e(h,"show"),e(p,"show"),o.setAttribute("aria-expanded",!1),o.open=!1,T(),C(o),setTimeout((function(){o.Dropdown&&i(o,"click",N)}),1),s=f("hidden","dropdown",y),m.call(p,s))},b.toggle=function(){t(p,"show")&&o.open?b.hide():b.show()},b.dispose=function(){t(p,"show")&&o.open&&b.hide(),n(o,"click",N),delete o.Dropdown},u((function(){(o=d(o)).Dropdown&&o.Dropdown.dispose(),p=o.parentNode,h=d(".dropdown-menu",p),Array.from(h.children).map((function(t){t.children.length&&"A"===t.children[0].tagName&&w.push(t.children[0]),"A"===t.tagName&&w.push(t)})),o.Dropdown||(!("tabindex"in h)&&h.setAttribute("tabindex","0"),i(o,"click",N)),v=!0===a||"true"===o.getAttribute("data-persist")||!1,o.open=!1,o.Dropdown=b}),"BSN.Dropdown")}function S(o,a){a=a||{};var l,r,p,h,v,b,y,w,T,k=this,N=null,x={};function E(){var e,i=t(document.body,"modal-open"),n=parseInt(getComputedStyle(document.body).paddingRight),o=l.clientHeight!==l.scrollHeight;l.style.paddingRight=!o&&b?b+"px":"",document.body.style.paddingRight=n+(i?0:b)+"px",T.length&&T.map((function(t){e=getComputedStyle(t).paddingRight,t.style.paddingRight=parseInt(e)+(i?0:b)+"px"}))}function P(){var t,e;(e=document.createElement("div")).className="modal-scrollbar-measure",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e),b=t}function S(){(y=d(".modal-backdrop"))&&!document.getElementsByClassName("modal show")[0]&&(document.body.removeChild(y),y=null),null===y&&(e(document.body,"modal-open"),document.body.style.paddingRight="",l.style.paddingRight="",T.length&&T.map((function(t){t.style.paddingRight=""})))}function B(t){t(window,"resize",k.update,A),t(l,"click",X),t(document,"keydown",D)}function M(){l.style.display="block",P(),E(),!document.getElementsByClassName("modal show")[0]&&g(document.body,"modal-open"),g(l,"show"),l.setAttribute("aria-hidden",!1),t(l,"fade")?s(l,L):L()}function L(){C(l),l.isAnimating=!1,B(i),p=f("shown","modal",N),m.call(l,p)}function H(i){l.style.display="",o&&C(o),y=d(".modal-backdrop"),1!==i&&y&&t(y,"show")&&!document.getElementsByClassName("modal show")[0]?(e(y,"show"),s(y,S)):S(),B(n),l.isAnimating=!1,v=f("hidden","modal"),m.call(l,v)}function I(e){if(!l.isAnimating){var i=e.target,n="#"+l.getAttribute("id"),a=i.getAttribute("data-target")||i.getAttribute("href"),r=o.getAttribute("data-target")||o.getAttribute("href");!t(l,"show")&&(i===o&&a===n||o.contains(i)&&r===n)&&(l.modalTrigger=o,N=o,k.show(),e.preventDefault())}}function D(e){var i=e.which;!l.isAnimating&&x.keyboard&&27==i&&t(l,"show")&&k.hide()}function X(e){if(!l.isAnimating){var i=e.target,n="modal"===i.getAttribute("data-dismiss"),o=i.closest('[data-dismiss="modal"]');t(l,"show")&&(o||n||i===l&&"static"!==x.backdrop)&&(k.hide(),N=null,e.preventDefault())}}k.toggle=function(){t(l,"show")?k.hide():k.show()},k.show=function(){if(!(t(l,"show")&&l.isAnimating||(r=f("show","modal",N),m.call(l,r),r.defaultPrevented))){l.isAnimating=!0;var e,i=document.getElementsByClassName("modal show")[0];i&&i!==l&&(i.modalTrigger&&i.modalTrigger.Modal.hide(),i.Modal&&i.Modal.hide()),x.backdrop&&(e=document.createElement("div"),null===(y=d(".modal-backdrop"))&&(e.setAttribute("class","modal-backdrop"+(x.animation?" fade":"")),y=e,document.body.appendChild(y)),y=y),!y||i||t(y,"show")||(y.offsetWidth,w=c(y),g(y,"show")),i?M():setTimeout(M,y&&w?w:0)}},k.hide=function(i){t(l,"show")&&(h=f("hide","modal"),m.call(l,h),h.defaultPrevented||(l.isAnimating=!0,e(l,"show"),l.setAttribute("aria-hidden",!0),t(l,"fade")&&1!==i?s(l,H):H()))},k.setContent=function(t){d(".modal-content",l).innerHTML=t},k.update=function(){t(l,"show")&&(P(),E())},k.dispose=function(){k.hide(1),o?(n(o,"click",I),delete o.Modal):delete l.Modal},u((function(){o=d(o);var e=d(o.getAttribute("data-target")||o.getAttribute("href"));l=t(o,"modal")?o:e,T=Array.from(document.getElementsByClassName("fixed-top")).concat(Array.from(document.getElementsByClassName("fixed-bottom"))),t(o,"modal")&&(o=null),o&&o.Modal&&o.Modal.dispose(),l&&l.Modal&&l.Modal.dispose(),x.keyboard=!1!==a.keyboard&&"false"!==l.getAttribute("data-keyboard"),x.backdrop="static"!==a.backdrop&&"static"!==l.getAttribute("data-backdrop")||"static",x.backdrop=!1!==a.backdrop&&"false"!==l.getAttribute("data-backdrop")&&x.backdrop,x.animation=!!t(l,"fade"),x.content=a.content,l.isAnimating=!1,o&&!o.Modal&&i(o,"click",I),x.content&&k.setContent(x.content.trim()),o?(l.modalTrigger=o,o.Modal=k):l.Modal=k}),"BSN.Modal")}function B(o,a){a=a||{};var l,r,c,p,h,b,y,T,k,C,x,P,S,B,M,L,H,I,D,X=this,W=null,O=0,R=/(iPhone|iPod|iPad)/.test(navigator.userAgent),z={};function U(t){null!==W&&t.target===d(".close",W)&&X.hide()}function q(){return{0:a.title||o.getAttribute("data-title")||null,1:a.content||o.getAttribute("data-content")||null}}function Y(){null===W&&o.focus()}function j(t){"hover"===z.trigger?(t(o,N,X.show),t(o,w[0],X.show),z.dismissible||t(o,w[1],X.hide)):"click"==z.trigger?t(o,z.trigger,X.toggle):"focus"==z.trigger&&(R&&t(o,"click",Y),t(o,z.trigger,X.toggle))}function F(t){W&&W.contains(t.target)||t.target===o||o.contains(t.target)||X.hide()}function V(t){z.dismissible?t(document,"click",U):("focus"==z.trigger&&t(o,"blur",X.hide),"hover"==z.trigger&&t(document,v,F,A)),t(window,"resize",X.hide,A)}function G(){V(i),m.call(o,x)}function J(){V(n),z.container.removeChild(W),O=null,W=null,m.call(o,S)}X.toggle=function(){null===W?X.show():X.hide()},X.show=function(){clearTimeout(O),O=setTimeout((function(){if(null===W){if(m.call(o,C),C.defaultPrevented)return;!function(){l=q()[0]||null,r=(r=q()[1])?r.trim():null,W=document.createElement("div");var e=document.createElement("div");if(g(e,"arrow"),W.appendChild(e),null!==r&&null===z.template){if(W.setAttribute("role","tooltip"),null!==l){var i=document.createElement("h3");g(i,"popover-header"),i.innerHTML=z.dismissible?l+k:l,W.appendChild(i)}var n=document.createElement("div");g(n,"popover-body"),n.innerHTML=z.dismissible&&null===l?r+k:r,W.appendChild(n)}else{var o=document.createElement("div");o.innerHTML=z.template.trim(),W.className=o.firstChild.className,W.innerHTML=o.firstChild.innerHTML;var a=d(".popover-header",W),c=d(".popover-body",W);l&&a&&(a.innerHTML=l.trim()),r&&c&&(c.innerHTML=r.trim())}z.container.appendChild(W),W.style.display="block",!t(W,"popover")&&g(W,"popover"),!t(W,z.animation)&&g(W,z.animation),!t(W,D)&&g(W,D)}(),E(o,W,z.placement,z.container),!t(W,"show")&&g(W,"show"),z.animation?s(W,G):G()}}),20)},X.hide=function(){clearTimeout(O),O=setTimeout((function(){if(W&&null!==W&&t(W,"show")){if(m.call(o,P),P.defaultPrevented)return;e(W,"show"),z.animation?s(W,J):J()}}),z.delay)},X.dispose=function(){X.hide(),j(n),delete o.Popover},u((function(){(o=d(o)).Popover&&o.Popover.dispose(),c=o.getAttribute("data-trigger"),p=o.getAttribute("data-animation"),h=o.getAttribute("data-placement"),b=o.getAttribute("data-dismissible"),y=o.getAttribute("data-delay"),T=o.getAttribute("data-container"),k='<button type="button" class="close">×</button>',C=f("show","popover"),x=f("shown","popover"),P=f("hide","popover"),S=f("hidden","popover"),B=d(a.container),M=d(T),L=o.closest(".modal"),H=o.closest(".fixed-top"),I=o.closest(".fixed-bottom"),z.template=a.template?a.template:null,z.trigger=a.trigger?a.trigger:c||"hover",z.animation=a.animation&&"fade"!==a.animation?a.animation:p||"fade",z.placement=a.placement?a.placement:h||"top",z.delay=parseInt(a.delay||y)||200,z.dismissible=!(!a.dismissible&&"true"!==b),z.container=B||(M||(H||(I||(L||document.body)))),D="bs-popover-"+z.placement;var t=q();l=t[0],((r=t[1])||z.template)&&(o.Popover||j(i),o.Popover=X)}),"BSN.Popover")}function M(o,a){a=a||{};var l,r,c,s,p,h=this,v={};function b(){var i;i=s.getElementsByTagName("A"),l.length!==i.length&&(l.items=[],l.targets=[],Array.from(i).map((function(t){var e=t.getAttribute("href"),i=e&&"#"===e.charAt(0)&&"#"!==e.slice(-1)&&d(e);i&&(l.items.push(t),l.targets.push(i))})),l.length=i.length),l.scrollOffset=l.isWindow?x().y:o.scrollTop,l.items.map((function(i,n){return function(i){var n=l.items[i],a=l.targets[i],r=t(n,"dropdown-item")&&n.closest(".dropdown-menu"),c=r&&r.previousElementSibling,s=n.nextElementSibling,d=s&&s.getElementsByClassName("active").length,u=l.isWindow&&a.getBoundingClientRect(),p=t(n,"active")||!1,h=(l.isWindow?u.top+l.scrollOffset:a.offsetTop)-v.offset,b=l.isWindow?u.bottom+l.scrollOffset-v.offset:l.targets[i+1]?l.targets[i+1].offsetTop-v.offset:o.scrollHeight,y=d||l.scrollOffset>=h&&b>l.scrollOffset;if(!p&&y)g(n,"active"),c&&!t(c,"active")&&g(c,"active"),m.call(o,f("activate","scrollspy",l.items[i]));else if(p&&!y)e(n,"active"),c&&t(c,"active")&&!n.parentNode.getElementsByClassName("active").length&&e(c,"active");else if(p&&y||!y&&!p)return}(n)}))}function y(t){t(p,"scroll",h.refresh,A),t(window,"resize",h.refresh,A)}h.refresh=function(){b()},h.dispose=function(){y(n),delete o.ScrollSpy},u((function(){(o=d(o)).ScrollSpy&&o.ScrollSpy.dispose(),r=o.getAttribute("data-target"),c=o.getAttribute("data-offset"),s=d(a.target||r),p=o.offsetHeight<o.scrollHeight?o:window,s&&(v.target=s,v.offset=parseInt(a.offset||c)||10,(l={}).length=0,l.items=[],l.targets=[],l.isWindow=p===window,o.ScrollSpy||y(i),h.refresh(),o.ScrollSpy=h)}),"BSN.ScrollSpy")}function L(o,a){a=a||{};var r,c,p,h,v,b,y,w,A,T,k,N,C,x,E,P=this,S=!1;function B(){S.style.height="",e(S,"collapsing"),c.isAnimating=!1}function M(){S?C?B():setTimeout((function(){S.style.height=x+"px",S.offsetWidth,s(S,B)}),50):c.isAnimating=!1,v=f("shown","tab",A),m.call(w,v)}function L(){S&&(T.style.float="left",k.style.float="left",N=T.scrollHeight),h=f("show","tab",A),y=f("hidden","tab",w),m.call(w,h),h.defaultPrevented||(g(k,"active"),e(T,"active"),S&&(x=k.scrollHeight,C=x===N,g(S,"collapsing"),S.style.height=N+"px",S.offsetHeight,T.style.float="",k.style.float=""),t(k,"fade")?setTimeout((function(){g(k,"show"),s(k,M)}),20):M(),m.call(A,y))}function H(){var e,i=c.getElementsByClassName("active");return 1!==i.length||t(i[0].parentNode,"dropdown")?i.length>1&&(e=i[i.length-1]):e=i[0],e}function I(){return d(H().getAttribute("href"))}function D(t){t.preventDefault(),w=t.currentTarget,!c.isAnimating&&P.show()}P.show=function(){if(!t(w=w||o,"active")){if(k=d(w.getAttribute("href")),A=H(),T=I(),b=f("hide","tab",w),m.call(A,b),b.defaultPrevented)return;c.isAnimating=!0,e(A,"active"),A.setAttribute("aria-selected","false"),g(w,"active"),w.setAttribute("aria-selected","true"),p&&(t(o.parentNode,"dropdown-menu")?t(p,"active")||g(p,"active"):t(p,"active")&&e(p,"active")),t(T,"fade")?(e(T,"show"),s(T,L)):L()}},P.dispose=function(){n(o,"click",D),delete o.Tab},u((function(){(o=d(o)).Tab&&o.Tab.dispose(),r=o.getAttribute("data-height"),c=o.closest(".nav"),p=c&&d(".dropdown-toggle",c),E=!(!l||!1===a.height||"false"===r),c.isAnimating=!1,o.Tab||i(o,"click",D),E&&(S=I().parentNode),o.Tab=P}),"BSN.Tab")}function H(o,a){a=a||{};var l,r,c,p,h,v,b,y,w=this,A=0,T={};function k(){e(l,"showing"),g(l,"show"),m.call(l,b),T.autohide&&w.hide()}function N(){g(l,"hide"),m.call(l,y)}function C(){e(l,"show"),T.animation?s(l,N):N()}function x(){clearTimeout(A),n(o,"click",w.hide),delete o.Toast}w.show=function(){if(l&&!t(l,"show")){if(m.call(l,h),h.defaultPrevented)return;T.animation&&g(l,"fade"),e(l,"hide"),l.offsetWidth,g(l,"showing"),T.animation?s(l,k):k()}},w.hide=function(e){if(l&&t(l,"show")){if(m.call(l,v),v.defaultPrevented)return;e?C():A=setTimeout(C,T.delay)}},w.dispose=function(){T.animation?s(l,x):x()},u((function(){(o=d(o)).Toast&&o.Toast.dispose(),l=o.closest(".toast"),r=o.getAttribute("data-animation"),c=o.getAttribute("data-autohide"),p=o.getAttribute("data-delay"),h=f("show","toast"),v=f("hide","toast"),b=f("shown","toast"),y=f("hidden","toast"),T.animation=!1===a.animation||"false"===r?0:1,T.autohide=!1===a.autohide||"false"===c?0:1,T.delay=parseInt(a.delay||p)||500,o.Toast||i(o,"click",w.hide),o.Toast=w}),"BSN.Toast")}function I(o,a){a=a||{};var l,r,c,p,h,b,y,T,k,C,x,P,S,B,M,L=this,H=null,I=0,D={};function X(){return o.getAttribute("title")||o.getAttribute("data-title")||o.getAttribute("data-original-title")}function W(t){H&&H.contains(t.target)||t.target===o||o.contains(t.target)||L.hide()}function O(){i(document,v,W,A),i(window,"resize",L.hide,A),m.call(o,y)}function R(){n(document,v,W,A),n(window,"resize",L.hide,A),D.container.removeChild(H),H=null,I=null,m.call(o,k)}function z(t){t(o,N,L.show),t(o,w[0],L.show),t(o,w[1],L.hide)}L.show=function(){clearTimeout(I),I=setTimeout((function(){if(null===H){if(m.call(o,b),b.defaultPrevented)return;!1!==function(){if(l=X()){if(H=document.createElement("div"),D.template){var e=document.createElement("div");e.innerHTML=D.template.trim(),H.className=e.firstChild.className,H.innerHTML=e.firstChild.innerHTML,d(".tooltip-inner",H).innerHTML=l.trim()}else{var i=document.createElement("div");g(i,"arrow"),H.appendChild(i);var n=document.createElement("div");g(n,"tooltip-inner"),H.appendChild(n),n.innerHTML=l}H.style.left="0",H.style.top="0",H.setAttribute("role","tooltip"),!t(H,"tooltip")&&g(H,"tooltip"),!t(H,D.animation)&&g(H,D.animation),!t(H,M)&&g(H,M),D.container.appendChild(H)}}()&&(E(o,H,D.placement,D.container),!t(H,"show")&&g(H,"show"),D.animation?s(H,O):O())}}),20)},L.hide=function(){clearTimeout(I),I=setTimeout((function(){if(H&&t(H,"show")){if(m.call(o,T),T.defaultPrevented)return;e(H,"show"),D.animation?s(H,R):R()}}),D.delay)},L.toggle=function(){H?L.hide():L.show()},L.dispose=function(){z(n),L.hide(),o.setAttribute("title",o.getAttribute("data-original-title")),o.removeAttribute("data-original-title"),delete o.Tooltip},u((function(){(o=d(o)).Tooltip&&o.Tooltip.dispose(),r=o.getAttribute("data-animation"),c=o.getAttribute("data-placement"),p=o.getAttribute("data-delay"),h=o.getAttribute("data-container"),b=f("show","tooltip"),y=f("shown","tooltip"),T=f("hide","tooltip"),k=f("hidden","tooltip"),C=d(a.container),x=d(h),P=o.closest(".modal"),S=o.closest(".fixed-top"),B=o.closest(".fixed-bottom"),D.animation=a.animation&&"fade"!==a.animation?a.animation:r||"fade",D.placement=a.placement?a.placement:c||"top",D.template=a.template?a.template:null,D.delay=parseInt(a.delay||p)||200,D.container=C||(x||(S||(B||(P||document.body)))),M="bs-tooltip-"+D.placement,(l=X())&&(o.Tooltip||(o.setAttribute("data-original-title",l),o.removeAttribute("title"),z(i)),o.Tooltip=L)}),"BSN.Tooltip")}var D={},X=function(t){t=t||document;var e=function(t,e){Array.from(e).map((function(e){return new t(e)}))};for(var i in D)e(D[i][0],t.querySelectorAll(D[i][1]))};D.Alert=[p,'[data-dismiss="alert"]'],D.Button=[h,'[data-toggle="buttons"]'],D.Carousel=[T,'[data-ride="carousel"]'],D.Collapse=[k,'[data-toggle="collapse"]'],D.Dropdown=[P,'[data-toggle="dropdown"]'],D.Modal=[S,'[data-toggle="modal"]'],D.Popover=[B,'[data-toggle="popover"],[data-tip="popover"]'],D.ScrollSpy=[M,'[data-spy="scroll"]'],D.Tab=[L,'[data-toggle="tab"]'],D.Toast=[H,'[data-dismiss="toast"]'],D.Tooltip=[I,'[data-toggle="tooltip"],[data-tip="tooltip"]'],document.body?X():o(document,"DOMContentLoaded",X);var W={Alert:p,Button:h,Carousel:T,Collapse:k,Dropdown:P,Modal:S,Popover:B,ScrollSpy:M,Tab:L,Toast:H,Tooltip:I,initCallback:X,removeDataAPI:function(t){t=t||document;var e=function(t,e){Array.from(e).map((function(e){return e[t].dispose()}))};for(var i in D)e(i,t.querySelectorAll(D[i][1]))},componentsInit:D,Version:"3.0.1"};export default W; | ||
// Native JavaScript for Bootstrap v3.0.2 | 2020 © dnp_theme | MIT-License | ||
function t(t,e){return t.classList.contains(e)}function e(t,e){t.classList.remove(e)}function n(t,e,n,i){i=i||!1,t.addEventListener(e,n,i)}function i(t,e,n,i){i=i||!1,t.removeEventListener(e,n,i)}function o(t,e,o,a){n(t,e,(function n(l){l.target===t&&(o(l),i(t,e,n,a))}),a)}var a="webkitTransition"in document.body.style?"webkitTransitionEnd":"transitionend",l="webkitTransition"in document.body.style||"transition"in document.body.style,r="webkitTransition"in document.body.style?"webkitTransitionDuration":"transitionDuration";function c(t){var e=l?window.getComputedStyle(t)[r]:0;return e="number"!=typeof(e=parseFloat(e))||isNaN(e)?0:1e3*e}function s(t,e){var n=0;c(t)?o(t,a,(function(t){!n&&e(t),n=1})):setTimeout((function(){!n&&e(),n=1}),17)}function d(t,e){var n=e&&e instanceof Element?e:document;return t instanceof Element?t:n.querySelector(t)}function u(t,e){try{t()}catch(t){console.error(e+": "+t)}}function f(t,e,n){var i=new CustomEvent(t+".bs."+e,{cancelable:!0});return i.relatedTarget=n,i}function m(t){this&&this.dispatchEvent(t)}function g(o){var a,l=this,r=f("close","alert"),c=f("closed","alert");function g(t){a=t&&t.target.closest(".alert"),(o=d('[data-dismiss="alert"]',a))&&a&&(o===t.target||o.contains(t.target))&&l.close()}function p(){i(o,"click",g),a.parentNode.removeChild(a),m.call(a,c)}l.close=function(){if(a&&o&&t(a,"show")){if(m.call(a,r),r.defaultPrevented)return;l.dispose(),e(a,"show"),t(a,"fade")?s(a,p):p()}},l.dispose=function(){i(o,"click",g),delete o.Alert},u((function(){o=d(o),a=o.closest(".alert"),o.Alert&&o.Alert.dispose(),o.Alert||n(o,"click",g),l.element=o,o.Alert=l}),"BSN.Alert")}function p(t,e){t.classList.add(e)}function h(o){var a,l=this,r=f("change","button");function c(n){var i,l="LABEL"===n.target.tagName?n.target:n.target.closest("LABEL")?n.target.closest("LABEL"):null;if(i=l&&l.getElementsByTagName("INPUT")[0]){if(m.call(i,r),m.call(o,r),"checkbox"===i.type){if(r.defaultPrevented)return;i.checked?(e(l,"active"),i.getAttribute("checked"),i.removeAttribute("checked"),i.checked=!1):(p(l,"active"),i.getAttribute("checked"),i.setAttribute("checked","checked"),i.checked=!0),o.toggled||(o.toggled=!0)}if("radio"===i.type&&!o.toggled){if(r.defaultPrevented)return;(!i.checked||0===n.screenX&&0==n.screenY)&&(p(l,"active"),p(l,"focus"),i.setAttribute("checked","checked"),i.checked=!0,o.toggled=!0,Array.from(a).map((function(n){var i=n.getElementsByTagName("INPUT")[0];n!==l&&t(n,"active")&&(m.call(i,r),e(n,"active"),i.removeAttribute("checked"),i.checked=!1)})))}setTimeout((function(){o.toggled=!1}),50)}}function s(t){32===(t.which||t.keyCode)&&t.target===document.activeElement&&c(t)}function g(t){32===(t.which||t.keyCode)&&t.preventDefault()}function h(t){var n="focusin"===t.type?p:e;"INPUT"===t.target.tagName&&n(t.target.closest(".btn"),"focus")}function v(t){t(o,"click",c),t(o,"keyup",s),t(o,"keydown",g),t(o,"focusin",h),t(o,"focusout",h)}l.dispose=function(){v(i),delete o.Button},u((function(){(o=d(o)).Button&&o.Button.dispose(),(a=o.getElementsByClassName("btn")).length&&(o.Button||v(n),o.toggled=!1,o.Button=l,Array.from(a).map((function(n){!t(n,"active")&&d("input:checked",n)&&p(n,"active"),t(n,"active")&&!d("input:checked",n)&&e(n,"active")})))}),"BSN.Button")}var v="touchstart",b="touchend",y="touchmove",w="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],A=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});o(document,"DOMContentLoaded",(function(){}),e)}catch(t){}return t}()&&{passive:!0};function T(o,a){a=a||{};var l,r,g,h,T,k,N,C,x,E=this;function P(){!1===r.interval||t(o,"paused")||(p(o,"paused"),!l.isSliding&&(clearInterval(l.timer),l.timer=null))}function S(){!1!==r.interval&&t(o,"paused")&&(e(o,"paused"),!l.isSliding&&(clearInterval(l.timer),l.timer=null),!l.isSliding&&E.cycle())}function B(e){if(e.preventDefault(),!l.isSliding){var n=e.target;if(!n||t(n,"active")||!n.getAttribute("data-slide-to"))return!1;l.index=parseInt(n.getAttribute("data-slide-to"),10),E.slideTo(l.index)}}function H(t){if(t.preventDefault(),!l.isSliding){var e=t.currentTarget||t.srcElement;e===N?l.index++:e===k&&l.index--,E.slideTo(l.index)}}function M(t){var e=t.which;if(!l.isSliding){switch(e){case 39:l.index++;break;case 37:l.index--;break;default:return}E.slideTo(l.index)}}function L(t){r.pause&&r.interval&&(t(o,w[0],P),t(o,w[1],S),t(o,v,P,A),t(o,b,S,A)),r.touch&&T.length>1&&t(o,v,D,A),N&&t(N,"click",H),k&&t(k,"click",H),C&&t(C,"click",B),r.keyboard&&t(window,"keydown",M)}function I(t){t(o,y,X,A),t(o,b,W,A)}function D(t){l.isTouch||(l.touchPosition.startX=t.changedTouches[0].pageX,o.contains(t.target)&&(l.isTouch=!0,I(n)))}function X(t){if(l.isTouch)return l.touchPosition.currentX=t.changedTouches[0].pageX,"touchmove"===t.type&&t.changedTouches.length>1?(t.preventDefault(),!1):void 0;t.preventDefault()}function W(t){if(l.isTouch&&!l.isSliding&&(l.touchPosition.endX=l.touchPosition.currentX||t.changedTouches[0].pageX,l.isTouch)){if((!o.contains(t.target)||!o.contains(t.relatedTarget))&&Math.abs(l.touchPosition.startX-l.touchPosition.endX)<75)return!1;l.touchPosition.currentX<l.touchPosition.startX?l.index++:l.touchPosition.currentX>l.touchPosition.startX&&l.index--,l.isTouch=!1,E.slideTo(l.index),I(i)}}function O(t){Array.from(x).map((function(t){e(t,"active")})),x[t]&&p(x[t],"active")}function R(n){if(l.touchPosition){var i=l.index,a=n&&n.target!==T[i]?1e3*n.elapsedTime+100:20,c=E.getActiveIndex(),s="left"===l.direction?"next":"prev";l.isSliding&&setTimeout((function(){l.touchPosition&&(l.isSliding=!1,p(T[i],"active"),e(T[c],"active"),e(T[i],"carousel-item-"+s),e(T[i],"carousel-item-"+l.direction),e(T[c],"carousel-item-"+l.direction),m.call(o,h),document.hidden||!r.interval||t(o,"paused")||E.cycle())}),a)}}E.cycle=function(){l.timer&&(clearInterval(l.timer),l.timer=null),l.timer=setInterval((function(){var t=l.index||E.getActiveIndex();(function(t){var e=t.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;return e.top<=n&&e.bottom>=0})(o)&&(t++,E.slideTo(t))}),r.interval)},E.slideTo=function(n){if(!l.isSliding){var i,a=E.getActiveIndex();a!==n&&(a<n||0===a&&n===T.length-1?l.direction="left":(a>n||a===T.length-1&&0===n)&&(l.direction="right"),n<0?n=T.length-1:n>=T.length&&(n=0),i="left"===l.direction?"next":"prev",g=f("slide","carousel",T[n]),h=f("slid","carousel",T[n]),m.call(o,g),g.defaultPrevented||(l.index=n,l.isSliding=!0,clearInterval(l.timer),l.timer=null,O(n),c(T[n])&&t(o,"slide")?(p(T[n],"carousel-item-"+i),T[n].offsetWidth,p(T[n],"carousel-item-"+l.direction),p(T[a],"carousel-item-"+l.direction),s(T[n],R)):(p(T[n],"active"),T[n].offsetWidth,e(T[a],"active"),setTimeout((function(){l.isSliding=!1,r.interval&&o&&!t(o,"paused")&&E.cycle(),m.call(o,h)}),100))))}},E.getActiveIndex=function(){return Array.from(T).indexOf(o.getElementsByClassName("carousel-item active")[0])||0},E.dispose=function(){var n=["left","right","prev","next"];Array.from(T).map((function(i,o){t(i,"active")&&O(o),n.map((function(t){return e(i,"carousel-item-"+t)}))})),clearInterval(l.timer),L(i),l={},r={},delete o.Carousel},u((function(){if((o=d(o)).Carousel&&o.Carousel.dispose(),T=o.getElementsByClassName("carousel-item"),k=o.getElementsByClassName("carousel-control-prev")[0],N=o.getElementsByClassName("carousel-control-next")[0],C=o.getElementsByClassName("carousel-indicators")[0],x=C&&C.getElementsByTagName("LI")||[],!(T.length<2)){var t=o.getAttribute("data-interval"),e="false"===t?0:parseInt(t),i="false"===o.getAttribute("data-touch")?0:1,c="hover"===o.getAttribute("data-pause")||!1,s="true"===o.getAttribute("data-keyboard")||!1,u=a.interval,f=a.touch;(r={}).keyboard=!0===a.keyboard||s,r.pause=!("hover"!==a.pause&&!c)&&"hover",r.touch=f||i,r.interval="number"==typeof u?u:!1===u||0===e||!1===e?0:isNaN(e)?5e3:e,E.getActiveIndex()<0&&(T.length&&p(T[0],"active"),x.length&&O(0)),(l={}).direction="left",l.index=0,l.timer=null,l.isSliding=!1,l.isTouch=!1,l.touchPosition={startX:0,currentX:0,endX:0},L(n),r.interval&&E.cycle(),o.Carousel=E}}),"BSN.Carousel")}function k(o,a){a=a||{};var l,r,c,g,h,v,b=this,y=null,w=null;function A(t,n){m.call(t,h),h.defaultPrevented||(t.isAnimating=!0,t.style.height=t.scrollHeight+"px",e(t,"collapse"),e(t,"show"),p(t,"collapsing"),t.offsetWidth,t.style.height="0px",s(t,(function(){t.isAnimating=!1,t.setAttribute("aria-expanded","false"),n.setAttribute("aria-expanded","false"),e(t,"collapsing"),p(t,"collapse"),t.style.height="",m.call(t,v)})))}b.toggle=function(e){(e&&"A"===e.target.tagName||"A"===o.tagName)&&e.preventDefault(),(o.contains(e.target)||e.target===o)&&(t(w,"show")?b.hide():b.show())},b.hide=function(){w.isAnimating||(A(w,o),p(o,"collapsed"))},b.show=function(){var t,n;y&&(l=y.getElementsByClassName("collapse show")[0],r=l&&(d('[data-target="#'+l.id+'"]',y)||d('[href="#'+l.id+'"]',y))),w.isAnimating||(r&&l!==w&&(A(l,r),p(r,"collapsed")),t=w,n=o,m.call(t,c),c.defaultPrevented||(t.isAnimating=!0,p(t,"collapsing"),e(t,"collapse"),t.style.height=t.scrollHeight+"px",s(t,(function(){t.isAnimating=!1,t.setAttribute("aria-expanded","true"),n.setAttribute("aria-expanded","true"),e(t,"collapsing"),p(t,"collapse"),p(t,"show"),t.style.height="",m.call(t,g)}))),e(o,"collapsed"))},b.dispose=function(){i(o,"click",b.toggle),delete o.Collapse},u((function(){(o=d(o)).Collapse&&o.Collapse.dispose();var t=o.getAttribute("data-parent");c=f("show","collapse"),g=f("shown","collapse"),h=f("hide","collapse"),v=f("hidden","collapse"),(w=d(a.target||o.getAttribute("data-target")||o.getAttribute("href"))).isAnimating=!1,y=o.closest(a.parent||t),o.Collapse||n(o,"click",b.toggle),o.Collapse=b}),"BSN.Collapse")}var N="mousedown";"webkitPerspective"in document.body.style||document.body.style,"webkitTransform"in document.body.style||document.body.style;function C(t){t.focus?t.focus():t.setActive()}function x(){return{y:window.pageYOffset||document.documentElement.scrollTop,x:window.pageXOffset||document.documentElement.scrollLeft}}function E(e,n,i,o){var a,l,r,c,s,u,f=n.offsetWidth,m=n.offsetHeight,g=document.documentElement.clientWidth||document.body.clientWidth,p=document.documentElement.clientHeight||document.body.clientHeight,h=e.getBoundingClientRect(),v=o===document.body?x():{x:o.offsetLeft+o.scrollLeft,y:o.offsetTop+o.scrollTop},b=h.right-h.left,y=h.bottom-h.top,w=t(n,"popover"),A=d(".arrow",n),T=h.top+y/2-m/2<0,k=h.left+b/2-f/2<0,N=h.left+f/2+b/2>=g,C=h.top+m/2+y/2>=p,E=h.top-m<0,P=h.left-f<0,S=h.top+m+y>=p,B=h.left+f+b>=g;i="right"===(i="left"===(i="bottom"===(i="top"===(i=("left"===i||"right"===i)&&P&&B?"top":i)&&E?"bottom":i)&&S?"top":i)&&P?"right":i)&&B?"left":i,-1===n.className.indexOf(i)&&(n.className=n.className.replace(/\b(top|bottom|left|right)+/,i)),s=A.offsetWidth,u=A.offsetHeight,"left"===i||"right"===i?(l="left"===i?h.left+v.x-f-(w?s:0):h.left+v.x+b,T?(a=h.top+v.y,r=y/2-s):C?(a=h.top+v.y-m+y,r=m-y/2-s):(a=h.top+v.y-m/2+y/2,r=m/2-(w?.9*u:u/2))):"top"!==i&&"bottom"!==i||(a="top"===i?h.top+v.y-m-(w?u:0):h.top+v.y+y,k?(l=0,c=h.left+b/2-s):N?(l=g-1.01*f,c=f-(g-h.left)+b/2-s/2):(l=h.left+v.x-f/2+b/2,c=f/2-(w?s:s/2))),n.style.top=a+"px",n.style.left=l+"px",r&&(A.style.top=r+"px"),c&&(A.style.left=c+"px")}function P(o,a){var l,r,c,s,g,h,v,b=this,y=null,w=[];function A(t){(t.href&&"#"===t.href.slice(-1)||t.parentNode&&t.parentNode.href&&"#"===t.parentNode.href.slice(-1))&&this.preventDefault()}function T(){var t=o.open?n:i;t(document,"click",k),t(document,"keydown",x),t(document,"keyup",E),t(document,"focus",k,!0)}function k(t){var e=t.target,n=e&&(e.getAttribute("data-toggle")||e.parentNode&&e.parentNode.getAttribute&&e.parentNode.getAttribute("data-toggle"));("focus"!==t.type||e!==o&&e!==h&&!h.contains(e))&&(e!==h&&!h.contains(e)||!v&&!n)&&(y=e===o||o.contains(e)?o:null,b.hide(),A.call(t,e))}function N(t){y=o,b.show(),A.call(t,t.target)}function x(t){var e=t.which||t.keyCode;38!==e&&40!==e||t.preventDefault()}function E(t){var e=t.which,n=t.keyCode,i=e||n,a=document.activeElement,l=a===o,r=h.contains(a),c=a.parentNode===h||a.parentNode.parentNode===h,s=w.indexOf(a);c&&(s=l?0:38===i?s>1?s-1:0:40===i&&s<w.length-1?s+1:s,w[s]&&C(w[s])),(w.length&&c||!w.length&&(r||l)||!r)&&o.open&&27===i&&(b.toggle(),y=null)}b.show=function(){l=f("show","dropdown",y),m.call(g,l),l.defaultPrevented||(p(h,"show"),p(g,"show"),o.setAttribute("aria-expanded",!0),o.open=!0,i(o,"click",N),setTimeout((function(){C(h.getElementsByTagName("INPUT")[0]||o),T(),r=f("shown","dropdown",y),m.call(g,r)}),1))},b.hide=function(){c=f("hide","dropdown",y),m.call(g,c),c.defaultPrevented||(e(h,"show"),e(g,"show"),o.setAttribute("aria-expanded",!1),o.open=!1,T(),C(o),setTimeout((function(){o.Dropdown&&n(o,"click",N)}),1),s=f("hidden","dropdown",y),m.call(g,s))},b.toggle=function(){t(g,"show")&&o.open?b.hide():b.show()},b.dispose=function(){t(g,"show")&&o.open&&b.hide(),i(o,"click",N),delete o.Dropdown},u((function(){(o=d(o)).Dropdown&&o.Dropdown.dispose(),g=o.parentNode,h=d(".dropdown-menu",g),Array.from(h.children).map((function(t){t.children.length&&"A"===t.children[0].tagName&&w.push(t.children[0]),"A"===t.tagName&&w.push(t)})),o.Dropdown||(!("tabindex"in h)&&h.setAttribute("tabindex","0"),n(o,"click",N)),v=!0===a||"true"===o.getAttribute("data-persist")||!1,o.open=!1,o.Dropdown=b}),"BSN.Dropdown")}function S(o,a){a=a||{};var l,r,g,h,v,b,y,w,T,k=this,N=null,x={};function E(){var e,n,i=t(document.body,"modal-open"),o=parseInt(getComputedStyle(document.body).paddingRight),a=document.documentElement.clientHeight!==document.documentElement.scrollHeight||document.body.clientHeight!==document.body.scrollHeight,r=l.clientHeight!==l.scrollHeight;(n=document.createElement("div")).className="modal-scrollbar-measure",document.body.appendChild(n),e=n.offsetWidth-n.clientWidth,document.body.removeChild(n),b=e,l.style.paddingRight=!r&&b?b+"px":"",document.body.style.paddingRight=r||a?o+(i?0:b)+"px":"",T.length&&T.map((function(t){var e=getComputedStyle(t).paddingRight;t.style.paddingRight=r||a?parseInt(e)+(i?0:b)+"px":parseInt(e)+"px"}))}function P(){(y=d(".modal-backdrop"))&&!document.getElementsByClassName("modal show")[0]&&(document.body.removeChild(y),y=null),null===y&&(e(document.body,"modal-open"),document.body.style.paddingRight="",l.style.paddingRight="",T.length&&T.map((function(t){t.style.paddingRight=""})))}function S(t){t(window,"resize",k.update,A),t(l,"click",D),t(document,"keydown",I)}function B(){l.style.display="block",E(),!document.getElementsByClassName("modal show")[0]&&p(document.body,"modal-open"),p(l,"show"),l.setAttribute("aria-hidden",!1),t(l,"fade")?s(l,H):H()}function H(){C(l),l.isAnimating=!1,S(n),g=f("shown","modal",N),m.call(l,g)}function M(n){l.style.display="",o&&C(o),y=d(".modal-backdrop"),1!==n&&y&&t(y,"show")&&!document.getElementsByClassName("modal show")[0]?(e(y,"show"),s(y,P)):P(),S(i),l.isAnimating=!1,v=f("hidden","modal"),m.call(l,v)}function L(e){if(!l.isAnimating){var n=e.target,i="#"+l.getAttribute("id"),a=n.getAttribute("data-target")||n.getAttribute("href"),r=o.getAttribute("data-target")||o.getAttribute("href");!t(l,"show")&&(n===o&&a===i||o.contains(n)&&r===i)&&(l.modalTrigger=o,N=o,k.show(),e.preventDefault())}}function I(e){var n=e.which;!l.isAnimating&&x.keyboard&&27==n&&t(l,"show")&&k.hide()}function D(e){if(!l.isAnimating){var n=e.target,i="modal"===n.getAttribute("data-dismiss"),o=n.closest('[data-dismiss="modal"]');t(l,"show")&&(o||i||n===l&&"static"!==x.backdrop)&&(k.hide(),N=null,e.preventDefault())}}k.toggle=function(){t(l,"show")?k.hide():k.show()},k.show=function(){if(!(t(l,"show")&&l.isAnimating||(r=f("show","modal",N),m.call(l,r),r.defaultPrevented))){l.isAnimating=!0;var e,n=document.getElementsByClassName("modal show")[0];n&&n!==l&&(n.modalTrigger&&n.modalTrigger.Modal.hide(),n.Modal&&n.Modal.hide()),x.backdrop&&(e=document.createElement("div"),null===(y=d(".modal-backdrop"))&&(e.setAttribute("class","modal-backdrop"+(x.animation?" fade":"")),y=e,document.body.appendChild(y)),y=y),!y||n||t(y,"show")||(y.offsetWidth,w=c(y),p(y,"show")),n?B():setTimeout(B,y&&w?w:0)}},k.hide=function(n){t(l,"show")&&(h=f("hide","modal"),m.call(l,h),h.defaultPrevented||(l.isAnimating=!0,e(l,"show"),l.setAttribute("aria-hidden",!0),t(l,"fade")&&1!==n?s(l,M):M()))},k.setContent=function(t){d(".modal-content",l).innerHTML=t},k.update=function(){t(l,"show")&&E()},k.dispose=function(){k.hide(1),o?(i(o,"click",L),delete o.Modal):delete l.Modal},u((function(){o=d(o);var e=d(o.getAttribute("data-target")||o.getAttribute("href"));l=t(o,"modal")?o:e,T=Array.from(document.getElementsByClassName("fixed-top")).concat(Array.from(document.getElementsByClassName("fixed-bottom"))),t(o,"modal")&&(o=null),o&&o.Modal&&o.Modal.dispose(),l&&l.Modal&&l.Modal.dispose(),x.keyboard=!1!==a.keyboard&&"false"!==l.getAttribute("data-keyboard"),x.backdrop="static"!==a.backdrop&&"static"!==l.getAttribute("data-backdrop")||"static",x.backdrop=!1!==a.backdrop&&"false"!==l.getAttribute("data-backdrop")&&x.backdrop,x.animation=!!t(l,"fade"),x.content=a.content,l.isAnimating=!1,o&&!o.Modal&&n(o,"click",L),x.content&&k.setContent(x.content.trim()),o?(l.modalTrigger=o,o.Modal=k):l.Modal=k}),"BSN.Modal")}function B(o,a){a=a||{};var l,r,c,g,h,b,y,T,k,C,x,P,S,B,H,M,L,I,D,X=this,W=null,O=0,R=/(iPhone|iPod|iPad)/.test(navigator.userAgent),z={};function U(t){null!==W&&t.target===d(".close",W)&&X.hide()}function q(){return{0:a.title||o.getAttribute("data-title")||null,1:a.content||o.getAttribute("data-content")||null}}function Y(){null===W&&o.focus()}function j(t){"hover"===z.trigger?(t(o,N,X.show),t(o,w[0],X.show),z.dismissible||t(o,w[1],X.hide)):"click"==z.trigger?t(o,z.trigger,X.toggle):"focus"==z.trigger&&(R&&t(o,"click",Y),t(o,z.trigger,X.toggle))}function F(t){W&&W.contains(t.target)||t.target===o||o.contains(t.target)||X.hide()}function V(t){z.dismissible?t(document,"click",U):("focus"==z.trigger&&t(o,"blur",X.hide),"hover"==z.trigger&&t(document,v,F,A)),t(window,"resize",X.hide,A)}function G(){V(n),m.call(o,x)}function J(){V(i),z.container.removeChild(W),O=null,W=null,m.call(o,S)}X.toggle=function(){null===W?X.show():X.hide()},X.show=function(){clearTimeout(O),O=setTimeout((function(){if(null===W){if(m.call(o,C),C.defaultPrevented)return;!function(){l=q()[0]||null,r=(r=q()[1])?r.trim():null,W=document.createElement("div");var e=document.createElement("div");if(p(e,"arrow"),W.appendChild(e),null!==r&&null===z.template){if(W.setAttribute("role","tooltip"),null!==l){var n=document.createElement("h3");p(n,"popover-header"),n.innerHTML=z.dismissible?l+k:l,W.appendChild(n)}var i=document.createElement("div");p(i,"popover-body"),i.innerHTML=z.dismissible&&null===l?r+k:r,W.appendChild(i)}else{var o=document.createElement("div");o.innerHTML=z.template.trim(),W.className=o.firstChild.className,W.innerHTML=o.firstChild.innerHTML;var a=d(".popover-header",W),c=d(".popover-body",W);l&&a&&(a.innerHTML=l.trim()),r&&c&&(c.innerHTML=r.trim())}z.container.appendChild(W),W.style.display="block",!t(W,"popover")&&p(W,"popover"),!t(W,z.animation)&&p(W,z.animation),!t(W,D)&&p(W,D)}(),E(o,W,z.placement,z.container),!t(W,"show")&&p(W,"show"),z.animation?s(W,G):G()}}),20)},X.hide=function(){clearTimeout(O),O=setTimeout((function(){if(W&&null!==W&&t(W,"show")){if(m.call(o,P),P.defaultPrevented)return;e(W,"show"),z.animation?s(W,J):J()}}),z.delay)},X.dispose=function(){X.hide(),j(i),delete o.Popover},u((function(){(o=d(o)).Popover&&o.Popover.dispose(),c=o.getAttribute("data-trigger"),g=o.getAttribute("data-animation"),h=o.getAttribute("data-placement"),b=o.getAttribute("data-dismissible"),y=o.getAttribute("data-delay"),T=o.getAttribute("data-container"),k='<button type="button" class="close">×</button>',C=f("show","popover"),x=f("shown","popover"),P=f("hide","popover"),S=f("hidden","popover"),B=d(a.container),H=d(T),M=o.closest(".modal"),L=o.closest(".fixed-top"),I=o.closest(".fixed-bottom"),z.template=a.template?a.template:null,z.trigger=a.trigger?a.trigger:c||"hover",z.animation=a.animation&&"fade"!==a.animation?a.animation:g||"fade",z.placement=a.placement?a.placement:h||"top",z.delay=parseInt(a.delay||y)||200,z.dismissible=!(!a.dismissible&&"true"!==b),z.container=B||(H||(L||(I||(M||document.body)))),D="bs-popover-"+z.placement;var t=q();l=t[0],((r=t[1])||z.template)&&(o.Popover||j(n),o.Popover=X)}),"BSN.Popover")}function H(o,a){a=a||{};var l,r,c,s,g,h=this,v={};function b(){var n;n=s.getElementsByTagName("A"),l.length!==n.length&&(l.items=[],l.targets=[],Array.from(n).map((function(t){var e=t.getAttribute("href"),n=e&&"#"===e.charAt(0)&&"#"!==e.slice(-1)&&d(e);n&&(l.items.push(t),l.targets.push(n))})),l.length=n.length),l.scrollOffset=l.isWindow?x().y:o.scrollTop,l.items.map((function(n,i){return function(n){var i=l.items[n],a=l.targets[n],r=t(i,"dropdown-item")&&i.closest(".dropdown-menu"),c=r&&r.previousElementSibling,s=i.nextElementSibling,d=s&&s.getElementsByClassName("active").length,u=l.isWindow&&a.getBoundingClientRect(),g=t(i,"active")||!1,h=(l.isWindow?u.top+l.scrollOffset:a.offsetTop)-v.offset,b=l.isWindow?u.bottom+l.scrollOffset-v.offset:l.targets[n+1]?l.targets[n+1].offsetTop-v.offset:o.scrollHeight,y=d||l.scrollOffset>=h&&b>l.scrollOffset;if(!g&&y)p(i,"active"),c&&!t(c,"active")&&p(c,"active"),m.call(o,f("activate","scrollspy",l.items[n]));else if(g&&!y)e(i,"active"),c&&t(c,"active")&&!i.parentNode.getElementsByClassName("active").length&&e(c,"active");else if(g&&y||!y&&!g)return}(i)}))}function y(t){t(g,"scroll",h.refresh,A),t(window,"resize",h.refresh,A)}h.refresh=function(){b()},h.dispose=function(){y(i),delete o.ScrollSpy},u((function(){(o=d(o)).ScrollSpy&&o.ScrollSpy.dispose(),r=o.getAttribute("data-target"),c=o.getAttribute("data-offset"),s=d(a.target||r),g=o.offsetHeight<o.scrollHeight?o:window,s&&(v.target=s,v.offset=parseInt(a.offset||c)||10,(l={}).length=0,l.items=[],l.targets=[],l.isWindow=g===window,o.ScrollSpy||y(n),h.refresh(),o.ScrollSpy=h)}),"BSN.ScrollSpy")}function M(o,a){a=a||{};var r,c,g,h,v,b,y,w,A,T,k,N,C,x,E,P=this,S=!1;function B(){S.style.height="",e(S,"collapsing"),c.isAnimating=!1}function H(){S?C?B():setTimeout((function(){S.style.height=x+"px",S.offsetWidth,s(S,B)}),50):c.isAnimating=!1,v=f("shown","tab",A),m.call(w,v)}function M(){S&&(T.style.float="left",k.style.float="left",N=T.scrollHeight),h=f("show","tab",A),y=f("hidden","tab",w),m.call(w,h),h.defaultPrevented||(p(k,"active"),e(T,"active"),S&&(x=k.scrollHeight,C=x===N,p(S,"collapsing"),S.style.height=N+"px",S.offsetHeight,T.style.float="",k.style.float=""),t(k,"fade")?setTimeout((function(){p(k,"show"),s(k,H)}),20):H(),m.call(A,y))}function L(){var e,n=c.getElementsByClassName("active");return 1!==n.length||t(n[0].parentNode,"dropdown")?n.length>1&&(e=n[n.length-1]):e=n[0],e}function I(){return d(L().getAttribute("href"))}function D(t){t.preventDefault(),w=t.currentTarget,!c.isAnimating&&P.show()}P.show=function(){if(!t(w=w||o,"active")){if(k=d(w.getAttribute("href")),A=L(),T=I(),b=f("hide","tab",w),m.call(A,b),b.defaultPrevented)return;c.isAnimating=!0,e(A,"active"),A.setAttribute("aria-selected","false"),p(w,"active"),w.setAttribute("aria-selected","true"),g&&(t(o.parentNode,"dropdown-menu")?t(g,"active")||p(g,"active"):t(g,"active")&&e(g,"active")),t(T,"fade")?(e(T,"show"),s(T,M)):M()}},P.dispose=function(){i(o,"click",D),delete o.Tab},u((function(){(o=d(o)).Tab&&o.Tab.dispose(),r=o.getAttribute("data-height"),c=o.closest(".nav"),g=c&&d(".dropdown-toggle",c),E=!(!l||!1===a.height||"false"===r),c.isAnimating=!1,o.Tab||n(o,"click",D),E&&(S=I().parentNode),o.Tab=P}),"BSN.Tab")}function L(o,a){a=a||{};var l,r,c,g,h,v,b,y,w=this,A=0,T={};function k(){e(l,"showing"),p(l,"show"),m.call(l,b),T.autohide&&w.hide()}function N(){p(l,"hide"),m.call(l,y)}function C(){e(l,"show"),T.animation?s(l,N):N()}function x(){clearTimeout(A),i(o,"click",w.hide),delete o.Toast}w.show=function(){if(l&&!t(l,"show")){if(m.call(l,h),h.defaultPrevented)return;T.animation&&p(l,"fade"),e(l,"hide"),l.offsetWidth,p(l,"showing"),T.animation?s(l,k):k()}},w.hide=function(e){if(l&&t(l,"show")){if(m.call(l,v),v.defaultPrevented)return;e?C():A=setTimeout(C,T.delay)}},w.dispose=function(){T.animation?s(l,x):x()},u((function(){(o=d(o)).Toast&&o.Toast.dispose(),l=o.closest(".toast"),r=o.getAttribute("data-animation"),c=o.getAttribute("data-autohide"),g=o.getAttribute("data-delay"),h=f("show","toast"),v=f("hide","toast"),b=f("shown","toast"),y=f("hidden","toast"),T.animation=!1===a.animation||"false"===r?0:1,T.autohide=!1===a.autohide||"false"===c?0:1,T.delay=parseInt(a.delay||g)||500,o.Toast||n(o,"click",w.hide),o.Toast=w}),"BSN.Toast")}function I(o,a){a=a||{};var l,r,c,g,h,b,y,T,k,C,x,P,S,B,H,M=this,L=null,I=0,D={};function X(){return o.getAttribute("title")||o.getAttribute("data-title")||o.getAttribute("data-original-title")}function W(t){L&&L.contains(t.target)||t.target===o||o.contains(t.target)||M.hide()}function O(){n(document,v,W,A),n(window,"resize",M.hide,A),m.call(o,y)}function R(){i(document,v,W,A),i(window,"resize",M.hide,A),D.container.removeChild(L),L=null,I=null,m.call(o,k)}function z(t){t(o,N,M.show),t(o,w[0],M.show),t(o,w[1],M.hide)}M.show=function(){clearTimeout(I),I=setTimeout((function(){if(null===L){if(m.call(o,b),b.defaultPrevented)return;!1!==function(){if(l=X()){if(L=document.createElement("div"),D.template){var e=document.createElement("div");e.innerHTML=D.template.trim(),L.className=e.firstChild.className,L.innerHTML=e.firstChild.innerHTML,d(".tooltip-inner",L).innerHTML=l.trim()}else{var n=document.createElement("div");p(n,"arrow"),L.appendChild(n);var i=document.createElement("div");p(i,"tooltip-inner"),L.appendChild(i),i.innerHTML=l}L.style.left="0",L.style.top="0",L.setAttribute("role","tooltip"),!t(L,"tooltip")&&p(L,"tooltip"),!t(L,D.animation)&&p(L,D.animation),!t(L,H)&&p(L,H),D.container.appendChild(L)}}()&&(E(o,L,D.placement,D.container),!t(L,"show")&&p(L,"show"),D.animation?s(L,O):O())}}),20)},M.hide=function(){clearTimeout(I),I=setTimeout((function(){if(L&&t(L,"show")){if(m.call(o,T),T.defaultPrevented)return;e(L,"show"),D.animation?s(L,R):R()}}),D.delay)},M.toggle=function(){L?M.hide():M.show()},M.dispose=function(){z(i),M.hide(),o.setAttribute("title",o.getAttribute("data-original-title")),o.removeAttribute("data-original-title"),delete o.Tooltip},u((function(){(o=d(o)).Tooltip&&o.Tooltip.dispose(),r=o.getAttribute("data-animation"),c=o.getAttribute("data-placement"),g=o.getAttribute("data-delay"),h=o.getAttribute("data-container"),b=f("show","tooltip"),y=f("shown","tooltip"),T=f("hide","tooltip"),k=f("hidden","tooltip"),C=d(a.container),x=d(h),P=o.closest(".modal"),S=o.closest(".fixed-top"),B=o.closest(".fixed-bottom"),D.animation=a.animation&&"fade"!==a.animation?a.animation:r||"fade",D.placement=a.placement?a.placement:c||"top",D.template=a.template?a.template:null,D.delay=parseInt(a.delay||g)||200,D.container=C||(x||(S||(B||(P||document.body)))),H="bs-tooltip-"+D.placement,(l=X())&&(o.Tooltip||(o.setAttribute("data-original-title",l),o.removeAttribute("title"),z(n)),o.Tooltip=M)}),"BSN.Tooltip")}var D={},X=function(t){t=t||document;var e=function(t,e){Array.from(e).map((function(e){return new t(e)}))};for(var n in D)e(D[n][0],t.querySelectorAll(D[n][1]))};D.Alert=[g,'[data-dismiss="alert"]'],D.Button=[h,'[data-toggle="buttons"]'],D.Carousel=[T,'[data-ride="carousel"]'],D.Collapse=[k,'[data-toggle="collapse"]'],D.Dropdown=[P,'[data-toggle="dropdown"]'],D.Modal=[S,'[data-toggle="modal"]'],D.Popover=[B,'[data-toggle="popover"],[data-tip="popover"]'],D.ScrollSpy=[H,'[data-spy="scroll"]'],D.Tab=[M,'[data-toggle="tab"]'],D.Toast=[L,'[data-dismiss="toast"]'],D.Tooltip=[I,'[data-toggle="tooltip"],[data-tip="tooltip"]'],document.body?X():o(document,"DOMContentLoaded",X);var W={Alert:g,Button:h,Carousel:T,Collapse:k,Dropdown:P,Modal:S,Popover:B,ScrollSpy:H,Tab:M,Toast:L,Tooltip:I,initCallback:X,removeDataAPI:function(t){t=t||document;var e=function(t,e){Array.from(e).map((function(e){return e[t].dispose()}))};for(var n in D)e(n,t.querySelectorAll(D[n][1]))},componentsInit:D,Version:"3.0.2"};export default W; |
@@ -1,2 +0,2 @@ | ||
// Native JavaScript for Bootstrap v3.0.1 | 2020 © dnp_theme | MIT-License | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).BSN=e()}(this,(function(){"use strict";function t(t,e){return t.classList.contains(e)}function e(t,e){t.classList.remove(e)}function n(t,e,n,i){i=i||!1,t.addEventListener(e,n,i)}function i(t,e,n,i){i=i||!1,t.removeEventListener(e,n,i)}function o(t,e,o,a){n(t,e,(function n(l){l.target===t&&(o(l),i(t,e,n,a))}),a)}var a="webkitTransition"in document.body.style?"webkitTransitionEnd":"transitionend",l="webkitTransition"in document.body.style||"transition"in document.body.style,r="webkitTransition"in document.body.style?"webkitTransitionDuration":"transitionDuration";function c(t){var e=l?window.getComputedStyle(t)[r]:0;return e="number"!=typeof(e=parseFloat(e))||isNaN(e)?0:1e3*e}function s(t,e){var n=0;c(t)?o(t,a,(function(t){!n&&e(t),n=1})):setTimeout((function(){!n&&e(),n=1}),17)}function d(t,e){var n=e&&e instanceof Element?e:document;return t instanceof Element?t:n.querySelector(t)}function u(t,e){try{t()}catch(t){console.error(e+": "+t)}}function f(t,e,n){var i=new CustomEvent(t+".bs."+e,{cancelable:!0});return i.relatedTarget=n,i}function m(t){this&&this.dispatchEvent(t)}function p(o){var a,l=this,r=f("close","alert"),c=f("closed","alert");function p(t){a=t&&t.target.closest(".alert"),(o=d('[data-dismiss="alert"]',a))&&a&&(o===t.target||o.contains(t.target))&&l.close()}function g(){i(o,"click",p),a.parentNode.removeChild(a),m.call(a,c)}l.close=function(){if(a&&o&&t(a,"show")){if(m.call(a,r),r.defaultPrevented)return;l.dispose(),e(a,"show"),t(a,"fade")?s(a,g):g()}},l.dispose=function(){i(o,"click",p),delete o.Alert},u((function(){o=d(o),a=o.closest(".alert"),o.Alert&&o.Alert.dispose(),o.Alert||n(o,"click",p),l.element=o,o.Alert=l}),"BSN.Alert")}function g(t,e){t.classList.add(e)}function h(o){var a,l=this,r=f("change","button");function c(n){var i,l="LABEL"===n.target.tagName?n.target:n.target.closest("LABEL")?n.target.closest("LABEL"):null;if(i=l&&l.getElementsByTagName("INPUT")[0]){if(m.call(i,r),m.call(o,r),"checkbox"===i.type){if(r.defaultPrevented)return;i.checked?(e(l,"active"),i.getAttribute("checked"),i.removeAttribute("checked"),i.checked=!1):(g(l,"active"),i.getAttribute("checked"),i.setAttribute("checked","checked"),i.checked=!0),o.toggled||(o.toggled=!0)}if("radio"===i.type&&!o.toggled){if(r.defaultPrevented)return;(!i.checked||0===n.screenX&&0==n.screenY)&&(g(l,"active"),g(l,"focus"),i.setAttribute("checked","checked"),i.checked=!0,o.toggled=!0,Array.from(a).map((function(n){var i=n.getElementsByTagName("INPUT")[0];n!==l&&t(n,"active")&&(m.call(i,r),e(n,"active"),i.removeAttribute("checked"),i.checked=!1)})))}setTimeout((function(){o.toggled=!1}),50)}}function s(t){32===(t.which||t.keyCode)&&t.target===document.activeElement&&c(t)}function p(t){32===(t.which||t.keyCode)&&t.preventDefault()}function h(t){var n="focusin"===t.type?g:e;"INPUT"===t.target.tagName&&n(t.target.closest(".btn"),"focus")}function v(t){t(o,"click",c),t(o,"keyup",s),t(o,"keydown",p),t(o,"focusin",h),t(o,"focusout",h)}l.dispose=function(){v(i),delete o.Button},u((function(){(o=d(o)).Button&&o.Button.dispose(),(a=o.getElementsByClassName("btn")).length&&(o.Button||v(n),o.toggled=!1,o.Button=l,Array.from(a).map((function(n){!t(n,"active")&&d("input:checked",n)&&g(n,"active"),t(n,"active")&&!d("input:checked",n)&&e(n,"active")})))}),"BSN.Button")}var v="touchstart",b="touchend",y="touchmove",w="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],A=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});o(document,"DOMContentLoaded",(function(){}),e)}catch(t){}return t}()&&{passive:!0};function T(o,a){a=a||{};var l,r,p,h,T,k,N,C,x=this,E={};function P(){!1===E.interval||t(o,"paused")||(g(o,"paused"),!l.isSliding&&(clearInterval(l.timer),l.timer=null))}function S(){!1!==E.interval&&t(o,"paused")&&(e(o,"paused"),!l.isSliding&&(clearInterval(l.timer),l.timer=null),!l.isSliding&&x.cycle())}function B(e){if(e.preventDefault(),!l.isSliding){var n=e.target;if(!n||t(n,"active")||!n.getAttribute("data-slide-to"))return!1;l.index=parseInt(n.getAttribute("data-slide-to"),10),x.slideTo(l.index)}}function M(t){if(t.preventDefault(),!l.isSliding){var e=t.currentTarget||t.srcElement;e===k?l.index++:e===T&&l.index--,x.slideTo(l.index)}}function L(t){var e=t.which;if(!l.isSliding){switch(e){case 39:l.index++;break;case 37:l.index--;break;default:return}x.slideTo(l.index)}}function H(t){E.pause&&E.interval&&(t(o,w[0],P),t(o,w[1],S),t(o,v,P,A),t(o,b,S,A)),h.length>1&&t(o,v,D,A),k&&t(k,"click",M),T&&t(T,"click",M),N&&t(N,"click",B),E.keyboard&&t(window,"keydown",L)}function I(t){t(o,y,X,A),t(o,b,W,A)}function D(t){l.isTouch||(l.touchPosition.startX=t.changedTouches[0].pageX,o.contains(t.target)&&(l.isTouch=!0,I(n)))}function X(t){if(l.isTouch)return l.touchPosition.currentX=t.changedTouches[0].pageX,"touchmove"===t.type&&t.changedTouches.length>1?(t.preventDefault(),!1):void 0;t.preventDefault()}function W(t){if(l.isTouch&&!l.isSliding&&(l.touchPosition.endX=l.touchPosition.currentX||t.changedTouches[0].pageX,l.isTouch)){if((!o.contains(t.target)||!o.contains(t.relatedTarget))&&Math.abs(l.touchPosition.startX-l.touchPosition.endX)<75)return!1;l.touchPosition.currentX<l.touchPosition.startX?l.index++:l.touchPosition.currentX>l.touchPosition.startX&&l.index--,l.isTouch=!1,x.slideTo(l.index),I(i)}}function O(t){Array.from(C).map((function(t){e(t,"active")})),C[t]&&g(C[t],"active")}function R(n){if(l.touchPosition){var i=l.index,a=n&&n.target!==h[i]?1e3*n.elapsedTime+100:20,r=x.getActiveIndex(),c="left"===l.direction?"next":"prev";l.isSliding&&setTimeout((function(){l.touchPosition&&(l.isSliding=!1,g(h[i],"active"),e(h[r],"active"),e(h[i],"carousel-item-"+c),e(h[i],"carousel-item-"+l.direction),e(h[r],"carousel-item-"+l.direction),m.call(o,p),document.hidden||!E.interval||t(o,"paused")||x.cycle())}),a)}}x.cycle=function(){l.timer&&(clearInterval(l.timer),l.timer=null),l.timer=setInterval((function(){var t=l.index||x.getActiveIndex();(function(t){var e=t.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;return e.top<=n&&e.bottom>=0})(o)&&(t++,x.slideTo(t))}),E.interval)},x.slideTo=function(n){if(!l.isSliding){var i,a=x.getActiveIndex();a!==n&&(a<n||0===a&&n===h.length-1?l.direction="left":(a>n||a===h.length-1&&0===n)&&(l.direction="right"),n<0?n=h.length-1:n>=h.length&&(n=0),i="left"===l.direction?"next":"prev",r=f("slide","carousel",h[n]),p=f("slid","carousel",h[n]),m.call(o,r),r.defaultPrevented||(l.index=n,l.isSliding=!0,clearInterval(l.timer),l.timer=null,O(n),c(h[n])&&t(o,"slide")?(g(h[n],"carousel-item-"+i),h[n].offsetWidth,g(h[n],"carousel-item-"+l.direction),g(h[a],"carousel-item-"+l.direction),s(h[n],R)):(g(h[n],"active"),h[n].offsetWidth,e(h[a],"active"),setTimeout((function(){l.isSliding=!1,E.interval&&o&&!t(o,"paused")&&x.cycle(),m.call(o,p)}),100))))}},x.getActiveIndex=function(){return Array.from(h).indexOf(o.getElementsByClassName("carousel-item active")[0])||0},x.dispose=function(){var n=["left","right","prev","next"];Array.from(h).map((function(i,o){t(i,"active")&&O(o),n.map((function(t){return e(i,"carousel-item-"+t)}))})),clearInterval(l.timer),H(i),l={},delete o.Carousel},(l={}).direction="left",l.index=0,l.timer=null,l.isSliding=!1,l.isTouch=!1,l.touchPosition={startX:0,currentX:0,endX:0},u((function(){(o=d(o)).Carousel&&o.Carousel.dispose();var t=o.getAttribute("data-interval"),e=a.interval,i="false"===t?0:parseInt(t),l="hover"===o.getAttribute("data-pause")||!1,r="true"===o.getAttribute("data-keyboard")||!1;h=o.getElementsByClassName("carousel-item"),T=o.getElementsByClassName("carousel-control-prev")[0],k=o.getElementsByClassName("carousel-control-next")[0],N=o.getElementsByClassName("carousel-indicators")[0],C=N&&N.getElementsByTagName("LI")||[],E.keyboard=!0===a.keyboard||r,E.pause=!("hover"!==a.pause&&!l)&&"hover",E.interval="number"==typeof e?e:!1===e||0===i||!1===i?0:isNaN(i)?5e3:i,h.length<2||(o.Carousel||H(n),x.getActiveIndex()<0&&(h.length&&g(h[0],"active"),C.length&&O(0)),E.interval&&x.cycle(),o.Carousel=x)}),"BSN.Carousel")}function k(o,a){a=a||{};var l,r,c,p,h,v,b=this,y=null,w=null;function A(t,n){m.call(t,h),h.defaultPrevented||(t.isAnimating=!0,t.style.height=t.scrollHeight+"px",e(t,"collapse"),e(t,"show"),g(t,"collapsing"),t.offsetWidth,t.style.height="0px",s(t,(function(){t.isAnimating=!1,t.setAttribute("aria-expanded","false"),n.setAttribute("aria-expanded","false"),e(t,"collapsing"),g(t,"collapse"),t.style.height="",m.call(t,v)})))}b.toggle=function(e){(e&&"A"===e.target.tagName||"A"===o.tagName)&&e.preventDefault(),(o.contains(e.target)||e.target===o)&&(t(w,"show")?b.hide():b.show())},b.hide=function(){w.isAnimating||(A(w,o),g(o,"collapsed"))},b.show=function(){var t,n;y&&(l=y.getElementsByClassName("collapse show")[0],r=l&&(d('[data-target="#'+l.id+'"]',y)||d('[href="#'+l.id+'"]',y))),w.isAnimating||(r&&l!==w&&(A(l,r),g(r,"collapsed")),t=w,n=o,m.call(t,c),c.defaultPrevented||(t.isAnimating=!0,g(t,"collapsing"),e(t,"collapse"),t.style.height=t.scrollHeight+"px",s(t,(function(){t.isAnimating=!1,t.setAttribute("aria-expanded","true"),n.setAttribute("aria-expanded","true"),e(t,"collapsing"),g(t,"collapse"),g(t,"show"),t.style.height="",m.call(t,p)}))),e(o,"collapsed"))},b.dispose=function(){i(o,"click",b.toggle),delete o.Collapse},u((function(){(o=d(o)).Collapse&&o.Collapse.dispose();var t=o.getAttribute("data-parent");c=f("show","collapse"),p=f("shown","collapse"),h=f("hide","collapse"),v=f("hidden","collapse"),(w=d(a.target||o.getAttribute("data-target")||o.getAttribute("href"))).isAnimating=!1,y=o.closest(a.parent||t),o.Collapse||n(o,"click",b.toggle),o.Collapse=b}),"BSN.Collapse")}var N="mousedown";"webkitPerspective"in document.body.style||document.body.style,"webkitTransform"in document.body.style||document.body.style;function C(t){t.focus?t.focus():t.setActive()}function x(){return{y:window.pageYOffset||document.documentElement.scrollTop,x:window.pageXOffset||document.documentElement.scrollLeft}}function E(e,n,i,o){var a,l,r,c,s,u,f=n.offsetWidth,m=n.offsetHeight,p=document.documentElement.clientWidth||document.body.clientWidth,g=document.documentElement.clientHeight||document.body.clientHeight,h=e.getBoundingClientRect(),v=o===document.body?x():{x:o.offsetLeft+o.scrollLeft,y:o.offsetTop+o.scrollTop},b=h.right-h.left,y=h.bottom-h.top,w=t(n,"popover"),A=d(".arrow",n),T=h.top+y/2-m/2<0,k=h.left+b/2-f/2<0,N=h.left+f/2+b/2>=p,C=h.top+m/2+y/2>=g,E=h.top-m<0,P=h.left-f<0,S=h.top+m+y>=g,B=h.left+f+b>=p;i="right"===(i="left"===(i="bottom"===(i="top"===(i=("left"===i||"right"===i)&&P&&B?"top":i)&&E?"bottom":i)&&S?"top":i)&&P?"right":i)&&B?"left":i,-1===n.className.indexOf(i)&&(n.className=n.className.replace(/\b(top|bottom|left|right)+/,i)),s=A.offsetWidth,u=A.offsetHeight,"left"===i||"right"===i?(l="left"===i?h.left+v.x-f-(w?s:0):h.left+v.x+b,T?(a=h.top+v.y,r=y/2-s):C?(a=h.top+v.y-m+y,r=m-y/2-s):(a=h.top+v.y-m/2+y/2,r=m/2-(w?.9*u:u/2))):"top"!==i&&"bottom"!==i||(a="top"===i?h.top+v.y-m-(w?u:0):h.top+v.y+y,k?(l=0,c=h.left+b/2-s):N?(l=p-1.01*f,c=f-(p-h.left)+b/2-s/2):(l=h.left+v.x-f/2+b/2,c=f/2-(w?s:s/2))),n.style.top=a+"px",n.style.left=l+"px",r&&(A.style.top=r+"px"),c&&(A.style.left=c+"px")}function P(o,a){var l,r,c,s,p,h,v,b=this,y=null,w=[];function A(t){(t.href&&"#"===t.href.slice(-1)||t.parentNode&&t.parentNode.href&&"#"===t.parentNode.href.slice(-1))&&this.preventDefault()}function T(){var t=o.open?n:i;t(document,"click",k),t(document,"keydown",x),t(document,"keyup",E),t(document,"focus",k,!0)}function k(t){var e=t.target,n=e&&(e.getAttribute("data-toggle")||e.parentNode&&e.parentNode.getAttribute&&e.parentNode.getAttribute("data-toggle"));("focus"!==t.type||e!==o&&e!==h&&!h.contains(e))&&(e!==h&&!h.contains(e)||!v&&!n)&&(y=e===o||o.contains(e)?o:null,b.hide(),A.call(t,e))}function N(t){y=o,b.show(),A.call(t,t.target)}function x(t){var e=t.which||t.keyCode;38!==e&&40!==e||t.preventDefault()}function E(t){var e=t.which,n=t.keyCode,i=e||n,a=document.activeElement,l=a===o,r=h.contains(a),c=a.parentNode===h||a.parentNode.parentNode===h,s=w.indexOf(a);c&&(s=l?0:38===i?s>1?s-1:0:40===i&&s<w.length-1?s+1:s,w[s]&&C(w[s])),(w.length&&c||!w.length&&(r||l)||!r)&&o.open&&27===i&&(b.toggle(),y=null)}b.show=function(){l=f("show","dropdown",y),m.call(p,l),l.defaultPrevented||(g(h,"show"),g(p,"show"),o.setAttribute("aria-expanded",!0),o.open=!0,i(o,"click",N),setTimeout((function(){C(h.getElementsByTagName("INPUT")[0]||o),T(),r=f("shown","dropdown",y),m.call(p,r)}),1))},b.hide=function(){c=f("hide","dropdown",y),m.call(p,c),c.defaultPrevented||(e(h,"show"),e(p,"show"),o.setAttribute("aria-expanded",!1),o.open=!1,T(),C(o),setTimeout((function(){o.Dropdown&&n(o,"click",N)}),1),s=f("hidden","dropdown",y),m.call(p,s))},b.toggle=function(){t(p,"show")&&o.open?b.hide():b.show()},b.dispose=function(){t(p,"show")&&o.open&&b.hide(),i(o,"click",N),delete o.Dropdown},u((function(){(o=d(o)).Dropdown&&o.Dropdown.dispose(),p=o.parentNode,h=d(".dropdown-menu",p),Array.from(h.children).map((function(t){t.children.length&&"A"===t.children[0].tagName&&w.push(t.children[0]),"A"===t.tagName&&w.push(t)})),o.Dropdown||(!("tabindex"in h)&&h.setAttribute("tabindex","0"),n(o,"click",N)),v=!0===a||"true"===o.getAttribute("data-persist")||!1,o.open=!1,o.Dropdown=b}),"BSN.Dropdown")}function S(o,a){a=a||{};var l,r,p,h,v,b,y,w,T,k=this,N=null,x={};function E(){var e,n=t(document.body,"modal-open"),i=parseInt(getComputedStyle(document.body).paddingRight),o=l.clientHeight!==l.scrollHeight;l.style.paddingRight=!o&&b?b+"px":"",document.body.style.paddingRight=i+(n?0:b)+"px",T.length&&T.map((function(t){e=getComputedStyle(t).paddingRight,t.style.paddingRight=parseInt(e)+(n?0:b)+"px"}))}function P(){var t,e;(e=document.createElement("div")).className="modal-scrollbar-measure",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e),b=t}function S(){(y=d(".modal-backdrop"))&&!document.getElementsByClassName("modal show")[0]&&(document.body.removeChild(y),y=null),null===y&&(e(document.body,"modal-open"),document.body.style.paddingRight="",l.style.paddingRight="",T.length&&T.map((function(t){t.style.paddingRight=""})))}function B(t){t(window,"resize",k.update,A),t(l,"click",X),t(document,"keydown",D)}function M(){l.style.display="block",P(),E(),!document.getElementsByClassName("modal show")[0]&&g(document.body,"modal-open"),g(l,"show"),l.setAttribute("aria-hidden",!1),t(l,"fade")?s(l,L):L()}function L(){C(l),l.isAnimating=!1,B(n),p=f("shown","modal",N),m.call(l,p)}function H(n){l.style.display="",o&&C(o),y=d(".modal-backdrop"),1!==n&&y&&t(y,"show")&&!document.getElementsByClassName("modal show")[0]?(e(y,"show"),s(y,S)):S(),B(i),l.isAnimating=!1,v=f("hidden","modal"),m.call(l,v)}function I(e){if(!l.isAnimating){var n=e.target,i="#"+l.getAttribute("id"),a=n.getAttribute("data-target")||n.getAttribute("href"),r=o.getAttribute("data-target")||o.getAttribute("href");!t(l,"show")&&(n===o&&a===i||o.contains(n)&&r===i)&&(l.modalTrigger=o,N=o,k.show(),e.preventDefault())}}function D(e){var n=e.which;!l.isAnimating&&x.keyboard&&27==n&&t(l,"show")&&k.hide()}function X(e){if(!l.isAnimating){var n=e.target,i="modal"===n.getAttribute("data-dismiss"),o=n.closest('[data-dismiss="modal"]');t(l,"show")&&(o||i||n===l&&"static"!==x.backdrop)&&(k.hide(),N=null,e.preventDefault())}}k.toggle=function(){t(l,"show")?k.hide():k.show()},k.show=function(){if(!(t(l,"show")&&l.isAnimating||(r=f("show","modal",N),m.call(l,r),r.defaultPrevented))){l.isAnimating=!0;var e,n=document.getElementsByClassName("modal show")[0];n&&n!==l&&(n.modalTrigger&&n.modalTrigger.Modal.hide(),n.Modal&&n.Modal.hide()),x.backdrop&&(e=document.createElement("div"),null===(y=d(".modal-backdrop"))&&(e.setAttribute("class","modal-backdrop"+(x.animation?" fade":"")),y=e,document.body.appendChild(y)),y=y),!y||n||t(y,"show")||(y.offsetWidth,w=c(y),g(y,"show")),n?M():setTimeout(M,y&&w?w:0)}},k.hide=function(n){t(l,"show")&&(h=f("hide","modal"),m.call(l,h),h.defaultPrevented||(l.isAnimating=!0,e(l,"show"),l.setAttribute("aria-hidden",!0),t(l,"fade")&&1!==n?s(l,H):H()))},k.setContent=function(t){d(".modal-content",l).innerHTML=t},k.update=function(){t(l,"show")&&(P(),E())},k.dispose=function(){k.hide(1),o?(i(o,"click",I),delete o.Modal):delete l.Modal},u((function(){o=d(o);var e=d(o.getAttribute("data-target")||o.getAttribute("href"));l=t(o,"modal")?o:e,T=Array.from(document.getElementsByClassName("fixed-top")).concat(Array.from(document.getElementsByClassName("fixed-bottom"))),t(o,"modal")&&(o=null),o&&o.Modal&&o.Modal.dispose(),l&&l.Modal&&l.Modal.dispose(),x.keyboard=!1!==a.keyboard&&"false"!==l.getAttribute("data-keyboard"),x.backdrop="static"!==a.backdrop&&"static"!==l.getAttribute("data-backdrop")||"static",x.backdrop=!1!==a.backdrop&&"false"!==l.getAttribute("data-backdrop")&&x.backdrop,x.animation=!!t(l,"fade"),x.content=a.content,l.isAnimating=!1,o&&!o.Modal&&n(o,"click",I),x.content&&k.setContent(x.content.trim()),o?(l.modalTrigger=o,o.Modal=k):l.Modal=k}),"BSN.Modal")}function B(o,a){a=a||{};var l,r,c,p,h,b,y,T,k,C,x,P,S,B,M,L,H,I,D,X=this,W=null,O=0,R=/(iPhone|iPod|iPad)/.test(navigator.userAgent),z={};function U(t){null!==W&&t.target===d(".close",W)&&X.hide()}function q(){return{0:a.title||o.getAttribute("data-title")||null,1:a.content||o.getAttribute("data-content")||null}}function j(){null===W&&o.focus()}function Y(t){"hover"===z.trigger?(t(o,N,X.show),t(o,w[0],X.show),z.dismissible||t(o,w[1],X.hide)):"click"==z.trigger?t(o,z.trigger,X.toggle):"focus"==z.trigger&&(R&&t(o,"click",j),t(o,z.trigger,X.toggle))}function F(t){W&&W.contains(t.target)||t.target===o||o.contains(t.target)||X.hide()}function V(t){z.dismissible?t(document,"click",U):("focus"==z.trigger&&t(o,"blur",X.hide),"hover"==z.trigger&&t(document,v,F,A)),t(window,"resize",X.hide,A)}function G(){V(n),m.call(o,x)}function J(){V(i),z.container.removeChild(W),O=null,W=null,m.call(o,S)}X.toggle=function(){null===W?X.show():X.hide()},X.show=function(){clearTimeout(O),O=setTimeout((function(){if(null===W){if(m.call(o,C),C.defaultPrevented)return;!function(){l=q()[0]||null,r=(r=q()[1])?r.trim():null,W=document.createElement("div");var e=document.createElement("div");if(g(e,"arrow"),W.appendChild(e),null!==r&&null===z.template){if(W.setAttribute("role","tooltip"),null!==l){var n=document.createElement("h3");g(n,"popover-header"),n.innerHTML=z.dismissible?l+k:l,W.appendChild(n)}var i=document.createElement("div");g(i,"popover-body"),i.innerHTML=z.dismissible&&null===l?r+k:r,W.appendChild(i)}else{var o=document.createElement("div");o.innerHTML=z.template.trim(),W.className=o.firstChild.className,W.innerHTML=o.firstChild.innerHTML;var a=d(".popover-header",W),c=d(".popover-body",W);l&&a&&(a.innerHTML=l.trim()),r&&c&&(c.innerHTML=r.trim())}z.container.appendChild(W),W.style.display="block",!t(W,"popover")&&g(W,"popover"),!t(W,z.animation)&&g(W,z.animation),!t(W,D)&&g(W,D)}(),E(o,W,z.placement,z.container),!t(W,"show")&&g(W,"show"),z.animation?s(W,G):G()}}),20)},X.hide=function(){clearTimeout(O),O=setTimeout((function(){if(W&&null!==W&&t(W,"show")){if(m.call(o,P),P.defaultPrevented)return;e(W,"show"),z.animation?s(W,J):J()}}),z.delay)},X.dispose=function(){X.hide(),Y(i),delete o.Popover},u((function(){(o=d(o)).Popover&&o.Popover.dispose(),c=o.getAttribute("data-trigger"),p=o.getAttribute("data-animation"),h=o.getAttribute("data-placement"),b=o.getAttribute("data-dismissible"),y=o.getAttribute("data-delay"),T=o.getAttribute("data-container"),k='<button type="button" class="close">×</button>',C=f("show","popover"),x=f("shown","popover"),P=f("hide","popover"),S=f("hidden","popover"),B=d(a.container),M=d(T),L=o.closest(".modal"),H=o.closest(".fixed-top"),I=o.closest(".fixed-bottom"),z.template=a.template?a.template:null,z.trigger=a.trigger?a.trigger:c||"hover",z.animation=a.animation&&"fade"!==a.animation?a.animation:p||"fade",z.placement=a.placement?a.placement:h||"top",z.delay=parseInt(a.delay||y)||200,z.dismissible=!(!a.dismissible&&"true"!==b),z.container=B||(M||(H||(I||(L||document.body)))),D="bs-popover-"+z.placement;var t=q();l=t[0],((r=t[1])||z.template)&&(o.Popover||Y(n),o.Popover=X)}),"BSN.Popover")}function M(o,a){a=a||{};var l,r,c,s,p,h=this,v={};function b(){var n;n=s.getElementsByTagName("A"),l.length!==n.length&&(l.items=[],l.targets=[],Array.from(n).map((function(t){var e=t.getAttribute("href"),n=e&&"#"===e.charAt(0)&&"#"!==e.slice(-1)&&d(e);n&&(l.items.push(t),l.targets.push(n))})),l.length=n.length),l.scrollOffset=l.isWindow?x().y:o.scrollTop,l.items.map((function(n,i){return function(n){var i=l.items[n],a=l.targets[n],r=t(i,"dropdown-item")&&i.closest(".dropdown-menu"),c=r&&r.previousElementSibling,s=i.nextElementSibling,d=s&&s.getElementsByClassName("active").length,u=l.isWindow&&a.getBoundingClientRect(),p=t(i,"active")||!1,h=(l.isWindow?u.top+l.scrollOffset:a.offsetTop)-v.offset,b=l.isWindow?u.bottom+l.scrollOffset-v.offset:l.targets[n+1]?l.targets[n+1].offsetTop-v.offset:o.scrollHeight,y=d||l.scrollOffset>=h&&b>l.scrollOffset;if(!p&&y)g(i,"active"),c&&!t(c,"active")&&g(c,"active"),m.call(o,f("activate","scrollspy",l.items[n]));else if(p&&!y)e(i,"active"),c&&t(c,"active")&&!i.parentNode.getElementsByClassName("active").length&&e(c,"active");else if(p&&y||!y&&!p)return}(i)}))}function y(t){t(p,"scroll",h.refresh,A),t(window,"resize",h.refresh,A)}h.refresh=function(){b()},h.dispose=function(){y(i),delete o.ScrollSpy},u((function(){(o=d(o)).ScrollSpy&&o.ScrollSpy.dispose(),r=o.getAttribute("data-target"),c=o.getAttribute("data-offset"),s=d(a.target||r),p=o.offsetHeight<o.scrollHeight?o:window,s&&(v.target=s,v.offset=parseInt(a.offset||c)||10,(l={}).length=0,l.items=[],l.targets=[],l.isWindow=p===window,o.ScrollSpy||y(n),h.refresh(),o.ScrollSpy=h)}),"BSN.ScrollSpy")}function L(o,a){a=a||{};var r,c,p,h,v,b,y,w,A,T,k,N,C,x,E,P=this,S=!1;function B(){S.style.height="",e(S,"collapsing"),c.isAnimating=!1}function M(){S?C?B():setTimeout((function(){S.style.height=x+"px",S.offsetWidth,s(S,B)}),50):c.isAnimating=!1,v=f("shown","tab",A),m.call(w,v)}function L(){S&&(T.style.float="left",k.style.float="left",N=T.scrollHeight),h=f("show","tab",A),y=f("hidden","tab",w),m.call(w,h),h.defaultPrevented||(g(k,"active"),e(T,"active"),S&&(x=k.scrollHeight,C=x===N,g(S,"collapsing"),S.style.height=N+"px",S.offsetHeight,T.style.float="",k.style.float=""),t(k,"fade")?setTimeout((function(){g(k,"show"),s(k,M)}),20):M(),m.call(A,y))}function H(){var e,n=c.getElementsByClassName("active");return 1!==n.length||t(n[0].parentNode,"dropdown")?n.length>1&&(e=n[n.length-1]):e=n[0],e}function I(){return d(H().getAttribute("href"))}function D(t){t.preventDefault(),w=t.currentTarget,!c.isAnimating&&P.show()}P.show=function(){if(!t(w=w||o,"active")){if(k=d(w.getAttribute("href")),A=H(),T=I(),b=f("hide","tab",w),m.call(A,b),b.defaultPrevented)return;c.isAnimating=!0,e(A,"active"),A.setAttribute("aria-selected","false"),g(w,"active"),w.setAttribute("aria-selected","true"),p&&(t(o.parentNode,"dropdown-menu")?t(p,"active")||g(p,"active"):t(p,"active")&&e(p,"active")),t(T,"fade")?(e(T,"show"),s(T,L)):L()}},P.dispose=function(){i(o,"click",D),delete o.Tab},u((function(){(o=d(o)).Tab&&o.Tab.dispose(),r=o.getAttribute("data-height"),c=o.closest(".nav"),p=c&&d(".dropdown-toggle",c),E=!(!l||!1===a.height||"false"===r),c.isAnimating=!1,o.Tab||n(o,"click",D),E&&(S=I().parentNode),o.Tab=P}),"BSN.Tab")}function H(o,a){a=a||{};var l,r,c,p,h,v,b,y,w=this,A=0,T={};function k(){e(l,"showing"),g(l,"show"),m.call(l,b),T.autohide&&w.hide()}function N(){g(l,"hide"),m.call(l,y)}function C(){e(l,"show"),T.animation?s(l,N):N()}function x(){clearTimeout(A),i(o,"click",w.hide),delete o.Toast}w.show=function(){if(l&&!t(l,"show")){if(m.call(l,h),h.defaultPrevented)return;T.animation&&g(l,"fade"),e(l,"hide"),l.offsetWidth,g(l,"showing"),T.animation?s(l,k):k()}},w.hide=function(e){if(l&&t(l,"show")){if(m.call(l,v),v.defaultPrevented)return;e?C():A=setTimeout(C,T.delay)}},w.dispose=function(){T.animation?s(l,x):x()},u((function(){(o=d(o)).Toast&&o.Toast.dispose(),l=o.closest(".toast"),r=o.getAttribute("data-animation"),c=o.getAttribute("data-autohide"),p=o.getAttribute("data-delay"),h=f("show","toast"),v=f("hide","toast"),b=f("shown","toast"),y=f("hidden","toast"),T.animation=!1===a.animation||"false"===r?0:1,T.autohide=!1===a.autohide||"false"===c?0:1,T.delay=parseInt(a.delay||p)||500,o.Toast||n(o,"click",w.hide),o.Toast=w}),"BSN.Toast")}function I(o,a){a=a||{};var l,r,c,p,h,b,y,T,k,C,x,P,S,B,M,L=this,H=null,I=0,D={};function X(){return o.getAttribute("title")||o.getAttribute("data-title")||o.getAttribute("data-original-title")}function W(t){H&&H.contains(t.target)||t.target===o||o.contains(t.target)||L.hide()}function O(){n(document,v,W,A),n(window,"resize",L.hide,A),m.call(o,y)}function R(){i(document,v,W,A),i(window,"resize",L.hide,A),D.container.removeChild(H),H=null,I=null,m.call(o,k)}function z(t){t(o,N,L.show),t(o,w[0],L.show),t(o,w[1],L.hide)}L.show=function(){clearTimeout(I),I=setTimeout((function(){if(null===H){if(m.call(o,b),b.defaultPrevented)return;!1!==function(){if(l=X()){if(H=document.createElement("div"),D.template){var e=document.createElement("div");e.innerHTML=D.template.trim(),H.className=e.firstChild.className,H.innerHTML=e.firstChild.innerHTML,d(".tooltip-inner",H).innerHTML=l.trim()}else{var n=document.createElement("div");g(n,"arrow"),H.appendChild(n);var i=document.createElement("div");g(i,"tooltip-inner"),H.appendChild(i),i.innerHTML=l}H.style.left="0",H.style.top="0",H.setAttribute("role","tooltip"),!t(H,"tooltip")&&g(H,"tooltip"),!t(H,D.animation)&&g(H,D.animation),!t(H,M)&&g(H,M),D.container.appendChild(H)}}()&&(E(o,H,D.placement,D.container),!t(H,"show")&&g(H,"show"),D.animation?s(H,O):O())}}),20)},L.hide=function(){clearTimeout(I),I=setTimeout((function(){if(H&&t(H,"show")){if(m.call(o,T),T.defaultPrevented)return;e(H,"show"),D.animation?s(H,R):R()}}),D.delay)},L.toggle=function(){H?L.hide():L.show()},L.dispose=function(){z(i),L.hide(),o.setAttribute("title",o.getAttribute("data-original-title")),o.removeAttribute("data-original-title"),delete o.Tooltip},u((function(){(o=d(o)).Tooltip&&o.Tooltip.dispose(),r=o.getAttribute("data-animation"),c=o.getAttribute("data-placement"),p=o.getAttribute("data-delay"),h=o.getAttribute("data-container"),b=f("show","tooltip"),y=f("shown","tooltip"),T=f("hide","tooltip"),k=f("hidden","tooltip"),C=d(a.container),x=d(h),P=o.closest(".modal"),S=o.closest(".fixed-top"),B=o.closest(".fixed-bottom"),D.animation=a.animation&&"fade"!==a.animation?a.animation:r||"fade",D.placement=a.placement?a.placement:c||"top",D.template=a.template?a.template:null,D.delay=parseInt(a.delay||p)||200,D.container=C||(x||(S||(B||(P||document.body)))),M="bs-tooltip-"+D.placement,(l=X())&&(o.Tooltip||(o.setAttribute("data-original-title",l),o.removeAttribute("title"),z(n)),o.Tooltip=L)}),"BSN.Tooltip")}var D={},X=function(t){t=t||document;var e=function(t,e){Array.from(e).map((function(e){return new t(e)}))};for(var n in D)e(D[n][0],t.querySelectorAll(D[n][1]))};D.Alert=[p,'[data-dismiss="alert"]'],D.Button=[h,'[data-toggle="buttons"]'],D.Carousel=[T,'[data-ride="carousel"]'],D.Collapse=[k,'[data-toggle="collapse"]'],D.Dropdown=[P,'[data-toggle="dropdown"]'],D.Modal=[S,'[data-toggle="modal"]'],D.Popover=[B,'[data-toggle="popover"],[data-tip="popover"]'],D.ScrollSpy=[M,'[data-spy="scroll"]'],D.Tab=[L,'[data-toggle="tab"]'],D.Toast=[H,'[data-dismiss="toast"]'],D.Tooltip=[I,'[data-toggle="tooltip"],[data-tip="tooltip"]'],document.body?X():o(document,"DOMContentLoaded",X);return{Alert:p,Button:h,Carousel:T,Collapse:k,Dropdown:P,Modal:S,Popover:B,ScrollSpy:M,Tab:L,Toast:H,Tooltip:I,initCallback:X,removeDataAPI:function(t){t=t||document;var e=function(t,e){Array.from(e).map((function(e){return e[t].dispose()}))};for(var n in D)e(n,t.querySelectorAll(D[n][1]))},componentsInit:D,Version:"3.0.1"}})); | ||
// Native JavaScript for Bootstrap v3.0.2 | 2020 © dnp_theme | MIT-License | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).BSN=e()}(this,(function(){"use strict";function t(t,e){return t.classList.contains(e)}function e(t,e){t.classList.remove(e)}function n(t,e,n,i){i=i||!1,t.addEventListener(e,n,i)}function i(t,e,n,i){i=i||!1,t.removeEventListener(e,n,i)}function o(t,e,o,a){n(t,e,(function n(l){l.target===t&&(o(l),i(t,e,n,a))}),a)}var a="webkitTransition"in document.body.style?"webkitTransitionEnd":"transitionend",l="webkitTransition"in document.body.style||"transition"in document.body.style,r="webkitTransition"in document.body.style?"webkitTransitionDuration":"transitionDuration";function c(t){var e=l?window.getComputedStyle(t)[r]:0;return e="number"!=typeof(e=parseFloat(e))||isNaN(e)?0:1e3*e}function s(t,e){var n=0;c(t)?o(t,a,(function(t){!n&&e(t),n=1})):setTimeout((function(){!n&&e(),n=1}),17)}function d(t,e){var n=e&&e instanceof Element?e:document;return t instanceof Element?t:n.querySelector(t)}function u(t,e){try{t()}catch(t){console.error(e+": "+t)}}function f(t,e,n){var i=new CustomEvent(t+".bs."+e,{cancelable:!0});return i.relatedTarget=n,i}function m(t){this&&this.dispatchEvent(t)}function p(o){var a,l=this,r=f("close","alert"),c=f("closed","alert");function p(t){a=t&&t.target.closest(".alert"),(o=d('[data-dismiss="alert"]',a))&&a&&(o===t.target||o.contains(t.target))&&l.close()}function g(){i(o,"click",p),a.parentNode.removeChild(a),m.call(a,c)}l.close=function(){if(a&&o&&t(a,"show")){if(m.call(a,r),r.defaultPrevented)return;l.dispose(),e(a,"show"),t(a,"fade")?s(a,g):g()}},l.dispose=function(){i(o,"click",p),delete o.Alert},u((function(){o=d(o),a=o.closest(".alert"),o.Alert&&o.Alert.dispose(),o.Alert||n(o,"click",p),l.element=o,o.Alert=l}),"BSN.Alert")}function g(t,e){t.classList.add(e)}function h(o){var a,l=this,r=f("change","button");function c(n){var i,l="LABEL"===n.target.tagName?n.target:n.target.closest("LABEL")?n.target.closest("LABEL"):null;if(i=l&&l.getElementsByTagName("INPUT")[0]){if(m.call(i,r),m.call(o,r),"checkbox"===i.type){if(r.defaultPrevented)return;i.checked?(e(l,"active"),i.getAttribute("checked"),i.removeAttribute("checked"),i.checked=!1):(g(l,"active"),i.getAttribute("checked"),i.setAttribute("checked","checked"),i.checked=!0),o.toggled||(o.toggled=!0)}if("radio"===i.type&&!o.toggled){if(r.defaultPrevented)return;(!i.checked||0===n.screenX&&0==n.screenY)&&(g(l,"active"),g(l,"focus"),i.setAttribute("checked","checked"),i.checked=!0,o.toggled=!0,Array.from(a).map((function(n){var i=n.getElementsByTagName("INPUT")[0];n!==l&&t(n,"active")&&(m.call(i,r),e(n,"active"),i.removeAttribute("checked"),i.checked=!1)})))}setTimeout((function(){o.toggled=!1}),50)}}function s(t){32===(t.which||t.keyCode)&&t.target===document.activeElement&&c(t)}function p(t){32===(t.which||t.keyCode)&&t.preventDefault()}function h(t){var n="focusin"===t.type?g:e;"INPUT"===t.target.tagName&&n(t.target.closest(".btn"),"focus")}function v(t){t(o,"click",c),t(o,"keyup",s),t(o,"keydown",p),t(o,"focusin",h),t(o,"focusout",h)}l.dispose=function(){v(i),delete o.Button},u((function(){(o=d(o)).Button&&o.Button.dispose(),(a=o.getElementsByClassName("btn")).length&&(o.Button||v(n),o.toggled=!1,o.Button=l,Array.from(a).map((function(n){!t(n,"active")&&d("input:checked",n)&&g(n,"active"),t(n,"active")&&!d("input:checked",n)&&e(n,"active")})))}),"BSN.Button")}var v="touchstart",b="touchend",y="touchmove",w="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],A=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});o(document,"DOMContentLoaded",(function(){}),e)}catch(t){}return t}()&&{passive:!0};function T(o,a){a=a||{};var l,r,p,h,T,k,N,C,x,E=this;function P(){!1===r.interval||t(o,"paused")||(g(o,"paused"),!l.isSliding&&(clearInterval(l.timer),l.timer=null))}function S(){!1!==r.interval&&t(o,"paused")&&(e(o,"paused"),!l.isSliding&&(clearInterval(l.timer),l.timer=null),!l.isSliding&&E.cycle())}function B(e){if(e.preventDefault(),!l.isSliding){var n=e.target;if(!n||t(n,"active")||!n.getAttribute("data-slide-to"))return!1;l.index=parseInt(n.getAttribute("data-slide-to"),10),E.slideTo(l.index)}}function H(t){if(t.preventDefault(),!l.isSliding){var e=t.currentTarget||t.srcElement;e===N?l.index++:e===k&&l.index--,E.slideTo(l.index)}}function M(t){var e=t.which;if(!l.isSliding){switch(e){case 39:l.index++;break;case 37:l.index--;break;default:return}E.slideTo(l.index)}}function L(t){r.pause&&r.interval&&(t(o,w[0],P),t(o,w[1],S),t(o,v,P,A),t(o,b,S,A)),r.touch&&T.length>1&&t(o,v,D,A),N&&t(N,"click",H),k&&t(k,"click",H),C&&t(C,"click",B),r.keyboard&&t(window,"keydown",M)}function I(t){t(o,y,X,A),t(o,b,W,A)}function D(t){l.isTouch||(l.touchPosition.startX=t.changedTouches[0].pageX,o.contains(t.target)&&(l.isTouch=!0,I(n)))}function X(t){if(l.isTouch)return l.touchPosition.currentX=t.changedTouches[0].pageX,"touchmove"===t.type&&t.changedTouches.length>1?(t.preventDefault(),!1):void 0;t.preventDefault()}function W(t){if(l.isTouch&&!l.isSliding&&(l.touchPosition.endX=l.touchPosition.currentX||t.changedTouches[0].pageX,l.isTouch)){if((!o.contains(t.target)||!o.contains(t.relatedTarget))&&Math.abs(l.touchPosition.startX-l.touchPosition.endX)<75)return!1;l.touchPosition.currentX<l.touchPosition.startX?l.index++:l.touchPosition.currentX>l.touchPosition.startX&&l.index--,l.isTouch=!1,E.slideTo(l.index),I(i)}}function O(t){Array.from(x).map((function(t){e(t,"active")})),x[t]&&g(x[t],"active")}function R(n){if(l.touchPosition){var i=l.index,a=n&&n.target!==T[i]?1e3*n.elapsedTime+100:20,c=E.getActiveIndex(),s="left"===l.direction?"next":"prev";l.isSliding&&setTimeout((function(){l.touchPosition&&(l.isSliding=!1,g(T[i],"active"),e(T[c],"active"),e(T[i],"carousel-item-"+s),e(T[i],"carousel-item-"+l.direction),e(T[c],"carousel-item-"+l.direction),m.call(o,h),document.hidden||!r.interval||t(o,"paused")||E.cycle())}),a)}}E.cycle=function(){l.timer&&(clearInterval(l.timer),l.timer=null),l.timer=setInterval((function(){var t=l.index||E.getActiveIndex();(function(t){var e=t.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;return e.top<=n&&e.bottom>=0})(o)&&(t++,E.slideTo(t))}),r.interval)},E.slideTo=function(n){if(!l.isSliding){var i,a=E.getActiveIndex();a!==n&&(a<n||0===a&&n===T.length-1?l.direction="left":(a>n||a===T.length-1&&0===n)&&(l.direction="right"),n<0?n=T.length-1:n>=T.length&&(n=0),i="left"===l.direction?"next":"prev",p=f("slide","carousel",T[n]),h=f("slid","carousel",T[n]),m.call(o,p),p.defaultPrevented||(l.index=n,l.isSliding=!0,clearInterval(l.timer),l.timer=null,O(n),c(T[n])&&t(o,"slide")?(g(T[n],"carousel-item-"+i),T[n].offsetWidth,g(T[n],"carousel-item-"+l.direction),g(T[a],"carousel-item-"+l.direction),s(T[n],R)):(g(T[n],"active"),T[n].offsetWidth,e(T[a],"active"),setTimeout((function(){l.isSliding=!1,r.interval&&o&&!t(o,"paused")&&E.cycle(),m.call(o,h)}),100))))}},E.getActiveIndex=function(){return Array.from(T).indexOf(o.getElementsByClassName("carousel-item active")[0])||0},E.dispose=function(){var n=["left","right","prev","next"];Array.from(T).map((function(i,o){t(i,"active")&&O(o),n.map((function(t){return e(i,"carousel-item-"+t)}))})),clearInterval(l.timer),L(i),l={},r={},delete o.Carousel},u((function(){if((o=d(o)).Carousel&&o.Carousel.dispose(),T=o.getElementsByClassName("carousel-item"),k=o.getElementsByClassName("carousel-control-prev")[0],N=o.getElementsByClassName("carousel-control-next")[0],C=o.getElementsByClassName("carousel-indicators")[0],x=C&&C.getElementsByTagName("LI")||[],!(T.length<2)){var t=o.getAttribute("data-interval"),e="false"===t?0:parseInt(t),i="false"===o.getAttribute("data-touch")?0:1,c="hover"===o.getAttribute("data-pause")||!1,s="true"===o.getAttribute("data-keyboard")||!1,u=a.interval,f=a.touch;(r={}).keyboard=!0===a.keyboard||s,r.pause=!("hover"!==a.pause&&!c)&&"hover",r.touch=f||i,r.interval="number"==typeof u?u:!1===u||0===e||!1===e?0:isNaN(e)?5e3:e,E.getActiveIndex()<0&&(T.length&&g(T[0],"active"),x.length&&O(0)),(l={}).direction="left",l.index=0,l.timer=null,l.isSliding=!1,l.isTouch=!1,l.touchPosition={startX:0,currentX:0,endX:0},L(n),r.interval&&E.cycle(),o.Carousel=E}}),"BSN.Carousel")}function k(o,a){a=a||{};var l,r,c,p,h,v,b=this,y=null,w=null;function A(t,n){m.call(t,h),h.defaultPrevented||(t.isAnimating=!0,t.style.height=t.scrollHeight+"px",e(t,"collapse"),e(t,"show"),g(t,"collapsing"),t.offsetWidth,t.style.height="0px",s(t,(function(){t.isAnimating=!1,t.setAttribute("aria-expanded","false"),n.setAttribute("aria-expanded","false"),e(t,"collapsing"),g(t,"collapse"),t.style.height="",m.call(t,v)})))}b.toggle=function(e){(e&&"A"===e.target.tagName||"A"===o.tagName)&&e.preventDefault(),(o.contains(e.target)||e.target===o)&&(t(w,"show")?b.hide():b.show())},b.hide=function(){w.isAnimating||(A(w,o),g(o,"collapsed"))},b.show=function(){var t,n;y&&(l=y.getElementsByClassName("collapse show")[0],r=l&&(d('[data-target="#'+l.id+'"]',y)||d('[href="#'+l.id+'"]',y))),w.isAnimating||(r&&l!==w&&(A(l,r),g(r,"collapsed")),t=w,n=o,m.call(t,c),c.defaultPrevented||(t.isAnimating=!0,g(t,"collapsing"),e(t,"collapse"),t.style.height=t.scrollHeight+"px",s(t,(function(){t.isAnimating=!1,t.setAttribute("aria-expanded","true"),n.setAttribute("aria-expanded","true"),e(t,"collapsing"),g(t,"collapse"),g(t,"show"),t.style.height="",m.call(t,p)}))),e(o,"collapsed"))},b.dispose=function(){i(o,"click",b.toggle),delete o.Collapse},u((function(){(o=d(o)).Collapse&&o.Collapse.dispose();var t=o.getAttribute("data-parent");c=f("show","collapse"),p=f("shown","collapse"),h=f("hide","collapse"),v=f("hidden","collapse"),(w=d(a.target||o.getAttribute("data-target")||o.getAttribute("href"))).isAnimating=!1,y=o.closest(a.parent||t),o.Collapse||n(o,"click",b.toggle),o.Collapse=b}),"BSN.Collapse")}var N="mousedown";"webkitPerspective"in document.body.style||document.body.style,"webkitTransform"in document.body.style||document.body.style;function C(t){t.focus?t.focus():t.setActive()}function x(){return{y:window.pageYOffset||document.documentElement.scrollTop,x:window.pageXOffset||document.documentElement.scrollLeft}}function E(e,n,i,o){var a,l,r,c,s,u,f=n.offsetWidth,m=n.offsetHeight,p=document.documentElement.clientWidth||document.body.clientWidth,g=document.documentElement.clientHeight||document.body.clientHeight,h=e.getBoundingClientRect(),v=o===document.body?x():{x:o.offsetLeft+o.scrollLeft,y:o.offsetTop+o.scrollTop},b=h.right-h.left,y=h.bottom-h.top,w=t(n,"popover"),A=d(".arrow",n),T=h.top+y/2-m/2<0,k=h.left+b/2-f/2<0,N=h.left+f/2+b/2>=p,C=h.top+m/2+y/2>=g,E=h.top-m<0,P=h.left-f<0,S=h.top+m+y>=g,B=h.left+f+b>=p;i="right"===(i="left"===(i="bottom"===(i="top"===(i=("left"===i||"right"===i)&&P&&B?"top":i)&&E?"bottom":i)&&S?"top":i)&&P?"right":i)&&B?"left":i,-1===n.className.indexOf(i)&&(n.className=n.className.replace(/\b(top|bottom|left|right)+/,i)),s=A.offsetWidth,u=A.offsetHeight,"left"===i||"right"===i?(l="left"===i?h.left+v.x-f-(w?s:0):h.left+v.x+b,T?(a=h.top+v.y,r=y/2-s):C?(a=h.top+v.y-m+y,r=m-y/2-s):(a=h.top+v.y-m/2+y/2,r=m/2-(w?.9*u:u/2))):"top"!==i&&"bottom"!==i||(a="top"===i?h.top+v.y-m-(w?u:0):h.top+v.y+y,k?(l=0,c=h.left+b/2-s):N?(l=p-1.01*f,c=f-(p-h.left)+b/2-s/2):(l=h.left+v.x-f/2+b/2,c=f/2-(w?s:s/2))),n.style.top=a+"px",n.style.left=l+"px",r&&(A.style.top=r+"px"),c&&(A.style.left=c+"px")}function P(o,a){var l,r,c,s,p,h,v,b=this,y=null,w=[];function A(t){(t.href&&"#"===t.href.slice(-1)||t.parentNode&&t.parentNode.href&&"#"===t.parentNode.href.slice(-1))&&this.preventDefault()}function T(){var t=o.open?n:i;t(document,"click",k),t(document,"keydown",x),t(document,"keyup",E),t(document,"focus",k,!0)}function k(t){var e=t.target,n=e&&(e.getAttribute("data-toggle")||e.parentNode&&e.parentNode.getAttribute&&e.parentNode.getAttribute("data-toggle"));("focus"!==t.type||e!==o&&e!==h&&!h.contains(e))&&(e!==h&&!h.contains(e)||!v&&!n)&&(y=e===o||o.contains(e)?o:null,b.hide(),A.call(t,e))}function N(t){y=o,b.show(),A.call(t,t.target)}function x(t){var e=t.which||t.keyCode;38!==e&&40!==e||t.preventDefault()}function E(t){var e=t.which,n=t.keyCode,i=e||n,a=document.activeElement,l=a===o,r=h.contains(a),c=a.parentNode===h||a.parentNode.parentNode===h,s=w.indexOf(a);c&&(s=l?0:38===i?s>1?s-1:0:40===i&&s<w.length-1?s+1:s,w[s]&&C(w[s])),(w.length&&c||!w.length&&(r||l)||!r)&&o.open&&27===i&&(b.toggle(),y=null)}b.show=function(){l=f("show","dropdown",y),m.call(p,l),l.defaultPrevented||(g(h,"show"),g(p,"show"),o.setAttribute("aria-expanded",!0),o.open=!0,i(o,"click",N),setTimeout((function(){C(h.getElementsByTagName("INPUT")[0]||o),T(),r=f("shown","dropdown",y),m.call(p,r)}),1))},b.hide=function(){c=f("hide","dropdown",y),m.call(p,c),c.defaultPrevented||(e(h,"show"),e(p,"show"),o.setAttribute("aria-expanded",!1),o.open=!1,T(),C(o),setTimeout((function(){o.Dropdown&&n(o,"click",N)}),1),s=f("hidden","dropdown",y),m.call(p,s))},b.toggle=function(){t(p,"show")&&o.open?b.hide():b.show()},b.dispose=function(){t(p,"show")&&o.open&&b.hide(),i(o,"click",N),delete o.Dropdown},u((function(){(o=d(o)).Dropdown&&o.Dropdown.dispose(),p=o.parentNode,h=d(".dropdown-menu",p),Array.from(h.children).map((function(t){t.children.length&&"A"===t.children[0].tagName&&w.push(t.children[0]),"A"===t.tagName&&w.push(t)})),o.Dropdown||(!("tabindex"in h)&&h.setAttribute("tabindex","0"),n(o,"click",N)),v=!0===a||"true"===o.getAttribute("data-persist")||!1,o.open=!1,o.Dropdown=b}),"BSN.Dropdown")}function S(o,a){a=a||{};var l,r,p,h,v,b,y,w,T,k=this,N=null,x={};function E(){var e,n,i=t(document.body,"modal-open"),o=parseInt(getComputedStyle(document.body).paddingRight),a=document.documentElement.clientHeight!==document.documentElement.scrollHeight||document.body.clientHeight!==document.body.scrollHeight,r=l.clientHeight!==l.scrollHeight;(n=document.createElement("div")).className="modal-scrollbar-measure",document.body.appendChild(n),e=n.offsetWidth-n.clientWidth,document.body.removeChild(n),b=e,l.style.paddingRight=!r&&b?b+"px":"",document.body.style.paddingRight=r||a?o+(i?0:b)+"px":"",T.length&&T.map((function(t){var e=getComputedStyle(t).paddingRight;t.style.paddingRight=r||a?parseInt(e)+(i?0:b)+"px":parseInt(e)+"px"}))}function P(){(y=d(".modal-backdrop"))&&!document.getElementsByClassName("modal show")[0]&&(document.body.removeChild(y),y=null),null===y&&(e(document.body,"modal-open"),document.body.style.paddingRight="",l.style.paddingRight="",T.length&&T.map((function(t){t.style.paddingRight=""})))}function S(t){t(window,"resize",k.update,A),t(l,"click",D),t(document,"keydown",I)}function B(){l.style.display="block",E(),!document.getElementsByClassName("modal show")[0]&&g(document.body,"modal-open"),g(l,"show"),l.setAttribute("aria-hidden",!1),t(l,"fade")?s(l,H):H()}function H(){C(l),l.isAnimating=!1,S(n),p=f("shown","modal",N),m.call(l,p)}function M(n){l.style.display="",o&&C(o),y=d(".modal-backdrop"),1!==n&&y&&t(y,"show")&&!document.getElementsByClassName("modal show")[0]?(e(y,"show"),s(y,P)):P(),S(i),l.isAnimating=!1,v=f("hidden","modal"),m.call(l,v)}function L(e){if(!l.isAnimating){var n=e.target,i="#"+l.getAttribute("id"),a=n.getAttribute("data-target")||n.getAttribute("href"),r=o.getAttribute("data-target")||o.getAttribute("href");!t(l,"show")&&(n===o&&a===i||o.contains(n)&&r===i)&&(l.modalTrigger=o,N=o,k.show(),e.preventDefault())}}function I(e){var n=e.which;!l.isAnimating&&x.keyboard&&27==n&&t(l,"show")&&k.hide()}function D(e){if(!l.isAnimating){var n=e.target,i="modal"===n.getAttribute("data-dismiss"),o=n.closest('[data-dismiss="modal"]');t(l,"show")&&(o||i||n===l&&"static"!==x.backdrop)&&(k.hide(),N=null,e.preventDefault())}}k.toggle=function(){t(l,"show")?k.hide():k.show()},k.show=function(){if(!(t(l,"show")&&l.isAnimating||(r=f("show","modal",N),m.call(l,r),r.defaultPrevented))){l.isAnimating=!0;var e,n=document.getElementsByClassName("modal show")[0];n&&n!==l&&(n.modalTrigger&&n.modalTrigger.Modal.hide(),n.Modal&&n.Modal.hide()),x.backdrop&&(e=document.createElement("div"),null===(y=d(".modal-backdrop"))&&(e.setAttribute("class","modal-backdrop"+(x.animation?" fade":"")),y=e,document.body.appendChild(y)),y=y),!y||n||t(y,"show")||(y.offsetWidth,w=c(y),g(y,"show")),n?B():setTimeout(B,y&&w?w:0)}},k.hide=function(n){t(l,"show")&&(h=f("hide","modal"),m.call(l,h),h.defaultPrevented||(l.isAnimating=!0,e(l,"show"),l.setAttribute("aria-hidden",!0),t(l,"fade")&&1!==n?s(l,M):M()))},k.setContent=function(t){d(".modal-content",l).innerHTML=t},k.update=function(){t(l,"show")&&E()},k.dispose=function(){k.hide(1),o?(i(o,"click",L),delete o.Modal):delete l.Modal},u((function(){o=d(o);var e=d(o.getAttribute("data-target")||o.getAttribute("href"));l=t(o,"modal")?o:e,T=Array.from(document.getElementsByClassName("fixed-top")).concat(Array.from(document.getElementsByClassName("fixed-bottom"))),t(o,"modal")&&(o=null),o&&o.Modal&&o.Modal.dispose(),l&&l.Modal&&l.Modal.dispose(),x.keyboard=!1!==a.keyboard&&"false"!==l.getAttribute("data-keyboard"),x.backdrop="static"!==a.backdrop&&"static"!==l.getAttribute("data-backdrop")||"static",x.backdrop=!1!==a.backdrop&&"false"!==l.getAttribute("data-backdrop")&&x.backdrop,x.animation=!!t(l,"fade"),x.content=a.content,l.isAnimating=!1,o&&!o.Modal&&n(o,"click",L),x.content&&k.setContent(x.content.trim()),o?(l.modalTrigger=o,o.Modal=k):l.Modal=k}),"BSN.Modal")}function B(o,a){a=a||{};var l,r,c,p,h,b,y,T,k,C,x,P,S,B,H,M,L,I,D,X=this,W=null,O=0,R=/(iPhone|iPod|iPad)/.test(navigator.userAgent),z={};function U(t){null!==W&&t.target===d(".close",W)&&X.hide()}function q(){return{0:a.title||o.getAttribute("data-title")||null,1:a.content||o.getAttribute("data-content")||null}}function j(){null===W&&o.focus()}function Y(t){"hover"===z.trigger?(t(o,N,X.show),t(o,w[0],X.show),z.dismissible||t(o,w[1],X.hide)):"click"==z.trigger?t(o,z.trigger,X.toggle):"focus"==z.trigger&&(R&&t(o,"click",j),t(o,z.trigger,X.toggle))}function F(t){W&&W.contains(t.target)||t.target===o||o.contains(t.target)||X.hide()}function V(t){z.dismissible?t(document,"click",U):("focus"==z.trigger&&t(o,"blur",X.hide),"hover"==z.trigger&&t(document,v,F,A)),t(window,"resize",X.hide,A)}function G(){V(n),m.call(o,x)}function J(){V(i),z.container.removeChild(W),O=null,W=null,m.call(o,S)}X.toggle=function(){null===W?X.show():X.hide()},X.show=function(){clearTimeout(O),O=setTimeout((function(){if(null===W){if(m.call(o,C),C.defaultPrevented)return;!function(){l=q()[0]||null,r=(r=q()[1])?r.trim():null,W=document.createElement("div");var e=document.createElement("div");if(g(e,"arrow"),W.appendChild(e),null!==r&&null===z.template){if(W.setAttribute("role","tooltip"),null!==l){var n=document.createElement("h3");g(n,"popover-header"),n.innerHTML=z.dismissible?l+k:l,W.appendChild(n)}var i=document.createElement("div");g(i,"popover-body"),i.innerHTML=z.dismissible&&null===l?r+k:r,W.appendChild(i)}else{var o=document.createElement("div");o.innerHTML=z.template.trim(),W.className=o.firstChild.className,W.innerHTML=o.firstChild.innerHTML;var a=d(".popover-header",W),c=d(".popover-body",W);l&&a&&(a.innerHTML=l.trim()),r&&c&&(c.innerHTML=r.trim())}z.container.appendChild(W),W.style.display="block",!t(W,"popover")&&g(W,"popover"),!t(W,z.animation)&&g(W,z.animation),!t(W,D)&&g(W,D)}(),E(o,W,z.placement,z.container),!t(W,"show")&&g(W,"show"),z.animation?s(W,G):G()}}),20)},X.hide=function(){clearTimeout(O),O=setTimeout((function(){if(W&&null!==W&&t(W,"show")){if(m.call(o,P),P.defaultPrevented)return;e(W,"show"),z.animation?s(W,J):J()}}),z.delay)},X.dispose=function(){X.hide(),Y(i),delete o.Popover},u((function(){(o=d(o)).Popover&&o.Popover.dispose(),c=o.getAttribute("data-trigger"),p=o.getAttribute("data-animation"),h=o.getAttribute("data-placement"),b=o.getAttribute("data-dismissible"),y=o.getAttribute("data-delay"),T=o.getAttribute("data-container"),k='<button type="button" class="close">×</button>',C=f("show","popover"),x=f("shown","popover"),P=f("hide","popover"),S=f("hidden","popover"),B=d(a.container),H=d(T),M=o.closest(".modal"),L=o.closest(".fixed-top"),I=o.closest(".fixed-bottom"),z.template=a.template?a.template:null,z.trigger=a.trigger?a.trigger:c||"hover",z.animation=a.animation&&"fade"!==a.animation?a.animation:p||"fade",z.placement=a.placement?a.placement:h||"top",z.delay=parseInt(a.delay||y)||200,z.dismissible=!(!a.dismissible&&"true"!==b),z.container=B||(H||(L||(I||(M||document.body)))),D="bs-popover-"+z.placement;var t=q();l=t[0],((r=t[1])||z.template)&&(o.Popover||Y(n),o.Popover=X)}),"BSN.Popover")}function H(o,a){a=a||{};var l,r,c,s,p,h=this,v={};function b(){var n;n=s.getElementsByTagName("A"),l.length!==n.length&&(l.items=[],l.targets=[],Array.from(n).map((function(t){var e=t.getAttribute("href"),n=e&&"#"===e.charAt(0)&&"#"!==e.slice(-1)&&d(e);n&&(l.items.push(t),l.targets.push(n))})),l.length=n.length),l.scrollOffset=l.isWindow?x().y:o.scrollTop,l.items.map((function(n,i){return function(n){var i=l.items[n],a=l.targets[n],r=t(i,"dropdown-item")&&i.closest(".dropdown-menu"),c=r&&r.previousElementSibling,s=i.nextElementSibling,d=s&&s.getElementsByClassName("active").length,u=l.isWindow&&a.getBoundingClientRect(),p=t(i,"active")||!1,h=(l.isWindow?u.top+l.scrollOffset:a.offsetTop)-v.offset,b=l.isWindow?u.bottom+l.scrollOffset-v.offset:l.targets[n+1]?l.targets[n+1].offsetTop-v.offset:o.scrollHeight,y=d||l.scrollOffset>=h&&b>l.scrollOffset;if(!p&&y)g(i,"active"),c&&!t(c,"active")&&g(c,"active"),m.call(o,f("activate","scrollspy",l.items[n]));else if(p&&!y)e(i,"active"),c&&t(c,"active")&&!i.parentNode.getElementsByClassName("active").length&&e(c,"active");else if(p&&y||!y&&!p)return}(i)}))}function y(t){t(p,"scroll",h.refresh,A),t(window,"resize",h.refresh,A)}h.refresh=function(){b()},h.dispose=function(){y(i),delete o.ScrollSpy},u((function(){(o=d(o)).ScrollSpy&&o.ScrollSpy.dispose(),r=o.getAttribute("data-target"),c=o.getAttribute("data-offset"),s=d(a.target||r),p=o.offsetHeight<o.scrollHeight?o:window,s&&(v.target=s,v.offset=parseInt(a.offset||c)||10,(l={}).length=0,l.items=[],l.targets=[],l.isWindow=p===window,o.ScrollSpy||y(n),h.refresh(),o.ScrollSpy=h)}),"BSN.ScrollSpy")}function M(o,a){a=a||{};var r,c,p,h,v,b,y,w,A,T,k,N,C,x,E,P=this,S=!1;function B(){S.style.height="",e(S,"collapsing"),c.isAnimating=!1}function H(){S?C?B():setTimeout((function(){S.style.height=x+"px",S.offsetWidth,s(S,B)}),50):c.isAnimating=!1,v=f("shown","tab",A),m.call(w,v)}function M(){S&&(T.style.float="left",k.style.float="left",N=T.scrollHeight),h=f("show","tab",A),y=f("hidden","tab",w),m.call(w,h),h.defaultPrevented||(g(k,"active"),e(T,"active"),S&&(x=k.scrollHeight,C=x===N,g(S,"collapsing"),S.style.height=N+"px",S.offsetHeight,T.style.float="",k.style.float=""),t(k,"fade")?setTimeout((function(){g(k,"show"),s(k,H)}),20):H(),m.call(A,y))}function L(){var e,n=c.getElementsByClassName("active");return 1!==n.length||t(n[0].parentNode,"dropdown")?n.length>1&&(e=n[n.length-1]):e=n[0],e}function I(){return d(L().getAttribute("href"))}function D(t){t.preventDefault(),w=t.currentTarget,!c.isAnimating&&P.show()}P.show=function(){if(!t(w=w||o,"active")){if(k=d(w.getAttribute("href")),A=L(),T=I(),b=f("hide","tab",w),m.call(A,b),b.defaultPrevented)return;c.isAnimating=!0,e(A,"active"),A.setAttribute("aria-selected","false"),g(w,"active"),w.setAttribute("aria-selected","true"),p&&(t(o.parentNode,"dropdown-menu")?t(p,"active")||g(p,"active"):t(p,"active")&&e(p,"active")),t(T,"fade")?(e(T,"show"),s(T,M)):M()}},P.dispose=function(){i(o,"click",D),delete o.Tab},u((function(){(o=d(o)).Tab&&o.Tab.dispose(),r=o.getAttribute("data-height"),c=o.closest(".nav"),p=c&&d(".dropdown-toggle",c),E=!(!l||!1===a.height||"false"===r),c.isAnimating=!1,o.Tab||n(o,"click",D),E&&(S=I().parentNode),o.Tab=P}),"BSN.Tab")}function L(o,a){a=a||{};var l,r,c,p,h,v,b,y,w=this,A=0,T={};function k(){e(l,"showing"),g(l,"show"),m.call(l,b),T.autohide&&w.hide()}function N(){g(l,"hide"),m.call(l,y)}function C(){e(l,"show"),T.animation?s(l,N):N()}function x(){clearTimeout(A),i(o,"click",w.hide),delete o.Toast}w.show=function(){if(l&&!t(l,"show")){if(m.call(l,h),h.defaultPrevented)return;T.animation&&g(l,"fade"),e(l,"hide"),l.offsetWidth,g(l,"showing"),T.animation?s(l,k):k()}},w.hide=function(e){if(l&&t(l,"show")){if(m.call(l,v),v.defaultPrevented)return;e?C():A=setTimeout(C,T.delay)}},w.dispose=function(){T.animation?s(l,x):x()},u((function(){(o=d(o)).Toast&&o.Toast.dispose(),l=o.closest(".toast"),r=o.getAttribute("data-animation"),c=o.getAttribute("data-autohide"),p=o.getAttribute("data-delay"),h=f("show","toast"),v=f("hide","toast"),b=f("shown","toast"),y=f("hidden","toast"),T.animation=!1===a.animation||"false"===r?0:1,T.autohide=!1===a.autohide||"false"===c?0:1,T.delay=parseInt(a.delay||p)||500,o.Toast||n(o,"click",w.hide),o.Toast=w}),"BSN.Toast")}function I(o,a){a=a||{};var l,r,c,p,h,b,y,T,k,C,x,P,S,B,H,M=this,L=null,I=0,D={};function X(){return o.getAttribute("title")||o.getAttribute("data-title")||o.getAttribute("data-original-title")}function W(t){L&&L.contains(t.target)||t.target===o||o.contains(t.target)||M.hide()}function O(){n(document,v,W,A),n(window,"resize",M.hide,A),m.call(o,y)}function R(){i(document,v,W,A),i(window,"resize",M.hide,A),D.container.removeChild(L),L=null,I=null,m.call(o,k)}function z(t){t(o,N,M.show),t(o,w[0],M.show),t(o,w[1],M.hide)}M.show=function(){clearTimeout(I),I=setTimeout((function(){if(null===L){if(m.call(o,b),b.defaultPrevented)return;!1!==function(){if(l=X()){if(L=document.createElement("div"),D.template){var e=document.createElement("div");e.innerHTML=D.template.trim(),L.className=e.firstChild.className,L.innerHTML=e.firstChild.innerHTML,d(".tooltip-inner",L).innerHTML=l.trim()}else{var n=document.createElement("div");g(n,"arrow"),L.appendChild(n);var i=document.createElement("div");g(i,"tooltip-inner"),L.appendChild(i),i.innerHTML=l}L.style.left="0",L.style.top="0",L.setAttribute("role","tooltip"),!t(L,"tooltip")&&g(L,"tooltip"),!t(L,D.animation)&&g(L,D.animation),!t(L,H)&&g(L,H),D.container.appendChild(L)}}()&&(E(o,L,D.placement,D.container),!t(L,"show")&&g(L,"show"),D.animation?s(L,O):O())}}),20)},M.hide=function(){clearTimeout(I),I=setTimeout((function(){if(L&&t(L,"show")){if(m.call(o,T),T.defaultPrevented)return;e(L,"show"),D.animation?s(L,R):R()}}),D.delay)},M.toggle=function(){L?M.hide():M.show()},M.dispose=function(){z(i),M.hide(),o.setAttribute("title",o.getAttribute("data-original-title")),o.removeAttribute("data-original-title"),delete o.Tooltip},u((function(){(o=d(o)).Tooltip&&o.Tooltip.dispose(),r=o.getAttribute("data-animation"),c=o.getAttribute("data-placement"),p=o.getAttribute("data-delay"),h=o.getAttribute("data-container"),b=f("show","tooltip"),y=f("shown","tooltip"),T=f("hide","tooltip"),k=f("hidden","tooltip"),C=d(a.container),x=d(h),P=o.closest(".modal"),S=o.closest(".fixed-top"),B=o.closest(".fixed-bottom"),D.animation=a.animation&&"fade"!==a.animation?a.animation:r||"fade",D.placement=a.placement?a.placement:c||"top",D.template=a.template?a.template:null,D.delay=parseInt(a.delay||p)||200,D.container=C||(x||(S||(B||(P||document.body)))),H="bs-tooltip-"+D.placement,(l=X())&&(o.Tooltip||(o.setAttribute("data-original-title",l),o.removeAttribute("title"),z(n)),o.Tooltip=M)}),"BSN.Tooltip")}var D={},X=function(t){t=t||document;var e=function(t,e){Array.from(e).map((function(e){return new t(e)}))};for(var n in D)e(D[n][0],t.querySelectorAll(D[n][1]))};D.Alert=[p,'[data-dismiss="alert"]'],D.Button=[h,'[data-toggle="buttons"]'],D.Carousel=[T,'[data-ride="carousel"]'],D.Collapse=[k,'[data-toggle="collapse"]'],D.Dropdown=[P,'[data-toggle="dropdown"]'],D.Modal=[S,'[data-toggle="modal"]'],D.Popover=[B,'[data-toggle="popover"],[data-tip="popover"]'],D.ScrollSpy=[H,'[data-spy="scroll"]'],D.Tab=[M,'[data-toggle="tab"]'],D.Toast=[L,'[data-dismiss="toast"]'],D.Tooltip=[I,'[data-toggle="tooltip"],[data-tip="tooltip"]'],document.body?X():o(document,"DOMContentLoaded",X);return{Alert:p,Button:h,Carousel:T,Collapse:k,Dropdown:P,Modal:S,Popover:B,ScrollSpy:H,Tab:M,Toast:L,Tooltip:I,initCallback:X,removeDataAPI:function(t){t=t||document;var e=function(t,e){Array.from(e).map((function(e){return e[t].dispose()}))};for(var n in D)e(n,t.querySelectorAll(D[n][1]))},componentsInit:D,Version:"3.0.2"}})); |
/*! | ||
* Native JavaScript for Bootstrap v3.0.0 (https://thednp.github.io/bootstrap.native/) | ||
* Native JavaScript for Bootstrap v3.0.1 (https://thednp.github.io/bootstrap.native/) | ||
* Copyright 2015-2020 © dnp_theme | ||
@@ -12,10 +12,16 @@ * Licensed under MIT (https://github.com/thednp/bootstrap.native/blob/master/LICENSE) | ||
var version = "3.0.0"; | ||
var componentsInit = {}; | ||
var transitionDuration = 'webkitTransition' in document.body.style ? 'webkitTransitionDuration' : 'transitionDuration'; | ||
var initCallback = function (lookUp){ | ||
lookUp = lookUp || document; | ||
var initializeDataAPI = function( Constructor, collection ){ | ||
Array.from(collection).map(function (x){ return new Constructor(x); }); | ||
}; | ||
for (var component in componentsInit) { | ||
initializeDataAPI( componentsInit[component][0], lookUp.querySelectorAll (componentsInit[component][1]) ); | ||
} | ||
}; | ||
var transitionEndEvent = 'webkitTransition' in document.body.style ? 'webkitTransitionEnd' : 'transitionend'; | ||
var version = "3.0.1"; | ||
var support3DTransform = 'webkitPerspective' in document.body.style || 'perspective' in document.body.style; | ||
function on (element, event, handler, options) { | ||
@@ -40,2 +46,18 @@ options = options || false; | ||
function hasClass(element,classNAME) { | ||
return element.classList.contains(classNAME) | ||
} | ||
function addClass(element,classNAME) { | ||
element.classList.add(classNAME); | ||
} | ||
function removeClass(element,classNAME) { | ||
element.classList.remove(classNAME); | ||
} | ||
var touchEvents = { start: 'touchstart', end: 'touchend', move:'touchmove', cancel:'touchcancel' }; | ||
var mouseHoverEvents = ('onmouseleave' in document) ? [ 'mouseenter', 'mouseleave'] : [ 'mouseover', 'mouseout' ]; | ||
var supportPassive = (function () { | ||
@@ -54,14 +76,8 @@ var result = false; | ||
var supportTransform = 'webkitTransform' in document.body.style || 'transform' in document.body.style; | ||
var passiveHandler = supportPassive ? { passive: true } : false; | ||
var supportTransition = 'webkitTransition' in document.body.style || 'transition' in document.body.style; | ||
function removeClass(element,classNAME) { | ||
element.classList.remove(classNAME); | ||
} | ||
var transitionDuration = 'webkitTransition' in document.body.style ? 'webkitTransitionDuration' : 'transitionDuration'; | ||
function hasClass(element,classNAME) { | ||
return element.classList.contains(classNAME) | ||
} | ||
function getElementTransitionDuration (element) { | ||
@@ -74,2 +90,4 @@ var duration = supportTransition ? window.getComputedStyle(element)[transitionDuration] : 0; | ||
var transitionEndEvent = 'webkitTransition' in document.body.style ? 'webkitTransitionEnd' : 'transitionend'; | ||
function emulateTransitionEnd (element,handler){ | ||
@@ -81,2 +99,8 @@ var called = 0, duration = getElementTransitionDuration(element); | ||
function isElementInScrollRange(element) { | ||
var bcr = element.getBoundingClientRect(), | ||
viewportHeight = window.innerHeight || document.documentElement.clientHeight; | ||
return bcr.top <= viewportHeight && bcr.bottom >= 0; | ||
} | ||
function queryElement (selector, parent) { | ||
@@ -87,2 +111,9 @@ var lookUp = parent && parent instanceof Element ? parent : document; | ||
function tryWrapper (fn,origin){ | ||
try{ fn(); } | ||
catch(e){ | ||
console.error((origin + ": " + e)); | ||
} | ||
} | ||
function bootstrapCustomEvent (eventName, componentName, related) { | ||
@@ -97,54 +128,378 @@ var OriginalCustomEvent = new CustomEvent( eventName + '.bs.' + componentName, {cancelable: true}); | ||
function componentInit(fn){ | ||
try{ fn(); } | ||
catch(e){ | ||
console.error(("BSN: " + e)); | ||
} | ||
} | ||
function Alert(element) { | ||
function Carousel (element,options) { | ||
options = options || {}; | ||
var self = this, | ||
alert, | ||
closeCustomEvent = bootstrapCustomEvent('close','alert'), | ||
closedCustomEvent = bootstrapCustomEvent('closed','alert'); | ||
function triggerHandler() { | ||
hasClass(alert,'fade') ? emulateTransitionEnd(alert,transitionEndHandler) : transitionEndHandler(); | ||
swipeTimingFunction = 'cubic-bezier(.15,.5,.75,1)', | ||
cancelEvent, | ||
isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent), | ||
canTouch = ('ontouchstart' in window || navigator.msMaxTouchPoints)||false, | ||
swipeEvents = canTouch && isMobile ? touchEvents | ||
: { start: 'mousedown', end: 'mouseup', move:'mousemove', cancel: 'mouseout' }, | ||
vars, ops, | ||
slideCustomEvent, slidCustomEvent, | ||
slides, leftArrow, rightArrow, indicator, indicators; | ||
function pauseHandler() { | ||
if ( ops.interval !==false && !hasClass(element,'paused') ) { | ||
addClass(element,'paused'); | ||
!vars.isSliding && ( clearInterval(vars.timer), vars.timer = null ); | ||
} | ||
} | ||
function clickHandler(e) { | ||
alert = e && e.target.closest(".alert"); | ||
element = queryElement('[data-dismiss="alert"]',alert); | ||
element && alert && (element === e.target || element.contains(e.target)) && self.close(); | ||
function resumeHandler() { | ||
if ( ops.interval !== false && hasClass(element,'paused') ) { | ||
removeClass(element,'paused'); | ||
!vars.isSliding && ( clearInterval(vars.timer), vars.timer = null ); | ||
!vars.isSliding && self.cycle(); | ||
} | ||
} | ||
function transitionEndHandler() { | ||
off(element, 'click', clickHandler); | ||
alert.parentNode.removeChild(alert); | ||
dispatchCustomEvent.call(alert,closedCustomEvent); | ||
function indicatorHandler(e) { | ||
e.preventDefault(); | ||
if (vars.isSliding||vars.isTouch) { return; } | ||
var eventTarget = e.target; | ||
if ( eventTarget && !hasClass(eventTarget,'active') && eventTarget.getAttribute('data-slide-to') ) { | ||
vars.index = parseInt( eventTarget.getAttribute('data-slide-to'), 10 ); | ||
} else { return false; } | ||
self.slideTo( vars.index ); | ||
} | ||
self.close = function () { | ||
if ( alert && element && hasClass(alert,'show') ) { | ||
dispatchCustomEvent.call(alert,closeCustomEvent); | ||
if ( closeCustomEvent.defaultPrevented ) { return; } | ||
self.dispose(); | ||
removeClass(alert,'show'); | ||
triggerHandler(); | ||
function controlsHandler(e) { | ||
e.preventDefault(); | ||
if (vars.isSliding||vars.isTouch) { return; } | ||
var eventTarget = e.currentTarget || e.srcElement; | ||
if ( eventTarget === rightArrow ) { | ||
vars.index++; | ||
} else if ( eventTarget === leftArrow ) { | ||
vars.index--; | ||
} | ||
self.slideTo( vars.index ); | ||
} | ||
function keyHandler(ref) { | ||
var which = ref.which; | ||
if (vars.isSliding||vars.isTouch) { return; } | ||
switch (which) { | ||
case 39: | ||
vars.index++; | ||
break; | ||
case 37: | ||
vars.index--; | ||
break; | ||
default: return; | ||
} | ||
self.slideTo( vars.index ); | ||
} | ||
function toggleEvents(action) { | ||
if ( ops.pause && ops.interval ) { | ||
action( element, mouseHoverEvents[0], pauseHandler ); | ||
action( element, mouseHoverEvents[1], resumeHandler ); | ||
action( element, swipeEvents.start, pauseHandler, passiveHandler ); | ||
action( element, swipeEvents.end, resumeHandler, passiveHandler ); | ||
} | ||
if (ops.touch && slides.length > 2) { | ||
action( element, swipeEvents.start, touchDownHandler, passiveHandler ); | ||
if ( action === on ) { | ||
addClass(element,'swipe'); | ||
} else { | ||
removeClass(element,'swipe'); | ||
} | ||
} | ||
rightArrow && action( rightArrow, 'click', controlsHandler ); | ||
leftArrow && action( leftArrow, 'click', controlsHandler ); | ||
indicator && action( indicator, 'click', indicatorHandler ); | ||
ops.keyboard && action( window, 'keydown', keyHandler ); | ||
} | ||
function toggleSlideStyle (styles,duration){ | ||
var hasStyles = styles && styles instanceof Array && styles.length === 3; | ||
vars.touchSlides[0].style.transform = hasStyles ? ("translate3d(" + (styles[0]) + "px,0,0)") : ''; | ||
vars.touchSlides[1].style.transform = hasStyles ? ("translate3d(" + (styles[1]) + "px,0,0)") : ''; | ||
vars.touchSlides[2].style.transform = hasStyles ? ("translate3d(" + (styles[2]) + "px,0,0)") : ''; | ||
vars.touchSlides[0].style.transitionProperty = hasStyles ? 'none' : ''; | ||
vars.touchSlides[1].style.transitionProperty = hasStyles ? 'none' : ''; | ||
vars.touchSlides[2].style.transitionProperty = hasStyles ? 'none' : ''; | ||
if (hasStyles) { | ||
vars.touchSlides[0].style.display = 'block'; | ||
vars.touchSlides[1].style.display = 'block'; | ||
vars.touchSlides[2].style.display = 'block'; | ||
vars.touchSlides[0].style.transitionTimingFunction = swipeTimingFunction; | ||
vars.touchSlides[1].style.transitionTimingFunction = swipeTimingFunction; | ||
vars.touchSlides[2].style.transitionTimingFunction = swipeTimingFunction; | ||
element.style.transitionTimingFunction = swipeTimingFunction; | ||
} | ||
if (duration) { | ||
vars.touchSlides[0].style.transitionDuration = duration + "ms"; | ||
vars.touchSlides[1].style.transitionDuration = duration + "ms"; | ||
vars.touchSlides[2].style.transitionDuration = duration + "ms"; | ||
element.style.transitionDuration = duration + "ms"; | ||
} | ||
} | ||
function getTouchSlides (){ | ||
var activeIndex = self.getActiveIndex(), | ||
leftIndex = activeIndex === 0 ? slides.length - 1 : activeIndex - 1, | ||
rightIndex = activeIndex === slides.length - 1 ? 0 : activeIndex + 1; | ||
return vars.touchSlides = [ slides[leftIndex], slides[activeIndex], slides[rightIndex] ]; | ||
} | ||
function afterSwipe (){ | ||
if (vars.isTouch||vars.isSliding) { | ||
vars.touchSlides[0].style.transform = ''; | ||
vars.touchSlides[1].style.transform = ''; | ||
vars.touchSlides[2].style.transform = ''; | ||
vars.touchSlides[0].style.transitionProperty = ''; | ||
vars.touchSlides[1].style.transitionProperty = ''; | ||
vars.touchSlides[2].style.transitionProperty = ''; | ||
vars.touchSlides[0].style.transitionTimingFunction = ''; | ||
vars.touchSlides[1].style.transitionTimingFunction = ''; | ||
vars.touchSlides[2].style.transitionTimingFunction = ''; | ||
vars.touchSlides[0].style.transitionDuration = ''; | ||
vars.touchSlides[1].style.transitionDuration = ''; | ||
vars.touchSlides[2].style.transitionDuration = ''; | ||
vars.touchSlides[0].style.display = ''; | ||
vars.touchSlides[1].style.display = ''; | ||
vars.touchSlides[2].style.display = ''; | ||
removeClass(element,'collapsing'); | ||
setTimeout(function(){ | ||
element.style.transitionTimingFunction = ''; | ||
element.style.transitionDuration = ''; | ||
element.style.height = ''; | ||
vars.isTouch = 0; | ||
vars.isSliding = 0; | ||
vars.swipeDirection = null; | ||
vars.direction = null; | ||
clearTimeout(vars.timer); | ||
getTouchSlides(); | ||
},17); | ||
} | ||
} | ||
function toggleTouchEvents (action){ | ||
action( element, swipeEvents.move, touchMoveHandler ); | ||
action( element, swipeEvents.cancel, touchCancelHandler ); | ||
action( element, swipeEvents.end, touchEndHandler ); | ||
} | ||
function touchEndAction (){ | ||
var nullSlide = vars.swipeDirection === 'left' ? vars.touchSlides[0] : vars.touchSlides[2], | ||
otherSlide = vars.swipeDirection === 'right' ? vars.touchSlides[0] : vars.touchSlides[2], | ||
otherSlideTranslate = vars.swipeDirection === 'left' ? element.offsetWidth : -element.offsetWidth; | ||
toggleSlideStyle(); | ||
nullSlide.style.display = ''; | ||
otherSlide.style.transform = "translate3d(" + otherSlideTranslate + "px,0,0)"; | ||
otherSlide.style.transitionTimingFunction = swipeTimingFunction; | ||
vars.touchSlides[1].style.transitionTimingFunction = swipeTimingFunction; | ||
emulateTransitionEnd(vars.touchSlides[1], afterSwipe); | ||
} | ||
function touchDownHandler(e) { | ||
if ( vars.isTouch || vars.isSliding ) { return; } | ||
vars.touchPosition.startX = parseInt(e.changedTouches ? e.changedTouches[0].pageX : e.pageX); | ||
vars.touchPosition.startY = parseInt(e.changedTouches ? e.changedTouches[0].pageY : e.pageY); | ||
if ( e.type === 'mousedown' && e.which !== 1 ) { return } | ||
if ( element.querySelector('.carousel-inner').contains(e.target) | ||
&& e.target !== leftArrow && !leftArrow.contains(e.target) | ||
&& e.target !== rightArrow && !rightArrow.contains(e.target) | ||
&& !indicator.contains(e.target) ) { | ||
if ( vars.touchSlides[1].offsetHeight !== vars.touchSlides[0].offsetHeight | ||
|| vars.touchSlides[1].offsetHeight !== vars.touchSlides[2].offsetHeight ) { | ||
element.style.height = Math.ceil(vars.touchSlides[1].offsetHeight)+'px'; | ||
addClass(element,'collapsing'); | ||
} | ||
vars.isTouch = 1; | ||
toggleTouchEvents(on); | ||
} | ||
} | ||
function touchMoveHandler (e) { | ||
if ( !vars.isTouch ) { return } | ||
vars.touchPosition.currentX = parseInt(e.changedTouches ? e.changedTouches[0].pageX : e.pageX); | ||
vars.touchPosition.currentY = parseInt(e.changedTouches ? e.changedTouches[0].pageY : e.pageY); | ||
var distance = Math.abs(vars.touchPosition.startX - vars.touchPosition.currentX), | ||
touchInterval = Math.abs(distance), | ||
translation, translations; | ||
if ( (e.type === 'touchmove' && e.changedTouches.length > 1) || ( e.type === 'mousemove' && e.which !== 1 ) ) { | ||
e.preventDefault(); | ||
} | ||
if ( e.type === 'touchmove' && Math.abs(vars.touchPosition.startY - vars.touchPosition.currentY) < 20 ) { | ||
e.preventDefault(); | ||
} | ||
if ( element.contains(e.target) && vars.touchPosition.startX !== vars.touchPosition.currentX ) { | ||
if ( vars.touchPosition.currentX < vars.touchPosition.startX ) { | ||
vars.swipeDirection = 'left'; | ||
} else if ( vars.touchPosition.currentX > vars.touchPosition.startX ) { | ||
vars.swipeDirection = 'right'; | ||
} else { | ||
vars.swipeDirection = null; | ||
} | ||
translation = (vars.swipeDirection === 'left') ? -distance : distance, | ||
translations = [(translation-element.offsetWidth), translation, (translation+element .offsetWidth)]; | ||
touchInterval = touchInterval < 500 ? 500 : 1000; | ||
toggleSlideStyle(translations,touchInterval); | ||
} | ||
} | ||
function touchCancelHandler (e) { | ||
if ( !vars.isTouch ) {return} | ||
if ( vars.isTouch && e.type === 'mouseout' && ( !element.contains(e.target) || !element.contains(e.relatedTarget) ) | ||
|| vars.isTouch && e.type === 'touchcancel' ) { | ||
touchEndAction(); | ||
toggleTouchEvents(off); | ||
} | ||
} | ||
function touchEndHandler(e) { | ||
if ( !vars.isTouch || vars.isTouch && e.type === 'mouseup' && e.which !== 1 ) { return } | ||
vars.touchPosition.endX = parseInt(e.changedTouches ? e.changedTouches[0].pageX : e.pageX); | ||
if ( vars.touchPosition.endX < vars.touchPosition.startX ) { | ||
vars.swipeDirection = 'left'; | ||
} else if ( vars.touchPosition.endX > vars.touchPosition.startX ) { | ||
vars.swipeDirection = 'right'; | ||
} else { | ||
vars.swipeDirection = null; | ||
} | ||
var distance = Math.abs(vars.touchPosition.startX - vars.touchPosition.endX); | ||
if (distance >= 75) { | ||
vars.index += vars.swipeDirection === 'left' ? 1 : -1; | ||
toggleTouchEvents(off); | ||
touchEndAction(); | ||
toggleSlideStyle(); | ||
self.slideTo(vars.index); | ||
} else if ( distance && distance < 75 ) { | ||
cancelEvent = new Event(swipeEvents.cancel); | ||
element.dispatchEvent(cancelEvent); | ||
} else { | ||
afterSwipe(); | ||
} | ||
} | ||
function setActivePage(pageIndex) { | ||
Array.from(indicators).map(function (x){removeClass(x,'active');}); | ||
indicators[pageIndex] && addClass(indicators[pageIndex], 'active'); | ||
} | ||
function transitionEndHandler(e){ | ||
if (vars.isSliding){ | ||
var next = vars.index, | ||
direction = vars.direction, | ||
activeItem = self.getActiveIndex(), | ||
orientation = direction === 'left' ? 'next' : 'prev'; | ||
if (vars.direction){ | ||
addClass(slides[next],'active'); | ||
removeClass(slides[activeItem],'active'); | ||
removeClass(slides[next],("carousel-item-" + orientation)); | ||
removeClass(slides[next],("carousel-item-" + direction)); | ||
removeClass(slides[activeItem],("carousel-item-" + direction)); | ||
dispatchCustomEvent.call(element, slidCustomEvent); | ||
if ( !document.hidden && ops.interval && !hasClass(element,'paused') ) { | ||
self.cycle(); | ||
} | ||
afterSwipe(); | ||
} | ||
} | ||
} | ||
self.cycle = function () { | ||
if (vars.timer) { | ||
clearInterval(vars.timer); | ||
vars.timer = null; | ||
} | ||
vars.timer = setInterval(function () { | ||
var idx = vars.index || self.getActiveIndex(); | ||
isElementInScrollRange(element) && (idx++, self.slideTo( idx ) ); | ||
}, ops.interval); | ||
}; | ||
self.slideTo = function (next) { | ||
if (vars.isSliding) { return; } | ||
var activeItem = self.getActiveIndex(), orientation; | ||
if ( activeItem === next ) { | ||
return; | ||
} else if ( (activeItem < next ) || (activeItem === 0 && next === slides.length -1 ) ) { | ||
vars.direction = 'left'; | ||
} else if ( (activeItem > next) || (activeItem === slides.length - 1 && next === 0 ) ) { | ||
vars.direction = 'right'; | ||
} | ||
if ( next < 0 ) { next = slides.length - 1; } | ||
else if ( next >= slides.length ){ next = 0; } | ||
orientation = vars.direction === 'left' ? 'next' : 'prev'; | ||
slideCustomEvent = bootstrapCustomEvent('slide', 'carousel', slides[next]); | ||
slidCustomEvent = bootstrapCustomEvent('slid', 'carousel', slides[next]); | ||
dispatchCustomEvent.call(element, slideCustomEvent); | ||
if (slideCustomEvent.defaultPrevented) { return; } | ||
vars.index = next; | ||
vars.isSliding = 1; | ||
clearInterval(vars.timer); | ||
vars.timer = null; | ||
setActivePage( next ); | ||
if ( getElementTransitionDuration(slides[next]) && hasClass(element,'slide') ) { | ||
addClass(slides[next],("carousel-item-" + orientation)); | ||
slides[next].offsetWidth; | ||
addClass(slides[next],("carousel-item-" + (vars.direction))); | ||
addClass(slides[activeItem],("carousel-item-" + (vars.direction))); | ||
emulateTransitionEnd(slides[next], transitionEndHandler); | ||
} else { | ||
addClass(slides[next],'active'); | ||
slides[next].offsetWidth; | ||
removeClass(slides[activeItem],'active'); | ||
setTimeout(function () { | ||
vars.isSliding = 0; | ||
vars.isTouch = 0; | ||
if ( ops.interval && element && !hasClass(element,'paused') ) { | ||
self.cycle(); | ||
} | ||
dispatchCustomEvent.call(element, slidCustomEvent); | ||
}, 100 ); | ||
} | ||
}; | ||
self.getActiveIndex = function () { return Array.from(slides).indexOf(element.getElementsByClassName('carousel-item active')[0]) || 0; }; | ||
self.dispose = function () { | ||
off(element, 'click', clickHandler); | ||
delete element.Alert; | ||
var itemClasses = ['left','right','prev','next']; | ||
Array.from(slides).map(function (slide,idx) { | ||
hasClass(slide,'active') && setActivePage( idx ); | ||
itemClasses.map(function (cls) { return removeClass(slide,("carousel-item-" + cls)); }); | ||
}); | ||
clearInterval(vars.timer); | ||
toggleEvents(off); | ||
toggleTouchEvents(off); | ||
afterSwipe(); | ||
vars = {}; | ||
delete element.Carousel; | ||
}; | ||
componentInit(function (){ | ||
element = queryElement(element); | ||
alert = element.closest('.alert'); | ||
element.Alert && element.Alert.dispose(); | ||
if ( !element.Alert ) { | ||
on(element, 'click', clickHandler); | ||
tryWrapper(function (){ | ||
element = queryElement( element ); | ||
element.Carousel && element.Carousel.dispose(); | ||
slides = element.getElementsByClassName('carousel-item'); | ||
leftArrow = element.getElementsByClassName('carousel-control-prev')[0]; | ||
rightArrow = element.getElementsByClassName('carousel-control-next')[0]; | ||
indicator = element.getElementsByClassName('carousel-indicators')[0]; | ||
indicators = indicator && indicator.getElementsByTagName( "LI" ) || []; | ||
if (slides.length < 2) { return; } | ||
var | ||
intervalAttribute = element.getAttribute('data-interval'), | ||
touchData = element.getAttribute('data-touch') === 'false' ? 0 : 1, | ||
intervalData = intervalAttribute === 'false' ? 0 : parseInt(intervalAttribute), | ||
pauseData = element.getAttribute('data-pause') === 'hover' || false, | ||
keyboardData = element.getAttribute('data-keyboard') === 'true' || false, | ||
intervalOption = options.interval, | ||
touchOption = options.touch; | ||
ops = {}; | ||
ops.keyboard = options.keyboard === true || keyboardData; | ||
ops.pause = (options.pause === 'hover' || pauseData) ? 'hover' : false; | ||
ops.touch = touchOption || touchData; | ||
ops.interval = typeof intervalOption === 'number' ? intervalOption | ||
: intervalOption === false || intervalData === 0 || intervalData === false ? 0 | ||
: isNaN(intervalData) ? 5000 | ||
: intervalData; | ||
if (self.getActiveIndex()<0) { | ||
slides.length && addClass(slides[0],'active'); | ||
indicators.length && setActivePage(0); | ||
} | ||
self.element = element; | ||
element.Alert = self; | ||
}); | ||
vars = {}; | ||
vars.direction = null; | ||
vars.swipeDirection = null; | ||
vars.index = 0; | ||
vars.timer = null; | ||
vars.isSliding = 0; | ||
vars.isTouch = 0; | ||
vars.touchSlides = []; | ||
vars.touchPosition = { | ||
startX : 0, | ||
currentX : 0, | ||
endX : 0 | ||
}; | ||
getTouchSlides(); | ||
toggleEvents(on); | ||
if ( ops.interval ){ self.cycle(); } | ||
element.Carousel = self; | ||
},"BSN.Carousel"); | ||
} | ||
componentsInit.Carousel = [ Carousel, '[data-ride="carousel"]' ]; | ||
document.body ? initCallback() : one( document, 'DOMContentLoaded', initCallback ); | ||
var index_custom = { | ||
Alert: Alert, | ||
Carousel: Carousel, | ||
Version: version | ||
@@ -151,0 +506,0 @@ }; |
{ | ||
"name": "bootstrap.native", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Native JavaScript for Bootstrap, the sweetest JavaScript library without jQuery.", | ||
@@ -5,0 +5,0 @@ "main": "dist/bootstrap-native.js", |
# Native JavaScript for Bootstrap | ||
This is a library developed with native JavaScript for **Bootstrap 4** series, featuring superior performance compared to the original jQuery Plugins. | ||
The faster, lighter and more secure set of JavaScript components for **Bootstrap 4**, developed on modern ES6/ES7 standards. | ||
The **bootstrap.native** library comes packed with build tools and well documented. | ||
@@ -9,3 +10,3 @@ [![NPM Version](https://img.shields.io/npm/v/bootstrap.native.svg?style=flat-square)](https://www.npmjs.com/package/bootstrap.native) | ||
The library is around ***25Kb*** minified and ***7.5Kb*** gZipped. See <a href="http://thednp.github.io/bootstrap.native/">demo</a> for scripting examples and instructions. | ||
The library is around ***25Kb*** minified and ***7.5Kb*** gZipped. See <a href="http://thednp.github.io/bootstrap.native/">the demo</a> for components guidelines and examples, or the [Wiki/How to use](https://github.com/thednp/bootstrap.native/wiki/How-to-use) on how to use the library or create custom builds. | ||
@@ -15,5 +16,14 @@ If you use webpack, here is the accompanying [webpack loader](https://github.com/jonathanfleckenstein/bootstrap.native-loader). | ||
# Wiki | ||
Please check the `bootstrap.native` Wiki pages, they're updated with every new commit: | ||
Please check the `bootstrap.native` Wiki pages, they're updated with almost every new commit: | ||
* [Acknowledgements](https://github.com/thednp/bootstrap.native/wiki/Acknowledgements) - A quick note on some of the similarities and differences with the original jQuery plugins. Nothing to worry about, but still good to know all the tricks on how to maximize your workflow. | ||
* [How to use](https://github.com/thednp/bootstrap.native/wiki/How-to-use) - An in depth guide on how to use it with stuff like `npm`, `RequireJS` or `CDN` links. | ||
* [How to use](https://github.com/thednp/bootstrap.native/wiki/How-to-use) - An in depth guide on how to use the library. | ||
* [CDN Links](https://github.com/thednp/bootstrap.native/wiki/How-to-use#load-from-cdn) | ||
* [Locally Hosted](https://github.com/thednp/bootstrap.native/wiki/How-to-use#working-locally) | ||
* [ES5 Example](https://github.com/thednp/bootstrap.native/wiki/How-to-use#es5-basic-example) | ||
* [ES6 Example](https://github.com/thednp/bootstrap.native/wiki/How-to-use#es6es7-basic-example) | ||
* [NPM Installation](https://github.com/thednp/bootstrap.native/wiki/How-to-use#npm) | ||
* [Custom Builds](https://github.com/thednp/bootstrap.native/wiki/How-to-use#custom-builds) | ||
* [Dynamic Content](https://github.com/thednp/bootstrap.native/wiki/How-to-use#dynamic-content) | ||
* [RequireJS/CommonJS](https://github.com/thednp/bootstrap.native/wiki/How-to-use#requirejs-commonjs) | ||
* [Factory Methods](https://github.com/thednp/bootstrap.native/wiki/How-to-use#note-about-the-factory-methods) | ||
* [Browser support](https://github.com/thednp/bootstrap.native/wiki/Browser-support) - A word on how to enable the library for legacy browsers. | ||
@@ -20,0 +30,0 @@ * [FAQs](https://github.com/thednp/bootstrap.native/wiki/FAQs) - A short list of frequent asked questions regarding the use of the library. |
@@ -32,3 +32,3 @@ | ||
// internal variables | ||
vars, ops = {}, | ||
vars, ops, | ||
@@ -102,3 +102,3 @@ // custom events | ||
slides.length > 1 && action( element, touchEvents.start, touchDownHandler, passiveHandler ); | ||
ops.touch && slides.length > 1 && action( element, touchEvents.start, touchDownHandler, passiveHandler ); | ||
@@ -268,5 +268,3 @@ rightArrow && action( rightArrow, 'click', controlsHandler ); | ||
Array.from(slides).map((slide,idx) => { | ||
if (hasClass(slide,'active')){ | ||
setActivePage( idx ); | ||
} | ||
hasClass(slide,'active') && setActivePage( idx ) | ||
itemClasses.map(cls => removeClass(slide,`carousel-item-${cls}`)) | ||
@@ -278,18 +276,6 @@ }) | ||
vars = {}; | ||
ops = {}; | ||
delete element.Carousel; | ||
} | ||
// set initial state | ||
vars = {} | ||
vars.direction = 'left'; | ||
vars.index = 0; | ||
vars.timer = null; | ||
vars.isSliding = false; | ||
vars.isTouch = false; | ||
vars.touchPosition = { | ||
startX : 0, | ||
currentX : 0, | ||
endX : 0 | ||
} | ||
// init | ||
@@ -302,13 +288,4 @@ tryWrapper(()=>{ | ||
// reset on re-init | ||
element.Carousel && element.Carousel.dispose(); | ||
element.Carousel && element.Carousel.dispose(); | ||
// options | ||
let | ||
// DATA API | ||
intervalAttribute = element.getAttribute('data-interval'), | ||
intervalOption = options.interval, | ||
intervalData = intervalAttribute === 'false' ? 0 : parseInt(intervalAttribute), | ||
pauseData = element.getAttribute('data-pause') === 'hover' || false, | ||
keyboardData = element.getAttribute('data-keyboard') === 'true' || false | ||
// carousel elements | ||
@@ -321,18 +298,29 @@ slides = element.getElementsByClassName('carousel-item') | ||
// invalidate when not enough items | ||
if (slides.length < 2) { return } | ||
// check options | ||
let | ||
// DATA API | ||
intervalAttribute = element.getAttribute('data-interval'), | ||
intervalData = intervalAttribute === 'false' ? 0 : parseInt(intervalAttribute), | ||
touchData = element.getAttribute('data-touch') === 'false' ? 0 : 1, | ||
pauseData = element.getAttribute('data-pause') === 'hover' || false, | ||
keyboardData = element.getAttribute('data-keyboard') === 'true' || false, | ||
// JS options | ||
intervalOption = options.interval, | ||
touchOption = options.touch; | ||
// set instance options | ||
ops = {}; | ||
ops.keyboard = options.keyboard === true || keyboardData; | ||
ops.pause = (options.pause === 'hover' || pauseData) ? 'hover' : false; // false / hover | ||
ops.touch = touchOption || touchData | ||
ops.interval = typeof intervalOption === 'number' ? intervalOption | ||
: intervalOption === false || intervalData === 0 || intervalData === false ? 0 | ||
: isNaN(intervalData) ? 5000 // bootstrap carousel default interval | ||
: intervalData; | ||
: intervalOption === false || intervalData === 0 || intervalData === false ? 0 | ||
: isNaN(intervalData) ? 5000 // bootstrap carousel default interval | ||
: intervalData; | ||
// invalidate when not enough items | ||
if (slides.length < 2) { return; } | ||
// prevent adding event handlers twice | ||
if ( !element.Carousel ) { | ||
toggleEvents(on); | ||
} | ||
// set first slide active if none | ||
@@ -343,4 +331,20 @@ if (self.getActiveIndex()<0) { | ||
} | ||
// set initial state | ||
vars = {} | ||
vars.direction = 'left'; | ||
vars.index = 0; | ||
vars.timer = null; | ||
vars.isSliding = false; | ||
vars.isTouch = false; | ||
vars.touchPosition = { | ||
startX : 0, | ||
currentX : 0, | ||
endX : 0 | ||
} | ||
// attach event handlers | ||
toggleEvents(on); | ||
// start to cycle if set | ||
// start to cycle if interval is set | ||
if ( ops.interval ){ self.cycle(); } | ||
@@ -351,4 +355,2 @@ | ||
},"BSN.Carousel") | ||
} | ||
} |
@@ -48,11 +48,14 @@ | ||
bodyPad = parseInt(getComputedStyle(document.body).paddingRight), | ||
modalOverflow = modal.clientHeight !== modal.scrollHeight, | ||
itemPad; | ||
bodyOverflow = document.documentElement.clientHeight !== document.documentElement.scrollHeight | ||
|| document.body.clientHeight !== document.body.scrollHeight, | ||
modalOverflow = modal.clientHeight !== modal.scrollHeight; | ||
modal.style.paddingRight = (!modalOverflow && scrollBarWidth?`${scrollBarWidth}px`:''); | ||
document.body.style.paddingRight = `${bodyPad + (openModal ?0:scrollBarWidth)}px`; | ||
scrollBarWidth = measureScrollbar(); | ||
modal.style.paddingRight = !modalOverflow && scrollBarWidth ? `${scrollBarWidth}px` : ''; | ||
document.body.style.paddingRight = modalOverflow || bodyOverflow ? `${bodyPad + (openModal ? 0:scrollBarWidth)}px` : ''; | ||
fixedItems.length && fixedItems.map(fixed=>{ | ||
itemPad = getComputedStyle(fixed).paddingRight; | ||
fixed.style.paddingRight = `${parseInt(itemPad) + (openModal?0:scrollBarWidth)}px`; | ||
let itemPad = getComputedStyle(fixed).paddingRight; | ||
fixed.style.paddingRight = modalOverflow || bodyOverflow ? `${parseInt(itemPad) + (openModal?0:scrollBarWidth)}px` : `${parseInt(itemPad)}px`; | ||
}) | ||
@@ -77,3 +80,3 @@ } | ||
function checkScrollbar() { | ||
scrollBarWidth = measureScrollbar(); | ||
} | ||
@@ -107,3 +110,2 @@ function createOverlay() { | ||
checkScrollbar(); | ||
setScrollbar(); | ||
@@ -234,3 +236,2 @@ !document.getElementsByClassName('modal show')[0] && addClass(document.body,'modal-open'); | ||
if (hasClass(modal,'show')) { | ||
checkScrollbar(); | ||
setScrollbar(); | ||
@@ -237,0 +238,0 @@ } |
@@ -146,3 +146,3 @@ | ||
} | ||
function provideFocus () { | ||
function forceFocus () { | ||
if (popover === null) { element.focus(); } | ||
@@ -158,3 +158,3 @@ } | ||
} else if ('focus' == ops.trigger) { | ||
isIphone && action( element, 'click', provideFocus ); | ||
isIphone && action( element, 'click', forceFocus ); | ||
action( element, ops.trigger, self.toggle ); | ||
@@ -161,0 +161,0 @@ } |
// use npm run custom INPUTFILE:src/index.yourFILE.js,OUTPUTFILE:dist/bootstrap-native-yourFileName.js,MIN:false,FORMAT:umd | ||
// import {initCallback,removeDataAPI} from './util/callbacks.js' | ||
// import {componentsInit} from './util/globals.js' | ||
import {initCallback,removeDataAPI} from './util/callbacks.js' | ||
import {componentsInit} from './util/globals.js' | ||
// import {Util} from './util/util.js' | ||
import {version as Version} from './../package.json' | ||
// import { one } from 'shorter-js' | ||
import { one } from 'shorter-js/src/event/one.js' | ||
import Alert from './components/alert-native.js' | ||
// import Alert from './components/alert-native.js' | ||
// import Button from './components/button-native.js' | ||
// import Carousel from './components/carousel-native.js' | ||
import Carousel from './components/carousel-extended.js' | ||
// import Collapse from './components/collapse-native.js' | ||
@@ -23,3 +24,3 @@ // import Dropdown from './components/dropdown-native.js' | ||
// componentsInit.Button = [ Button, '[data-toggle="buttons"]' ] | ||
// componentsInit.Carousel = [ Carousel, '[data-ride="carousel"]' ] | ||
componentsInit.Carousel = [ Carousel, '[data-ride="carousel"]' ] | ||
// componentsInit.Collapse = [ Collapse, '[data-toggle="collapse"]' ] | ||
@@ -35,8 +36,8 @@ // componentsInit.Dropdown = [ Dropdown, '[data-toggle="dropdown"]'] | ||
// bulk initialize all components | ||
// document.body ? initCallback() : one( document, 'DOMContentLoaded', initCallback ); | ||
document.body ? initCallback() : one( document, 'DOMContentLoaded', initCallback ); | ||
export default { | ||
Alert, | ||
// Alert, | ||
// Button, | ||
// Carousel, | ||
Carousel, | ||
// Collapse, | ||
@@ -43,0 +44,0 @@ // Dropdown, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
330554
32
6707
36