bootstrap.js 150 KB

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