bootstrap-v4-rtl
Advanced tools
Comparing version 4.4.1-2 to 4.5.2-1
/*! | ||
* Bootstrap v4.4.1-1 (https://github.com/MahdiMajidzadeh/bootstrap-v4-rtl) | ||
* Copyright 2011-2020 Mahdi Majidzadeh | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap v4.5.2 (https://getbootstrap.com/) | ||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e((t=t||self).bootstrap={},t.jQuery,t.Popper)}(this,function(t,g,u){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function s(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function e(e,t){var n,i=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)),i}function l(o){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?e(Object(r),!0).forEach(function(t){var e,n,i;e=o,i=r[n=t],n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(r,t))})}return o}g=g&&g.hasOwnProperty("default")?g.default:g,u=u&&u.hasOwnProperty("default")?u.default:u;var n="transitionend";function o(t){var e=this,n=!1;return g(this).one(_.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||_.triggerTransitionEnd(e)},t),this}var _={TRANSITION_END:"bsTransitionEnd",getUID:function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},getSelectorFromElement:function(t){var e,n=t.getAttribute("data-target");n&&"#"!==n||(n=(e=t.getAttribute("href"))&&"#"!==e?e.trim():"");try{return document.querySelector(n)?n:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=g(t).css("transition-duration"),n=g(t).css("transition-delay"),i=parseFloat(e),o=parseFloat(n);return i||o?(e=e.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(e)+parseFloat(n))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){g(t).trigger(n)},supportsTransitionEnd:function(){return Boolean(n)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],r=e[i],s=r&&_.isElement(r)?"element":(a=r,{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(o).test(s))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+s+'" but expected type "'+o+'".')}var a},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"!=typeof t.getRootNode)return t instanceof ShadowRoot?t:t.parentNode?_.findShadowRoot(t.parentNode):null;var e=t.getRootNode();return e instanceof ShadowRoot?e:null},jQueryDetection:function(){if("undefined"==typeof g)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=g.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||4<=t[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};_.jQueryDetection(),g.fn.emulateTransitionEnd=o,g.event.special[_.TRANSITION_END]={bindType:n,delegateType:n,handle:function(t){if(g(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var r="alert",a="bs.alert",c="."+a,h=g.fn[r],f={CLOSE:"close"+c,CLOSED:"closed"+c,CLICK_DATA_API:"click"+c+".data-api"},d="alert",m="fade",p="show",v=function(){function i(t){this._element=t}var t=i.prototype;return t.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},t.dispose=function(){g.removeData(this._element,a),this._element=null},t._getRootElement=function(t){var e=_.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n=n||g(t).closest("."+d)[0]},t._triggerCloseEvent=function(t){var e=g.Event(f.CLOSE);return g(t).trigger(e),e},t._removeElement=function(e){var t,n=this;g(e).removeClass(p),g(e).hasClass(m)?(t=_.getTransitionDurationFromElement(e),g(e).one(_.TRANSITION_END,function(t){return n._destroyElement(e,t)}).emulateTransitionEnd(t)):this._destroyElement(e)},t._destroyElement=function(t){g(t).detach().trigger(f.CLOSED).remove()},i._jQueryInterface=function(n){return this.each(function(){var t=g(this),e=t.data(a);e||(e=new i(this),t.data(a,e)),"close"===n&&e[n](this)})},i._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},s(i,null,[{key:"VERSION",get:function(){return"4.4.1"}}]),i}();g(document).on(f.CLICK_DATA_API,'[data-dismiss="alert"]',v._handleDismiss(new v)),g.fn[r]=v._jQueryInterface,g.fn[r].Constructor=v,g.fn[r].noConflict=function(){return g.fn[r]=h,v._jQueryInterface};var y="button",E="bs.button",C="."+E,T=".data-api",b=g.fn[y],S="active",D="btn",I="focus",w='[data-toggle^="button"]',A='[data-toggle="buttons"]',N='[data-toggle="button"]',O='[data-toggle="buttons"] .btn',k='input:not([type="hidden"])',P=".active",L=".btn",j={CLICK_DATA_API:"click"+C+T,FOCUS_BLUR_DATA_API:"focus"+C+T+" blur"+C+T,LOAD_DATA_API:"load"+C+T},H=function(){function n(t){this._element=t}var t=n.prototype;return t.toggle=function(){var t,e,n=!0,i=!0,o=g(this._element).closest(A)[0];!o||(t=this._element.querySelector(k))&&("radio"===t.type?t.checked&&this._element.classList.contains(S)?n=!1:(e=o.querySelector(P))&&g(e).removeClass(S):("checkbox"!==t.type||"LABEL"===this._element.tagName&&t.checked===this._element.classList.contains(S))&&(n=!1),n&&(t.checked=!this._element.classList.contains(S),g(t).trigger("change")),t.focus(),i=!1),this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(i&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(S)),n&&g(this._element).toggleClass(S))},t.dispose=function(){g.removeData(this._element,E),this._element=null},n._jQueryInterface=function(e){return this.each(function(){var t=g(this).data(E);t||(t=new n(this),g(this).data(E,t)),"toggle"===e&&t[e]()})},s(n,null,[{key:"VERSION",get:function(){return"4.4.1"}}]),n}();g(document).on(j.CLICK_DATA_API,w,function(t){var e=t.target;if(g(e).hasClass(D)||(e=g(e).closest(L)[0]),!e||e.hasAttribute("disabled")||e.classList.contains("disabled"))t.preventDefault();else{var n=e.querySelector(k);if(n&&(n.hasAttribute("disabled")||n.classList.contains("disabled")))return void t.preventDefault();H._jQueryInterface.call(g(e),"toggle")}}).on(j.FOCUS_BLUR_DATA_API,w,function(t){var e=g(t.target).closest(L)[0];g(e).toggleClass(I,/^focus(in)?$/.test(t.type))}),g(window).on(j.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(O)),e=0,n=t.length;e<n;e++){var i=t[e],o=i.querySelector(k);o.checked||o.hasAttribute("checked")?i.classList.add(S):i.classList.remove(S)}for(var r=0,s=(t=[].slice.call(document.querySelectorAll(N))).length;r<s;r++){var a=t[r];"true"===a.getAttribute("aria-pressed")?a.classList.add(S):a.classList.remove(S)}}),g.fn[y]=H._jQueryInterface,g.fn[y].Constructor=H,g.fn[y].noConflict=function(){return g.fn[y]=b,H._jQueryInterface};var R="carousel",x="bs.carousel",F="."+x,U=".data-api",W=g.fn[R],q={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},M={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},K="next",Q="prev",B="left",V="right",Y={SLIDE:"slide"+F,SLID:"slid"+F,KEYDOWN:"keydown"+F,MOUSEENTER:"mouseenter"+F,MOUSELEAVE:"mouseleave"+F,TOUCHSTART:"touchstart"+F,TOUCHMOVE:"touchmove"+F,TOUCHEND:"touchend"+F,POINTERDOWN:"pointerdown"+F,POINTERUP:"pointerup"+F,DRAG_START:"dragstart"+F,LOAD_DATA_API:"load"+F+U,CLICK_DATA_API:"click"+F+U},z="carousel",X="active",$="slide",G="carousel-item-right",J="carousel-item-left",Z="carousel-item-next",tt="carousel-item-prev",et="pointer-event",nt=".active",it=".active.carousel-item",ot=".carousel-item",rt=".carousel-item img",st=".carousel-item-next, .carousel-item-prev",at=".carousel-indicators",lt="[data-slide], [data-slide-to]",ct='[data-ride="carousel"]',ht={TOUCH:"touch",PEN:"pen"},ut=function(){function r(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(at),this._touchSupported="ontouchstart"in document.documentElement||0<navigator.maxTouchPoints,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var t=r.prototype;return t.next=function(){this._isSliding||this._slide(K)},t.nextWhenVisible=function(){!document.hidden&&g(this._element).is(":visible")&&"hidden"!==g(this._element).css("visibility")&&this.next()},t.prev=function(){this._isSliding||this._slide(Q)},t.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(st)&&(_.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},t.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},t.to=function(t){var e=this;this._activeElement=this._element.querySelector(it);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)g(this._element).one(Y.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=n<t?K:Q;this._slide(i,this._items[t])}},t.dispose=function(){g(this._element).off(F),g.removeData(this._element,x),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},t._getConfig=function(t){return t=l(l({},q),t),_.typeCheckConfig(R,t,M),t},t._handleSwipe=function(){var t,e=Math.abs(this.touchDeltaX);e<=40||(t=e/this.touchDeltaX,(this.touchDeltaX=0)<t&&this.prev(),t<0&&this.next())},t._addEventListeners=function(){var e=this;this._config.keyboard&&g(this._element).on(Y.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&g(this._element).on(Y.MOUSEENTER,function(t){return e.pause(t)}).on(Y.MOUSELEAVE,function(t){return e.cycle(t)}),this._config.touch&&this._addTouchEventListeners()},t._addTouchEventListeners=function(){var t,e,n=this;this._touchSupported&&(t=function(t){n._pointerEvent&&ht[t.originalEvent.pointerType.toUpperCase()]?n.touchStartX=t.originalEvent.clientX:n._pointerEvent||(n.touchStartX=t.originalEvent.touches[0].clientX)},e=function(t){n._pointerEvent&&ht[t.originalEvent.pointerType.toUpperCase()]&&(n.touchDeltaX=t.originalEvent.clientX-n.touchStartX),n._handleSwipe(),"hover"===n._config.pause&&(n.pause(),n.touchTimeout&&clearTimeout(n.touchTimeout),n.touchTimeout=setTimeout(function(t){return n.cycle(t)},500+n._config.interval))},g(this._element.querySelectorAll(rt)).on(Y.DRAG_START,function(t){return t.preventDefault()}),this._pointerEvent?(g(this._element).on(Y.POINTERDOWN,t),g(this._element).on(Y.POINTERUP,e),this._element.classList.add(et)):(g(this._element).on(Y.TOUCHSTART,t),g(this._element).on(Y.TOUCHMOVE,function(t){var e;(e=t).originalEvent.touches&&1<e.originalEvent.touches.length?n.touchDeltaX=0:n.touchDeltaX=e.originalEvent.touches[0].clientX-n.touchStartX}),g(this._element).on(Y.TOUCHEND,e)))},t._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},t._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(ot)):[],this._items.indexOf(t)},t._getItemByDirection=function(t,e){var n=t===K,i=t===Q,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return e;var s=(o+(t===Q?-1:1))%this._items.length;return-1==s?this._items[this._items.length-1]:this._items[s]},t._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(this._element.querySelector(it)),o=g.Event(Y.SLIDE,{relatedTarget:t,direction:e,from:i,to:n});return g(this._element).trigger(o),o},t._setActiveIndicatorElement=function(t){var e,n;this._indicatorsElement&&(e=[].slice.call(this._indicatorsElement.querySelectorAll(nt)),g(e).removeClass(X),(n=this._indicatorsElement.children[this._getItemIndex(t)])&&g(n).addClass(X))},t._slide=function(t,e){var n,i,o,r,s,a=this,l=this._element.querySelector(it),c=this._getItemIndex(l),h=e||l&&this._getItemByDirection(t,l),u=this._getItemIndex(h),f=Boolean(this._interval),d=t===K?(n=J,i=Z,B):(n=G,i=tt,V);h&&g(h).hasClass(X)?this._isSliding=!1:this._triggerSlideEvent(h,d).isDefaultPrevented()||l&&h&&(this._isSliding=!0,f&&this.pause(),this._setActiveIndicatorElement(h),o=g.Event(Y.SLID,{relatedTarget:h,direction:d,from:c,to:u}),g(this._element).hasClass($)?(g(h).addClass(i),_.reflow(h),g(l).addClass(n),g(h).addClass(n),(r=parseInt(h.getAttribute("data-interval"),10))?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=r):this._config.interval=this._config.defaultInterval||this._config.interval,s=_.getTransitionDurationFromElement(l),g(l).one(_.TRANSITION_END,function(){g(h).removeClass(n+" "+i).addClass(X),g(l).removeClass(X+" "+i+" "+n),a._isSliding=!1,setTimeout(function(){return g(a._element).trigger(o)},0)}).emulateTransitionEnd(s)):(g(l).removeClass(X),g(h).addClass(X),this._isSliding=!1,g(this._element).trigger(o)),f&&this.cycle())},r._jQueryInterface=function(i){return this.each(function(){var t=g(this).data(x),e=l(l({},q),g(this).data());"object"==typeof i&&(e=l(l({},e),i));var n="string"==typeof i?i:e.slide;if(t||(t=new r(this,e),g(this).data(x,t)),"number"==typeof i)t.to(i);else if("string"==typeof n){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}else e.interval&&e.ride&&(t.pause(),t.cycle())})},r._dataApiClickHandler=function(t){var e,n,i,o=_.getSelectorFromElement(this);!o||(e=g(o)[0])&&g(e).hasClass(z)&&(n=l(l({},g(e).data()),g(this).data()),(i=this.getAttribute("data-slide-to"))&&(n.interval=!1),r._jQueryInterface.call(g(e),n),i&&g(e).data(x).to(i),t.preventDefault())},s(r,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return q}}]),r}();g(document).on(Y.CLICK_DATA_API,lt,ut._dataApiClickHandler),g(window).on(Y.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(ct)),e=0,n=t.length;e<n;e++){var i=g(t[e]);ut._jQueryInterface.call(i,i.data())}}),g.fn[R]=ut._jQueryInterface,g.fn[R].Constructor=ut,g.fn[R].noConflict=function(){return g.fn[R]=W,ut._jQueryInterface};var ft="collapse",dt="bs.collapse",gt="."+dt,_t=g.fn[ft],mt={toggle:!0,parent:""},pt={toggle:"boolean",parent:"(string|element)"},vt={SHOW:"show"+gt,SHOWN:"shown"+gt,HIDE:"hide"+gt,HIDDEN:"hidden"+gt,CLICK_DATA_API:"click"+gt+".data-api"},yt="show",Et="collapse",Ct="collapsing",Tt="collapsed",bt="width",St="height",Dt=".show, .collapsing",It='[data-toggle="collapse"]',wt=function(){function a(e,t){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(t),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var n=[].slice.call(document.querySelectorAll(It)),i=0,o=n.length;i<o;i++){var r=n[i],s=_.getSelectorFromElement(r),a=[].slice.call(document.querySelectorAll(s)).filter(function(t){return t===e});null!==s&&0<a.length&&(this._selector=s,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var t=a.prototype;return t.toggle=function(){g(this._element).hasClass(yt)?this.hide():this.show()},t.show=function(){var t,e,n,i,o,r,s=this;this._isTransitioning||g(this._element).hasClass(yt)||(this._parent&&0===(t=[].slice.call(this._parent.querySelectorAll(Dt)).filter(function(t){return"string"==typeof s._config.parent?t.getAttribute("data-parent")===s._config.parent:t.classList.contains(Et)})).length&&(t=null),t&&(e=g(t).not(this._selector).data(dt))&&e._isTransitioning||(n=g.Event(vt.SHOW),g(this._element).trigger(n),n.isDefaultPrevented()||(t&&(a._jQueryInterface.call(g(t).not(this._selector),"hide"),e||g(t).data(dt,null)),i=this._getDimension(),g(this._element).removeClass(Et).addClass(Ct),this._element.style[i]=0,this._triggerArray.length&&g(this._triggerArray).removeClass(Tt).attr("aria-expanded",!0),this.setTransitioning(!0),o="scroll"+(i[0].toUpperCase()+i.slice(1)),r=_.getTransitionDurationFromElement(this._element),g(this._element).one(_.TRANSITION_END,function(){g(s._element).removeClass(Ct).addClass(Et).addClass(yt),s._element.style[i]="",s.setTransitioning(!1),g(s._element).trigger(vt.SHOWN)}).emulateTransitionEnd(r),this._element.style[i]=this._element[o]+"px")))},t.hide=function(){var t=this;if(!this._isTransitioning&&g(this._element).hasClass(yt)){var e=g.Event(vt.HIDE);if(g(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",_.reflow(this._element),g(this._element).addClass(Ct).removeClass(Et).removeClass(yt);var i=this._triggerArray.length;if(0<i)for(var o=0;o<i;o++){var r=this._triggerArray[o],s=_.getSelectorFromElement(r);null!==s&&(g([].slice.call(document.querySelectorAll(s))).hasClass(yt)||g(r).addClass(Tt).attr("aria-expanded",!1))}this.setTransitioning(!0);this._element.style[n]="";var a=_.getTransitionDurationFromElement(this._element);g(this._element).one(_.TRANSITION_END,function(){t.setTransitioning(!1),g(t._element).removeClass(Ct).addClass(Et).trigger(vt.HIDDEN)}).emulateTransitionEnd(a)}}},t.setTransitioning=function(t){this._isTransitioning=t},t.dispose=function(){g.removeData(this._element,dt),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},t._getConfig=function(t){return(t=l(l({},mt),t)).toggle=Boolean(t.toggle),_.typeCheckConfig(ft,t,pt),t},t._getDimension=function(){return g(this._element).hasClass(bt)?bt:St},t._getParent=function(){var t,n=this;_.isElement(this._config.parent)?(t=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(t=this._config.parent[0])):t=document.querySelector(this._config.parent);var e='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',i=[].slice.call(t.querySelectorAll(e));return g(i).each(function(t,e){n._addAriaAndCollapsedClass(a._getTargetFromElement(e),[e])}),t},t._addAriaAndCollapsedClass=function(t,e){var n=g(t).hasClass(yt);e.length&&g(e).toggleClass(Tt,!n).attr("aria-expanded",n)},a._getTargetFromElement=function(t){var e=_.getSelectorFromElement(t);return e?document.querySelector(e):null},a._jQueryInterface=function(i){return this.each(function(){var t=g(this),e=t.data(dt),n=l(l(l({},mt),t.data()),"object"==typeof i&&i?i:{});if(!e&&n.toggle&&/show|hide/.test(i)&&(n.toggle=!1),e||(e=new a(this,n),t.data(dt,e)),"string"==typeof i){if("undefined"==typeof e[i])throw new TypeError('No method named "'+i+'"');e[i]()}})},s(a,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return mt}}]),a}();g(document).on(vt.CLICK_DATA_API,It,function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var n=g(this),e=_.getSelectorFromElement(this),i=[].slice.call(document.querySelectorAll(e));g(i).each(function(){var t=g(this),e=t.data(dt)?"toggle":n.data();wt._jQueryInterface.call(t,e)})}),g.fn[ft]=wt._jQueryInterface,g.fn[ft].Constructor=wt,g.fn[ft].noConflict=function(){return g.fn[ft]=_t,wt._jQueryInterface};var At="dropdown",Nt="bs.dropdown",Ot="."+Nt,kt=".data-api",Pt=g.fn[At],Lt=new RegExp("38|40|27"),jt={HIDE:"hide"+Ot,HIDDEN:"hidden"+Ot,SHOW:"show"+Ot,SHOWN:"shown"+Ot,CLICK:"click"+Ot,CLICK_DATA_API:"click"+Ot+kt,KEYDOWN_DATA_API:"keydown"+Ot+kt,KEYUP_DATA_API:"keyup"+Ot+kt},Ht="disabled",Rt="show",xt="dropup",Ft="dropright",Ut="dropleft",Wt="dropdown-menu-right",qt="position-static",Mt='[data-toggle="dropdown"]',Kt=".dropdown form",Qt=".dropdown-menu",Bt=".navbar-nav",Vt=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Yt="top-start",zt="top-end",Xt="bottom-start",$t="bottom-end",Gt="right-start",Jt="left-start",Zt={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},te={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},ee=function(){function c(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var t=c.prototype;return t.toggle=function(){var t;this._element.disabled||g(this._element).hasClass(Ht)||(t=g(this._menu).hasClass(Rt),c._clearMenus(),t||this.show(!0))},t.show=function(t){if(void 0===t&&(t=!1),!(this._element.disabled||g(this._element).hasClass(Ht)||g(this._menu).hasClass(Rt))){var e={relatedTarget:this._element},n=g.Event(jt.SHOW,e),i=c._getParentFromElement(this._element);if(g(i).trigger(n),!n.isDefaultPrevented()){if(!this._inNavbar&&t){if("undefined"==typeof u)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)");var o=this._element;"parent"===this._config.reference?o=i:_.isElement(this._config.reference)&&(o=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(o=this._config.reference[0])),"scrollParent"!==this._config.boundary&&g(i).addClass(qt),this._popper=new u(o,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===g(i).closest(Bt).length&&g(document.body).children().on("mouseover",null,g.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),g(this._menu).toggleClass(Rt),g(i).toggleClass(Rt).trigger(g.Event(jt.SHOWN,e))}}},t.hide=function(){var t,e,n;this._element.disabled||g(this._element).hasClass(Ht)||!g(this._menu).hasClass(Rt)||(t={relatedTarget:this._element},e=g.Event(jt.HIDE,t),n=c._getParentFromElement(this._element),g(n).trigger(e),e.isDefaultPrevented()||(this._popper&&this._popper.destroy(),g(this._menu).toggleClass(Rt),g(n).toggleClass(Rt).trigger(g.Event(jt.HIDDEN,t))))},t.dispose=function(){g.removeData(this._element,Nt),g(this._element).off(Ot),this._element=null,(this._menu=null)!==this._popper&&(this._popper.destroy(),this._popper=null)},t.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},t._addEventListeners=function(){var e=this;g(this._element).on(jt.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},t._getConfig=function(t){return t=l(l(l({},this.constructor.Default),g(this._element).data()),t),_.typeCheckConfig(At,t,this.constructor.DefaultType),t},t._getMenuElement=function(){var t;return this._menu||(t=c._getParentFromElement(this._element))&&(this._menu=t.querySelector(Qt)),this._menu},t._getPlacement=function(){var t=g(this._element.parentNode),e=Xt;return t.hasClass(xt)?(e=Yt,g(this._menu).hasClass(Wt)&&(e=zt)):t.hasClass(Ft)?e=Gt:t.hasClass(Ut)?e=Jt:g(this._menu).hasClass(Wt)&&(e=$t),e},t._detectNavbar=function(){return 0<g(this._element).closest(".navbar").length},t._getOffset=function(){var e=this,t={};return"function"==typeof this._config.offset?t.fn=function(t){return t.offsets=l(l({},t.offsets),e._config.offset(t.offsets,e._element)||{}),t}:t.offset=this._config.offset,t},t._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),l(l({},t),this._config.popperConfig)},c._jQueryInterface=function(e){return this.each(function(){var t=g(this).data(Nt);if(t||(t=new c(this,"object"==typeof e?e:null),g(this).data(Nt,t)),"string"==typeof e){if("undefined"==typeof t[e])throw new TypeError('No method named "'+e+'"');t[e]()}})},c._clearMenus=function(t){if(!t||3!==t.which&&("keyup"!==t.type||9===t.which))for(var e=[].slice.call(document.querySelectorAll(Mt)),n=0,i=e.length;n<i;n++){var o,r,s=c._getParentFromElement(e[n]),a=g(e[n]).data(Nt),l={relatedTarget:e[n]};t&&"click"===t.type&&(l.clickEvent=t),a&&(o=a._menu,g(s).hasClass(Rt)&&(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&9===t.which)&&g.contains(s,t.target)||(r=g.Event(jt.HIDE,l),g(s).trigger(r),r.isDefaultPrevented()||("ontouchstart"in document.documentElement&&g(document.body).children().off("mouseover",null,g.noop),e[n].setAttribute("aria-expanded","false"),a._popper&&a._popper.destroy(),g(o).removeClass(Rt),g(s).removeClass(Rt).trigger(g.Event(jt.HIDDEN,l))))))}},c._getParentFromElement=function(t){var e,n=_.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},c._dataApiKeydownHandler=function(t){if((/input|textarea/i.test(t.target.tagName)?!(32===t.which||27!==t.which&&(40!==t.which&&38!==t.which||g(t.target).closest(Qt).length)):Lt.test(t.which))&&(t.preventDefault(),t.stopPropagation(),!this.disabled&&!g(this).hasClass(Ht))){var e,n=c._getParentFromElement(this),i=g(n).hasClass(Rt);if(i||27!==t.which){if(!i||i&&(27===t.which||32===t.which))return 27===t.which&&(e=n.querySelector(Mt),g(e).trigger("focus")),void g(this).trigger("click");var o,r=[].slice.call(n.querySelectorAll(Vt)).filter(function(t){return g(t).is(":visible")});0!==r.length&&(o=r.indexOf(t.target),38===t.which&&0<o&&o--,40===t.which&&o<r.length-1&&o++,o<0&&(o=0),r[o].focus())}}},s(c,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return Zt}},{key:"DefaultType",get:function(){return te}}]),c}();g(document).on(jt.KEYDOWN_DATA_API,Mt,ee._dataApiKeydownHandler).on(jt.KEYDOWN_DATA_API,Qt,ee._dataApiKeydownHandler).on(jt.CLICK_DATA_API+" "+jt.KEYUP_DATA_API,ee._clearMenus).on(jt.CLICK_DATA_API,Mt,function(t){t.preventDefault(),t.stopPropagation(),ee._jQueryInterface.call(g(this),"toggle")}).on(jt.CLICK_DATA_API,Kt,function(t){t.stopPropagation()}),g.fn[At]=ee._jQueryInterface,g.fn[At].Constructor=ee,g.fn[At].noConflict=function(){return g.fn[At]=Pt,ee._jQueryInterface};var ne="modal",ie="bs.modal",oe="."+ie,re=g.fn[ne],se={backdrop:!0,keyboard:!0,focus:!0,show:!0},ae={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},le={HIDE:"hide"+oe,HIDE_PREVENTED:"hidePrevented"+oe,HIDDEN:"hidden"+oe,SHOW:"show"+oe,SHOWN:"shown"+oe,FOCUSIN:"focusin"+oe,RESIZE:"resize"+oe,CLICK_DISMISS:"click.dismiss"+oe,KEYDOWN_DISMISS:"keydown.dismiss"+oe,MOUSEUP_DISMISS:"mouseup.dismiss"+oe,MOUSEDOWN_DISMISS:"mousedown.dismiss"+oe,CLICK_DATA_API:"click"+oe+".data-api"},ce="modal-dialog-scrollable",he="modal-scrollbar-measure",ue="modal-backdrop",fe="modal-open",de="fade",ge="show",_e="modal-static",me=".modal-dialog",pe=".modal-body",ve='[data-toggle="modal"]',ye='[data-dismiss="modal"]',Ee=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Ce=".sticky-top",Te=function(){function o(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(me),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var t=o.prototype;return t.toggle=function(t){return this._isShown?this.hide():this.show(t)},t.show=function(t){var e,n=this;this._isShown||this._isTransitioning||(g(this._element).hasClass(de)&&(this._isTransitioning=!0),e=g.Event(le.SHOW,{relatedTarget:t}),g(this._element).trigger(e),this._isShown||e.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),g(this._element).on(le.CLICK_DISMISS,ye,function(t){return n.hide(t)}),g(this._dialog).on(le.MOUSEDOWN_DISMISS,function(){g(n._element).one(le.MOUSEUP_DISMISS,function(t){g(t.target).is(n._element)&&(n._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return n._showElement(t)})))},t.hide=function(t){var e,n,i,o=this;t&&t.preventDefault(),this._isShown&&!this._isTransitioning&&(e=g.Event(le.HIDE),g(this._element).trigger(e),this._isShown&&!e.isDefaultPrevented()&&(this._isShown=!1,(n=g(this._element).hasClass(de))&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),g(document).off(le.FOCUSIN),g(this._element).removeClass(ge),g(this._element).off(le.CLICK_DISMISS),g(this._dialog).off(le.MOUSEDOWN_DISMISS),n?(i=_.getTransitionDurationFromElement(this._element),g(this._element).one(_.TRANSITION_END,function(t){return o._hideModal(t)}).emulateTransitionEnd(i)):this._hideModal()))},t.dispose=function(){[window,this._element,this._dialog].forEach(function(t){return g(t).off(oe)}),g(document).off(le.FOCUSIN),g.removeData(this._element,ie),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},t.handleUpdate=function(){this._adjustDialog()},t._getConfig=function(t){return t=l(l({},se),t),_.typeCheckConfig(ne,t,ae),t},t._triggerBackdropTransition=function(){var t=this;if("static"===this._config.backdrop){var e=g.Event(le.HIDE_PREVENTED);if(g(this._element).trigger(e),e.defaultPrevented)return;this._element.classList.add(_e);var n=_.getTransitionDurationFromElement(this._element);g(this._element).one(_.TRANSITION_END,function(){t._element.classList.remove(_e)}).emulateTransitionEnd(n),this._element.focus()}else this.hide()},t._showElement=function(t){var e=this,n=g(this._element).hasClass(de),i=this._dialog?this._dialog.querySelector(pe):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),g(this._dialog).hasClass(ce)&&i?i.scrollTop=0:this._element.scrollTop=0,n&&_.reflow(this._element),g(this._element).addClass(ge),this._config.focus&&this._enforceFocus();function o(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,g(e._element).trigger(s)}var r,s=g.Event(le.SHOWN,{relatedTarget:t});n?(r=_.getTransitionDurationFromElement(this._dialog),g(this._dialog).one(_.TRANSITION_END,o).emulateTransitionEnd(r)):o()},t._enforceFocus=function(){var e=this;g(document).off(le.FOCUSIN).on(le.FOCUSIN,function(t){document!==t.target&&e._element!==t.target&&0===g(e._element).has(t.target).length&&e._element.focus()})},t._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?g(this._element).on(le.KEYDOWN_DISMISS,function(t){27===t.which&&e._triggerBackdropTransition()}):this._isShown||g(this._element).off(le.KEYDOWN_DISMISS)},t._setResizeEvent=function(){var e=this;this._isShown?g(window).on(le.RESIZE,function(t){return e.handleUpdate(t)}):g(window).off(le.RESIZE)},t._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._isTransitioning=!1,this._showBackdrop(function(){g(document.body).removeClass(fe),t._resetAdjustments(),t._resetScrollbar(),g(t._element).trigger(le.HIDDEN)})},t._removeBackdrop=function(){this._backdrop&&(g(this._backdrop).remove(),this._backdrop=null)},t._showBackdrop=function(t){var e,n,i=this,o=g(this._element).hasClass(de)?de:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=ue,o&&this._backdrop.classList.add(o),g(this._backdrop).appendTo(document.body),g(this._element).on(le.CLICK_DISMISS,function(t){i._ignoreBackdropClick?i._ignoreBackdropClick=!1:t.target===t.currentTarget&&i._triggerBackdropTransition()}),o&&_.reflow(this._backdrop),g(this._backdrop).addClass(ge),!t)return;if(!o)return void t();var r=_.getTransitionDurationFromElement(this._backdrop);g(this._backdrop).one(_.TRANSITION_END,t).emulateTransitionEnd(r)}else{!this._isShown&&this._backdrop?(g(this._backdrop).removeClass(ge),e=function(){i._removeBackdrop(),t&&t()},g(this._element).hasClass(de)?(n=_.getTransitionDurationFromElement(this._backdrop),g(this._backdrop).one(_.TRANSITION_END,e).emulateTransitionEnd(n)):e()):t&&t()}},t._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},t._setScrollbar=function(){var t,e,n,i,o=this;this._isBodyOverflowing&&(t=[].slice.call(document.querySelectorAll(Ee)),e=[].slice.call(document.querySelectorAll(Ce)),g(t).each(function(t,e){var n=e.style.paddingRight,i=g(e).css("padding-right");g(e).data("padding-right",n).css("padding-right",parseFloat(i)+o._scrollbarWidth+"px")}),g(e).each(function(t,e){var n=e.style.marginRight,i=g(e).css("margin-right");g(e).data("margin-right",n).css("margin-right",parseFloat(i)-o._scrollbarWidth+"px")}),n=document.body.style.paddingRight,i=g(document.body).css("padding-right"),g(document.body).data("padding-right",n).css("padding-right",parseFloat(i)+this._scrollbarWidth+"px")),g(document.body).addClass(fe)},t._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(Ee));g(t).each(function(t,e){var n=g(e).data("padding-right");g(e).removeData("padding-right"),e.style.paddingRight=n||""});var e=[].slice.call(document.querySelectorAll(""+Ce));g(e).each(function(t,e){var n=g(e).data("margin-right");"undefined"!=typeof n&&g(e).css("margin-right",n).removeData("margin-right")});var n=g(document.body).data("padding-right");g(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},t._getScrollbarWidth=function(){var t=document.createElement("div");t.className=he,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},o._jQueryInterface=function(n,i){return this.each(function(){var t=g(this).data(ie),e=l(l(l({},se),g(this).data()),"object"==typeof n&&n?n:{});if(t||(t=new o(this,e),g(this).data(ie,t)),"string"==typeof n){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n](i)}else e.show&&t.show(i)})},s(o,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return se}}]),o}();g(document).on(le.CLICK_DATA_API,ve,function(t){var e,n=this,i=_.getSelectorFromElement(this);i&&(e=document.querySelector(i));var o=g(e).data(ie)?"toggle":l(l({},g(e).data()),g(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var r=g(e).one(le.SHOW,function(t){t.isDefaultPrevented()||r.one(le.HIDDEN,function(){g(n).is(":visible")&&n.focus()})});Te._jQueryInterface.call(g(e),o,this)}),g.fn[ne]=Te._jQueryInterface,g.fn[ne].Constructor=Te,g.fn[ne].noConflict=function(){return g.fn[ne]=re,Te._jQueryInterface};var be=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],Se={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},De=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,Ie=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function we(t,r,e){if(0===t.length)return t;if(e&&"function"==typeof e)return e(t);for(var n=(new window.DOMParser).parseFromString(t,"text/html"),s=Object.keys(r),a=[].slice.call(n.body.querySelectorAll("*")),i=function(t){var e=a[t],n=e.nodeName.toLowerCase();if(-1===s.indexOf(e.nodeName.toLowerCase()))return e.parentNode.removeChild(e),"continue";var i=[].slice.call(e.attributes),o=[].concat(r["*"]||[],r[n]||[]);i.forEach(function(t){!function(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===be.indexOf(n)||Boolean(t.nodeValue.match(De)||t.nodeValue.match(Ie));for(var i=e.filter(function(t){return t instanceof RegExp}),o=0,r=i.length;o<r;o++)if(n.match(i[o]))return 1}(t,o)&&e.removeAttribute(t.nodeName)})},o=0,l=a.length;o<l;o++)i(o);return n.body.innerHTML}var Ae="tooltip",Ne="bs.tooltip",Oe="."+Ne,ke=g.fn[Ae],Pe="bs-tooltip",Le=new RegExp("(^|\\s)"+Pe+"\\S+","g"),je=["sanitize","whiteList","sanitizeFn"],He={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},Re={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},xe={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:Se,popperConfig:null},Fe="show",Ue="out",We={HIDE:"hide"+Oe,HIDDEN:"hidden"+Oe,SHOW:"show"+Oe,SHOWN:"shown"+Oe,INSERTED:"inserted"+Oe,CLICK:"click"+Oe,FOCUSIN:"focusin"+Oe,FOCUSOUT:"focusout"+Oe,MOUSEENTER:"mouseenter"+Oe,MOUSELEAVE:"mouseleave"+Oe},qe="fade",Me="show",Ke=".tooltip-inner",Qe=".arrow",Be="hover",Ve="focus",Ye="click",ze="manual",Xe=function(){function i(t,e){if("undefined"==typeof u)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=i.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=g(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(g(this.getTipElement()).hasClass(Me))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),g.removeData(this.element,this.constructor.DATA_KEY),g(this.element).off(this.constructor.EVENT_KEY),g(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&g(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===g(this.element).css("display"))throw new Error("Please use show on visible elements");var t=g.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){g(this.element).trigger(t);var n=_.findShadowRoot(this.element),i=g.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!i)return;var o=this.getTipElement(),r=_.getUID(this.constructor.NAME);o.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&g(o).addClass(qe);var s="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,a=this._getAttachment(s);this.addAttachmentClass(a);var l=this._getContainer();g(o).data(this.constructor.DATA_KEY,this),g.contains(this.element.ownerDocument.documentElement,this.tip)||g(o).appendTo(l),g(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new u(this.element,o,this._getPopperConfig(a)),g(o).addClass(Me),"ontouchstart"in document.documentElement&&g(document.body).children().on("mouseover",null,g.noop);var c,h=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,g(e.element).trigger(e.constructor.Event.SHOWN),t===Ue&&e._leave(null,e)};g(this.tip).hasClass(qe)?(c=_.getTransitionDurationFromElement(this.tip),g(this.tip).one(_.TRANSITION_END,h).emulateTransitionEnd(c)):h()}},t.hide=function(t){function e(){i._hoverState!==Fe&&o.parentNode&&o.parentNode.removeChild(o),i._cleanTipClass(),i.element.removeAttribute("aria-describedby"),g(i.element).trigger(i.constructor.Event.HIDDEN),null!==i._popper&&i._popper.destroy(),t&&t()}var n,i=this,o=this.getTipElement(),r=g.Event(this.constructor.Event.HIDE);g(this.element).trigger(r),r.isDefaultPrevented()||(g(o).removeClass(Me),"ontouchstart"in document.documentElement&&g(document.body).children().off("mouseover",null,g.noop),this._activeTrigger[Ye]=!1,this._activeTrigger[Ve]=!1,this._activeTrigger[Be]=!1,g(this.tip).hasClass(qe)?(n=_.getTransitionDurationFromElement(o),g(o).one(_.TRANSITION_END,e).emulateTransitionEnd(n)):e(),this._hoverState="")},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){g(this.getTipElement()).addClass(Pe+"-"+t)},t.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},t.setContent=function(){var t=this.getTipElement();this.setElementContent(g(t.querySelectorAll(Ke)),this.getTitle()),g(t).removeClass(qe+" "+Me)},t.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=we(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?g(e).parent().is(t)||t.empty().append(e):t.text(g(e).text())},t.getTitle=function(){return this.element.getAttribute("data-original-title")||("function"==typeof this.config.title?this.config.title.call(this.element):this.config.title)},t._getPopperConfig=function(t){var e=this;return l(l({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:Qe},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}}),this.config.popperConfig)},t._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=l(l({},t.offsets),e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},t._getContainer=function(){return!1===this.config.container?document.body:_.isElement(this.config.container)?g(this.config.container):g(document).find(this.config.container)},t._getAttachment=function(t){return Re[t.toUpperCase()]},t._setListeners=function(){var i=this;this.config.trigger.split(" ").forEach(function(t){var e,n;"click"===t?g(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)}):t!==ze&&(e=t===Be?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===Be?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT,g(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)}))}),this._hideModalHandler=function(){i.element&&i.hide()},g(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=l(l({},this.config),{},{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");!this.element.getAttribute("title")&&"string"==t||(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?Ve:Be]=!0),g(e.getTipElement()).hasClass(Me)||e._hoverState===Fe?e._hoverState=Fe:(clearTimeout(e._timeout),e._hoverState=Fe,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===Fe&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?Ve:Be]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=Ue,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===Ue&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){var e=g(this.element).data();return Object.keys(e).forEach(function(t){-1!==je.indexOf(t)&&delete e[t]}),"number"==typeof(t=l(l(l({},this.constructor.Default),e),"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),_.typeCheckConfig(Ae,t,this.constructor.DefaultType),t.sanitize&&(t.template=we(t.template,t.whiteList,t.sanitizeFn)),t},t._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},t._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr("class").match(Le);null!==e&&e.length&&t.removeClass(e.join(""))},t._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(g(t).removeClass(qe),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},i._jQueryInterface=function(n){return this.each(function(){var t=g(this).data(Ne),e="object"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),g(this).data(Ne,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return xe}},{key:"NAME",get:function(){return Ae}},{key:"DATA_KEY",get:function(){return Ne}},{key:"Event",get:function(){return We}},{key:"EVENT_KEY",get:function(){return Oe}},{key:"DefaultType",get:function(){return He}}]),i}();g.fn[Ae]=Xe._jQueryInterface,g.fn[Ae].Constructor=Xe,g.fn[Ae].noConflict=function(){return g.fn[Ae]=ke,Xe._jQueryInterface};var $e="popover",Ge="bs.popover",Je="."+Ge,Ze=g.fn[$e],tn="bs-popover",en=new RegExp("(^|\\s)"+tn+"\\S+","g"),nn=l(l({},Xe.Default),{},{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),on=l(l({},Xe.DefaultType),{},{content:"(string|element|function)"}),rn="fade",sn="show",an=".popover-header",ln=".popover-body",cn={HIDE:"hide"+Je,HIDDEN:"hidden"+Je,SHOW:"show"+Je,SHOWN:"shown"+Je,INSERTED:"inserted"+Je,CLICK:"click"+Je,FOCUSIN:"focusin"+Je,FOCUSOUT:"focusout"+Je,MOUSEENTER:"mouseenter"+Je,MOUSELEAVE:"mouseleave"+Je},hn=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),(e.prototype.constructor=e).__proto__=n;var o=i.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.addAttachmentClass=function(t){g(this.getTipElement()).addClass(tn+"-"+t)},o.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},o.setContent=function(){var t=g(this.getTipElement());this.setElementContent(t.find(an),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(ln),e),t.removeClass(rn+" "+sn)},o._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},o._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr("class").match(en);null!==e&&0<e.length&&t.removeClass(e.join(""))},i._jQueryInterface=function(n){return this.each(function(){var t=g(this).data(Ge),e="object"==typeof n?n:null;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),g(this).data(Ge,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return nn}},{key:"NAME",get:function(){return $e}},{key:"DATA_KEY",get:function(){return Ge}},{key:"Event",get:function(){return cn}},{key:"EVENT_KEY",get:function(){return Je}},{key:"DefaultType",get:function(){return on}}]),i}(Xe);g.fn[$e]=hn._jQueryInterface,g.fn[$e].Constructor=hn,g.fn[$e].noConflict=function(){return g.fn[$e]=Ze,hn._jQueryInterface};var un="scrollspy",fn="bs.scrollspy",dn="."+fn,gn=g.fn[un],_n={offset:10,method:"auto",target:""},mn={offset:"number",method:"string",target:"(string|element)"},pn={ACTIVATE:"activate"+dn,SCROLL:"scroll"+dn,LOAD_DATA_API:"load"+dn+".data-api"},vn="dropdown-item",yn="active",En='[data-spy="scroll"]',Cn=".nav, .list-group",Tn=".nav-link",bn=".nav-item",Sn=".list-group-item",Dn=".dropdown",In=".dropdown-item",wn=".dropdown-toggle",An="offset",Nn="position",On=function(){function n(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" "+Tn+","+this._config.target+" "+Sn+","+this._config.target+" "+In,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,g(this._scrollElement).on(pn.SCROLL,function(t){return n._process(t)}),this.refresh(),this._process()}var t=n.prototype;return t.refresh=function(){var e=this,t=this._scrollElement===this._scrollElement.window?An:Nn,o="auto"===this._config.method?t:this._config.method,r=o===Nn?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map(function(t){var e,n=_.getSelectorFromElement(t);if(n&&(e=document.querySelector(n)),e){var i=e.getBoundingClientRect();if(i.width||i.height)return[g(e)[o]().top+r,n]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},t.dispose=function(){g.removeData(this._element,fn),g(this._scrollElement).off(dn),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},t._getConfig=function(t){var e;return"string"!=typeof(t=l(l({},_n),"object"==typeof t&&t?t:{})).target&&((e=g(t.target).attr("id"))||(e=_.getUID(un),g(t.target).attr("id",e)),t.target="#"+e),_.typeCheckConfig(un,t,mn),t},t._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},t._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},t._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},t._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),n<=t){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&0<this._offsets[0])return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}}},t._activate=function(e){this._activeTarget=e,this._clear();var t=this._selector.split(",").map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'}),n=g([].slice.call(document.querySelectorAll(t.join(","))));n.hasClass(vn)?(n.closest(Dn).find(wn).addClass(yn),n.addClass(yn)):(n.addClass(yn),n.parents(Cn).prev(Tn+", "+Sn).addClass(yn),n.parents(Cn).prev(bn).children(Tn).addClass(yn)),g(this._scrollElement).trigger(pn.ACTIVATE,{relatedTarget:e})},t._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter(function(t){return t.classList.contains(yn)}).forEach(function(t){return t.classList.remove(yn)})},n._jQueryInterface=function(e){return this.each(function(){var t=g(this).data(fn);if(t||(t=new n(this,"object"==typeof e&&e),g(this).data(fn,t)),"string"==typeof e){if("undefined"==typeof t[e])throw new TypeError('No method named "'+e+'"');t[e]()}})},s(n,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return _n}}]),n}();g(window).on(pn.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(En)),e=t.length;e--;){var n=g(t[e]);On._jQueryInterface.call(n,n.data())}}),g.fn[un]=On._jQueryInterface,g.fn[un].Constructor=On,g.fn[un].noConflict=function(){return g.fn[un]=gn,On._jQueryInterface};var kn="bs.tab",Pn="."+kn,Ln=g.fn.tab,jn={HIDE:"hide"+Pn,HIDDEN:"hidden"+Pn,SHOW:"show"+Pn,SHOWN:"shown"+Pn,CLICK_DATA_API:"click"+Pn+".data-api"},Hn="dropdown-menu",Rn="active",xn="disabled",Fn="fade",Un="show",Wn=".dropdown",qn=".nav, .list-group",Mn=".active",Kn="> li > .active",Qn='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',Bn=".dropdown-toggle",Vn="> .dropdown-menu .active",Yn=function(){function i(t){this._element=t}var t=i.prototype;return t.show=function(){var t,e,n,i,o,r,s,a,l=this;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&g(this._element).hasClass(Rn)||g(this._element).hasClass(xn)||(e=g(this._element).closest(qn)[0],n=_.getSelectorFromElement(this._element),e&&(i="UL"===e.nodeName||"OL"===e.nodeName?Kn:Mn,o=(o=g.makeArray(g(e).find(i)))[o.length-1]),r=g.Event(jn.HIDE,{relatedTarget:this._element}),s=g.Event(jn.SHOW,{relatedTarget:o}),o&&g(o).trigger(r),g(this._element).trigger(s),s.isDefaultPrevented()||r.isDefaultPrevented()||(n&&(t=document.querySelector(n)),this._activate(this._element,e),a=function(){var t=g.Event(jn.HIDDEN,{relatedTarget:l._element}),e=g.Event(jn.SHOWN,{relatedTarget:o});g(o).trigger(t),g(l._element).trigger(e)},t?this._activate(t,t.parentNode,a):a()))},t.dispose=function(){g.removeData(this._element,kn),this._element=null},t._activate=function(t,e,n){function i(){return r._transitionComplete(t,s,n)}var o,r=this,s=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?g(e).children(Mn):g(e).find(Kn))[0],a=n&&s&&g(s).hasClass(Fn);s&&a?(o=_.getTransitionDurationFromElement(s),g(s).removeClass(Un).one(_.TRANSITION_END,i).emulateTransitionEnd(o)):i()},t._transitionComplete=function(t,e,n){var i,o,r;e&&(g(e).removeClass(Rn),(i=g(e.parentNode).find(Vn)[0])&&g(i).removeClass(Rn),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)),g(t).addClass(Rn),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),_.reflow(t),t.classList.contains(Fn)&&t.classList.add(Un),t.parentNode&&g(t.parentNode).hasClass(Hn)&&((o=g(t).closest(Wn)[0])&&(r=[].slice.call(o.querySelectorAll(Bn)),g(r).addClass(Rn)),t.setAttribute("aria-expanded",!0)),n&&n()},i._jQueryInterface=function(n){return this.each(function(){var t=g(this),e=t.data(kn);if(e||(e=new i(this),t.data(kn,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.4.1"}}]),i}();g(document).on(jn.CLICK_DATA_API,Qn,function(t){t.preventDefault(),Yn._jQueryInterface.call(g(this),"show")}),g.fn.tab=Yn._jQueryInterface,g.fn.tab.Constructor=Yn,g.fn.tab.noConflict=function(){return g.fn.tab=Ln,Yn._jQueryInterface};var zn="toast",Xn="bs.toast",$n="."+Xn,Gn=g.fn[zn],Jn={CLICK_DISMISS:"click.dismiss"+$n,HIDE:"hide"+$n,HIDDEN:"hidden"+$n,SHOW:"show"+$n,SHOWN:"shown"+$n},Zn="fade",ti="hide",ei="show",ni="showing",ii={animation:"boolean",autohide:"boolean",delay:"number"},oi={animation:!0,autohide:!0,delay:500},ri='[data-dismiss="toast"]',si=function(){function i(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var t=i.prototype;return t.show=function(){var t,e,n=this,i=g.Event(Jn.SHOW);g(this._element).trigger(i),i.isDefaultPrevented()||(this._config.animation&&this._element.classList.add(Zn),t=function(){n._element.classList.remove(ni),n._element.classList.add(ei),g(n._element).trigger(Jn.SHOWN),n._config.autohide&&(n._timeout=setTimeout(function(){n.hide()},n._config.delay))},this._element.classList.remove(ti),_.reflow(this._element),this._element.classList.add(ni),this._config.animation?(e=_.getTransitionDurationFromElement(this._element),g(this._element).one(_.TRANSITION_END,t).emulateTransitionEnd(e)):t())},t.hide=function(){var t;this._element.classList.contains(ei)&&(t=g.Event(Jn.HIDE),g(this._element).trigger(t),t.isDefaultPrevented()||this._close())},t.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains(ei)&&this._element.classList.remove(ei),g(this._element).off(Jn.CLICK_DISMISS),g.removeData(this._element,Xn),this._element=null,this._config=null},t._getConfig=function(t){return t=l(l(l({},oi),g(this._element).data()),"object"==typeof t&&t?t:{}),_.typeCheckConfig(zn,t,this.constructor.DefaultType),t},t._setListeners=function(){var t=this;g(this._element).on(Jn.CLICK_DISMISS,ri,function(){return t.hide()})},t._close=function(){function t(){n._element.classList.add(ti),g(n._element).trigger(Jn.HIDDEN)}var e,n=this;this._element.classList.remove(ei),this._config.animation?(e=_.getTransitionDurationFromElement(this._element),g(this._element).one(_.TRANSITION_END,t).emulateTransitionEnd(e)):t()},i._jQueryInterface=function(n){return this.each(function(){var t=g(this),e=t.data(Xn);if(e||(e=new i(this,"object"==typeof n&&n),t.data(Xn,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n](this)}})},s(i,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"DefaultType",get:function(){return ii}},{key:"Default",get:function(){return oi}}]),i}();g.fn[zn]=si._jQueryInterface,g.fn[zn].Constructor=si,g.fn[zn].noConflict=function(){return g.fn[zn]=Gn,si._jQueryInterface},t.Alert=v,t.Button=H,t.Carousel=ut,t.Collapse=wt,t.Dropdown=ee,t.Modal=Te,t.Popover=hn,t.Scrollspy=On,t.Tab=Yn,t.Toast=si,t.Tooltip=Xe,t.Util=_,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap={},t.jQuery,t.Popper)}(this,(function(t,e,n){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e,n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;function r(t){var n=this,i=!1;return e(this).one(a.TRANSITION_END,(function(){i=!0})),setTimeout((function(){i||a.triggerTransitionEnd(n)}),t),this}var a={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var n=e(t).css("transition-duration"),i=e(t).css("transition-delay"),o=parseFloat(n),s=parseFloat(i);return o||s?(n=n.split(",")[0],i=i.split(",")[0],1e3*(parseFloat(n)+parseFloat(i))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){e(t).trigger("transitionend")},supportsTransitionEnd:function(){return Boolean("transitionend")},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],s=e[i],r=s&&a.isElement(s)?"element":null===(l=s)||"undefined"==typeof l?""+l:{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(r))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+r+'" but expected type "'+o+'".')}var l},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?a.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if("undefined"==typeof e)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};a.jQueryDetection(),e.fn.emulateTransitionEnd=r,e.event.special[a.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var l="alert",c=e.fn[l],h=function(){function t(t){this._element=t}var n=t.prototype;return n.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},n.dispose=function(){e.removeData(this._element,"bs.alert"),this._element=null},n._getRootElement=function(t){var n=a.getSelectorFromElement(t),i=!1;return n&&(i=document.querySelector(n)),i||(i=e(t).closest(".alert")[0]),i},n._triggerCloseEvent=function(t){var n=e.Event("close.bs.alert");return e(t).trigger(n),n},n._removeElement=function(t){var n=this;if(e(t).removeClass("show"),e(t).hasClass("fade")){var i=a.getTransitionDurationFromElement(t);e(t).one(a.TRANSITION_END,(function(e){return n._destroyElement(t,e)})).emulateTransitionEnd(i)}else this._destroyElement(t)},n._destroyElement=function(t){e(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.alert");o||(o=new t(this),i.data("bs.alert",o)),"close"===n&&o[n](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}}]),t}();e(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',h._handleDismiss(new h)),e.fn[l]=h._jQueryInterface,e.fn[l].Constructor=h,e.fn[l].noConflict=function(){return e.fn[l]=c,h._jQueryInterface};var u=e.fn.button,d=function(){function t(t){this._element=t}var n=t.prototype;return n.toggle=function(){var t=!0,n=!0,i=e(this._element).closest('[data-toggle="buttons"]')[0];if(i){var o=this._element.querySelector('input:not([type="hidden"])');if(o){if("radio"===o.type)if(o.checked&&this._element.classList.contains("active"))t=!1;else{var s=i.querySelector(".active");s&&e(s).removeClass("active")}t&&("checkbox"!==o.type&&"radio"!==o.type||(o.checked=!this._element.classList.contains("active")),e(o).trigger("change")),o.focus(),n=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(n&&this._element.setAttribute("aria-pressed",!this._element.classList.contains("active")),t&&e(this._element).toggleClass("active"))},n.dispose=function(){e.removeData(this._element,"bs.button"),this._element=null},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.button");i||(i=new t(this),e(this).data("bs.button",i)),"toggle"===n&&i[n]()}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}}]),t}();e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var n=t.target,i=n;if(e(n).hasClass("btn")||(n=e(n).closest(".btn")[0]),!n||n.hasAttribute("disabled")||n.classList.contains("disabled"))t.preventDefault();else{var o=n.querySelector('input:not([type="hidden"])');if(o&&(o.hasAttribute("disabled")||o.classList.contains("disabled")))return void t.preventDefault();("LABEL"!==i.tagName||o&&"checkbox"!==o.type)&&d._jQueryInterface.call(e(n),"toggle")}})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){var n=e(t.target).closest(".btn")[0];e(n).toggleClass("focus",/^focus(in)?$/.test(t.type))})),e(window).on("load.bs.button.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e<n;e++){var i=t[e],o=i.querySelector('input:not([type="hidden"])');o.checked||o.hasAttribute("checked")?i.classList.add("active"):i.classList.remove("active")}for(var s=0,r=(t=[].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length;s<r;s++){var a=t[s];"true"===a.getAttribute("aria-pressed")?a.classList.add("active"):a.classList.remove("active")}})),e.fn.button=d._jQueryInterface,e.fn.button.Constructor=d,e.fn.button.noConflict=function(){return e.fn.button=u,d._jQueryInterface};var f="carousel",g=".bs.carousel",m=e.fn[f],p={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},_={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},v={TOUCH:"touch",PEN:"pen"},b=function(){function t(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(".carousel-indicators"),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var n=t.prototype;return n.next=function(){this._isSliding||this._slide("next")},n.nextWhenVisible=function(){!document.hidden&&e(this._element).is(":visible")&&"hidden"!==e(this._element).css("visibility")&&this.next()},n.prev=function(){this._isSliding||this._slide("prev")},n.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(a.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},n.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},n.to=function(t){var n=this;this._activeElement=this._element.querySelector(".active.carousel-item");var i=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)e(this._element).one("slid.bs.carousel",(function(){return n.to(t)}));else{if(i===t)return this.pause(),void this.cycle();var o=t>i?"next":"prev";this._slide(o,this._items[t])}},n.dispose=function(){e(this._element).off(g),e.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},n._getConfig=function(t){return t=s({},p,t),a.typeCheckConfig(f,t,_),t},n._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},n._addEventListeners=function(){var t=this;this._config.keyboard&&e(this._element).on("keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&e(this._element).on("mouseenter.bs.carousel",(function(e){return t.pause(e)})).on("mouseleave.bs.carousel",(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},n._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var n=function(e){t._pointerEvent&&v[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},i=function(e){t._pointerEvent&&v[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};e(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(t){return t.preventDefault()})),this._pointerEvent?(e(this._element).on("pointerdown.bs.carousel",(function(t){return n(t)})),e(this._element).on("pointerup.bs.carousel",(function(t){return i(t)})),this._element.classList.add("pointer-event")):(e(this._element).on("touchstart.bs.carousel",(function(t){return n(t)})),e(this._element).on("touchmove.bs.carousel",(function(e){return function(e){e.originalEvent.touches&&e.originalEvent.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),e(this._element).on("touchend.bs.carousel",(function(t){return i(t)})))}},n._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},n._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},n._getItemByDirection=function(t,e){var n="next"===t,i="prev"===t,o=this._getItemIndex(e),s=this._items.length-1;if((i&&0===o||n&&o===s)&&!this._config.wrap)return e;var r=(o+("prev"===t?-1:1))%this._items.length;return-1===r?this._items[this._items.length-1]:this._items[r]},n._triggerSlideEvent=function(t,n){var i=this._getItemIndex(t),o=this._getItemIndex(this._element.querySelector(".active.carousel-item")),s=e.Event("slide.bs.carousel",{relatedTarget:t,direction:n,from:o,to:i});return e(this._element).trigger(s),s},n._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var n=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));e(n).removeClass("active");var i=this._indicatorsElement.children[this._getItemIndex(t)];i&&e(i).addClass("active")}},n._slide=function(t,n){var i,o,s,r=this,l=this._element.querySelector(".active.carousel-item"),c=this._getItemIndex(l),h=n||l&&this._getItemByDirection(t,l),u=this._getItemIndex(h),d=Boolean(this._interval);if("next"===t?(i="carousel-item-left",o="carousel-item-next",s="left"):(i="carousel-item-right",o="carousel-item-prev",s="right"),h&&e(h).hasClass("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(h,s).isDefaultPrevented()&&l&&h){this._isSliding=!0,d&&this.pause(),this._setActiveIndicatorElement(h);var f=e.Event("slid.bs.carousel",{relatedTarget:h,direction:s,from:c,to:u});if(e(this._element).hasClass("slide")){e(h).addClass(o),a.reflow(h),e(l).addClass(i),e(h).addClass(i);var g=parseInt(h.getAttribute("data-interval"),10);g?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=g):this._config.interval=this._config.defaultInterval||this._config.interval;var m=a.getTransitionDurationFromElement(l);e(l).one(a.TRANSITION_END,(function(){e(h).removeClass(i+" "+o).addClass("active"),e(l).removeClass("active "+o+" "+i),r._isSliding=!1,setTimeout((function(){return e(r._element).trigger(f)}),0)})).emulateTransitionEnd(m)}else e(l).removeClass("active"),e(h).addClass("active"),this._isSliding=!1,e(this._element).trigger(f);d&&this.cycle()}},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.carousel"),o=s({},p,e(this).data());"object"==typeof n&&(o=s({},o,n));var r="string"==typeof n?n:o.slide;if(i||(i=new t(this,o),e(this).data("bs.carousel",i)),"number"==typeof n)i.to(n);else if("string"==typeof r){if("undefined"==typeof i[r])throw new TypeError('No method named "'+r+'"');i[r]()}else o.interval&&o.ride&&(i.pause(),i.cycle())}))},t._dataApiClickHandler=function(n){var i=a.getSelectorFromElement(this);if(i){var o=e(i)[0];if(o&&e(o).hasClass("carousel")){var r=s({},e(o).data(),e(this).data()),l=this.getAttribute("data-slide-to");l&&(r.interval=!1),t._jQueryInterface.call(e(o),r),l&&e(o).data("bs.carousel").to(l),n.preventDefault()}}},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return p}}]),t}();e(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",b._dataApiClickHandler),e(window).on("load.bs.carousel.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),n=0,i=t.length;n<i;n++){var o=e(t[n]);b._jQueryInterface.call(o,o.data())}})),e.fn[f]=b._jQueryInterface,e.fn[f].Constructor=b,e.fn[f].noConflict=function(){return e.fn[f]=m,b._jQueryInterface};var y="collapse",E=e.fn[y],w={toggle:!0,parent:""},T={toggle:"boolean",parent:"(string|element)"},C=function(){function t(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var n=[].slice.call(document.querySelectorAll('[data-toggle="collapse"]')),i=0,o=n.length;i<o;i++){var s=n[i],r=a.getSelectorFromElement(s),l=[].slice.call(document.querySelectorAll(r)).filter((function(e){return e===t}));null!==r&&l.length>0&&(this._selector=r,this._triggerArray.push(s))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var n=t.prototype;return n.toggle=function(){e(this._element).hasClass("show")?this.hide():this.show()},n.show=function(){var n,i,o=this;if(!this._isTransitioning&&!e(this._element).hasClass("show")&&(this._parent&&0===(n=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof o._config.parent?t.getAttribute("data-parent")===o._config.parent:t.classList.contains("collapse")}))).length&&(n=null),!(n&&(i=e(n).not(this._selector).data("bs.collapse"))&&i._isTransitioning))){var s=e.Event("show.bs.collapse");if(e(this._element).trigger(s),!s.isDefaultPrevented()){n&&(t._jQueryInterface.call(e(n).not(this._selector),"hide"),i||e(n).data("bs.collapse",null));var r=this._getDimension();e(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[r]=0,this._triggerArray.length&&e(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var l="scroll"+(r[0].toUpperCase()+r.slice(1)),c=a.getTransitionDurationFromElement(this._element);e(this._element).one(a.TRANSITION_END,(function(){e(o._element).removeClass("collapsing").addClass("collapse show"),o._element.style[r]="",o.setTransitioning(!1),e(o._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(c),this._element.style[r]=this._element[l]+"px"}}},n.hide=function(){var t=this;if(!this._isTransitioning&&e(this._element).hasClass("show")){var n=e.Event("hide.bs.collapse");if(e(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",a.reflow(this._element),e(this._element).addClass("collapsing").removeClass("collapse show");var o=this._triggerArray.length;if(o>0)for(var s=0;s<o;s++){var r=this._triggerArray[s],l=a.getSelectorFromElement(r);if(null!==l)e([].slice.call(document.querySelectorAll(l))).hasClass("show")||e(r).addClass("collapsed").attr("aria-expanded",!1)}this.setTransitioning(!0);this._element.style[i]="";var c=a.getTransitionDurationFromElement(this._element);e(this._element).one(a.TRANSITION_END,(function(){t.setTransitioning(!1),e(t._element).removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")})).emulateTransitionEnd(c)}}},n.setTransitioning=function(t){this._isTransitioning=t},n.dispose=function(){e.removeData(this._element,"bs.collapse"),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},n._getConfig=function(t){return(t=s({},w,t)).toggle=Boolean(t.toggle),a.typeCheckConfig(y,t,T),t},n._getDimension=function(){return e(this._element).hasClass("width")?"width":"height"},n._getParent=function(){var n,i=this;a.isElement(this._config.parent)?(n=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(n=this._config.parent[0])):n=document.querySelector(this._config.parent);var o='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',s=[].slice.call(n.querySelectorAll(o));return e(s).each((function(e,n){i._addAriaAndCollapsedClass(t._getTargetFromElement(n),[n])})),n},n._addAriaAndCollapsedClass=function(t,n){var i=e(t).hasClass("show");n.length&&e(n).toggleClass("collapsed",!i).attr("aria-expanded",i)},t._getTargetFromElement=function(t){var e=a.getSelectorFromElement(t);return e?document.querySelector(e):null},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.collapse"),r=s({},w,i.data(),"object"==typeof n&&n?n:{});if(!o&&r.toggle&&"string"==typeof n&&/show|hide/.test(n)&&(r.toggle=!1),o||(o=new t(this,r),i.data("bs.collapse",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return w}}]),t}();e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var n=e(this),i=a.getSelectorFromElement(this),o=[].slice.call(document.querySelectorAll(i));e(o).each((function(){var t=e(this),i=t.data("bs.collapse")?"toggle":n.data();C._jQueryInterface.call(t,i)}))})),e.fn[y]=C._jQueryInterface,e.fn[y].Constructor=C,e.fn[y].noConflict=function(){return e.fn[y]=E,C._jQueryInterface};var S="dropdown",k=e.fn[S],D=new RegExp("38|40|27"),N={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},A={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},I=function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var i=t.prototype;return i.toggle=function(){if(!this._element.disabled&&!e(this._element).hasClass("disabled")){var n=e(this._menu).hasClass("show");t._clearMenus(),n||this.show(!0)}},i.show=function(i){if(void 0===i&&(i=!1),!(this._element.disabled||e(this._element).hasClass("disabled")||e(this._menu).hasClass("show"))){var o={relatedTarget:this._element},s=e.Event("show.bs.dropdown",o),r=t._getParentFromElement(this._element);if(e(r).trigger(s),!s.isDefaultPrevented()){if(!this._inNavbar&&i){if("undefined"==typeof n)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)");var l=this._element;"parent"===this._config.reference?l=r:a.isElement(this._config.reference)&&(l=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(l=this._config.reference[0])),"scrollParent"!==this._config.boundary&&e(r).addClass("position-static"),this._popper=new n(l,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===e(r).closest(".navbar-nav").length&&e(document.body).children().on("mouseover",null,e.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),e(this._menu).toggleClass("show"),e(r).toggleClass("show").trigger(e.Event("shown.bs.dropdown",o))}}},i.hide=function(){if(!this._element.disabled&&!e(this._element).hasClass("disabled")&&e(this._menu).hasClass("show")){var n={relatedTarget:this._element},i=e.Event("hide.bs.dropdown",n),o=t._getParentFromElement(this._element);e(o).trigger(i),i.isDefaultPrevented()||(this._popper&&this._popper.destroy(),e(this._menu).toggleClass("show"),e(o).toggleClass("show").trigger(e.Event("hidden.bs.dropdown",n)))}},i.dispose=function(){e.removeData(this._element,"bs.dropdown"),e(this._element).off(".bs.dropdown"),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},i.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},i._addEventListeners=function(){var t=this;e(this._element).on("click.bs.dropdown",(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},i._getConfig=function(t){return t=s({},this.constructor.Default,e(this._element).data(),t),a.typeCheckConfig(S,t,this.constructor.DefaultType),t},i._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);e&&(this._menu=e.querySelector(".dropdown-menu"))}return this._menu},i._getPlacement=function(){var t=e(this._element.parentNode),n="bottom-start";return t.hasClass("dropup")?n=e(this._menu).hasClass("dropdown-menu-right")?"top-end":"top-start":t.hasClass("dropright")?n="right-start":t.hasClass("dropleft")?n="left-start":e(this._menu).hasClass("dropdown-menu-right")&&(n="bottom-end"),n},i._detectNavbar=function(){return e(this._element).closest(".navbar").length>0},i._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=s({},e.offsets,t._config.offset(e.offsets,t._element)||{}),e}:e.offset=this._config.offset,e},i._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),s({},t,this._config.popperConfig)},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.dropdown");if(i||(i=new t(this,"object"==typeof n?n:null),e(this).data("bs.dropdown",i)),"string"==typeof n){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},t._clearMenus=function(n){if(!n||3!==n.which&&("keyup"!==n.type||9===n.which))for(var i=[].slice.call(document.querySelectorAll('[data-toggle="dropdown"]')),o=0,s=i.length;o<s;o++){var r=t._getParentFromElement(i[o]),a=e(i[o]).data("bs.dropdown"),l={relatedTarget:i[o]};if(n&&"click"===n.type&&(l.clickEvent=n),a){var c=a._menu;if(e(r).hasClass("show")&&!(n&&("click"===n.type&&/input|textarea/i.test(n.target.tagName)||"keyup"===n.type&&9===n.which)&&e.contains(r,n.target))){var h=e.Event("hide.bs.dropdown",l);e(r).trigger(h),h.isDefaultPrevented()||("ontouchstart"in document.documentElement&&e(document.body).children().off("mouseover",null,e.noop),i[o].setAttribute("aria-expanded","false"),a._popper&&a._popper.destroy(),e(c).removeClass("show"),e(r).removeClass("show").trigger(e.Event("hidden.bs.dropdown",l)))}}}},t._getParentFromElement=function(t){var e,n=a.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},t._dataApiKeydownHandler=function(n){if(!(/input|textarea/i.test(n.target.tagName)?32===n.which||27!==n.which&&(40!==n.which&&38!==n.which||e(n.target).closest(".dropdown-menu").length):!D.test(n.which))&&!this.disabled&&!e(this).hasClass("disabled")){var i=t._getParentFromElement(this),o=e(i).hasClass("show");if(o||27!==n.which){if(n.preventDefault(),n.stopPropagation(),!o||o&&(27===n.which||32===n.which))return 27===n.which&&e(i.querySelector('[data-toggle="dropdown"]')).trigger("focus"),void e(this).trigger("click");var s=[].slice.call(i.querySelectorAll(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)")).filter((function(t){return e(t).is(":visible")}));if(0!==s.length){var r=s.indexOf(n.target);38===n.which&&r>0&&r--,40===n.which&&r<s.length-1&&r++,r<0&&(r=0),s[r].focus()}}}},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return N}},{key:"DefaultType",get:function(){return A}}]),t}();e(document).on("keydown.bs.dropdown.data-api",'[data-toggle="dropdown"]',I._dataApiKeydownHandler).on("keydown.bs.dropdown.data-api",".dropdown-menu",I._dataApiKeydownHandler).on("click.bs.dropdown.data-api keyup.bs.dropdown.data-api",I._clearMenus).on("click.bs.dropdown.data-api",'[data-toggle="dropdown"]',(function(t){t.preventDefault(),t.stopPropagation(),I._jQueryInterface.call(e(this),"toggle")})).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})),e.fn[S]=I._jQueryInterface,e.fn[S].Constructor=I,e.fn[S].noConflict=function(){return e.fn[S]=k,I._jQueryInterface};var O=e.fn.modal,j={backdrop:!0,keyboard:!0,focus:!0,show:!0},x={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},P=function(){function t(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(".modal-dialog"),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var n=t.prototype;return n.toggle=function(t){return this._isShown?this.hide():this.show(t)},n.show=function(t){var n=this;if(!this._isShown&&!this._isTransitioning){e(this._element).hasClass("fade")&&(this._isTransitioning=!0);var i=e.Event("show.bs.modal",{relatedTarget:t});e(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),e(this._element).on("click.dismiss.bs.modal",'[data-dismiss="modal"]',(function(t){return n.hide(t)})),e(this._dialog).on("mousedown.dismiss.bs.modal",(function(){e(n._element).one("mouseup.dismiss.bs.modal",(function(t){e(t.target).is(n._element)&&(n._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return n._showElement(t)})))}},n.hide=function(t){var n=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning){var i=e.Event("hide.bs.modal");if(e(this._element).trigger(i),this._isShown&&!i.isDefaultPrevented()){this._isShown=!1;var o=e(this._element).hasClass("fade");if(o&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),e(document).off("focusin.bs.modal"),e(this._element).removeClass("show"),e(this._element).off("click.dismiss.bs.modal"),e(this._dialog).off("mousedown.dismiss.bs.modal"),o){var s=a.getTransitionDurationFromElement(this._element);e(this._element).one(a.TRANSITION_END,(function(t){return n._hideModal(t)})).emulateTransitionEnd(s)}else this._hideModal()}}},n.dispose=function(){[window,this._element,this._dialog].forEach((function(t){return e(t).off(".bs.modal")})),e(document).off("focusin.bs.modal"),e.removeData(this._element,"bs.modal"),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},n.handleUpdate=function(){this._adjustDialog()},n._getConfig=function(t){return t=s({},j,t),a.typeCheckConfig("modal",t,x),t},n._triggerBackdropTransition=function(){var t=this;if("static"===this._config.backdrop){var n=e.Event("hidePrevented.bs.modal");if(e(this._element).trigger(n),n.defaultPrevented)return;var i=this._element.scrollHeight>document.documentElement.clientHeight;i||(this._element.style.overflowY="hidden"),this._element.classList.add("modal-static");var o=a.getTransitionDurationFromElement(this._dialog);e(this._element).off(a.TRANSITION_END),e(this._element).one(a.TRANSITION_END,(function(){t._element.classList.remove("modal-static"),i||e(t._element).one(a.TRANSITION_END,(function(){t._element.style.overflowY=""})).emulateTransitionEnd(t._element,o)})).emulateTransitionEnd(o),this._element.focus()}else this.hide()},n._showElement=function(t){var n=this,i=e(this._element).hasClass("fade"),o=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),e(this._dialog).hasClass("modal-dialog-scrollable")&&o?o.scrollTop=0:this._element.scrollTop=0,i&&a.reflow(this._element),e(this._element).addClass("show"),this._config.focus&&this._enforceFocus();var s=e.Event("shown.bs.modal",{relatedTarget:t}),r=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,e(n._element).trigger(s)};if(i){var l=a.getTransitionDurationFromElement(this._dialog);e(this._dialog).one(a.TRANSITION_END,r).emulateTransitionEnd(l)}else r()},n._enforceFocus=function(){var t=this;e(document).off("focusin.bs.modal").on("focusin.bs.modal",(function(n){document!==n.target&&t._element!==n.target&&0===e(t._element).has(n.target).length&&t._element.focus()}))},n._setEscapeEvent=function(){var t=this;this._isShown?e(this._element).on("keydown.dismiss.bs.modal",(function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()})):this._isShown||e(this._element).off("keydown.dismiss.bs.modal")},n._setResizeEvent=function(){var t=this;this._isShown?e(window).on("resize.bs.modal",(function(e){return t.handleUpdate(e)})):e(window).off("resize.bs.modal")},n._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){e(document.body).removeClass("modal-open"),t._resetAdjustments(),t._resetScrollbar(),e(t._element).trigger("hidden.bs.modal")}))},n._removeBackdrop=function(){this._backdrop&&(e(this._backdrop).remove(),this._backdrop=null)},n._showBackdrop=function(t){var n=this,i=e(this._element).hasClass("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",i&&this._backdrop.classList.add(i),e(this._backdrop).appendTo(document.body),e(this._element).on("click.dismiss.bs.modal",(function(t){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:t.target===t.currentTarget&&n._triggerBackdropTransition()})),i&&a.reflow(this._backdrop),e(this._backdrop).addClass("show"),!t)return;if(!i)return void t();var o=a.getTransitionDurationFromElement(this._backdrop);e(this._backdrop).one(a.TRANSITION_END,t).emulateTransitionEnd(o)}else if(!this._isShown&&this._backdrop){e(this._backdrop).removeClass("show");var s=function(){n._removeBackdrop(),t&&t()};if(e(this._element).hasClass("fade")){var r=a.getTransitionDurationFromElement(this._backdrop);e(this._backdrop).one(a.TRANSITION_END,s).emulateTransitionEnd(r)}else s()}else t&&t()},n._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},n._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},n._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){var n=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")),i=[].slice.call(document.querySelectorAll(".sticky-top"));e(n).each((function(n,i){var o=i.style.paddingRight,s=e(i).css("padding-right");e(i).data("padding-right",o).css("padding-right",parseFloat(s)+t._scrollbarWidth+"px")})),e(i).each((function(n,i){var o=i.style.marginRight,s=e(i).css("margin-right");e(i).data("margin-right",o).css("margin-right",parseFloat(s)-t._scrollbarWidth+"px")}));var o=document.body.style.paddingRight,s=e(document.body).css("padding-right");e(document.body).data("padding-right",o).css("padding-right",parseFloat(s)+this._scrollbarWidth+"px")}e(document.body).addClass("modal-open")},n._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top"));e(t).each((function(t,n){var i=e(n).data("padding-right");e(n).removeData("padding-right"),n.style.paddingRight=i||""}));var n=[].slice.call(document.querySelectorAll(".sticky-top"));e(n).each((function(t,n){var i=e(n).data("margin-right");"undefined"!=typeof i&&e(n).css("margin-right",i).removeData("margin-right")}));var i=e(document.body).data("padding-right");e(document.body).removeData("padding-right"),document.body.style.paddingRight=i||""},n._getScrollbarWidth=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},t._jQueryInterface=function(n,i){return this.each((function(){var o=e(this).data("bs.modal"),r=s({},j,e(this).data(),"object"==typeof n&&n?n:{});if(o||(o=new t(this,r),e(this).data("bs.modal",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n](i)}else r.show&&o.show(i)}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return j}}]),t}();e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(t){var n,i=this,o=a.getSelectorFromElement(this);o&&(n=document.querySelector(o));var r=e(n).data("bs.modal")?"toggle":s({},e(n).data(),e(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var l=e(n).one("show.bs.modal",(function(t){t.isDefaultPrevented()||l.one("hidden.bs.modal",(function(){e(i).is(":visible")&&i.focus()}))}));P._jQueryInterface.call(e(n),r,this)})),e.fn.modal=P._jQueryInterface,e.fn.modal.Constructor=P,e.fn.modal.noConflict=function(){return e.fn.modal=O,P._jQueryInterface};var R=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],L={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},q=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,F=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;function Q(t,e,n){if(0===t.length)return t;if(n&&"function"==typeof n)return n(t);for(var i=(new window.DOMParser).parseFromString(t,"text/html"),o=Object.keys(e),s=[].slice.call(i.body.querySelectorAll("*")),r=function(t,n){var i=s[t],r=i.nodeName.toLowerCase();if(-1===o.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";var a=[].slice.call(i.attributes),l=[].concat(e["*"]||[],e[r]||[]);a.forEach((function(t){(function(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===R.indexOf(n)||Boolean(t.nodeValue.match(q)||t.nodeValue.match(F));for(var i=e.filter((function(t){return t instanceof RegExp})),o=0,s=i.length;o<s;o++)if(n.match(i[o]))return!0;return!1})(t,l)||i.removeAttribute(t.nodeName)}))},a=0,l=s.length;a<l;a++)r(a);return i.body.innerHTML}var B="tooltip",H=e.fn[B],U=new RegExp("(^|\\s)bs-tooltip\\S+","g"),M=["sanitize","whiteList","sanitizeFn"],W={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},V={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},z={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:L,popperConfig:null},K={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},X=function(){function t(t,e){if("undefined"==typeof n)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var i=t.prototype;return i.enable=function(){this._isEnabled=!0},i.disable=function(){this._isEnabled=!1},i.toggleEnabled=function(){this._isEnabled=!this._isEnabled},i.toggle=function(t){if(this._isEnabled)if(t){var n=this.constructor.DATA_KEY,i=e(t.currentTarget).data(n);i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(e(this.getTipElement()).hasClass("show"))return void this._leave(null,this);this._enter(null,this)}},i.dispose=function(){clearTimeout(this._timeout),e.removeData(this.element,this.constructor.DATA_KEY),e(this.element).off(this.constructor.EVENT_KEY),e(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&e(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},i.show=function(){var t=this;if("none"===e(this.element).css("display"))throw new Error("Please use show on visible elements");var i=e.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){e(this.element).trigger(i);var o=a.findShadowRoot(this.element),s=e.contains(null!==o?o:this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!s)return;var r=this.getTipElement(),l=a.getUID(this.constructor.NAME);r.setAttribute("id",l),this.element.setAttribute("aria-describedby",l),this.setContent(),this.config.animation&&e(r).addClass("fade");var c="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,h=this._getAttachment(c);this.addAttachmentClass(h);var u=this._getContainer();e(r).data(this.constructor.DATA_KEY,this),e.contains(this.element.ownerDocument.documentElement,this.tip)||e(r).appendTo(u),e(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,r,this._getPopperConfig(h)),e(r).addClass("show"),"ontouchstart"in document.documentElement&&e(document.body).children().on("mouseover",null,e.noop);var d=function(){t.config.animation&&t._fixTransition();var n=t._hoverState;t._hoverState=null,e(t.element).trigger(t.constructor.Event.SHOWN),"out"===n&&t._leave(null,t)};if(e(this.tip).hasClass("fade")){var f=a.getTransitionDurationFromElement(this.tip);e(this.tip).one(a.TRANSITION_END,d).emulateTransitionEnd(f)}else d()}},i.hide=function(t){var n=this,i=this.getTipElement(),o=e.Event(this.constructor.Event.HIDE),s=function(){"show"!==n._hoverState&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),e(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),t&&t()};if(e(this.element).trigger(o),!o.isDefaultPrevented()){if(e(i).removeClass("show"),"ontouchstart"in document.documentElement&&e(document.body).children().off("mouseover",null,e.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,e(this.tip).hasClass("fade")){var r=a.getTransitionDurationFromElement(i);e(i).one(a.TRANSITION_END,s).emulateTransitionEnd(r)}else s();this._hoverState=""}},i.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},i.isWithContent=function(){return Boolean(this.getTitle())},i.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-tooltip-"+t)},i.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},i.setContent=function(){var t=this.getTipElement();this.setElementContent(e(t.querySelectorAll(".tooltip-inner")),this.getTitle()),e(t).removeClass("fade show")},i.setElementContent=function(t,n){"object"!=typeof n||!n.nodeType&&!n.jquery?this.config.html?(this.config.sanitize&&(n=Q(n,this.config.whiteList,this.config.sanitizeFn)),t.html(n)):t.text(n):this.config.html?e(n).parent().is(t)||t.empty().append(n):t.text(e(n).text())},i.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},i._getPopperConfig=function(t){var e=this;return s({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},i._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=s({},e.offsets,t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},i._getContainer=function(){return!1===this.config.container?document.body:a.isElement(this.config.container)?e(this.config.container):e(document).find(this.config.container)},i._getAttachment=function(t){return V[t.toUpperCase()]},i._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(n){if("click"===n)e(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==n){var i="hover"===n?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,o="hover"===n?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;e(t.element).on(i,t.config.selector,(function(e){return t._enter(e)})).on(o,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},e(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=s({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},i._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},i._enter=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),e(n.getTipElement()).hasClass("show")||"show"===n._hoverState?n._hoverState="show":(clearTimeout(n._timeout),n._hoverState="show",n.config.delay&&n.config.delay.show?n._timeout=setTimeout((function(){"show"===n._hoverState&&n.show()}),n.config.delay.show):n.show())},i._leave=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState="out",n.config.delay&&n.config.delay.hide?n._timeout=setTimeout((function(){"out"===n._hoverState&&n.hide()}),n.config.delay.hide):n.hide())},i._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},i._getConfig=function(t){var n=e(this.element).data();return Object.keys(n).forEach((function(t){-1!==M.indexOf(t)&&delete n[t]})),"number"==typeof(t=s({},this.constructor.Default,n,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),a.typeCheckConfig(B,t,this.constructor.DefaultType),t.sanitize&&(t.template=Q(t.template,t.whiteList,t.sanitizeFn)),t},i._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},i._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(U);null!==n&&n.length&&t.removeClass(n.join(""))},i._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},i._fixTransition=function(){var t=this.getTipElement(),n=this.config.animation;null===t.getAttribute("x-placement")&&(e(t).removeClass("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.tooltip"),o="object"==typeof n&&n;if((i||!/dispose|hide/.test(n))&&(i||(i=new t(this,o),e(this).data("bs.tooltip",i)),"string"==typeof n)){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return z}},{key:"NAME",get:function(){return B}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return K}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return W}}]),t}();e.fn[B]=X._jQueryInterface,e.fn[B].Constructor=X,e.fn[B].noConflict=function(){return e.fn[B]=H,X._jQueryInterface};var Y="popover",$=e.fn[Y],J=new RegExp("(^|\\s)bs-popover\\S+","g"),G=s({},X.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Z=s({},X.DefaultType,{content:"(string|element|function)"}),tt={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},et=function(t){var n,i;function s(){return t.apply(this,arguments)||this}i=t,(n=s).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var r=s.prototype;return r.isWithContent=function(){return this.getTitle()||this._getContent()},r.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-popover-"+t)},r.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},r.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(t.find(".popover-body"),n),t.removeClass("fade show")},r._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},r._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(J);null!==n&&n.length>0&&t.removeClass(n.join(""))},s._jQueryInterface=function(t){return this.each((function(){var n=e(this).data("bs.popover"),i="object"==typeof t?t:null;if((n||!/dispose|hide/.test(t))&&(n||(n=new s(this,i),e(this).data("bs.popover",n)),"string"==typeof t)){if("undefined"==typeof n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},o(s,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return G}},{key:"NAME",get:function(){return Y}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return tt}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return Z}}]),s}(X);e.fn[Y]=et._jQueryInterface,e.fn[Y].Constructor=et,e.fn[Y].noConflict=function(){return e.fn[Y]=$,et._jQueryInterface};var nt="scrollspy",it=e.fn[nt],ot={offset:10,method:"auto",target:""},st={offset:"number",method:"string",target:"(string|element)"},rt=function(){function t(t,n){var i=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(n),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,e(this._scrollElement).on("scroll.bs.scrollspy",(function(t){return i._process(t)})),this.refresh(),this._process()}var n=t.prototype;return n.refresh=function(){var t=this,n=this._scrollElement===this._scrollElement.window?"offset":"position",i="auto"===this._config.method?n:this._config.method,o="position"===i?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var n,s=a.getSelectorFromElement(t);if(s&&(n=document.querySelector(s)),n){var r=n.getBoundingClientRect();if(r.width||r.height)return[e(n)[i]().top+o,s]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},n.dispose=function(){e.removeData(this._element,"bs.scrollspy"),e(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},n._getConfig=function(t){if("string"!=typeof(t=s({},ot,"object"==typeof t&&t?t:{})).target&&a.isElement(t.target)){var n=e(t.target).attr("id");n||(n=a.getUID(nt),e(t.target).attr("id",n)),t.target="#"+n}return a.typeCheckConfig(nt,t,st),t},n._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},n._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},n._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},n._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}}},n._activate=function(t){this._activeTarget=t,this._clear();var n=this._selector.split(",").map((function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'})),i=e([].slice.call(document.querySelectorAll(n.join(","))));i.hasClass("dropdown-item")?(i.closest(".dropdown").find(".dropdown-toggle").addClass("active"),i.addClass("active")):(i.addClass("active"),i.parents(".nav, .list-group").prev(".nav-link, .list-group-item").addClass("active"),i.parents(".nav, .list-group").prev(".nav-item").children(".nav-link").addClass("active")),e(this._scrollElement).trigger("activate.bs.scrollspy",{relatedTarget:t})},n._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter((function(t){return t.classList.contains("active")})).forEach((function(t){return t.classList.remove("active")}))},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.scrollspy");if(i||(i=new t(this,"object"==typeof n&&n),e(this).data("bs.scrollspy",i)),"string"==typeof n){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return ot}}]),t}();e(window).on("load.bs.scrollspy.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-spy="scroll"]')),n=t.length;n--;){var i=e(t[n]);rt._jQueryInterface.call(i,i.data())}})),e.fn[nt]=rt._jQueryInterface,e.fn[nt].Constructor=rt,e.fn[nt].noConflict=function(){return e.fn[nt]=it,rt._jQueryInterface};var at=e.fn.tab,lt=function(){function t(t){this._element=t}var n=t.prototype;return n.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&e(this._element).hasClass("active")||e(this._element).hasClass("disabled"))){var n,i,o=e(this._element).closest(".nav, .list-group")[0],s=a.getSelectorFromElement(this._element);if(o){var r="UL"===o.nodeName||"OL"===o.nodeName?"> li > .active":".active";i=(i=e.makeArray(e(o).find(r)))[i.length-1]}var l=e.Event("hide.bs.tab",{relatedTarget:this._element}),c=e.Event("show.bs.tab",{relatedTarget:i});if(i&&e(i).trigger(l),e(this._element).trigger(c),!c.isDefaultPrevented()&&!l.isDefaultPrevented()){s&&(n=document.querySelector(s)),this._activate(this._element,o);var h=function(){var n=e.Event("hidden.bs.tab",{relatedTarget:t._element}),o=e.Event("shown.bs.tab",{relatedTarget:i});e(i).trigger(n),e(t._element).trigger(o)};n?this._activate(n,n.parentNode,h):h()}}},n.dispose=function(){e.removeData(this._element,"bs.tab"),this._element=null},n._activate=function(t,n,i){var o=this,s=(!n||"UL"!==n.nodeName&&"OL"!==n.nodeName?e(n).children(".active"):e(n).find("> li > .active"))[0],r=i&&s&&e(s).hasClass("fade"),l=function(){return o._transitionComplete(t,s,i)};if(s&&r){var c=a.getTransitionDurationFromElement(s);e(s).removeClass("show").one(a.TRANSITION_END,l).emulateTransitionEnd(c)}else l()},n._transitionComplete=function(t,n,i){if(n){e(n).removeClass("active");var o=e(n.parentNode).find("> .dropdown-menu .active")[0];o&&e(o).removeClass("active"),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(e(t).addClass("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),a.reflow(t),t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&e(t.parentNode).hasClass("dropdown-menu")){var s=e(t).closest(".dropdown")[0];if(s){var r=[].slice.call(s.querySelectorAll(".dropdown-toggle"));e(r).addClass("active")}t.setAttribute("aria-expanded",!0)}i&&i()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.tab");if(o||(o=new t(this),i.data("bs.tab",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}}]),t}();e(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),lt._jQueryInterface.call(e(this),"show")})),e.fn.tab=lt._jQueryInterface,e.fn.tab.Constructor=lt,e.fn.tab.noConflict=function(){return e.fn.tab=at,lt._jQueryInterface};var ct=e.fn.toast,ht={animation:"boolean",autohide:"boolean",delay:"number"},ut={animation:!0,autohide:!0,delay:500},dt=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var n=t.prototype;return n.show=function(){var t=this,n=e.Event("show.bs.toast");if(e(this._element).trigger(n),!n.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var i=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),e(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove("hide"),a.reflow(this._element),this._element.classList.add("showing"),this._config.animation){var o=a.getTransitionDurationFromElement(this._element);e(this._element).one(a.TRANSITION_END,i).emulateTransitionEnd(o)}else i()}},n.hide=function(){if(this._element.classList.contains("show")){var t=e.Event("hide.bs.toast");e(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},n.dispose=function(){this._clearTimeout(),this._element.classList.contains("show")&&this._element.classList.remove("show"),e(this._element).off("click.dismiss.bs.toast"),e.removeData(this._element,"bs.toast"),this._element=null,this._config=null},n._getConfig=function(t){return t=s({},ut,e(this._element).data(),"object"==typeof t&&t?t:{}),a.typeCheckConfig("toast",t,this.constructor.DefaultType),t},n._setListeners=function(){var t=this;e(this._element).on("click.dismiss.bs.toast",'[data-dismiss="toast"]',(function(){return t.hide()}))},n._close=function(){var t=this,n=function(){t._element.classList.add("hide"),e(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var i=a.getTransitionDurationFromElement(this._element);e(this._element).one(a.TRANSITION_END,n).emulateTransitionEnd(i)}else n()},n._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.toast");if(o||(o=new t(this,"object"==typeof n&&n),i.data("bs.toast",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n](this)}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"DefaultType",get:function(){return ht}},{key:"Default",get:function(){return ut}}]),t}();e.fn.toast=dt._jQueryInterface,e.fn.toast.Constructor=dt,e.fn.toast.noConflict=function(){return e.fn.toast=ct,dt._jQueryInterface},t.Alert=h,t.Button=d,t.Carousel=b,t.Collapse=C,t.Dropdown=I,t.Modal=P,t.Popover=et,t.Scrollspy=rt,t.Tab=lt,t.Toast=dt,t.Tooltip=X,t.Util=a,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=bootstrap.min.js.map |
/*! | ||
* Bootstrap alert.js v4.4.1-1 (https://github.com/MahdiMajidzadeh/bootstrap-v4-rtl) | ||
* Copyright 2011-2020 Mahdi Majidzadeh | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap alert.js v4.5.2 (https://getbootstrap.com/) | ||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
*/ | ||
@@ -9,24 +9,11 @@ (function (global, factory) { | ||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : | ||
(global = global || self, global.Alert = factory(global.jQuery, global.Util)); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.jQuery, global.Util)); | ||
}(this, (function ($, Util) { 'use strict'; | ||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $; | ||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; | ||
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $; | ||
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util; | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
/** | ||
@@ -39,3 +26,3 @@ * ------------------------------------------------------------------------ | ||
var NAME = 'alert'; | ||
var VERSION = '4.4.1'; | ||
var VERSION = '4.5.2'; | ||
var DATA_KEY = 'bs.alert'; | ||
@@ -45,15 +32,9 @@ var EVENT_KEY = "." + DATA_KEY; | ||
var JQUERY_NO_CONFLICT = $.fn[NAME]; | ||
var Selector = { | ||
DISMISS: '[data-dismiss="alert"]' | ||
}; | ||
var Event = { | ||
CLOSE: "close" + EVENT_KEY, | ||
CLOSED: "closed" + EVENT_KEY, | ||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY | ||
}; | ||
var ClassName = { | ||
ALERT: 'alert', | ||
FADE: 'fade', | ||
SHOW: 'show' | ||
}; | ||
var SELECTOR_DISMISS = '[data-dismiss="alert"]'; | ||
var EVENT_CLOSE = "close" + EVENT_KEY; | ||
var EVENT_CLOSED = "closed" + EVENT_KEY; | ||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY; | ||
var CLASS_NAME_ALERT = 'alert'; | ||
var CLASS_NAME_FADE = 'fade'; | ||
var CLASS_NAME_SHOW = 'show'; | ||
/** | ||
@@ -105,3 +86,3 @@ * ------------------------------------------------------------------------ | ||
if (!parent) { | ||
parent = $(element).closest("." + ClassName.ALERT)[0]; | ||
parent = $(element).closest("." + CLASS_NAME_ALERT)[0]; | ||
} | ||
@@ -113,3 +94,3 @@ | ||
_proto._triggerCloseEvent = function _triggerCloseEvent(element) { | ||
var closeEvent = $.Event(Event.CLOSE); | ||
var closeEvent = $.Event(EVENT_CLOSE); | ||
$(element).trigger(closeEvent); | ||
@@ -122,5 +103,5 @@ return closeEvent; | ||
$(element).removeClass(ClassName.SHOW); | ||
$(element).removeClass(CLASS_NAME_SHOW); | ||
if (!$(element).hasClass(ClassName.FADE)) { | ||
if (!$(element).hasClass(CLASS_NAME_FADE)) { | ||
this._destroyElement(element); | ||
@@ -138,3 +119,3 @@ | ||
_proto._destroyElement = function _destroyElement(element) { | ||
$(element).detach().trigger(Event.CLOSED).remove(); | ||
$(element).detach().trigger(EVENT_CLOSED).remove(); | ||
} // Static | ||
@@ -185,3 +166,3 @@ ; | ||
$(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert())); | ||
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert._handleDismiss(new Alert())); | ||
/** | ||
@@ -188,0 +169,0 @@ * ------------------------------------------------------------------------ |
/*! | ||
* Bootstrap button.js v4.4.1-1 (https://github.com/MahdiMajidzadeh/bootstrap-v4-rtl) | ||
* Copyright 2011-2020 Mahdi Majidzadeh | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap button.js v4.5.2 (https://getbootstrap.com/) | ||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
*/ | ||
@@ -9,23 +9,10 @@ (function (global, factory) { | ||
typeof define === 'function' && define.amd ? define(['jquery'], factory) : | ||
(global = global || self, global.Button = factory(global.jQuery)); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.jQuery)); | ||
}(this, (function ($) { 'use strict'; | ||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $; | ||
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $; | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
/** | ||
@@ -38,3 +25,3 @@ * ------------------------------------------------------------------------ | ||
var NAME = 'button'; | ||
var VERSION = '4.4.1'; | ||
var VERSION = '4.5.2'; | ||
var DATA_KEY = 'bs.button'; | ||
@@ -44,21 +31,15 @@ var EVENT_KEY = "." + DATA_KEY; | ||
var JQUERY_NO_CONFLICT = $.fn[NAME]; | ||
var ClassName = { | ||
ACTIVE: 'active', | ||
BUTTON: 'btn', | ||
FOCUS: 'focus' | ||
}; | ||
var Selector = { | ||
DATA_TOGGLE_CARROT: '[data-toggle^="button"]', | ||
DATA_TOGGLES: '[data-toggle="buttons"]', | ||
DATA_TOGGLE: '[data-toggle="button"]', | ||
DATA_TOGGLES_BUTTONS: '[data-toggle="buttons"] .btn', | ||
INPUT: 'input:not([type="hidden"])', | ||
ACTIVE: '.active', | ||
BUTTON: '.btn' | ||
}; | ||
var Event = { | ||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY, | ||
FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY), | ||
LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY | ||
}; | ||
var CLASS_NAME_ACTIVE = 'active'; | ||
var CLASS_NAME_BUTTON = 'btn'; | ||
var CLASS_NAME_FOCUS = 'focus'; | ||
var SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]'; | ||
var SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]'; | ||
var SELECTOR_DATA_TOGGLE = '[data-toggle="button"]'; | ||
var SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn'; | ||
var SELECTOR_INPUT = 'input:not([type="hidden"])'; | ||
var SELECTOR_ACTIVE = '.active'; | ||
var SELECTOR_BUTTON = '.btn'; | ||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY; | ||
var EVENT_FOCUS_BLUR_DATA_API = "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY); | ||
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY; | ||
/** | ||
@@ -82,29 +63,26 @@ * ------------------------------------------------------------------------ | ||
var addAriaPressed = true; | ||
var rootElement = $(this._element).closest(Selector.DATA_TOGGLES)[0]; | ||
var rootElement = $(this._element).closest(SELECTOR_DATA_TOGGLES)[0]; | ||
if (rootElement) { | ||
var input = this._element.querySelector(Selector.INPUT); | ||
var input = this._element.querySelector(SELECTOR_INPUT); | ||
if (input) { | ||
if (input.type === 'radio') { | ||
if (input.checked && this._element.classList.contains(ClassName.ACTIVE)) { | ||
if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE)) { | ||
triggerChangeEvent = false; | ||
} else { | ||
var activeElement = rootElement.querySelector(Selector.ACTIVE); | ||
var activeElement = rootElement.querySelector(SELECTOR_ACTIVE); | ||
if (activeElement) { | ||
$(activeElement).removeClass(ClassName.ACTIVE); | ||
$(activeElement).removeClass(CLASS_NAME_ACTIVE); | ||
} | ||
} | ||
} else if (input.type === 'checkbox') { | ||
if (this._element.tagName === 'LABEL' && input.checked === this._element.classList.contains(ClassName.ACTIVE)) { | ||
triggerChangeEvent = false; | ||
} | ||
} else { | ||
// if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input | ||
triggerChangeEvent = false; | ||
} | ||
if (triggerChangeEvent) { | ||
input.checked = !this._element.classList.contains(ClassName.ACTIVE); | ||
// if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input | ||
if (input.type === 'checkbox' || input.type === 'radio') { | ||
input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE); | ||
} | ||
$(input).trigger('change'); | ||
@@ -120,7 +98,7 @@ } | ||
if (addAriaPressed) { | ||
this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName.ACTIVE)); | ||
this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE)); | ||
} | ||
if (triggerChangeEvent) { | ||
$(this._element).toggleClass(ClassName.ACTIVE); | ||
$(this._element).toggleClass(CLASS_NAME_ACTIVE); | ||
} | ||
@@ -167,7 +145,8 @@ } | ||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { | ||
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) { | ||
var button = event.target; | ||
var initialButton = button; | ||
if (!$(button).hasClass(ClassName.BUTTON)) { | ||
button = $(button).closest(Selector.BUTTON)[0]; | ||
if (!$(button).hasClass(CLASS_NAME_BUTTON)) { | ||
button = $(button).closest(SELECTOR_BUTTON)[0]; | ||
} | ||
@@ -178,3 +157,3 @@ | ||
} else { | ||
var inputBtn = button.querySelector(Selector.INPUT); | ||
var inputBtn = button.querySelector(SELECTOR_INPUT); | ||
@@ -187,21 +166,23 @@ if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) { | ||
Button._jQueryInterface.call($(button), 'toggle'); | ||
if (initialButton.tagName !== 'LABEL' || inputBtn && inputBtn.type !== 'checkbox') { | ||
Button._jQueryInterface.call($(button), 'toggle'); | ||
} | ||
} | ||
}).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { | ||
var button = $(event.target).closest(Selector.BUTTON)[0]; | ||
$(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type)); | ||
}).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) { | ||
var button = $(event.target).closest(SELECTOR_BUTTON)[0]; | ||
$(button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type)); | ||
}); | ||
$(window).on(Event.LOAD_DATA_API, function () { | ||
$(window).on(EVENT_LOAD_DATA_API, function () { | ||
// ensure correct active class is set to match the controls' actual values/states | ||
// find all checkboxes/readio buttons inside data-toggle groups | ||
var buttons = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLES_BUTTONS)); | ||
var buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS)); | ||
for (var i = 0, len = buttons.length; i < len; i++) { | ||
var button = buttons[i]; | ||
var input = button.querySelector(Selector.INPUT); | ||
var input = button.querySelector(SELECTOR_INPUT); | ||
if (input.checked || input.hasAttribute('checked')) { | ||
button.classList.add(ClassName.ACTIVE); | ||
button.classList.add(CLASS_NAME_ACTIVE); | ||
} else { | ||
button.classList.remove(ClassName.ACTIVE); | ||
button.classList.remove(CLASS_NAME_ACTIVE); | ||
} | ||
@@ -211,3 +192,3 @@ } // find all button toggles | ||
buttons = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE)); | ||
buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE)); | ||
@@ -218,5 +199,5 @@ for (var _i = 0, _len = buttons.length; _i < _len; _i++) { | ||
if (_button.getAttribute('aria-pressed') === 'true') { | ||
_button.classList.add(ClassName.ACTIVE); | ||
_button.classList.add(CLASS_NAME_ACTIVE); | ||
} else { | ||
_button.classList.remove(ClassName.ACTIVE); | ||
_button.classList.remove(CLASS_NAME_ACTIVE); | ||
} | ||
@@ -223,0 +204,0 @@ } |
/*! | ||
* Bootstrap carousel.js v4.4.1-1 (https://github.com/MahdiMajidzadeh/bootstrap-v4-rtl) | ||
* Copyright 2011-2020 Mahdi Majidzadeh | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap carousel.js v4.5.2 (https://getbootstrap.com/) | ||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
*/ | ||
@@ -9,73 +9,13 @@ (function (global, factory) { | ||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : | ||
(global = global || self, global.Carousel = factory(global.jQuery, global.Util)); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.jQuery, global.Util)); | ||
}(this, (function ($, Util) { 'use strict'; | ||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $; | ||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; | ||
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $; | ||
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util; | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
} | ||
return target; | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
/** | ||
@@ -88,3 +28,3 @@ * ------------------------------------------------------------------------ | ||
var NAME = 'carousel'; | ||
var VERSION = '4.4.1'; | ||
var VERSION = '4.5.2'; | ||
var DATA_KEY = 'bs.carousel'; | ||
@@ -117,44 +57,35 @@ var EVENT_KEY = "." + DATA_KEY; | ||
}; | ||
var Direction = { | ||
NEXT: 'next', | ||
PREV: 'prev', | ||
LEFT: 'left', | ||
RIGHT: 'right' | ||
}; | ||
var Event = { | ||
SLIDE: "slide" + EVENT_KEY, | ||
SLID: "slid" + EVENT_KEY, | ||
KEYDOWN: "keydown" + EVENT_KEY, | ||
MOUSEENTER: "mouseenter" + EVENT_KEY, | ||
MOUSELEAVE: "mouseleave" + EVENT_KEY, | ||
TOUCHSTART: "touchstart" + EVENT_KEY, | ||
TOUCHMOVE: "touchmove" + EVENT_KEY, | ||
TOUCHEND: "touchend" + EVENT_KEY, | ||
POINTERDOWN: "pointerdown" + EVENT_KEY, | ||
POINTERUP: "pointerup" + EVENT_KEY, | ||
DRAG_START: "dragstart" + EVENT_KEY, | ||
LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY, | ||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY | ||
}; | ||
var ClassName = { | ||
CAROUSEL: 'carousel', | ||
ACTIVE: 'active', | ||
SLIDE: 'slide', | ||
RIGHT: 'carousel-item-right', | ||
LEFT: 'carousel-item-left', | ||
NEXT: 'carousel-item-next', | ||
PREV: 'carousel-item-prev', | ||
ITEM: 'carousel-item', | ||
POINTER_EVENT: 'pointer-event' | ||
}; | ||
var Selector = { | ||
ACTIVE: '.active', | ||
ACTIVE_ITEM: '.active.carousel-item', | ||
ITEM: '.carousel-item', | ||
ITEM_IMG: '.carousel-item img', | ||
NEXT_PREV: '.carousel-item-next, .carousel-item-prev', | ||
INDICATORS: '.carousel-indicators', | ||
DATA_SLIDE: '[data-slide], [data-slide-to]', | ||
DATA_RIDE: '[data-ride="carousel"]' | ||
}; | ||
var DIRECTION_NEXT = 'next'; | ||
var DIRECTION_PREV = 'prev'; | ||
var DIRECTION_LEFT = 'left'; | ||
var DIRECTION_RIGHT = 'right'; | ||
var EVENT_SLIDE = "slide" + EVENT_KEY; | ||
var EVENT_SLID = "slid" + EVENT_KEY; | ||
var EVENT_KEYDOWN = "keydown" + EVENT_KEY; | ||
var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY; | ||
var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY; | ||
var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY; | ||
var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY; | ||
var EVENT_TOUCHEND = "touchend" + EVENT_KEY; | ||
var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY; | ||
var EVENT_POINTERUP = "pointerup" + EVENT_KEY; | ||
var EVENT_DRAG_START = "dragstart" + EVENT_KEY; | ||
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY; | ||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY; | ||
var CLASS_NAME_CAROUSEL = 'carousel'; | ||
var CLASS_NAME_ACTIVE = 'active'; | ||
var CLASS_NAME_SLIDE = 'slide'; | ||
var CLASS_NAME_RIGHT = 'carousel-item-right'; | ||
var CLASS_NAME_LEFT = 'carousel-item-left'; | ||
var CLASS_NAME_NEXT = 'carousel-item-next'; | ||
var CLASS_NAME_PREV = 'carousel-item-prev'; | ||
var CLASS_NAME_POINTER_EVENT = 'pointer-event'; | ||
var SELECTOR_ACTIVE = '.active'; | ||
var SELECTOR_ACTIVE_ITEM = '.active.carousel-item'; | ||
var SELECTOR_ITEM = '.carousel-item'; | ||
var SELECTOR_ITEM_IMG = '.carousel-item img'; | ||
var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'; | ||
var SELECTOR_INDICATORS = '.carousel-indicators'; | ||
var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]'; | ||
var SELECTOR_DATA_RIDE = '[data-ride="carousel"]'; | ||
var PointerType = { | ||
@@ -182,3 +113,3 @@ TOUCH: 'touch', | ||
this._element = element; | ||
this._indicatorsElement = this._element.querySelector(Selector.INDICATORS); | ||
this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS); | ||
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0; | ||
@@ -196,3 +127,3 @@ this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent); | ||
if (!this._isSliding) { | ||
this._slide(Direction.NEXT); | ||
this._slide(DIRECTION_NEXT); | ||
} | ||
@@ -211,3 +142,3 @@ }; | ||
if (!this._isSliding) { | ||
this._slide(Direction.PREV); | ||
this._slide(DIRECTION_PREV); | ||
} | ||
@@ -221,3 +152,3 @@ }; | ||
if (this._element.querySelector(Selector.NEXT_PREV)) { | ||
if (this._element.querySelector(SELECTOR_NEXT_PREV)) { | ||
Util.triggerTransitionEnd(this._element); | ||
@@ -249,3 +180,3 @@ this.cycle(true); | ||
this._activeElement = this._element.querySelector(Selector.ACTIVE_ITEM); | ||
this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM); | ||
@@ -259,3 +190,3 @@ var activeIndex = this._getItemIndex(this._activeElement); | ||
if (this._isSliding) { | ||
$(this._element).one(Event.SLID, function () { | ||
$(this._element).one(EVENT_SLID, function () { | ||
return _this.to(index); | ||
@@ -272,3 +203,3 @@ }); | ||
var direction = index > activeIndex ? Direction.NEXT : Direction.PREV; | ||
var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV; | ||
@@ -293,3 +224,3 @@ this._slide(direction, this._items[index]); | ||
_proto._getConfig = function _getConfig(config) { | ||
config = _objectSpread2(_objectSpread2({}, Default), config); | ||
config = _extends({}, Default, config); | ||
Util.typeCheckConfig(NAME, config, DefaultType); | ||
@@ -323,3 +254,3 @@ return config; | ||
if (this._config.keyboard) { | ||
$(this._element).on(Event.KEYDOWN, function (event) { | ||
$(this._element).on(EVENT_KEYDOWN, function (event) { | ||
return _this2._keydown(event); | ||
@@ -330,5 +261,5 @@ }); | ||
if (this._config.pause === 'hover') { | ||
$(this._element).on(Event.MOUSEENTER, function (event) { | ||
$(this._element).on(EVENT_MOUSEENTER, function (event) { | ||
return _this2.pause(event); | ||
}).on(Event.MOUSELEAVE, function (event) { | ||
}).on(EVENT_MOUSELEAVE, function (event) { | ||
return _this2.cycle(event); | ||
@@ -394,3 +325,3 @@ }); | ||
$(this._element.querySelectorAll(Selector.ITEM_IMG)).on(Event.DRAG_START, function (e) { | ||
$(this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START, function (e) { | ||
return e.preventDefault(); | ||
@@ -400,18 +331,18 @@ }); | ||
if (this._pointerEvent) { | ||
$(this._element).on(Event.POINTERDOWN, function (event) { | ||
$(this._element).on(EVENT_POINTERDOWN, function (event) { | ||
return start(event); | ||
}); | ||
$(this._element).on(Event.POINTERUP, function (event) { | ||
$(this._element).on(EVENT_POINTERUP, function (event) { | ||
return end(event); | ||
}); | ||
this._element.classList.add(ClassName.POINTER_EVENT); | ||
this._element.classList.add(CLASS_NAME_POINTER_EVENT); | ||
} else { | ||
$(this._element).on(Event.TOUCHSTART, function (event) { | ||
$(this._element).on(EVENT_TOUCHSTART, function (event) { | ||
return start(event); | ||
}); | ||
$(this._element).on(Event.TOUCHMOVE, function (event) { | ||
$(this._element).on(EVENT_TOUCHMOVE, function (event) { | ||
return move(event); | ||
}); | ||
$(this._element).on(Event.TOUCHEND, function (event) { | ||
$(this._element).on(EVENT_TOUCHEND, function (event) { | ||
return end(event); | ||
@@ -441,3 +372,3 @@ }); | ||
_proto._getItemIndex = function _getItemIndex(element) { | ||
this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector.ITEM)) : []; | ||
this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) : []; | ||
return this._items.indexOf(element); | ||
@@ -447,4 +378,4 @@ }; | ||
_proto._getItemByDirection = function _getItemByDirection(direction, activeElement) { | ||
var isNextDirection = direction === Direction.NEXT; | ||
var isPrevDirection = direction === Direction.PREV; | ||
var isNextDirection = direction === DIRECTION_NEXT; | ||
var isPrevDirection = direction === DIRECTION_PREV; | ||
@@ -460,3 +391,3 @@ var activeIndex = this._getItemIndex(activeElement); | ||
var delta = direction === Direction.PREV ? -1 : 1; | ||
var delta = direction === DIRECTION_PREV ? -1 : 1; | ||
var itemIndex = (activeIndex + delta) % this._items.length; | ||
@@ -469,5 +400,5 @@ return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; | ||
var fromIndex = this._getItemIndex(this._element.querySelector(Selector.ACTIVE_ITEM)); | ||
var fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM)); | ||
var slideEvent = $.Event(Event.SLIDE, { | ||
var slideEvent = $.Event(EVENT_SLIDE, { | ||
relatedTarget: relatedTarget, | ||
@@ -484,4 +415,4 @@ direction: eventDirectionName, | ||
if (this._indicatorsElement) { | ||
var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector.ACTIVE)); | ||
$(indicators).removeClass(ClassName.ACTIVE); | ||
var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE)); | ||
$(indicators).removeClass(CLASS_NAME_ACTIVE); | ||
@@ -491,3 +422,3 @@ var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; | ||
if (nextIndicator) { | ||
$(nextIndicator).addClass(ClassName.ACTIVE); | ||
$(nextIndicator).addClass(CLASS_NAME_ACTIVE); | ||
} | ||
@@ -500,3 +431,3 @@ } | ||
var activeElement = this._element.querySelector(Selector.ACTIVE_ITEM); | ||
var activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM); | ||
@@ -514,13 +445,13 @@ var activeElementIndex = this._getItemIndex(activeElement); | ||
if (direction === Direction.NEXT) { | ||
directionalClassName = ClassName.LEFT; | ||
orderClassName = ClassName.NEXT; | ||
eventDirectionName = Direction.LEFT; | ||
if (direction === DIRECTION_NEXT) { | ||
directionalClassName = CLASS_NAME_LEFT; | ||
orderClassName = CLASS_NAME_NEXT; | ||
eventDirectionName = DIRECTION_LEFT; | ||
} else { | ||
directionalClassName = ClassName.RIGHT; | ||
orderClassName = ClassName.PREV; | ||
eventDirectionName = Direction.RIGHT; | ||
directionalClassName = CLASS_NAME_RIGHT; | ||
orderClassName = CLASS_NAME_PREV; | ||
eventDirectionName = DIRECTION_RIGHT; | ||
} | ||
if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) { | ||
if (nextElement && $(nextElement).hasClass(CLASS_NAME_ACTIVE)) { | ||
this._isSliding = false; | ||
@@ -549,3 +480,3 @@ return; | ||
var slidEvent = $.Event(Event.SLID, { | ||
var slidEvent = $.Event(EVENT_SLID, { | ||
relatedTarget: nextElement, | ||
@@ -557,3 +488,3 @@ direction: eventDirectionName, | ||
if ($(this._element).hasClass(ClassName.SLIDE)) { | ||
if ($(this._element).hasClass(CLASS_NAME_SLIDE)) { | ||
$(nextElement).addClass(orderClassName); | ||
@@ -574,4 +505,4 @@ Util.reflow(nextElement); | ||
$(activeElement).one(Util.TRANSITION_END, function () { | ||
$(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE); | ||
$(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName); | ||
$(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE); | ||
$(activeElement).removeClass(CLASS_NAME_ACTIVE + " " + orderClassName + " " + directionalClassName); | ||
_this4._isSliding = false; | ||
@@ -583,4 +514,4 @@ setTimeout(function () { | ||
} else { | ||
$(activeElement).removeClass(ClassName.ACTIVE); | ||
$(nextElement).addClass(ClassName.ACTIVE); | ||
$(activeElement).removeClass(CLASS_NAME_ACTIVE); | ||
$(nextElement).addClass(CLASS_NAME_ACTIVE); | ||
this._isSliding = false; | ||
@@ -600,6 +531,6 @@ $(this._element).trigger(slidEvent); | ||
var _config = _objectSpread2(_objectSpread2({}, Default), $(this).data()); | ||
var _config = _extends({}, Default, $(this).data()); | ||
if (typeof config === 'object') { | ||
_config = _objectSpread2(_objectSpread2({}, _config), config); | ||
_config = _extends({}, _config, config); | ||
} | ||
@@ -638,7 +569,7 @@ | ||
if (!target || !$(target).hasClass(ClassName.CAROUSEL)) { | ||
if (!target || !$(target).hasClass(CLASS_NAME_CAROUSEL)) { | ||
return; | ||
} | ||
var config = _objectSpread2(_objectSpread2({}, $(target).data()), $(this).data()); | ||
var config = _extends({}, $(target).data(), $(this).data()); | ||
@@ -681,5 +612,5 @@ var slideIndex = this.getAttribute('data-slide-to'); | ||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler); | ||
$(window).on(Event.LOAD_DATA_API, function () { | ||
var carousels = [].slice.call(document.querySelectorAll(Selector.DATA_RIDE)); | ||
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler); | ||
$(window).on(EVENT_LOAD_DATA_API, function () { | ||
var carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE)); | ||
@@ -686,0 +617,0 @@ for (var i = 0, len = carousels.length; i < len; i++) { |
/*! | ||
* Bootstrap collapse.js v4.4.1-1 (https://github.com/MahdiMajidzadeh/bootstrap-v4-rtl) | ||
* Copyright 2011-2020 Mahdi Majidzadeh | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap collapse.js v4.5.2 (https://getbootstrap.com/) | ||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
*/ | ||
@@ -9,73 +9,13 @@ (function (global, factory) { | ||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : | ||
(global = global || self, global.Collapse = factory(global.jQuery, global.Util)); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.jQuery, global.Util)); | ||
}(this, (function ($, Util) { 'use strict'; | ||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $; | ||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; | ||
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $; | ||
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util; | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
} | ||
return target; | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
/** | ||
@@ -88,3 +28,3 @@ * ------------------------------------------------------------------------ | ||
var NAME = 'collapse'; | ||
var VERSION = '4.4.1'; | ||
var VERSION = '4.5.2'; | ||
var DATA_KEY = 'bs.collapse'; | ||
@@ -102,23 +42,15 @@ var EVENT_KEY = "." + DATA_KEY; | ||
}; | ||
var Event = { | ||
SHOW: "show" + EVENT_KEY, | ||
SHOWN: "shown" + EVENT_KEY, | ||
HIDE: "hide" + EVENT_KEY, | ||
HIDDEN: "hidden" + EVENT_KEY, | ||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY | ||
}; | ||
var ClassName = { | ||
SHOW: 'show', | ||
COLLAPSE: 'collapse', | ||
COLLAPSING: 'collapsing', | ||
COLLAPSED: 'collapsed' | ||
}; | ||
var Dimension = { | ||
WIDTH: 'width', | ||
HEIGHT: 'height' | ||
}; | ||
var Selector = { | ||
ACTIVES: '.show, .collapsing', | ||
DATA_TOGGLE: '[data-toggle="collapse"]' | ||
}; | ||
var EVENT_SHOW = "show" + EVENT_KEY; | ||
var EVENT_SHOWN = "shown" + EVENT_KEY; | ||
var EVENT_HIDE = "hide" + EVENT_KEY; | ||
var EVENT_HIDDEN = "hidden" + EVENT_KEY; | ||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY; | ||
var CLASS_NAME_SHOW = 'show'; | ||
var CLASS_NAME_COLLAPSE = 'collapse'; | ||
var CLASS_NAME_COLLAPSING = 'collapsing'; | ||
var CLASS_NAME_COLLAPSED = 'collapsed'; | ||
var DIMENSION_WIDTH = 'width'; | ||
var DIMENSION_HEIGHT = 'height'; | ||
var SELECTOR_ACTIVES = '.show, .collapsing'; | ||
var SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]'; | ||
/** | ||
@@ -136,3 +68,3 @@ * ------------------------------------------------------------------------ | ||
this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]"))); | ||
var toggleList = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE)); | ||
var toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE)); | ||
@@ -169,3 +101,3 @@ for (var i = 0, len = toggleList.length; i < len; i++) { | ||
_proto.toggle = function toggle() { | ||
if ($(this._element).hasClass(ClassName.SHOW)) { | ||
if ($(this._element).hasClass(CLASS_NAME_SHOW)) { | ||
this.hide(); | ||
@@ -180,3 +112,3 @@ } else { | ||
if (this._isTransitioning || $(this._element).hasClass(ClassName.SHOW)) { | ||
if (this._isTransitioning || $(this._element).hasClass(CLASS_NAME_SHOW)) { | ||
return; | ||
@@ -189,3 +121,3 @@ } | ||
if (this._parent) { | ||
actives = [].slice.call(this._parent.querySelectorAll(Selector.ACTIVES)).filter(function (elem) { | ||
actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES)).filter(function (elem) { | ||
if (typeof _this._config.parent === 'string') { | ||
@@ -195,3 +127,3 @@ return elem.getAttribute('data-parent') === _this._config.parent; | ||
return elem.classList.contains(ClassName.COLLAPSE); | ||
return elem.classList.contains(CLASS_NAME_COLLAPSE); | ||
}); | ||
@@ -212,3 +144,3 @@ | ||
var startEvent = $.Event(Event.SHOW); | ||
var startEvent = $.Event(EVENT_SHOW); | ||
$(this._element).trigger(startEvent); | ||
@@ -230,7 +162,7 @@ | ||
$(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING); | ||
$(this._element).removeClass(CLASS_NAME_COLLAPSE).addClass(CLASS_NAME_COLLAPSING); | ||
this._element.style[dimension] = 0; | ||
if (this._triggerArray.length) { | ||
$(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true); | ||
$(this._triggerArray).removeClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', true); | ||
} | ||
@@ -241,3 +173,3 @@ | ||
var complete = function complete() { | ||
$(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW); | ||
$(_this._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW); | ||
_this._element.style[dimension] = ''; | ||
@@ -247,3 +179,3 @@ | ||
$(_this._element).trigger(Event.SHOWN); | ||
$(_this._element).trigger(EVENT_SHOWN); | ||
}; | ||
@@ -261,7 +193,7 @@ | ||
if (this._isTransitioning || !$(this._element).hasClass(ClassName.SHOW)) { | ||
if (this._isTransitioning || !$(this._element).hasClass(CLASS_NAME_SHOW)) { | ||
return; | ||
} | ||
var startEvent = $.Event(Event.HIDE); | ||
var startEvent = $.Event(EVENT_HIDE); | ||
$(this._element).trigger(startEvent); | ||
@@ -277,3 +209,3 @@ | ||
Util.reflow(this._element); | ||
$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW); | ||
$(this._element).addClass(CLASS_NAME_COLLAPSING).removeClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW); | ||
var triggerArrayLength = this._triggerArray.length; | ||
@@ -289,4 +221,4 @@ | ||
if (!$elem.hasClass(ClassName.SHOW)) { | ||
$(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false); | ||
if (!$elem.hasClass(CLASS_NAME_SHOW)) { | ||
$(trigger).addClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', false); | ||
} | ||
@@ -302,3 +234,3 @@ } | ||
$(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN); | ||
$(_this2._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE).trigger(EVENT_HIDDEN); | ||
}; | ||
@@ -326,3 +258,3 @@ | ||
_proto._getConfig = function _getConfig(config) { | ||
config = _objectSpread2(_objectSpread2({}, Default), config); | ||
config = _extends({}, Default, config); | ||
config.toggle = Boolean(config.toggle); // Coerce string values | ||
@@ -335,4 +267,4 @@ | ||
_proto._getDimension = function _getDimension() { | ||
var hasWidth = $(this._element).hasClass(Dimension.WIDTH); | ||
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; | ||
var hasWidth = $(this._element).hasClass(DIMENSION_WIDTH); | ||
return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT; | ||
}; | ||
@@ -364,6 +296,6 @@ | ||
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { | ||
var isOpen = $(element).hasClass(ClassName.SHOW); | ||
var isOpen = $(element).hasClass(CLASS_NAME_SHOW); | ||
if (triggerArray.length) { | ||
$(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); | ||
$(triggerArray).toggleClass(CLASS_NAME_COLLAPSED, !isOpen).attr('aria-expanded', isOpen); | ||
} | ||
@@ -383,5 +315,5 @@ } // Static | ||
var _config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default), $this.data()), typeof config === 'object' && config ? config : {}); | ||
var _config = _extends({}, Default, $this.data(), typeof config === 'object' && config ? config : {}); | ||
if (!data && _config.toggle && /show|hide/.test(config)) { | ||
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) { | ||
_config.toggle = false; | ||
@@ -426,3 +358,3 @@ } | ||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { | ||
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { | ||
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element | ||
@@ -429,0 +361,0 @@ if (event.currentTarget.tagName === 'A') { |
/*! | ||
* Bootstrap dropdown.js v4.4.1-1 (https://github.com/MahdiMajidzadeh/bootstrap-v4-rtl) | ||
* Copyright 2011-2020 Mahdi Majidzadeh | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap dropdown.js v4.5.2 (https://getbootstrap.com/) | ||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
*/ | ||
@@ -9,74 +9,14 @@ (function (global, factory) { | ||
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) : | ||
(global = global || self, global.Dropdown = factory(global.jQuery, global.Popper, global.Util)); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.jQuery, global.Popper, global.Util)); | ||
}(this, (function ($, Popper, Util) { 'use strict'; | ||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $; | ||
Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper; | ||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; | ||
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $; | ||
Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper; | ||
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util; | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
} | ||
return target; | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
/** | ||
@@ -89,3 +29,3 @@ * ------------------------------------------------------------------------ | ||
var NAME = 'dropdown'; | ||
var VERSION = '4.4.1'; | ||
var VERSION = '4.5.2'; | ||
var DATA_KEY = 'bs.dropdown'; | ||
@@ -108,39 +48,28 @@ var EVENT_KEY = "." + DATA_KEY; | ||
var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE); | ||
var Event = { | ||
HIDE: "hide" + EVENT_KEY, | ||
HIDDEN: "hidden" + EVENT_KEY, | ||
SHOW: "show" + EVENT_KEY, | ||
SHOWN: "shown" + EVENT_KEY, | ||
CLICK: "click" + EVENT_KEY, | ||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY, | ||
KEYDOWN_DATA_API: "keydown" + EVENT_KEY + DATA_API_KEY, | ||
KEYUP_DATA_API: "keyup" + EVENT_KEY + DATA_API_KEY | ||
}; | ||
var ClassName = { | ||
DISABLED: 'disabled', | ||
SHOW: 'show', | ||
DROPUP: 'dropup', | ||
DROPRIGHT: 'dropright', | ||
DROPLEFT: 'dropleft', | ||
MENURIGHT: 'dropdown-menu-right', | ||
MENULEFT: 'dropdown-menu-left', | ||
POSITION_STATIC: 'position-static' | ||
}; | ||
var Selector = { | ||
DATA_TOGGLE: '[data-toggle="dropdown"]', | ||
FORM_CHILD: '.dropdown form', | ||
MENU: '.dropdown-menu', | ||
NAVBAR_NAV: '.navbar-nav', | ||
VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)' | ||
}; | ||
var AttachmentMap = { | ||
TOP: 'top-start', | ||
TOPEND: 'top-end', | ||
BOTTOM: 'bottom-start', | ||
BOTTOMEND: 'bottom-end', | ||
RIGHT: 'right-start', | ||
RIGHTEND: 'right-end', | ||
LEFT: 'left-start', | ||
LEFTEND: 'left-end' | ||
}; | ||
var EVENT_HIDE = "hide" + EVENT_KEY; | ||
var EVENT_HIDDEN = "hidden" + EVENT_KEY; | ||
var EVENT_SHOW = "show" + EVENT_KEY; | ||
var EVENT_SHOWN = "shown" + EVENT_KEY; | ||
var EVENT_CLICK = "click" + EVENT_KEY; | ||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY; | ||
var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY + DATA_API_KEY; | ||
var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY + DATA_API_KEY; | ||
var CLASS_NAME_DISABLED = 'disabled'; | ||
var CLASS_NAME_SHOW = 'show'; | ||
var CLASS_NAME_DROPUP = 'dropup'; | ||
var CLASS_NAME_DROPRIGHT = 'dropright'; | ||
var CLASS_NAME_DROPLEFT = 'dropleft'; | ||
var CLASS_NAME_MENURIGHT = 'dropdown-menu-right'; | ||
var CLASS_NAME_POSITION_STATIC = 'position-static'; | ||
var SELECTOR_DATA_TOGGLE = '[data-toggle="dropdown"]'; | ||
var SELECTOR_FORM_CHILD = '.dropdown form'; | ||
var SELECTOR_MENU = '.dropdown-menu'; | ||
var SELECTOR_NAVBAR_NAV = '.navbar-nav'; | ||
var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'; | ||
var PLACEMENT_TOP = 'top-start'; | ||
var PLACEMENT_TOPEND = 'top-end'; | ||
var PLACEMENT_BOTTOM = 'bottom-start'; | ||
var PLACEMENT_BOTTOMEND = 'bottom-end'; | ||
var PLACEMENT_RIGHT = 'right-start'; | ||
var PLACEMENT_LEFT = 'left-start'; | ||
var Default = { | ||
@@ -184,7 +113,7 @@ offset: 0, | ||
_proto.toggle = function toggle() { | ||
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) { | ||
if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED)) { | ||
return; | ||
} | ||
var isActive = $(this._menu).hasClass(ClassName.SHOW); | ||
var isActive = $(this._menu).hasClass(CLASS_NAME_SHOW); | ||
@@ -205,3 +134,3 @@ Dropdown._clearMenus(); | ||
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED) || $(this._menu).hasClass(ClassName.SHOW)) { | ||
if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || $(this._menu).hasClass(CLASS_NAME_SHOW)) { | ||
return; | ||
@@ -213,3 +142,3 @@ } | ||
}; | ||
var showEvent = $.Event(Event.SHOW, relatedTarget); | ||
var showEvent = $.Event(EVENT_SHOW, relatedTarget); | ||
@@ -250,3 +179,3 @@ var parent = Dropdown._getParentFromElement(this._element); | ||
if (this._config.boundary !== 'scrollParent') { | ||
$(parent).addClass(ClassName.POSITION_STATIC); | ||
$(parent).addClass(CLASS_NAME_POSITION_STATIC); | ||
} | ||
@@ -261,3 +190,3 @@ | ||
if ('ontouchstart' in document.documentElement && $(parent).closest(Selector.NAVBAR_NAV).length === 0) { | ||
if ('ontouchstart' in document.documentElement && $(parent).closest(SELECTOR_NAVBAR_NAV).length === 0) { | ||
$(document.body).children().on('mouseover', null, $.noop); | ||
@@ -270,8 +199,8 @@ } | ||
$(this._menu).toggleClass(ClassName.SHOW); | ||
$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget)); | ||
$(this._menu).toggleClass(CLASS_NAME_SHOW); | ||
$(parent).toggleClass(CLASS_NAME_SHOW).trigger($.Event(EVENT_SHOWN, relatedTarget)); | ||
}; | ||
_proto.hide = function hide() { | ||
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED) || !$(this._menu).hasClass(ClassName.SHOW)) { | ||
if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || !$(this._menu).hasClass(CLASS_NAME_SHOW)) { | ||
return; | ||
@@ -283,3 +212,3 @@ } | ||
}; | ||
var hideEvent = $.Event(Event.HIDE, relatedTarget); | ||
var hideEvent = $.Event(EVENT_HIDE, relatedTarget); | ||
@@ -298,4 +227,4 @@ var parent = Dropdown._getParentFromElement(this._element); | ||
$(this._menu).toggleClass(ClassName.SHOW); | ||
$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget)); | ||
$(this._menu).toggleClass(CLASS_NAME_SHOW); | ||
$(parent).toggleClass(CLASS_NAME_SHOW).trigger($.Event(EVENT_HIDDEN, relatedTarget)); | ||
}; | ||
@@ -328,3 +257,3 @@ | ||
$(this._element).on(Event.CLICK, function (event) { | ||
$(this._element).on(EVENT_CLICK, function (event) { | ||
event.preventDefault(); | ||
@@ -338,3 +267,3 @@ event.stopPropagation(); | ||
_proto._getConfig = function _getConfig(config) { | ||
config = _objectSpread2(_objectSpread2(_objectSpread2({}, this.constructor.Default), $(this._element).data()), config); | ||
config = _extends({}, this.constructor.Default, $(this._element).data(), config); | ||
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); | ||
@@ -349,3 +278,3 @@ return config; | ||
if (parent) { | ||
this._menu = parent.querySelector(Selector.MENU); | ||
this._menu = parent.querySelector(SELECTOR_MENU); | ||
} | ||
@@ -359,16 +288,12 @@ } | ||
var $parentDropdown = $(this._element.parentNode); | ||
var placement = AttachmentMap.BOTTOM; // Handle dropup | ||
var placement = PLACEMENT_BOTTOM; // Handle dropup | ||
if ($parentDropdown.hasClass(ClassName.DROPUP)) { | ||
placement = AttachmentMap.TOP; | ||
if ($(this._menu).hasClass(ClassName.MENURIGHT)) { | ||
placement = AttachmentMap.TOPEND; | ||
} | ||
} else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) { | ||
placement = AttachmentMap.RIGHT; | ||
} else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) { | ||
placement = AttachmentMap.LEFT; | ||
} else if ($(this._menu).hasClass(ClassName.MENURIGHT)) { | ||
placement = AttachmentMap.BOTTOMEND; | ||
if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) { | ||
placement = $(this._menu).hasClass(CLASS_NAME_MENURIGHT) ? PLACEMENT_TOPEND : PLACEMENT_TOP; | ||
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) { | ||
placement = PLACEMENT_RIGHT; | ||
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) { | ||
placement = PLACEMENT_LEFT; | ||
} else if ($(this._menu).hasClass(CLASS_NAME_MENURIGHT)) { | ||
placement = PLACEMENT_BOTTOMEND; | ||
} | ||
@@ -390,3 +315,3 @@ | ||
offset.fn = function (data) { | ||
data.offsets = _objectSpread2(_objectSpread2({}, data.offsets), _this2._config.offset(data.offsets, _this2._element) || {}); | ||
data.offsets = _extends({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {}); | ||
return data; | ||
@@ -421,3 +346,3 @@ }; | ||
return _objectSpread2(_objectSpread2({}, popperConfig), this._config.popperConfig); | ||
return _extends({}, popperConfig, this._config.popperConfig); | ||
} // Static | ||
@@ -452,3 +377,3 @@ ; | ||
var toggles = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE)); | ||
var toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE)); | ||
@@ -473,3 +398,3 @@ for (var i = 0, len = toggles.length; i < len; i++) { | ||
if (!$(parent).hasClass(ClassName.SHOW)) { | ||
if (!$(parent).hasClass(CLASS_NAME_SHOW)) { | ||
continue; | ||
@@ -482,3 +407,3 @@ } | ||
var hideEvent = $.Event(Event.HIDE, relatedTarget); | ||
var hideEvent = $.Event(EVENT_HIDE, relatedTarget); | ||
$(parent).trigger(hideEvent); | ||
@@ -502,4 +427,4 @@ | ||
$(dropdownMenu).removeClass(ClassName.SHOW); | ||
$(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget)); | ||
$(dropdownMenu).removeClass(CLASS_NAME_SHOW); | ||
$(parent).removeClass(CLASS_NAME_SHOW).trigger($.Event(EVENT_HIDDEN, relatedTarget)); | ||
} | ||
@@ -528,10 +453,7 @@ }; | ||
// - If trigger inside the menu => not a dropdown command | ||
if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(Selector.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) { | ||
if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) { | ||
return; | ||
} | ||
event.preventDefault(); | ||
event.stopPropagation(); | ||
if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { | ||
if (this.disabled || $(this).hasClass(CLASS_NAME_DISABLED)) { | ||
return; | ||
@@ -542,3 +464,3 @@ } | ||
var isActive = $(parent).hasClass(ClassName.SHOW); | ||
var isActive = $(parent).hasClass(CLASS_NAME_SHOW); | ||
@@ -549,6 +471,8 @@ if (!isActive && event.which === ESCAPE_KEYCODE) { | ||
event.preventDefault(); | ||
event.stopPropagation(); | ||
if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) { | ||
if (event.which === ESCAPE_KEYCODE) { | ||
var toggle = parent.querySelector(Selector.DATA_TOGGLE); | ||
$(toggle).trigger('focus'); | ||
$(parent.querySelector(SELECTOR_DATA_TOGGLE)).trigger('focus'); | ||
} | ||
@@ -560,3 +484,3 @@ | ||
var items = [].slice.call(parent.querySelectorAll(Selector.VISIBLE_ITEMS)).filter(function (item) { | ||
var items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS)).filter(function (item) { | ||
return $(item).is(':visible'); | ||
@@ -614,3 +538,3 @@ }); | ||
$(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + " " + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { | ||
$(document).on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler).on(EVENT_CLICK_DATA_API + " " + EVENT_KEYUP_DATA_API, Dropdown._clearMenus).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { | ||
event.preventDefault(); | ||
@@ -620,3 +544,3 @@ event.stopPropagation(); | ||
Dropdown._jQueryInterface.call($(this), 'toggle'); | ||
}).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) { | ||
}).on(EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, function (e) { | ||
e.stopPropagation(); | ||
@@ -623,0 +547,0 @@ }); |
/*! | ||
* Bootstrap modal.js v4.4.1-1 (https://github.com/MahdiMajidzadeh/bootstrap-v4-rtl) | ||
* Copyright 2011-2020 Mahdi Majidzadeh | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap modal.js v4.5.2 (https://getbootstrap.com/) | ||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
*/ | ||
@@ -9,73 +9,13 @@ (function (global, factory) { | ||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : | ||
(global = global || self, global.Modal = factory(global.jQuery, global.Util)); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.jQuery, global.Util)); | ||
}(this, (function ($, Util) { 'use strict'; | ||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $; | ||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; | ||
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $; | ||
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util; | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
} | ||
return target; | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
/** | ||
@@ -88,3 +28,3 @@ * ------------------------------------------------------------------------ | ||
var NAME = 'modal'; | ||
var VERSION = '4.4.1'; | ||
var VERSION = '4.5.2'; | ||
var DATA_KEY = 'bs.modal'; | ||
@@ -108,33 +48,27 @@ var EVENT_KEY = "." + DATA_KEY; | ||
}; | ||
var Event = { | ||
HIDE: "hide" + EVENT_KEY, | ||
HIDE_PREVENTED: "hidePrevented" + EVENT_KEY, | ||
HIDDEN: "hidden" + EVENT_KEY, | ||
SHOW: "show" + EVENT_KEY, | ||
SHOWN: "shown" + EVENT_KEY, | ||
FOCUSIN: "focusin" + EVENT_KEY, | ||
RESIZE: "resize" + EVENT_KEY, | ||
CLICK_DISMISS: "click.dismiss" + EVENT_KEY, | ||
KEYDOWN_DISMISS: "keydown.dismiss" + EVENT_KEY, | ||
MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY, | ||
MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY, | ||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY | ||
}; | ||
var ClassName = { | ||
SCROLLABLE: 'modal-dialog-scrollable', | ||
SCROLLBAR_MEASURER: 'modal-scrollbar-measure', | ||
BACKDROP: 'modal-backdrop', | ||
OPEN: 'modal-open', | ||
FADE: 'fade', | ||
SHOW: 'show', | ||
STATIC: 'modal-static' | ||
}; | ||
var Selector = { | ||
DIALOG: '.modal-dialog', | ||
MODAL_BODY: '.modal-body', | ||
DATA_TOGGLE: '[data-toggle="modal"]', | ||
DATA_DISMISS: '[data-dismiss="modal"]', | ||
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', | ||
STICKY_CONTENT: '.sticky-top' | ||
}; | ||
var EVENT_HIDE = "hide" + EVENT_KEY; | ||
var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY; | ||
var EVENT_HIDDEN = "hidden" + EVENT_KEY; | ||
var EVENT_SHOW = "show" + EVENT_KEY; | ||
var EVENT_SHOWN = "shown" + EVENT_KEY; | ||
var EVENT_FOCUSIN = "focusin" + EVENT_KEY; | ||
var EVENT_RESIZE = "resize" + EVENT_KEY; | ||
var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY; | ||
var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY; | ||
var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY; | ||
var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY; | ||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY; | ||
var CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable'; | ||
var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure'; | ||
var CLASS_NAME_BACKDROP = 'modal-backdrop'; | ||
var CLASS_NAME_OPEN = 'modal-open'; | ||
var CLASS_NAME_FADE = 'fade'; | ||
var CLASS_NAME_SHOW = 'show'; | ||
var CLASS_NAME_STATIC = 'modal-static'; | ||
var SELECTOR_DIALOG = '.modal-dialog'; | ||
var SELECTOR_MODAL_BODY = '.modal-body'; | ||
var SELECTOR_DATA_TOGGLE = '[data-toggle="modal"]'; | ||
var SELECTOR_DATA_DISMISS = '[data-dismiss="modal"]'; | ||
var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'; | ||
var SELECTOR_STICKY_CONTENT = '.sticky-top'; | ||
/** | ||
@@ -150,3 +84,3 @@ * ------------------------------------------------------------------------ | ||
this._element = element; | ||
this._dialog = element.querySelector(Selector.DIALOG); | ||
this._dialog = element.querySelector(SELECTOR_DIALOG); | ||
this._backdrop = null; | ||
@@ -175,7 +109,7 @@ this._isShown = false; | ||
if ($(this._element).hasClass(ClassName.FADE)) { | ||
if ($(this._element).hasClass(CLASS_NAME_FADE)) { | ||
this._isTransitioning = true; | ||
} | ||
var showEvent = $.Event(Event.SHOW, { | ||
var showEvent = $.Event(EVENT_SHOW, { | ||
relatedTarget: relatedTarget | ||
@@ -201,7 +135,7 @@ }); | ||
$(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) { | ||
$(this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) { | ||
return _this.hide(event); | ||
}); | ||
$(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () { | ||
$(_this._element).one(Event.MOUSEUP_DISMISS, function (event) { | ||
$(this._dialog).on(EVENT_MOUSEDOWN_DISMISS, function () { | ||
$(_this._element).one(EVENT_MOUSEUP_DISMISS, function (event) { | ||
if ($(event.target).is(_this._element)) { | ||
@@ -229,3 +163,3 @@ _this._ignoreBackdropClick = true; | ||
var hideEvent = $.Event(Event.HIDE); | ||
var hideEvent = $.Event(EVENT_HIDE); | ||
$(this._element).trigger(hideEvent); | ||
@@ -238,3 +172,3 @@ | ||
this._isShown = false; | ||
var transition = $(this._element).hasClass(ClassName.FADE); | ||
var transition = $(this._element).hasClass(CLASS_NAME_FADE); | ||
@@ -249,6 +183,6 @@ if (transition) { | ||
$(document).off(Event.FOCUSIN); | ||
$(this._element).removeClass(ClassName.SHOW); | ||
$(this._element).off(Event.CLICK_DISMISS); | ||
$(this._dialog).off(Event.MOUSEDOWN_DISMISS); | ||
$(document).off(EVENT_FOCUSIN); | ||
$(this._element).removeClass(CLASS_NAME_SHOW); | ||
$(this._element).off(EVENT_CLICK_DISMISS); | ||
$(this._dialog).off(EVENT_MOUSEDOWN_DISMISS); | ||
@@ -270,8 +204,8 @@ if (transition) { | ||
/** | ||
* `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API` | ||
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API` | ||
* Do not move `document` in `htmlElements` array | ||
* It will remove `Event.CLICK_DATA_API` event that should remain | ||
* It will remove `EVENT_CLICK_DATA_API` event that should remain | ||
*/ | ||
$(document).off(Event.FOCUSIN); | ||
$(document).off(EVENT_FOCUSIN); | ||
$.removeData(this._element, DATA_KEY); | ||
@@ -295,3 +229,3 @@ this._config = null; | ||
_proto._getConfig = function _getConfig(config) { | ||
config = _objectSpread2(_objectSpread2({}, Default), config); | ||
config = _extends({}, Default, config); | ||
Util.typeCheckConfig(NAME, config, DefaultType); | ||
@@ -305,3 +239,3 @@ return config; | ||
if (this._config.backdrop === 'static') { | ||
var hideEventPrevented = $.Event(Event.HIDE_PREVENTED); | ||
var hideEventPrevented = $.Event(EVENT_HIDE_PREVENTED); | ||
$(this._element).trigger(hideEventPrevented); | ||
@@ -313,7 +247,20 @@ | ||
this._element.classList.add(ClassName.STATIC); | ||
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; | ||
var modalTransitionDuration = Util.getTransitionDurationFromElement(this._element); | ||
if (!isModalOverflowing) { | ||
this._element.style.overflowY = 'hidden'; | ||
} | ||
this._element.classList.add(CLASS_NAME_STATIC); | ||
var modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog); | ||
$(this._element).off(Util.TRANSITION_END); | ||
$(this._element).one(Util.TRANSITION_END, function () { | ||
_this3._element.classList.remove(ClassName.STATIC); | ||
_this3._element.classList.remove(CLASS_NAME_STATIC); | ||
if (!isModalOverflowing) { | ||
$(_this3._element).one(Util.TRANSITION_END, function () { | ||
_this3._element.style.overflowY = ''; | ||
}).emulateTransitionEnd(_this3._element, modalTransitionDuration); | ||
} | ||
}).emulateTransitionEnd(modalTransitionDuration); | ||
@@ -330,4 +277,4 @@ | ||
var transition = $(this._element).hasClass(ClassName.FADE); | ||
var modalBody = this._dialog ? this._dialog.querySelector(Selector.MODAL_BODY) : null; | ||
var transition = $(this._element).hasClass(CLASS_NAME_FADE); | ||
var modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null; | ||
@@ -345,3 +292,5 @@ if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { | ||
if ($(this._dialog).hasClass(ClassName.SCROLLABLE) && modalBody) { | ||
this._element.setAttribute('role', 'dialog'); | ||
if ($(this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) { | ||
modalBody.scrollTop = 0; | ||
@@ -356,3 +305,3 @@ } else { | ||
$(this._element).addClass(ClassName.SHOW); | ||
$(this._element).addClass(CLASS_NAME_SHOW); | ||
@@ -363,3 +312,3 @@ if (this._config.focus) { | ||
var shownEvent = $.Event(Event.SHOWN, { | ||
var shownEvent = $.Event(EVENT_SHOWN, { | ||
relatedTarget: relatedTarget | ||
@@ -388,4 +337,4 @@ }); | ||
$(document).off(Event.FOCUSIN) // Guard against infinite focus loop | ||
.on(Event.FOCUSIN, function (event) { | ||
$(document).off(EVENT_FOCUSIN) // Guard against infinite focus loop | ||
.on(EVENT_FOCUSIN, function (event) { | ||
if (document !== event.target && _this5._element !== event.target && $(_this5._element).has(event.target).length === 0) { | ||
@@ -400,5 +349,9 @@ _this5._element.focus(); | ||
if (this._isShown && this._config.keyboard) { | ||
$(this._element).on(Event.KEYDOWN_DISMISS, function (event) { | ||
if (event.which === ESCAPE_KEYCODE) { | ||
if (this._isShown) { | ||
$(this._element).on(EVENT_KEYDOWN_DISMISS, function (event) { | ||
if (_this6._config.keyboard && event.which === ESCAPE_KEYCODE) { | ||
event.preventDefault(); | ||
_this6.hide(); | ||
} else if (!_this6._config.keyboard && event.which === ESCAPE_KEYCODE) { | ||
_this6._triggerBackdropTransition(); | ||
@@ -408,3 +361,3 @@ } | ||
} else if (!this._isShown) { | ||
$(this._element).off(Event.KEYDOWN_DISMISS); | ||
$(this._element).off(EVENT_KEYDOWN_DISMISS); | ||
} | ||
@@ -417,7 +370,7 @@ }; | ||
if (this._isShown) { | ||
$(window).on(Event.RESIZE, function (event) { | ||
$(window).on(EVENT_RESIZE, function (event) { | ||
return _this7.handleUpdate(event); | ||
}); | ||
} else { | ||
$(window).off(Event.RESIZE); | ||
$(window).off(EVENT_RESIZE); | ||
} | ||
@@ -435,6 +388,8 @@ }; | ||
this._element.removeAttribute('role'); | ||
this._isTransitioning = false; | ||
this._showBackdrop(function () { | ||
$(document.body).removeClass(ClassName.OPEN); | ||
$(document.body).removeClass(CLASS_NAME_OPEN); | ||
@@ -445,3 +400,3 @@ _this8._resetAdjustments(); | ||
$(_this8._element).trigger(Event.HIDDEN); | ||
$(_this8._element).trigger(EVENT_HIDDEN); | ||
}); | ||
@@ -460,7 +415,7 @@ }; | ||
var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : ''; | ||
var animate = $(this._element).hasClass(CLASS_NAME_FADE) ? CLASS_NAME_FADE : ''; | ||
if (this._isShown && this._config.backdrop) { | ||
this._backdrop = document.createElement('div'); | ||
this._backdrop.className = ClassName.BACKDROP; | ||
this._backdrop.className = CLASS_NAME_BACKDROP; | ||
@@ -472,3 +427,3 @@ if (animate) { | ||
$(this._backdrop).appendTo(document.body); | ||
$(this._element).on(Event.CLICK_DISMISS, function (event) { | ||
$(this._element).on(EVENT_CLICK_DISMISS, function (event) { | ||
if (_this9._ignoreBackdropClick) { | ||
@@ -490,3 +445,3 @@ _this9._ignoreBackdropClick = false; | ||
$(this._backdrop).addClass(ClassName.SHOW); | ||
$(this._backdrop).addClass(CLASS_NAME_SHOW); | ||
@@ -505,3 +460,3 @@ if (!callback) { | ||
} else if (!this._isShown && this._backdrop) { | ||
$(this._backdrop).removeClass(ClassName.SHOW); | ||
$(this._backdrop).removeClass(CLASS_NAME_SHOW); | ||
@@ -516,3 +471,3 @@ var callbackRemove = function callbackRemove() { | ||
if ($(this._element).hasClass(ClassName.FADE)) { | ||
if ($(this._element).hasClass(CLASS_NAME_FADE)) { | ||
var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); | ||
@@ -552,3 +507,3 @@ | ||
var rect = document.body.getBoundingClientRect(); | ||
this._isBodyOverflowing = rect.left + rect.right < window.innerWidth; | ||
this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth; | ||
this._scrollbarWidth = this._getScrollbarWidth(); | ||
@@ -563,4 +518,4 @@ }; | ||
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set | ||
var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT)); | ||
var stickyContent = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT)); // Adjust fixed content padding | ||
var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT)); | ||
var stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT)); // Adjust fixed content padding | ||
@@ -584,3 +539,3 @@ $(fixedContent).each(function (index, element) { | ||
$(document.body).addClass(ClassName.OPEN); | ||
$(document.body).addClass(CLASS_NAME_OPEN); | ||
}; | ||
@@ -590,3 +545,3 @@ | ||
// Restore fixed content padding | ||
var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT)); | ||
var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT)); | ||
$(fixedContent).each(function (index, element) { | ||
@@ -598,3 +553,3 @@ var padding = $(element).data('padding-right'); | ||
var elements = [].slice.call(document.querySelectorAll("" + Selector.STICKY_CONTENT)); | ||
var elements = [].slice.call(document.querySelectorAll("" + SELECTOR_STICKY_CONTENT)); | ||
$(elements).each(function (index, element) { | ||
@@ -616,3 +571,3 @@ var margin = $(element).data('margin-right'); | ||
var scrollDiv = document.createElement('div'); | ||
scrollDiv.className = ClassName.SCROLLBAR_MEASURER; | ||
scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER; | ||
document.body.appendChild(scrollDiv); | ||
@@ -629,3 +584,3 @@ var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; | ||
var _config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default), $(this).data()), typeof config === 'object' && config ? config : {}); | ||
var _config = _extends({}, Default, $(this).data(), typeof config === 'object' && config ? config : {}); | ||
@@ -670,3 +625,3 @@ if (!data) { | ||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { | ||
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { | ||
var _this11 = this; | ||
@@ -681,3 +636,3 @@ | ||
var config = $(target).data(DATA_KEY) ? 'toggle' : _objectSpread2(_objectSpread2({}, $(target).data()), $(this).data()); | ||
var config = $(target).data(DATA_KEY) ? 'toggle' : _extends({}, $(target).data(), $(this).data()); | ||
@@ -688,3 +643,3 @@ if (this.tagName === 'A' || this.tagName === 'AREA') { | ||
var $target = $(target).one(Event.SHOW, function (showEvent) { | ||
var $target = $(target).one(EVENT_SHOW, function (showEvent) { | ||
if (showEvent.isDefaultPrevented()) { | ||
@@ -695,3 +650,3 @@ // Only register focus restorer if modal will actually get shown | ||
$target.one(Event.HIDDEN, function () { | ||
$target.one(EVENT_HIDDEN, function () { | ||
if ($(_this11).is(':visible')) { | ||
@@ -698,0 +653,0 @@ _this11.focus(); |
/*! | ||
* Bootstrap popover.js v4.4.1-1 (https://github.com/MahdiMajidzadeh/bootstrap-v4-rtl) | ||
* Copyright 2011-2020 Mahdi Majidzadeh | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap popover.js v4.5.2 (https://getbootstrap.com/) | ||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
*/ | ||
@@ -9,79 +9,15 @@ (function (global, factory) { | ||
typeof define === 'function' && define.amd ? define(['jquery', './tooltip.js'], factory) : | ||
(global = global || self, global.Popover = factory(global.jQuery, global.Tooltip)); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.jQuery, global.Tooltip)); | ||
}(this, (function ($, Tooltip) { 'use strict'; | ||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $; | ||
Tooltip = Tooltip && Tooltip.hasOwnProperty('default') ? Tooltip['default'] : Tooltip; | ||
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $; | ||
Tooltip = Tooltip && Object.prototype.hasOwnProperty.call(Tooltip, 'default') ? Tooltip['default'] : Tooltip; | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } | ||
return obj; | ||
} | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
} | ||
return target; | ||
} | ||
function _inheritsLoose(subClass, superClass) { | ||
subClass.prototype = Object.create(superClass.prototype); | ||
subClass.prototype.constructor = subClass; | ||
subClass.__proto__ = superClass; | ||
} | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
/** | ||
@@ -94,3 +30,3 @@ * ------------------------------------------------------------------------ | ||
var NAME = 'popover'; | ||
var VERSION = '4.4.1'; | ||
var VERSION = '4.5.2'; | ||
var DATA_KEY = 'bs.popover'; | ||
@@ -102,3 +38,3 @@ var EVENT_KEY = "." + DATA_KEY; | ||
var Default = _objectSpread2(_objectSpread2({}, Tooltip.Default), {}, { | ||
var Default = _extends({}, Tooltip.Default, { | ||
placement: 'right', | ||
@@ -110,14 +46,10 @@ trigger: 'click', | ||
var DefaultType = _objectSpread2(_objectSpread2({}, Tooltip.DefaultType), {}, { | ||
var DefaultType = _extends({}, Tooltip.DefaultType, { | ||
content: '(string|element|function)' | ||
}); | ||
var ClassName = { | ||
FADE: 'fade', | ||
SHOW: 'show' | ||
}; | ||
var Selector = { | ||
TITLE: '.popover-header', | ||
CONTENT: '.popover-body' | ||
}; | ||
var CLASS_NAME_FADE = 'fade'; | ||
var CLASS_NAME_SHOW = 'show'; | ||
var SELECTOR_TITLE = '.popover-header'; | ||
var SELECTOR_CONTENT = '.popover-body'; | ||
var Event = { | ||
@@ -167,3 +99,3 @@ HIDE: "hide" + EVENT_KEY, | ||
this.setElementContent($tip.find(Selector.TITLE), this.getTitle()); | ||
this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle()); | ||
@@ -176,4 +108,4 @@ var content = this._getContent(); | ||
this.setElementContent($tip.find(Selector.CONTENT), content); | ||
$tip.removeClass(ClassName.FADE + " " + ClassName.SHOW); | ||
this.setElementContent($tip.find(SELECTOR_CONTENT), content); | ||
$tip.removeClass(CLASS_NAME_FADE + " " + CLASS_NAME_SHOW); | ||
} // Private | ||
@@ -180,0 +112,0 @@ ; |
/*! | ||
* Bootstrap scrollspy.js v4.4.1-1 (https://github.com/MahdiMajidzadeh/bootstrap-v4-rtl) | ||
* Copyright 2011-2020 Mahdi Majidzadeh | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap scrollspy.js v4.5.2 (https://getbootstrap.com/) | ||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
*/ | ||
@@ -9,73 +9,13 @@ (function (global, factory) { | ||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : | ||
(global = global || self, global.ScrollSpy = factory(global.jQuery, global.Util)); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.jQuery, global.Util)); | ||
}(this, (function ($, Util) { 'use strict'; | ||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $; | ||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; | ||
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $; | ||
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util; | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
} | ||
return target; | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
/** | ||
@@ -88,3 +28,3 @@ * ------------------------------------------------------------------------ | ||
var NAME = 'scrollspy'; | ||
var VERSION = '4.4.1'; | ||
var VERSION = '4.5.2'; | ||
var DATA_KEY = 'bs.scrollspy'; | ||
@@ -104,27 +44,17 @@ var EVENT_KEY = "." + DATA_KEY; | ||
}; | ||
var Event = { | ||
ACTIVATE: "activate" + EVENT_KEY, | ||
SCROLL: "scroll" + EVENT_KEY, | ||
LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY | ||
}; | ||
var ClassName = { | ||
DROPDOWN_ITEM: 'dropdown-item', | ||
DROPDOWN_MENU: 'dropdown-menu', | ||
ACTIVE: 'active' | ||
}; | ||
var Selector = { | ||
DATA_SPY: '[data-spy="scroll"]', | ||
ACTIVE: '.active', | ||
NAV_LIST_GROUP: '.nav, .list-group', | ||
NAV_LINKS: '.nav-link', | ||
NAV_ITEMS: '.nav-item', | ||
LIST_ITEMS: '.list-group-item', | ||
DROPDOWN: '.dropdown', | ||
DROPDOWN_ITEMS: '.dropdown-item', | ||
DROPDOWN_TOGGLE: '.dropdown-toggle' | ||
}; | ||
var OffsetMethod = { | ||
OFFSET: 'offset', | ||
POSITION: 'position' | ||
}; | ||
var EVENT_ACTIVATE = "activate" + EVENT_KEY; | ||
var EVENT_SCROLL = "scroll" + EVENT_KEY; | ||
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY; | ||
var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'; | ||
var CLASS_NAME_ACTIVE = 'active'; | ||
var SELECTOR_DATA_SPY = '[data-spy="scroll"]'; | ||
var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'; | ||
var SELECTOR_NAV_LINKS = '.nav-link'; | ||
var SELECTOR_NAV_ITEMS = '.nav-item'; | ||
var SELECTOR_LIST_ITEMS = '.list-group-item'; | ||
var SELECTOR_DROPDOWN = '.dropdown'; | ||
var SELECTOR_DROPDOWN_ITEMS = '.dropdown-item'; | ||
var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'; | ||
var METHOD_OFFSET = 'offset'; | ||
var METHOD_POSITION = 'position'; | ||
/** | ||
@@ -143,3 +73,3 @@ * ------------------------------------------------------------------------ | ||
this._config = this._getConfig(config); | ||
this._selector = this._config.target + " " + Selector.NAV_LINKS + "," + (this._config.target + " " + Selector.LIST_ITEMS + ",") + (this._config.target + " " + Selector.DROPDOWN_ITEMS); | ||
this._selector = this._config.target + " " + SELECTOR_NAV_LINKS + "," + (this._config.target + " " + SELECTOR_LIST_ITEMS + ",") + (this._config.target + " " + SELECTOR_DROPDOWN_ITEMS); | ||
this._offsets = []; | ||
@@ -149,3 +79,3 @@ this._targets = []; | ||
this._scrollHeight = 0; | ||
$(this._scrollElement).on(Event.SCROLL, function (event) { | ||
$(this._scrollElement).on(EVENT_SCROLL, function (event) { | ||
return _this._process(event); | ||
@@ -165,5 +95,5 @@ }); | ||
var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION; | ||
var autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION; | ||
var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; | ||
var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; | ||
var offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0; | ||
this._offsets = []; | ||
@@ -217,5 +147,5 @@ this._targets = []; | ||
_proto._getConfig = function _getConfig(config) { | ||
config = _objectSpread2(_objectSpread2({}, Default), typeof config === 'object' && config ? config : {}); | ||
config = _extends({}, Default, typeof config === 'object' && config ? config : {}); | ||
if (typeof config.target !== 'string') { | ||
if (typeof config.target !== 'string' && Util.isElement(config.target)) { | ||
var id = $(config.target).attr('id'); | ||
@@ -276,5 +206,3 @@ | ||
var offsetLength = this._offsets.length; | ||
for (var i = offsetLength; i--;) { | ||
for (var i = this._offsets.length; i--;) { | ||
var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]); | ||
@@ -299,16 +227,16 @@ | ||
if ($link.hasClass(ClassName.DROPDOWN_ITEM)) { | ||
$link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE); | ||
$link.addClass(ClassName.ACTIVE); | ||
if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) { | ||
$link.closest(SELECTOR_DROPDOWN).find(SELECTOR_DROPDOWN_TOGGLE).addClass(CLASS_NAME_ACTIVE); | ||
$link.addClass(CLASS_NAME_ACTIVE); | ||
} else { | ||
// Set triggered link as active | ||
$link.addClass(ClassName.ACTIVE); // Set triggered links parents as active | ||
$link.addClass(CLASS_NAME_ACTIVE); // Set triggered links parents as active | ||
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor | ||
$link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_LINKS + ", " + Selector.LIST_ITEMS).addClass(ClassName.ACTIVE); // Handle special case when .nav-link is inside .nav-item | ||
$link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).addClass(CLASS_NAME_ACTIVE); // Handle special case when .nav-link is inside .nav-item | ||
$link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_ITEMS).children(Selector.NAV_LINKS).addClass(ClassName.ACTIVE); | ||
$link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_ITEMS).children(SELECTOR_NAV_LINKS).addClass(CLASS_NAME_ACTIVE); | ||
} | ||
$(this._scrollElement).trigger(Event.ACTIVATE, { | ||
$(this._scrollElement).trigger(EVENT_ACTIVATE, { | ||
relatedTarget: target | ||
@@ -320,5 +248,5 @@ }); | ||
[].slice.call(document.querySelectorAll(this._selector)).filter(function (node) { | ||
return node.classList.contains(ClassName.ACTIVE); | ||
return node.classList.contains(CLASS_NAME_ACTIVE); | ||
}).forEach(function (node) { | ||
return node.classList.remove(ClassName.ACTIVE); | ||
return node.classList.remove(CLASS_NAME_ACTIVE); | ||
}); | ||
@@ -370,4 +298,4 @@ } // Static | ||
$(window).on(Event.LOAD_DATA_API, function () { | ||
var scrollSpys = [].slice.call(document.querySelectorAll(Selector.DATA_SPY)); | ||
$(window).on(EVENT_LOAD_DATA_API, function () { | ||
var scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY)); | ||
var scrollSpysLength = scrollSpys.length; | ||
@@ -374,0 +302,0 @@ |
/*! | ||
* Bootstrap tab.js v4.4.1-1 (https://github.com/MahdiMajidzadeh/bootstrap-v4-rtl) | ||
* Copyright 2011-2020 Mahdi Majidzadeh | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap tab.js v4.5.2 (https://getbootstrap.com/) | ||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
*/ | ||
@@ -9,24 +9,11 @@ (function (global, factory) { | ||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : | ||
(global = global || self, global.Tab = factory(global.jQuery, global.Util)); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.jQuery, global.Util)); | ||
}(this, (function ($, Util) { 'use strict'; | ||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $; | ||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; | ||
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $; | ||
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util; | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
/** | ||
@@ -39,3 +26,3 @@ * ------------------------------------------------------------------------ | ||
var NAME = 'tab'; | ||
var VERSION = '4.4.1'; | ||
var VERSION = '4.5.2'; | ||
var DATA_KEY = 'bs.tab'; | ||
@@ -45,25 +32,19 @@ var EVENT_KEY = "." + DATA_KEY; | ||
var JQUERY_NO_CONFLICT = $.fn[NAME]; | ||
var Event = { | ||
HIDE: "hide" + EVENT_KEY, | ||
HIDDEN: "hidden" + EVENT_KEY, | ||
SHOW: "show" + EVENT_KEY, | ||
SHOWN: "shown" + EVENT_KEY, | ||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY | ||
}; | ||
var ClassName = { | ||
DROPDOWN_MENU: 'dropdown-menu', | ||
ACTIVE: 'active', | ||
DISABLED: 'disabled', | ||
FADE: 'fade', | ||
SHOW: 'show' | ||
}; | ||
var Selector = { | ||
DROPDOWN: '.dropdown', | ||
NAV_LIST_GROUP: '.nav, .list-group', | ||
ACTIVE: '.active', | ||
ACTIVE_UL: '> li > .active', | ||
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]', | ||
DROPDOWN_TOGGLE: '.dropdown-toggle', | ||
DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active' | ||
}; | ||
var EVENT_HIDE = "hide" + EVENT_KEY; | ||
var EVENT_HIDDEN = "hidden" + EVENT_KEY; | ||
var EVENT_SHOW = "show" + EVENT_KEY; | ||
var EVENT_SHOWN = "shown" + EVENT_KEY; | ||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY; | ||
var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu'; | ||
var CLASS_NAME_ACTIVE = 'active'; | ||
var CLASS_NAME_DISABLED = 'disabled'; | ||
var CLASS_NAME_FADE = 'fade'; | ||
var CLASS_NAME_SHOW = 'show'; | ||
var SELECTOR_DROPDOWN = '.dropdown'; | ||
var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'; | ||
var SELECTOR_ACTIVE = '.active'; | ||
var SELECTOR_ACTIVE_UL = '> li > .active'; | ||
var SELECTOR_DATA_TOGGLE = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]'; | ||
var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'; | ||
var SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active'; | ||
/** | ||
@@ -87,3 +68,3 @@ * ------------------------------------------------------------------------ | ||
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE) || $(this._element).hasClass(ClassName.DISABLED)) { | ||
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(CLASS_NAME_ACTIVE) || $(this._element).hasClass(CLASS_NAME_DISABLED)) { | ||
return; | ||
@@ -94,7 +75,7 @@ } | ||
var previous; | ||
var listElement = $(this._element).closest(Selector.NAV_LIST_GROUP)[0]; | ||
var listElement = $(this._element).closest(SELECTOR_NAV_LIST_GROUP)[0]; | ||
var selector = Util.getSelectorFromElement(this._element); | ||
if (listElement) { | ||
var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector.ACTIVE_UL : Selector.ACTIVE; | ||
var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE; | ||
previous = $.makeArray($(listElement).find(itemSelector)); | ||
@@ -104,6 +85,6 @@ previous = previous[previous.length - 1]; | ||
var hideEvent = $.Event(Event.HIDE, { | ||
var hideEvent = $.Event(EVENT_HIDE, { | ||
relatedTarget: this._element | ||
}); | ||
var showEvent = $.Event(Event.SHOW, { | ||
var showEvent = $.Event(EVENT_SHOW, { | ||
relatedTarget: previous | ||
@@ -129,6 +110,6 @@ }); | ||
var complete = function complete() { | ||
var hiddenEvent = $.Event(Event.HIDDEN, { | ||
var hiddenEvent = $.Event(EVENT_HIDDEN, { | ||
relatedTarget: _this._element | ||
}); | ||
var shownEvent = $.Event(Event.SHOWN, { | ||
var shownEvent = $.Event(EVENT_SHOWN, { | ||
relatedTarget: previous | ||
@@ -156,5 +137,5 @@ }); | ||
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(Selector.ACTIVE_UL) : $(container).children(Selector.ACTIVE); | ||
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(SELECTOR_ACTIVE_UL) : $(container).children(SELECTOR_ACTIVE); | ||
var active = activeElements[0]; | ||
var isTransitioning = callback && active && $(active).hasClass(ClassName.FADE); | ||
var isTransitioning = callback && active && $(active).hasClass(CLASS_NAME_FADE); | ||
@@ -167,3 +148,3 @@ var complete = function complete() { | ||
var transitionDuration = Util.getTransitionDurationFromElement(active); | ||
$(active).removeClass(ClassName.SHOW).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); | ||
$(active).removeClass(CLASS_NAME_SHOW).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); | ||
} else { | ||
@@ -176,7 +157,7 @@ complete(); | ||
if (active) { | ||
$(active).removeClass(ClassName.ACTIVE); | ||
var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0]; | ||
$(active).removeClass(CLASS_NAME_ACTIVE); | ||
var dropdownChild = $(active.parentNode).find(SELECTOR_DROPDOWN_ACTIVE_CHILD)[0]; | ||
if (dropdownChild) { | ||
$(dropdownChild).removeClass(ClassName.ACTIVE); | ||
$(dropdownChild).removeClass(CLASS_NAME_ACTIVE); | ||
} | ||
@@ -189,3 +170,3 @@ | ||
$(element).addClass(ClassName.ACTIVE); | ||
$(element).addClass(CLASS_NAME_ACTIVE); | ||
@@ -198,12 +179,12 @@ if (element.getAttribute('role') === 'tab') { | ||
if (element.classList.contains(ClassName.FADE)) { | ||
element.classList.add(ClassName.SHOW); | ||
if (element.classList.contains(CLASS_NAME_FADE)) { | ||
element.classList.add(CLASS_NAME_SHOW); | ||
} | ||
if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) { | ||
var dropdownElement = $(element).closest(Selector.DROPDOWN)[0]; | ||
if (element.parentNode && $(element.parentNode).hasClass(CLASS_NAME_DROPDOWN_MENU)) { | ||
var dropdownElement = $(element).closest(SELECTOR_DROPDOWN)[0]; | ||
if (dropdownElement) { | ||
var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector.DROPDOWN_TOGGLE)); | ||
$(dropdownToggleList).addClass(ClassName.ACTIVE); | ||
var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE)); | ||
$(dropdownToggleList).addClass(CLASS_NAME_ACTIVE); | ||
} | ||
@@ -256,3 +237,3 @@ | ||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { | ||
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { | ||
event.preventDefault(); | ||
@@ -259,0 +240,0 @@ |
/*! | ||
* Bootstrap toast.js v4.4.1-1 (https://github.com/MahdiMajidzadeh/bootstrap-v4-rtl) | ||
* Copyright 2011-2020 Mahdi Majidzadeh | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap toast.js v4.5.2 (https://getbootstrap.com/) | ||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
*/ | ||
@@ -9,73 +9,13 @@ (function (global, factory) { | ||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : | ||
(global = global || self, global.Toast = factory(global.jQuery, global.Util)); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Toast = factory(global.jQuery, global.Util)); | ||
}(this, (function ($, Util) { 'use strict'; | ||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $; | ||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; | ||
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $; | ||
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util; | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
} | ||
return target; | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
/** | ||
@@ -88,19 +28,15 @@ * ------------------------------------------------------------------------ | ||
var NAME = 'toast'; | ||
var VERSION = '4.4.1'; | ||
var VERSION = '4.5.2'; | ||
var DATA_KEY = 'bs.toast'; | ||
var EVENT_KEY = "." + DATA_KEY; | ||
var JQUERY_NO_CONFLICT = $.fn[NAME]; | ||
var Event = { | ||
CLICK_DISMISS: "click.dismiss" + EVENT_KEY, | ||
HIDE: "hide" + EVENT_KEY, | ||
HIDDEN: "hidden" + EVENT_KEY, | ||
SHOW: "show" + EVENT_KEY, | ||
SHOWN: "shown" + EVENT_KEY | ||
}; | ||
var ClassName = { | ||
FADE: 'fade', | ||
HIDE: 'hide', | ||
SHOW: 'show', | ||
SHOWING: 'showing' | ||
}; | ||
var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY; | ||
var EVENT_HIDE = "hide" + EVENT_KEY; | ||
var EVENT_HIDDEN = "hidden" + EVENT_KEY; | ||
var EVENT_SHOW = "show" + EVENT_KEY; | ||
var EVENT_SHOWN = "shown" + EVENT_KEY; | ||
var CLASS_NAME_FADE = 'fade'; | ||
var CLASS_NAME_HIDE = 'hide'; | ||
var CLASS_NAME_SHOW = 'show'; | ||
var CLASS_NAME_SHOWING = 'showing'; | ||
var DefaultType = { | ||
@@ -116,5 +52,3 @@ animation: 'boolean', | ||
}; | ||
var Selector = { | ||
DATA_DISMISS: '[data-dismiss="toast"]' | ||
}; | ||
var SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]'; | ||
/** | ||
@@ -142,3 +76,3 @@ * ------------------------------------------------------------------------ | ||
var showEvent = $.Event(Event.SHOW); | ||
var showEvent = $.Event(EVENT_SHOW); | ||
$(this._element).trigger(showEvent); | ||
@@ -150,12 +84,14 @@ | ||
this._clearTimeout(); | ||
if (this._config.animation) { | ||
this._element.classList.add(ClassName.FADE); | ||
this._element.classList.add(CLASS_NAME_FADE); | ||
} | ||
var complete = function complete() { | ||
_this._element.classList.remove(ClassName.SHOWING); | ||
_this._element.classList.remove(CLASS_NAME_SHOWING); | ||
_this._element.classList.add(ClassName.SHOW); | ||
_this._element.classList.add(CLASS_NAME_SHOW); | ||
$(_this._element).trigger(Event.SHOWN); | ||
$(_this._element).trigger(EVENT_SHOWN); | ||
@@ -169,7 +105,7 @@ if (_this._config.autohide) { | ||
this._element.classList.remove(ClassName.HIDE); | ||
this._element.classList.remove(CLASS_NAME_HIDE); | ||
Util.reflow(this._element); | ||
this._element.classList.add(ClassName.SHOWING); | ||
this._element.classList.add(CLASS_NAME_SHOWING); | ||
@@ -185,7 +121,7 @@ if (this._config.animation) { | ||
_proto.hide = function hide() { | ||
if (!this._element.classList.contains(ClassName.SHOW)) { | ||
if (!this._element.classList.contains(CLASS_NAME_SHOW)) { | ||
return; | ||
} | ||
var hideEvent = $.Event(Event.HIDE); | ||
var hideEvent = $.Event(EVENT_HIDE); | ||
$(this._element).trigger(hideEvent); | ||
@@ -201,10 +137,9 @@ | ||
_proto.dispose = function dispose() { | ||
clearTimeout(this._timeout); | ||
this._timeout = null; | ||
this._clearTimeout(); | ||
if (this._element.classList.contains(ClassName.SHOW)) { | ||
this._element.classList.remove(ClassName.SHOW); | ||
if (this._element.classList.contains(CLASS_NAME_SHOW)) { | ||
this._element.classList.remove(CLASS_NAME_SHOW); | ||
} | ||
$(this._element).off(Event.CLICK_DISMISS); | ||
$(this._element).off(EVENT_CLICK_DISMISS); | ||
$.removeData(this._element, DATA_KEY); | ||
@@ -217,3 +152,3 @@ this._element = null; | ||
_proto._getConfig = function _getConfig(config) { | ||
config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default), $(this._element).data()), typeof config === 'object' && config ? config : {}); | ||
config = _extends({}, Default, $(this._element).data(), typeof config === 'object' && config ? config : {}); | ||
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); | ||
@@ -226,3 +161,3 @@ return config; | ||
$(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function () { | ||
$(this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () { | ||
return _this2.hide(); | ||
@@ -236,8 +171,8 @@ }); | ||
var complete = function complete() { | ||
_this3._element.classList.add(ClassName.HIDE); | ||
_this3._element.classList.add(CLASS_NAME_HIDE); | ||
$(_this3._element).trigger(Event.HIDDEN); | ||
$(_this3._element).trigger(EVENT_HIDDEN); | ||
}; | ||
this._element.classList.remove(ClassName.SHOW); | ||
this._element.classList.remove(CLASS_NAME_SHOW); | ||
@@ -250,2 +185,7 @@ if (this._config.animation) { | ||
} | ||
}; | ||
_proto._clearTimeout = function _clearTimeout() { | ||
clearTimeout(this._timeout); | ||
this._timeout = null; | ||
} // Static | ||
@@ -252,0 +192,0 @@ ; |
/*! | ||
* Bootstrap tooltip.js v4.4.1-1 (https://github.com/MahdiMajidzadeh/bootstrap-v4-rtl) | ||
* Copyright 2011-2020 Mahdi Majidzadeh | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap tooltip.js v4.5.2 (https://getbootstrap.com/) | ||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
*/ | ||
@@ -9,78 +9,13 @@ (function (global, factory) { | ||
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) : | ||
(global = global || self, global.Tooltip = factory(global.jQuery, global.Popper, global.Util)); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global.jQuery, global.Popper, global.Util)); | ||
}(this, (function ($, Popper, Util) { 'use strict'; | ||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $; | ||
Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper; | ||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; | ||
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $; | ||
Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper; | ||
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util; | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
} | ||
return target; | ||
} | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.4.1): tools/sanitizer.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap (v4.5.2): tools/sanitizer.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
@@ -109,3 +44,3 @@ */ | ||
i: [], | ||
img: ['src', 'alt', 'title', 'width', 'height'], | ||
img: ['src', 'srcset', 'alt', 'title', 'width', 'height'], | ||
li: [], | ||
@@ -130,3 +65,3 @@ ol: [], | ||
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi; | ||
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi; | ||
/** | ||
@@ -138,3 +73,3 @@ * A pattern that matches safe data URLs. Only matches image, video and audio types. | ||
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i; | ||
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i; | ||
@@ -156,3 +91,3 @@ function allowedAttribute(attr, allowedAttributeList) { | ||
for (var i = 0, l = regExp.length; i < l; i++) { | ||
for (var i = 0, len = regExp.length; i < len; i++) { | ||
if (attrName.match(regExp[i])) { | ||
@@ -207,2 +142,7 @@ return true; | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
/** | ||
@@ -215,3 +155,3 @@ * ------------------------------------------------------------------------ | ||
var NAME = 'tooltip'; | ||
var VERSION = '4.4.1'; | ||
var VERSION = '4.5.2'; | ||
var DATA_KEY = 'bs.tooltip'; | ||
@@ -266,6 +206,4 @@ var EVENT_KEY = "." + DATA_KEY; | ||
}; | ||
var HoverState = { | ||
SHOW: 'show', | ||
OUT: 'out' | ||
}; | ||
var HOVER_STATE_SHOW = 'show'; | ||
var HOVER_STATE_OUT = 'out'; | ||
var Event = { | ||
@@ -283,17 +221,10 @@ HIDE: "hide" + EVENT_KEY, | ||
}; | ||
var ClassName = { | ||
FADE: 'fade', | ||
SHOW: 'show' | ||
}; | ||
var Selector = { | ||
TOOLTIP: '.tooltip', | ||
TOOLTIP_INNER: '.tooltip-inner', | ||
ARROW: '.arrow' | ||
}; | ||
var Trigger = { | ||
HOVER: 'hover', | ||
FOCUS: 'focus', | ||
CLICK: 'click', | ||
MANUAL: 'manual' | ||
}; | ||
var CLASS_NAME_FADE = 'fade'; | ||
var CLASS_NAME_SHOW = 'show'; | ||
var SELECTOR_TOOLTIP_INNER = '.tooltip-inner'; | ||
var SELECTOR_ARROW = '.arrow'; | ||
var TRIGGER_HOVER = 'hover'; | ||
var TRIGGER_FOCUS = 'focus'; | ||
var TRIGGER_CLICK = 'click'; | ||
var TRIGGER_MANUAL = 'manual'; | ||
/** | ||
@@ -363,3 +294,3 @@ * ------------------------------------------------------------------------ | ||
} else { | ||
if ($(this.getTipElement()).hasClass(ClassName.SHOW)) { | ||
if ($(this.getTipElement()).hasClass(CLASS_NAME_SHOW)) { | ||
this._leave(null, this); | ||
@@ -424,3 +355,3 @@ | ||
if (this.config.animation) { | ||
$(tip).addClass(ClassName.FADE); | ||
$(tip).addClass(CLASS_NAME_FADE); | ||
} | ||
@@ -444,3 +375,3 @@ | ||
this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment)); | ||
$(tip).addClass(ClassName.SHOW); // If this is a touch-enabled device we add extra | ||
$(tip).addClass(CLASS_NAME_SHOW); // If this is a touch-enabled device we add extra | ||
// empty mouseover listeners to the body's immediate children; | ||
@@ -463,3 +394,3 @@ // only needed because of broken event delegation on iOS | ||
if (prevHoverState === HoverState.OUT) { | ||
if (prevHoverState === HOVER_STATE_OUT) { | ||
_this._leave(null, _this); | ||
@@ -469,3 +400,3 @@ } | ||
if ($(this.tip).hasClass(ClassName.FADE)) { | ||
if ($(this.tip).hasClass(CLASS_NAME_FADE)) { | ||
var transitionDuration = Util.getTransitionDurationFromElement(this.tip); | ||
@@ -486,3 +417,3 @@ $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); | ||
var complete = function complete() { | ||
if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) { | ||
if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) { | ||
tip.parentNode.removeChild(tip); | ||
@@ -512,3 +443,3 @@ } | ||
$(tip).removeClass(ClassName.SHOW); // If this is a touch-enabled device we remove the extra | ||
$(tip).removeClass(CLASS_NAME_SHOW); // If this is a touch-enabled device we remove the extra | ||
// empty mouseover listeners we added for iOS support | ||
@@ -520,7 +451,7 @@ | ||
this._activeTrigger[Trigger.CLICK] = false; | ||
this._activeTrigger[Trigger.FOCUS] = false; | ||
this._activeTrigger[Trigger.HOVER] = false; | ||
this._activeTrigger[TRIGGER_CLICK] = false; | ||
this._activeTrigger[TRIGGER_FOCUS] = false; | ||
this._activeTrigger[TRIGGER_HOVER] = false; | ||
if ($(this.tip).hasClass(ClassName.FADE)) { | ||
if ($(this.tip).hasClass(CLASS_NAME_FADE)) { | ||
var transitionDuration = Util.getTransitionDurationFromElement(tip); | ||
@@ -557,4 +488,4 @@ $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); | ||
var tip = this.getTipElement(); | ||
this.setElementContent($(tip.querySelectorAll(Selector.TOOLTIP_INNER)), this.getTitle()); | ||
$(tip).removeClass(ClassName.FADE + " " + ClassName.SHOW); | ||
this.setElementContent($(tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle()); | ||
$(tip).removeClass(CLASS_NAME_FADE + " " + CLASS_NAME_SHOW); | ||
}; | ||
@@ -609,3 +540,3 @@ | ||
arrow: { | ||
element: Selector.ARROW | ||
element: SELECTOR_ARROW | ||
}, | ||
@@ -625,3 +556,3 @@ preventOverflow: { | ||
}; | ||
return _objectSpread2(_objectSpread2({}, defaultBsConfig), this.config.popperConfig); | ||
return _extends({}, defaultBsConfig, this.config.popperConfig); | ||
}; | ||
@@ -636,3 +567,3 @@ | ||
offset.fn = function (data) { | ||
data.offsets = _objectSpread2(_objectSpread2({}, data.offsets), _this4.config.offset(data.offsets, _this4.element) || {}); | ||
data.offsets = _extends({}, data.offsets, _this4.config.offset(data.offsets, _this4.element) || {}); | ||
return data; | ||
@@ -672,5 +603,5 @@ }; | ||
}); | ||
} else if (trigger !== Trigger.MANUAL) { | ||
var eventIn = trigger === Trigger.HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN; | ||
var eventOut = trigger === Trigger.HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT; | ||
} else if (trigger !== TRIGGER_MANUAL) { | ||
var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN; | ||
var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT; | ||
$(_this5.element).on(eventIn, _this5.config.selector, function (event) { | ||
@@ -693,3 +624,3 @@ return _this5._enter(event); | ||
if (this.config.selector) { | ||
this.config = _objectSpread2(_objectSpread2({}, this.config), {}, { | ||
this.config = _extends({}, this.config, { | ||
trigger: 'manual', | ||
@@ -722,7 +653,7 @@ selector: '' | ||
if (event) { | ||
context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; | ||
context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true; | ||
} | ||
if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) { | ||
context._hoverState = HoverState.SHOW; | ||
if ($(context.getTipElement()).hasClass(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) { | ||
context._hoverState = HOVER_STATE_SHOW; | ||
return; | ||
@@ -732,3 +663,3 @@ } | ||
clearTimeout(context._timeout); | ||
context._hoverState = HoverState.SHOW; | ||
context._hoverState = HOVER_STATE_SHOW; | ||
@@ -741,3 +672,3 @@ if (!context.config.delay || !context.config.delay.show) { | ||
context._timeout = setTimeout(function () { | ||
if (context._hoverState === HoverState.SHOW) { | ||
if (context._hoverState === HOVER_STATE_SHOW) { | ||
context.show(); | ||
@@ -758,3 +689,3 @@ } | ||
if (event) { | ||
context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false; | ||
context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false; | ||
} | ||
@@ -767,3 +698,3 @@ | ||
clearTimeout(context._timeout); | ||
context._hoverState = HoverState.OUT; | ||
context._hoverState = HOVER_STATE_OUT; | ||
@@ -776,3 +707,3 @@ if (!context.config.delay || !context.config.delay.hide) { | ||
context._timeout = setTimeout(function () { | ||
if (context._hoverState === HoverState.OUT) { | ||
if (context._hoverState === HOVER_STATE_OUT) { | ||
context.hide(); | ||
@@ -800,3 +731,3 @@ } | ||
}); | ||
config = _objectSpread2(_objectSpread2(_objectSpread2({}, this.constructor.Default), dataAttributes), typeof config === 'object' && config ? config : {}); | ||
config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {}); | ||
@@ -851,4 +782,3 @@ if (typeof config.delay === 'number') { | ||
_proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) { | ||
var popperInstance = popperData.instance; | ||
this.tip = popperInstance.popper; | ||
this.tip = popperData.instance.popper; | ||
@@ -868,3 +798,3 @@ this._cleanTipClass(); | ||
$(tip).removeClass(ClassName.FADE); | ||
$(tip).removeClass(CLASS_NAME_FADE); | ||
this.config.animation = false; | ||
@@ -871,0 +801,0 @@ this.hide(); |
/*! | ||
* Bootstrap util.js v4.4.1-1 (https://github.com/MahdiMajidzadeh/bootstrap-v4-rtl) | ||
* Copyright 2011-2020 Mahdi Majidzadeh | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap util.js v4.5.2 (https://getbootstrap.com/) | ||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
*/ | ||
@@ -9,11 +9,11 @@ (function (global, factory) { | ||
typeof define === 'function' && define.amd ? define(['jquery'], factory) : | ||
(global = global || self, global.Util = factory(global.jQuery)); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Util = factory(global.jQuery)); | ||
}(this, (function ($) { 'use strict'; | ||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $; | ||
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $; | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.4.1): util.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap (v4.5.2): util.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
@@ -32,2 +32,6 @@ */ | ||
function toType(obj) { | ||
if (obj === null || typeof obj === 'undefined') { | ||
return "" + obj; | ||
} | ||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); | ||
@@ -45,3 +49,3 @@ } | ||
return undefined; // eslint-disable-line no-undefined | ||
return undefined; | ||
} | ||
@@ -48,0 +52,0 @@ }; |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.4.1): alert.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap (v4.5.2): alert.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
@@ -18,3 +18,3 @@ */ | ||
const NAME = 'alert' | ||
const VERSION = '4.4.1' | ||
const VERSION = '4.5.2' | ||
const DATA_KEY = 'bs.alert' | ||
@@ -25,17 +25,11 @@ const EVENT_KEY = `.${DATA_KEY}` | ||
const Selector = { | ||
DISMISS : '[data-dismiss="alert"]' | ||
} | ||
const SELECTOR_DISMISS = '[data-dismiss="alert"]' | ||
const Event = { | ||
CLOSE : `close${EVENT_KEY}`, | ||
CLOSED : `closed${EVENT_KEY}`, | ||
CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}` | ||
} | ||
const EVENT_CLOSE = `close${EVENT_KEY}` | ||
const EVENT_CLOSED = `closed${EVENT_KEY}` | ||
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}` | ||
const ClassName = { | ||
ALERT : 'alert', | ||
FADE : 'fade', | ||
SHOW : 'show' | ||
} | ||
const CLASS_NAME_ALERT = 'alert' | ||
const CLASS_NAME_FADE = 'fade' | ||
const CLASS_NAME_SHOW = 'show' | ||
@@ -92,3 +86,3 @@ /** | ||
if (!parent) { | ||
parent = $(element).closest(`.${ClassName.ALERT}`)[0] | ||
parent = $(element).closest(`.${CLASS_NAME_ALERT}`)[0] | ||
} | ||
@@ -100,3 +94,3 @@ | ||
_triggerCloseEvent(element) { | ||
const closeEvent = $.Event(Event.CLOSE) | ||
const closeEvent = $.Event(EVENT_CLOSE) | ||
@@ -108,5 +102,5 @@ $(element).trigger(closeEvent) | ||
_removeElement(element) { | ||
$(element).removeClass(ClassName.SHOW) | ||
$(element).removeClass(CLASS_NAME_SHOW) | ||
if (!$(element).hasClass(ClassName.FADE)) { | ||
if (!$(element).hasClass(CLASS_NAME_FADE)) { | ||
this._destroyElement(element) | ||
@@ -126,3 +120,3 @@ return | ||
.detach() | ||
.trigger(Event.CLOSED) | ||
.trigger(EVENT_CLOSED) | ||
.remove() | ||
@@ -167,4 +161,4 @@ } | ||
$(document).on( | ||
Event.CLICK_DATA_API, | ||
Selector.DISMISS, | ||
EVENT_CLICK_DATA_API, | ||
SELECTOR_DISMISS, | ||
Alert._handleDismiss(new Alert()) | ||
@@ -171,0 +165,0 @@ ) |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.4.1): button.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap (v4.5.2): button.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
@@ -17,3 +17,3 @@ */ | ||
const NAME = 'button' | ||
const VERSION = '4.4.1' | ||
const VERSION = '4.5.2' | ||
const DATA_KEY = 'bs.button' | ||
@@ -24,24 +24,18 @@ const EVENT_KEY = `.${DATA_KEY}` | ||
const ClassName = { | ||
ACTIVE : 'active', | ||
BUTTON : 'btn', | ||
FOCUS : 'focus' | ||
} | ||
const CLASS_NAME_ACTIVE = 'active' | ||
const CLASS_NAME_BUTTON = 'btn' | ||
const CLASS_NAME_FOCUS = 'focus' | ||
const Selector = { | ||
DATA_TOGGLE_CARROT : '[data-toggle^="button"]', | ||
DATA_TOGGLES : '[data-toggle="buttons"]', | ||
DATA_TOGGLE : '[data-toggle="button"]', | ||
DATA_TOGGLES_BUTTONS : '[data-toggle="buttons"] .btn', | ||
INPUT : 'input:not([type="hidden"])', | ||
ACTIVE : '.active', | ||
BUTTON : '.btn' | ||
} | ||
const SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]' | ||
const SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]' | ||
const SELECTOR_DATA_TOGGLE = '[data-toggle="button"]' | ||
const SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn' | ||
const SELECTOR_INPUT = 'input:not([type="hidden"])' | ||
const SELECTOR_ACTIVE = '.active' | ||
const SELECTOR_BUTTON = '.btn' | ||
const Event = { | ||
CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`, | ||
FOCUS_BLUR_DATA_API : `focus${EVENT_KEY}${DATA_API_KEY} ` + | ||
`blur${EVENT_KEY}${DATA_API_KEY}`, | ||
LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}` | ||
} | ||
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}` | ||
const EVENT_FOCUS_BLUR_DATA_API = `focus${EVENT_KEY}${DATA_API_KEY} ` + | ||
`blur${EVENT_KEY}${DATA_API_KEY}` | ||
const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}` | ||
@@ -71,7 +65,7 @@ /** | ||
const rootElement = $(this._element).closest( | ||
Selector.DATA_TOGGLES | ||
SELECTOR_DATA_TOGGLES | ||
)[0] | ||
if (rootElement) { | ||
const input = this._element.querySelector(Selector.INPUT) | ||
const input = this._element.querySelector(SELECTOR_INPUT) | ||
@@ -81,22 +75,18 @@ if (input) { | ||
if (input.checked && | ||
this._element.classList.contains(ClassName.ACTIVE)) { | ||
this._element.classList.contains(CLASS_NAME_ACTIVE)) { | ||
triggerChangeEvent = false | ||
} else { | ||
const activeElement = rootElement.querySelector(Selector.ACTIVE) | ||
const activeElement = rootElement.querySelector(SELECTOR_ACTIVE) | ||
if (activeElement) { | ||
$(activeElement).removeClass(ClassName.ACTIVE) | ||
$(activeElement).removeClass(CLASS_NAME_ACTIVE) | ||
} | ||
} | ||
} else if (input.type === 'checkbox') { | ||
if (this._element.tagName === 'LABEL' && input.checked === this._element.classList.contains(ClassName.ACTIVE)) { | ||
triggerChangeEvent = false | ||
} | ||
} else { | ||
// if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input | ||
triggerChangeEvent = false | ||
} | ||
if (triggerChangeEvent) { | ||
input.checked = !this._element.classList.contains(ClassName.ACTIVE) | ||
// if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input | ||
if (input.type === 'checkbox' || input.type === 'radio') { | ||
input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE) | ||
} | ||
$(input).trigger('change') | ||
@@ -113,7 +103,7 @@ } | ||
this._element.setAttribute('aria-pressed', | ||
!this._element.classList.contains(ClassName.ACTIVE)) | ||
!this._element.classList.contains(CLASS_NAME_ACTIVE)) | ||
} | ||
if (triggerChangeEvent) { | ||
$(this._element).toggleClass(ClassName.ACTIVE) | ||
$(this._element).toggleClass(CLASS_NAME_ACTIVE) | ||
} | ||
@@ -153,7 +143,8 @@ } | ||
$(document) | ||
.on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, (event) => { | ||
.on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, (event) => { | ||
let button = event.target | ||
const initialButton = button | ||
if (!$(button).hasClass(ClassName.BUTTON)) { | ||
button = $(button).closest(Selector.BUTTON)[0] | ||
if (!$(button).hasClass(CLASS_NAME_BUTTON)) { | ||
button = $(button).closest(SELECTOR_BUTTON)[0] | ||
} | ||
@@ -164,3 +155,3 @@ | ||
} else { | ||
const inputBtn = button.querySelector(Selector.INPUT) | ||
const inputBtn = button.querySelector(SELECTOR_INPUT) | ||
@@ -172,22 +163,24 @@ if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) { | ||
Button._jQueryInterface.call($(button), 'toggle') | ||
if (initialButton.tagName !== 'LABEL' || inputBtn && inputBtn.type !== 'checkbox') { | ||
Button._jQueryInterface.call($(button), 'toggle') | ||
} | ||
} | ||
}) | ||
.on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, (event) => { | ||
const button = $(event.target).closest(Selector.BUTTON)[0] | ||
$(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type)) | ||
.on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, (event) => { | ||
const button = $(event.target).closest(SELECTOR_BUTTON)[0] | ||
$(button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type)) | ||
}) | ||
$(window).on(Event.LOAD_DATA_API, () => { | ||
$(window).on(EVENT_LOAD_DATA_API, () => { | ||
// ensure correct active class is set to match the controls' actual values/states | ||
// find all checkboxes/readio buttons inside data-toggle groups | ||
let buttons = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLES_BUTTONS)) | ||
let buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS)) | ||
for (let i = 0, len = buttons.length; i < len; i++) { | ||
const button = buttons[i] | ||
const input = button.querySelector(Selector.INPUT) | ||
const input = button.querySelector(SELECTOR_INPUT) | ||
if (input.checked || input.hasAttribute('checked')) { | ||
button.classList.add(ClassName.ACTIVE) | ||
button.classList.add(CLASS_NAME_ACTIVE) | ||
} else { | ||
button.classList.remove(ClassName.ACTIVE) | ||
button.classList.remove(CLASS_NAME_ACTIVE) | ||
} | ||
@@ -197,9 +190,9 @@ } | ||
// find all button toggles | ||
buttons = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE)) | ||
buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE)) | ||
for (let i = 0, len = buttons.length; i < len; i++) { | ||
const button = buttons[i] | ||
if (button.getAttribute('aria-pressed') === 'true') { | ||
button.classList.add(ClassName.ACTIVE) | ||
button.classList.add(CLASS_NAME_ACTIVE) | ||
} else { | ||
button.classList.remove(ClassName.ACTIVE) | ||
button.classList.remove(CLASS_NAME_ACTIVE) | ||
} | ||
@@ -206,0 +199,0 @@ } |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.4.1): carousel.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap (v4.5.2): carousel.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
@@ -18,3 +18,3 @@ */ | ||
const NAME = 'carousel' | ||
const VERSION = '4.4.1' | ||
const VERSION = '4.5.2' | ||
const DATA_KEY = 'bs.carousel' | ||
@@ -47,47 +47,38 @@ const EVENT_KEY = `.${DATA_KEY}` | ||
const Direction = { | ||
NEXT : 'next', | ||
PREV : 'prev', | ||
LEFT : 'left', | ||
RIGHT : 'right' | ||
} | ||
const DIRECTION_NEXT = 'next' | ||
const DIRECTION_PREV = 'prev' | ||
const DIRECTION_LEFT = 'left' | ||
const DIRECTION_RIGHT = 'right' | ||
const Event = { | ||
SLIDE : `slide${EVENT_KEY}`, | ||
SLID : `slid${EVENT_KEY}`, | ||
KEYDOWN : `keydown${EVENT_KEY}`, | ||
MOUSEENTER : `mouseenter${EVENT_KEY}`, | ||
MOUSELEAVE : `mouseleave${EVENT_KEY}`, | ||
TOUCHSTART : `touchstart${EVENT_KEY}`, | ||
TOUCHMOVE : `touchmove${EVENT_KEY}`, | ||
TOUCHEND : `touchend${EVENT_KEY}`, | ||
POINTERDOWN : `pointerdown${EVENT_KEY}`, | ||
POINTERUP : `pointerup${EVENT_KEY}`, | ||
DRAG_START : `dragstart${EVENT_KEY}`, | ||
LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}`, | ||
CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}` | ||
} | ||
const EVENT_SLIDE = `slide${EVENT_KEY}` | ||
const EVENT_SLID = `slid${EVENT_KEY}` | ||
const EVENT_KEYDOWN = `keydown${EVENT_KEY}` | ||
const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY}` | ||
const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY}` | ||
const EVENT_TOUCHSTART = `touchstart${EVENT_KEY}` | ||
const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY}` | ||
const EVENT_TOUCHEND = `touchend${EVENT_KEY}` | ||
const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY}` | ||
const EVENT_POINTERUP = `pointerup${EVENT_KEY}` | ||
const EVENT_DRAG_START = `dragstart${EVENT_KEY}` | ||
const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}` | ||
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}` | ||
const ClassName = { | ||
CAROUSEL : 'carousel', | ||
ACTIVE : 'active', | ||
SLIDE : 'slide', | ||
RIGHT : 'carousel-item-right', | ||
LEFT : 'carousel-item-left', | ||
NEXT : 'carousel-item-next', | ||
PREV : 'carousel-item-prev', | ||
ITEM : 'carousel-item', | ||
POINTER_EVENT : 'pointer-event' | ||
} | ||
const CLASS_NAME_CAROUSEL = 'carousel' | ||
const CLASS_NAME_ACTIVE = 'active' | ||
const CLASS_NAME_SLIDE = 'slide' | ||
const CLASS_NAME_RIGHT = 'carousel-item-right' | ||
const CLASS_NAME_LEFT = 'carousel-item-left' | ||
const CLASS_NAME_NEXT = 'carousel-item-next' | ||
const CLASS_NAME_PREV = 'carousel-item-prev' | ||
const CLASS_NAME_POINTER_EVENT = 'pointer-event' | ||
const Selector = { | ||
ACTIVE : '.active', | ||
ACTIVE_ITEM : '.active.carousel-item', | ||
ITEM : '.carousel-item', | ||
ITEM_IMG : '.carousel-item img', | ||
NEXT_PREV : '.carousel-item-next, .carousel-item-prev', | ||
INDICATORS : '.carousel-indicators', | ||
DATA_SLIDE : '[data-slide], [data-slide-to]', | ||
DATA_RIDE : '[data-ride="carousel"]' | ||
} | ||
const SELECTOR_ACTIVE = '.active' | ||
const SELECTOR_ACTIVE_ITEM = '.active.carousel-item' | ||
const SELECTOR_ITEM = '.carousel-item' | ||
const SELECTOR_ITEM_IMG = '.carousel-item img' | ||
const SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev' | ||
const SELECTOR_INDICATORS = '.carousel-indicators' | ||
const SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]' | ||
const SELECTOR_DATA_RIDE = '[data-ride="carousel"]' | ||
@@ -117,3 +108,3 @@ const PointerType = { | ||
this._element = element | ||
this._indicatorsElement = this._element.querySelector(Selector.INDICATORS) | ||
this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS) | ||
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0 | ||
@@ -139,3 +130,3 @@ this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent) | ||
if (!this._isSliding) { | ||
this._slide(Direction.NEXT) | ||
this._slide(DIRECTION_NEXT) | ||
} | ||
@@ -155,3 +146,3 @@ } | ||
if (!this._isSliding) { | ||
this._slide(Direction.PREV) | ||
this._slide(DIRECTION_PREV) | ||
} | ||
@@ -165,3 +156,3 @@ } | ||
if (this._element.querySelector(Selector.NEXT_PREV)) { | ||
if (this._element.querySelector(SELECTOR_NEXT_PREV)) { | ||
Util.triggerTransitionEnd(this._element) | ||
@@ -194,3 +185,3 @@ this.cycle(true) | ||
to(index) { | ||
this._activeElement = this._element.querySelector(Selector.ACTIVE_ITEM) | ||
this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM) | ||
@@ -204,3 +195,3 @@ const activeIndex = this._getItemIndex(this._activeElement) | ||
if (this._isSliding) { | ||
$(this._element).one(Event.SLID, () => this.to(index)) | ||
$(this._element).one(EVENT_SLID, () => this.to(index)) | ||
return | ||
@@ -216,4 +207,4 @@ } | ||
const direction = index > activeIndex | ||
? Direction.NEXT | ||
: Direction.PREV | ||
? DIRECTION_NEXT | ||
: DIRECTION_PREV | ||
@@ -272,4 +263,3 @@ this._slide(direction, this._items[index]) | ||
if (this._config.keyboard) { | ||
$(this._element) | ||
.on(Event.KEYDOWN, (event) => this._keydown(event)) | ||
$(this._element).on(EVENT_KEYDOWN, (event) => this._keydown(event)) | ||
} | ||
@@ -279,4 +269,4 @@ | ||
$(this._element) | ||
.on(Event.MOUSEENTER, (event) => this.pause(event)) | ||
.on(Event.MOUSELEAVE, (event) => this.cycle(event)) | ||
.on(EVENT_MOUSEENTER, (event) => this.pause(event)) | ||
.on(EVENT_MOUSELEAVE, (event) => this.cycle(event)) | ||
} | ||
@@ -334,12 +324,14 @@ | ||
$(this._element.querySelectorAll(Selector.ITEM_IMG)).on(Event.DRAG_START, (e) => e.preventDefault()) | ||
$(this._element.querySelectorAll(SELECTOR_ITEM_IMG)) | ||
.on(EVENT_DRAG_START, (e) => e.preventDefault()) | ||
if (this._pointerEvent) { | ||
$(this._element).on(Event.POINTERDOWN, (event) => start(event)) | ||
$(this._element).on(Event.POINTERUP, (event) => end(event)) | ||
$(this._element).on(EVENT_POINTERDOWN, (event) => start(event)) | ||
$(this._element).on(EVENT_POINTERUP, (event) => end(event)) | ||
this._element.classList.add(ClassName.POINTER_EVENT) | ||
this._element.classList.add(CLASS_NAME_POINTER_EVENT) | ||
} else { | ||
$(this._element).on(Event.TOUCHSTART, (event) => start(event)) | ||
$(this._element).on(Event.TOUCHMOVE, (event) => move(event)) | ||
$(this._element).on(Event.TOUCHEND, (event) => end(event)) | ||
$(this._element).on(EVENT_TOUCHSTART, (event) => start(event)) | ||
$(this._element).on(EVENT_TOUCHMOVE, (event) => move(event)) | ||
$(this._element).on(EVENT_TOUCHEND, (event) => end(event)) | ||
} | ||
@@ -368,3 +360,3 @@ } | ||
this._items = element && element.parentNode | ||
? [].slice.call(element.parentNode.querySelectorAll(Selector.ITEM)) | ||
? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) | ||
: [] | ||
@@ -375,4 +367,4 @@ return this._items.indexOf(element) | ||
_getItemByDirection(direction, activeElement) { | ||
const isNextDirection = direction === Direction.NEXT | ||
const isPrevDirection = direction === Direction.PREV | ||
const isNextDirection = direction === DIRECTION_NEXT | ||
const isPrevDirection = direction === DIRECTION_PREV | ||
const activeIndex = this._getItemIndex(activeElement) | ||
@@ -387,3 +379,3 @@ const lastItemIndex = this._items.length - 1 | ||
const delta = direction === Direction.PREV ? -1 : 1 | ||
const delta = direction === DIRECTION_PREV ? -1 : 1 | ||
const itemIndex = (activeIndex + delta) % this._items.length | ||
@@ -397,4 +389,4 @@ | ||
const targetIndex = this._getItemIndex(relatedTarget) | ||
const fromIndex = this._getItemIndex(this._element.querySelector(Selector.ACTIVE_ITEM)) | ||
const slideEvent = $.Event(Event.SLIDE, { | ||
const fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM)) | ||
const slideEvent = $.Event(EVENT_SLIDE, { | ||
relatedTarget, | ||
@@ -413,5 +405,4 @@ direction: eventDirectionName, | ||
if (this._indicatorsElement) { | ||
const indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector.ACTIVE)) | ||
$(indicators) | ||
.removeClass(ClassName.ACTIVE) | ||
const indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE)) | ||
$(indicators).removeClass(CLASS_NAME_ACTIVE) | ||
@@ -423,3 +414,3 @@ const nextIndicator = this._indicatorsElement.children[ | ||
if (nextIndicator) { | ||
$(nextIndicator).addClass(ClassName.ACTIVE) | ||
$(nextIndicator).addClass(CLASS_NAME_ACTIVE) | ||
} | ||
@@ -430,3 +421,3 @@ } | ||
_slide(direction, element) { | ||
const activeElement = this._element.querySelector(Selector.ACTIVE_ITEM) | ||
const activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM) | ||
const activeElementIndex = this._getItemIndex(activeElement) | ||
@@ -442,13 +433,13 @@ const nextElement = element || activeElement && | ||
if (direction === Direction.NEXT) { | ||
directionalClassName = ClassName.LEFT | ||
orderClassName = ClassName.NEXT | ||
eventDirectionName = Direction.LEFT | ||
if (direction === DIRECTION_NEXT) { | ||
directionalClassName = CLASS_NAME_LEFT | ||
orderClassName = CLASS_NAME_NEXT | ||
eventDirectionName = DIRECTION_LEFT | ||
} else { | ||
directionalClassName = ClassName.RIGHT | ||
orderClassName = ClassName.PREV | ||
eventDirectionName = Direction.RIGHT | ||
directionalClassName = CLASS_NAME_RIGHT | ||
orderClassName = CLASS_NAME_PREV | ||
eventDirectionName = DIRECTION_RIGHT | ||
} | ||
if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) { | ||
if (nextElement && $(nextElement).hasClass(CLASS_NAME_ACTIVE)) { | ||
this._isSliding = false | ||
@@ -476,3 +467,3 @@ return | ||
const slidEvent = $.Event(Event.SLID, { | ||
const slidEvent = $.Event(EVENT_SLID, { | ||
relatedTarget: nextElement, | ||
@@ -484,3 +475,3 @@ direction: eventDirectionName, | ||
if ($(this._element).hasClass(ClassName.SLIDE)) { | ||
if ($(this._element).hasClass(CLASS_NAME_SLIDE)) { | ||
$(nextElement).addClass(orderClassName) | ||
@@ -507,5 +498,5 @@ | ||
.removeClass(`${directionalClassName} ${orderClassName}`) | ||
.addClass(ClassName.ACTIVE) | ||
.addClass(CLASS_NAME_ACTIVE) | ||
$(activeElement).removeClass(`${ClassName.ACTIVE} ${orderClassName} ${directionalClassName}`) | ||
$(activeElement).removeClass(`${CLASS_NAME_ACTIVE} ${orderClassName} ${directionalClassName}`) | ||
@@ -518,4 +509,4 @@ this._isSliding = false | ||
} else { | ||
$(activeElement).removeClass(ClassName.ACTIVE) | ||
$(nextElement).addClass(ClassName.ACTIVE) | ||
$(activeElement).removeClass(CLASS_NAME_ACTIVE) | ||
$(nextElement).addClass(CLASS_NAME_ACTIVE) | ||
@@ -578,3 +569,3 @@ this._isSliding = false | ||
if (!target || !$(target).hasClass(ClassName.CAROUSEL)) { | ||
if (!target || !$(target).hasClass(CLASS_NAME_CAROUSEL)) { | ||
return | ||
@@ -609,7 +600,6 @@ } | ||
$(document) | ||
.on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler) | ||
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler) | ||
$(window).on(Event.LOAD_DATA_API, () => { | ||
const carousels = [].slice.call(document.querySelectorAll(Selector.DATA_RIDE)) | ||
$(window).on(EVENT_LOAD_DATA_API, () => { | ||
const carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE)) | ||
for (let i = 0, len = carousels.length; i < len; i++) { | ||
@@ -616,0 +606,0 @@ const $carousel = $(carousels[i]) |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.4.1): collapse.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap (v4.5.2): collapse.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
@@ -18,3 +18,3 @@ */ | ||
const NAME = 'collapse' | ||
const VERSION = '4.4.1' | ||
const VERSION = '4.5.2' | ||
const DATA_KEY = 'bs.collapse' | ||
@@ -35,26 +35,18 @@ const EVENT_KEY = `.${DATA_KEY}` | ||
const Event = { | ||
SHOW : `show${EVENT_KEY}`, | ||
SHOWN : `shown${EVENT_KEY}`, | ||
HIDE : `hide${EVENT_KEY}`, | ||
HIDDEN : `hidden${EVENT_KEY}`, | ||
CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}` | ||
} | ||
const EVENT_SHOW = `show${EVENT_KEY}` | ||
const EVENT_SHOWN = `shown${EVENT_KEY}` | ||
const EVENT_HIDE = `hide${EVENT_KEY}` | ||
const EVENT_HIDDEN = `hidden${EVENT_KEY}` | ||
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}` | ||
const ClassName = { | ||
SHOW : 'show', | ||
COLLAPSE : 'collapse', | ||
COLLAPSING : 'collapsing', | ||
COLLAPSED : 'collapsed' | ||
} | ||
const CLASS_NAME_SHOW = 'show' | ||
const CLASS_NAME_COLLAPSE = 'collapse' | ||
const CLASS_NAME_COLLAPSING = 'collapsing' | ||
const CLASS_NAME_COLLAPSED = 'collapsed' | ||
const Dimension = { | ||
WIDTH : 'width', | ||
HEIGHT : 'height' | ||
} | ||
const DIMENSION_WIDTH = 'width' | ||
const DIMENSION_HEIGHT = 'height' | ||
const Selector = { | ||
ACTIVES : '.show, .collapsing', | ||
DATA_TOGGLE : '[data-toggle="collapse"]' | ||
} | ||
const SELECTOR_ACTIVES = '.show, .collapsing' | ||
const SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]' | ||
@@ -77,3 +69,3 @@ /** | ||
const toggleList = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE)) | ||
const toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE)) | ||
for (let i = 0, len = toggleList.length; i < len; i++) { | ||
@@ -115,3 +107,3 @@ const elem = toggleList[i] | ||
toggle() { | ||
if ($(this._element).hasClass(ClassName.SHOW)) { | ||
if ($(this._element).hasClass(CLASS_NAME_SHOW)) { | ||
this.hide() | ||
@@ -125,3 +117,3 @@ } else { | ||
if (this._isTransitioning || | ||
$(this._element).hasClass(ClassName.SHOW)) { | ||
$(this._element).hasClass(CLASS_NAME_SHOW)) { | ||
return | ||
@@ -134,3 +126,3 @@ } | ||
if (this._parent) { | ||
actives = [].slice.call(this._parent.querySelectorAll(Selector.ACTIVES)) | ||
actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES)) | ||
.filter((elem) => { | ||
@@ -141,3 +133,3 @@ if (typeof this._config.parent === 'string') { | ||
return elem.classList.contains(ClassName.COLLAPSE) | ||
return elem.classList.contains(CLASS_NAME_COLLAPSE) | ||
}) | ||
@@ -157,3 +149,3 @@ | ||
const startEvent = $.Event(Event.SHOW) | ||
const startEvent = $.Event(EVENT_SHOW) | ||
$(this._element).trigger(startEvent) | ||
@@ -174,4 +166,4 @@ if (startEvent.isDefaultPrevented()) { | ||
$(this._element) | ||
.removeClass(ClassName.COLLAPSE) | ||
.addClass(ClassName.COLLAPSING) | ||
.removeClass(CLASS_NAME_COLLAPSE) | ||
.addClass(CLASS_NAME_COLLAPSING) | ||
@@ -182,3 +174,3 @@ this._element.style[dimension] = 0 | ||
$(this._triggerArray) | ||
.removeClass(ClassName.COLLAPSED) | ||
.removeClass(CLASS_NAME_COLLAPSED) | ||
.attr('aria-expanded', true) | ||
@@ -191,5 +183,4 @@ } | ||
$(this._element) | ||
.removeClass(ClassName.COLLAPSING) | ||
.addClass(ClassName.COLLAPSE) | ||
.addClass(ClassName.SHOW) | ||
.removeClass(CLASS_NAME_COLLAPSING) | ||
.addClass(`${CLASS_NAME_COLLAPSE} ${CLASS_NAME_SHOW}`) | ||
@@ -200,3 +191,3 @@ this._element.style[dimension] = '' | ||
$(this._element).trigger(Event.SHOWN) | ||
$(this._element).trigger(EVENT_SHOWN) | ||
} | ||
@@ -217,7 +208,7 @@ | ||
if (this._isTransitioning || | ||
!$(this._element).hasClass(ClassName.SHOW)) { | ||
!$(this._element).hasClass(CLASS_NAME_SHOW)) { | ||
return | ||
} | ||
const startEvent = $.Event(Event.HIDE) | ||
const startEvent = $.Event(EVENT_HIDE) | ||
$(this._element).trigger(startEvent) | ||
@@ -235,5 +226,4 @@ if (startEvent.isDefaultPrevented()) { | ||
$(this._element) | ||
.addClass(ClassName.COLLAPSING) | ||
.removeClass(ClassName.COLLAPSE) | ||
.removeClass(ClassName.SHOW) | ||
.addClass(CLASS_NAME_COLLAPSING) | ||
.removeClass(`${CLASS_NAME_COLLAPSE} ${CLASS_NAME_SHOW}`) | ||
@@ -248,4 +238,4 @@ const triggerArrayLength = this._triggerArray.length | ||
const $elem = $([].slice.call(document.querySelectorAll(selector))) | ||
if (!$elem.hasClass(ClassName.SHOW)) { | ||
$(trigger).addClass(ClassName.COLLAPSED) | ||
if (!$elem.hasClass(CLASS_NAME_SHOW)) { | ||
$(trigger).addClass(CLASS_NAME_COLLAPSED) | ||
.attr('aria-expanded', false) | ||
@@ -262,5 +252,5 @@ } | ||
$(this._element) | ||
.removeClass(ClassName.COLLAPSING) | ||
.addClass(ClassName.COLLAPSE) | ||
.trigger(Event.HIDDEN) | ||
.removeClass(CLASS_NAME_COLLAPSING) | ||
.addClass(CLASS_NAME_COLLAPSE) | ||
.trigger(EVENT_HIDDEN) | ||
} | ||
@@ -303,4 +293,4 @@ | ||
_getDimension() { | ||
const hasWidth = $(this._element).hasClass(Dimension.WIDTH) | ||
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT | ||
const hasWidth = $(this._element).hasClass(DIMENSION_WIDTH) | ||
return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT | ||
} | ||
@@ -322,6 +312,5 @@ | ||
const selector = | ||
`[data-toggle="collapse"][data-parent="${this._config.parent}"]` | ||
const selector = `[data-toggle="collapse"][data-parent="${this._config.parent}"]` | ||
const children = [].slice.call(parent.querySelectorAll(selector)) | ||
const children = [].slice.call(parent.querySelectorAll(selector)) | ||
$(children).each((i, element) => { | ||
@@ -338,7 +327,7 @@ this._addAriaAndCollapsedClass( | ||
_addAriaAndCollapsedClass(element, triggerArray) { | ||
const isOpen = $(element).hasClass(ClassName.SHOW) | ||
const isOpen = $(element).hasClass(CLASS_NAME_SHOW) | ||
if (triggerArray.length) { | ||
$(triggerArray) | ||
.toggleClass(ClassName.COLLAPSED, !isOpen) | ||
.toggleClass(CLASS_NAME_COLLAPSED, !isOpen) | ||
.attr('aria-expanded', isOpen) | ||
@@ -365,3 +354,3 @@ } | ||
if (!data && _config.toggle && /show|hide/.test(config)) { | ||
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) { | ||
_config.toggle = false | ||
@@ -391,3 +380,3 @@ } | ||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { | ||
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { | ||
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element | ||
@@ -394,0 +383,0 @@ if (event.currentTarget.tagName === 'A') { |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.4.1): dropdown.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap (v4.5.2): dropdown.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
@@ -19,3 +19,3 @@ */ | ||
const NAME = 'dropdown' | ||
const VERSION = '4.4.1' | ||
const VERSION = '4.5.2' | ||
const DATA_KEY = 'bs.dropdown' | ||
@@ -33,42 +33,31 @@ const EVENT_KEY = `.${DATA_KEY}` | ||
const Event = { | ||
HIDE : `hide${EVENT_KEY}`, | ||
HIDDEN : `hidden${EVENT_KEY}`, | ||
SHOW : `show${EVENT_KEY}`, | ||
SHOWN : `shown${EVENT_KEY}`, | ||
CLICK : `click${EVENT_KEY}`, | ||
CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`, | ||
KEYDOWN_DATA_API : `keydown${EVENT_KEY}${DATA_API_KEY}`, | ||
KEYUP_DATA_API : `keyup${EVENT_KEY}${DATA_API_KEY}` | ||
} | ||
const EVENT_HIDE = `hide${EVENT_KEY}` | ||
const EVENT_HIDDEN = `hidden${EVENT_KEY}` | ||
const EVENT_SHOW = `show${EVENT_KEY}` | ||
const EVENT_SHOWN = `shown${EVENT_KEY}` | ||
const EVENT_CLICK = `click${EVENT_KEY}` | ||
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}` | ||
const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}` | ||
const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}` | ||
const ClassName = { | ||
DISABLED : 'disabled', | ||
SHOW : 'show', | ||
DROPUP : 'dropup', | ||
DROPRIGHT : 'dropright', | ||
DROPLEFT : 'dropleft', | ||
MENURIGHT : 'dropdown-menu-right', | ||
MENULEFT : 'dropdown-menu-left', | ||
POSITION_STATIC : 'position-static' | ||
} | ||
const CLASS_NAME_DISABLED = 'disabled' | ||
const CLASS_NAME_SHOW = 'show' | ||
const CLASS_NAME_DROPUP = 'dropup' | ||
const CLASS_NAME_DROPRIGHT = 'dropright' | ||
const CLASS_NAME_DROPLEFT = 'dropleft' | ||
const CLASS_NAME_MENURIGHT = 'dropdown-menu-right' | ||
const CLASS_NAME_POSITION_STATIC = 'position-static' | ||
const Selector = { | ||
DATA_TOGGLE : '[data-toggle="dropdown"]', | ||
FORM_CHILD : '.dropdown form', | ||
MENU : '.dropdown-menu', | ||
NAVBAR_NAV : '.navbar-nav', | ||
VISIBLE_ITEMS : '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)' | ||
} | ||
const SELECTOR_DATA_TOGGLE = '[data-toggle="dropdown"]' | ||
const SELECTOR_FORM_CHILD = '.dropdown form' | ||
const SELECTOR_MENU = '.dropdown-menu' | ||
const SELECTOR_NAVBAR_NAV = '.navbar-nav' | ||
const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)' | ||
const AttachmentMap = { | ||
TOP : 'top-start', | ||
TOPEND : 'top-end', | ||
BOTTOM : 'bottom-start', | ||
BOTTOMEND : 'bottom-end', | ||
RIGHT : 'right-start', | ||
RIGHTEND : 'right-end', | ||
LEFT : 'left-start', | ||
LEFTEND : 'left-end' | ||
} | ||
const PLACEMENT_TOP = 'top-start' | ||
const PLACEMENT_TOPEND = 'top-end' | ||
const PLACEMENT_BOTTOM = 'bottom-start' | ||
const PLACEMENT_BOTTOMEND = 'bottom-end' | ||
const PLACEMENT_RIGHT = 'right-start' | ||
const PLACEMENT_LEFT = 'left-start' | ||
@@ -127,7 +116,7 @@ const Default = { | ||
toggle() { | ||
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) { | ||
if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED)) { | ||
return | ||
} | ||
const isActive = $(this._menu).hasClass(ClassName.SHOW) | ||
const isActive = $(this._menu).hasClass(CLASS_NAME_SHOW) | ||
@@ -144,3 +133,3 @@ Dropdown._clearMenus() | ||
show(usePopper = false) { | ||
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED) || $(this._menu).hasClass(ClassName.SHOW)) { | ||
if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || $(this._menu).hasClass(CLASS_NAME_SHOW)) { | ||
return | ||
@@ -152,3 +141,3 @@ } | ||
} | ||
const showEvent = $.Event(Event.SHOW, relatedTarget) | ||
const showEvent = $.Event(EVENT_SHOW, relatedTarget) | ||
const parent = Dropdown._getParentFromElement(this._element) | ||
@@ -189,3 +178,3 @@ | ||
if (this._config.boundary !== 'scrollParent') { | ||
$(parent).addClass(ClassName.POSITION_STATIC) | ||
$(parent).addClass(CLASS_NAME_POSITION_STATIC) | ||
} | ||
@@ -200,3 +189,3 @@ this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig()) | ||
if ('ontouchstart' in document.documentElement && | ||
$(parent).closest(Selector.NAVBAR_NAV).length === 0) { | ||
$(parent).closest(SELECTOR_NAVBAR_NAV).length === 0) { | ||
$(document.body).children().on('mouseover', null, $.noop) | ||
@@ -208,10 +197,10 @@ } | ||
$(this._menu).toggleClass(ClassName.SHOW) | ||
$(this._menu).toggleClass(CLASS_NAME_SHOW) | ||
$(parent) | ||
.toggleClass(ClassName.SHOW) | ||
.trigger($.Event(Event.SHOWN, relatedTarget)) | ||
.toggleClass(CLASS_NAME_SHOW) | ||
.trigger($.Event(EVENT_SHOWN, relatedTarget)) | ||
} | ||
hide() { | ||
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED) || !$(this._menu).hasClass(ClassName.SHOW)) { | ||
if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || !$(this._menu).hasClass(CLASS_NAME_SHOW)) { | ||
return | ||
@@ -223,3 +212,3 @@ } | ||
} | ||
const hideEvent = $.Event(Event.HIDE, relatedTarget) | ||
const hideEvent = $.Event(EVENT_HIDE, relatedTarget) | ||
const parent = Dropdown._getParentFromElement(this._element) | ||
@@ -237,6 +226,6 @@ | ||
$(this._menu).toggleClass(ClassName.SHOW) | ||
$(this._menu).toggleClass(CLASS_NAME_SHOW) | ||
$(parent) | ||
.toggleClass(ClassName.SHOW) | ||
.trigger($.Event(Event.HIDDEN, relatedTarget)) | ||
.toggleClass(CLASS_NAME_SHOW) | ||
.trigger($.Event(EVENT_HIDDEN, relatedTarget)) | ||
} | ||
@@ -265,3 +254,3 @@ | ||
_addEventListeners() { | ||
$(this._element).on(Event.CLICK, (event) => { | ||
$(this._element).on(EVENT_CLICK, (event) => { | ||
event.preventDefault() | ||
@@ -294,3 +283,3 @@ event.stopPropagation() | ||
if (parent) { | ||
this._menu = parent.querySelector(Selector.MENU) | ||
this._menu = parent.querySelector(SELECTOR_MENU) | ||
} | ||
@@ -303,16 +292,15 @@ } | ||
const $parentDropdown = $(this._element.parentNode) | ||
let placement = AttachmentMap.BOTTOM | ||
let placement = PLACEMENT_BOTTOM | ||
// Handle dropup | ||
if ($parentDropdown.hasClass(ClassName.DROPUP)) { | ||
placement = AttachmentMap.TOP | ||
if ($(this._menu).hasClass(ClassName.MENURIGHT)) { | ||
placement = AttachmentMap.TOPEND | ||
} | ||
} else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) { | ||
placement = AttachmentMap.RIGHT | ||
} else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) { | ||
placement = AttachmentMap.LEFT | ||
} else if ($(this._menu).hasClass(ClassName.MENURIGHT)) { | ||
placement = AttachmentMap.BOTTOMEND | ||
if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) { | ||
placement = $(this._menu).hasClass(CLASS_NAME_MENURIGHT) | ||
? PLACEMENT_TOPEND | ||
: PLACEMENT_TOP | ||
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) { | ||
placement = PLACEMENT_RIGHT | ||
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) { | ||
placement = PLACEMENT_LEFT | ||
} else if ($(this._menu).hasClass(CLASS_NAME_MENURIGHT)) { | ||
placement = PLACEMENT_BOTTOMEND | ||
} | ||
@@ -399,3 +387,3 @@ return placement | ||
const toggles = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE)) | ||
const toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE)) | ||
@@ -418,3 +406,3 @@ for (let i = 0, len = toggles.length; i < len; i++) { | ||
const dropdownMenu = context._menu | ||
if (!$(parent).hasClass(ClassName.SHOW)) { | ||
if (!$(parent).hasClass(CLASS_NAME_SHOW)) { | ||
continue | ||
@@ -429,3 +417,3 @@ } | ||
const hideEvent = $.Event(Event.HIDE, relatedTarget) | ||
const hideEvent = $.Event(EVENT_HIDE, relatedTarget) | ||
$(parent).trigger(hideEvent) | ||
@@ -448,6 +436,6 @@ if (hideEvent.isDefaultPrevented()) { | ||
$(dropdownMenu).removeClass(ClassName.SHOW) | ||
$(dropdownMenu).removeClass(CLASS_NAME_SHOW) | ||
$(parent) | ||
.removeClass(ClassName.SHOW) | ||
.trigger($.Event(Event.HIDDEN, relatedTarget)) | ||
.removeClass(CLASS_NAME_SHOW) | ||
.trigger($.Event(EVENT_HIDDEN, relatedTarget)) | ||
} | ||
@@ -479,10 +467,7 @@ } | ||
(event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || | ||
$(event.target).closest(Selector.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) { | ||
$(event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) { | ||
return | ||
} | ||
event.preventDefault() | ||
event.stopPropagation() | ||
if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { | ||
if (this.disabled || $(this).hasClass(CLASS_NAME_DISABLED)) { | ||
return | ||
@@ -492,3 +477,3 @@ } | ||
const parent = Dropdown._getParentFromElement(this) | ||
const isActive = $(parent).hasClass(ClassName.SHOW) | ||
const isActive = $(parent).hasClass(CLASS_NAME_SHOW) | ||
@@ -499,6 +484,8 @@ if (!isActive && event.which === ESCAPE_KEYCODE) { | ||
event.preventDefault() | ||
event.stopPropagation() | ||
if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) { | ||
if (event.which === ESCAPE_KEYCODE) { | ||
const toggle = parent.querySelector(Selector.DATA_TOGGLE) | ||
$(toggle).trigger('focus') | ||
$(parent.querySelector(SELECTOR_DATA_TOGGLE)).trigger('focus') | ||
} | ||
@@ -510,3 +497,3 @@ | ||
const items = [].slice.call(parent.querySelectorAll(Selector.VISIBLE_ITEMS)) | ||
const items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS)) | ||
.filter((item) => $(item).is(':visible')) | ||
@@ -543,6 +530,6 @@ | ||
$(document) | ||
.on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler) | ||
.on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler) | ||
.on(`${Event.CLICK_DATA_API} ${Event.KEYUP_DATA_API}`, Dropdown._clearMenus) | ||
.on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { | ||
.on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown._dataApiKeydownHandler) | ||
.on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler) | ||
.on(`${EVENT_CLICK_DATA_API} ${EVENT_KEYUP_DATA_API}`, Dropdown._clearMenus) | ||
.on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { | ||
event.preventDefault() | ||
@@ -552,3 +539,3 @@ event.stopPropagation() | ||
}) | ||
.on(Event.CLICK_DATA_API, Selector.FORM_CHILD, (e) => { | ||
.on(EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, (e) => { | ||
e.stopPropagation() | ||
@@ -570,3 +557,2 @@ }) | ||
export default Dropdown |
@@ -16,4 +16,4 @@ import Alert from './alert' | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.4.1): index.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap (v4.5.2): index.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
@@ -20,0 +20,0 @@ */ |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.4.1): modal.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap (v4.5.2): modal.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
@@ -18,3 +18,3 @@ */ | ||
const NAME = 'modal' | ||
const VERSION = '4.4.1' | ||
const VERSION = '4.5.2' | ||
const DATA_KEY = 'bs.modal' | ||
@@ -40,35 +40,29 @@ const EVENT_KEY = `.${DATA_KEY}` | ||
const Event = { | ||
HIDE : `hide${EVENT_KEY}`, | ||
HIDE_PREVENTED : `hidePrevented${EVENT_KEY}`, | ||
HIDDEN : `hidden${EVENT_KEY}`, | ||
SHOW : `show${EVENT_KEY}`, | ||
SHOWN : `shown${EVENT_KEY}`, | ||
FOCUSIN : `focusin${EVENT_KEY}`, | ||
RESIZE : `resize${EVENT_KEY}`, | ||
CLICK_DISMISS : `click.dismiss${EVENT_KEY}`, | ||
KEYDOWN_DISMISS : `keydown.dismiss${EVENT_KEY}`, | ||
MOUSEUP_DISMISS : `mouseup.dismiss${EVENT_KEY}`, | ||
MOUSEDOWN_DISMISS : `mousedown.dismiss${EVENT_KEY}`, | ||
CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}` | ||
} | ||
const EVENT_HIDE = `hide${EVENT_KEY}` | ||
const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}` | ||
const EVENT_HIDDEN = `hidden${EVENT_KEY}` | ||
const EVENT_SHOW = `show${EVENT_KEY}` | ||
const EVENT_SHOWN = `shown${EVENT_KEY}` | ||
const EVENT_FOCUSIN = `focusin${EVENT_KEY}` | ||
const EVENT_RESIZE = `resize${EVENT_KEY}` | ||
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}` | ||
const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}` | ||
const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY}` | ||
const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}` | ||
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}` | ||
const ClassName = { | ||
SCROLLABLE : 'modal-dialog-scrollable', | ||
SCROLLBAR_MEASURER : 'modal-scrollbar-measure', | ||
BACKDROP : 'modal-backdrop', | ||
OPEN : 'modal-open', | ||
FADE : 'fade', | ||
SHOW : 'show', | ||
STATIC : 'modal-static' | ||
} | ||
const CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable' | ||
const CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure' | ||
const CLASS_NAME_BACKDROP = 'modal-backdrop' | ||
const CLASS_NAME_OPEN = 'modal-open' | ||
const CLASS_NAME_FADE = 'fade' | ||
const CLASS_NAME_SHOW = 'show' | ||
const CLASS_NAME_STATIC = 'modal-static' | ||
const Selector = { | ||
DIALOG : '.modal-dialog', | ||
MODAL_BODY : '.modal-body', | ||
DATA_TOGGLE : '[data-toggle="modal"]', | ||
DATA_DISMISS : '[data-dismiss="modal"]', | ||
FIXED_CONTENT : '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', | ||
STICKY_CONTENT : '.sticky-top' | ||
} | ||
const SELECTOR_DIALOG = '.modal-dialog' | ||
const SELECTOR_MODAL_BODY = '.modal-body' | ||
const SELECTOR_DATA_TOGGLE = '[data-toggle="modal"]' | ||
const SELECTOR_DATA_DISMISS = '[data-dismiss="modal"]' | ||
const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top' | ||
const SELECTOR_STICKY_CONTENT = '.sticky-top' | ||
@@ -85,3 +79,3 @@ /** | ||
this._element = element | ||
this._dialog = element.querySelector(Selector.DIALOG) | ||
this._dialog = element.querySelector(SELECTOR_DIALOG) | ||
this._backdrop = null | ||
@@ -116,7 +110,7 @@ this._isShown = false | ||
if ($(this._element).hasClass(ClassName.FADE)) { | ||
if ($(this._element).hasClass(CLASS_NAME_FADE)) { | ||
this._isTransitioning = true | ||
} | ||
const showEvent = $.Event(Event.SHOW, { | ||
const showEvent = $.Event(EVENT_SHOW, { | ||
relatedTarget | ||
@@ -142,9 +136,9 @@ }) | ||
$(this._element).on( | ||
Event.CLICK_DISMISS, | ||
Selector.DATA_DISMISS, | ||
EVENT_CLICK_DISMISS, | ||
SELECTOR_DATA_DISMISS, | ||
(event) => this.hide(event) | ||
) | ||
$(this._dialog).on(Event.MOUSEDOWN_DISMISS, () => { | ||
$(this._element).one(Event.MOUSEUP_DISMISS, (event) => { | ||
$(this._dialog).on(EVENT_MOUSEDOWN_DISMISS, () => { | ||
$(this._element).one(EVENT_MOUSEUP_DISMISS, (event) => { | ||
if ($(event.target).is(this._element)) { | ||
@@ -168,3 +162,3 @@ this._ignoreBackdropClick = true | ||
const hideEvent = $.Event(Event.HIDE) | ||
const hideEvent = $.Event(EVENT_HIDE) | ||
@@ -178,3 +172,3 @@ $(this._element).trigger(hideEvent) | ||
this._isShown = false | ||
const transition = $(this._element).hasClass(ClassName.FADE) | ||
const transition = $(this._element).hasClass(CLASS_NAME_FADE) | ||
@@ -188,10 +182,9 @@ if (transition) { | ||
$(document).off(Event.FOCUSIN) | ||
$(document).off(EVENT_FOCUSIN) | ||
$(this._element).removeClass(ClassName.SHOW) | ||
$(this._element).removeClass(CLASS_NAME_SHOW) | ||
$(this._element).off(Event.CLICK_DISMISS) | ||
$(this._dialog).off(Event.MOUSEDOWN_DISMISS) | ||
$(this._element).off(EVENT_CLICK_DISMISS) | ||
$(this._dialog).off(EVENT_MOUSEDOWN_DISMISS) | ||
if (transition) { | ||
@@ -213,7 +206,7 @@ const transitionDuration = Util.getTransitionDurationFromElement(this._element) | ||
/** | ||
* `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API` | ||
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API` | ||
* Do not move `document` in `htmlElements` array | ||
* It will remove `Event.CLICK_DATA_API` event that should remain | ||
* It will remove `EVENT_CLICK_DATA_API` event that should remain | ||
*/ | ||
$(document).off(Event.FOCUSIN) | ||
$(document).off(EVENT_FOCUSIN) | ||
@@ -250,3 +243,3 @@ $.removeData(this._element, DATA_KEY) | ||
if (this._config.backdrop === 'static') { | ||
const hideEventPrevented = $.Event(Event.HIDE_PREVENTED) | ||
const hideEventPrevented = $.Event(EVENT_HIDE_PREVENTED) | ||
@@ -258,8 +251,21 @@ $(this._element).trigger(hideEventPrevented) | ||
this._element.classList.add(ClassName.STATIC) | ||
const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight | ||
const modalTransitionDuration = Util.getTransitionDurationFromElement(this._element) | ||
if (!isModalOverflowing) { | ||
this._element.style.overflowY = 'hidden' | ||
} | ||
this._element.classList.add(CLASS_NAME_STATIC) | ||
const modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog) | ||
$(this._element).off(Util.TRANSITION_END) | ||
$(this._element).one(Util.TRANSITION_END, () => { | ||
this._element.classList.remove(ClassName.STATIC) | ||
this._element.classList.remove(CLASS_NAME_STATIC) | ||
if (!isModalOverflowing) { | ||
$(this._element).one(Util.TRANSITION_END, () => { | ||
this._element.style.overflowY = '' | ||
}) | ||
.emulateTransitionEnd(this._element, modalTransitionDuration) | ||
} | ||
}) | ||
@@ -274,4 +280,4 @@ .emulateTransitionEnd(modalTransitionDuration) | ||
_showElement(relatedTarget) { | ||
const transition = $(this._element).hasClass(ClassName.FADE) | ||
const modalBody = this._dialog ? this._dialog.querySelector(Selector.MODAL_BODY) : null | ||
const transition = $(this._element).hasClass(CLASS_NAME_FADE) | ||
const modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null | ||
@@ -287,4 +293,5 @@ if (!this._element.parentNode || | ||
this._element.setAttribute('aria-modal', true) | ||
this._element.setAttribute('role', 'dialog') | ||
if ($(this._dialog).hasClass(ClassName.SCROLLABLE) && modalBody) { | ||
if ($(this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) { | ||
modalBody.scrollTop = 0 | ||
@@ -299,3 +306,3 @@ } else { | ||
$(this._element).addClass(ClassName.SHOW) | ||
$(this._element).addClass(CLASS_NAME_SHOW) | ||
@@ -306,3 +313,3 @@ if (this._config.focus) { | ||
const shownEvent = $.Event(Event.SHOWN, { | ||
const shownEvent = $.Event(EVENT_SHOWN, { | ||
relatedTarget | ||
@@ -332,4 +339,4 @@ }) | ||
$(document) | ||
.off(Event.FOCUSIN) // Guard against infinite focus loop | ||
.on(Event.FOCUSIN, (event) => { | ||
.off(EVENT_FOCUSIN) // Guard against infinite focus loop | ||
.on(EVENT_FOCUSIN, (event) => { | ||
if (document !== event.target && | ||
@@ -344,5 +351,8 @@ this._element !== event.target && | ||
_setEscapeEvent() { | ||
if (this._isShown && this._config.keyboard) { | ||
$(this._element).on(Event.KEYDOWN_DISMISS, (event) => { | ||
if (event.which === ESCAPE_KEYCODE) { | ||
if (this._isShown) { | ||
$(this._element).on(EVENT_KEYDOWN_DISMISS, (event) => { | ||
if (this._config.keyboard && event.which === ESCAPE_KEYCODE) { | ||
event.preventDefault() | ||
this.hide() | ||
} else if (!this._config.keyboard && event.which === ESCAPE_KEYCODE) { | ||
this._triggerBackdropTransition() | ||
@@ -352,3 +362,3 @@ } | ||
} else if (!this._isShown) { | ||
$(this._element).off(Event.KEYDOWN_DISMISS) | ||
$(this._element).off(EVENT_KEYDOWN_DISMISS) | ||
} | ||
@@ -359,5 +369,5 @@ } | ||
if (this._isShown) { | ||
$(window).on(Event.RESIZE, (event) => this.handleUpdate(event)) | ||
$(window).on(EVENT_RESIZE, (event) => this.handleUpdate(event)) | ||
} else { | ||
$(window).off(Event.RESIZE) | ||
$(window).off(EVENT_RESIZE) | ||
} | ||
@@ -370,8 +380,9 @@ } | ||
this._element.removeAttribute('aria-modal') | ||
this._element.removeAttribute('role') | ||
this._isTransitioning = false | ||
this._showBackdrop(() => { | ||
$(document.body).removeClass(ClassName.OPEN) | ||
$(document.body).removeClass(CLASS_NAME_OPEN) | ||
this._resetAdjustments() | ||
this._resetScrollbar() | ||
$(this._element).trigger(Event.HIDDEN) | ||
$(this._element).trigger(EVENT_HIDDEN) | ||
}) | ||
@@ -388,8 +399,8 @@ } | ||
_showBackdrop(callback) { | ||
const animate = $(this._element).hasClass(ClassName.FADE) | ||
? ClassName.FADE : '' | ||
const animate = $(this._element).hasClass(CLASS_NAME_FADE) | ||
? CLASS_NAME_FADE : '' | ||
if (this._isShown && this._config.backdrop) { | ||
this._backdrop = document.createElement('div') | ||
this._backdrop.className = ClassName.BACKDROP | ||
this._backdrop.className = CLASS_NAME_BACKDROP | ||
@@ -402,3 +413,3 @@ if (animate) { | ||
$(this._element).on(Event.CLICK_DISMISS, (event) => { | ||
$(this._element).on(EVENT_CLICK_DISMISS, (event) => { | ||
if (this._ignoreBackdropClick) { | ||
@@ -419,3 +430,3 @@ this._ignoreBackdropClick = false | ||
$(this._backdrop).addClass(ClassName.SHOW) | ||
$(this._backdrop).addClass(CLASS_NAME_SHOW) | ||
@@ -437,3 +448,3 @@ if (!callback) { | ||
} else if (!this._isShown && this._backdrop) { | ||
$(this._backdrop).removeClass(ClassName.SHOW) | ||
$(this._backdrop).removeClass(CLASS_NAME_SHOW) | ||
@@ -447,3 +458,3 @@ const callbackRemove = () => { | ||
if ($(this._element).hasClass(ClassName.FADE)) { | ||
if ($(this._element).hasClass(CLASS_NAME_FADE)) { | ||
const backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop) | ||
@@ -487,3 +498,3 @@ | ||
const rect = document.body.getBoundingClientRect() | ||
this._isBodyOverflowing = rect.left + rect.right < window.innerWidth | ||
this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth | ||
this._scrollbarWidth = this._getScrollbarWidth() | ||
@@ -496,4 +507,4 @@ } | ||
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set | ||
const fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT)) | ||
const stickyContent = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT)) | ||
const fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT)) | ||
const stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT)) | ||
@@ -526,3 +537,3 @@ // Adjust fixed content padding | ||
$(document.body).addClass(ClassName.OPEN) | ||
$(document.body).addClass(CLASS_NAME_OPEN) | ||
} | ||
@@ -532,3 +543,3 @@ | ||
// Restore fixed content padding | ||
const fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT)) | ||
const fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT)) | ||
$(fixedContent).each((index, element) => { | ||
@@ -541,3 +552,3 @@ const padding = $(element).data('padding-right') | ||
// Restore sticky content | ||
const elements = [].slice.call(document.querySelectorAll(`${Selector.STICKY_CONTENT}`)) | ||
const elements = [].slice.call(document.querySelectorAll(`${SELECTOR_STICKY_CONTENT}`)) | ||
$(elements).each((index, element) => { | ||
@@ -558,3 +569,3 @@ const margin = $(element).data('margin-right') | ||
const scrollDiv = document.createElement('div') | ||
scrollDiv.className = ClassName.SCROLLBAR_MEASURER | ||
scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER | ||
document.body.appendChild(scrollDiv) | ||
@@ -600,3 +611,3 @@ const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth | ||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { | ||
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { | ||
let target | ||
@@ -619,3 +630,3 @@ const selector = Util.getSelectorFromElement(this) | ||
const $target = $(target).one(Event.SHOW, (showEvent) => { | ||
const $target = $(target).one(EVENT_SHOW, (showEvent) => { | ||
if (showEvent.isDefaultPrevented()) { | ||
@@ -626,3 +637,3 @@ // Only register focus restorer if modal will actually get shown | ||
$target.one(Event.HIDDEN, () => { | ||
$target.one(EVENT_HIDDEN, () => { | ||
if ($(this).is(':visible')) { | ||
@@ -629,0 +640,0 @@ this.focus() |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.4.1): popover.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap (v4.5.2): popover.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
@@ -18,3 +18,3 @@ */ | ||
const NAME = 'popover' | ||
const VERSION = '4.4.1' | ||
const VERSION = '4.5.2' | ||
const DATA_KEY = 'bs.popover' | ||
@@ -42,11 +42,7 @@ const EVENT_KEY = `.${DATA_KEY}` | ||
const ClassName = { | ||
FADE : 'fade', | ||
SHOW : 'show' | ||
} | ||
const CLASS_NAME_FADE = 'fade' | ||
const CLASS_NAME_SHOW = 'show' | ||
const Selector = { | ||
TITLE : '.popover-header', | ||
CONTENT : '.popover-body' | ||
} | ||
const SELECTOR_TITLE = '.popover-header' | ||
const SELECTOR_CONTENT = '.popover-body' | ||
@@ -122,3 +118,3 @@ const Event = { | ||
// We use append for html objects to maintain js events | ||
this.setElementContent($tip.find(Selector.TITLE), this.getTitle()) | ||
this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle()) | ||
let content = this._getContent() | ||
@@ -128,5 +124,5 @@ if (typeof content === 'function') { | ||
} | ||
this.setElementContent($tip.find(Selector.CONTENT), content) | ||
this.setElementContent($tip.find(SELECTOR_CONTENT), content) | ||
$tip.removeClass(`${ClassName.FADE} ${ClassName.SHOW}`) | ||
$tip.removeClass(`${CLASS_NAME_FADE} ${CLASS_NAME_SHOW}`) | ||
} | ||
@@ -133,0 +129,0 @@ |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.4.1): scrollspy.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap (v4.5.2): scrollspy.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
@@ -18,3 +18,3 @@ */ | ||
const NAME = 'scrollspy' | ||
const VERSION = '4.4.1' | ||
const VERSION = '4.5.2' | ||
const DATA_KEY = 'bs.scrollspy' | ||
@@ -37,30 +37,20 @@ const EVENT_KEY = `.${DATA_KEY}` | ||
const Event = { | ||
ACTIVATE : `activate${EVENT_KEY}`, | ||
SCROLL : `scroll${EVENT_KEY}`, | ||
LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}` | ||
} | ||
const EVENT_ACTIVATE = `activate${EVENT_KEY}` | ||
const EVENT_SCROLL = `scroll${EVENT_KEY}` | ||
const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}` | ||
const ClassName = { | ||
DROPDOWN_ITEM : 'dropdown-item', | ||
DROPDOWN_MENU : 'dropdown-menu', | ||
ACTIVE : 'active' | ||
} | ||
const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item' | ||
const CLASS_NAME_ACTIVE = 'active' | ||
const Selector = { | ||
DATA_SPY : '[data-spy="scroll"]', | ||
ACTIVE : '.active', | ||
NAV_LIST_GROUP : '.nav, .list-group', | ||
NAV_LINKS : '.nav-link', | ||
NAV_ITEMS : '.nav-item', | ||
LIST_ITEMS : '.list-group-item', | ||
DROPDOWN : '.dropdown', | ||
DROPDOWN_ITEMS : '.dropdown-item', | ||
DROPDOWN_TOGGLE : '.dropdown-toggle' | ||
} | ||
const SELECTOR_DATA_SPY = '[data-spy="scroll"]' | ||
const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group' | ||
const SELECTOR_NAV_LINKS = '.nav-link' | ||
const SELECTOR_NAV_ITEMS = '.nav-item' | ||
const SELECTOR_LIST_ITEMS = '.list-group-item' | ||
const SELECTOR_DROPDOWN = '.dropdown' | ||
const SELECTOR_DROPDOWN_ITEMS = '.dropdown-item' | ||
const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle' | ||
const OffsetMethod = { | ||
OFFSET : 'offset', | ||
POSITION : 'position' | ||
} | ||
const METHOD_OFFSET = 'offset' | ||
const METHOD_POSITION = 'position' | ||
@@ -78,5 +68,5 @@ /** | ||
this._config = this._getConfig(config) | ||
this._selector = `${this._config.target} ${Selector.NAV_LINKS},` + | ||
`${this._config.target} ${Selector.LIST_ITEMS},` + | ||
`${this._config.target} ${Selector.DROPDOWN_ITEMS}` | ||
this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS},` + | ||
`${this._config.target} ${SELECTOR_LIST_ITEMS},` + | ||
`${this._config.target} ${SELECTOR_DROPDOWN_ITEMS}` | ||
this._offsets = [] | ||
@@ -87,3 +77,3 @@ this._targets = [] | ||
$(this._scrollElement).on(Event.SCROLL, (event) => this._process(event)) | ||
$(this._scrollElement).on(EVENT_SCROLL, (event) => this._process(event)) | ||
@@ -108,3 +98,3 @@ this.refresh() | ||
const autoMethod = this._scrollElement === this._scrollElement.window | ||
? OffsetMethod.OFFSET : OffsetMethod.POSITION | ||
? METHOD_OFFSET : METHOD_POSITION | ||
@@ -114,3 +104,3 @@ const offsetMethod = this._config.method === 'auto' | ||
const offsetBase = offsetMethod === OffsetMethod.POSITION | ||
const offsetBase = offsetMethod === METHOD_POSITION | ||
? this._getScrollTop() : 0 | ||
@@ -176,3 +166,3 @@ | ||
if (typeof config.target !== 'string') { | ||
if (typeof config.target !== 'string' && Util.isElement(config.target)) { | ||
let id = $(config.target).attr('id') | ||
@@ -211,5 +201,3 @@ if (!id) { | ||
const scrollHeight = this._getScrollHeight() | ||
const maxScroll = this._config.offset + | ||
scrollHeight - | ||
this._getOffsetHeight() | ||
const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight() | ||
@@ -235,4 +223,3 @@ if (this._scrollHeight !== scrollHeight) { | ||
const offsetLength = this._offsets.length | ||
for (let i = offsetLength; i--;) { | ||
for (let i = this._offsets.length; i--;) { | ||
const isActiveTarget = this._activeTarget !== this._targets[i] && | ||
@@ -260,16 +247,23 @@ scrollTop >= this._offsets[i] && | ||
if ($link.hasClass(ClassName.DROPDOWN_ITEM)) { | ||
$link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE) | ||
$link.addClass(ClassName.ACTIVE) | ||
if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) { | ||
$link.closest(SELECTOR_DROPDOWN) | ||
.find(SELECTOR_DROPDOWN_TOGGLE) | ||
.addClass(CLASS_NAME_ACTIVE) | ||
$link.addClass(CLASS_NAME_ACTIVE) | ||
} else { | ||
// Set triggered link as active | ||
$link.addClass(ClassName.ACTIVE) | ||
$link.addClass(CLASS_NAME_ACTIVE) | ||
// Set triggered links parents as active | ||
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor | ||
$link.parents(Selector.NAV_LIST_GROUP).prev(`${Selector.NAV_LINKS}, ${Selector.LIST_ITEMS}`).addClass(ClassName.ACTIVE) | ||
$link.parents(SELECTOR_NAV_LIST_GROUP) | ||
.prev(`${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`) | ||
.addClass(CLASS_NAME_ACTIVE) | ||
// Handle special case when .nav-link is inside .nav-item | ||
$link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_ITEMS).children(Selector.NAV_LINKS).addClass(ClassName.ACTIVE) | ||
$link.parents(SELECTOR_NAV_LIST_GROUP) | ||
.prev(SELECTOR_NAV_ITEMS) | ||
.children(SELECTOR_NAV_LINKS) | ||
.addClass(CLASS_NAME_ACTIVE) | ||
} | ||
$(this._scrollElement).trigger(Event.ACTIVATE, { | ||
$(this._scrollElement).trigger(EVENT_ACTIVATE, { | ||
relatedTarget: target | ||
@@ -281,4 +275,4 @@ }) | ||
[].slice.call(document.querySelectorAll(this._selector)) | ||
.filter((node) => node.classList.contains(ClassName.ACTIVE)) | ||
.forEach((node) => node.classList.remove(ClassName.ACTIVE)) | ||
.filter((node) => node.classList.contains(CLASS_NAME_ACTIVE)) | ||
.forEach((node) => node.classList.remove(CLASS_NAME_ACTIVE)) | ||
} | ||
@@ -314,4 +308,4 @@ | ||
$(window).on(Event.LOAD_DATA_API, () => { | ||
const scrollSpys = [].slice.call(document.querySelectorAll(Selector.DATA_SPY)) | ||
$(window).on(EVENT_LOAD_DATA_API, () => { | ||
const scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY)) | ||
const scrollSpysLength = scrollSpys.length | ||
@@ -318,0 +312,0 @@ |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.4.1): tab.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap (v4.5.2): tab.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
@@ -18,3 +18,3 @@ */ | ||
const NAME = 'tab' | ||
const VERSION = '4.4.1' | ||
const VERSION = '4.5.2' | ||
const DATA_KEY = 'bs.tab' | ||
@@ -25,27 +25,21 @@ const EVENT_KEY = `.${DATA_KEY}` | ||
const Event = { | ||
HIDE : `hide${EVENT_KEY}`, | ||
HIDDEN : `hidden${EVENT_KEY}`, | ||
SHOW : `show${EVENT_KEY}`, | ||
SHOWN : `shown${EVENT_KEY}`, | ||
CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}` | ||
} | ||
const EVENT_HIDE = `hide${EVENT_KEY}` | ||
const EVENT_HIDDEN = `hidden${EVENT_KEY}` | ||
const EVENT_SHOW = `show${EVENT_KEY}` | ||
const EVENT_SHOWN = `shown${EVENT_KEY}` | ||
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}` | ||
const ClassName = { | ||
DROPDOWN_MENU : 'dropdown-menu', | ||
ACTIVE : 'active', | ||
DISABLED : 'disabled', | ||
FADE : 'fade', | ||
SHOW : 'show' | ||
} | ||
const CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu' | ||
const CLASS_NAME_ACTIVE = 'active' | ||
const CLASS_NAME_DISABLED = 'disabled' | ||
const CLASS_NAME_FADE = 'fade' | ||
const CLASS_NAME_SHOW = 'show' | ||
const Selector = { | ||
DROPDOWN : '.dropdown', | ||
NAV_LIST_GROUP : '.nav, .list-group', | ||
ACTIVE : '.active', | ||
ACTIVE_UL : '> li > .active', | ||
DATA_TOGGLE : '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]', | ||
DROPDOWN_TOGGLE : '.dropdown-toggle', | ||
DROPDOWN_ACTIVE_CHILD : '> .dropdown-menu .active' | ||
} | ||
const SELECTOR_DROPDOWN = '.dropdown' | ||
const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group' | ||
const SELECTOR_ACTIVE = '.active' | ||
const SELECTOR_ACTIVE_UL = '> li > .active' | ||
const SELECTOR_DATA_TOGGLE = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]' | ||
const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle' | ||
const SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active' | ||
@@ -74,4 +68,4 @@ /** | ||
this._element.parentNode.nodeType === Node.ELEMENT_NODE && | ||
$(this._element).hasClass(ClassName.ACTIVE) || | ||
$(this._element).hasClass(ClassName.DISABLED)) { | ||
$(this._element).hasClass(CLASS_NAME_ACTIVE) || | ||
$(this._element).hasClass(CLASS_NAME_DISABLED)) { | ||
return | ||
@@ -82,7 +76,7 @@ } | ||
let previous | ||
const listElement = $(this._element).closest(Selector.NAV_LIST_GROUP)[0] | ||
const listElement = $(this._element).closest(SELECTOR_NAV_LIST_GROUP)[0] | ||
const selector = Util.getSelectorFromElement(this._element) | ||
if (listElement) { | ||
const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector.ACTIVE_UL : Selector.ACTIVE | ||
const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE | ||
previous = $.makeArray($(listElement).find(itemSelector)) | ||
@@ -92,7 +86,7 @@ previous = previous[previous.length - 1] | ||
const hideEvent = $.Event(Event.HIDE, { | ||
const hideEvent = $.Event(EVENT_HIDE, { | ||
relatedTarget: this._element | ||
}) | ||
const showEvent = $.Event(Event.SHOW, { | ||
const showEvent = $.Event(EVENT_SHOW, { | ||
relatedTarget: previous | ||
@@ -122,7 +116,7 @@ }) | ||
const complete = () => { | ||
const hiddenEvent = $.Event(Event.HIDDEN, { | ||
const hiddenEvent = $.Event(EVENT_HIDDEN, { | ||
relatedTarget: this._element | ||
}) | ||
const shownEvent = $.Event(Event.SHOWN, { | ||
const shownEvent = $.Event(EVENT_SHOWN, { | ||
relatedTarget: previous | ||
@@ -151,7 +145,7 @@ }) | ||
const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') | ||
? $(container).find(Selector.ACTIVE_UL) | ||
: $(container).children(Selector.ACTIVE) | ||
? $(container).find(SELECTOR_ACTIVE_UL) | ||
: $(container).children(SELECTOR_ACTIVE) | ||
const active = activeElements[0] | ||
const isTransitioning = callback && (active && $(active).hasClass(ClassName.FADE)) | ||
const isTransitioning = callback && (active && $(active).hasClass(CLASS_NAME_FADE)) | ||
const complete = () => this._transitionComplete( | ||
@@ -167,3 +161,3 @@ element, | ||
$(active) | ||
.removeClass(ClassName.SHOW) | ||
.removeClass(CLASS_NAME_SHOW) | ||
.one(Util.TRANSITION_END, complete) | ||
@@ -178,10 +172,10 @@ .emulateTransitionEnd(transitionDuration) | ||
if (active) { | ||
$(active).removeClass(ClassName.ACTIVE) | ||
$(active).removeClass(CLASS_NAME_ACTIVE) | ||
const dropdownChild = $(active.parentNode).find( | ||
Selector.DROPDOWN_ACTIVE_CHILD | ||
SELECTOR_DROPDOWN_ACTIVE_CHILD | ||
)[0] | ||
if (dropdownChild) { | ||
$(dropdownChild).removeClass(ClassName.ACTIVE) | ||
$(dropdownChild).removeClass(CLASS_NAME_ACTIVE) | ||
} | ||
@@ -194,3 +188,3 @@ | ||
$(element).addClass(ClassName.ACTIVE) | ||
$(element).addClass(CLASS_NAME_ACTIVE) | ||
if (element.getAttribute('role') === 'tab') { | ||
@@ -202,13 +196,13 @@ element.setAttribute('aria-selected', true) | ||
if (element.classList.contains(ClassName.FADE)) { | ||
element.classList.add(ClassName.SHOW) | ||
if (element.classList.contains(CLASS_NAME_FADE)) { | ||
element.classList.add(CLASS_NAME_SHOW) | ||
} | ||
if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) { | ||
const dropdownElement = $(element).closest(Selector.DROPDOWN)[0] | ||
if (element.parentNode && $(element.parentNode).hasClass(CLASS_NAME_DROPDOWN_MENU)) { | ||
const dropdownElement = $(element).closest(SELECTOR_DROPDOWN)[0] | ||
if (dropdownElement) { | ||
const dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector.DROPDOWN_TOGGLE)) | ||
const dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE)) | ||
$(dropdownToggleList).addClass(ClassName.ACTIVE) | ||
$(dropdownToggleList).addClass(CLASS_NAME_ACTIVE) | ||
} | ||
@@ -253,3 +247,3 @@ | ||
$(document) | ||
.on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { | ||
.on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { | ||
event.preventDefault() | ||
@@ -256,0 +250,0 @@ Tab._jQueryInterface.call($(this), 'show') |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.4.1): toast.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap (v4.5.2): toast.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
@@ -18,3 +18,3 @@ */ | ||
const NAME = 'toast' | ||
const VERSION = '4.4.1' | ||
const VERSION = '4.5.2' | ||
const DATA_KEY = 'bs.toast' | ||
@@ -24,16 +24,12 @@ const EVENT_KEY = `.${DATA_KEY}` | ||
const Event = { | ||
CLICK_DISMISS : `click.dismiss${EVENT_KEY}`, | ||
HIDE : `hide${EVENT_KEY}`, | ||
HIDDEN : `hidden${EVENT_KEY}`, | ||
SHOW : `show${EVENT_KEY}`, | ||
SHOWN : `shown${EVENT_KEY}` | ||
} | ||
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}` | ||
const EVENT_HIDE = `hide${EVENT_KEY}` | ||
const EVENT_HIDDEN = `hidden${EVENT_KEY}` | ||
const EVENT_SHOW = `show${EVENT_KEY}` | ||
const EVENT_SHOWN = `shown${EVENT_KEY}` | ||
const ClassName = { | ||
FADE : 'fade', | ||
HIDE : 'hide', | ||
SHOW : 'show', | ||
SHOWING : 'showing' | ||
} | ||
const CLASS_NAME_FADE = 'fade' | ||
const CLASS_NAME_HIDE = 'hide' | ||
const CLASS_NAME_SHOW = 'show' | ||
const CLASS_NAME_SHOWING = 'showing' | ||
@@ -52,5 +48,3 @@ const DefaultType = { | ||
const Selector = { | ||
DATA_DISMISS : '[data-dismiss="toast"]' | ||
} | ||
const SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]' | ||
@@ -88,3 +82,3 @@ /** | ||
show() { | ||
const showEvent = $.Event(Event.SHOW) | ||
const showEvent = $.Event(EVENT_SHOW) | ||
@@ -96,11 +90,13 @@ $(this._element).trigger(showEvent) | ||
this._clearTimeout() | ||
if (this._config.animation) { | ||
this._element.classList.add(ClassName.FADE) | ||
this._element.classList.add(CLASS_NAME_FADE) | ||
} | ||
const complete = () => { | ||
this._element.classList.remove(ClassName.SHOWING) | ||
this._element.classList.add(ClassName.SHOW) | ||
this._element.classList.remove(CLASS_NAME_SHOWING) | ||
this._element.classList.add(CLASS_NAME_SHOW) | ||
$(this._element).trigger(Event.SHOWN) | ||
$(this._element).trigger(EVENT_SHOWN) | ||
@@ -114,5 +110,5 @@ if (this._config.autohide) { | ||
this._element.classList.remove(ClassName.HIDE) | ||
this._element.classList.remove(CLASS_NAME_HIDE) | ||
Util.reflow(this._element) | ||
this._element.classList.add(ClassName.SHOWING) | ||
this._element.classList.add(CLASS_NAME_SHOWING) | ||
if (this._config.animation) { | ||
@@ -130,7 +126,7 @@ const transitionDuration = Util.getTransitionDurationFromElement(this._element) | ||
hide() { | ||
if (!this._element.classList.contains(ClassName.SHOW)) { | ||
if (!this._element.classList.contains(CLASS_NAME_SHOW)) { | ||
return | ||
} | ||
const hideEvent = $.Event(Event.HIDE) | ||
const hideEvent = $.Event(EVENT_HIDE) | ||
@@ -146,10 +142,9 @@ $(this._element).trigger(hideEvent) | ||
dispose() { | ||
clearTimeout(this._timeout) | ||
this._timeout = null | ||
this._clearTimeout() | ||
if (this._element.classList.contains(ClassName.SHOW)) { | ||
this._element.classList.remove(ClassName.SHOW) | ||
if (this._element.classList.contains(CLASS_NAME_SHOW)) { | ||
this._element.classList.remove(CLASS_NAME_SHOW) | ||
} | ||
$(this._element).off(Event.CLICK_DISMISS) | ||
$(this._element).off(EVENT_CLICK_DISMISS) | ||
@@ -180,7 +175,3 @@ $.removeData(this._element, DATA_KEY) | ||
_setListeners() { | ||
$(this._element).on( | ||
Event.CLICK_DISMISS, | ||
Selector.DATA_DISMISS, | ||
() => this.hide() | ||
) | ||
$(this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide()) | ||
} | ||
@@ -190,7 +181,7 @@ | ||
const complete = () => { | ||
this._element.classList.add(ClassName.HIDE) | ||
$(this._element).trigger(Event.HIDDEN) | ||
this._element.classList.add(CLASS_NAME_HIDE) | ||
$(this._element).trigger(EVENT_HIDDEN) | ||
} | ||
this._element.classList.remove(ClassName.SHOW) | ||
this._element.classList.remove(CLASS_NAME_SHOW) | ||
if (this._config.animation) { | ||
@@ -207,2 +198,7 @@ const transitionDuration = Util.getTransitionDurationFromElement(this._element) | ||
_clearTimeout() { | ||
clearTimeout(this._timeout) | ||
this._timeout = null | ||
} | ||
// Static | ||
@@ -209,0 +205,0 @@ |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.4.1): tools/sanitizer.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap (v4.5.2): tools/sanitizer.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
@@ -40,3 +40,3 @@ */ | ||
i: [], | ||
img: ['src', 'alt', 'title', 'width', 'height'], | ||
img: ['src', 'srcset', 'alt', 'title', 'width', 'height'], | ||
li: [], | ||
@@ -61,3 +61,3 @@ ol: [], | ||
*/ | ||
const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi | ||
const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi | ||
@@ -69,3 +69,3 @@ /** | ||
*/ | ||
const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i | ||
const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i | ||
@@ -86,3 +86,3 @@ function allowedAttribute(attr, allowedAttributeList) { | ||
// Check if a regular expression validates the attribute. | ||
for (let i = 0, l = regExp.length; i < l; i++) { | ||
for (let i = 0, len = regExp.length; i < len; i++) { | ||
if (attrName.match(regExp[i])) { | ||
@@ -89,0 +89,0 @@ return true |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.4.1): tooltip.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap (v4.5.2): tooltip.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
@@ -23,3 +23,3 @@ */ | ||
const NAME = 'tooltip' | ||
const VERSION = '4.4.1' | ||
const VERSION = '4.5.2' | ||
const DATA_KEY = 'bs.tooltip' | ||
@@ -80,6 +80,4 @@ const EVENT_KEY = `.${DATA_KEY}` | ||
const HoverState = { | ||
SHOW : 'show', | ||
OUT : 'out' | ||
} | ||
const HOVER_STATE_SHOW = 'show' | ||
const HOVER_STATE_OUT = 'out' | ||
@@ -99,21 +97,13 @@ const Event = { | ||
const ClassName = { | ||
FADE : 'fade', | ||
SHOW : 'show' | ||
} | ||
const CLASS_NAME_FADE = 'fade' | ||
const CLASS_NAME_SHOW = 'show' | ||
const Selector = { | ||
TOOLTIP : '.tooltip', | ||
TOOLTIP_INNER : '.tooltip-inner', | ||
ARROW : '.arrow' | ||
} | ||
const SELECTOR_TOOLTIP_INNER = '.tooltip-inner' | ||
const SELECTOR_ARROW = '.arrow' | ||
const Trigger = { | ||
HOVER : 'hover', | ||
FOCUS : 'focus', | ||
CLICK : 'click', | ||
MANUAL : 'manual' | ||
} | ||
const TRIGGER_HOVER = 'hover' | ||
const TRIGGER_FOCUS = 'focus' | ||
const TRIGGER_CLICK = 'click' | ||
const TRIGGER_MANUAL = 'manual' | ||
/** | ||
@@ -215,3 +205,3 @@ * ------------------------------------------------------------------------ | ||
} else { | ||
if ($(this.getTipElement()).hasClass(ClassName.SHOW)) { | ||
if ($(this.getTipElement()).hasClass(CLASS_NAME_SHOW)) { | ||
this._leave(null, this) | ||
@@ -279,3 +269,3 @@ return | ||
if (this.config.animation) { | ||
$(tip).addClass(ClassName.FADE) | ||
$(tip).addClass(CLASS_NAME_FADE) | ||
} | ||
@@ -301,3 +291,3 @@ | ||
$(tip).addClass(ClassName.SHOW) | ||
$(tip).addClass(CLASS_NAME_SHOW) | ||
@@ -321,3 +311,3 @@ // If this is a touch-enabled device we add extra | ||
if (prevHoverState === HoverState.OUT) { | ||
if (prevHoverState === HOVER_STATE_OUT) { | ||
this._leave(null, this) | ||
@@ -327,3 +317,3 @@ } | ||
if ($(this.tip).hasClass(ClassName.FADE)) { | ||
if ($(this.tip).hasClass(CLASS_NAME_FADE)) { | ||
const transitionDuration = Util.getTransitionDurationFromElement(this.tip) | ||
@@ -344,3 +334,3 @@ | ||
const complete = () => { | ||
if (this._hoverState !== HoverState.SHOW && tip.parentNode) { | ||
if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) { | ||
tip.parentNode.removeChild(tip) | ||
@@ -367,3 +357,3 @@ } | ||
$(tip).removeClass(ClassName.SHOW) | ||
$(tip).removeClass(CLASS_NAME_SHOW) | ||
@@ -376,7 +366,7 @@ // If this is a touch-enabled device we remove the extra | ||
this._activeTrigger[Trigger.CLICK] = false | ||
this._activeTrigger[Trigger.FOCUS] = false | ||
this._activeTrigger[Trigger.HOVER] = false | ||
this._activeTrigger[TRIGGER_CLICK] = false | ||
this._activeTrigger[TRIGGER_FOCUS] = false | ||
this._activeTrigger[TRIGGER_HOVER] = false | ||
if ($(this.tip).hasClass(ClassName.FADE)) { | ||
if ($(this.tip).hasClass(CLASS_NAME_FADE)) { | ||
const transitionDuration = Util.getTransitionDurationFromElement(tip) | ||
@@ -417,4 +407,4 @@ | ||
const tip = this.getTipElement() | ||
this.setElementContent($(tip.querySelectorAll(Selector.TOOLTIP_INNER)), this.getTitle()) | ||
$(tip).removeClass(`${ClassName.FADE} ${ClassName.SHOW}`) | ||
this.setElementContent($(tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle()) | ||
$(tip).removeClass(`${CLASS_NAME_FADE} ${CLASS_NAME_SHOW}`) | ||
} | ||
@@ -470,3 +460,3 @@ | ||
arrow: { | ||
element: Selector.ARROW | ||
element: SELECTOR_ARROW | ||
}, | ||
@@ -536,7 +526,7 @@ preventOverflow: { | ||
) | ||
} else if (trigger !== Trigger.MANUAL) { | ||
const eventIn = trigger === Trigger.HOVER | ||
} else if (trigger !== TRIGGER_MANUAL) { | ||
const eventIn = trigger === TRIGGER_HOVER | ||
? this.constructor.Event.MOUSEENTER | ||
: this.constructor.Event.FOCUSIN | ||
const eventOut = trigger === Trigger.HOVER | ||
const eventOut = trigger === TRIGGER_HOVER | ||
? this.constructor.Event.MOUSELEAVE | ||
@@ -546,12 +536,4 @@ : this.constructor.Event.FOCUSOUT | ||
$(this.element) | ||
.on( | ||
eventIn, | ||
this.config.selector, | ||
(event) => this._enter(event) | ||
) | ||
.on( | ||
eventOut, | ||
this.config.selector, | ||
(event) => this._leave(event) | ||
) | ||
.on(eventIn, this.config.selector, (event) => this._enter(event)) | ||
.on(eventOut, this.config.selector, (event) => this._leave(event)) | ||
} | ||
@@ -566,6 +548,3 @@ }) | ||
$(this.element).closest('.modal').on( | ||
'hide.bs.modal', | ||
this._hideModalHandler | ||
) | ||
$(this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler) | ||
@@ -610,8 +589,8 @@ if (this.config.selector) { | ||
context._activeTrigger[ | ||
event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER | ||
event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER | ||
] = true | ||
} | ||
if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) { | ||
context._hoverState = HoverState.SHOW | ||
if ($(context.getTipElement()).hasClass(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) { | ||
context._hoverState = HOVER_STATE_SHOW | ||
return | ||
@@ -622,3 +601,3 @@ } | ||
context._hoverState = HoverState.SHOW | ||
context._hoverState = HOVER_STATE_SHOW | ||
@@ -631,3 +610,3 @@ if (!context.config.delay || !context.config.delay.show) { | ||
context._timeout = setTimeout(() => { | ||
if (context._hoverState === HoverState.SHOW) { | ||
if (context._hoverState === HOVER_STATE_SHOW) { | ||
context.show() | ||
@@ -652,3 +631,3 @@ } | ||
context._activeTrigger[ | ||
event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER | ||
event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER | ||
] = false | ||
@@ -663,3 +642,3 @@ } | ||
context._hoverState = HoverState.OUT | ||
context._hoverState = HOVER_STATE_OUT | ||
@@ -672,3 +651,3 @@ if (!context.config.delay || !context.config.delay.hide) { | ||
context._timeout = setTimeout(() => { | ||
if (context._hoverState === HoverState.OUT) { | ||
if (context._hoverState === HOVER_STATE_OUT) { | ||
context.hide() | ||
@@ -756,4 +735,3 @@ } | ||
_handlePopperPlacementChange(popperData) { | ||
const popperInstance = popperData.instance | ||
this.tip = popperInstance.popper | ||
this.tip = popperData.instance.popper | ||
this._cleanTipClass() | ||
@@ -771,3 +749,3 @@ this.addAttachmentClass(this._getAttachment(popperData.placement)) | ||
$(tip).removeClass(ClassName.FADE) | ||
$(tip).removeClass(CLASS_NAME_FADE) | ||
this.config.animation = false | ||
@@ -774,0 +752,0 @@ this.hide() |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.4.1): util.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* Bootstrap (v4.5.2): util.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
@@ -22,2 +22,6 @@ */ | ||
function toType(obj) { | ||
if (obj === null || typeof obj === 'undefined') { | ||
return `${obj}` | ||
} | ||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase() | ||
@@ -34,3 +38,3 @@ } | ||
} | ||
return undefined // eslint-disable-line no-undefined | ||
return undefined | ||
} | ||
@@ -68,3 +72,2 @@ } | ||
const Util = { | ||
TRANSITION_END: 'bsTransitionEnd', | ||
@@ -71,0 +74,0 @@ |
{ | ||
"name": "bootstrap-v4-rtl", | ||
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", | ||
"version": "4.4.1-2", | ||
"version": "4.5.2-1", | ||
"version_short": "4.4", | ||
@@ -21,6 +21,3 @@ "keywords": [ | ||
"start": "npm-run-all --parallel watch", | ||
"blc": "blc --exclude-external --filter-level 3 --follow --get --ordered --recursive --host-requests 4 --input http://localhost:3000/", | ||
"http-server": "http-server --silent -p 3000", | ||
"bundlesize": "bundlesize", | ||
"check-broken-links": "npm-run-all --parallel --race \"http-server -- _gh_pages/\" blc", | ||
"bundlewatch": "bundlewatch --config .bundlewatch.config.json", | ||
"css": "npm-run-all css-compile css-prefix css-minify", | ||
@@ -84,52 +81,48 @@ "css-main": "npm-run-all css-lint css-compile-main css-prefix-main css-minify-main", | ||
"jquery": "1.9.1 - 3", | ||
"popper.js": "^1.16.0" | ||
"popper.js": "^1.16.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.8.4", | ||
"@babel/core": "^7.9.6", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.9.6", | ||
"@babel/preset-env": "^7.9.6", | ||
"autoprefixer": "^9.7.6", | ||
"@babel/cli": "^7.10.5", | ||
"@babel/core": "^7.11.0", | ||
"@babel/preset-env": "^7.11.0", | ||
"@rollup/plugin-babel": "^5.1.0", | ||
"@rollup/plugin-commonjs": "^14.0.0", | ||
"@rollup/plugin-node-resolve": "^8.4.0", | ||
"autoprefixer": "^9.8.6", | ||
"babel-eslint": "^10.1.0", | ||
"babel-plugin-istanbul": "^5.2.0", | ||
"broken-link-checker": "^0.7.8", | ||
"bundlesize": "^0.18.0", | ||
"babel-plugin-istanbul": "^6.0.0", | ||
"bundlewatch": "^0.2.7", | ||
"clean-css-cli": "^4.3.0", | ||
"cross-env": "^5.2.1", | ||
"eslint": "^5.16.0", | ||
"find-unused-sass-variables": "^0.6.0", | ||
"cross-env": "^7.0.2", | ||
"eslint": "^7.6.0", | ||
"find-unused-sass-variables": "^2.0.0", | ||
"glob": "^7.1.6", | ||
"hammer-simulator": "0.0.1", | ||
"http-server": "^0.11.1", | ||
"ip": "^1.1.5", | ||
"jquery": "^3.5.1", | ||
"karma": "^3.1.4", | ||
"karma": "^5.1.1", | ||
"karma-browserstack-launcher": "1.4.0", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-coverage-istanbul-reporter": "^2.1.1", | ||
"karma-coverage-istanbul-reporter": "^3.0.3", | ||
"karma-detect-browsers": "^2.3.3", | ||
"karma-firefox-launcher": "^1.3.0", | ||
"karma-qunit": "^3.1.3", | ||
"karma-qunit": "^4.1.1", | ||
"karma-sinon": "^1.0.5", | ||
"linkinator": "^2.1.1", | ||
"lockfile-lint": "^4.3.7", | ||
"node-sass": "^4.14.1", | ||
"nodemon": "^1.19.4", | ||
"nodemon": "^2.0.4", | ||
"npm-run-all": "^4.1.5", | ||
"popper.js": "^1.16.1", | ||
"postcss-cli": "^6.1.3", | ||
"qunit": "2.9.2", | ||
"rollup": "1.26.5", | ||
"rollup-plugin-babel": "^4.4.0", | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"postcss-cli": "^7.1.1", | ||
"qunit": "^2.10.1", | ||
"rollup": "^2.23.0", | ||
"shelljs": "^0.8.4", | ||
"shx": "^0.3.2", | ||
"sinon": "^7.5.0", | ||
"stylelint": "^9.10.1", | ||
"stylelint-config-twbs-bootstrap": "^0.5.0", | ||
"uglify-js": "^3.9.2", | ||
"vnu-jar": "19.9.4" | ||
"stylelint": "^13.6.1", | ||
"stylelint-config-twbs-bootstrap": "^2.0.3", | ||
"terser": "^4.8.0", | ||
"vnu-jar": "20.6.30" | ||
}, | ||
"engines": { | ||
"node": ">=6" | ||
}, | ||
"files": [ | ||
@@ -158,5 +151,5 @@ "dist/{css,js}/*.{css,js,map}", | ||
"jquery": "1.9.1 - 3", | ||
"popper.js": "^1.16.0" | ||
"popper.js": "^1.16.1" | ||
} | ||
} | ||
} |
@@ -8,3 +8,3 @@ <p align="center"> | ||
<p align="center"> | ||
based on version 4.4.1 | ||
based on version 4.5.2 | ||
</p> | ||
@@ -11,0 +11,0 @@ <p align="center"> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6034852
42
158
41109