bootstrap.js 134 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358
  1. /*!
  2. * Bootstrap v4.6.1 (https://getbootstrap.com/)
  3. * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
  4. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
  5. */
  6. (function (global, factory) {
  7. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery'), require('popper.js')) :
  8. typeof define === 'function' && define.amd ? define(['exports', 'jquery', 'popper.js'], factory) :
  9. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.bootstrap = {}, global.jQuery, global.Popper));
  10. })(this, (function (exports, $, Popper) { 'use strict';
  11. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  12. var $__default = /*#__PURE__*/_interopDefaultLegacy($);
  13. var Popper__default = /*#__PURE__*/_interopDefaultLegacy(Popper);
  14. function _defineProperties(target, props) {
  15. for (var i = 0; i < props.length; i++) {
  16. var descriptor = props[i];
  17. descriptor.enumerable = descriptor.enumerable || false;
  18. descriptor.configurable = true;
  19. if ("value" in descriptor) descriptor.writable = true;
  20. Object.defineProperty(target, descriptor.key, descriptor);
  21. }
  22. }
  23. function _createClass(Constructor, protoProps, staticProps) {
  24. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  25. if (staticProps) _defineProperties(Constructor, staticProps);
  26. return Constructor;
  27. }
  28. function _extends() {
  29. _extends = Object.assign || function (target) {
  30. for (var i = 1; i < arguments.length; i++) {
  31. var source = arguments[i];
  32. for (var key in source) {
  33. if (Object.prototype.hasOwnProperty.call(source, key)) {
  34. target[key] = source[key];
  35. }
  36. }
  37. }
  38. return target;
  39. };
  40. return _extends.apply(this, arguments);
  41. }
  42. function _inheritsLoose(subClass, superClass) {
  43. subClass.prototype = Object.create(superClass.prototype);
  44. subClass.prototype.constructor = subClass;
  45. _setPrototypeOf(subClass, superClass);
  46. }
  47. function _setPrototypeOf(o, p) {
  48. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  49. o.__proto__ = p;
  50. return o;
  51. };
  52. return _setPrototypeOf(o, p);
  53. }
  54. /**
  55. * --------------------------------------------------------------------------
  56. * Bootstrap (v4.6.1): util.js
  57. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
  58. * --------------------------------------------------------------------------
  59. */
  60. /**
  61. * Private TransitionEnd Helpers
  62. */
  63. var TRANSITION_END = 'transitionend';
  64. var MAX_UID = 1000000;
  65. var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
  66. function toType(obj) {
  67. if (obj === null || typeof obj === 'undefined') {
  68. return "" + obj;
  69. }
  70. return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
  71. }
  72. function getSpecialTransitionEndEvent() {
  73. return {
  74. bindType: TRANSITION_END,
  75. delegateType: TRANSITION_END,
  76. handle: function handle(event) {
  77. if ($__default["default"](event.target).is(this)) {
  78. return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
  79. }
  80. return undefined;
  81. }
  82. };
  83. }
  84. function transitionEndEmulator(duration) {
  85. var _this = this;
  86. var called = false;
  87. $__default["default"](this).one(Util.TRANSITION_END, function () {
  88. called = true;
  89. });
  90. setTimeout(function () {
  91. if (!called) {
  92. Util.triggerTransitionEnd(_this);
  93. }
  94. }, duration);
  95. return this;
  96. }
  97. function setTransitionEndSupport() {
  98. $__default["default"].fn.emulateTransitionEnd = transitionEndEmulator;
  99. $__default["default"].event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
  100. }
  101. /**
  102. * Public Util API
  103. */
  104. var Util = {
  105. TRANSITION_END: 'bsTransitionEnd',
  106. getUID: function getUID(prefix) {
  107. do {
  108. // eslint-disable-next-line no-bitwise
  109. prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
  110. } while (document.getElementById(prefix));
  111. return prefix;
  112. },
  113. getSelectorFromElement: function getSelectorFromElement(element) {
  114. var selector = element.getAttribute('data-target');
  115. if (!selector || selector === '#') {
  116. var hrefAttr = element.getAttribute('href');
  117. selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
  118. }
  119. try {
  120. return document.querySelector(selector) ? selector : null;
  121. } catch (_) {
  122. return null;
  123. }
  124. },
  125. getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
  126. if (!element) {
  127. return 0;
  128. } // Get transition-duration of the element
  129. var transitionDuration = $__default["default"](element).css('transition-duration');
  130. var transitionDelay = $__default["default"](element).css('transition-delay');
  131. var floatTransitionDuration = parseFloat(transitionDuration);
  132. var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
  133. if (!floatTransitionDuration && !floatTransitionDelay) {
  134. return 0;
  135. } // If multiple durations are defined, take the first
  136. transitionDuration = transitionDuration.split(',')[0];
  137. transitionDelay = transitionDelay.split(',')[0];
  138. return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
  139. },
  140. reflow: function reflow(element) {
  141. return element.offsetHeight;
  142. },
  143. triggerTransitionEnd: function triggerTransitionEnd(element) {
  144. $__default["default"](element).trigger(TRANSITION_END);
  145. },
  146. supportsTransitionEnd: function supportsTransitionEnd() {
  147. return Boolean(TRANSITION_END);
  148. },
  149. isElement: function isElement(obj) {
  150. return (obj[0] || obj).nodeType;
  151. },
  152. typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
  153. for (var property in configTypes) {
  154. if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
  155. var expectedTypes = configTypes[property];
  156. var value = config[property];
  157. var valueType = value && Util.isElement(value) ? 'element' : toType(value);
  158. if (!new RegExp(expectedTypes).test(valueType)) {
  159. throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
  160. }
  161. }
  162. }
  163. },
  164. findShadowRoot: function findShadowRoot(element) {
  165. if (!document.documentElement.attachShadow) {
  166. return null;
  167. } // Can find the shadow root otherwise it'll return the document
  168. if (typeof element.getRootNode === 'function') {
  169. var root = element.getRootNode();
  170. return root instanceof ShadowRoot ? root : null;
  171. }
  172. if (element instanceof ShadowRoot) {
  173. return element;
  174. } // when we don't find a shadow root
  175. if (!element.parentNode) {
  176. return null;
  177. }
  178. return Util.findShadowRoot(element.parentNode);
  179. },
  180. jQueryDetection: function jQueryDetection() {
  181. if (typeof $__default["default"] === 'undefined') {
  182. throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
  183. }
  184. var version = $__default["default"].fn.jquery.split(' ')[0].split('.');
  185. var minMajor = 1;
  186. var ltMajor = 2;
  187. var minMinor = 9;
  188. var minPatch = 1;
  189. var maxMajor = 4;
  190. if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
  191. throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
  192. }
  193. }
  194. };
  195. Util.jQueryDetection();
  196. setTransitionEndSupport();
  197. /**
  198. * Constants
  199. */
  200. var NAME$a = 'alert';
  201. var VERSION$a = '4.6.1';
  202. var DATA_KEY$a = 'bs.alert';
  203. var EVENT_KEY$a = "." + DATA_KEY$a;
  204. var DATA_API_KEY$7 = '.data-api';
  205. var JQUERY_NO_CONFLICT$a = $__default["default"].fn[NAME$a];
  206. var CLASS_NAME_ALERT = 'alert';
  207. var CLASS_NAME_FADE$5 = 'fade';
  208. var CLASS_NAME_SHOW$7 = 'show';
  209. var EVENT_CLOSE = "close" + EVENT_KEY$a;
  210. var EVENT_CLOSED = "closed" + EVENT_KEY$a;
  211. var EVENT_CLICK_DATA_API$6 = "click" + EVENT_KEY$a + DATA_API_KEY$7;
  212. var SELECTOR_DISMISS = '[data-dismiss="alert"]';
  213. /**
  214. * Class definition
  215. */
  216. var Alert = /*#__PURE__*/function () {
  217. function Alert(element) {
  218. this._element = element;
  219. } // Getters
  220. var _proto = Alert.prototype;
  221. // Public
  222. _proto.close = function close(element) {
  223. var rootElement = this._element;
  224. if (element) {
  225. rootElement = this._getRootElement(element);
  226. }
  227. var customEvent = this._triggerCloseEvent(rootElement);
  228. if (customEvent.isDefaultPrevented()) {
  229. return;
  230. }
  231. this._removeElement(rootElement);
  232. };
  233. _proto.dispose = function dispose() {
  234. $__default["default"].removeData(this._element, DATA_KEY$a);
  235. this._element = null;
  236. } // Private
  237. ;
  238. _proto._getRootElement = function _getRootElement(element) {
  239. var selector = Util.getSelectorFromElement(element);
  240. var parent = false;
  241. if (selector) {
  242. parent = document.querySelector(selector);
  243. }
  244. if (!parent) {
  245. parent = $__default["default"](element).closest("." + CLASS_NAME_ALERT)[0];
  246. }
  247. return parent;
  248. };
  249. _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
  250. var closeEvent = $__default["default"].Event(EVENT_CLOSE);
  251. $__default["default"](element).trigger(closeEvent);
  252. return closeEvent;
  253. };
  254. _proto._removeElement = function _removeElement(element) {
  255. var _this = this;
  256. $__default["default"](element).removeClass(CLASS_NAME_SHOW$7);
  257. if (!$__default["default"](element).hasClass(CLASS_NAME_FADE$5)) {
  258. this._destroyElement(element);
  259. return;
  260. }
  261. var transitionDuration = Util.getTransitionDurationFromElement(element);
  262. $__default["default"](element).one(Util.TRANSITION_END, function (event) {
  263. return _this._destroyElement(element, event);
  264. }).emulateTransitionEnd(transitionDuration);
  265. };
  266. _proto._destroyElement = function _destroyElement(element) {
  267. $__default["default"](element).detach().trigger(EVENT_CLOSED).remove();
  268. } // Static
  269. ;
  270. Alert._jQueryInterface = function _jQueryInterface(config) {
  271. return this.each(function () {
  272. var $element = $__default["default"](this);
  273. var data = $element.data(DATA_KEY$a);
  274. if (!data) {
  275. data = new Alert(this);
  276. $element.data(DATA_KEY$a, data);
  277. }
  278. if (config === 'close') {
  279. data[config](this);
  280. }
  281. });
  282. };
  283. Alert._handleDismiss = function _handleDismiss(alertInstance) {
  284. return function (event) {
  285. if (event) {
  286. event.preventDefault();
  287. }
  288. alertInstance.close(this);
  289. };
  290. };
  291. _createClass(Alert, null, [{
  292. key: "VERSION",
  293. get: function get() {
  294. return VERSION$a;
  295. }
  296. }]);
  297. return Alert;
  298. }();
  299. /**
  300. * Data API implementation
  301. */
  302. $__default["default"](document).on(EVENT_CLICK_DATA_API$6, SELECTOR_DISMISS, Alert._handleDismiss(new Alert()));
  303. /**
  304. * jQuery
  305. */
  306. $__default["default"].fn[NAME$a] = Alert._jQueryInterface;
  307. $__default["default"].fn[NAME$a].Constructor = Alert;
  308. $__default["default"].fn[NAME$a].noConflict = function () {
  309. $__default["default"].fn[NAME$a] = JQUERY_NO_CONFLICT$a;
  310. return Alert._jQueryInterface;
  311. };
  312. /**
  313. * Constants
  314. */
  315. var NAME$9 = 'button';
  316. var VERSION$9 = '4.6.1';
  317. var DATA_KEY$9 = 'bs.button';
  318. var EVENT_KEY$9 = "." + DATA_KEY$9;
  319. var DATA_API_KEY$6 = '.data-api';
  320. var JQUERY_NO_CONFLICT$9 = $__default["default"].fn[NAME$9];
  321. var CLASS_NAME_ACTIVE$3 = 'active';
  322. var CLASS_NAME_BUTTON = 'btn';
  323. var CLASS_NAME_FOCUS = 'focus';
  324. var EVENT_CLICK_DATA_API$5 = "click" + EVENT_KEY$9 + DATA_API_KEY$6;
  325. var EVENT_FOCUS_BLUR_DATA_API = "focus" + EVENT_KEY$9 + DATA_API_KEY$6 + " " + ("blur" + EVENT_KEY$9 + DATA_API_KEY$6);
  326. var EVENT_LOAD_DATA_API$2 = "load" + EVENT_KEY$9 + DATA_API_KEY$6;
  327. var SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]';
  328. var SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]';
  329. var SELECTOR_DATA_TOGGLE$4 = '[data-toggle="button"]';
  330. var SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn';
  331. var SELECTOR_INPUT = 'input:not([type="hidden"])';
  332. var SELECTOR_ACTIVE$2 = '.active';
  333. var SELECTOR_BUTTON = '.btn';
  334. /**
  335. * Class definition
  336. */
  337. var Button = /*#__PURE__*/function () {
  338. function Button(element) {
  339. this._element = element;
  340. this.shouldAvoidTriggerChange = false;
  341. } // Getters
  342. var _proto = Button.prototype;
  343. // Public
  344. _proto.toggle = function toggle() {
  345. var triggerChangeEvent = true;
  346. var addAriaPressed = true;
  347. var rootElement = $__default["default"](this._element).closest(SELECTOR_DATA_TOGGLES)[0];
  348. if (rootElement) {
  349. var input = this._element.querySelector(SELECTOR_INPUT);
  350. if (input) {
  351. if (input.type === 'radio') {
  352. if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE$3)) {
  353. triggerChangeEvent = false;
  354. } else {
  355. var activeElement = rootElement.querySelector(SELECTOR_ACTIVE$2);
  356. if (activeElement) {
  357. $__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE$3);
  358. }
  359. }
  360. }
  361. if (triggerChangeEvent) {
  362. // if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
  363. if (input.type === 'checkbox' || input.type === 'radio') {
  364. input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE$3);
  365. }
  366. if (!this.shouldAvoidTriggerChange) {
  367. $__default["default"](input).trigger('change');
  368. }
  369. }
  370. input.focus();
  371. addAriaPressed = false;
  372. }
  373. }
  374. if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {
  375. if (addAriaPressed) {
  376. this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE$3));
  377. }
  378. if (triggerChangeEvent) {
  379. $__default["default"](this._element).toggleClass(CLASS_NAME_ACTIVE$3);
  380. }
  381. }
  382. };
  383. _proto.dispose = function dispose() {
  384. $__default["default"].removeData(this._element, DATA_KEY$9);
  385. this._element = null;
  386. } // Static
  387. ;
  388. Button._jQueryInterface = function _jQueryInterface(config, avoidTriggerChange) {
  389. return this.each(function () {
  390. var $element = $__default["default"](this);
  391. var data = $element.data(DATA_KEY$9);
  392. if (!data) {
  393. data = new Button(this);
  394. $element.data(DATA_KEY$9, data);
  395. }
  396. data.shouldAvoidTriggerChange = avoidTriggerChange;
  397. if (config === 'toggle') {
  398. data[config]();
  399. }
  400. });
  401. };
  402. _createClass(Button, null, [{
  403. key: "VERSION",
  404. get: function get() {
  405. return VERSION$9;
  406. }
  407. }]);
  408. return Button;
  409. }();
  410. /**
  411. * Data API implementation
  412. */
  413. $__default["default"](document).on(EVENT_CLICK_DATA_API$5, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
  414. var button = event.target;
  415. var initialButton = button;
  416. if (!$__default["default"](button).hasClass(CLASS_NAME_BUTTON)) {
  417. button = $__default["default"](button).closest(SELECTOR_BUTTON)[0];
  418. }
  419. if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {
  420. event.preventDefault(); // work around Firefox bug #1540995
  421. } else {
  422. var inputBtn = button.querySelector(SELECTOR_INPUT);
  423. if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {
  424. event.preventDefault(); // work around Firefox bug #1540995
  425. return;
  426. }
  427. if (initialButton.tagName === 'INPUT' || button.tagName !== 'LABEL') {
  428. Button._jQueryInterface.call($__default["default"](button), 'toggle', initialButton.tagName === 'INPUT');
  429. }
  430. }
  431. }).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
  432. var button = $__default["default"](event.target).closest(SELECTOR_BUTTON)[0];
  433. $__default["default"](button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type));
  434. });
  435. $__default["default"](window).on(EVENT_LOAD_DATA_API$2, function () {
  436. // ensure correct active class is set to match the controls' actual values/states
  437. // find all checkboxes/readio buttons inside data-toggle groups
  438. var buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS));
  439. for (var i = 0, len = buttons.length; i < len; i++) {
  440. var button = buttons[i];
  441. var input = button.querySelector(SELECTOR_INPUT);
  442. if (input.checked || input.hasAttribute('checked')) {
  443. button.classList.add(CLASS_NAME_ACTIVE$3);
  444. } else {
  445. button.classList.remove(CLASS_NAME_ACTIVE$3);
  446. }
  447. } // find all button toggles
  448. buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$4));
  449. for (var _i = 0, _len = buttons.length; _i < _len; _i++) {
  450. var _button = buttons[_i];
  451. if (_button.getAttribute('aria-pressed') === 'true') {
  452. _button.classList.add(CLASS_NAME_ACTIVE$3);
  453. } else {
  454. _button.classList.remove(CLASS_NAME_ACTIVE$3);
  455. }
  456. }
  457. });
  458. /**
  459. * jQuery
  460. */
  461. $__default["default"].fn[NAME$9] = Button._jQueryInterface;
  462. $__default["default"].fn[NAME$9].Constructor = Button;
  463. $__default["default"].fn[NAME$9].noConflict = function () {
  464. $__default["default"].fn[NAME$9] = JQUERY_NO_CONFLICT$9;
  465. return Button._jQueryInterface;
  466. };
  467. /**
  468. * Constants
  469. */
  470. var NAME$8 = 'carousel';
  471. var VERSION$8 = '4.6.1';
  472. var DATA_KEY$8 = 'bs.carousel';
  473. var EVENT_KEY$8 = "." + DATA_KEY$8;
  474. var DATA_API_KEY$5 = '.data-api';
  475. var JQUERY_NO_CONFLICT$8 = $__default["default"].fn[NAME$8];
  476. var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
  477. var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
  478. var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
  479. var SWIPE_THRESHOLD = 40;
  480. var CLASS_NAME_CAROUSEL = 'carousel';
  481. var CLASS_NAME_ACTIVE$2 = 'active';
  482. var CLASS_NAME_SLIDE = 'slide';
  483. var CLASS_NAME_RIGHT = 'carousel-item-right';
  484. var CLASS_NAME_LEFT = 'carousel-item-left';
  485. var CLASS_NAME_NEXT = 'carousel-item-next';
  486. var CLASS_NAME_PREV = 'carousel-item-prev';
  487. var CLASS_NAME_POINTER_EVENT = 'pointer-event';
  488. var DIRECTION_NEXT = 'next';
  489. var DIRECTION_PREV = 'prev';
  490. var DIRECTION_LEFT = 'left';
  491. var DIRECTION_RIGHT = 'right';
  492. var EVENT_SLIDE = "slide" + EVENT_KEY$8;
  493. var EVENT_SLID = "slid" + EVENT_KEY$8;
  494. var EVENT_KEYDOWN = "keydown" + EVENT_KEY$8;
  495. var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY$8;
  496. var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY$8;
  497. var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY$8;
  498. var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY$8;
  499. var EVENT_TOUCHEND = "touchend" + EVENT_KEY$8;
  500. var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY$8;
  501. var EVENT_POINTERUP = "pointerup" + EVENT_KEY$8;
  502. var EVENT_DRAG_START = "dragstart" + EVENT_KEY$8;
  503. var EVENT_LOAD_DATA_API$1 = "load" + EVENT_KEY$8 + DATA_API_KEY$5;
  504. var EVENT_CLICK_DATA_API$4 = "click" + EVENT_KEY$8 + DATA_API_KEY$5;
  505. var SELECTOR_ACTIVE$1 = '.active';
  506. var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
  507. var SELECTOR_ITEM = '.carousel-item';
  508. var SELECTOR_ITEM_IMG = '.carousel-item img';
  509. var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
  510. var SELECTOR_INDICATORS = '.carousel-indicators';
  511. var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]';
  512. var SELECTOR_DATA_RIDE = '[data-ride="carousel"]';
  513. var Default$7 = {
  514. interval: 5000,
  515. keyboard: true,
  516. slide: false,
  517. pause: 'hover',
  518. wrap: true,
  519. touch: true
  520. };
  521. var DefaultType$7 = {
  522. interval: '(number|boolean)',
  523. keyboard: 'boolean',
  524. slide: '(boolean|string)',
  525. pause: '(string|boolean)',
  526. wrap: 'boolean',
  527. touch: 'boolean'
  528. };
  529. var PointerType = {
  530. TOUCH: 'touch',
  531. PEN: 'pen'
  532. };
  533. /**
  534. * Class definition
  535. */
  536. var Carousel = /*#__PURE__*/function () {
  537. function Carousel(element, config) {
  538. this._items = null;
  539. this._interval = null;
  540. this._activeElement = null;
  541. this._isPaused = false;
  542. this._isSliding = false;
  543. this.touchTimeout = null;
  544. this.touchStartX = 0;
  545. this.touchDeltaX = 0;
  546. this._config = this._getConfig(config);
  547. this._element = element;
  548. this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS);
  549. this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
  550. this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
  551. this._addEventListeners();
  552. } // Getters
  553. var _proto = Carousel.prototype;
  554. // Public
  555. _proto.next = function next() {
  556. if (!this._isSliding) {
  557. this._slide(DIRECTION_NEXT);
  558. }
  559. };
  560. _proto.nextWhenVisible = function nextWhenVisible() {
  561. var $element = $__default["default"](this._element); // Don't call next when the page isn't visible
  562. // or the carousel or its parent isn't visible
  563. if (!document.hidden && $element.is(':visible') && $element.css('visibility') !== 'hidden') {
  564. this.next();
  565. }
  566. };
  567. _proto.prev = function prev() {
  568. if (!this._isSliding) {
  569. this._slide(DIRECTION_PREV);
  570. }
  571. };
  572. _proto.pause = function pause(event) {
  573. if (!event) {
  574. this._isPaused = true;
  575. }
  576. if (this._element.querySelector(SELECTOR_NEXT_PREV)) {
  577. Util.triggerTransitionEnd(this._element);
  578. this.cycle(true);
  579. }
  580. clearInterval(this._interval);
  581. this._interval = null;
  582. };
  583. _proto.cycle = function cycle(event) {
  584. if (!event) {
  585. this._isPaused = false;
  586. }
  587. if (this._interval) {
  588. clearInterval(this._interval);
  589. this._interval = null;
  590. }
  591. if (this._config.interval && !this._isPaused) {
  592. this._updateInterval();
  593. this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
  594. }
  595. };
  596. _proto.to = function to(index) {
  597. var _this = this;
  598. this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
  599. var activeIndex = this._getItemIndex(this._activeElement);
  600. if (index > this._items.length - 1 || index < 0) {
  601. return;
  602. }
  603. if (this._isSliding) {
  604. $__default["default"](this._element).one(EVENT_SLID, function () {
  605. return _this.to(index);
  606. });
  607. return;
  608. }
  609. if (activeIndex === index) {
  610. this.pause();
  611. this.cycle();
  612. return;
  613. }
  614. var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV;
  615. this._slide(direction, this._items[index]);
  616. };
  617. _proto.dispose = function dispose() {
  618. $__default["default"](this._element).off(EVENT_KEY$8);
  619. $__default["default"].removeData(this._element, DATA_KEY$8);
  620. this._items = null;
  621. this._config = null;
  622. this._element = null;
  623. this._interval = null;
  624. this._isPaused = null;
  625. this._isSliding = null;
  626. this._activeElement = null;
  627. this._indicatorsElement = null;
  628. } // Private
  629. ;
  630. _proto._getConfig = function _getConfig(config) {
  631. config = _extends({}, Default$7, config);
  632. Util.typeCheckConfig(NAME$8, config, DefaultType$7);
  633. return config;
  634. };
  635. _proto._handleSwipe = function _handleSwipe() {
  636. var absDeltax = Math.abs(this.touchDeltaX);
  637. if (absDeltax <= SWIPE_THRESHOLD) {
  638. return;
  639. }
  640. var direction = absDeltax / this.touchDeltaX;
  641. this.touchDeltaX = 0; // swipe left
  642. if (direction > 0) {
  643. this.prev();
  644. } // swipe right
  645. if (direction < 0) {
  646. this.next();
  647. }
  648. };
  649. _proto._addEventListeners = function _addEventListeners() {
  650. var _this2 = this;
  651. if (this._config.keyboard) {
  652. $__default["default"](this._element).on(EVENT_KEYDOWN, function (event) {
  653. return _this2._keydown(event);
  654. });
  655. }
  656. if (this._config.pause === 'hover') {
  657. $__default["default"](this._element).on(EVENT_MOUSEENTER, function (event) {
  658. return _this2.pause(event);
  659. }).on(EVENT_MOUSELEAVE, function (event) {
  660. return _this2.cycle(event);
  661. });
  662. }
  663. if (this._config.touch) {
  664. this._addTouchEventListeners();
  665. }
  666. };
  667. _proto._addTouchEventListeners = function _addTouchEventListeners() {
  668. var _this3 = this;
  669. if (!this._touchSupported) {
  670. return;
  671. }
  672. var start = function start(event) {
  673. if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
  674. _this3.touchStartX = event.originalEvent.clientX;
  675. } else if (!_this3._pointerEvent) {
  676. _this3.touchStartX = event.originalEvent.touches[0].clientX;
  677. }
  678. };
  679. var move = function move(event) {
  680. // ensure swiping with one touch and not pinching
  681. _this3.touchDeltaX = event.originalEvent.touches && event.originalEvent.touches.length > 1 ? 0 : event.originalEvent.touches[0].clientX - _this3.touchStartX;
  682. };
  683. var end = function end(event) {
  684. if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
  685. _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
  686. }
  687. _this3._handleSwipe();
  688. if (_this3._config.pause === 'hover') {
  689. // If it's a touch-enabled device, mouseenter/leave are fired as
  690. // part of the mouse compatibility events on first tap - the carousel
  691. // would stop cycling until user tapped out of it;
  692. // here, we listen for touchend, explicitly pause the carousel
  693. // (as if it's the second time we tap on it, mouseenter compat event
  694. // is NOT fired) and after a timeout (to allow for mouse compatibility
  695. // events to fire) we explicitly restart cycling
  696. _this3.pause();
  697. if (_this3.touchTimeout) {
  698. clearTimeout(_this3.touchTimeout);
  699. }
  700. _this3.touchTimeout = setTimeout(function (event) {
  701. return _this3.cycle(event);
  702. }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval);
  703. }
  704. };
  705. $__default["default"](this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START, function (e) {
  706. return e.preventDefault();
  707. });
  708. if (this._pointerEvent) {
  709. $__default["default"](this._element).on(EVENT_POINTERDOWN, function (event) {
  710. return start(event);
  711. });
  712. $__default["default"](this._element).on(EVENT_POINTERUP, function (event) {
  713. return end(event);
  714. });
  715. this._element.classList.add(CLASS_NAME_POINTER_EVENT);
  716. } else {
  717. $__default["default"](this._element).on(EVENT_TOUCHSTART, function (event) {
  718. return start(event);
  719. });
  720. $__default["default"](this._element).on(EVENT_TOUCHMOVE, function (event) {
  721. return move(event);
  722. });
  723. $__default["default"](this._element).on(EVENT_TOUCHEND, function (event) {
  724. return end(event);
  725. });
  726. }
  727. };
  728. _proto._keydown = function _keydown(event) {
  729. if (/input|textarea/i.test(event.target.tagName)) {
  730. return;
  731. }
  732. switch (event.which) {
  733. case ARROW_LEFT_KEYCODE:
  734. event.preventDefault();
  735. this.prev();
  736. break;
  737. case ARROW_RIGHT_KEYCODE:
  738. event.preventDefault();
  739. this.next();
  740. break;
  741. }
  742. };
  743. _proto._getItemIndex = function _getItemIndex(element) {
  744. this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) : [];
  745. return this._items.indexOf(element);
  746. };
  747. _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
  748. var isNextDirection = direction === DIRECTION_NEXT;
  749. var isPrevDirection = direction === DIRECTION_PREV;
  750. var activeIndex = this._getItemIndex(activeElement);
  751. var lastItemIndex = this._items.length - 1;
  752. var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
  753. if (isGoingToWrap && !this._config.wrap) {
  754. return activeElement;
  755. }
  756. var delta = direction === DIRECTION_PREV ? -1 : 1;
  757. var itemIndex = (activeIndex + delta) % this._items.length;
  758. return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
  759. };
  760. _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
  761. var targetIndex = this._getItemIndex(relatedTarget);
  762. var fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM));
  763. var slideEvent = $__default["default"].Event(EVENT_SLIDE, {
  764. relatedTarget: relatedTarget,
  765. direction: eventDirectionName,
  766. from: fromIndex,
  767. to: targetIndex
  768. });
  769. $__default["default"](this._element).trigger(slideEvent);
  770. return slideEvent;
  771. };
  772. _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
  773. if (this._indicatorsElement) {
  774. var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE$1));
  775. $__default["default"](indicators).removeClass(CLASS_NAME_ACTIVE$2);
  776. var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
  777. if (nextIndicator) {
  778. $__default["default"](nextIndicator).addClass(CLASS_NAME_ACTIVE$2);
  779. }
  780. }
  781. };
  782. _proto._updateInterval = function _updateInterval() {
  783. var element = this._activeElement || this._element.querySelector(SELECTOR_ACTIVE_ITEM);
  784. if (!element) {
  785. return;
  786. }
  787. var elementInterval = parseInt(element.getAttribute('data-interval'), 10);
  788. if (elementInterval) {
  789. this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
  790. this._config.interval = elementInterval;
  791. } else {
  792. this._config.interval = this._config.defaultInterval || this._config.interval;
  793. }
  794. };
  795. _proto._slide = function _slide(direction, element) {
  796. var _this4 = this;
  797. var activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
  798. var activeElementIndex = this._getItemIndex(activeElement);
  799. var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
  800. var nextElementIndex = this._getItemIndex(nextElement);
  801. var isCycling = Boolean(this._interval);
  802. var directionalClassName;
  803. var orderClassName;
  804. var eventDirectionName;
  805. if (direction === DIRECTION_NEXT) {
  806. directionalClassName = CLASS_NAME_LEFT;
  807. orderClassName = CLASS_NAME_NEXT;
  808. eventDirectionName = DIRECTION_LEFT;
  809. } else {
  810. directionalClassName = CLASS_NAME_RIGHT;
  811. orderClassName = CLASS_NAME_PREV;
  812. eventDirectionName = DIRECTION_RIGHT;
  813. }
  814. if (nextElement && $__default["default"](nextElement).hasClass(CLASS_NAME_ACTIVE$2)) {
  815. this._isSliding = false;
  816. return;
  817. }
  818. var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
  819. if (slideEvent.isDefaultPrevented()) {
  820. return;
  821. }
  822. if (!activeElement || !nextElement) {
  823. // Some weirdness is happening, so we bail
  824. return;
  825. }
  826. this._isSliding = true;
  827. if (isCycling) {
  828. this.pause();
  829. }
  830. this._setActiveIndicatorElement(nextElement);
  831. this._activeElement = nextElement;
  832. var slidEvent = $__default["default"].Event(EVENT_SLID, {
  833. relatedTarget: nextElement,
  834. direction: eventDirectionName,
  835. from: activeElementIndex,
  836. to: nextElementIndex
  837. });
  838. if ($__default["default"](this._element).hasClass(CLASS_NAME_SLIDE)) {
  839. $__default["default"](nextElement).addClass(orderClassName);
  840. Util.reflow(nextElement);
  841. $__default["default"](activeElement).addClass(directionalClassName);
  842. $__default["default"](nextElement).addClass(directionalClassName);
  843. var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
  844. $__default["default"](activeElement).one(Util.TRANSITION_END, function () {
  845. $__default["default"](nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE$2);
  846. $__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE$2 + " " + orderClassName + " " + directionalClassName);
  847. _this4._isSliding = false;
  848. setTimeout(function () {
  849. return $__default["default"](_this4._element).trigger(slidEvent);
  850. }, 0);
  851. }).emulateTransitionEnd(transitionDuration);
  852. } else {
  853. $__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE$2);
  854. $__default["default"](nextElement).addClass(CLASS_NAME_ACTIVE$2);
  855. this._isSliding = false;
  856. $__default["default"](this._element).trigger(slidEvent);
  857. }
  858. if (isCycling) {
  859. this.cycle();
  860. }
  861. } // Static
  862. ;
  863. Carousel._jQueryInterface = function _jQueryInterface(config) {
  864. return this.each(function () {
  865. var data = $__default["default"](this).data(DATA_KEY$8);
  866. var _config = _extends({}, Default$7, $__default["default"](this).data());
  867. if (typeof config === 'object') {
  868. _config = _extends({}, _config, config);
  869. }
  870. var action = typeof config === 'string' ? config : _config.slide;
  871. if (!data) {
  872. data = new Carousel(this, _config);
  873. $__default["default"](this).data(DATA_KEY$8, data);
  874. }
  875. if (typeof config === 'number') {
  876. data.to(config);
  877. } else if (typeof action === 'string') {
  878. if (typeof data[action] === 'undefined') {
  879. throw new TypeError("No method named \"" + action + "\"");
  880. }
  881. data[action]();
  882. } else if (_config.interval && _config.ride) {
  883. data.pause();
  884. data.cycle();
  885. }
  886. });
  887. };
  888. Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
  889. var selector = Util.getSelectorFromElement(this);
  890. if (!selector) {
  891. return;
  892. }
  893. var target = $__default["default"](selector)[0];
  894. if (!target || !$__default["default"](target).hasClass(CLASS_NAME_CAROUSEL)) {
  895. return;
  896. }
  897. var config = _extends({}, $__default["default"](target).data(), $__default["default"](this).data());
  898. var slideIndex = this.getAttribute('data-slide-to');
  899. if (slideIndex) {
  900. config.interval = false;
  901. }
  902. Carousel._jQueryInterface.call($__default["default"](target), config);
  903. if (slideIndex) {
  904. $__default["default"](target).data(DATA_KEY$8).to(slideIndex);
  905. }
  906. event.preventDefault();
  907. };
  908. _createClass(Carousel, null, [{
  909. key: "VERSION",
  910. get: function get() {
  911. return VERSION$8;
  912. }
  913. }, {
  914. key: "Default",
  915. get: function get() {
  916. return Default$7;
  917. }
  918. }]);
  919. return Carousel;
  920. }();
  921. /**
  922. * Data API implementation
  923. */
  924. $__default["default"](document).on(EVENT_CLICK_DATA_API$4, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler);
  925. $__default["default"](window).on(EVENT_LOAD_DATA_API$1, function () {
  926. var carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE));
  927. for (var i = 0, len = carousels.length; i < len; i++) {
  928. var $carousel = $__default["default"](carousels[i]);
  929. Carousel._jQueryInterface.call($carousel, $carousel.data());
  930. }
  931. });
  932. /**
  933. * jQuery
  934. */
  935. $__default["default"].fn[NAME$8] = Carousel._jQueryInterface;
  936. $__default["default"].fn[NAME$8].Constructor = Carousel;
  937. $__default["default"].fn[NAME$8].noConflict = function () {
  938. $__default["default"].fn[NAME$8] = JQUERY_NO_CONFLICT$8;
  939. return Carousel._jQueryInterface;
  940. };
  941. /**
  942. * Constants
  943. */
  944. var NAME$7 = 'collapse';
  945. var VERSION$7 = '4.6.1';
  946. var DATA_KEY$7 = 'bs.collapse';
  947. var EVENT_KEY$7 = "." + DATA_KEY$7;
  948. var DATA_API_KEY$4 = '.data-api';
  949. var JQUERY_NO_CONFLICT$7 = $__default["default"].fn[NAME$7];
  950. var CLASS_NAME_SHOW$6 = 'show';
  951. var CLASS_NAME_COLLAPSE = 'collapse';
  952. var CLASS_NAME_COLLAPSING = 'collapsing';
  953. var CLASS_NAME_COLLAPSED = 'collapsed';
  954. var DIMENSION_WIDTH = 'width';
  955. var DIMENSION_HEIGHT = 'height';
  956. var EVENT_SHOW$4 = "show" + EVENT_KEY$7;
  957. var EVENT_SHOWN$4 = "shown" + EVENT_KEY$7;
  958. var EVENT_HIDE$4 = "hide" + EVENT_KEY$7;
  959. var EVENT_HIDDEN$4 = "hidden" + EVENT_KEY$7;
  960. var EVENT_CLICK_DATA_API$3 = "click" + EVENT_KEY$7 + DATA_API_KEY$4;
  961. var SELECTOR_ACTIVES = '.show, .collapsing';
  962. var SELECTOR_DATA_TOGGLE$3 = '[data-toggle="collapse"]';
  963. var Default$6 = {
  964. toggle: true,
  965. parent: ''
  966. };
  967. var DefaultType$6 = {
  968. toggle: 'boolean',
  969. parent: '(string|element)'
  970. };
  971. /**
  972. * Class definition
  973. */
  974. var Collapse = /*#__PURE__*/function () {
  975. function Collapse(element, config) {
  976. this._isTransitioning = false;
  977. this._element = element;
  978. this._config = this._getConfig(config);
  979. this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
  980. var toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$3));
  981. for (var i = 0, len = toggleList.length; i < len; i++) {
  982. var elem = toggleList[i];
  983. var selector = Util.getSelectorFromElement(elem);
  984. var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
  985. return foundElem === element;
  986. });
  987. if (selector !== null && filterElement.length > 0) {
  988. this._selector = selector;
  989. this._triggerArray.push(elem);
  990. }
  991. }
  992. this._parent = this._config.parent ? this._getParent() : null;
  993. if (!this._config.parent) {
  994. this._addAriaAndCollapsedClass(this._element, this._triggerArray);
  995. }
  996. if (this._config.toggle) {
  997. this.toggle();
  998. }
  999. } // Getters
  1000. var _proto = Collapse.prototype;
  1001. // Public
  1002. _proto.toggle = function toggle() {
  1003. if ($__default["default"](this._element).hasClass(CLASS_NAME_SHOW$6)) {
  1004. this.hide();
  1005. } else {
  1006. this.show();
  1007. }
  1008. };
  1009. _proto.show = function show() {
  1010. var _this = this;
  1011. if (this._isTransitioning || $__default["default"](this._element).hasClass(CLASS_NAME_SHOW$6)) {
  1012. return;
  1013. }
  1014. var actives;
  1015. var activesData;
  1016. if (this._parent) {
  1017. actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES)).filter(function (elem) {
  1018. if (typeof _this._config.parent === 'string') {
  1019. return elem.getAttribute('data-parent') === _this._config.parent;
  1020. }
  1021. return elem.classList.contains(CLASS_NAME_COLLAPSE);
  1022. });
  1023. if (actives.length === 0) {
  1024. actives = null;
  1025. }
  1026. }
  1027. if (actives) {
  1028. activesData = $__default["default"](actives).not(this._selector).data(DATA_KEY$7);
  1029. if (activesData && activesData._isTransitioning) {
  1030. return;
  1031. }
  1032. }
  1033. var startEvent = $__default["default"].Event(EVENT_SHOW$4);
  1034. $__default["default"](this._element).trigger(startEvent);
  1035. if (startEvent.isDefaultPrevented()) {
  1036. return;
  1037. }
  1038. if (actives) {
  1039. Collapse._jQueryInterface.call($__default["default"](actives).not(this._selector), 'hide');
  1040. if (!activesData) {
  1041. $__default["default"](actives).data(DATA_KEY$7, null);
  1042. }
  1043. }
  1044. var dimension = this._getDimension();
  1045. $__default["default"](this._element).removeClass(CLASS_NAME_COLLAPSE).addClass(CLASS_NAME_COLLAPSING);
  1046. this._element.style[dimension] = 0;
  1047. if (this._triggerArray.length) {
  1048. $__default["default"](this._triggerArray).removeClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', true);
  1049. }
  1050. this.setTransitioning(true);
  1051. var complete = function complete() {
  1052. $__default["default"](_this._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW$6);
  1053. _this._element.style[dimension] = '';
  1054. _this.setTransitioning(false);
  1055. $__default["default"](_this._element).trigger(EVENT_SHOWN$4);
  1056. };
  1057. var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
  1058. var scrollSize = "scroll" + capitalizedDimension;
  1059. var transitionDuration = Util.getTransitionDurationFromElement(this._element);
  1060. $__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
  1061. this._element.style[dimension] = this._element[scrollSize] + "px";
  1062. };
  1063. _proto.hide = function hide() {
  1064. var _this2 = this;
  1065. if (this._isTransitioning || !$__default["default"](this._element).hasClass(CLASS_NAME_SHOW$6)) {
  1066. return;
  1067. }
  1068. var startEvent = $__default["default"].Event(EVENT_HIDE$4);
  1069. $__default["default"](this._element).trigger(startEvent);
  1070. if (startEvent.isDefaultPrevented()) {
  1071. return;
  1072. }
  1073. var dimension = this._getDimension();
  1074. this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
  1075. Util.reflow(this._element);
  1076. $__default["default"](this._element).addClass(CLASS_NAME_COLLAPSING).removeClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW$6);
  1077. var triggerArrayLength = this._triggerArray.length;
  1078. if (triggerArrayLength > 0) {
  1079. for (var i = 0; i < triggerArrayLength; i++) {
  1080. var trigger = this._triggerArray[i];
  1081. var selector = Util.getSelectorFromElement(trigger);
  1082. if (selector !== null) {
  1083. var $elem = $__default["default"]([].slice.call(document.querySelectorAll(selector)));
  1084. if (!$elem.hasClass(CLASS_NAME_SHOW$6)) {
  1085. $__default["default"](trigger).addClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', false);
  1086. }
  1087. }
  1088. }
  1089. }
  1090. this.setTransitioning(true);
  1091. var complete = function complete() {
  1092. _this2.setTransitioning(false);
  1093. $__default["default"](_this2._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE).trigger(EVENT_HIDDEN$4);
  1094. };
  1095. this._element.style[dimension] = '';
  1096. var transitionDuration = Util.getTransitionDurationFromElement(this._element);
  1097. $__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
  1098. };
  1099. _proto.setTransitioning = function setTransitioning(isTransitioning) {
  1100. this._isTransitioning = isTransitioning;
  1101. };
  1102. _proto.dispose = function dispose() {
  1103. $__default["default"].removeData(this._element, DATA_KEY$7);
  1104. this._config = null;
  1105. this._parent = null;
  1106. this._element = null;
  1107. this._triggerArray = null;
  1108. this._isTransitioning = null;
  1109. } // Private
  1110. ;
  1111. _proto._getConfig = function _getConfig(config) {
  1112. config = _extends({}, Default$6, config);
  1113. config.toggle = Boolean(config.toggle); // Coerce string values
  1114. Util.typeCheckConfig(NAME$7, config, DefaultType$6);
  1115. return config;
  1116. };
  1117. _proto._getDimension = function _getDimension() {
  1118. var hasWidth = $__default["default"](this._element).hasClass(DIMENSION_WIDTH);
  1119. return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT;
  1120. };
  1121. _proto._getParent = function _getParent() {
  1122. var _this3 = this;
  1123. var parent;
  1124. if (Util.isElement(this._config.parent)) {
  1125. parent = this._config.parent; // It's a jQuery object
  1126. if (typeof this._config.parent.jquery !== 'undefined') {
  1127. parent = this._config.parent[0];
  1128. }
  1129. } else {
  1130. parent = document.querySelector(this._config.parent);
  1131. }
  1132. var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
  1133. var children = [].slice.call(parent.querySelectorAll(selector));
  1134. $__default["default"](children).each(function (i, element) {
  1135. _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
  1136. });
  1137. return parent;
  1138. };
  1139. _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
  1140. var isOpen = $__default["default"](element).hasClass(CLASS_NAME_SHOW$6);
  1141. if (triggerArray.length) {
  1142. $__default["default"](triggerArray).toggleClass(CLASS_NAME_COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
  1143. }
  1144. } // Static
  1145. ;
  1146. Collapse._getTargetFromElement = function _getTargetFromElement(element) {
  1147. var selector = Util.getSelectorFromElement(element);
  1148. return selector ? document.querySelector(selector) : null;
  1149. };
  1150. Collapse._jQueryInterface = function _jQueryInterface(config) {
  1151. return this.each(function () {
  1152. var $element = $__default["default"](this);
  1153. var data = $element.data(DATA_KEY$7);
  1154. var _config = _extends({}, Default$6, $element.data(), typeof config === 'object' && config ? config : {});
  1155. if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
  1156. _config.toggle = false;
  1157. }
  1158. if (!data) {
  1159. data = new Collapse(this, _config);
  1160. $element.data(DATA_KEY$7, data);
  1161. }
  1162. if (typeof config === 'string') {
  1163. if (typeof data[config] === 'undefined') {
  1164. throw new TypeError("No method named \"" + config + "\"");
  1165. }
  1166. data[config]();
  1167. }
  1168. });
  1169. };
  1170. _createClass(Collapse, null, [{
  1171. key: "VERSION",
  1172. get: function get() {
  1173. return VERSION$7;
  1174. }
  1175. }, {
  1176. key: "Default",
  1177. get: function get() {
  1178. return Default$6;
  1179. }
  1180. }]);
  1181. return Collapse;
  1182. }();
  1183. /**
  1184. * Data API implementation
  1185. */
  1186. $__default["default"](document).on(EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {
  1187. // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
  1188. if (event.currentTarget.tagName === 'A') {
  1189. event.preventDefault();
  1190. }
  1191. var $trigger = $__default["default"](this);
  1192. var selector = Util.getSelectorFromElement(this);
  1193. var selectors = [].slice.call(document.querySelectorAll(selector));
  1194. $__default["default"](selectors).each(function () {
  1195. var $target = $__default["default"](this);
  1196. var data = $target.data(DATA_KEY$7);
  1197. var config = data ? 'toggle' : $trigger.data();
  1198. Collapse._jQueryInterface.call($target, config);
  1199. });
  1200. });
  1201. /**
  1202. * jQuery
  1203. */
  1204. $__default["default"].fn[NAME$7] = Collapse._jQueryInterface;
  1205. $__default["default"].fn[NAME$7].Constructor = Collapse;
  1206. $__default["default"].fn[NAME$7].noConflict = function () {
  1207. $__default["default"].fn[NAME$7] = JQUERY_NO_CONFLICT$7;
  1208. return Collapse._jQueryInterface;
  1209. };
  1210. /**
  1211. * Constants
  1212. */
  1213. var NAME$6 = 'dropdown';
  1214. var VERSION$6 = '4.6.1';
  1215. var DATA_KEY$6 = 'bs.dropdown';
  1216. var EVENT_KEY$6 = "." + DATA_KEY$6;
  1217. var DATA_API_KEY$3 = '.data-api';
  1218. var JQUERY_NO_CONFLICT$6 = $__default["default"].fn[NAME$6];
  1219. var ESCAPE_KEYCODE$1 = 27; // KeyboardEvent.which value for Escape (Esc) key
  1220. var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
  1221. var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key
  1222. var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
  1223. var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
  1224. var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
  1225. var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE$1);
  1226. var CLASS_NAME_DISABLED$1 = 'disabled';
  1227. var CLASS_NAME_SHOW$5 = 'show';
  1228. var CLASS_NAME_DROPUP = 'dropup';
  1229. var CLASS_NAME_DROPRIGHT = 'dropright';
  1230. var CLASS_NAME_DROPLEFT = 'dropleft';
  1231. var CLASS_NAME_MENURIGHT = 'dropdown-menu-right';
  1232. var CLASS_NAME_POSITION_STATIC = 'position-static';
  1233. var EVENT_HIDE$3 = "hide" + EVENT_KEY$6;
  1234. var EVENT_HIDDEN$3 = "hidden" + EVENT_KEY$6;
  1235. var EVENT_SHOW$3 = "show" + EVENT_KEY$6;
  1236. var EVENT_SHOWN$3 = "shown" + EVENT_KEY$6;
  1237. var EVENT_CLICK = "click" + EVENT_KEY$6;
  1238. var EVENT_CLICK_DATA_API$2 = "click" + EVENT_KEY$6 + DATA_API_KEY$3;
  1239. var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY$6 + DATA_API_KEY$3;
  1240. var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY$6 + DATA_API_KEY$3;
  1241. var SELECTOR_DATA_TOGGLE$2 = '[data-toggle="dropdown"]';
  1242. var SELECTOR_FORM_CHILD = '.dropdown form';
  1243. var SELECTOR_MENU = '.dropdown-menu';
  1244. var SELECTOR_NAVBAR_NAV = '.navbar-nav';
  1245. var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
  1246. var PLACEMENT_TOP = 'top-start';
  1247. var PLACEMENT_TOPEND = 'top-end';
  1248. var PLACEMENT_BOTTOM = 'bottom-start';
  1249. var PLACEMENT_BOTTOMEND = 'bottom-end';
  1250. var PLACEMENT_RIGHT = 'right-start';
  1251. var PLACEMENT_LEFT = 'left-start';
  1252. var Default$5 = {
  1253. offset: 0,
  1254. flip: true,
  1255. boundary: 'scrollParent',
  1256. reference: 'toggle',
  1257. display: 'dynamic',
  1258. popperConfig: null
  1259. };
  1260. var DefaultType$5 = {
  1261. offset: '(number|string|function)',
  1262. flip: 'boolean',
  1263. boundary: '(string|element)',
  1264. reference: '(string|element)',
  1265. display: 'string',
  1266. popperConfig: '(null|object)'
  1267. };
  1268. /**
  1269. * Class definition
  1270. */
  1271. var Dropdown = /*#__PURE__*/function () {
  1272. function Dropdown(element, config) {
  1273. this._element = element;
  1274. this._popper = null;
  1275. this._config = this._getConfig(config);
  1276. this._menu = this._getMenuElement();
  1277. this._inNavbar = this._detectNavbar();
  1278. this._addEventListeners();
  1279. } // Getters
  1280. var _proto = Dropdown.prototype;
  1281. // Public
  1282. _proto.toggle = function toggle() {
  1283. if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED$1)) {
  1284. return;
  1285. }
  1286. var isActive = $__default["default"](this._menu).hasClass(CLASS_NAME_SHOW$5);
  1287. Dropdown._clearMenus();
  1288. if (isActive) {
  1289. return;
  1290. }
  1291. this.show(true);
  1292. };
  1293. _proto.show = function show(usePopper) {
  1294. if (usePopper === void 0) {
  1295. usePopper = false;
  1296. }
  1297. if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED$1) || $__default["default"](this._menu).hasClass(CLASS_NAME_SHOW$5)) {
  1298. return;
  1299. }
  1300. var relatedTarget = {
  1301. relatedTarget: this._element
  1302. };
  1303. var showEvent = $__default["default"].Event(EVENT_SHOW$3, relatedTarget);
  1304. var parent = Dropdown._getParentFromElement(this._element);
  1305. $__default["default"](parent).trigger(showEvent);
  1306. if (showEvent.isDefaultPrevented()) {
  1307. return;
  1308. } // Totally disable Popper for Dropdowns in Navbar
  1309. if (!this._inNavbar && usePopper) {
  1310. // Check for Popper dependency
  1311. if (typeof Popper__default["default"] === 'undefined') {
  1312. throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
  1313. }
  1314. var referenceElement = this._element;
  1315. if (this._config.reference === 'parent') {
  1316. referenceElement = parent;
  1317. } else if (Util.isElement(this._config.reference)) {
  1318. referenceElement = this._config.reference; // Check if it's jQuery element
  1319. if (typeof this._config.reference.jquery !== 'undefined') {
  1320. referenceElement = this._config.reference[0];
  1321. }
  1322. } // If boundary is not `scrollParent`, then set position to `static`
  1323. // to allow the menu to "escape" the scroll parent's boundaries
  1324. // https://github.com/twbs/bootstrap/issues/24251
  1325. if (this._config.boundary !== 'scrollParent') {
  1326. $__default["default"](parent).addClass(CLASS_NAME_POSITION_STATIC);
  1327. }
  1328. this._popper = new Popper__default["default"](referenceElement, this._menu, this._getPopperConfig());
  1329. } // If this is a touch-enabled device we add extra
  1330. // empty mouseover listeners to the body's immediate children;
  1331. // only needed because of broken event delegation on iOS
  1332. // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
  1333. if ('ontouchstart' in document.documentElement && $__default["default"](parent).closest(SELECTOR_NAVBAR_NAV).length === 0) {
  1334. $__default["default"](document.body).children().on('mouseover', null, $__default["default"].noop);
  1335. }
  1336. this._element.focus();
  1337. this._element.setAttribute('aria-expanded', true);
  1338. $__default["default"](this._menu).toggleClass(CLASS_NAME_SHOW$5);
  1339. $__default["default"](parent).toggleClass(CLASS_NAME_SHOW$5).trigger($__default["default"].Event(EVENT_SHOWN$3, relatedTarget));
  1340. };
  1341. _proto.hide = function hide() {
  1342. if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED$1) || !$__default["default"](this._menu).hasClass(CLASS_NAME_SHOW$5)) {
  1343. return;
  1344. }
  1345. var relatedTarget = {
  1346. relatedTarget: this._element
  1347. };
  1348. var hideEvent = $__default["default"].Event(EVENT_HIDE$3, relatedTarget);
  1349. var parent = Dropdown._getParentFromElement(this._element);
  1350. $__default["default"](parent).trigger(hideEvent);
  1351. if (hideEvent.isDefaultPrevented()) {
  1352. return;
  1353. }
  1354. if (this._popper) {
  1355. this._popper.destroy();
  1356. }
  1357. $__default["default"](this._menu).toggleClass(CLASS_NAME_SHOW$5);
  1358. $__default["default"](parent).toggleClass(CLASS_NAME_SHOW$5).trigger($__default["default"].Event(EVENT_HIDDEN$3, relatedTarget));
  1359. };
  1360. _proto.dispose = function dispose() {
  1361. $__default["default"].removeData(this._element, DATA_KEY$6);
  1362. $__default["default"](this._element).off(EVENT_KEY$6);
  1363. this._element = null;
  1364. this._menu = null;
  1365. if (this._popper !== null) {
  1366. this._popper.destroy();
  1367. this._popper = null;
  1368. }
  1369. };
  1370. _proto.update = function update() {
  1371. this._inNavbar = this._detectNavbar();
  1372. if (this._popper !== null) {
  1373. this._popper.scheduleUpdate();
  1374. }
  1375. } // Private
  1376. ;
  1377. _proto._addEventListeners = function _addEventListeners() {
  1378. var _this = this;
  1379. $__default["default"](this._element).on(EVENT_CLICK, function (event) {
  1380. event.preventDefault();
  1381. event.stopPropagation();
  1382. _this.toggle();
  1383. });
  1384. };
  1385. _proto._getConfig = function _getConfig(config) {
  1386. config = _extends({}, this.constructor.Default, $__default["default"](this._element).data(), config);
  1387. Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
  1388. return config;
  1389. };
  1390. _proto._getMenuElement = function _getMenuElement() {
  1391. if (!this._menu) {
  1392. var parent = Dropdown._getParentFromElement(this._element);
  1393. if (parent) {
  1394. this._menu = parent.querySelector(SELECTOR_MENU);
  1395. }
  1396. }
  1397. return this._menu;
  1398. };
  1399. _proto._getPlacement = function _getPlacement() {
  1400. var $parentDropdown = $__default["default"](this._element.parentNode);
  1401. var placement = PLACEMENT_BOTTOM; // Handle dropup
  1402. if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {
  1403. placement = $__default["default"](this._menu).hasClass(CLASS_NAME_MENURIGHT) ? PLACEMENT_TOPEND : PLACEMENT_TOP;
  1404. } else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) {
  1405. placement = PLACEMENT_RIGHT;
  1406. } else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {
  1407. placement = PLACEMENT_LEFT;
  1408. } else if ($__default["default"](this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
  1409. placement = PLACEMENT_BOTTOMEND;
  1410. }
  1411. return placement;
  1412. };
  1413. _proto._detectNavbar = function _detectNavbar() {
  1414. return $__default["default"](this._element).closest('.navbar').length > 0;
  1415. };
  1416. _proto._getOffset = function _getOffset() {
  1417. var _this2 = this;
  1418. var offset = {};
  1419. if (typeof this._config.offset === 'function') {
  1420. offset.fn = function (data) {
  1421. data.offsets = _extends({}, data.offsets, _this2._config.offset(data.offsets, _this2._element));
  1422. return data;
  1423. };
  1424. } else {
  1425. offset.offset = this._config.offset;
  1426. }
  1427. return offset;
  1428. };
  1429. _proto._getPopperConfig = function _getPopperConfig() {
  1430. var popperConfig = {
  1431. placement: this._getPlacement(),
  1432. modifiers: {
  1433. offset: this._getOffset(),
  1434. flip: {
  1435. enabled: this._config.flip
  1436. },
  1437. preventOverflow: {
  1438. boundariesElement: this._config.boundary
  1439. }
  1440. }
  1441. }; // Disable Popper if we have a static display
  1442. if (this._config.display === 'static') {
  1443. popperConfig.modifiers.applyStyle = {
  1444. enabled: false
  1445. };
  1446. }
  1447. return _extends({}, popperConfig, this._config.popperConfig);
  1448. } // Static
  1449. ;
  1450. Dropdown._jQueryInterface = function _jQueryInterface(config) {
  1451. return this.each(function () {
  1452. var data = $__default["default"](this).data(DATA_KEY$6);
  1453. var _config = typeof config === 'object' ? config : null;
  1454. if (!data) {
  1455. data = new Dropdown(this, _config);
  1456. $__default["default"](this).data(DATA_KEY$6, data);
  1457. }
  1458. if (typeof config === 'string') {
  1459. if (typeof data[config] === 'undefined') {
  1460. throw new TypeError("No method named \"" + config + "\"");
  1461. }
  1462. data[config]();
  1463. }
  1464. });
  1465. };
  1466. Dropdown._clearMenus = function _clearMenus(event) {
  1467. if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
  1468. return;
  1469. }
  1470. var toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$2));
  1471. for (var i = 0, len = toggles.length; i < len; i++) {
  1472. var parent = Dropdown._getParentFromElement(toggles[i]);
  1473. var context = $__default["default"](toggles[i]).data(DATA_KEY$6);
  1474. var relatedTarget = {
  1475. relatedTarget: toggles[i]
  1476. };
  1477. if (event && event.type === 'click') {
  1478. relatedTarget.clickEvent = event;
  1479. }
  1480. if (!context) {
  1481. continue;
  1482. }
  1483. var dropdownMenu = context._menu;
  1484. if (!$__default["default"](parent).hasClass(CLASS_NAME_SHOW$5)) {
  1485. continue;
  1486. }
  1487. if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $__default["default"].contains(parent, event.target)) {
  1488. continue;
  1489. }
  1490. var hideEvent = $__default["default"].Event(EVENT_HIDE$3, relatedTarget);
  1491. $__default["default"](parent).trigger(hideEvent);
  1492. if (hideEvent.isDefaultPrevented()) {
  1493. continue;
  1494. } // If this is a touch-enabled device we remove the extra
  1495. // empty mouseover listeners we added for iOS support
  1496. if ('ontouchstart' in document.documentElement) {
  1497. $__default["default"](document.body).children().off('mouseover', null, $__default["default"].noop);
  1498. }
  1499. toggles[i].setAttribute('aria-expanded', 'false');
  1500. if (context._popper) {
  1501. context._popper.destroy();
  1502. }
  1503. $__default["default"](dropdownMenu).removeClass(CLASS_NAME_SHOW$5);
  1504. $__default["default"](parent).removeClass(CLASS_NAME_SHOW$5).trigger($__default["default"].Event(EVENT_HIDDEN$3, relatedTarget));
  1505. }
  1506. };
  1507. Dropdown._getParentFromElement = function _getParentFromElement(element) {
  1508. var parent;
  1509. var selector = Util.getSelectorFromElement(element);
  1510. if (selector) {
  1511. parent = document.querySelector(selector);
  1512. }
  1513. return parent || element.parentNode;
  1514. } // eslint-disable-next-line complexity
  1515. ;
  1516. Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
  1517. // If not input/textarea:
  1518. // - And not a key in REGEXP_KEYDOWN => not a dropdown command
  1519. // If input/textarea:
  1520. // - If space key => not a dropdown command
  1521. // - If key is other than escape
  1522. // - If key is not up or down => not a dropdown command
  1523. // - If trigger inside the menu => not a dropdown command
  1524. if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE$1 && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $__default["default"](event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
  1525. return;
  1526. }
  1527. if (this.disabled || $__default["default"](this).hasClass(CLASS_NAME_DISABLED$1)) {
  1528. return;
  1529. }
  1530. var parent = Dropdown._getParentFromElement(this);
  1531. var isActive = $__default["default"](parent).hasClass(CLASS_NAME_SHOW$5);
  1532. if (!isActive && event.which === ESCAPE_KEYCODE$1) {
  1533. return;
  1534. }
  1535. event.preventDefault();
  1536. event.stopPropagation();
  1537. if (!isActive || event.which === ESCAPE_KEYCODE$1 || event.which === SPACE_KEYCODE) {
  1538. if (event.which === ESCAPE_KEYCODE$1) {
  1539. $__default["default"](parent.querySelector(SELECTOR_DATA_TOGGLE$2)).trigger('focus');
  1540. }
  1541. $__default["default"](this).trigger('click');
  1542. return;
  1543. }
  1544. var items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS)).filter(function (item) {
  1545. return $__default["default"](item).is(':visible');
  1546. });
  1547. if (items.length === 0) {
  1548. return;
  1549. }
  1550. var index = items.indexOf(event.target);
  1551. if (event.which === ARROW_UP_KEYCODE && index > 0) {
  1552. // Up
  1553. index--;
  1554. }
  1555. if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
  1556. // Down
  1557. index++;
  1558. }
  1559. if (index < 0) {
  1560. index = 0;
  1561. }
  1562. items[index].focus();
  1563. };
  1564. _createClass(Dropdown, null, [{
  1565. key: "VERSION",
  1566. get: function get() {
  1567. return VERSION$6;
  1568. }
  1569. }, {
  1570. key: "Default",
  1571. get: function get() {
  1572. return Default$5;
  1573. }
  1574. }, {
  1575. key: "DefaultType",
  1576. get: function get() {
  1577. return DefaultType$5;
  1578. }
  1579. }]);
  1580. return Dropdown;
  1581. }();
  1582. /**
  1583. * Data API implementation
  1584. */
  1585. $__default["default"](document).on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$2, Dropdown._dataApiKeydownHandler).on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler).on(EVENT_CLICK_DATA_API$2 + " " + EVENT_KEYUP_DATA_API, Dropdown._clearMenus).on(EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {
  1586. event.preventDefault();
  1587. event.stopPropagation();
  1588. Dropdown._jQueryInterface.call($__default["default"](this), 'toggle');
  1589. }).on(EVENT_CLICK_DATA_API$2, SELECTOR_FORM_CHILD, function (e) {
  1590. e.stopPropagation();
  1591. });
  1592. /**
  1593. * jQuery
  1594. */
  1595. $__default["default"].fn[NAME$6] = Dropdown._jQueryInterface;
  1596. $__default["default"].fn[NAME$6].Constructor = Dropdown;
  1597. $__default["default"].fn[NAME$6].noConflict = function () {
  1598. $__default["default"].fn[NAME$6] = JQUERY_NO_CONFLICT$6;
  1599. return Dropdown._jQueryInterface;
  1600. };
  1601. /**
  1602. * Constants
  1603. */
  1604. var NAME$5 = 'modal';
  1605. var VERSION$5 = '4.6.1';
  1606. var DATA_KEY$5 = 'bs.modal';
  1607. var EVENT_KEY$5 = "." + DATA_KEY$5;
  1608. var DATA_API_KEY$2 = '.data-api';
  1609. var JQUERY_NO_CONFLICT$5 = $__default["default"].fn[NAME$5];
  1610. var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
  1611. var CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable';
  1612. var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
  1613. var CLASS_NAME_BACKDROP = 'modal-backdrop';
  1614. var CLASS_NAME_OPEN = 'modal-open';
  1615. var CLASS_NAME_FADE$4 = 'fade';
  1616. var CLASS_NAME_SHOW$4 = 'show';
  1617. var CLASS_NAME_STATIC = 'modal-static';
  1618. var EVENT_HIDE$2 = "hide" + EVENT_KEY$5;
  1619. var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY$5;
  1620. var EVENT_HIDDEN$2 = "hidden" + EVENT_KEY$5;
  1621. var EVENT_SHOW$2 = "show" + EVENT_KEY$5;
  1622. var EVENT_SHOWN$2 = "shown" + EVENT_KEY$5;
  1623. var EVENT_FOCUSIN = "focusin" + EVENT_KEY$5;
  1624. var EVENT_RESIZE = "resize" + EVENT_KEY$5;
  1625. var EVENT_CLICK_DISMISS$1 = "click.dismiss" + EVENT_KEY$5;
  1626. var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY$5;
  1627. var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY$5;
  1628. var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY$5;
  1629. var EVENT_CLICK_DATA_API$1 = "click" + EVENT_KEY$5 + DATA_API_KEY$2;
  1630. var SELECTOR_DIALOG = '.modal-dialog';
  1631. var SELECTOR_MODAL_BODY = '.modal-body';
  1632. var SELECTOR_DATA_TOGGLE$1 = '[data-toggle="modal"]';
  1633. var SELECTOR_DATA_DISMISS$1 = '[data-dismiss="modal"]';
  1634. var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
  1635. var SELECTOR_STICKY_CONTENT = '.sticky-top';
  1636. var Default$4 = {
  1637. backdrop: true,
  1638. keyboard: true,
  1639. focus: true,
  1640. show: true
  1641. };
  1642. var DefaultType$4 = {
  1643. backdrop: '(boolean|string)',
  1644. keyboard: 'boolean',
  1645. focus: 'boolean',
  1646. show: 'boolean'
  1647. };
  1648. /**
  1649. * Class definition
  1650. */
  1651. var Modal = /*#__PURE__*/function () {
  1652. function Modal(element, config) {
  1653. this._config = this._getConfig(config);
  1654. this._element = element;
  1655. this._dialog = element.querySelector(SELECTOR_DIALOG);
  1656. this._backdrop = null;
  1657. this._isShown = false;
  1658. this._isBodyOverflowing = false;
  1659. this._ignoreBackdropClick = false;
  1660. this._isTransitioning = false;
  1661. this._scrollbarWidth = 0;
  1662. } // Getters
  1663. var _proto = Modal.prototype;
  1664. // Public
  1665. _proto.toggle = function toggle(relatedTarget) {
  1666. return this._isShown ? this.hide() : this.show(relatedTarget);
  1667. };
  1668. _proto.show = function show(relatedTarget) {
  1669. var _this = this;
  1670. if (this._isShown || this._isTransitioning) {
  1671. return;
  1672. }
  1673. var showEvent = $__default["default"].Event(EVENT_SHOW$2, {
  1674. relatedTarget: relatedTarget
  1675. });
  1676. $__default["default"](this._element).trigger(showEvent);
  1677. if (showEvent.isDefaultPrevented()) {
  1678. return;
  1679. }
  1680. this._isShown = true;
  1681. if ($__default["default"](this._element).hasClass(CLASS_NAME_FADE$4)) {
  1682. this._isTransitioning = true;
  1683. }
  1684. this._checkScrollbar();
  1685. this._setScrollbar();
  1686. this._adjustDialog();
  1687. this._setEscapeEvent();
  1688. this._setResizeEvent();
  1689. $__default["default"](this._element).on(EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, function (event) {
  1690. return _this.hide(event);
  1691. });
  1692. $__default["default"](this._dialog).on(EVENT_MOUSEDOWN_DISMISS, function () {
  1693. $__default["default"](_this._element).one(EVENT_MOUSEUP_DISMISS, function (event) {
  1694. if ($__default["default"](event.target).is(_this._element)) {
  1695. _this._ignoreBackdropClick = true;
  1696. }
  1697. });
  1698. });
  1699. this._showBackdrop(function () {
  1700. return _this._showElement(relatedTarget);
  1701. });
  1702. };
  1703. _proto.hide = function hide(event) {
  1704. var _this2 = this;
  1705. if (event) {
  1706. event.preventDefault();
  1707. }
  1708. if (!this._isShown || this._isTransitioning) {
  1709. return;
  1710. }
  1711. var hideEvent = $__default["default"].Event(EVENT_HIDE$2);
  1712. $__default["default"](this._element).trigger(hideEvent);
  1713. if (!this._isShown || hideEvent.isDefaultPrevented()) {
  1714. return;
  1715. }
  1716. this._isShown = false;
  1717. var transition = $__default["default"](this._element).hasClass(CLASS_NAME_FADE$4);
  1718. if (transition) {
  1719. this._isTransitioning = true;
  1720. }
  1721. this._setEscapeEvent();
  1722. this._setResizeEvent();
  1723. $__default["default"](document).off(EVENT_FOCUSIN);
  1724. $__default["default"](this._element).removeClass(CLASS_NAME_SHOW$4);
  1725. $__default["default"](this._element).off(EVENT_CLICK_DISMISS$1);
  1726. $__default["default"](this._dialog).off(EVENT_MOUSEDOWN_DISMISS);
  1727. if (transition) {
  1728. var transitionDuration = Util.getTransitionDurationFromElement(this._element);
  1729. $__default["default"](this._element).one(Util.TRANSITION_END, function (event) {
  1730. return _this2._hideModal(event);
  1731. }).emulateTransitionEnd(transitionDuration);
  1732. } else {
  1733. this._hideModal();
  1734. }
  1735. };
  1736. _proto.dispose = function dispose() {
  1737. [window, this._element, this._dialog].forEach(function (htmlElement) {
  1738. return $__default["default"](htmlElement).off(EVENT_KEY$5);
  1739. });
  1740. /**
  1741. * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
  1742. * Do not move `document` in `htmlElements` array
  1743. * It will remove `EVENT_CLICK_DATA_API` event that should remain
  1744. */
  1745. $__default["default"](document).off(EVENT_FOCUSIN);
  1746. $__default["default"].removeData(this._element, DATA_KEY$5);
  1747. this._config = null;
  1748. this._element = null;
  1749. this._dialog = null;
  1750. this._backdrop = null;
  1751. this._isShown = null;
  1752. this._isBodyOverflowing = null;
  1753. this._ignoreBackdropClick = null;
  1754. this._isTransitioning = null;
  1755. this._scrollbarWidth = null;
  1756. };
  1757. _proto.handleUpdate = function handleUpdate() {
  1758. this._adjustDialog();
  1759. } // Private
  1760. ;
  1761. _proto._getConfig = function _getConfig(config) {
  1762. config = _extends({}, Default$4, config);
  1763. Util.typeCheckConfig(NAME$5, config, DefaultType$4);
  1764. return config;
  1765. };
  1766. _proto._triggerBackdropTransition = function _triggerBackdropTransition() {
  1767. var _this3 = this;
  1768. var hideEventPrevented = $__default["default"].Event(EVENT_HIDE_PREVENTED);
  1769. $__default["default"](this._element).trigger(hideEventPrevented);
  1770. if (hideEventPrevented.isDefaultPrevented()) {
  1771. return;
  1772. }
  1773. var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
  1774. if (!isModalOverflowing) {
  1775. this._element.style.overflowY = 'hidden';
  1776. }
  1777. this._element.classList.add(CLASS_NAME_STATIC);
  1778. var modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog);
  1779. $__default["default"](this._element).off(Util.TRANSITION_END);
  1780. $__default["default"](this._element).one(Util.TRANSITION_END, function () {
  1781. _this3._element.classList.remove(CLASS_NAME_STATIC);
  1782. if (!isModalOverflowing) {
  1783. $__default["default"](_this3._element).one(Util.TRANSITION_END, function () {
  1784. _this3._element.style.overflowY = '';
  1785. }).emulateTransitionEnd(_this3._element, modalTransitionDuration);
  1786. }
  1787. }).emulateTransitionEnd(modalTransitionDuration);
  1788. this._element.focus();
  1789. };
  1790. _proto._showElement = function _showElement(relatedTarget) {
  1791. var _this4 = this;
  1792. var transition = $__default["default"](this._element).hasClass(CLASS_NAME_FADE$4);
  1793. var modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null;
  1794. if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
  1795. // Don't move modal's DOM position
  1796. document.body.appendChild(this._element);
  1797. }
  1798. this._element.style.display = 'block';
  1799. this._element.removeAttribute('aria-hidden');
  1800. this._element.setAttribute('aria-modal', true);
  1801. this._element.setAttribute('role', 'dialog');
  1802. if ($__default["default"](this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
  1803. modalBody.scrollTop = 0;
  1804. } else {
  1805. this._element.scrollTop = 0;
  1806. }
  1807. if (transition) {
  1808. Util.reflow(this._element);
  1809. }
  1810. $__default["default"](this._element).addClass(CLASS_NAME_SHOW$4);
  1811. if (this._config.focus) {
  1812. this._enforceFocus();
  1813. }
  1814. var shownEvent = $__default["default"].Event(EVENT_SHOWN$2, {
  1815. relatedTarget: relatedTarget
  1816. });
  1817. var transitionComplete = function transitionComplete() {
  1818. if (_this4._config.focus) {
  1819. _this4._element.focus();
  1820. }
  1821. _this4._isTransitioning = false;
  1822. $__default["default"](_this4._element).trigger(shownEvent);
  1823. };
  1824. if (transition) {
  1825. var transitionDuration = Util.getTransitionDurationFromElement(this._dialog);
  1826. $__default["default"](this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
  1827. } else {
  1828. transitionComplete();
  1829. }
  1830. };
  1831. _proto._enforceFocus = function _enforceFocus() {
  1832. var _this5 = this;
  1833. $__default["default"](document).off(EVENT_FOCUSIN) // Guard against infinite focus loop
  1834. .on(EVENT_FOCUSIN, function (event) {
  1835. if (document !== event.target && _this5._element !== event.target && $__default["default"](_this5._element).has(event.target).length === 0) {
  1836. _this5._element.focus();
  1837. }
  1838. });
  1839. };
  1840. _proto._setEscapeEvent = function _setEscapeEvent() {
  1841. var _this6 = this;
  1842. if (this._isShown) {
  1843. $__default["default"](this._element).on(EVENT_KEYDOWN_DISMISS, function (event) {
  1844. if (_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
  1845. event.preventDefault();
  1846. _this6.hide();
  1847. } else if (!_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
  1848. _this6._triggerBackdropTransition();
  1849. }
  1850. });
  1851. } else if (!this._isShown) {
  1852. $__default["default"](this._element).off(EVENT_KEYDOWN_DISMISS);
  1853. }
  1854. };
  1855. _proto._setResizeEvent = function _setResizeEvent() {
  1856. var _this7 = this;
  1857. if (this._isShown) {
  1858. $__default["default"](window).on(EVENT_RESIZE, function (event) {
  1859. return _this7.handleUpdate(event);
  1860. });
  1861. } else {
  1862. $__default["default"](window).off(EVENT_RESIZE);
  1863. }
  1864. };
  1865. _proto._hideModal = function _hideModal() {
  1866. var _this8 = this;
  1867. this._element.style.display = 'none';
  1868. this._element.setAttribute('aria-hidden', true);
  1869. this._element.removeAttribute('aria-modal');
  1870. this._element.removeAttribute('role');
  1871. this._isTransitioning = false;
  1872. this._showBackdrop(function () {
  1873. $__default["default"](document.body).removeClass(CLASS_NAME_OPEN);
  1874. _this8._resetAdjustments();
  1875. _this8._resetScrollbar();
  1876. $__default["default"](_this8._element).trigger(EVENT_HIDDEN$2);
  1877. });
  1878. };
  1879. _proto._removeBackdrop = function _removeBackdrop() {
  1880. if (this._backdrop) {
  1881. $__default["default"](this._backdrop).remove();
  1882. this._backdrop = null;
  1883. }
  1884. };
  1885. _proto._showBackdrop = function _showBackdrop(callback) {
  1886. var _this9 = this;
  1887. var animate = $__default["default"](this._element).hasClass(CLASS_NAME_FADE$4) ? CLASS_NAME_FADE$4 : '';
  1888. if (this._isShown && this._config.backdrop) {
  1889. this._backdrop = document.createElement('div');
  1890. this._backdrop.className = CLASS_NAME_BACKDROP;
  1891. if (animate) {
  1892. this._backdrop.classList.add(animate);
  1893. }
  1894. $__default["default"](this._backdrop).appendTo(document.body);
  1895. $__default["default"](this._element).on(EVENT_CLICK_DISMISS$1, function (event) {
  1896. if (_this9._ignoreBackdropClick) {
  1897. _this9._ignoreBackdropClick = false;
  1898. return;
  1899. }
  1900. if (event.target !== event.currentTarget) {
  1901. return;
  1902. }
  1903. if (_this9._config.backdrop === 'static') {
  1904. _this9._triggerBackdropTransition();
  1905. } else {
  1906. _this9.hide();
  1907. }
  1908. });
  1909. if (animate) {
  1910. Util.reflow(this._backdrop);
  1911. }
  1912. $__default["default"](this._backdrop).addClass(CLASS_NAME_SHOW$4);
  1913. if (!callback) {
  1914. return;
  1915. }
  1916. if (!animate) {
  1917. callback();
  1918. return;
  1919. }
  1920. var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
  1921. $__default["default"](this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
  1922. } else if (!this._isShown && this._backdrop) {
  1923. $__default["default"](this._backdrop).removeClass(CLASS_NAME_SHOW$4);
  1924. var callbackRemove = function callbackRemove() {
  1925. _this9._removeBackdrop();
  1926. if (callback) {
  1927. callback();
  1928. }
  1929. };
  1930. if ($__default["default"](this._element).hasClass(CLASS_NAME_FADE$4)) {
  1931. var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
  1932. $__default["default"](this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
  1933. } else {
  1934. callbackRemove();
  1935. }
  1936. } else if (callback) {
  1937. callback();
  1938. }
  1939. } // ----------------------------------------------------------------------
  1940. // the following methods are used to handle overflowing modals
  1941. // todo (fat): these should probably be refactored out of modal.js
  1942. // ----------------------------------------------------------------------
  1943. ;
  1944. _proto._adjustDialog = function _adjustDialog() {
  1945. var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
  1946. if (!this._isBodyOverflowing && isModalOverflowing) {
  1947. this._element.style.paddingLeft = this._scrollbarWidth + "px";
  1948. }
  1949. if (this._isBodyOverflowing && !isModalOverflowing) {
  1950. this._element.style.paddingRight = this._scrollbarWidth + "px";
  1951. }
  1952. };
  1953. _proto._resetAdjustments = function _resetAdjustments() {
  1954. this._element.style.paddingLeft = '';
  1955. this._element.style.paddingRight = '';
  1956. };
  1957. _proto._checkScrollbar = function _checkScrollbar() {
  1958. var rect = document.body.getBoundingClientRect();
  1959. this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth;
  1960. this._scrollbarWidth = this._getScrollbarWidth();
  1961. };
  1962. _proto._setScrollbar = function _setScrollbar() {
  1963. var _this10 = this;
  1964. if (this._isBodyOverflowing) {
  1965. // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
  1966. // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
  1967. var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
  1968. var stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT)); // Adjust fixed content padding
  1969. $__default["default"](fixedContent).each(function (index, element) {
  1970. var actualPadding = element.style.paddingRight;
  1971. var calculatedPadding = $__default["default"](element).css('padding-right');
  1972. $__default["default"](element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px");
  1973. }); // Adjust sticky content margin
  1974. $__default["default"](stickyContent).each(function (index, element) {
  1975. var actualMargin = element.style.marginRight;
  1976. var calculatedMargin = $__default["default"](element).css('margin-right');
  1977. $__default["default"](element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px");
  1978. }); // Adjust body padding
  1979. var actualPadding = document.body.style.paddingRight;
  1980. var calculatedPadding = $__default["default"](document.body).css('padding-right');
  1981. $__default["default"](document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
  1982. }
  1983. $__default["default"](document.body).addClass(CLASS_NAME_OPEN);
  1984. };
  1985. _proto._resetScrollbar = function _resetScrollbar() {
  1986. // Restore fixed content padding
  1987. var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
  1988. $__default["default"](fixedContent).each(function (index, element) {
  1989. var padding = $__default["default"](element).data('padding-right');
  1990. $__default["default"](element).removeData('padding-right');
  1991. element.style.paddingRight = padding ? padding : '';
  1992. }); // Restore sticky content
  1993. var elements = [].slice.call(document.querySelectorAll("" + SELECTOR_STICKY_CONTENT));
  1994. $__default["default"](elements).each(function (index, element) {
  1995. var margin = $__default["default"](element).data('margin-right');
  1996. if (typeof margin !== 'undefined') {
  1997. $__default["default"](element).css('margin-right', margin).removeData('margin-right');
  1998. }
  1999. }); // Restore body padding
  2000. var padding = $__default["default"](document.body).data('padding-right');
  2001. $__default["default"](document.body).removeData('padding-right');
  2002. document.body.style.paddingRight = padding ? padding : '';
  2003. };
  2004. _proto._getScrollbarWidth = function _getScrollbarWidth() {
  2005. // thx d.walsh
  2006. var scrollDiv = document.createElement('div');
  2007. scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER;
  2008. document.body.appendChild(scrollDiv);
  2009. var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
  2010. document.body.removeChild(scrollDiv);
  2011. return scrollbarWidth;
  2012. } // Static
  2013. ;
  2014. Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
  2015. return this.each(function () {
  2016. var data = $__default["default"](this).data(DATA_KEY$5);
  2017. var _config = _extends({}, Default$4, $__default["default"](this).data(), typeof config === 'object' && config ? config : {});
  2018. if (!data) {
  2019. data = new Modal(this, _config);
  2020. $__default["default"](this).data(DATA_KEY$5, data);
  2021. }
  2022. if (typeof config === 'string') {
  2023. if (typeof data[config] === 'undefined') {
  2024. throw new TypeError("No method named \"" + config + "\"");
  2025. }
  2026. data[config](relatedTarget);
  2027. } else if (_config.show) {
  2028. data.show(relatedTarget);
  2029. }
  2030. });
  2031. };
  2032. _createClass(Modal, null, [{
  2033. key: "VERSION",
  2034. get: function get() {
  2035. return VERSION$5;
  2036. }
  2037. }, {
  2038. key: "Default",
  2039. get: function get() {
  2040. return Default$4;
  2041. }
  2042. }]);
  2043. return Modal;
  2044. }();
  2045. /**
  2046. * Data API implementation
  2047. */
  2048. $__default["default"](document).on(EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {
  2049. var _this11 = this;
  2050. var target;
  2051. var selector = Util.getSelectorFromElement(this);
  2052. if (selector) {
  2053. target = document.querySelector(selector);
  2054. }
  2055. var config = $__default["default"](target).data(DATA_KEY$5) ? 'toggle' : _extends({}, $__default["default"](target).data(), $__default["default"](this).data());
  2056. if (this.tagName === 'A' || this.tagName === 'AREA') {
  2057. event.preventDefault();
  2058. }
  2059. var $target = $__default["default"](target).one(EVENT_SHOW$2, function (showEvent) {
  2060. if (showEvent.isDefaultPrevented()) {
  2061. // Only register focus restorer if modal will actually get shown
  2062. return;
  2063. }
  2064. $target.one(EVENT_HIDDEN$2, function () {
  2065. if ($__default["default"](_this11).is(':visible')) {
  2066. _this11.focus();
  2067. }
  2068. });
  2069. });
  2070. Modal._jQueryInterface.call($__default["default"](target), config, this);
  2071. });
  2072. /**
  2073. * jQuery
  2074. */
  2075. $__default["default"].fn[NAME$5] = Modal._jQueryInterface;
  2076. $__default["default"].fn[NAME$5].Constructor = Modal;
  2077. $__default["default"].fn[NAME$5].noConflict = function () {
  2078. $__default["default"].fn[NAME$5] = JQUERY_NO_CONFLICT$5;
  2079. return Modal._jQueryInterface;
  2080. };
  2081. /**
  2082. * --------------------------------------------------------------------------
  2083. * Bootstrap (v4.6.1): tools/sanitizer.js
  2084. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
  2085. * --------------------------------------------------------------------------
  2086. */
  2087. var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
  2088. var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
  2089. var DefaultWhitelist = {
  2090. // Global attributes allowed on any supplied element below.
  2091. '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
  2092. a: ['target', 'href', 'title', 'rel'],
  2093. area: [],
  2094. b: [],
  2095. br: [],
  2096. col: [],
  2097. code: [],
  2098. div: [],
  2099. em: [],
  2100. hr: [],
  2101. h1: [],
  2102. h2: [],
  2103. h3: [],
  2104. h4: [],
  2105. h5: [],
  2106. h6: [],
  2107. i: [],
  2108. img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
  2109. li: [],
  2110. ol: [],
  2111. p: [],
  2112. pre: [],
  2113. s: [],
  2114. small: [],
  2115. span: [],
  2116. sub: [],
  2117. sup: [],
  2118. strong: [],
  2119. u: [],
  2120. ul: []
  2121. };
  2122. /**
  2123. * A pattern that recognizes a commonly useful subset of URLs that are safe.
  2124. *
  2125. * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
  2126. */
  2127. var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;
  2128. /**
  2129. * A pattern that matches safe data URLs. Only matches image, video and audio types.
  2130. *
  2131. * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
  2132. */
  2133. 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;
  2134. function allowedAttribute(attr, allowedAttributeList) {
  2135. var attrName = attr.nodeName.toLowerCase();
  2136. if (allowedAttributeList.indexOf(attrName) !== -1) {
  2137. if (uriAttrs.indexOf(attrName) !== -1) {
  2138. return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue));
  2139. }
  2140. return true;
  2141. }
  2142. var regExp = allowedAttributeList.filter(function (attrRegex) {
  2143. return attrRegex instanceof RegExp;
  2144. }); // Check if a regular expression validates the attribute.
  2145. for (var i = 0, len = regExp.length; i < len; i++) {
  2146. if (regExp[i].test(attrName)) {
  2147. return true;
  2148. }
  2149. }
  2150. return false;
  2151. }
  2152. function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
  2153. if (unsafeHtml.length === 0) {
  2154. return unsafeHtml;
  2155. }
  2156. if (sanitizeFn && typeof sanitizeFn === 'function') {
  2157. return sanitizeFn(unsafeHtml);
  2158. }
  2159. var domParser = new window.DOMParser();
  2160. var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
  2161. var whitelistKeys = Object.keys(whiteList);
  2162. var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
  2163. var _loop = function _loop(i, len) {
  2164. var el = elements[i];
  2165. var elName = el.nodeName.toLowerCase();
  2166. if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
  2167. el.parentNode.removeChild(el);
  2168. return "continue";
  2169. }
  2170. var attributeList = [].slice.call(el.attributes); // eslint-disable-next-line unicorn/prefer-spread
  2171. var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
  2172. attributeList.forEach(function (attr) {
  2173. if (!allowedAttribute(attr, whitelistedAttributes)) {
  2174. el.removeAttribute(attr.nodeName);
  2175. }
  2176. });
  2177. };
  2178. for (var i = 0, len = elements.length; i < len; i++) {
  2179. var _ret = _loop(i);
  2180. if (_ret === "continue") continue;
  2181. }
  2182. return createdDocument.body.innerHTML;
  2183. }
  2184. /**
  2185. * Constants
  2186. */
  2187. var NAME$4 = 'tooltip';
  2188. var VERSION$4 = '4.6.1';
  2189. var DATA_KEY$4 = 'bs.tooltip';
  2190. var EVENT_KEY$4 = "." + DATA_KEY$4;
  2191. var JQUERY_NO_CONFLICT$4 = $__default["default"].fn[NAME$4];
  2192. var CLASS_PREFIX$1 = 'bs-tooltip';
  2193. var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g');
  2194. var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
  2195. var CLASS_NAME_FADE$3 = 'fade';
  2196. var CLASS_NAME_SHOW$3 = 'show';
  2197. var HOVER_STATE_SHOW = 'show';
  2198. var HOVER_STATE_OUT = 'out';
  2199. var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
  2200. var SELECTOR_ARROW = '.arrow';
  2201. var TRIGGER_HOVER = 'hover';
  2202. var TRIGGER_FOCUS = 'focus';
  2203. var TRIGGER_CLICK = 'click';
  2204. var TRIGGER_MANUAL = 'manual';
  2205. var AttachmentMap = {
  2206. AUTO: 'auto',
  2207. TOP: 'top',
  2208. RIGHT: 'right',
  2209. BOTTOM: 'bottom',
  2210. LEFT: 'left'
  2211. };
  2212. var Default$3 = {
  2213. animation: true,
  2214. template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
  2215. trigger: 'hover focus',
  2216. title: '',
  2217. delay: 0,
  2218. html: false,
  2219. selector: false,
  2220. placement: 'top',
  2221. offset: 0,
  2222. container: false,
  2223. fallbackPlacement: 'flip',
  2224. boundary: 'scrollParent',
  2225. customClass: '',
  2226. sanitize: true,
  2227. sanitizeFn: null,
  2228. whiteList: DefaultWhitelist,
  2229. popperConfig: null
  2230. };
  2231. var DefaultType$3 = {
  2232. animation: 'boolean',
  2233. template: 'string',
  2234. title: '(string|element|function)',
  2235. trigger: 'string',
  2236. delay: '(number|object)',
  2237. html: 'boolean',
  2238. selector: '(string|boolean)',
  2239. placement: '(string|function)',
  2240. offset: '(number|string|function)',
  2241. container: '(string|element|boolean)',
  2242. fallbackPlacement: '(string|array)',
  2243. boundary: '(string|element)',
  2244. customClass: '(string|function)',
  2245. sanitize: 'boolean',
  2246. sanitizeFn: '(null|function)',
  2247. whiteList: 'object',
  2248. popperConfig: '(null|object)'
  2249. };
  2250. var Event$1 = {
  2251. HIDE: "hide" + EVENT_KEY$4,
  2252. HIDDEN: "hidden" + EVENT_KEY$4,
  2253. SHOW: "show" + EVENT_KEY$4,
  2254. SHOWN: "shown" + EVENT_KEY$4,
  2255. INSERTED: "inserted" + EVENT_KEY$4,
  2256. CLICK: "click" + EVENT_KEY$4,
  2257. FOCUSIN: "focusin" + EVENT_KEY$4,
  2258. FOCUSOUT: "focusout" + EVENT_KEY$4,
  2259. MOUSEENTER: "mouseenter" + EVENT_KEY$4,
  2260. MOUSELEAVE: "mouseleave" + EVENT_KEY$4
  2261. };
  2262. /**
  2263. * Class definition
  2264. */
  2265. var Tooltip = /*#__PURE__*/function () {
  2266. function Tooltip(element, config) {
  2267. if (typeof Popper__default["default"] === 'undefined') {
  2268. throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
  2269. } // Private
  2270. this._isEnabled = true;
  2271. this._timeout = 0;
  2272. this._hoverState = '';
  2273. this._activeTrigger = {};
  2274. this._popper = null; // Protected
  2275. this.element = element;
  2276. this.config = this._getConfig(config);
  2277. this.tip = null;
  2278. this._setListeners();
  2279. } // Getters
  2280. var _proto = Tooltip.prototype;
  2281. // Public
  2282. _proto.enable = function enable() {
  2283. this._isEnabled = true;
  2284. };
  2285. _proto.disable = function disable() {
  2286. this._isEnabled = false;
  2287. };
  2288. _proto.toggleEnabled = function toggleEnabled() {
  2289. this._isEnabled = !this._isEnabled;
  2290. };
  2291. _proto.toggle = function toggle(event) {
  2292. if (!this._isEnabled) {
  2293. return;
  2294. }
  2295. if (event) {
  2296. var dataKey = this.constructor.DATA_KEY;
  2297. var context = $__default["default"](event.currentTarget).data(dataKey);
  2298. if (!context) {
  2299. context = new this.constructor(event.currentTarget, this._getDelegateConfig());
  2300. $__default["default"](event.currentTarget).data(dataKey, context);
  2301. }
  2302. context._activeTrigger.click = !context._activeTrigger.click;
  2303. if (context._isWithActiveTrigger()) {
  2304. context._enter(null, context);
  2305. } else {
  2306. context._leave(null, context);
  2307. }
  2308. } else {
  2309. if ($__default["default"](this.getTipElement()).hasClass(CLASS_NAME_SHOW$3)) {
  2310. this._leave(null, this);
  2311. return;
  2312. }
  2313. this._enter(null, this);
  2314. }
  2315. };
  2316. _proto.dispose = function dispose() {
  2317. clearTimeout(this._timeout);
  2318. $__default["default"].removeData(this.element, this.constructor.DATA_KEY);
  2319. $__default["default"](this.element).off(this.constructor.EVENT_KEY);
  2320. $__default["default"](this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
  2321. if (this.tip) {
  2322. $__default["default"](this.tip).remove();
  2323. }
  2324. this._isEnabled = null;
  2325. this._timeout = null;
  2326. this._hoverState = null;
  2327. this._activeTrigger = null;
  2328. if (this._popper) {
  2329. this._popper.destroy();
  2330. }
  2331. this._popper = null;
  2332. this.element = null;
  2333. this.config = null;
  2334. this.tip = null;
  2335. };
  2336. _proto.show = function show() {
  2337. var _this = this;
  2338. if ($__default["default"](this.element).css('display') === 'none') {
  2339. throw new Error('Please use show on visible elements');
  2340. }
  2341. var showEvent = $__default["default"].Event(this.constructor.Event.SHOW);
  2342. if (this.isWithContent() && this._isEnabled) {
  2343. $__default["default"](this.element).trigger(showEvent);
  2344. var shadowRoot = Util.findShadowRoot(this.element);
  2345. var isInTheDom = $__default["default"].contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
  2346. if (showEvent.isDefaultPrevented() || !isInTheDom) {
  2347. return;
  2348. }
  2349. var tip = this.getTipElement();
  2350. var tipId = Util.getUID(this.constructor.NAME);
  2351. tip.setAttribute('id', tipId);
  2352. this.element.setAttribute('aria-describedby', tipId);
  2353. this.setContent();
  2354. if (this.config.animation) {
  2355. $__default["default"](tip).addClass(CLASS_NAME_FADE$3);
  2356. }
  2357. var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
  2358. var attachment = this._getAttachment(placement);
  2359. this.addAttachmentClass(attachment);
  2360. var container = this._getContainer();
  2361. $__default["default"](tip).data(this.constructor.DATA_KEY, this);
  2362. if (!$__default["default"].contains(this.element.ownerDocument.documentElement, this.tip)) {
  2363. $__default["default"](tip).appendTo(container);
  2364. }
  2365. $__default["default"](this.element).trigger(this.constructor.Event.INSERTED);
  2366. this._popper = new Popper__default["default"](this.element, tip, this._getPopperConfig(attachment));
  2367. $__default["default"](tip).addClass(CLASS_NAME_SHOW$3);
  2368. $__default["default"](tip).addClass(this.config.customClass); // If this is a touch-enabled device we add extra
  2369. // empty mouseover listeners to the body's immediate children;
  2370. // only needed because of broken event delegation on iOS
  2371. // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
  2372. if ('ontouchstart' in document.documentElement) {
  2373. $__default["default"](document.body).children().on('mouseover', null, $__default["default"].noop);
  2374. }
  2375. var complete = function complete() {
  2376. if (_this.config.animation) {
  2377. _this._fixTransition();
  2378. }
  2379. var prevHoverState = _this._hoverState;
  2380. _this._hoverState = null;
  2381. $__default["default"](_this.element).trigger(_this.constructor.Event.SHOWN);
  2382. if (prevHoverState === HOVER_STATE_OUT) {
  2383. _this._leave(null, _this);
  2384. }
  2385. };
  2386. if ($__default["default"](this.tip).hasClass(CLASS_NAME_FADE$3)) {
  2387. var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
  2388. $__default["default"](this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
  2389. } else {
  2390. complete();
  2391. }
  2392. }
  2393. };
  2394. _proto.hide = function hide(callback) {
  2395. var _this2 = this;
  2396. var tip = this.getTipElement();
  2397. var hideEvent = $__default["default"].Event(this.constructor.Event.HIDE);
  2398. var complete = function complete() {
  2399. if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
  2400. tip.parentNode.removeChild(tip);
  2401. }
  2402. _this2._cleanTipClass();
  2403. _this2.element.removeAttribute('aria-describedby');
  2404. $__default["default"](_this2.element).trigger(_this2.constructor.Event.HIDDEN);
  2405. if (_this2._popper !== null) {
  2406. _this2._popper.destroy();
  2407. }
  2408. if (callback) {
  2409. callback();
  2410. }
  2411. };
  2412. $__default["default"](this.element).trigger(hideEvent);
  2413. if (hideEvent.isDefaultPrevented()) {
  2414. return;
  2415. }
  2416. $__default["default"](tip).removeClass(CLASS_NAME_SHOW$3); // If this is a touch-enabled device we remove the extra
  2417. // empty mouseover listeners we added for iOS support
  2418. if ('ontouchstart' in document.documentElement) {
  2419. $__default["default"](document.body).children().off('mouseover', null, $__default["default"].noop);
  2420. }
  2421. this._activeTrigger[TRIGGER_CLICK] = false;
  2422. this._activeTrigger[TRIGGER_FOCUS] = false;
  2423. this._activeTrigger[TRIGGER_HOVER] = false;
  2424. if ($__default["default"](this.tip).hasClass(CLASS_NAME_FADE$3)) {
  2425. var transitionDuration = Util.getTransitionDurationFromElement(tip);
  2426. $__default["default"](tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
  2427. } else {
  2428. complete();
  2429. }
  2430. this._hoverState = '';
  2431. };
  2432. _proto.update = function update() {
  2433. if (this._popper !== null) {
  2434. this._popper.scheduleUpdate();
  2435. }
  2436. } // Protected
  2437. ;
  2438. _proto.isWithContent = function isWithContent() {
  2439. return Boolean(this.getTitle());
  2440. };
  2441. _proto.addAttachmentClass = function addAttachmentClass(attachment) {
  2442. $__default["default"](this.getTipElement()).addClass(CLASS_PREFIX$1 + "-" + attachment);
  2443. };
  2444. _proto.getTipElement = function getTipElement() {
  2445. this.tip = this.tip || $__default["default"](this.config.template)[0];
  2446. return this.tip;
  2447. };
  2448. _proto.setContent = function setContent() {
  2449. var tip = this.getTipElement();
  2450. this.setElementContent($__default["default"](tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle());
  2451. $__default["default"](tip).removeClass(CLASS_NAME_FADE$3 + " " + CLASS_NAME_SHOW$3);
  2452. };
  2453. _proto.setElementContent = function setElementContent($element, content) {
  2454. if (typeof content === 'object' && (content.nodeType || content.jquery)) {
  2455. // Content is a DOM node or a jQuery
  2456. if (this.config.html) {
  2457. if (!$__default["default"](content).parent().is($element)) {
  2458. $element.empty().append(content);
  2459. }
  2460. } else {
  2461. $element.text($__default["default"](content).text());
  2462. }
  2463. return;
  2464. }
  2465. if (this.config.html) {
  2466. if (this.config.sanitize) {
  2467. content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
  2468. }
  2469. $element.html(content);
  2470. } else {
  2471. $element.text(content);
  2472. }
  2473. };
  2474. _proto.getTitle = function getTitle() {
  2475. var title = this.element.getAttribute('data-original-title');
  2476. if (!title) {
  2477. title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
  2478. }
  2479. return title;
  2480. } // Private
  2481. ;
  2482. _proto._getPopperConfig = function _getPopperConfig(attachment) {
  2483. var _this3 = this;
  2484. var defaultBsConfig = {
  2485. placement: attachment,
  2486. modifiers: {
  2487. offset: this._getOffset(),
  2488. flip: {
  2489. behavior: this.config.fallbackPlacement
  2490. },
  2491. arrow: {
  2492. element: SELECTOR_ARROW
  2493. },
  2494. preventOverflow: {
  2495. boundariesElement: this.config.boundary
  2496. }
  2497. },
  2498. onCreate: function onCreate(data) {
  2499. if (data.originalPlacement !== data.placement) {
  2500. _this3._handlePopperPlacementChange(data);
  2501. }
  2502. },
  2503. onUpdate: function onUpdate(data) {
  2504. return _this3._handlePopperPlacementChange(data);
  2505. }
  2506. };
  2507. return _extends({}, defaultBsConfig, this.config.popperConfig);
  2508. };
  2509. _proto._getOffset = function _getOffset() {
  2510. var _this4 = this;
  2511. var offset = {};
  2512. if (typeof this.config.offset === 'function') {
  2513. offset.fn = function (data) {
  2514. data.offsets = _extends({}, data.offsets, _this4.config.offset(data.offsets, _this4.element));
  2515. return data;
  2516. };
  2517. } else {
  2518. offset.offset = this.config.offset;
  2519. }
  2520. return offset;
  2521. };
  2522. _proto._getContainer = function _getContainer() {
  2523. if (this.config.container === false) {
  2524. return document.body;
  2525. }
  2526. if (Util.isElement(this.config.container)) {
  2527. return $__default["default"](this.config.container);
  2528. }
  2529. return $__default["default"](document).find(this.config.container);
  2530. };
  2531. _proto._getAttachment = function _getAttachment(placement) {
  2532. return AttachmentMap[placement.toUpperCase()];
  2533. };
  2534. _proto._setListeners = function _setListeners() {
  2535. var _this5 = this;
  2536. var triggers = this.config.trigger.split(' ');
  2537. triggers.forEach(function (trigger) {
  2538. if (trigger === 'click') {
  2539. $__default["default"](_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
  2540. return _this5.toggle(event);
  2541. });
  2542. } else if (trigger !== TRIGGER_MANUAL) {
  2543. var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
  2544. var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
  2545. $__default["default"](_this5.element).on(eventIn, _this5.config.selector, function (event) {
  2546. return _this5._enter(event);
  2547. }).on(eventOut, _this5.config.selector, function (event) {
  2548. return _this5._leave(event);
  2549. });
  2550. }
  2551. });
  2552. this._hideModalHandler = function () {
  2553. if (_this5.element) {
  2554. _this5.hide();
  2555. }
  2556. };
  2557. $__default["default"](this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
  2558. if (this.config.selector) {
  2559. this.config = _extends({}, this.config, {
  2560. trigger: 'manual',
  2561. selector: ''
  2562. });
  2563. } else {
  2564. this._fixTitle();
  2565. }
  2566. };
  2567. _proto._fixTitle = function _fixTitle() {
  2568. var titleType = typeof this.element.getAttribute('data-original-title');
  2569. if (this.element.getAttribute('title') || titleType !== 'string') {
  2570. this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
  2571. this.element.setAttribute('title', '');
  2572. }
  2573. };
  2574. _proto._enter = function _enter(event, context) {
  2575. var dataKey = this.constructor.DATA_KEY;
  2576. context = context || $__default["default"](event.currentTarget).data(dataKey);
  2577. if (!context) {
  2578. context = new this.constructor(event.currentTarget, this._getDelegateConfig());
  2579. $__default["default"](event.currentTarget).data(dataKey, context);
  2580. }
  2581. if (event) {
  2582. context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
  2583. }
  2584. if ($__default["default"](context.getTipElement()).hasClass(CLASS_NAME_SHOW$3) || context._hoverState === HOVER_STATE_SHOW) {
  2585. context._hoverState = HOVER_STATE_SHOW;
  2586. return;
  2587. }
  2588. clearTimeout(context._timeout);
  2589. context._hoverState = HOVER_STATE_SHOW;
  2590. if (!context.config.delay || !context.config.delay.show) {
  2591. context.show();
  2592. return;
  2593. }
  2594. context._timeout = setTimeout(function () {
  2595. if (context._hoverState === HOVER_STATE_SHOW) {
  2596. context.show();
  2597. }
  2598. }, context.config.delay.show);
  2599. };
  2600. _proto._leave = function _leave(event, context) {
  2601. var dataKey = this.constructor.DATA_KEY;
  2602. context = context || $__default["default"](event.currentTarget).data(dataKey);
  2603. if (!context) {
  2604. context = new this.constructor(event.currentTarget, this._getDelegateConfig());
  2605. $__default["default"](event.currentTarget).data(dataKey, context);
  2606. }
  2607. if (event) {
  2608. context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false;
  2609. }
  2610. if (context._isWithActiveTrigger()) {
  2611. return;
  2612. }
  2613. clearTimeout(context._timeout);
  2614. context._hoverState = HOVER_STATE_OUT;
  2615. if (!context.config.delay || !context.config.delay.hide) {
  2616. context.hide();
  2617. return;
  2618. }
  2619. context._timeout = setTimeout(function () {
  2620. if (context._hoverState === HOVER_STATE_OUT) {
  2621. context.hide();
  2622. }
  2623. }, context.config.delay.hide);
  2624. };
  2625. _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
  2626. for (var trigger in this._activeTrigger) {
  2627. if (this._activeTrigger[trigger]) {
  2628. return true;
  2629. }
  2630. }
  2631. return false;
  2632. };
  2633. _proto._getConfig = function _getConfig(config) {
  2634. var dataAttributes = $__default["default"](this.element).data();
  2635. Object.keys(dataAttributes).forEach(function (dataAttr) {
  2636. if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
  2637. delete dataAttributes[dataAttr];
  2638. }
  2639. });
  2640. config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
  2641. if (typeof config.delay === 'number') {
  2642. config.delay = {
  2643. show: config.delay,
  2644. hide: config.delay
  2645. };
  2646. }
  2647. if (typeof config.title === 'number') {
  2648. config.title = config.title.toString();
  2649. }
  2650. if (typeof config.content === 'number') {
  2651. config.content = config.content.toString();
  2652. }
  2653. Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
  2654. if (config.sanitize) {
  2655. config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
  2656. }
  2657. return config;
  2658. };
  2659. _proto._getDelegateConfig = function _getDelegateConfig() {
  2660. var config = {};
  2661. if (this.config) {
  2662. for (var key in this.config) {
  2663. if (this.constructor.Default[key] !== this.config[key]) {
  2664. config[key] = this.config[key];
  2665. }
  2666. }
  2667. }
  2668. return config;
  2669. };
  2670. _proto._cleanTipClass = function _cleanTipClass() {
  2671. var $tip = $__default["default"](this.getTipElement());
  2672. var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1);
  2673. if (tabClass !== null && tabClass.length) {
  2674. $tip.removeClass(tabClass.join(''));
  2675. }
  2676. };
  2677. _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
  2678. this.tip = popperData.instance.popper;
  2679. this._cleanTipClass();
  2680. this.addAttachmentClass(this._getAttachment(popperData.placement));
  2681. };
  2682. _proto._fixTransition = function _fixTransition() {
  2683. var tip = this.getTipElement();
  2684. var initConfigAnimation = this.config.animation;
  2685. if (tip.getAttribute('x-placement') !== null) {
  2686. return;
  2687. }
  2688. $__default["default"](tip).removeClass(CLASS_NAME_FADE$3);
  2689. this.config.animation = false;
  2690. this.hide();
  2691. this.show();
  2692. this.config.animation = initConfigAnimation;
  2693. } // Static
  2694. ;
  2695. Tooltip._jQueryInterface = function _jQueryInterface(config) {
  2696. return this.each(function () {
  2697. var $element = $__default["default"](this);
  2698. var data = $element.data(DATA_KEY$4);
  2699. var _config = typeof config === 'object' && config;
  2700. if (!data && /dispose|hide/.test(config)) {
  2701. return;
  2702. }
  2703. if (!data) {
  2704. data = new Tooltip(this, _config);
  2705. $element.data(DATA_KEY$4, data);
  2706. }
  2707. if (typeof config === 'string') {
  2708. if (typeof data[config] === 'undefined') {
  2709. throw new TypeError("No method named \"" + config + "\"");
  2710. }
  2711. data[config]();
  2712. }
  2713. });
  2714. };
  2715. _createClass(Tooltip, null, [{
  2716. key: "VERSION",
  2717. get: function get() {
  2718. return VERSION$4;
  2719. }
  2720. }, {
  2721. key: "Default",
  2722. get: function get() {
  2723. return Default$3;
  2724. }
  2725. }, {
  2726. key: "NAME",
  2727. get: function get() {
  2728. return NAME$4;
  2729. }
  2730. }, {
  2731. key: "DATA_KEY",
  2732. get: function get() {
  2733. return DATA_KEY$4;
  2734. }
  2735. }, {
  2736. key: "Event",
  2737. get: function get() {
  2738. return Event$1;
  2739. }
  2740. }, {
  2741. key: "EVENT_KEY",
  2742. get: function get() {
  2743. return EVENT_KEY$4;
  2744. }
  2745. }, {
  2746. key: "DefaultType",
  2747. get: function get() {
  2748. return DefaultType$3;
  2749. }
  2750. }]);
  2751. return Tooltip;
  2752. }();
  2753. /**
  2754. * jQuery
  2755. */
  2756. $__default["default"].fn[NAME$4] = Tooltip._jQueryInterface;
  2757. $__default["default"].fn[NAME$4].Constructor = Tooltip;
  2758. $__default["default"].fn[NAME$4].noConflict = function () {
  2759. $__default["default"].fn[NAME$4] = JQUERY_NO_CONFLICT$4;
  2760. return Tooltip._jQueryInterface;
  2761. };
  2762. /**
  2763. * Constants
  2764. */
  2765. var NAME$3 = 'popover';
  2766. var VERSION$3 = '4.6.1';
  2767. var DATA_KEY$3 = 'bs.popover';
  2768. var EVENT_KEY$3 = "." + DATA_KEY$3;
  2769. var JQUERY_NO_CONFLICT$3 = $__default["default"].fn[NAME$3];
  2770. var CLASS_PREFIX = 'bs-popover';
  2771. var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
  2772. var CLASS_NAME_FADE$2 = 'fade';
  2773. var CLASS_NAME_SHOW$2 = 'show';
  2774. var SELECTOR_TITLE = '.popover-header';
  2775. var SELECTOR_CONTENT = '.popover-body';
  2776. var Default$2 = _extends({}, Tooltip.Default, {
  2777. placement: 'right',
  2778. trigger: 'click',
  2779. content: '',
  2780. template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
  2781. });
  2782. var DefaultType$2 = _extends({}, Tooltip.DefaultType, {
  2783. content: '(string|element|function)'
  2784. });
  2785. var Event = {
  2786. HIDE: "hide" + EVENT_KEY$3,
  2787. HIDDEN: "hidden" + EVENT_KEY$3,
  2788. SHOW: "show" + EVENT_KEY$3,
  2789. SHOWN: "shown" + EVENT_KEY$3,
  2790. INSERTED: "inserted" + EVENT_KEY$3,
  2791. CLICK: "click" + EVENT_KEY$3,
  2792. FOCUSIN: "focusin" + EVENT_KEY$3,
  2793. FOCUSOUT: "focusout" + EVENT_KEY$3,
  2794. MOUSEENTER: "mouseenter" + EVENT_KEY$3,
  2795. MOUSELEAVE: "mouseleave" + EVENT_KEY$3
  2796. };
  2797. /**
  2798. * Class definition
  2799. */
  2800. var Popover = /*#__PURE__*/function (_Tooltip) {
  2801. _inheritsLoose(Popover, _Tooltip);
  2802. function Popover() {
  2803. return _Tooltip.apply(this, arguments) || this;
  2804. }
  2805. var _proto = Popover.prototype;
  2806. // Overrides
  2807. _proto.isWithContent = function isWithContent() {
  2808. return this.getTitle() || this._getContent();
  2809. };
  2810. _proto.addAttachmentClass = function addAttachmentClass(attachment) {
  2811. $__default["default"](this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
  2812. };
  2813. _proto.getTipElement = function getTipElement() {
  2814. this.tip = this.tip || $__default["default"](this.config.template)[0];
  2815. return this.tip;
  2816. };
  2817. _proto.setContent = function setContent() {
  2818. var $tip = $__default["default"](this.getTipElement()); // We use append for html objects to maintain js events
  2819. this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle());
  2820. var content = this._getContent();
  2821. if (typeof content === 'function') {
  2822. content = content.call(this.element);
  2823. }
  2824. this.setElementContent($tip.find(SELECTOR_CONTENT), content);
  2825. $tip.removeClass(CLASS_NAME_FADE$2 + " " + CLASS_NAME_SHOW$2);
  2826. } // Private
  2827. ;
  2828. _proto._getContent = function _getContent() {
  2829. return this.element.getAttribute('data-content') || this.config.content;
  2830. };
  2831. _proto._cleanTipClass = function _cleanTipClass() {
  2832. var $tip = $__default["default"](this.getTipElement());
  2833. var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
  2834. if (tabClass !== null && tabClass.length > 0) {
  2835. $tip.removeClass(tabClass.join(''));
  2836. }
  2837. } // Static
  2838. ;
  2839. Popover._jQueryInterface = function _jQueryInterface(config) {
  2840. return this.each(function () {
  2841. var data = $__default["default"](this).data(DATA_KEY$3);
  2842. var _config = typeof config === 'object' ? config : null;
  2843. if (!data && /dispose|hide/.test(config)) {
  2844. return;
  2845. }
  2846. if (!data) {
  2847. data = new Popover(this, _config);
  2848. $__default["default"](this).data(DATA_KEY$3, data);
  2849. }
  2850. if (typeof config === 'string') {
  2851. if (typeof data[config] === 'undefined') {
  2852. throw new TypeError("No method named \"" + config + "\"");
  2853. }
  2854. data[config]();
  2855. }
  2856. });
  2857. };
  2858. _createClass(Popover, null, [{
  2859. key: "VERSION",
  2860. get: // Getters
  2861. function get() {
  2862. return VERSION$3;
  2863. }
  2864. }, {
  2865. key: "Default",
  2866. get: function get() {
  2867. return Default$2;
  2868. }
  2869. }, {
  2870. key: "NAME",
  2871. get: function get() {
  2872. return NAME$3;
  2873. }
  2874. }, {
  2875. key: "DATA_KEY",
  2876. get: function get() {
  2877. return DATA_KEY$3;
  2878. }
  2879. }, {
  2880. key: "Event",
  2881. get: function get() {
  2882. return Event;
  2883. }
  2884. }, {
  2885. key: "EVENT_KEY",
  2886. get: function get() {
  2887. return EVENT_KEY$3;
  2888. }
  2889. }, {
  2890. key: "DefaultType",
  2891. get: function get() {
  2892. return DefaultType$2;
  2893. }
  2894. }]);
  2895. return Popover;
  2896. }(Tooltip);
  2897. /**
  2898. * jQuery
  2899. */
  2900. $__default["default"].fn[NAME$3] = Popover._jQueryInterface;
  2901. $__default["default"].fn[NAME$3].Constructor = Popover;
  2902. $__default["default"].fn[NAME$3].noConflict = function () {
  2903. $__default["default"].fn[NAME$3] = JQUERY_NO_CONFLICT$3;
  2904. return Popover._jQueryInterface;
  2905. };
  2906. /**
  2907. * Constants
  2908. */
  2909. var NAME$2 = 'scrollspy';
  2910. var VERSION$2 = '4.6.1';
  2911. var DATA_KEY$2 = 'bs.scrollspy';
  2912. var EVENT_KEY$2 = "." + DATA_KEY$2;
  2913. var DATA_API_KEY$1 = '.data-api';
  2914. var JQUERY_NO_CONFLICT$2 = $__default["default"].fn[NAME$2];
  2915. var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
  2916. var CLASS_NAME_ACTIVE$1 = 'active';
  2917. var EVENT_ACTIVATE = "activate" + EVENT_KEY$2;
  2918. var EVENT_SCROLL = "scroll" + EVENT_KEY$2;
  2919. var EVENT_LOAD_DATA_API = "load" + EVENT_KEY$2 + DATA_API_KEY$1;
  2920. var METHOD_OFFSET = 'offset';
  2921. var METHOD_POSITION = 'position';
  2922. var SELECTOR_DATA_SPY = '[data-spy="scroll"]';
  2923. var SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group';
  2924. var SELECTOR_NAV_LINKS = '.nav-link';
  2925. var SELECTOR_NAV_ITEMS = '.nav-item';
  2926. var SELECTOR_LIST_ITEMS = '.list-group-item';
  2927. var SELECTOR_DROPDOWN$1 = '.dropdown';
  2928. var SELECTOR_DROPDOWN_ITEMS = '.dropdown-item';
  2929. var SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
  2930. var Default$1 = {
  2931. offset: 10,
  2932. method: 'auto',
  2933. target: ''
  2934. };
  2935. var DefaultType$1 = {
  2936. offset: 'number',
  2937. method: 'string',
  2938. target: '(string|element)'
  2939. };
  2940. /**
  2941. * Class definition
  2942. */
  2943. var ScrollSpy = /*#__PURE__*/function () {
  2944. function ScrollSpy(element, config) {
  2945. var _this = this;
  2946. this._element = element;
  2947. this._scrollElement = element.tagName === 'BODY' ? window : element;
  2948. this._config = this._getConfig(config);
  2949. this._selector = this._config.target + " " + SELECTOR_NAV_LINKS + "," + (this._config.target + " " + SELECTOR_LIST_ITEMS + ",") + (this._config.target + " " + SELECTOR_DROPDOWN_ITEMS);
  2950. this._offsets = [];
  2951. this._targets = [];
  2952. this._activeTarget = null;
  2953. this._scrollHeight = 0;
  2954. $__default["default"](this._scrollElement).on(EVENT_SCROLL, function (event) {
  2955. return _this._process(event);
  2956. });
  2957. this.refresh();
  2958. this._process();
  2959. } // Getters
  2960. var _proto = ScrollSpy.prototype;
  2961. // Public
  2962. _proto.refresh = function refresh() {
  2963. var _this2 = this;
  2964. var autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;
  2965. var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
  2966. var offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;
  2967. this._offsets = [];
  2968. this._targets = [];
  2969. this._scrollHeight = this._getScrollHeight();
  2970. var targets = [].slice.call(document.querySelectorAll(this._selector));
  2971. targets.map(function (element) {
  2972. var target;
  2973. var targetSelector = Util.getSelectorFromElement(element);
  2974. if (targetSelector) {
  2975. target = document.querySelector(targetSelector);
  2976. }
  2977. if (target) {
  2978. var targetBCR = target.getBoundingClientRect();
  2979. if (targetBCR.width || targetBCR.height) {
  2980. // TODO (fat): remove sketch reliance on jQuery position/offset
  2981. return [$__default["default"](target)[offsetMethod]().top + offsetBase, targetSelector];
  2982. }
  2983. }
  2984. return null;
  2985. }).filter(function (item) {
  2986. return item;
  2987. }).sort(function (a, b) {
  2988. return a[0] - b[0];
  2989. }).forEach(function (item) {
  2990. _this2._offsets.push(item[0]);
  2991. _this2._targets.push(item[1]);
  2992. });
  2993. };
  2994. _proto.dispose = function dispose() {
  2995. $__default["default"].removeData(this._element, DATA_KEY$2);
  2996. $__default["default"](this._scrollElement).off(EVENT_KEY$2);
  2997. this._element = null;
  2998. this._scrollElement = null;
  2999. this._config = null;
  3000. this._selector = null;
  3001. this._offsets = null;
  3002. this._targets = null;
  3003. this._activeTarget = null;
  3004. this._scrollHeight = null;
  3005. } // Private
  3006. ;
  3007. _proto._getConfig = function _getConfig(config) {
  3008. config = _extends({}, Default$1, typeof config === 'object' && config ? config : {});
  3009. if (typeof config.target !== 'string' && Util.isElement(config.target)) {
  3010. var id = $__default["default"](config.target).attr('id');
  3011. if (!id) {
  3012. id = Util.getUID(NAME$2);
  3013. $__default["default"](config.target).attr('id', id);
  3014. }
  3015. config.target = "#" + id;
  3016. }
  3017. Util.typeCheckConfig(NAME$2, config, DefaultType$1);
  3018. return config;
  3019. };
  3020. _proto._getScrollTop = function _getScrollTop() {
  3021. return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
  3022. };
  3023. _proto._getScrollHeight = function _getScrollHeight() {
  3024. return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
  3025. };
  3026. _proto._getOffsetHeight = function _getOffsetHeight() {
  3027. return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
  3028. };
  3029. _proto._process = function _process() {
  3030. var scrollTop = this._getScrollTop() + this._config.offset;
  3031. var scrollHeight = this._getScrollHeight();
  3032. var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
  3033. if (this._scrollHeight !== scrollHeight) {
  3034. this.refresh();
  3035. }
  3036. if (scrollTop >= maxScroll) {
  3037. var target = this._targets[this._targets.length - 1];
  3038. if (this._activeTarget !== target) {
  3039. this._activate(target);
  3040. }
  3041. return;
  3042. }
  3043. if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
  3044. this._activeTarget = null;
  3045. this._clear();
  3046. return;
  3047. }
  3048. for (var i = this._offsets.length; i--;) {
  3049. var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
  3050. if (isActiveTarget) {
  3051. this._activate(this._targets[i]);
  3052. }
  3053. }
  3054. };
  3055. _proto._activate = function _activate(target) {
  3056. this._activeTarget = target;
  3057. this._clear();
  3058. var queries = this._selector.split(',').map(function (selector) {
  3059. return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
  3060. });
  3061. var $link = $__default["default"]([].slice.call(document.querySelectorAll(queries.join(','))));
  3062. if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) {
  3063. $link.closest(SELECTOR_DROPDOWN$1).find(SELECTOR_DROPDOWN_TOGGLE$1).addClass(CLASS_NAME_ACTIVE$1);
  3064. $link.addClass(CLASS_NAME_ACTIVE$1);
  3065. } else {
  3066. // Set triggered link as active
  3067. $link.addClass(CLASS_NAME_ACTIVE$1); // Set triggered links parents as active
  3068. // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
  3069. $link.parents(SELECTOR_NAV_LIST_GROUP$1).prev(SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).addClass(CLASS_NAME_ACTIVE$1); // Handle special case when .nav-link is inside .nav-item
  3070. $link.parents(SELECTOR_NAV_LIST_GROUP$1).prev(SELECTOR_NAV_ITEMS).children(SELECTOR_NAV_LINKS).addClass(CLASS_NAME_ACTIVE$1);
  3071. }
  3072. $__default["default"](this._scrollElement).trigger(EVENT_ACTIVATE, {
  3073. relatedTarget: target
  3074. });
  3075. };
  3076. _proto._clear = function _clear() {
  3077. [].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
  3078. return node.classList.contains(CLASS_NAME_ACTIVE$1);
  3079. }).forEach(function (node) {
  3080. return node.classList.remove(CLASS_NAME_ACTIVE$1);
  3081. });
  3082. } // Static
  3083. ;
  3084. ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
  3085. return this.each(function () {
  3086. var data = $__default["default"](this).data(DATA_KEY$2);
  3087. var _config = typeof config === 'object' && config;
  3088. if (!data) {
  3089. data = new ScrollSpy(this, _config);
  3090. $__default["default"](this).data(DATA_KEY$2, data);
  3091. }
  3092. if (typeof config === 'string') {
  3093. if (typeof data[config] === 'undefined') {
  3094. throw new TypeError("No method named \"" + config + "\"");
  3095. }
  3096. data[config]();
  3097. }
  3098. });
  3099. };
  3100. _createClass(ScrollSpy, null, [{
  3101. key: "VERSION",
  3102. get: function get() {
  3103. return VERSION$2;
  3104. }
  3105. }, {
  3106. key: "Default",
  3107. get: function get() {
  3108. return Default$1;
  3109. }
  3110. }]);
  3111. return ScrollSpy;
  3112. }();
  3113. /**
  3114. * Data API implementation
  3115. */
  3116. $__default["default"](window).on(EVENT_LOAD_DATA_API, function () {
  3117. var scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY));
  3118. var scrollSpysLength = scrollSpys.length;
  3119. for (var i = scrollSpysLength; i--;) {
  3120. var $spy = $__default["default"](scrollSpys[i]);
  3121. ScrollSpy._jQueryInterface.call($spy, $spy.data());
  3122. }
  3123. });
  3124. /**
  3125. * jQuery
  3126. */
  3127. $__default["default"].fn[NAME$2] = ScrollSpy._jQueryInterface;
  3128. $__default["default"].fn[NAME$2].Constructor = ScrollSpy;
  3129. $__default["default"].fn[NAME$2].noConflict = function () {
  3130. $__default["default"].fn[NAME$2] = JQUERY_NO_CONFLICT$2;
  3131. return ScrollSpy._jQueryInterface;
  3132. };
  3133. /**
  3134. * Constants
  3135. */
  3136. var NAME$1 = 'tab';
  3137. var VERSION$1 = '4.6.1';
  3138. var DATA_KEY$1 = 'bs.tab';
  3139. var EVENT_KEY$1 = "." + DATA_KEY$1;
  3140. var DATA_API_KEY = '.data-api';
  3141. var JQUERY_NO_CONFLICT$1 = $__default["default"].fn[NAME$1];
  3142. var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
  3143. var CLASS_NAME_ACTIVE = 'active';
  3144. var CLASS_NAME_DISABLED = 'disabled';
  3145. var CLASS_NAME_FADE$1 = 'fade';
  3146. var CLASS_NAME_SHOW$1 = 'show';
  3147. var EVENT_HIDE$1 = "hide" + EVENT_KEY$1;
  3148. var EVENT_HIDDEN$1 = "hidden" + EVENT_KEY$1;
  3149. var EVENT_SHOW$1 = "show" + EVENT_KEY$1;
  3150. var EVENT_SHOWN$1 = "shown" + EVENT_KEY$1;
  3151. var EVENT_CLICK_DATA_API = "click" + EVENT_KEY$1 + DATA_API_KEY;
  3152. var SELECTOR_DROPDOWN = '.dropdown';
  3153. var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
  3154. var SELECTOR_ACTIVE = '.active';
  3155. var SELECTOR_ACTIVE_UL = '> li > .active';
  3156. var SELECTOR_DATA_TOGGLE = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]';
  3157. var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
  3158. var SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active';
  3159. /**
  3160. * Class definition
  3161. */
  3162. var Tab = /*#__PURE__*/function () {
  3163. function Tab(element) {
  3164. this._element = element;
  3165. } // Getters
  3166. var _proto = Tab.prototype;
  3167. // Public
  3168. _proto.show = function show() {
  3169. var _this = this;
  3170. if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $__default["default"](this._element).hasClass(CLASS_NAME_ACTIVE) || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED)) {
  3171. return;
  3172. }
  3173. var target;
  3174. var previous;
  3175. var listElement = $__default["default"](this._element).closest(SELECTOR_NAV_LIST_GROUP)[0];
  3176. var selector = Util.getSelectorFromElement(this._element);
  3177. if (listElement) {
  3178. var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE;
  3179. previous = $__default["default"].makeArray($__default["default"](listElement).find(itemSelector));
  3180. previous = previous[previous.length - 1];
  3181. }
  3182. var hideEvent = $__default["default"].Event(EVENT_HIDE$1, {
  3183. relatedTarget: this._element
  3184. });
  3185. var showEvent = $__default["default"].Event(EVENT_SHOW$1, {
  3186. relatedTarget: previous
  3187. });
  3188. if (previous) {
  3189. $__default["default"](previous).trigger(hideEvent);
  3190. }
  3191. $__default["default"](this._element).trigger(showEvent);
  3192. if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
  3193. return;
  3194. }
  3195. if (selector) {
  3196. target = document.querySelector(selector);
  3197. }
  3198. this._activate(this._element, listElement);
  3199. var complete = function complete() {
  3200. var hiddenEvent = $__default["default"].Event(EVENT_HIDDEN$1, {
  3201. relatedTarget: _this._element
  3202. });
  3203. var shownEvent = $__default["default"].Event(EVENT_SHOWN$1, {
  3204. relatedTarget: previous
  3205. });
  3206. $__default["default"](previous).trigger(hiddenEvent);
  3207. $__default["default"](_this._element).trigger(shownEvent);
  3208. };
  3209. if (target) {
  3210. this._activate(target, target.parentNode, complete);
  3211. } else {
  3212. complete();
  3213. }
  3214. };
  3215. _proto.dispose = function dispose() {
  3216. $__default["default"].removeData(this._element, DATA_KEY$1);
  3217. this._element = null;
  3218. } // Private
  3219. ;
  3220. _proto._activate = function _activate(element, container, callback) {
  3221. var _this2 = this;
  3222. var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $__default["default"](container).find(SELECTOR_ACTIVE_UL) : $__default["default"](container).children(SELECTOR_ACTIVE);
  3223. var active = activeElements[0];
  3224. var isTransitioning = callback && active && $__default["default"](active).hasClass(CLASS_NAME_FADE$1);
  3225. var complete = function complete() {
  3226. return _this2._transitionComplete(element, active, callback);
  3227. };
  3228. if (active && isTransitioning) {
  3229. var transitionDuration = Util.getTransitionDurationFromElement(active);
  3230. $__default["default"](active).removeClass(CLASS_NAME_SHOW$1).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
  3231. } else {
  3232. complete();
  3233. }
  3234. };
  3235. _proto._transitionComplete = function _transitionComplete(element, active, callback) {
  3236. if (active) {
  3237. $__default["default"](active).removeClass(CLASS_NAME_ACTIVE);
  3238. var dropdownChild = $__default["default"](active.parentNode).find(SELECTOR_DROPDOWN_ACTIVE_CHILD)[0];
  3239. if (dropdownChild) {
  3240. $__default["default"](dropdownChild).removeClass(CLASS_NAME_ACTIVE);
  3241. }
  3242. if (active.getAttribute('role') === 'tab') {
  3243. active.setAttribute('aria-selected', false);
  3244. }
  3245. }
  3246. $__default["default"](element).addClass(CLASS_NAME_ACTIVE);
  3247. if (element.getAttribute('role') === 'tab') {
  3248. element.setAttribute('aria-selected', true);
  3249. }
  3250. Util.reflow(element);
  3251. if (element.classList.contains(CLASS_NAME_FADE$1)) {
  3252. element.classList.add(CLASS_NAME_SHOW$1);
  3253. }
  3254. var parent = element.parentNode;
  3255. if (parent && parent.nodeName === 'LI') {
  3256. parent = parent.parentNode;
  3257. }
  3258. if (parent && $__default["default"](parent).hasClass(CLASS_NAME_DROPDOWN_MENU)) {
  3259. var dropdownElement = $__default["default"](element).closest(SELECTOR_DROPDOWN)[0];
  3260. if (dropdownElement) {
  3261. var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE));
  3262. $__default["default"](dropdownToggleList).addClass(CLASS_NAME_ACTIVE);
  3263. }
  3264. element.setAttribute('aria-expanded', true);
  3265. }
  3266. if (callback) {
  3267. callback();
  3268. }
  3269. } // Static
  3270. ;
  3271. Tab._jQueryInterface = function _jQueryInterface(config) {
  3272. return this.each(function () {
  3273. var $this = $__default["default"](this);
  3274. var data = $this.data(DATA_KEY$1);
  3275. if (!data) {
  3276. data = new Tab(this);
  3277. $this.data(DATA_KEY$1, data);
  3278. }
  3279. if (typeof config === 'string') {
  3280. if (typeof data[config] === 'undefined') {
  3281. throw new TypeError("No method named \"" + config + "\"");
  3282. }
  3283. data[config]();
  3284. }
  3285. });
  3286. };
  3287. _createClass(Tab, null, [{
  3288. key: "VERSION",
  3289. get: function get() {
  3290. return VERSION$1;
  3291. }
  3292. }]);
  3293. return Tab;
  3294. }();
  3295. /**
  3296. * Data API implementation
  3297. */
  3298. $__default["default"](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
  3299. event.preventDefault();
  3300. Tab._jQueryInterface.call($__default["default"](this), 'show');
  3301. });
  3302. /**
  3303. * jQuery
  3304. */
  3305. $__default["default"].fn[NAME$1] = Tab._jQueryInterface;
  3306. $__default["default"].fn[NAME$1].Constructor = Tab;
  3307. $__default["default"].fn[NAME$1].noConflict = function () {
  3308. $__default["default"].fn[NAME$1] = JQUERY_NO_CONFLICT$1;
  3309. return Tab._jQueryInterface;
  3310. };
  3311. /**
  3312. * Constants
  3313. */
  3314. var NAME = 'toast';
  3315. var VERSION = '4.6.1';
  3316. var DATA_KEY = 'bs.toast';
  3317. var EVENT_KEY = "." + DATA_KEY;
  3318. var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
  3319. var CLASS_NAME_FADE = 'fade';
  3320. var CLASS_NAME_HIDE = 'hide';
  3321. var CLASS_NAME_SHOW = 'show';
  3322. var CLASS_NAME_SHOWING = 'showing';
  3323. var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
  3324. var EVENT_HIDE = "hide" + EVENT_KEY;
  3325. var EVENT_HIDDEN = "hidden" + EVENT_KEY;
  3326. var EVENT_SHOW = "show" + EVENT_KEY;
  3327. var EVENT_SHOWN = "shown" + EVENT_KEY;
  3328. var SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]';
  3329. var Default = {
  3330. animation: true,
  3331. autohide: true,
  3332. delay: 500
  3333. };
  3334. var DefaultType = {
  3335. animation: 'boolean',
  3336. autohide: 'boolean',
  3337. delay: 'number'
  3338. };
  3339. /**
  3340. * Class definition
  3341. */
  3342. var Toast = /*#__PURE__*/function () {
  3343. function Toast(element, config) {
  3344. this._element = element;
  3345. this._config = this._getConfig(config);
  3346. this._timeout = null;
  3347. this._setListeners();
  3348. } // Getters
  3349. var _proto = Toast.prototype;
  3350. // Public
  3351. _proto.show = function show() {
  3352. var _this = this;
  3353. var showEvent = $__default["default"].Event(EVENT_SHOW);
  3354. $__default["default"](this._element).trigger(showEvent);
  3355. if (showEvent.isDefaultPrevented()) {
  3356. return;
  3357. }
  3358. this._clearTimeout();
  3359. if (this._config.animation) {
  3360. this._element.classList.add(CLASS_NAME_FADE);
  3361. }
  3362. var complete = function complete() {
  3363. _this._element.classList.remove(CLASS_NAME_SHOWING);
  3364. _this._element.classList.add(CLASS_NAME_SHOW);
  3365. $__default["default"](_this._element).trigger(EVENT_SHOWN);
  3366. if (_this._config.autohide) {
  3367. _this._timeout = setTimeout(function () {
  3368. _this.hide();
  3369. }, _this._config.delay);
  3370. }
  3371. };
  3372. this._element.classList.remove(CLASS_NAME_HIDE);
  3373. Util.reflow(this._element);
  3374. this._element.classList.add(CLASS_NAME_SHOWING);
  3375. if (this._config.animation) {
  3376. var transitionDuration = Util.getTransitionDurationFromElement(this._element);
  3377. $__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
  3378. } else {
  3379. complete();
  3380. }
  3381. };
  3382. _proto.hide = function hide() {
  3383. if (!this._element.classList.contains(CLASS_NAME_SHOW)) {
  3384. return;
  3385. }
  3386. var hideEvent = $__default["default"].Event(EVENT_HIDE);
  3387. $__default["default"](this._element).trigger(hideEvent);
  3388. if (hideEvent.isDefaultPrevented()) {
  3389. return;
  3390. }
  3391. this._close();
  3392. };
  3393. _proto.dispose = function dispose() {
  3394. this._clearTimeout();
  3395. if (this._element.classList.contains(CLASS_NAME_SHOW)) {
  3396. this._element.classList.remove(CLASS_NAME_SHOW);
  3397. }
  3398. $__default["default"](this._element).off(EVENT_CLICK_DISMISS);
  3399. $__default["default"].removeData(this._element, DATA_KEY);
  3400. this._element = null;
  3401. this._config = null;
  3402. } // Private
  3403. ;
  3404. _proto._getConfig = function _getConfig(config) {
  3405. config = _extends({}, Default, $__default["default"](this._element).data(), typeof config === 'object' && config ? config : {});
  3406. Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
  3407. return config;
  3408. };
  3409. _proto._setListeners = function _setListeners() {
  3410. var _this2 = this;
  3411. $__default["default"](this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () {
  3412. return _this2.hide();
  3413. });
  3414. };
  3415. _proto._close = function _close() {
  3416. var _this3 = this;
  3417. var complete = function complete() {
  3418. _this3._element.classList.add(CLASS_NAME_HIDE);
  3419. $__default["default"](_this3._element).trigger(EVENT_HIDDEN);
  3420. };
  3421. this._element.classList.remove(CLASS_NAME_SHOW);
  3422. if (this._config.animation) {
  3423. var transitionDuration = Util.getTransitionDurationFromElement(this._element);
  3424. $__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
  3425. } else {
  3426. complete();
  3427. }
  3428. };
  3429. _proto._clearTimeout = function _clearTimeout() {
  3430. clearTimeout(this._timeout);
  3431. this._timeout = null;
  3432. } // Static
  3433. ;
  3434. Toast._jQueryInterface = function _jQueryInterface(config) {
  3435. return this.each(function () {
  3436. var $element = $__default["default"](this);
  3437. var data = $element.data(DATA_KEY);
  3438. var _config = typeof config === 'object' && config;
  3439. if (!data) {
  3440. data = new Toast(this, _config);
  3441. $element.data(DATA_KEY, data);
  3442. }
  3443. if (typeof config === 'string') {
  3444. if (typeof data[config] === 'undefined') {
  3445. throw new TypeError("No method named \"" + config + "\"");
  3446. }
  3447. data[config](this);
  3448. }
  3449. });
  3450. };
  3451. _createClass(Toast, null, [{
  3452. key: "VERSION",
  3453. get: function get() {
  3454. return VERSION;
  3455. }
  3456. }, {
  3457. key: "DefaultType",
  3458. get: function get() {
  3459. return DefaultType;
  3460. }
  3461. }, {
  3462. key: "Default",
  3463. get: function get() {
  3464. return Default;
  3465. }
  3466. }]);
  3467. return Toast;
  3468. }();
  3469. /**
  3470. * jQuery
  3471. */
  3472. $__default["default"].fn[NAME] = Toast._jQueryInterface;
  3473. $__default["default"].fn[NAME].Constructor = Toast;
  3474. $__default["default"].fn[NAME].noConflict = function () {
  3475. $__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
  3476. return Toast._jQueryInterface;
  3477. };
  3478. exports.Alert = Alert;
  3479. exports.Button = Button;
  3480. exports.Carousel = Carousel;
  3481. exports.Collapse = Collapse;
  3482. exports.Dropdown = Dropdown;
  3483. exports.Modal = Modal;
  3484. exports.Popover = Popover;
  3485. exports.Scrollspy = ScrollSpy;
  3486. exports.Tab = Tab;
  3487. exports.Toast = Toast;
  3488. exports.Tooltip = Tooltip;
  3489. exports.Util = Util;
  3490. Object.defineProperty(exports, '__esModule', { value: true });
  3491. }));
  3492. //# sourceMappingURL=bootstrap.js.map