PageSourceSearch

https://laventureduvivant.fr/sites/default/files/js/js_rJw7Kvn9lj1dDTetPPhyEVi699LatjpvSLyOvZokwWQ.js

js laventureduvivant.fr collected 2026-09-30 16:29:47 UTC 414,880 bytes, 11,982 lines download raw bytes

vendor: 6,632 bytes, lines 1-231
1/* ========================================================================
2 * Bootstrap: affix.js v3.3.7
3 * http://getbootstrap.com/javascript/#affix
4 * ========================================================================
5 * Copyright 2011-2016 Twitter, Inc.
6 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7 * ======================================================================== */
8
9
10+function ($) {
11  'use strict';
12
13  // AFFIX CLASS DEFINITION
14  // ======================
15
16  var Affix = function (element, options) {
17    this.options = $.extend({}, Affix.DEFAULTS, options)
18
19    this.$target = $(this.options.target)
20      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
21      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))
22
23    this.$element     = $(element)
24    this.affixed      = null
25    this.unpin        = null
26    this.pinnedOffset = null
27
28    this.checkPosition()
29  }
30
31  Affix.VERSION  = '3.3.7'
32
33  Affix.RESET    = 'affix affix-top affix-bottom'
34
35  Affix.DEFAULTS = {
36    offset: 0,
37    target: window
38  }
39
40  Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
41    var scrollTop    = this.$target.scrollTop()
42    var position     = this.$element.offset()
43    var targetHeight = this.$target.height()
44
45    if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
46
47    if (this.affixed == 'bottom') {
48      if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
49      return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
50    }
51
52    var initializing   = this.affixed == null
53    var colliderTop    = initializing ? scrollTop : position.top
54    var colliderHeight = initializing ? targetHeight : height
55
56    if (offsetTop != null && scrollTop <= offsetTop) return 'top'
57    if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
58
59    return false
60  }
61
62  Affix.prototype.getPinnedOffset = function () {
63    if (this.pinnedOffset) return this.pinnedOffset
64    this.$element.removeClass(Affix.RESET).addClass('affix')
65    var scrollTop = this.$target.scrollTop()
66    var position  = this.$element.offset()
67    return (this.pinnedOffset = position.top - scrollTop)
68  }
69
70  Affix.prototype.checkPositionWithEventLoop = function () {
71    setTimeout($.proxy(this.checkPosition, this), 1)
72  }
73
74  Affix.prototype.checkPosition = function () {
75    if (!this.$element.is(':visible')) return
76
77    var height       = this.$element.height()
78    var offset       = this.options.offset
79    var offsetTop    = offset.top
80    var offsetBottom = offset.bottom
81    var scrollHeight = Math.max($(document).height(), $(document.body).height())
82
83    if (typeof offset != 'object')         offsetBottom = offsetTop = offset
84    if (typeof offsetTop == 'function')    offsetTop    = offset.top(this.$element)
85    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
86
87    var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
88
89    if (this.affixed != affix) {
90      if (this.unpin != null) this.$element.css('top', '')
91
92      var affixType = 'affix' + (affix ? '-' + affix : '')
93      var e         = $.Event(affixType + '.bs.affix')
94
95      this.$element.trigger(e)
96
97      if (e.isDefaultPrevented()) return
98
99      this.affixed = affix
100      this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
101
102      this.$element
103        .removeClass(Affix.RESET)
104        .addClass(affixType)
105        .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
106    }
107
108    if (affix == 'bottom') {
109      this.$element.offset({
110        top: scrollHeight - height - offsetBottom
111      })
112    }
113  }
114
115
116  // AFFIX PLUGIN DEFINITION
117  // =======================
118
119  function Plugin(option) {
120    return this.each(function () {
121      var $this   = $(this)
122      var data    = $this.data('bs.affix')
123      var options = typeof option == 'object' && option
124
125      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
126      if (typeof option == 'string') data[option]()
127    })
128  }
129
130  var old = $.fn.affix
131
132  $.fn.affix             = Plugin
133  $.fn.affix.Constructor = Affix
134
135
136  // AFFIX NO CONFLICT
137  // =================
138
139  $.fn.affix.noConflict = function () {
140    $.fn.affix = old
141    return this
142  }
143
144
145  // AFFIX DATA-API
146  // ==============
147
148  $(window).on('load', function () {
149    $('[data-spy="affix"]').each(function () {
150      var $spy = $(this)
151      var data = $spy.data()
152
153      data.offset = data.offset || {}
154
155      if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
156      if (data.offsetTop    != null) data.offset.top    = data.offsetTop
157
158      Plugin.call($spy, data)
159    })
160  })
161
162}(jQuery);
163;
164/* ========================================================================
165 * Bootstrap: alert.js v3.3.7
166 * http://getbootstrap.com/javascript/#alerts
167 * ========================================================================
168 * Copyright 2011-2016 Twitter, Inc.
169 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
170 * ======================================================================== */
171
172
173+function ($) {
174  'use strict';
175
176  // ALERT CLASS DEFINITION
177  // ======================
178
179  var dismiss = '[data-dismiss="alert"]'
180  var Alert   = function (el) {
181    $(el).on('click', dismiss, this.close)
182  }
183
184  Alert.VERSION = '3.3.7'
185
186  Alert.TRANSITION_DURATION = 150
187
188  Alert.prototype.close = function (e) {
189    var $this    = $(this)
190    var selector = $this.attr('data-target')
191
192    if (!selector) {
193      selector = $this.attr('href')
194      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
195    }
196
197    var $parent = $(selector === '#' ? [] : selector)
198
199    if (e) e.preventDefault()
200
201    if (!$parent.length) {
202      $parent = $this.closest('.alert')
203    }
204
205    $parent.trigger(e = $.Event('close.bs.alert'))
206
207    if (e.isDefaultPrevented()) return
208
209    $parent.removeClass('in')
210
211    function removeElement() {
212      // detach from parent, fire event then clean up data
213      $parent.detach().trigger('closed.bs.alert').remove()
214    }
215
216    $.support.transition && $parent.hasClass('fade') ?
217      $parent
218        .one('bsTransitionEnd', removeElement)
219        .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
220      removeElement()
221  }
222
223
224  // ALERT PLUGIN DEFINITION
225  // =======================
226
227  function Plugin(option) {
228    return this.each(function () {
229      var $this = $(this)
230      var data  = $this.data('bs.alert')
231
vendor: 4,319 bytes, lines 232-384
232      if (!data) $this.data('bs.alert', (data = new Alert(this)))
233      if (typeof option == 'string') data[option].call($this)
234    })
235  }
236
237  var old = $.fn.alert
238
239  $.fn.alert             = Plugin
240  $.fn.alert.Constructor = Alert
241
242
243  // ALERT NO CONFLICT
244  // =================
245
246  $.fn.alert.noConflict = function () {
247    $.fn.alert = old
248    return this
249  }
250
251
252  // ALERT DATA-API
253  // ==============
254
255  $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
256
257}(jQuery);
258;
259/* ========================================================================
260 * Bootstrap: button.js v3.3.7
261 * http://getbootstrap.com/javascript/#buttons
262 * ========================================================================
263 * Copyright 2011-2016 Twitter, Inc.
264 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
265 * ======================================================================== */
266
267
268+function ($) {
269  'use strict';
270
271  // BUTTON PUBLIC CLASS DEFINITION
272  // ==============================
273
274  var Button = function (element, options) {
275    this.$element  = $(element)
276    this.options   = $.extend({}, Button.DEFAULTS, options)
277    this.isLoading = false
278  }
279
280  Button.VERSION  = '3.3.7'
281
282  Button.DEFAULTS = {
283    loadingText: 'loading...'
284  }
285
286  Button.prototype.setState = function (state) {
287    var d    = 'disabled'
288    var $el  = this.$element
289    var val  = $el.is('input') ? 'val' : 'html'
290    var data = $el.data()
291
292    state += 'Text'
293
294    if (data.resetText == null) $el.data('resetText', $el[val]())
295
296    // push to event loop to allow forms to submit
297    setTimeout($.proxy(function () {
298      $el[val](data[state] == null ? this.options[state] : data[state])
299
300      if (state == 'loadingText') {
301        this.isLoading = true
302        $el.addClass(d).attr(d, d).prop(d, true)
303      } else if (this.isLoading) {
304        this.isLoading = false
305        $el.removeClass(d).removeAttr(d).prop(d, false)
306      }
307    }, this), 0)
308  }
309
310  Button.prototype.toggle = function () {
311    var changed = true
312    var $parent = this.$element.closest('[data-toggle="buttons"]')
313
314    if ($parent.length) {
315      var $input = this.$element.find('input')
316      if ($input.prop('type') == 'radio') {
317        if ($input.prop('checked')) changed = false
318        $parent.find('.active').removeClass('active')
319        this.$element.addClass('active')
320      } else if ($input.prop('type') == 'checkbox') {
321        if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
322        this.$element.toggleClass('active')
323      }
324      $input.prop('checked', this.$element.hasClass('active'))
325      if (changed) $input.trigger('change')
326    } else {
327      this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
328      this.$element.toggleClass('active')
329    }
330  }
331
332
333  // BUTTON PLUGIN DEFINITION
334  // ========================
335
336  function Plugin(option) {
337    return this.each(function () {
338      var $this   = $(this)
339      var data    = $this.data('bs.button')
340      var options = typeof option == 'object' && option
341
342      if (!data) $this.data('bs.button', (data = new Button(this, options)))
343
344      if (option == 'toggle') data.toggle()
345      else if (option) data.setState(option)
346    })
347  }
348
349  var old = $.fn.button
350
351  $.fn.button             = Plugin
352  $.fn.button.Constructor = Button
353
354
355  // BUTTON NO CONFLICT
356  // ==================
357
358  $.fn.button.noConflict = function () {
359    $.fn.button = old
360    return this
361  }
362
363
364  // BUTTON DATA-API
365  // ===============
366
367  $(document)
368    .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
369      var $btn = $(e.target).closest('.btn')
370      Plugin.call($btn, 'toggle')
371      if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
372        // Prevent double click on radios, and the double selections (so cancellation) on checkboxes
373        e.preventDefault()
374        // The target component still receive the focus
375        if ($btn.is('input,button')) $btn.trigger('focus')
376        else $btn.find('input:visible,button:visible').first().trigger('focus')
377      }
378    })
379    .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
380      $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
381    })
382
383}(jQuery);
384;
vendor: 7,142 bytes, lines 384-621
384
385/* ========================================================================
386 * Bootstrap: carousel.js v3.3.7
387 * http://getbootstrap.com/javascript/#carousel
388 * ========================================================================
389 * Copyright 2011-2016 Twitter, Inc.
390 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
391 * ======================================================================== */
392
393
394+function ($) {
395  'use strict';
396
397  // CAROUSEL CLASS DEFINITION
398  // =========================
399
400  var Carousel = function (element, options) {
401    this.$element    = $(element)
402    this.$indicators = this.$element.find('.carousel-indicators')
403    this.options     = options
404    this.paused      = null
405    this.sliding     = null
406    this.interval    = null
407    this.$active     = null
408    this.$items      = null
409
410    this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
411
412    this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
413      .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
414      .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
415  }
416
417  Carousel.VERSION  = '3.3.7'
418
419  Carousel.TRANSITION_DURATION = 600
420
421  Carousel.DEFAULTS = {
422    interval: 5000,
423    pause: 'hover',
424    wrap: true,
425    keyboard: true
426  }
427
428  Carousel.prototype.keydown = function (e) {
429    if (/input|textarea/i.test(e.target.tagName)) return
430    switch (e.which) {
431      case 37: this.prev(); break
432      case 39: this.next(); break
433      default: return
434    }
435
436    e.preventDefault()
437  }
438
439  Carousel.prototype.cycle = function (e) {
440    e || (this.paused = false)
441
442    this.interval && clearInterval(this.interval)
443
444    this.options.interval
445      && !this.paused
446      && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
447
448    return this
449  }
450
451  Carousel.prototype.getItemIndex = function (item) {
452    this.$items = item.parent().children('.item')
453    return this.$items.index(item || this.$active)
454  }
455
456  Carousel.prototype.getItemForDirection = function (direction, active) {
457    var activeIndex = this.getItemIndex(active)
458    var willWrap = (direction == 'prev' && activeIndex === 0)
459                || (direction == 'next' && activeIndex == (this.$items.length - 1))
460    if (willWrap && !this.options.wrap) return active
461    var delta = direction == 'prev' ? -1 : 1
462    var itemIndex = (activeIndex + delta) % this.$items.length
463    return this.$items.eq(itemIndex)
464  }
465
466  Carousel.prototype.to = function (pos) {
467    var that        = this
468    var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
469
470    if (pos > (this.$items.length - 1) || pos < 0) return
471
472    if (this.sliding)       return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
473    if (activeIndex == pos) return this.pause().cycle()
474
475    return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
476  }
477
478  Carousel.prototype.pause = function (e) {
479    e || (this.paused = true)
480
481    if (this.$element.find('.next, .prev').length && $.support.transition) {
482      this.$element.trigger($.support.transition.end)
483      this.cycle(true)
484    }
485
486    this.interval = clearInterval(this.interval)
487
488    return this
489  }
490
491  Carousel.prototype.next = function () {
492    if (this.sliding) return
493    return this.slide('next')
494  }
495
496  Carousel.prototype.prev = function () {
497    if (this.sliding) return
498    return this.slide('prev')
499  }
500
501  Carousel.prototype.slide = function (type, next) {
502    var $active   = this.$element.find('.item.active')
503    var $next     = next || this.getItemForDirection(type, $active)
504    var isCycling = this.interval
505    var direction = type == 'next' ? 'left' : 'right'
506    var that      = this
507
508    if ($next.hasClass('active')) return (this.sliding = false)
509
510    var relatedTarget = $next[0]
511    var slideEvent = $.Event('slide.bs.carousel', {
512      relatedTarget: relatedTarget,
513      direction: direction
514    })
515    this.$element.trigger(slideEvent)
516    if (slideEvent.isDefaultPrevented()) return
517
518    this.sliding = true
519
520    isCycling && this.pause()
521
522    if (this.$indicators.length) {
523      this.$indicators.find('.active').removeClass('active')
524      var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
525      $nextIndicator && $nextIndicator.addClass('active')
526    }
527
528    var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
529    if ($.support.transition && this.$element.hasClass('slide')) {
530      $next.addClass(type)
531      $next[0].offsetWidth // force reflow
532      $active.addClass(direction)
533      $next.addClass(direction)
534      $active
535        .one('bsTransitionEnd', function () {
536          $next.removeClass([type, direction].join(' ')).addClass('active')
537          $active.removeClass(['active', direction].join(' '))
538          that.sliding = false
539          setTimeout(function () {
540            that.$element.trigger(slidEvent)
541          }, 0)
542        })
543        .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
544    } else {
545      $active.removeClass('active')
546      $next.addClass('active')
547      this.sliding = false
548      this.$element.trigger(slidEvent)
549    }
550
551    isCycling && this.cycle()
552
553    return this
554  }
555
556
557  // CAROUSEL PLUGIN DEFINITION
558  // ==========================
559
560  function Plugin(option) {
561    return this.each(function () {
562      var $this   = $(this)
563      var data    = $this.data('bs.carousel')
564      var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
565      var action  = typeof option == 'string' ? option : options.slide
566
567      if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
568      if (typeof option == 'number') data.to(option)
569      else if (action) data[action]()
570      else if (options.interval) data.pause().cycle()
571    })
572  }
573
574  var old = $.fn.carousel
575
576  $.fn.carousel             = Plugin
577  $.fn.carousel.Constructor = Carousel
578
579
580  // CAROUSEL NO CONFLICT
581  // ====================
582
583  $.fn.carousel.noConflict = function () {
584    $.fn.carousel = old
585    return this
586  }
587
588
589  // CAROUSEL DATA-API
590  // =================
591
592  var clickHandler = function (e) {
593    var href
594    var $this   = $(this)
595    var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
596    if (!$target.hasClass('carousel')) return
597    var options = $.extend({}, $target.data(), $this.data())
598    var slideIndex = $this.attr('data-slide-to')
599    if (slideIndex) options.interval = false
600
601    Plugin.call($target, options)
602
603    if (slideIndex) {
604      $target.data('bs.carousel').to(slideIndex)
605    }
606
607    e.preventDefault()
608  }
609
610  $(document)
611    .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
612    .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
613
614  $(window).on('load', function () {
615    $('[data-ride="carousel"]').each(function () {
616      var $carousel = $(this)
617      Plugin.call($carousel, $carousel.data())
618    })
619  })
620
621}(jQuery);
vendor: 20,728 bytes, lines 622-1341
622;
623/* ========================================================================
624 * Bootstrap: collapse.js v3.3.7
625 * http://getbootstrap.com/javascript/#collapse
626 * ========================================================================
627 * Copyright 2011-2016 Twitter, Inc.
628 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
629 * ======================================================================== */
630
631/* jshint latedef: false */
632
633+function ($) {
634  'use strict';
635
636  // COLLAPSE PUBLIC CLASS DEFINITION
637  // ================================
638
639  var Collapse = function (element, options) {
640    this.$element      = $(element)
641    this.options       = $.extend({}, Collapse.DEFAULTS, options)
642    this.$trigger      = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
643                           '[data-toggle="collapse"][data-target="#' + element.id + '"]')
644    this.transitioning = null
645
646    if (this.options.parent) {
647      this.$parent = this.getParent()
648    } else {
649      this.addAriaAndCollapsedClass(this.$element, this.$trigger)
650    }
651
652    if (this.options.toggle) this.toggle()
653  }
654
655  Collapse.VERSION  = '3.3.7'
656
657  Collapse.TRANSITION_DURATION = 350
658
659  Collapse.DEFAULTS = {
660    toggle: true
661  }
662
663  Collapse.prototype.dimension = function () {
664    var hasWidth = this.$element.hasClass('width')
665    return hasWidth ? 'width' : 'height'
666  }
667
668  Collapse.prototype.show = function () {
669    if (this.transitioning || this.$element.hasClass('in')) return
670
671    var activesData
672    var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
673
674    if (actives && actives.length) {
675      activesData = actives.data('bs.collapse')
676      if (activesData && activesData.transitioning) return
677    }
678
679    var startEvent = $.Event('show.bs.collapse')
680    this.$element.trigger(startEvent)
681    if (startEvent.isDefaultPrevented()) return
682
683    if (actives && actives.length) {
684      Plugin.call(actives, 'hide')
685      activesData || actives.data('bs.collapse', null)
686    }
687
688    var dimension = this.dimension()
689
690    this.$element
691      .removeClass('collapse')
692      .addClass('collapsing')[dimension](0)
693      .attr('aria-expanded', true)
694
695    this.$trigger
696      .removeClass('collapsed')
697      .attr('aria-expanded', true)
698
699    this.transitioning = 1
700
701    var complete = function () {
702      this.$element
703        .removeClass('collapsing')
704        .addClass('collapse in')[dimension]('')
705      this.transitioning = 0
706      this.$element
707        .trigger('shown.bs.collapse')
708    }
709
710    if (!$.support.transition) return complete.call(this)
711
712    var scrollSize = $.camelCase(['scroll', dimension].join('-'))
713
714    this.$element
715      .one('bsTransitionEnd', $.proxy(complete, this))
716      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
717  }
718
719  Collapse.prototype.hide = function () {
720    if (this.transitioning || !this.$element.hasClass('in')) return
721
722    var startEvent = $.Event('hide.bs.collapse')
723    this.$element.trigger(startEvent)
724    if (startEvent.isDefaultPrevented()) return
725
726    var dimension = this.dimension()
727
728    this.$element[dimension](this.$element[dimension]())[0].offsetHeight
729
730    this.$element
731      .addClass('collapsing')
732      .removeClass('collapse in')
733      .attr('aria-expanded', false)
734
735    this.$trigger
736      .addClass('collapsed')
737      .attr('aria-expanded', false)
738
739    this.transitioning = 1
740
741    var complete = function () {
742      this.transitioning = 0
743      this.$element
744        .removeClass('collapsing')
745        .addClass('collapse')
746        .trigger('hidden.bs.collapse')
747    }
748
749    if (!$.support.transition) return complete.call(this)
750
751    this.$element
752      [dimension](0)
753      .one('bsTransitionEnd', $.proxy(complete, this))
754      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
755  }
756
757  Collapse.prototype.toggle = function () {
758    this[this.$element.hasClass('in') ? 'hide' : 'show']()
759  }
760
761  Collapse.prototype.getParent = function () {
762    return $(this.options.parent)
763      .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
764      .each($.proxy(function (i, element) {
765        var $element = $(element)
766        this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
767      }, this))
768      .end()
769  }
770
771  Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
772    var isOpen = $element.hasClass('in')
773
774    $element.attr('aria-expanded', isOpen)
775    $trigger
776      .toggleClass('collapsed', !isOpen)
777      .attr('aria-expanded', isOpen)
778  }
779
780  function getTargetFromTrigger($trigger) {
781    var href
782    var target = $trigger.attr('data-target')
783      || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
784
785    return $(target)
786  }
787
788
789  // COLLAPSE PLUGIN DEFINITION
790  // ==========================
791
792  function Plugin(option) {
793    return this.each(function () {
794      var $this   = $(this)
795      var data    = $this.data('bs.collapse')
796      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
797
798      if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
799      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
800      if (typeof option == 'string') data[option]()
801    })
802  }
803
804  var old = $.fn.collapse
805
806  $.fn.collapse             = Plugin
807  $.fn.collapse.Constructor = Collapse
808
809
810  // COLLAPSE NO CONFLICT
811  // ====================
812
813  $.fn.collapse.noConflict = function () {
814    $.fn.collapse = old
815    return this
816  }
817
818
819  // COLLAPSE DATA-API
820  // =================
821
822  $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
823    var $this   = $(this)
824
825    if (!$this.attr('data-target')) e.preventDefault()
826
827    var $target = getTargetFromTrigger($this)
828    var data    = $target.data('bs.collapse')
829    var option  = data ? 'toggle' : $this.data()
830
831    Plugin.call($target, option)
832  })
833
834}(jQuery);
835;
836/* ========================================================================
837 * Bootstrap: dropdown.js v3.3.7
838 * http://getbootstrap.com/javascript/#dropdowns
839 * ========================================================================
840 * Copyright 2011-2016 Twitter, Inc.
841 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
842 * ======================================================================== */
843
844
845+function ($) {
846  'use strict';
847
848  // DROPDOWN CLASS DEFINITION
849  // =========================
850
851  var backdrop = '.dropdown-backdrop'
852  var toggle   = '[data-toggle="dropdown"]'
853  var Dropdown = function (element) {
854    $(element).on('click.bs.dropdown', this.toggle)
855  }
856
857  Dropdown.VERSION = '3.3.7'
858
859  function getParent($this) {
860    var selector = $this.attr('data-target')
861
862    if (!selector) {
863      selector = $this.attr('href')
864      selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
865    }
866
867    var $parent = selector && $(selector)
868
869    return $parent && $parent.length ? $parent : $this.parent()
870  }
871
872  function clearMenus(e) {
873    if (e && e.which === 3) return
874    $(backdrop).remove()
875    $(toggle).each(function () {
876      var $this         = $(this)
877      var $parent       = getParent($this)
878      var relatedTarget = { relatedTarget: this }
879
880      if (!$parent.hasClass('open')) return
881
882      if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
883
884      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
885
886      if (e.isDefaultPrevented()) return
887
888      $this.attr('aria-expanded', 'false')
889      $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
890    })
891  }
892
893  Dropdown.prototype.toggle = function (e) {
894    var $this = $(this)
895
896    if ($this.is('.disabled, :disabled')) return
897
898    var $parent  = getParent($this)
899    var isActive = $parent.hasClass('open')
900
901    clearMenus()
902
903    if (!isActive) {
904      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
905        // if mobile we use a backdrop because click events don't delegate
906        $(document.createElement('div'))
907          .addClass('dropdown-backdrop')
908          .insertAfter($(this))
909          .on('click', clearMenus)
910      }
911
912      var relatedTarget = { relatedTarget: this }
913      $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
914
915      if (e.isDefaultPrevented()) return
916
917      $this
918        .trigger('focus')
919        .attr('aria-expanded', 'true')
920
921      $parent
922        .toggleClass('open')
923        .trigger($.Event('shown.bs.dropdown', relatedTarget))
924    }
925
926    return false
927  }
928
929  Dropdown.prototype.keydown = function (e) {
930    if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
931
932    var $this = $(this)
933
934    e.preventDefault()
935    e.stopPropagation()
936
937    if ($this.is('.disabled, :disabled')) return
938
939    var $parent  = getParent($this)
940    var isActive = $parent.hasClass('open')
941
942    if (!isActive && e.which != 27 || isActive && e.which == 27) {
943      if (e.which == 27) $parent.find(toggle).trigger('focus')
944      return $this.trigger('click')
945    }
946
947    var desc = ' li:not(.disabled):visible a'
948    var $items = $parent.find('.dropdown-menu' + desc)
949
950    if (!$items.length) return
951
952    var index = $items.index(e.target)
953
954    if (e.which == 38 && index > 0)                 index--         // up
955    if (e.which == 40 && index < $items.length - 1) index++         // down
956    if (!~index)                                    index = 0
957
958    $items.eq(index).trigger('focus')
959  }
960
961
962  // DROPDOWN PLUGIN DEFINITION
963  // ==========================
964
965  function Plugin(option) {
966    return this.each(function () {
967      var $this = $(this)
968      var data  = $this.data('bs.dropdown')
969
970      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
971      if (typeof option == 'string') data[option].call($this)
972    })
973  }
974
975  var old = $.fn.dropdown
976
977  $.fn.dropdown             = Plugin
978  $.fn.dropdown.Constructor = Dropdown
979
980
981  // DROPDOWN NO CONFLICT
982  // ====================
983
984  $.fn.dropdown.noConflict = function () {
985    $.fn.dropdown = old
986    return this
987  }
988
989
990  // APPLY TO STANDARD DROPDOWN ELEMENTS
991  // ===================================
992
993  $(document)
994    .on('click.bs.dropdown.data-api', clearMenus)
995    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
996    .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
997    .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
998    .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
999
1000}(jQuery);
1001;
1002/* ========================================================================
1003 * Bootstrap: modal.js v3.3.7
1004 * http://getbootstrap.com/javascript/#modals
1005 * ========================================================================
1006 * Copyright 2011-2016 Twitter, Inc.
1007 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1008 * ======================================================================== */
1009
1010
1011+function ($) {
1012  'use strict';
1013
1014  // MODAL CLASS DEFINITION
1015  // ======================
1016
1017  var Modal = function (element, options) {
1018    this.options             = options
1019    this.$body               = $(document.body)
1020    this.$element            = $(element)
1021    this.$dialog             = this.$element.find('.modal-dialog')
1022    this.$backdrop           = null
1023    this.isShown             = null
1024    this.originalBodyPad     = null
1025    this.scrollbarWidth      = 0
1026    this.ignoreBackdropClick = false
1027
1028    if (this.options.remote) {
1029      this.$element
1030        .find('.modal-content')
1031        .load(this.options.remote, $.proxy(function () {
1032          this.$element.trigger('loaded.bs.modal')
1033        }, this))
1034    }
1035  }
1036
1037  Modal.VERSION  = '3.3.7'
1038
1039  Modal.TRANSITION_DURATION = 300
1040  Modal.BACKDROP_TRANSITION_DURATION = 150
1041
1042  Modal.DEFAULTS = {
1043    backdrop: true,
1044    keyboard: true,
1045    show: true
1046  }
1047
1048  Modal.prototype.toggle = function (_relatedTarget) {
1049    return this.isShown ? this.hide() : this.show(_relatedTarget)
1050  }
1051
1052  Modal.prototype.show = function (_relatedTarget) {
1053    var that = this
1054    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
1055
1056    this.$element.trigger(e)
1057
1058    if (this.isShown || e.isDefaultPrevented()) return
1059
1060    this.isShown = true
1061
1062    this.checkScrollbar()
1063    this.setScrollbar()
1064    this.$body.addClass('modal-open')
1065
1066    this.escape()
1067    this.resize()
1068
1069    this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
1070
1071    this.$dialog.on('mousedown.dismiss.bs.modal', function () {
1072      that.$element.one('mouseup.dismiss.bs.modal', function (e) {
1073        if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
1074      })
1075    })
1076
1077    this.backdrop(function () {
1078      var transition = $.support.transition && that.$element.hasClass('fade')
1079
1080      if (!that.$element.parent().length) {
1081        that.$element.appendTo(that.$body) // don't move modals dom position
1082      }
1083
1084      that.$element
1085        .show()
1086        .scrollTop(0)
1087
1088      that.adjustDialog()
1089
1090      if (transition) {
1091        that.$element[0].offsetWidth // force reflow
1092      }
1093
1094      that.$element.addClass('in')
1095
1096      that.enforceFocus()
1097
1098      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
1099
1100      transition ?
1101        that.$dialog // wait for modal to slide in
1102          .one('bsTransitionEnd', function () {
1103            that.$element.trigger('focus').trigger(e)
1104          })
1105          .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
1106        that.$element.trigger('focus').trigger(e)
1107    })
1108  }
1109
1110  Modal.prototype.hide = function (e) {
1111    if (e) e.preventDefault()
1112
1113    e = $.Event('hide.bs.modal')
1114
1115    this.$element.trigger(e)
1116
1117    if (!this.isShown || e.isDefaultPrevented()) return
1118
1119    this.isShown = false
1120
1121    this.escape()
1122    this.resize()
1123
1124    $(document).off('focusin.bs.modal')
1125
1126    this.$element
1127      .removeClass('in')
1128      .off('click.dismiss.bs.modal')
1129      .off('mouseup.dismiss.bs.modal')
1130
1131    this.$dialog.off('mousedown.dismiss.bs.modal')
1132
1133    $.support.transition && this.$element.hasClass('fade') ?
1134      this.$element
1135        .one('bsTransitionEnd', $.proxy(this.hideModal, this))
1136        .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
1137      this.hideModal()
1138  }
1139
1140  Modal.prototype.enforceFocus = function () {
1141    $(document)
1142      .off('focusin.bs.modal') // guard against infinite focus loop
1143      .on('focusin.bs.modal', $.proxy(function (e) {
1144        if (document !== e.target &&
1145            this.$element[0] !== e.target &&
1146            !this.$element.has(e.target).length) {
1147          this.$element.trigger('focus')
1148        }
1149      }, this))
1150  }
1151
1152  Modal.prototype.escape = function () {
1153    if (this.isShown && this.options.keyboard) {
1154      this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
1155        e.which == 27 && this.hide()
1156      }, this))
1157    } else if (!this.isShown) {
1158      this.$element.off('keydown.dismiss.bs.modal')
1159    }
1160  }
1161
1162  Modal.prototype.resize = function () {
1163    if (this.isShown) {
1164      $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
1165    } else {
1166      $(window).off('resize.bs.modal')
1167    }
1168  }
1169
1170  Modal.prototype.hideModal = function () {
1171    var that = this
1172    this.$element.hide()
1173    this.backdrop(function () {
1174      that.$body.removeClass('modal-open')
1175      that.resetAdjustments()
1176      that.resetScrollbar()
1177      that.$element.trigger('hidden.bs.modal')
1178    })
1179  }
1180
1181  Modal.prototype.removeBackdrop = function () {
1182    this.$backdrop && this.$backdrop.remove()
1183    this.$backdrop = null
1184  }
1185
1186  Modal.prototype.backdrop = function (callback) {
1187    var that = this
1188    var animate = this.$element.hasClass('fade') ? 'fade' : ''
1189
1190    if (this.isShown && this.options.backdrop) {
1191      var doAnimate = $.support.transition && animate
1192
1193      this.$backdrop = $(document.createElement('div'))
1194        .addClass('modal-backdrop ' + animate)
1195        .appendTo(this.$body)
1196
1197      this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
1198        if (this.ignoreBackdropClick) {
1199          this.ignoreBackdropClick = false
1200          return
1201        }
1202        if (e.target !== e.currentTarget) return
1203        this.options.backdrop == 'static'
1204          ? this.$element[0].focus()
1205          : this.hide()
1206      }, this))
1207
1208      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
1209
1210      this.$backdrop.addClass('in')
1211
1212      if (!callback) return
1213
1214      doAnimate ?
1215        this.$backdrop
1216          .one('bsTransitionEnd', callback)
1217          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
1218        callback()
1219
1220    } else if (!this.isShown && this.$backdrop) {
1221      this.$backdrop.removeClass('in')
1222
1223      var callbackRemove = function () {
1224        that.removeBackdrop()
1225        callback && callback()
1226      }
1227      $.support.transition && this.$element.hasClass('fade') ?
1228        this.$backdrop
1229          .one('bsTransitionEnd', callbackRemove)
1230          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
1231        callbackRemove()
1232
1233    } else if (callback) {
1234      callback()
1235    }
1236  }
1237
1238  // these following methods are used to handle overflowing modals
1239
1240  Modal.prototype.handleUpdate = function () {
1241    this.adjustDialog()
1242  }
1243
1244  Modal.prototype.adjustDialog = function () {
1245    var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
1246
1247    this.$element.css({
1248      paddingLeft:  !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
1249      paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
1250    })
1251  }
1252
1253  Modal.prototype.resetAdjustments = function () {
1254    this.$element.css({
1255      paddingLeft: '',
1256      paddingRight: ''
1257    })
1258  }
1259
1260  Modal.prototype.checkScrollbar = function () {
1261    var fullWindowWidth = window.innerWidth
1262    if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
1263      var documentElementRect = document.documentElement.getBoundingClientRect()
1264      fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
1265    }
1266    this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
1267    this.scrollbarWidth = this.measureScrollbar()
1268  }
1269
1270  Modal.prototype.setScrollbar = function () {
1271    var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
1272    this.originalBodyPad = document.body.style.paddingRight || ''
1273    if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
1274  }
1275
1276  Modal.prototype.resetScrollbar = function () {
1277    this.$body.css('padding-right', this.originalBodyPad)
1278  }
1279
1280  Modal.prototype.measureScrollbar = function () { // thx walsh
1281    var scrollDiv = document.createElement('div')
1282    scrollDiv.className = 'modal-scrollbar-measure'
1283    this.$body.append(scrollDiv)
1284    var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
1285    this.$body[0].removeChild(scrollDiv)
1286    return scrollbarWidth
1287  }
1288
1289
1290  // MODAL PLUGIN DEFINITION
1291  // =======================
1292
1293  function Plugin(option, _relatedTarget) {
1294    return this.each(function () {
1295      var $this   = $(this)
1296      var data    = $this.data('bs.modal')
1297      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
1298
1299      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
1300      if (typeof option == 'string') data[option](_relatedTarget)
1301      else if (options.show) data.show(_relatedTarget)
1302    })
1303  }
1304
1305  var old = $.fn.modal
1306
1307  $.fn.modal             = Plugin
1308  $.fn.modal.Constructor = Modal
1309
1310
1311  // MODAL NO CONFLICT
1312  // =================
1313
1314  $.fn.modal.noConflict = function () {
1315    $.fn.modal = old
1316    return this
1317  }
1318
1319
1320  // MODAL DATA-API
1321  // ==============
1322
1323  $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
1324    var $this   = $(this)
1325    var href    = $this.attr('href')
1326    var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
1327    var option  = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
1328
1329    if ($this.is('a')) e.preventDefault()
1330
1331    $target.one('show.bs.modal', function (showEvent) {
1332      if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
1333      $target.one('hidden.bs.modal', function () {
1334        $this.is(':visible') && $this.trigger('focus')
1335      })
1336    })
1337    Plugin.call($target, option, this)
1338  })
1339
1340}(jQuery);
1341;
vendor: 16,720 bytes, lines 1341-1861
1341
1342/* ========================================================================
1343 * Bootstrap: tooltip.js v3.3.7
1344 * http://getbootstrap.com/javascript/#tooltip
1345 * Inspired by the original jQuery.tipsy by Jason Frame
1346 * ========================================================================
1347 * Copyright 2011-2016 Twitter, Inc.
1348 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1349 * ======================================================================== */
1350
1351
1352+function ($) {
1353  'use strict';
1354
1355  // TOOLTIP PUBLIC CLASS DEFINITION
1356  // ===============================
1357
1358  var Tooltip = function (element, options) {
1359    this.type       = null
1360    this.options    = null
1361    this.enabled    = null
1362    this.timeout    = null
1363    this.hoverState = null
1364    this.$element   = null
1365    this.inState    = null
1366
1367    this.init('tooltip', element, options)
1368  }
1369
1370  Tooltip.VERSION  = '3.3.7'
1371
1372  Tooltip.TRANSITION_DURATION = 150
1373
1374  Tooltip.DEFAULTS = {
1375    animation: true,
1376    placement: 'top',
1377    selector: false,
1378    template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
1379    trigger: 'hover focus',
1380    title: '',
1381    delay: 0,
1382    html: false,
1383    container: false,
1384    viewport: {
1385      selector: 'body',
1386      padding: 0
1387    }
1388  }
1389
1390  Tooltip.prototype.init = function (type, element, options) {
1391    this.enabled   = true
1392    this.type      = type
1393    this.$element  = $(element)
1394    this.options   = this.getOptions(options)
1395    this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
1396    this.inState   = { click: false, hover: false, focus: false }
1397
1398    if (this.$element[0] instanceof document.constructor && !this.options.selector) {
1399      throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
1400    }
1401
1402    var triggers = this.options.trigger.split(' ')
1403
1404    for (var i = triggers.length; i--;) {
1405      var trigger = triggers[i]
1406
1407      if (trigger == 'click') {
1408        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
1409      } else if (trigger != 'manual') {
1410        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'
1411        var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
1412
1413        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
1414        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
1415      }
1416    }
1417
1418    this.options.selector ?
1419      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
1420      this.fixTitle()
1421  }
1422
1423  Tooltip.prototype.getDefaults = function () {
1424    return Tooltip.DEFAULTS
1425  }
1426
1427  Tooltip.prototype.getOptions = function (options) {
1428    options = $.extend({}, this.getDefaults(), this.$element.data(), options)
1429
1430    if (options.delay && typeof options.delay == 'number') {
1431      options.delay = {
1432        show: options.delay,
1433        hide: options.delay
1434      }
1435    }
1436
1437    return options
1438  }
1439
1440  Tooltip.prototype.getDelegateOptions = function () {
1441    var options  = {}
1442    var defaults = this.getDefaults()
1443
1444    this._options && $.each(this._options, function (key, value) {
1445      if (defaults[key] != value) options[key] = value
1446    })
1447
1448    return options
1449  }
1450
1451  Tooltip.prototype.enter = function (obj) {
1452    var self = obj instanceof this.constructor ?
1453      obj : $(obj.currentTarget).data('bs.' + this.type)
1454
1455    if (!self) {
1456      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1457      $(obj.currentTarget).data('bs.' + this.type, self)
1458    }
1459
1460    if (obj instanceof $.Event) {
1461      self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
1462    }
1463
1464    if (self.tip().hasClass('in') || self.hoverState == 'in') {
1465      self.hoverState = 'in'
1466      return
1467    }
1468
1469    clearTimeout(self.timeout)
1470
1471    self.hoverState = 'in'
1472
1473    if (!self.options.delay || !self.options.delay.show) return self.show()
1474
1475    self.timeout = setTimeout(function () {
1476      if (self.hoverState == 'in') self.show()
1477    }, self.options.delay.show)
1478  }
1479
1480  Tooltip.prototype.isInStateTrue = function () {
1481    for (var key in this.inState) {
1482      if (this.inState[key]) return true
1483    }
1484
1485    return false
1486  }
1487
1488  Tooltip.prototype.leave = function (obj) {
1489    var self = obj instanceof this.constructor ?
1490      obj : $(obj.currentTarget).data('bs.' + this.type)
1491
1492    if (!self) {
1493      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1494      $(obj.currentTarget).data('bs.' + this.type, self)
1495    }
1496
1497    if (obj instanceof $.Event) {
1498      self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
1499    }
1500
1501    if (self.isInStateTrue()) return
1502
1503    clearTimeout(self.timeout)
1504
1505    self.hoverState = 'out'
1506
1507    if (!self.options.delay || !self.options.delay.hide) return self.hide()
1508
1509    self.timeout = setTimeout(function () {
1510      if (self.hoverState == 'out') self.hide()
1511    }, self.options.delay.hide)
1512  }
1513
1514  Tooltip.prototype.show = function () {
1515    var e = $.Event('show.bs.' + this.type)
1516
1517    if (this.hasContent() && this.enabled) {
1518      this.$element.trigger(e)
1519
1520      var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
1521      if (e.isDefaultPrevented() || !inDom) return
1522      var that = this
1523
1524      var $tip = this.tip()
1525
1526      var tipId = this.getUID(this.type)
1527
1528      this.setContent()
1529      $tip.attr('id', tipId)
1530      this.$element.attr('aria-describedby', tipId)
1531
1532      if (this.options.animation) $tip.addClass('fade')
1533
1534      var placement = typeof this.options.placement == 'function' ?
1535        this.options.placement.call(this, $tip[0], this.$element[0]) :
1536        this.options.placement
1537
1538      var autoToken = /\s?auto?\s?/i
1539      var autoPlace = autoToken.test(placement)
1540      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
1541
1542      $tip
1543        .detach()
1544        .css({ top: 0, left: 0, display: 'block' })
1545        .addClass(placement)
1546        .data('bs.' + this.type, this)
1547
1548      this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
1549      this.$element.trigger('inserted.bs.' + this.type)
1550
1551      var pos          = this.getPosition()
1552      var actualWidth  = $tip[0].offsetWidth
1553      var actualHeight = $tip[0].offsetHeight
1554
1555      if (autoPlace) {
1556        var orgPlacement = placement
1557        var viewportDim = this.getPosition(this.$viewport)
1558
1559        placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top'    :
1560                    placement == 'top'    && pos.top    - actualHeight < viewportDim.top    ? 'bottom' :
1561                    placement == 'right'  && pos.right  + actualWidth  > viewportDim.width  ? 'left'   :
1562                    placement == 'left'   && pos.left   - actualWidth  < viewportDim.left   ? 'right'  :
1563                    placement
1564
1565        $tip
1566          .removeClass(orgPlacement)
1567          .addClass(placement)
1568      }
1569
1570      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
1571
1572      this.applyPlacement(calculatedOffset, placement)
1573
1574      var complete = function () {
1575        var prevHoverState = that.hoverState
1576        that.$element.trigger('shown.bs.' + that.type)
1577        that.hoverState = null
1578
1579        if (prevHoverState == 'out') that.leave(that)
1580      }
1581
1582      $.support.transition && this.$tip.hasClass('fade') ?
1583        $tip
1584          .one('bsTransitionEnd', complete)
1585          .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
1586        complete()
1587    }
1588  }
1589
1590  Tooltip.prototype.applyPlacement = function (offset, placement) {
1591    var $tip   = this.tip()
1592    var width  = $tip[0].offsetWidth
1593    var height = $tip[0].offsetHeight
1594
1595    // manually read margins because getBoundingClientRect includes difference
1596    var marginTop = parseInt($tip.css('margin-top'), 10)
1597    var marginLeft = parseInt($tip.css('margin-left'), 10)
1598
1599    // we must check for NaN for ie 8/9
1600    if (isNaN(marginTop))  marginTop  = 0
1601    if (isNaN(marginLeft)) marginLeft = 0
1602
1603    offset.top  += marginTop
1604    offset.left += marginLeft
1605
1606    // $.fn.offset doesn't round pixel values
1607    // so we use setOffset directly with our own function B-0
1608    $.offset.setOffset($tip[0], $.extend({
1609      using: function (props) {
1610        $tip.css({
1611          top: Math.round(props.top),
1612          left: Math.round(props.left)
1613        })
1614      }
1615    }, offset), 0)
1616
1617    $tip.addClass('in')
1618
1619    // check to see if placing tip in new offset caused the tip to resize itself
1620    var actualWidth  = $tip[0].offsetWidth
1621    var actualHeight = $tip[0].offsetHeight
1622
1623    if (placement == 'top' && actualHeight != height) {
1624      offset.top = offset.top + height - actualHeight
1625    }
1626
1627    var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
1628
1629    if (delta.left) offset.left += delta.left
1630    else offset.top += delta.top
1631
1632    var isVertical          = /top|bottom/.test(placement)
1633    var arrowDelta          = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
1634    var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
1635
1636    $tip.offset(offset)
1637    this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
1638  }
1639
1640  Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
1641    this.arrow()
1642      .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
1643      .css(isVertical ? 'top' : 'left', '')
1644  }
1645
1646  Tooltip.prototype.setContent = function () {
1647    var $tip  = this.tip()
1648    var title = this.getTitle()
1649
1650    $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
1651    $tip.removeClass('fade in top bottom left right')
1652  }
1653
1654  Tooltip.prototype.hide = function (callback) {
1655    var that = this
1656    var $tip = $(this.$tip)
1657    var e    = $.Event('hide.bs.' + this.type)
1658
1659    function complete() {
1660      if (that.hoverState != 'in') $tip.detach()
1661      if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
1662        that.$element
1663          .removeAttr('aria-describedby')
1664          .trigger('hidden.bs.' + that.type)
1665      }
1666      callback && callback()
1667    }
1668
1669    this.$element.trigger(e)
1670
1671    if (e.isDefaultPrevented()) return
1672
1673    $tip.removeClass('in')
1674
1675    $.support.transition && $tip.hasClass('fade') ?
1676      $tip
1677        .one('bsTransitionEnd', complete)
1678        .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
1679      complete()
1680
1681    this.hoverState = null
1682
1683    return this
1684  }
1685
1686  Tooltip.prototype.fixTitle = function () {
1687    var $e = this.$element
1688    if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
1689      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
1690    }
1691  }
1692
1693  Tooltip.prototype.hasContent = function () {
1694    return this.getTitle()
1695  }
1696
1697  Tooltip.prototype.getPosition = function ($element) {
1698    $element   = $element || this.$element
1699
1700    var el     = $element[0]
1701    var isBody = el.tagName == 'BODY'
1702
1703    var elRect    = el.getBoundingClientRect()
1704    if (elRect.width == null) {
1705      // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
1706      elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
1707    }
1708    var isSvg = window.SVGElement && el instanceof window.SVGElement
1709    // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
1710    // See https://github.com/twbs/bootstrap/issues/20280
1711    var elOffset  = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
1712    var scroll    = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
1713    var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
1714
1715    return $.extend({}, elRect, scroll, outerDims, elOffset)
1716  }
1717
1718  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
1719    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2 } :
1720           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1721           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
1722        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
1723
1724  }
1725
1726  Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
1727    var delta = { top: 0, left: 0 }
1728    if (!this.$viewport) return delta
1729
1730    var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
1731    var viewportDimensions = this.getPosition(this.$viewport)
1732
1733    if (/right|left/.test(placement)) {
1734      var topEdgeOffset    = pos.top - viewportPadding - viewportDimensions.scroll
1735      var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
1736      if (topEdgeOffset < viewportDimensions.top) { // top overflow
1737        delta.top = viewportDimensions.top - topEdgeOffset
1738      } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
1739        delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
1740      }
1741    } else {
1742      var leftEdgeOffset  = pos.left - viewportPadding
1743      var rightEdgeOffset = pos.left + viewportPadding + actualWidth
1744      if (leftEdgeOffset < viewportDimensions.left) { // left overflow
1745        delta.left = viewportDimensions.left - leftEdgeOffset
1746      } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
1747        delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
1748      }
1749    }
1750
1751    return delta
1752  }
1753
1754  Tooltip.prototype.getTitle = function () {
1755    var title
1756    var $e = this.$element
1757    var o  = this.options
1758
1759    title = $e.attr('data-original-title')
1760      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
1761
1762    return title
1763  }
1764
1765  Tooltip.prototype.getUID = function (prefix) {
1766    do prefix += ~~(Math.random() * 1000000)
1767    while (document.getElementById(prefix))
1768    return prefix
1769  }
1770
1771  Tooltip.prototype.tip = function () {
1772    if (!this.$tip) {
1773      this.$tip = $(this.options.template)
1774      if (this.$tip.length != 1) {
1775        throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
1776      }
1777    }
1778    return this.$tip
1779  }
1780
1781  Tooltip.prototype.arrow = function () {
1782    return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
1783  }
1784
1785  Tooltip.prototype.enable = function () {
1786    this.enabled = true
1787  }
1788
1789  Tooltip.prototype.disable = function () {
1790    this.enabled = false
1791  }
1792
1793  Tooltip.prototype.toggleEnabled = function () {
1794    this.enabled = !this.enabled
1795  }
1796
1797  Tooltip.prototype.toggle = function (e) {
1798    var self = this
1799    if (e) {
1800      self = $(e.currentTarget).data('bs.' + this.type)
1801      if (!self) {
1802        self = new this.constructor(e.currentTarget, this.getDelegateOptions())
1803        $(e.currentTarget).data('bs.' + this.type, self)
1804      }
1805    }
1806
1807    if (e) {
1808      self.inState.click = !self.inState.click
1809      if (self.isInStateTrue()) self.enter(self)
1810      else self.leave(self)
1811    } else {
1812      self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
1813    }
1814  }
1815
1816  Tooltip.prototype.destroy = function () {
1817    var that = this
1818    clearTimeout(this.timeout)
1819    this.hide(function () {
1820      that.$element.off('.' + that.type).removeData('bs.' + that.type)
1821      if (that.$tip) {
1822        that.$tip.detach()
1823      }
1824      that.$tip = null
1825      that.$arrow = null
1826      that.$viewport = null
1827      that.$element = null
1828    })
1829  }
1830
1831
1832  // TOOLTIP PLUGIN DEFINITION
1833  // =========================
1834
1835  function Plugin(option) {
1836    return this.each(function () {
1837      var $this   = $(this)
1838      var data    = $this.data('bs.tooltip')
1839      var options = typeof option == 'object' && option
1840
1841      if (!data && /destroy|hide/.test(option)) return
1842      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
1843      if (typeof option == 'string') data[option]()
1844    })
1845  }
1846
1847  var old = $.fn.tooltip
1848
1849  $.fn.tooltip             = Plugin
1850  $.fn.tooltip.Constructor = Tooltip
1851
1852
1853  // TOOLTIP NO CONFLICT
1854  // ===================
1855
1856  $.fn.tooltip.noConflict = function () {
1857    $.fn.tooltip = old
1858    return this
1859  }
1860
1861}(jQuery);
vendor: 12,250 bytes, lines 1862-2312
1862;
1863/* ========================================================================
1864 * Bootstrap: popover.js v3.3.7
1865 * http://getbootstrap.com/javascript/#popovers
1866 * ========================================================================
1867 * Copyright 2011-2016 Twitter, Inc.
1868 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1869 * ======================================================================== */
1870
1871
1872+function ($) {
1873  'use strict';
1874
1875  // POPOVER PUBLIC CLASS DEFINITION
1876  // ===============================
1877
1878  var Popover = function (element, options) {
1879    this.init('popover', element, options)
1880  }
1881
1882  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
1883
1884  Popover.VERSION  = '3.3.7'
1885
1886  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
1887    placement: 'right',
1888    trigger: 'click',
1889    content: '',
1890    template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
1891  })
1892
1893
1894  // NOTE: POPOVER EXTENDS tooltip.js
1895  // ================================
1896
1897  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
1898
1899  Popover.prototype.constructor = Popover
1900
1901  Popover.prototype.getDefaults = function () {
1902    return Popover.DEFAULTS
1903  }
1904
1905  Popover.prototype.setContent = function () {
1906    var $tip    = this.tip()
1907    var title   = this.getTitle()
1908    var content = this.getContent()
1909
1910    $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
1911    $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
1912      this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
1913    ](content)
1914
1915    $tip.removeClass('fade top bottom left right in')
1916
1917    // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
1918    // this manually by checking the contents.
1919    if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
1920  }
1921
1922  Popover.prototype.hasContent = function () {
1923    return this.getTitle() || this.getContent()
1924  }
1925
1926  Popover.prototype.getContent = function () {
1927    var $e = this.$element
1928    var o  = this.options
1929
1930    return $e.attr('data-content')
1931      || (typeof o.content == 'function' ?
1932            o.content.call($e[0]) :
1933            o.content)
1934  }
1935
1936  Popover.prototype.arrow = function () {
1937    return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
1938  }
1939
1940
1941  // POPOVER PLUGIN DEFINITION
1942  // =========================
1943
1944  function Plugin(option) {
1945    return this.each(function () {
1946      var $this   = $(this)
1947      var data    = $this.data('bs.popover')
1948      var options = typeof option == 'object' && option
1949
1950      if (!data && /destroy|hide/.test(option)) return
1951      if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
1952      if (typeof option == 'string') data[option]()
1953    })
1954  }
1955
1956  var old = $.fn.popover
1957
1958  $.fn.popover             = Plugin
1959  $.fn.popover.Constructor = Popover
1960
1961
1962  // POPOVER NO CONFLICT
1963  // ===================
1964
1965  $.fn.popover.noConflict = function () {
1966    $.fn.popover = old
1967    return this
1968  }
1969
1970}(jQuery);
1971;
1972/* ========================================================================
1973 * Bootstrap: scrollspy.js v3.3.7
1974 * http://getbootstrap.com/javascript/#scrollspy
1975 * ========================================================================
1976 * Copyright 2011-2016 Twitter, Inc.
1977 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1978 * ======================================================================== */
1979
1980
1981+function ($) {
1982  'use strict';
1983
1984  // SCROLLSPY CLASS DEFINITION
1985  // ==========================
1986
1987  function ScrollSpy(element, options) {
1988    this.$body          = $(document.body)
1989    this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
1990    this.options        = $.extend({}, ScrollSpy.DEFAULTS, options)
1991    this.selector       = (this.options.target || '') + ' .nav li > a'
1992    this.offsets        = []
1993    this.targets        = []
1994    this.activeTarget   = null
1995    this.scrollHeight   = 0
1996
1997    this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
1998    this.refresh()
1999    this.process()
2000  }
2001
2002  ScrollSpy.VERSION  = '3.3.7'
2003
2004  ScrollSpy.DEFAULTS = {
2005    offset: 10
2006  }
2007
2008  ScrollSpy.prototype.getScrollHeight = function () {
2009    return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
2010  }
2011
2012  ScrollSpy.prototype.refresh = function () {
2013    var that          = this
2014    var offsetMethod  = 'offset'
2015    var offsetBase    = 0
2016
2017    this.offsets      = []
2018    this.targets      = []
2019    this.scrollHeight = this.getScrollHeight()
2020
2021    if (!$.isWindow(this.$scrollElement[0])) {
2022      offsetMethod = 'position'
2023      offsetBase   = this.$scrollElement.scrollTop()
2024    }
2025
2026    this.$body
2027      .find(this.selector)
2028      .map(function () {
2029        var $el   = $(this)
2030        var href  = $el.data('target') || $el.attr('href')
2031        var $href = /^#./.test(href) && $(href)
2032
2033        return ($href
2034          && $href.length
2035          && $href.is(':visible')
2036          && [[$href[offsetMethod]().top + offsetBase, href]]) || null
2037      })
2038      .sort(function (a, b) { return a[0] - b[0] })
2039      .each(function () {
2040        that.offsets.push(this[0])
2041        that.targets.push(this[1])
2042      })
2043  }
2044
2045  ScrollSpy.prototype.process = function () {
2046    var scrollTop    = this.$scrollElement.scrollTop() + this.options.offset
2047    var scrollHeight = this.getScrollHeight()
2048    var maxScroll    = this.options.offset + scrollHeight - this.$scrollElement.height()
2049    var offsets      = this.offsets
2050    var targets      = this.targets
2051    var activeTarget = this.activeTarget
2052    var i
2053
2054    if (this.scrollHeight != scrollHeight) {
2055      this.refresh()
2056    }
2057
2058    if (scrollTop >= maxScroll) {
2059      return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
2060    }
2061
2062    if (activeTarget && scrollTop < offsets[0]) {
2063      this.activeTarget = null
2064      return this.clear()
2065    }
2066
2067    for (i = offsets.length; i--;) {
2068      activeTarget != targets[i]
2069        && scrollTop >= offsets[i]
2070        && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
2071        && this.activate(targets[i])
2072    }
2073  }
2074
2075  ScrollSpy.prototype.activate = function (target) {
2076    this.activeTarget = target
2077
2078    this.clear()
2079
2080    var selector = this.selector +
2081      '[data-target="' + target + '"],' +
2082      this.selector + '[href="' + target + '"]'
2083
2084    var active = $(selector)
2085      .parents('li')
2086      .addClass('active')
2087
2088    if (active.parent('.dropdown-menu').length) {
2089      active = active
2090        .closest('li.dropdown')
2091        .addClass('active')
2092    }
2093
2094    active.trigger('activate.bs.scrollspy')
2095  }
2096
2097  ScrollSpy.prototype.clear = function () {
2098    $(this.selector)
2099      .parentsUntil(this.options.target, '.active')
2100      .removeClass('active')
2101  }
2102
2103
2104  // SCROLLSPY PLUGIN DEFINITION
2105  // ===========================
2106
2107  function Plugin(option) {
2108    return this.each(function () {
2109      var $this   = $(this)
2110      var data    = $this.data('bs.scrollspy')
2111      var options = typeof option == 'object' && option
2112
2113      if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
2114      if (typeof option == 'string') data[option]()
2115    })
2116  }
2117
2118  var old = $.fn.scrollspy
2119
2120  $.fn.scrollspy             = Plugin
2121  $.fn.scrollspy.Constructor = ScrollSpy
2122
2123
2124  // SCROLLSPY NO CONFLICT
2125  // =====================
2126
2127  $.fn.scrollspy.noConflict = function () {
2128    $.fn.scrollspy = old
2129    return this
2130  }
2131
2132
2133  // SCROLLSPY DATA-API
2134  // ==================
2135
2136  $(window).on('load.bs.scrollspy.data-api', function () {
2137    $('[data-spy="scroll"]').each(function () {
2138      var $spy = $(this)
2139      Plugin.call($spy, $spy.data())
2140    })
2141  })
2142
2143}(jQuery);
2144;
2145/* ========================================================================
2146 * Bootstrap: tab.js v3.3.7
2147 * http://getbootstrap.com/javascript/#tabs
2148 * ========================================================================
2149 * Copyright 2011-2016 Twitter, Inc.
2150 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2151 * ======================================================================== */
2152
2153
2154+function ($) {
2155  'use strict';
2156
2157  // TAB CLASS DEFINITION
2158  // ====================
2159
2160  var Tab = function (element) {
2161    // jscs:disable requireDollarBeforejQueryAssignment
2162    this.element = $(element)
2163    // jscs:enable requireDollarBeforejQueryAssignment
2164  }
2165
2166  Tab.VERSION = '3.3.7'
2167
2168  Tab.TRANSITION_DURATION = 150
2169
2170  Tab.prototype.show = function () {
2171    var $this    = this.element
2172    var $ul      = $this.closest('ul:not(.dropdown-menu)')
2173    var selector = $this.data('target')
2174
2175    if (!selector) {
2176      selector = $this.attr('href')
2177      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
2178    }
2179
2180    if ($this.parent('li').hasClass('active')) return
2181
2182    var $previous = $ul.find('.active:last a')
2183    var hideEvent = $.Event('hide.bs.tab', {
2184      relatedTarget: $this[0]
2185    })
2186    var showEvent = $.Event('show.bs.tab', {
2187      relatedTarget: $previous[0]
2188    })
2189
2190    $previous.trigger(hideEvent)
2191    $this.trigger(showEvent)
2192
2193    if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
2194
2195    var $target = $(selector)
2196
2197    this.activate($this.closest('li'), $ul)
2198    this.activate($target, $target.parent(), function () {
2199      $previous.trigger({
2200        type: 'hidden.bs.tab',
2201        relatedTarget: $this[0]
2202      })
2203      $this.trigger({
2204        type: 'shown.bs.tab',
2205        relatedTarget: $previous[0]
2206      })
2207    })
2208  }
2209
2210  Tab.prototype.activate = function (element, container, callback) {
2211    var $active    = container.find('> .active')
2212    var transition = callback
2213      && $.support.transition
2214      && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
2215
2216    function next() {
2217      $active
2218        .removeClass('active')
2219        .find('> .dropdown-menu > .active')
2220          .removeClass('active')
2221        .end()
2222        .find('[data-toggle="tab"]')
2223          .attr('aria-expanded', false)
2224
2225      element
2226        .addClass('active')
2227        .find('[data-toggle="tab"]')
2228          .attr('aria-expanded', true)
2229
2230      if (transition) {
2231        element[0].offsetWidth // reflow for transition
2232        element.addClass('in')
2233      } else {
2234        element.removeClass('fade')
2235      }
2236
2237      if (element.parent('.dropdown-menu').length) {
2238        element
2239          .closest('li.dropdown')
2240            .addClass('active')
2241          .end()
2242          .find('[data-toggle="tab"]')
2243            .attr('aria-expanded', true)
2244      }
2245
2246      callback && callback()
2247    }
2248
2249    $active.length && transition ?
2250      $active
2251        .one('bsTransitionEnd', next)
2252        .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
2253      next()
2254
2255    $active.removeClass('in')
2256  }
2257
2258
2259  // TAB PLUGIN DEFINITION
2260  // =====================
2261
2262  function Plugin(option) {
2263    return this.each(function () {
2264      var $this = $(this)
2265      var data  = $this.data('bs.tab')
2266
2267      if (!data) $this.data('bs.tab', (data = new Tab(this)))
2268      if (typeof option == 'string') data[option]()
2269    })
2270  }
2271
2272  var old = $.fn.tab
2273
2274  $.fn.tab             = Plugin
2275  $.fn.tab.Constructor = Tab
2276
2277
2278  // TAB NO CONFLICT
2279  // ===============
2280
2281  $.fn.tab.noConflict = function () {
2282    $.fn.tab = old
2283    return this
2284  }
2285
2286
2287  // TAB DATA-API
2288  // ============
2289
2290  var clickHandler = function (e) {
2291    e.preventDefault()
2292    Plugin.call($(this), 'show')
2293  }
2294
2295  $(document)
2296    .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
2297    .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
2298
2299}(jQuery);
2300;
2301/* ========================================================================
2302 * Bootstrap: transition.js v3.3.7
2303 * http://getbootstrap.com/javascript/#transitions
2304 * ========================================================================
2305 * Copyright 2011-2016 Twitter, Inc.
2306 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2307 * ======================================================================== */
2308
2309
2310+function ($) {
2311  'use strict';
2312
2313  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
2314  // ============================================================
2315
2316  function transitionEnd() {
2317    var el = document.createElement('bootstrap')
2318
2319    var transEndEventNames = {
2320      WebkitTransition : 'webkitTransitionEnd',
2321      MozTransition    : 'transitionend',
2322      OTransition      : 'oTransitionEnd otransitionend',
2323      transition       : 'transitionend'
2324    }
2325
2326    for (var name in transEndEventNames) {
2327      if (el.style[name] !== undefined) {
2328        return { end: transEndEventNames[name] }
2329      }
2330    }
2331
2332    return false // explicit for ie8 (  ._.)
2333  }
2334
2335  // http://blog.alexmaccaw.com/css-transitions
2336  $.fn.emulateTransitionEnd = function (duration) {
2337    var called = false
2338    var $el = this
2339    $(this).one('bsTransitionEnd', function () { called = true })
2340    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
2341    setTimeout(callback, duration)
2342    return this
2343  }
2344
2345  $(function () {
2346    $.support.transition = transitionEnd()
2347
2348    if (!$.support.transition) return
2349
2350    $.event.special.bsTransitionEnd = {
2351      bindType: $.support.transition.end,
2352      delegateType: $.support.transition.end,
2353      handle: function (e) {
2354        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
2355      }
2356    }
2357  })
2358
2359}(jQuery);
2360;
2361/*The MIT License (MIT)
2362
2363Copyright (c) 2014 Romain Gervois
2364
2365Permission is hereby granted, free of charge, to any person obtaining a copy
2366of this software and associated documentation files (the "Software"), to deal
2367in the Software without restriction, including without limitation the rights
2368to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2369copies of the Software, and to permit persons to whom the Software is
2370furnished to do so, subject to the following conditions:
2371
2372The above copyright notice and this permission notice shall be included in
2373all copies or substantial portions of the Software.
2374
2375THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2376IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2377FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2378AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2379LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2380OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2381THE SOFTWARE.*/
2382(function($) {
2383	var carrousels = {};
2384
2385	var carrouselsvar = {
2386		duration: 5000,
2387		help:
2388			'Accéder aux autres panneaux via les flèches directionnelles, appuyez sur la touche entrée pour vous rendre sur le panneau courant ou appuyez sur la touche supprimer pour annuler ce message.'
2389	};
2390
2391	var srcimage = '/themes/custom/adv_theme/images/';
2392	var carrouselssrc = {
2393		selectedtab: [ srcimage + 'pixel.png', srcimage + 'pixel.png' ],
2394		previoustab: [ srcimage + 'pixel.png', srcimage + 'pixel.png' ],
2395		nexttab: [ srcimage + 'pixel.png', srcimage + 'pixel.png' ]
2396	};
2397
2398	var carrouselstxt = {
2399		playpause: [ 'Relancer le carrousel ci-après', 'Arrêter le carrousel ci-après' ],
2400		previoustab: [ 'Aucun item précédent', 'Item précédent' ],
2401		nexttab: [ 'Aucun item suivant', 'Item suivant' ]
2402	};
2403
2404	function createCarrousel() {
2405		this.init = function(fragment) {
2406			new Carrousel(fragment);
2407		};
2408	}
2409
2410	var Carrousel = function(fragment) {
2411		if (!fragment.hasAttribute('id')) {
2412			fragment.setAttribute('id', getAvailableId('carrousel'));
2413		}
2414		fragment.addEventListener(
2415			'click',
2416			function(event) {
2417				var node = event.target;
2418				while ([ 'li', 'button' ].indexOf(node.tagName.toLowerCase()) == -1 && node != fragment) {
2419					node = node.parentNode;
2420				}
2421				if (node != fragment) {
2422					var matches =
2423						node.matches || node.mozMatchesSelector || node.msMatchesSelector || node.webkitMatchesSelector;
2424					matches = matches.name || matches.toString().match(/^\s*function\s*(\S*)\s*\(/)[1]; // IE9.
2425					if (
2426						node[matches]('#' + this.getAttribute('id') + ' > ol[role="tablist"] > li[role="tab"]') ||
2427						node[matches](
2428							'#' +
2429								this.getAttribute('id') +
2430								' > p.carrousel-previousitem button, #' +
2431								this.getAttribute('id') +
2432								' > p.carrousel-nextitem button'
2433						)
2434					) {
2435						this.removeAttribute('data-reverse');
2436					}
2437				}
2438			},
2439			false
2440		);
2441
2442		var tabpanels = document.querySelectorAll('#' + fragment.getAttribute('id') + ' > div');
2443		var tabs = document.createElement('ol');
2444		tabs.setAttribute('role', 'tablist');
2445		fragment.insertBefore(tabs, fragment.firstChild);
2446		var carrouselhelp = null;
2447		if (fragment.getAttribute('data-help') == 'true' && !(readCookie('carrouselhelp') == 'false')) {
2448			carrouselhelp = document.createElement('p');
2449			carrouselhelp.setAttribute('id', fragment.getAttribute('id') + '-tooltip');
2450			carrouselhelp.setAttribute('role', 'tooltip');
2451			carrouselhelp.setAttribute('hidden', 'hidden');
2452			carrouselhelp.appendChild(document.createTextNode(carrouselsvar.help));
2453			tabs.addEventListener('keydown', deleteCarrouselHelp, false);
2454		}
2455		if (tabpanels.length < 2) {
2456			tabs.classList.add('hide');
2457		}
2458		var selectedtabi = fragment.getAttribute('data-selectedpanel');
2459		if (selectedtabi == 'last') {
2460			selectedtabi = tabpanels.length - 1;
2461		} else if (selectedtabi >= 1 && selectedtabi <= tabpanels.length) {
2462			selectedtabi = selectedtabi - 1;
2463		} else {
2464			selectedtabi = 0;
2465		}
2466		var carrouselviewport = document.createElement('div');
2467		for (var i = 0; i < tabpanels.length; i++) {
2468			if (!tabpanels[i].hasAttribute('id')) {
2469				tabpanels[i].setAttribute('id', getAvailableId('tabpanel'));
2470			}
2471			var tab = document.createElement('li');
2472			tab.setAttribute(
2473				fragment.getAttribute('data-ariacontrols') == 'false' ? 'data-controls' : 'aria-controls',
2474				tabpanels[i].getAttribute('id')
2475			);
2476			tab.setAttribute('role', 'tab');
2477			var heading = tabpanels[i].querySelector('[role="heading"], h1, h2, h3, h4, h5, h6, .titre');
2478			if (i == selectedtabi) {
2479				tabpanels[i].setAttribute('aria-hidden', 'false');
2480				tab.setAttribute('aria-selected', 'true');
2481				tab.setAttribute('tabindex', '0');
2482			} else {
2483				tabpanels[i].setAttribute('aria-hidden', 'true');
2484				tab.setAttribute('aria-selected', 'false');
2485				tab.setAttribute('tabindex', '-1');
2486			}
2487			if (fragment.getAttribute('data-tabs') == 'text') {
2488				tab.setAttribute('aria-label', heading.textContent);
2489				var span = document.createElement('span');
2490				span.setAttribute('title', tab.getAttribute('aria-label'));
2491				span.appendChild(document.createTextNode(i + 1));
2492				tab.appendChild(span);
2493			} else {
2494				var tabimg = document.createElement('img');
2495				tabimg.setAttribute('src', carrouselssrc.selectedtab[i == selectedtabi ? 1 : 0]);
2496				tabimg.setAttribute('alt', heading.textContent);
2497				tabimg.setAttribute('height', '24');
2498				tabimg.setAttribute('width', '24');
2499				tabimg.setAttribute('title', tabimg.getAttribute('alt'));
2500				tab.appendChild(tabimg);
2501			}
2502			if (i != selectedtabi) {
2503				var focusables = tabpanels[i].querySelectorAll(
2504					'a, area, button, input, select, textarea, [contenteditable="true"], [tabindex]'
2505				);
2506				for (var f = 0; f < focusables.length; f++) {
2507					if (focusables[f].hasAttribute('contenteditable')) {
2508						focusables[f].setAttribute('data-contenteditable', 'true');
2509						focusables[f].removeAttribute('contenteditable');
2510					}
2511					if (focusables[f].hasAttribute('tabindex')) {
2512						focusables[f].setAttribute('data-tabindex', focusables[f].getAttribute('tabindex'));
2513					} else {
2514						focusables[f].setAttribute('data-removetabindex', 'true');
2515					}
2516					focusables[f].setAttribute('tabindex', '-1');
2517				}
2518			}
2519			tab.setAttribute('id', getAvailableId('tab'));
2520			if (carrouselhelp) {
2521				tab.setAttribute('aria-describedby', carrouselhelp.getAttribute('id'));
2522				tab.addEventListener('mousedown', carrouselHelpTabMouseDown, false);
2523				tab.addEventListener('keydown', carrouselHelpTabKeyDown, false);
2524				tab.addEventListener('focus', carrouselHelpTabFocus, false);
2525				tab.addEventListener('blur', carrouselHelpTabBlur, false);
2526			}
2527			tab.addEventListener(
2528				'click',
2529				function(event) {
2530					if (this.getAttribute('aria-selected') == 'false') {
2531						if (!(this.parentNode.parentNode.getAttribute('data-navbuttons') == 'false')) {
2532							var previousitem = this.parentNode.nextSibling;
2533							while (previousitem.nodeType != 1) {
2534								previousitem = previousitem.nextSibling;
2535							}
2536							previousitem = previousitem.firstChild;
2537							if (!this.previousSibling) {
2538								previousitem.setAttribute('disabled', 'disabled');
2539								previousitem.firstChild.setAttribute('alt', carrouselstxt.previoustab[0]);
2540								previousitem.firstChild.setAttribute('src', carrouselssrc.previoustab[0]);
2541								previousitem.firstChild.setAttribute(
2542									'title',
2543									previousitem.firstChild.getAttribute('alt')
2544								);
2545							} else {
2546								previousitem.removeAttribute('disabled');
2547								var txt = this.previousSibling.firstChild;
2548								if (txt.tagName.toLowerCase() == 'img') {
2549									txt = txt.getAttribute('alt');
2550								} else {
2551									txt = txt.parentNode.getAttribute('aria-label');
2552								}
2553								previousitem.firstChild.setAttribute(
2554									'alt',
2555									txt + ', ' + carrouselstxt.previoustab[1].toLowerCase()
2556								);
2557								previousitem.firstChild.setAttribute('src', carrouselssrc.previoustab[1]);
2558								previousitem.firstChild.setAttribute(
2559									'title',
2560									previousitem.firstChild.getAttribute('alt')
2561								);
2562							}
2563							var nextitem = this.parentNode.parentNode.lastChild;
2564							if (nextitem.getAttribute('role') == 'tooltip') {
2565								nextitem = nextitem.previousSibling;
2566							}
2567							nextitem = nextitem.firstChild;
2568							if (!this.nextSibling) {
2569								nextitem.setAttribute('disabled', 'disabled');
2570								nextitem.firstChild.setAttribute('alt', carrouselstxt.nexttab[0]);
2571								nextitem.firstChild.setAttribute('src', carrouselssrc.nexttab[0]);
2572								nextitem.firstChild.setAttribute('title', nextitem.firstChild.getAttribute('alt'));
2573							} else {
2574								nextitem.removeAttribute('disabled');
2575								var txt = this.nextSibling.firstChild;
2576								if (txt.tagName.toLowerCase() == 'img') {
2577									txt = txt.getAttribute('alt');
2578								} else {
2579									txt = txt.parentNode.getAttribute('aria-label');
2580								}
2581								nextitem.firstChild.setAttribute(
2582									'alt',
2583									txt + ', ' + carrouselstxt.nexttab[1].toLowerCase()
2584								);
2585								nextitem.firstChild.setAttribute('src', carrouselssrc.nexttab[1]);
2586								nextitem.firstChild.setAttribute('title', nextitem.firstChild.getAttribute('alt'));
2587							}
2588						}
2589						var itemslist = this.parentNode;
2590						var n = 0;
2591						for (var i = 0; i < itemslist.childNodes.length; i++) {
2592							n++;
2593							if (itemslist.childNodes[i] == this) {
2594								break;
2595							}
2596						}
2597						var carrouselviewport = itemslist.nextSibling;
2598						while (
2599							carrouselviewport.nodeType != 1 ||
2600							(carrouselviewport.tagName && carrouselviewport.tagName.toLowerCase() != 'div')
2601						) {
2602							carrouselviewport = carrouselviewport.nextSibling;
2603						}
2604						carrouselviewport.setAttribute('class', itemslist.parentNode.getAttribute('id') + '-' + n);
2605						var selected = this.parentNode.querySelector('[aria-selected="true"]');
2606						if (
2607							!itemslist.parentNode.getAttribute('data-tabs') ||
2608							itemslist.parentNode.getAttribute('data-tabs') == 'dots'
2609						) {
2610							selected.firstChild.setAttribute('src', carrouselssrc.selectedtab[0]);
2611						}
2612						selected.setAttribute('aria-selected', 'false');
2613						selected.setAttribute('tabindex', '-1');
2614						var ariacontrols =
2615							this.parentNode.parentNode.getAttribute('data-ariacontrols') == 'false'
2616								? 'data-controls'
2617								: 'aria-controls';
2618						var selectedtabpanel = document.getElementById(selected.getAttribute(ariacontrols));
2619						selectedtabpanel.setAttribute('aria-hidden', 'true');
2620						var focusables = selectedtabpanel.querySelectorAll(
2621							'a, area, button, input, select, textarea, [contenteditable="true"], [tabindex]'
2622						);
2623						for (var f = 0; f < focusables.length; f++) {
2624							if (focusables[f].hasAttribute('contenteditable')) {
2625								focusables[f].setAttribute('data-contenteditable', 'true');
2626								focusables[f].removeAttribute('contenteditable');
2627							}
2628							if (focusables[f].hasAttribute('tabindex')) {
2629								focusables[f].setAttribute('data-tabindex', focusables[f].getAttribute('tabindex'));
2630							} else {
2631								focusables[f].setAttribute('data-removetabindex', 'true');
2632							}
2633							focusables[f].setAttribute('tabindex', '-1');
2634						}
2635						if (
2636							!itemslist.parentNode.getAttribute('data-tabs') ||
2637							itemslist.parentNode.getAttribute('data-tabs') == 'dots'
2638						) {
2639							this.firstChild.setAttribute('src', carrouselssrc.selectedtab[1]);
2640						}
2641						this.setAttribute('aria-selected', 'true');
2642						this.setAttribute('tabindex', '0');
2643						var tabpanel = document.getElementById(this.getAttribute(ariacontrols));
2644						tabpanel.setAttribute('aria-hidden', 'false');
2645						focusables = tabpanel.querySelectorAll('[data-tabindex], [data-removetabindex]');
2646						for (var f = 0; f < focusables.length; f++) {
2647							if (focusables[f].hasAttribute('data-contenteditable')) {
2648								focusables[f].setAttribute('contenteditable', 'true');
2649								focusables[f].removeAttribute('data-contenteditable');
2650							}
2651							if (focusables[f].hasAttribute('data-tabindex')) {
2652								focusables[f].setAttribute('tabindex', focusables[f].getAttribute('data-tabindex'));
2653								focusables[f].removeAttribute('data-tabindex');
2654							} else {
2655								focusables[f].removeAttribute('data-removetabindex');
2656								focusables[f].removeAttribute('tabindex');
2657							}
2658						}
2659					}
2660				},
2661				false
2662			);
2663			tab.addEventListener(
2664				'keydown',
2665				function(event) {
2666					if ([ 37, 38 ].indexOf(event.keyCode) > -1) {
2667						var previous = this.previousSibling;
2668						if (!previous) {
2669							previous = this.parentNode.lastChild;
2670						}
2671						var e = document.createEvent('MouseEvent');
2672						e.initEvent('click', true, true);
2673						previous.focus();
2674						previous.dispatchEvent(e);
2675						event.preventDefault();
2676					} else if ([ 39, 40 ].indexOf(event.keyCode) > -1) {
2677						var next = this.nextSibling;
2678						if (!next) {
2679							next = this.parentNode.firstChild;
2680						}
2681						var e = document.createEvent('MouseEvent');
2682						e.initEvent('click', true, true);
2683						next.focus();
2684						next.dispatchEvent(e);
2685						event.preventDefault();
2686					} else if (event.keyCode == 13) {
2687						var tabpanel = document.getElementById(
2688							this.getAttribute(this.hasAttribute('data-controls') ? 'data-controls' : 'aria-controls')
2689						);
2690						tabpanel.setAttribute('tabindex', '-1');
2691						tabpanel.focus();
2692					}
2693				},
2694				false
2695			);
2696
2697			tabs.appendChild(tab);
2698			tabpanels[i].setAttribute('aria-labelledby', tab.getAttribute('id'));
2699			tabpanels[i].setAttribute('role', 'tabpanel');
2700			tabpanels[i].addEventListener(
2701				'keydown',
2702				function(event) {
2703					if (event.ctrlKey && [ 38, 33, 34 ].indexOf(event.keyCode) > -1) {
2704						var current = document.getElementById(this.getAttribute('aria-labelledby'));
2705						if (event.keyCode == 38) {
2706							current.focus();
2707						} else if (event.keyCode == 33) {
2708							var previous = current.previousSibling;
2709							if (!previous) {
2710								previous = current.parentNode.lastChild;
2711							}
2712							var e = document.createEvent('MouseEvent');
2713							e.initEvent('click', true, true);
2714							previous.focus();
2715							previous.dispatchEvent(e);
2716						} else if (event.keyCode == 34) {
2717							var next = current.nextSibling;
2718							if (!next) {
2719								next = current.parentNode.firstChild;
2720							}
2721							var e = document.createEvent('MouseEvent');
2722							e.initEvent('click', true, true);
2723							next.focus();
2724							next.dispatchEvent(e);
2725						}
2726						event.preventDefault();
2727					}
2728				},
2729				false
2730			);
2731			tabpanels[i].addEventListener('transitionend', carrouselItemChangeEnd, false);
2732			tabpanels[i].addEventListener('oTransitionEnd', carrouselItemChangeEnd, false);
2733			tabpanels[i].addEventListener('webkitTransitionEnd', carrouselItemChangeEnd, false);
2734
2735			_tabPanel = tabpanels[i];
2736
2737			/*
2738          touchStart = undefined;
2739
2740          tabpanels[i].addEventListener('touchStart', function(event) {startDrag(event);});
2741          tabpanels[i].addEventListener('mousedown', function(event) {startDrag(event);});
2742
2743          startDrag = function(event)
2744          {
2745              touchStart = event.clientX;
2746          };
2747
2748
2749          tabpanels[i].addEventListener('touchMove', function(event) { moveDrag(event); });
2750          tabpanels[i].addEventListener('mousemove', function(event) { moveDrag(event); });
2751
2752          moveDrag = function(event)
2753          {
2754              //console.log(touchStart);
2755              if(touchStart != undefined) {
2756
2757                  var delta = event.clientX-touchStart;
2758
2759                  event.currentTarget.style.transform = "translateX("+delta+"px)";
2760
2761                  if(delta > 70)
2762                  {
2763                  //	console.log("preview");
2764                      touchStart = undefined;
2765                      event.currentTarget.style.transform = "translateX(0px)";
2766
2767                      var e = document.createEvent('MouseEvent');
2768                      e.initEvent('click', false, true);
2769
2770                      var tab = event.currentTarget.parentNode.parentNode.querySelector('ol[role="tablist"] li[role="tab"][aria-selected="true"]');
2771                      tab = tab.previousSibling ? tab.previousSibling : tab.parentNode.lastChild;
2772                      tab.focus();
2773                      tab.dispatchEvent(e);
2774
2775                  }
2776                  else if(delta < -70)
2777                  {
2778                      //console.log("next");
2779
2780                      touchStart = undefined;
2781                      event.currentTarget.style.transform = "translateX(0px)";
2782
2783                      var e = document.createEvent('MouseEvent');
2784                      e.initEvent('click', false, true);
2785
2786                      var tab = event.currentTarget.parentNode.parentNode.querySelector('ol[role="tablist"] li[role="tab"][aria-selected="true"]');
2787                      tab = tab.nextSibling ? tab.nextSibling : tab.parentNode.firstChild;
2788                      tab.focus();
2789                      tab.dispatchEvent(e);
2790
2791
2792                  }
2793
2794              }
2795          }
2796
2797
2798          tabpanels[i].addEventListener('touchend', function(event) { endDrag(event);});
2799          tabpanels[i].addEventListener('mouseup', function(event) { endDrag(event);});
2800          tabpanels[i].addEventListener('mouseout', function(event) { endDrag(event);});
2801          tabpanels[i].addEventListener('mouseleave', function(event) { endDrag(event);});
2802
2803          endDrag = function(event)
2804          {
2805
2806              touchStart = undefined;
2807              event.currentTarget.style.transform = "translateX(0px)";
2808
2809          }
2810          */
2811		}
2812		var styles = [];
2813		for (var i = 0; i < tabpanels.length; i++) {
2814			if (i == selectedtabi) {
2815				carrouselviewport.setAttribute('class', fragment.getAttribute('id') + '-' + (i + 1));
2816			}
2817			carrouselviewport.appendChild(tabpanels[i].parentNode.removeChild(tabpanels[i]));
2818			styles.push(
2819				'#' +
2820					fragment.getAttribute('id') +
2821					' .' +
2822					fragment.getAttribute('id') +
2823					'-' +
2824					(i + 1) +
2825					' > div { left: ' +
2826					(i > 0 ? -(i * 100) + '%' : 0) +
2827					'; }'
2828			);
2829		}
2830		var style = document.createElement('style');
2831		style.setAttribute('type', 'text/css');
2832		style.appendChild(document.createTextNode(styles.join(' ')));
2833		document.querySelector('head').appendChild(style);
2834		if (!(fragment.getAttribute('data-navbuttons') == 'false')) {
2835			var globalpreviousp = document.createElement('p');
2836			globalpreviousp.setAttribute('class', 'carrousel-previousitem');
2837			var globalpreviousbutton = document.createElement('button');
2838			globalpreviousbutton.setAttribute('type', 'button');
2839			if (selectedtabi == 0) {
2840				globalpreviousbutton.setAttribute('title', carrouselstxt.previoustab[0]);
2841				globalpreviousbutton.setAttribute('disabled', 'disabled');
2842			} else {
2843				var txt = document.getElementById(tabpanels[selectedtabi - 1].getAttribute('aria-labelledby'))
2844					.firstChild;
2845				if (txt.tagName.toLowerCase() == 'img') {
2846					txt = txt.getAttribute('alt');
2847				} else {
2848					txt = txt.parentNode.getAttribute('aria-label');
2849				}
2850				globalpreviousbutton.setAttribute('title', txt + ', ' + carrouselstxt.previoustab[1].toLowerCase());
2851			}
2852			if (carrouselhelp) {
2853				globalpreviousbutton.addEventListener('keydown', carrouselHelpGlobalButtonKeyDown, false);
2854				globalpreviousbutton.addEventListener('mousedown', carrouselHelpGlobalPreviousButtonMouseDown, false);
2855			}
2856			globalpreviousbutton.addEventListener(
2857				'click',
2858				function(event) {
2859					var e = document.createEvent('MouseEvent');
2860					e.initEvent('click', false, true);
2861					var tab = this.parentNode.parentNode.querySelector(
2862						'ol[role="tablist"] li[role="tab"][aria-selected="true"]'
2863					);
2864					tab = tab.previousSibling ? tab.previousSibling : tab.parentNode.lastChild;
2865					// tab.focus();
2866					tab.dispatchEvent(e);
2867				},
2868				false
2869			);
2870			var globalpreviousbuttonimg = document.createElement('img');
2871			globalpreviousbuttonimg.setAttribute(
2872				'src',
2873				carrouselssrc.previoustab[globalpreviousbutton.disabled ? 0 : 1]
2874			);
2875			globalpreviousbuttonimg.setAttribute('alt', globalpreviousbutton.getAttribute('title'));
2876			globalpreviousbutton.removeAttribute('title');
2877			globalpreviousbuttonimg.setAttribute('height', '24');
2878			globalpreviousbuttonimg.setAttribute('width', '24');
2879			globalpreviousbuttonimg.setAttribute('title', globalpreviousbuttonimg.getAttribute('alt'));
2880			globalpreviousbutton.appendChild(globalpreviousbuttonimg);
2881			globalpreviousp.appendChild(globalpreviousbutton);
2882			if (tabpanels.length > 1) {
2883				fragment.appendChild(globalpreviousp);
2884			}
2885		}
2886
2887		var touchStart = undefined;
2888		var touchMove = undefined;
2889		var currentLeft = 0;
2890
2891		carrouselviewport.addEventListener('touchstart', function(event) {
2892			startDrag(event);
2893		});
2894		carrouselviewport.addEventListener('mousedown', function(event) {
2895			startDrag(event);
2896		});
2897
2898		var startDrag = function(event) {
2899			if(document.querySelector('.no-touch')){
2900				event.preventDefault();
2901			}
2902			touchMove = false;
2903			currentLeft = carrouselviewport.style.left;
2904			touchStart = getClientX(event);
2905		};
2906
2907		carrouselviewport.addEventListener('touchmove', function(event) {
2908			moveDrag(event);
2909		});
2910		carrouselviewport.addEventListener('mousemove', function(event) {
2911			moveDrag(event);
2912		});
2913
2914		carrouselviewport.addEventListener('click', function(e){
2915			if(touchMove){
2916				e.preventDefault();
2917				e.stopPropagation();
2918			}
2919		}, true);
2920
2921		var getClientX = function(e) {
2922			if (e.targetTouches) {
2923				return e.targetTouches[0].clientX;
2924			}
2925			return e.clientX;
2926		};
2927
2928		var moveDrag = function(event) {
2929			if (touchStart != undefined) {
2930				var delta = getClientX(event) - touchStart;
2931
2932				if (Math.abs(delta) > 20) {
2933					touchMove = true;
2934				} else {
2935					return;
2936				}
2937
2938				if (touchMove) {
2939					event.preventDefault();
2940				}
2941
2942				event.currentTarget.style.transform = 'translateX(' + delta + 'px)';
2943
2944				if (delta > 70) {
2945					//	console.log("preview");
2946
2947					touchStart = undefined;
2948					event.currentTarget.style.transform = 'translateX(0px)';
2949
2950					var e = document.createEvent('MouseEvent');
2951					e.initEvent('click', false, true);
2952
2953					var tab = carrouselviewport.parentNode.querySelector(
2954						'ol[role="tablist"] li[role="tab"][aria-selected="true"]'
2955					);
2956					if (!tab.previousSibling) return;
2957					tab = tab.previousSibling ? tab.previousSibling : tab.parentNode.lastChild;
2958					// tab.focus();
2959					tab.dispatchEvent(e);
2960
2961					var elt = carrouselviewport.querySelector('*[aria-hidden="false"] a');
2962					// console.log(elt)
2963					// setTimeout(function(){
2964					//   if(elt)elt.focus();
2965					// }, 10)
2966				} else if (delta < -70) {
2967					//console.log("next");
2968
2969					touchStart = undefined;
2970					event.currentTarget.style.transform = 'translateX(0px)';
2971
2972					var e = document.createEvent('MouseEvent');
2973					e.initEvent('click', false, true);
2974
2975					var tab = carrouselviewport.parentNode.querySelector(
2976						'ol[role="tablist"] li[role="tab"][aria-selected="true"]'
2977					);
2978					if (!tab.nextSibling) return;
2979					tab = tab.nextSibling ? tab.nextSibling : tab.parentNode.firstChild;
2980					// tab.focus();
2981					tab.dispatchEvent(e);
2982
2983					var elt = carrouselviewport.querySelector('*[aria-hidden="false"] a');
2984					// console.log(elt)
2985					// setTimeout(function(){
2986					//   if(elt)elt.focus();
2987					// }, 10)
2988				}
2989			}
2990		};
2991
2992		carrouselviewport.addEventListener('touchend', function(event) {
2993			endDrag(event);
2994		});
2995		carrouselviewport.addEventListener('mouseup', function(event) {
2996			endDrag(event);
2997		});
2998		carrouselviewport.addEventListener('mouseout', function(event) {
2999			endDrag(event);
3000		});
3001		carrouselviewport.addEventListener('mouseleave', function(event) {
3002			endDrag(event);
3003		});
3004
3005		var endDrag = function(event) {
3006			touchStart = undefined;
3007			event.currentTarget.style.transform = 'translateX(0px)';
3008		};
3009
3010		/*
3011
3012      */
3013
3014		fragment.appendChild(carrouselviewport);
3015		if (!(fragment.getAttribute('data-navbuttons') == 'false')) {
3016			var globalnextp = document.createElement('p');
3017			globalnextp.setAttribute('class', 'carrousel-nextitem');
3018			var globalnextbutton = document.createElement('button');
3019			globalnextbutton.setAttribute('type', 'button');
3020			if (selectedtabi == tabpanels.length - 1) {
3021				globalnextbutton.setAttribute('title', carrouselstxt.nexttab[0]);
3022				globalnextbutton.setAttribute('disabled', 'disabled');
3023			} else {
3024				var txt = document.getElementById(tabpanels[selectedtabi + 1].getAttribute('aria-labelledby'))
3025					.firstChild;
3026				if (txt.tagName.toLowerCase() == 'img') {
3027					txt = txt.getAttribute('alt');
3028				} else {
3029					txt = txt.parentNode.getAttribute('aria-label');
3030				}
3031				globalnextbutton.setAttribute('title', txt + ', ' + carrouselstxt.nexttab[1].toLowerCase());
3032			}
3033			if (carrouselhelp) {
3034				globalnextbutton.addEventListener('keydown', carrouselHelpGlobalButtonKeyDown, false);
3035				globalnextbutton.addEventListener('mousedown', carrouselHelpGlobalNextButtonMouseDown, false);
3036			}
3037			globalnextbutton.addEventListener(
3038				'click',
3039				function(event) {
3040					var e = document.createEvent('MouseEvent');
3041					e.initEvent('click', false, true);
3042					var tab = this.parentNode.parentNode.querySelector(
3043						'ol[role="tablist"] li[role="tab"][aria-selected="true"]'
3044					);
3045					tab = tab.nextSibling ? tab.nextSibling : tab.parentNode.firstChild;
3046					// tab.focus();
3047					tab.dispatchEvent(e);
3048				},
3049				false
3050			);
3051			var globalnextbuttonimg = document.createElement('img');
3052			globalnextbuttonimg.setAttribute('src', carrouselssrc.nexttab[globalnextbutton.disabled ? 0 : 1]);
3053			globalnextbuttonimg.setAttribute('alt', globalnextbutton.getAttribute('title'));
3054			globalnextbutton.removeAttribute('title');
3055			globalnextbuttonimg.setAttribute('height', '24');
3056			globalnextbuttonimg.setAttribute('width', '24');
3057			globalnextbuttonimg.setAttribute('title', globalnextbuttonimg.getAttribute('alt'));
3058			globalnextbutton.appendChild(globalnextbuttonimg);
3059			globalnextp.appendChild(globalnextbutton);
3060			if (tabpanels.length > 1) {
3061				fragment.appendChild(globalnextp);
3062			}
3063		}
3064		if (carrouselhelp) {
3065			fragment.appendChild(carrouselhelp);
3066		}
3067		var play = fragment.getAttribute('data-play');
3068		if ([ 'auto', 'demand' ].indexOf(play) > -1) {
3069			var carrouselstopbutton = document.createElement('button');
3070			carrouselstopbutton.setAttribute('type', 'button');
3071			carrouselstopbutton.setAttribute('data-stop', play == 'demand' ? 'true' : 'false');
3072			carrouselstopbutton.addEventListener(
3073				'click',
3074				function(event) {
3075					if (this.getAttribute('data-stop') == 'true') {
3076						this.setAttribute('data-stop', 'false');
3077						var fragmentid = this.parentNode.parentNode.getAttribute('id');
3078						var duration = this.parentNode.parentNode.hasAttribute('data-duration')
3079							? this.parentNode.parentNode.getAttribute('data-duration')
3080							: carrouselsvar.duration;
3081						carrousels[fragmentid] = window.setInterval(function() {
3082							carrouselItemChange(fragmentid);
3083						}, duration);
3084						this.replaceChild(document.createTextNode(carrouselstxt.playpause[1]), this.firstChild);
3085					} else {
3086						this.setAttribute('data-stop', 'true');
3087						window.clearInterval(carrousels[this.parentNode.parentNode.getAttribute('id')]);
3088						carrousels[this.parentNode.parentNode.getAttribute('id')] = null;
3089						this.replaceChild(document.createTextNode(carrouselstxt.playpause[0]), this.firstChild);
3090					}
3091				},
3092				false
3093			);
3094			carrouselstopbutton.appendChild(document.createTextNode(carrouselstxt.playpause[play == 'demand' ? 0 : 1]));
3095			var carrouselstopp = document.createElement('p');
3096			carrouselstopp.setAttribute('class', 'carrousel-playpause');
3097			carrouselstopp.appendChild(carrouselstopbutton);
3098			fragment.insertBefore(carrouselstopp, fragment.firstChild);
3099			fragment.addEventListener(
3100				'mouseover',
3101				function(event) {
3102					this.setAttribute('data-stop', 'true');
3103				},
3104				false
3105			);
3106			fragment.addEventListener(
3107				'mouseout',
3108				function(event) {
3109					var activeelement = document.activeElement;
3110					var parent = activeelement.parentNode;
3111					var child = false;
3112					while (parent) {
3113						if (parent == this) {
3114							child = true;
3115							break;
3116						}
3117						parent = parent.parentNode;
3118					}
3119					if (!child) {
3120						this.removeAttribute('data-stop');
3121					}
3122				},
3123				false
3124			);
3125			if (play == 'auto') {
3126				var duration = fragment.hasAttribute('data-duration')
3127					? fragment.getAttribute('data-duration')
3128					: carrouselsvar.duration;
3129				var fragmentid = fragment.getAttribute('id');
3130				carrousels[fragmentid] = window.setInterval(function() {
3131					carrouselItemChange(fragmentid);
3132				}, duration);
3133			}
3134		}
3135	};
3136
3137	function carrouselItemChange(fragmentid) {
3138		var carrousel = document.getElementById(fragmentid);
3139		var parent = document.activeElement.parentNode;
3140		var focus = false;
3141		if (document.querySelector(':focus')) {
3142			// FX.
3143			while (parent) {
3144				if (parent == carrousel) {
3145					focus = true;
3146					break;
3147				}
3148				parent = parent.parentNode;
3149			}
3150		}
3151		var parent = document.querySelector(':hover'); // IE9.
3152		var hover = false;
3153		while (parent) {
3154			if (parent == carrousel) {
3155				hover = true;
3156				break;
3157			}
3158			parent = parent.parentNode;
3159		}
3160		if (focus || hover || document.querySelector('#' + carrousel.getAttribute('id') + ':hover')) {
3161			carrousel.setAttribute('data-stop', 'true');
3162		} else {
3163			carrousel.removeAttribute('data-stop');
3164		}
3165		if (!carrousel.hasAttribute('data-stop')) {
3166			var selecteditem = carrousel.querySelector('[role="tab"][aria-selected="true"]');
3167			var nextitem = selecteditem.nextSibling;
3168			if ([ 'reverse', 'imitate' ].indexOf(carrousel.getAttribute('data-playmode')) > -1) {
3169				if (carrousel.hasAttribute('data-reverse')) {
3170					nextitem = selecteditem.previousSibling;
3171					if (!nextitem.previousSibling) {
3172						carrousel.removeAttribute('data-reverse');
3173					}
3174				} else {
3175					if (!nextitem) {
3176						carrousel.setAttribute('data-reverse', 'true');
3177						nextitem = selecteditem.previousSibling;
3178					}
3179				}
3180			} else {
3181				if (!nextitem) {
3182					nextitem = selecteditem.parentNode.firstChild;
3183				}
3184			}
3185			var e = document.createEvent('MouseEvent');
3186			e.initEvent('click', false, true);
3187			nextitem.dispatchEvent(e);
3188		}
3189	}
3190
3191	function carrouselItemChangeEnd() {
3192		if (this.getAttribute('aria-hidden') == 'true' && this.querySelector(':focus')) {
3193			this.parentNode.parentNode.querySelector('[role="tab"][aria-selected="true"]').focus();
3194		}
3195	}
3196
3197	function carrouselHelpGlobalButtonKeyDown(event) {
3198		if ([ 13, 32 ].indexOf(event.keyCode) > -1) {
3199			this.setAttribute('data-help', 'false');
3200		}
3201	}
3202
3203	function carrouselHelpGlobalPreviousButtonMouseDown() {
3204		var tab = this.parentNode.parentNode.querySelector('ol[role="tablist"] li[role="tab"][aria-selected="true"]');
3205		tab = tab.previousSibling ? tab.previousSibling : tab.parentNode.lastChild;
3206		tab.setAttribute('data-help', 'false');
3207	}
3208
3209	function carrouselHelpGlobalNextButtonMouseDown() {
3210		var tab = this.parentNode.parentNode.querySelector('ol[role="tablist"] li[role="tab"][aria-selected="true"]');
3211		tab = tab.nextSibling ? tab.nextSibling : tab.parentNode.firstChild;
3212		tab.setAttribute('data-help', 'false');
3213	}
3214
3215	function carrouselHelpTabMouseDown(event) {
3216		this.setAttribute('data-help', 'false');
3217	}
3218
3219	function carrouselHelpTabKeyDown(event) {
3220		if (event.keyCode == 27) {
3221			document.getElementById(this.getAttribute('aria-describedby')).setAttribute('hidden', 'hidden');
3222		}
3223	}
3224
3225	function carrouselHelpTabFocus(event) {
3226		if (this.getAttribute('data-help') != 'false') {
3227			document.getElementById(this.getAttribute('aria-describedby')).removeAttribute('hidden');
3228		}
3229		this.removeAttribute('data-help');
3230	}
3231
3232	function carrouselHelpTabBlur(event) {
3233		document.getElementById(this.getAttribute('aria-describedby')).setAttribute('hidden', 'hidden');
3234	}
3235
3236	function deleteCarrouselHelp(event) {
3237		if (event.keyCode == 46) {
3238			/*createCookie('carrouselhelp', 'false', null);*/
3239			var tooltip = document.getElementById(event.target.getAttribute('aria-describedby'));
3240			tooltip.parentNode.removeChild(tooltip);
3241			var tabs = this.parentNode.parentNode.querySelectorAll(
3242				'#' + this.parentNode.getAttribute('id') + ' > ol[role="tablist"] > li[role="tab"]'
3243			);
3244			for (var i = 0; i < tabs.length; i++) {
3245				tabs[i].removeAttribute('aria-describedby');
3246				tabs[i].removeEventListener('mousedown', carrouselHelpTabMouseDown, false);
3247				tabs[i].removeEventListener('keydown', carrouselHelpTabKeyDown, false);
3248				tabs[i].removeEventListener('focus', carrouselHelpTabFocus, false);
3249				tabs[i].removeEventListener('blur', carrouselHelpTabBlur, false);
3250			}
3251			var globalbuttons = this.parentNode.parentNode.querySelectorAll(
3252				'#' +
3253					this.parentNode.getAttribute('id') +
3254					' > p.carrousel-previousitem button, #' +
3255					this.parentNode.getAttribute('id') +
3256					' > p.carrousel-nextitem button'
3257			);
3258			if (globalbuttons.length > 0) {
3259				globalbuttons[0].removeEventListener('keydown', carrouselHelpGlobalButtonKeyDown, false);
3260				globalbuttons[0].removeEventListener('mousedown', carrouselHelpGlobalPreviousButtonMouseDown, false);
3261				globalbuttons[1].removeEventListener('keydown', carrouselHelpGlobalButtonKeyDown, false);
3262				globalbuttons[1].removeEventListener('mousedown', carrouselHelpGlobalNextButtonMouseDown, false);
3263			}
3264			this.removeEventListener('keydown', deleteCarrouselHelp, false);
3265		}
3266	}
3267
3268	function getAvailableId(prefixid) {
3269		var id = 1;
3270		while (document.getElementById(prefixid + '-' + id)) {
3271			id++;
3272		}
3273		return prefixid + '-' + id;
3274	}
3275
3276	function createCookie(name, value, days) {
3277		if (days) {
3278			var date = new Date();
3279			date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
3280			var expires = '; expires=' + date.toGMTString();
3281		} else {
3282			var expires = '';
3283		}
3284		document.cookie = name + '=' + value + expires + '; path=/';
3285	}
3286
3287	function readCookie(name) {
3288		var nameeq = name + '=';
3289		var ca = document.cookie.split(';');
3290		for (var i = 0; i < ca.length; i++) {
3291			var c = ca[i];
3292			while (c.charAt(0) == ' ') {
3293				c = c.substring(1, c.length);
3294			}
3295			if (c.indexOf(nameeq) == 0) {
3296				return c.substring(nameeq.length, c.length);
3297			}
3298		}
3299		return null;
3300	}
3301
3302	function eraseCookie(name) {
3303		createCookie(name, '', -1);
3304	}
3305
3306	window.createCarrousel = new createCarrousel();
3307
3308	if (jQuery('#carrousel_fiche_metier').length) {
3309	}
3310
3311	Drupal.behaviors.boiteCarrousel = {
3312		// Au rafraîchissement de la vue
3313		attach: function(context, settings) {
3314			if (jQuery('#carrousel_univers_anmimal').length) {
3315				jQuery('#carrousel_univers_anmimal', context).once('boiteCarrousel').each(function() {
3316					window.createCarrousel.init(document.getElementById('carrousel_univers_anmimal'));
3317				});
3318			}
3319			if (jQuery('#carrousel_etablisssment').length) {
3320				jQuery('#carrousel_etablisssment', context).once('boiteCarrousel').each(function() {
3321					window.createCarrousel.init(document.getElementById('carrousel_etablisssment'));
3322				});
3323			}
3324			if (jQuery('#carrousel_fiche_metier').length) {
3325				jQuery('#carrousel_fiche_metier', context).once('boiteCarrousel').each(function() {
3326					window.createCarrousel.init(document.getElementById('carrousel_fiche_metier'));
3327				});
3328			}
3329		}
3330	};
3331})(jQuery);
3332;
3333/**
3334 * ...
3335 * @author ...
3336 */
3337
3338(function() {
3339	//data-buti = BackUp TabIndex
3340
3341	var disableTabIndexAt = function(dom) {
3342		var interactivElts = dom.querySelectorAll('a, button, input, li');
3343		var nInteractivElts = interactivElts.length;
3344
3345		for (i = 0; i < nInteractivElts; i++) {
3346			if (!interactivElts[i].hasAttribute('data-buti')) {
3347				if (interactivElts[i].hasAttribute('tabindex')) {
3348					interactivElts[i].setAttribute('data-buti', interactivElts[i].getAttribute('tabindex'));
3349				} else {
3350					interactivElts[i].setAttribute('data-buti', '0');
3351				}
3352			}
3353			interactivElts[i].setAttribute('tabindex', '-1');
3354		}
3355	};
3356
3357	var enableTabIndexAt = function(dom) {
3358		if (!dom) return;
3359		var interactivElts = dom.querySelectorAll('a, button, input, li');
3360		var nInteractivElts = interactivElts.length;
3361		for (var i = 0; i < nInteractivElts; i++) {
3362			if (interactivElts[i].hasAttribute('data-buti')) {
3363				if (interactivElts[i].getAttribute('data-buti') != '0') {
3364					interactivElts[i].setAttribute('tabindex', '-1');
3365				} else {
3366					interactivElts[i].removeAttribute('tabindex');
3367				}
3368			} else {
3369				interactivElts[i].removeAttribute('tabindex');
3370			}
3371			interactivElts[i].removeAttribute('data-buti');
3372		}
3373	};
3374
3375	var enableSectionTabIndex = function() {
3376		var sections = document.querySelectorAll('section');
3377		var n = sections.length;
3378
3379		for (var i = 0; i < n; i++) {
3380			enableTabIndexAt(sections[i]);
3381		}
3382	};
3383
3384	var enableHeaderTabIndex = function() {
3385		enableTabIndexAt(document.querySelector('header'));
3386	};
3387
3388	var enableSkipLink = function() {
3389		enableTabIndexAt(document.querySelector('.nav-skip'));
3390	};
3391
3392	var enableFooterTabIndex = function() {
3393		enableTabIndexAt(document.querySelector('footer'));
3394	};
3395
3396	var enableBot = function() {
3397		enableTabIndexAt(document.querySelector('#bot-container'));
3398	};
3399
3400	var enableScroll = function() {
3401		document.querySelector('html').classList.remove('no-scroll');
3402	};
3403	
3404	var disableScroll = function() {
3405		document.querySelector('html').classList.add('no-scroll');
3406	};
3407
3408
3409	window.enableScroll = enableScroll;
3410	window.disableScroll = disableScroll;
3411
3412	window.disableTabIndexAt = disableTabIndexAt;
3413	window.enableTabIndexAt = enableTabIndexAt;
3414	window.enableSkipLink = enableSkipLink;
3415	window.enableBot = enableBot;
3416
3417	window.enableSectionTabIndex = enableSectionTabIndex;
3418	window.enableHeaderTabIndex = enableHeaderTabIndex;
3419	window.enableFooterTabIndex = enableFooterTabIndex;
3420})();
3421;
3422/**
3423 * ...
3424 * @author ...
3425 */
3426
3427(function() {
3428	var nav = document.querySelector('.navGlobal');
3429	if (!nav) return;
3430	var button = nav.querySelector('button');
3431	var fond = nav.querySelector('.fond');
3432	var ouvrir = nav.querySelector('.ouvrir');
3433	var fermer = nav.querySelector('.fermer');
3434
3435	
3436	var links = nav.querySelectorAll('a');
3437	
3438	for(i = 0; i < links.length; i++)
3439	{
3440		links[i].addEventListener('click', function(e) {
3441			onButtonClick();
3442		});
3443	}
3444	
3445	
3446	button.addEventListener('click', function(e) {
3447		onButtonClick();
3448	});
3449
3450	var onButtonClick = function() {
3451		if (nav.classList.contains('ouvert')) {
3452			disableMenu();
3453		} else {
3454			nav.classList.add('ouvert');
3455			enableMenu();
3456		}
3457	};
3458
3459	var enableMenu = function() {
3460		window.disableScroll();
3461		window.disableTabIndexAt(document);
3462
3463		window.enableTabIndexAt(nav);
3464
3465		button.removeAttribute('tabindex');
3466		button.removeAttribute('buti');
3467		button.focus();
3468
3469		ouvrir.setAttribute('aria-hidden', 'true');
3470		fermer.removeAttribute('aria-hidden');
3471
3472		button.setAttribute('aria-expanded', true);
3473		fond.removeAttribute('aria-hidden');
3474
3475		window.addEventListener('keydown', onKeyDown);
3476	};
3477
3478	function onKeyDown(e) {
3479		if (e.keyCode == 27) {
3480			disableMenu();
3481		}
3482	}
3483
3484	var disableMenu = function() {
3485		window.enableScroll();
3486
3487
3488		nav.classList.remove('ouvert');
3489		window.enableSectionTabIndex();
3490		window.enableHeaderTabIndex();
3491		window.enableFooterTabIndex();
3492
3493		window.enableBot();
3494		window.enableSkipLink();
3495
3496		button.setAttribute('aria-expanded', false);
3497		fond.setAttribute('aria-hidden', true);
3498		window.removeEventListener('keydown', onKeyDown);
3499		button.focus();
3500
3501		initMenuFermer();
3502	};
3503
3504	var initMenuFermer = function() {
3505		window.disableTabIndexAt(nav);
3506
3507		button.removeAttribute('tabindex');
3508		button.removeAttribute('buti');
3509
3510		fermer.setAttribute('aria-hidden', 'true');
3511		ouvrir.removeAttribute('aria-hidden');
3512	};
3513
3514	window.initMenuFermer = initMenuFermer;
3515	disableMenu();
3516})();
3517;
3518/**
3519 * ...
3520 * @author ...
3521 */
3522
3523(function() {
3524	var createPartage = function() {
3525		this.init = function(dom) {
3526			new partage(dom);
3527		};
3528	};
3529
3530	var partage = function(dom) {
3531		var _this = this;
3532
3533		this.dom = dom;
3534		this.telecharger = this.dom.querySelector('button.telecharger');
3535		this.partagerContainer = this.dom.querySelector('.partager');
3536		this.partager = this.partagerContainer.querySelector('button.general');
3537		this.partagerContainer2 = this.dom.querySelector('.partager-container');
3538		this.partagerContainer2.setAttribute('aria-hidden', true);
3539		this.partager.setAttribute('aria-expanded', false);
3540
3541		this.reseaux = this.dom.querySelectorAll('button.reseau, a.reseau');
3542		this.nReseaux = this.reseaux.length;
3543
3544		for (i = 0; i < this.nReseaux; i++) {
3545			this.reseaux[i].style.left = '40%';
3546			this.reseaux[i].setAttribute('tabindex', '-1');
3547		}
3548
3549		this.partager.addEventListener('click', function(e) {
3550			e.preventDefault();
3551			_this.tooglePartager();
3552		});
3553
3554		this.tooglePartager = function() {
3555			if (this.partagerContainer.classList.contains('ouvert')) {
3556				this.partagerContainer.classList.remove('ouvert');
3557				this.partagerContainer2.setAttribute('aria-hidden', true);
3558				this.partager.setAttribute('aria-expanded', false);
3559
3560				for (i = 0; i < this.nReseaux; i++) {
3561					this.reseaux[i].style.left = '40%';
3562					this.reseaux[i].style.top = '0px';
3563					this.reseaux[i].setAttribute('tabindex', '-1');
3564				}
3565			} else {
3566				this.partagerContainer2.removeAttribute('aria-hidden');
3567				this.partager.setAttribute('aria-expanded', true);
3568				this.partagerContainer.classList.add('ouvert');
3569				for (i = 0; i < this.nReseaux; i++) {
3570					this.reseaux[i].removeAttribute('tabindex');
3571				}
3572			}
3573			this.resize();
3574		};
3575
3576		window.addEventListener('resize', function(e) {
3577			_this.resize();
3578		});
3579
3580		this.resize = function() {
3581			if (this.partagerContainer.classList.contains('ouvert')) {
3582				var partagerX = this.partager.getBoundingClientRect().x;
3583				var partagerW = this.partager.getBoundingClientRect().width + 10;
3584
3585				// if (window.innerWidth > 600) {
3586					for (i = 0; i < this.nReseaux; i++) {
3587						this.reseaux[i].style.left = partagerW + i * 60 + 'px';
3588						this.reseaux[i].style.top = '2px';
3589					}
3590				// } else {
3591				// 	var base = -partagerX + (window.innerWidth - this.nReseaux * 60) * 0.5;
3592				// 	for (i = 0; i < this.nReseaux; i++) {
3593				// 		this.reseaux[i].style.left = base + i * 60 + 'px';
3594				// 		// this.reseaux[i].style.top = '120px';
3595				// 		this.reseaux[i].style.top = '2px';
3596				// 	}
3597				// }
3598			}
3599		};
3600	};
3601
3602	window.createPartage = new createPartage();
3603
3604	var elt = document.querySelector('#partagefiche');
3605	if (elt) {
3606		window.createPartage.init(elt);
3607	}
3608})();
3609;
3610/**
3611 * ...
3612 * @author ...
3613 */
3614
3615(function () {
3616
3617
3618	var tchatDiscussion = document.querySelector(".aside.tchatbot .discussion>div");
3619
3620	var numCarrousel = 0;
3621
3622	var rechercher = function (data) {
3623		//console.log("rechercher", data);
3624		var nReponses = 3 + Math.floor(Math.random() * 20);
3625
3626		var bottle = document.getElementById("bottleClonable").cloneNode(true);
3627		bottle.removeAttribute("id");
3628
3629		var rs = document.getElementById("rsClonable").cloneNode(true);
3630		rs.removeAttribute("id");
3631
3632		var popinEmail = document.getElementById("popinEmailClonable").cloneNode(true);
3633		popinEmail.removeAttribute("id");
3634
3635		var chargement = document.getElementById("chargementClonable").cloneNode(true);
3636		chargement.removeAttribute("id");
3637
3638		var question = document.getElementById("questionClonable").cloneNode(true);
3639		question.removeAttribute("id");
3640		question.querySelector(".question").innerHTML = data;
3641
3642		var reponse = document.getElementById("reponseClonable").cloneNode(true);
3643		reponse.removeAttribute("id");
3644		reponse.querySelector(".reponse").innerHTML = "Nous avons trouvé <span>(" + nReponses + ") métiers</span> pour toi ! Tu peux les découvrir dans la liste n’hesite pas à nous en dire plus pour que nous affinions notre recherche";
3645
3646		var resultat = document.getElementById("resultatClonable").cloneNode(true);
3647		resultat.removeAttribute("id");
3648
3649		resultat.querySelector(".partage").setAttribute("id", "partage_id_unique_" + numCarrousel);
3650
3651		var carrousel = resultat.querySelector(".tchatCarrousel");
3652		carrousel.setAttribute("id", "carrousel_id_unique_" + numCarrousel);
3653
3654
3655
3656		for (var i = 0; i < nReponses; i++) {
3657			var formationNode = document.getElementById("formationClonable").cloneNode(true);
3658			formationNode.removeAttribute("id");
3659			carrousel.appendChild(formationNode);
3660		}
3661		tchatDiscussion.appendChild(bottle);
3662		tchatDiscussion.appendChild(popinEmail);
3663		tchatDiscussion.appendChild(rs);
3664		tchatDiscussion.appendChild(question);
3665		tchatDiscussion.appendChild(chargement);
3666		tchatDiscussion.appendChild(reponse);
3667		tchatDiscussion.appendChild(resultat);
3668
3669		window.openTchatbot();
3670		window.createCarrousel.init(document.querySelector("#carrousel_id_unique_" + numCarrousel));
3671		window.createPartage.init(document.querySelector("#partage_id_unique_" + numCarrousel));
3672
3673
3674		numCarrousel++;
3675	}
3676
3677
3678	window.rechercher = rechercher;
3679
3680})();
3681;
3682/**
3683 * ...
3684 * @author 
3685 */
3686
3687(function() {
3688	
3689	var themeBoutons = document.querySelectorAll(".filtres button");
3690	var n = themeBoutons.length;
3691	var currentTheme;
3692	
3693	for(var i = 0; i < n; i++)
3694	{
3695		var themeBouton = themeBoutons[i];
3696		
3697		if(themeBouton.classList.contains("selection")) { currentTheme = themeBouton; }
3698		
3699		themeBouton.addEventListener("click", function (e) { filtreClick(e.currentTarget); });
3700	}
3701	
3702	
3703	filtreClick = function(target)
3704	{
3705		console.log(currentTheme);
3706		currentTheme.classList.remove("selection");
3707		target.classList.add("selection");
3708		currentTheme = target;
3709	}
3710	
3711})();
3712;
3713/**
3714 * ...
3715 * @author ...
3716 */
3717
3718(function($) {
3719	var createVideo = function() {
3720		this.init = function(dom) {
3721			new video(dom);
3722		};
3723	};
3724
3725	var currentVideo;
3726
3727	var video = function(dom) {
3728		var _this = this;
3729
3730		this.dom = dom;
3731
3732		this.button = this.dom.querySelector('button');
3733
3734		this.button.addEventListener('click', function(e) {
3735			_this.onOpenVideo(e);
3736			e.preventDefault();
3737		});
3738
3739		this.onOpenVideo = function(e) {
3740			_this.openedButton = e.target;
3741			document.querySelector('.aside.video').classList.add('ouvert');
3742			currentVideo = this;
3743
3744			//var videoPlayer = document.querySelector(".aside.video video");
3745			var videoPlayer = document.querySelector('.aside.video iframe');
3746
3747			/*while (videoPlayer.childNodes.length > 0) {
3748                videoPlayer.removeChild(videoPlayer.childNodes[0]);
3749            }
3750
3751            var source = document.createElement('source');
3752
3753            source.src = e.currentTarget.parentNode.parentNode.dataset.url;
3754            source.type = "video/mp4";
3755
3756            videoPlayer.appendChild(source);*/
3757
3758			videoPlayer.src = e.currentTarget.parentNode.parentNode.dataset.url;
3759
3760			window.addEventListener('keyup', onKeyUp);
3761			window.disableScroll()
3762			window.disableTabIndexAt(document);
3763			window.enableTabIndexAt(document.querySelector('.aside.video'));
3764			document.querySelector('.aside.video').removeAttribute('tabindex');
3765
3766			document.querySelector('.aside.video .fermeture').focus();
3767		};
3768	};
3769
3770	function onKeyUp(e) {
3771		if (e.keyCode == 27) {
3772			clickClose();
3773		}
3774	}
3775
3776	window.createVideo = new createVideo();
3777
3778	Drupal.behaviors.createVideo = {
3779		attach: function(context, settings) {
3780			if (jQuery('.videoBoite').length) {
3781				jQuery('.videoBoite', context).once('createVideo').each(function() {
3782					var closeButton = document.querySelector('.aside.video .fermeture');
3783					if (closeButton != null) {
3784						closeButton.removeEventListener('click', clickClose);
3785						closeButton.addEventListener('click', clickClose);
3786					}
3787
3788					new video(this);
3789				});
3790			}
3791			document.querySelector('.aside.video').setAttribute('tabindex', -1);
3792		}
3793	};
3794
3795	function clickClose() {
3796		document.querySelector('.aside.video').classList.remove('ouvert');
3797		document.querySelector('.aside.video iframe').src = '';
3798		document.querySelector('.aside.video iframe').removeAttribute('src');
3799		window.removeEventListener('keyup', onKeyUp);
3800
3801		window.disableTabIndexAt(document.querySelector('.aside.video'));
3802		window.enableSectionTabIndex();
3803		window.enableHeaderTabIndex();
3804		window.enableFooterTabIndex();
3805		window.enableScroll()
3806
3807		window.enableBot();
3808		window.enableSkipLink();
3809		document.querySelector('.aside.video').setAttribute('tabindex', -1);
3810
3811		if (currentVideo) {
3812			currentVideo.openedButton.focus();
3813		}
3814	}
3815})(jQuery);
3816;
3817/**
3818 * van11y-accessible-hide-show-aria - ES2015 accessible hide-show system (collapsible regions), using ARIA (compatible IE9+ when transpiled)
3819 * @version v3.0.1
3820 * @link https://van11y.net/accessible-hide-show/
3821 * @license MIT : https://github.com/nico3333fr/van11y-accessible-hide-show-aria/blob/master/LICENSE
3822 */
3823"use strict";function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},loadConfig=function(){var e={},t=function(t,n){e[t]=n},n=function(t){return e[t]},r=function(t){return e[t]};return{set:t,get:n,remove:r}},DATA_HASH_ID="data-hash-id",pluginConfig=loadConfig(),findById=function(e,t){return document.querySelector("#"+e+"["+DATA_HASH_ID+'="'+t+'"]')},addClass=function(e,t){e.classList?e.classList.add(t):e.className+=" "+t},removeClass=function(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")},hasClass=function(e,t){return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)},setAttributes=function(e,t){Object.keys(t).forEach(function(n){e.
3823setAttribute(n,t[n])})},triggerEvent=function(e,t){if(e.fireEvent)e.fireEvent("on"+t);else{var n=document.createEvent("Events");n.initEvent(t,!0,!1),e.dispatchEvent(n)}},searchParentHashId=function(e,t){for(var n=!1,r=e;1===r.nodeType&&r&&n===!1;)r.hasAttribute(t)===!0?n=!0:r=r.parentNode;return n===!0?r.getAttribute(t):""},searchParent=function(e,t,n){for(var r=!1,_=e;_&&r===!1;)hasClass(_,t)===!0&&_.getAttribute(DATA_HASH_ID)===n?r=!0:_=_.parentNode;return r===!0?_.getAttribute("id"):""},plugin=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=_extends({HIDESHOW_EXPAND:"js-expandmore",HIDESHOW_BUTTON_EXPAND:"js-expandmore-button",HIDESHOW_BUTTON_EXPAND_STYLE:"expandmore__button",HIDESHOW_BUTTON_LABEL_ID:"label_expand_",DATA_PREFIX_CLASS:"data-hideshow-prefix-class",HIDESHOW_BUTTON_EMPTY_ELEMENT_SYMBOL:"expandmore__symbol",HIDESHOW_BUTTON_EMPTY_ELEMENT_TAG:"span",ATTR_HIDESHOW_BUTTON_EMPTY_ELEMENT:"aria-hidden",HIDESHOW_TO_EXPAND_ID:"expand_",HIDESHOW_TO_EXPAND_STYLE:"expandmore__to_expand",ATTR_CONTROL:"data-controls",ATTR_EXPANDED:"aria-expanded",ATTR_LABELLEDBY:"data-labelledby",ATTR_HIDDEN:"data-hidden",IS_OPENED_CLASS:"is-opened",DISPLAY_FIRST_LOAD:"js-first_load",DISPLAY_FIRST_LOAD_DELAY:"1500"},e),n=Math.random().toString(32).slice(2,12);pluginConfig.set(n,t);var r=function(){var e=arguments.length<=0||void 0===arguments[0]?document:arguments[0];return[].slice.call(e.querySelectorAll("."+t.HIDESHOW_EXPAND))},_=function(e){r(e).forEach(function(e){var r,_,a,i=Math.random().toString(32).slice(2,12),s=e.hasAttribute(t.DATA_PREFIX_CLASS)===!0?e.getAttribute(t.DATA_PREFIX_CLASS)+"-":"",E=e.nextElementSibling,o=e.innerHTML,A=document.createElement("BUTTON"),T=document.createElement(t.HIDESHOW_BUTTON_EMPTY_ELEMENT_TAG);e.setAttribute(DATA_HASH_ID,n),addClass(T,s+t.HIDESHOW_BUTTON_EMPTY_ELEMENT_SYMBOL),setAttributes(T,(r={},_defineProperty(r,t.ATTR_HIDESHOW_BUTTON_EMPTY_ELEMENT,!0),_defineProperty(r,DATA_HASH_ID,n),r)),e.innerHTML="",addClass(A,s+t.HIDESHOW_BUTTON_EXPAND_STYLE),addClass(A,t.HIDESHOW_BUTTON_EXPAND),setAttributes(A,(_={},_defineProperty(_,t.ATTR_CONTROL,t.HIDESHOW_TO_EXPAND_ID+i),_defineProperty(_,t.ATTR_EXPANDED,"false"),_defineProperty(_,"id",t.HIDESHOW_BUTTON_LABEL_ID+i),_defineProperty(_,"type","button"),_defineProperty(_,DATA_HASH_ID,n),_)),A.innerHTML=o,e.appendChild(A),A.insertBefore(T,A.firstChild),setAttributes(E,(a={},_defineProperty(a,t.ATTR_LABELLEDBY,t.HIDESHOW_BUTTON_LABEL_ID+i),_defineProperty(a,t.ATTR_HIDDEN,"true"),_defineProperty(a,"id",t.HIDESHOW_TO_EXPAND_ID+i),_defineProperty(a,DATA_HASH_ID,n),a)),addClass(E,s+t.HIDESHOW_TO_EXPAND_STYLE),hasClass(E,t.DISPLAY_FIRST_LOAD)===!0&&setTimeout(function(){removeClass(E,t.DISPLAY_FIRST_LOAD)},t.DISPLAY_FIRST_LOAD_DELAY),hasClass(E,t.IS_OPENED_CLASS)===!0&&(addClass(A,t.IS_OPENED_CLASS),A.setAttribute(t.ATTR_EXPANDED,"true"),removeClass(E,t.IS_OPENED_CLASS),E.removeAttribute(t.ATTR_HIDDEN))})};return{attach:_}},main=function(){return["click","keydown"].forEach(function(e){document.body.addEventListener(e,function(t){var n=searchParentHashId(t.target,DATA_HASH_ID);if(""!==n){var r=pluginConfig.get(n),_=searchParent(t.target,r.HIDESHOW_BUTTON_EXPAND,n);if(""!==_&&"click"===e){var a=findById(_,n),i=findById(a.getAttribute(r.ATTR_CONTROL),n),s=a.getAttribute(r.ATTR_EXPANDED);"false"===s?(a.setAttribute(r.ATTR_EXPANDED,!0),addClass(a,r.IS_OPENED_CLASS),i.removeAttribute(r.ATTR_HIDDEN)):(a.setAttribute(r.ATTR_EXPANDED,!1),removeClass(a,r.IS_OPENED_CLASS),i.setAttribute(r.ATTR_HIDDEN,!0))}if(hasClass(t.target,r.HIDESHOW_EXPAND)===!0){var E=t.target,o=E.querySelector("."+r.HIDESHOW_BUTTON_EXPAND);if(E!=o){if("click"===e)return triggerEvent(o,"click"),!1;if("keydown"===e&&(13===t.keyCode||32===t.keyCode))return triggerEvent(o,"click"),!1}}}},!0)}),plugin};window.van11yAccessibleHideShowAria=main();var onLoad=function e(){var t=window.van11yAccessibleHideShowAria();t.attach(),document.removeEventListener("DOMContentLoaded",e)};document.addEventListener("DOMContentLoaded",onLoad);
3824;
vendor: 24,103 bytes, lines 3825-3833
3825/*!
3826 * Masonry PACKAGED v4.2.2
3827 * Cascading grid layout library
3828 * https://masonry.desandro.com
3829 * MIT License
3830 * by David DeSandro
3831 */
3832
3833!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(t,r),delete n[r]),r.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);s=200==Math.round(t(o.width)),r.isBoxSizeOuter=s,i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i],o=n+"MatchesSelector";if(t[o])return o}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var n=Array.prototype.slice;i.makeArray=function(t){if(Array.isArray(t))return t;if(null===t||void 0===t)return[];var e="object"==typeof t&&"number"==typeof t.length;return e?n.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);-1!=i&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,n){t=i.makeArray(t);var o=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!n)return void o.push(t);e(t,n)&&o.push(t);for(var i=t.querySelectorAll(n),r=0;r<i.length;r++)o.push(i[r])}}),o},i.debounceMethod=function(t,e,i){i=i||100;var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var o=t.console;return i.htmlInit=function(e,n){i.docReady(function(){var r=i.toDashed(n),s="data-"+r,a=document.querySelectorAll("["+s+"]"),h=document.querySelectorAll(".js-"+r),u=i.makeArray(a).concat(i.makeArray(h)),d=s+"-options",l=t.jQuery;u.forEach(function(t){var i,r=t.getAttribute(s)||t.getAttribute(d);try{i=r&&JSON.parse(r)}catch(a){return void(o&&o.error("Error parsing "+s+" on "+t.className+": "+a))}var h=new e(t,i);l&&l.data(t,n,h)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function n(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var r=document.documentElement.style,s="string"==typeof r.transition?"transition":"WebkitTransition",a="string"==typeof r.transform?"transform":"WebkitTransform",h={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[s],u={transform:a,transition:s,transitionDuration:s+"Duration",transitionProperty:s+"Property",transitionDelay:s+"Delay"},d=n.prototype=Object.create(t.prototype);d.constructor=n,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var n=u[i]||i;e[n]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],r=parseFloat(n),s=parseFloat(o),a=this.layout.size;-1!=n.indexOf("%")&&(r=r/100*a.width),-1!=o.indexOf("%")&&(s=s/100*a.height),r=isNaN(r)?0:r,s=isNaN(s)?0:s,r-=e?a.paddingLeft:a.paddingRight,s-=i?a.paddingTop:a.paddingBottom,this.position.x=r,this.position.y=s},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",r=i?"left":"right",s=i?"right":"left",a=this.position.x+t[o];e[r]=this.getXValue(a),e[s]="";var h=n?"paddingTop":"paddingBottom",u=n?"top":"bottom",d=n?"bottom":"top",l=this.position.y+t[h];e[u]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),o&&!this.isTransitioning)return void this.layoutPosition();var r=t-i,s=e-n,a={};a.transform=this.getTranslate(r,s),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop");return t=i?t:-t,e=n?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var n=this.element.offsetHeight;n=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+o(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(h,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var c={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=c[t.propertyName]||t.propertyName;if(delete e.ingProperties[n],i(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd){var o=e.onEnd[n];o.call(this),delete e.onEnd[n]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(h,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(f)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return s&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},n}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,o){"use strict";function r(t,e){var i=n.getQueryElement(t);if(!i)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,u&&(this.$element=u(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var o=++l;this.element.outlayerGUID=o,c[o]=this,this._create();var r=this._getOption("initLayout");r&&this.layout()}function s(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],n=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var o=m[n]||1;return i*o}var h=t.console,u=t.jQuery,d=function(){},l=0,c={};r.namespace="outlayer",r.Item=o,r.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=r.prototype;n.extend(f,e.prototype),f.option=function(t){n.extend(this.options,t)},f._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},r.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0;o<e.length;o++){var r=e[o],s=new i(r,this);n.push(s)}return n},f._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},f.getItemElements=function(){return this.items.map(function(t){return t.element})},f.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},f._init=f.layout,f._resetLayout=function(){this.getSize()},f.getSize=function(){this.size=i(this.element)},f._getMeasurement=function(t,e){var n,o=this.options[t];o?("string"==typeof o?n=this.element.querySelector(o):o instanceof HTMLElement&&(n=o),this[t]=n?i(n)[e]:o):this[t]=0},f.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},f._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},f._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)},this),this._processLayoutQueue(i)}},f._getItemLayoutPosition=function(){return{x:0,y:0}},f._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},f.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},f._positionItem=function(t,e,i,n,o){n?t.goTo(e,i):(t.stagger(o*this.stagger),t.moveTo(e,i))},f._postLayout=function(){this.resizeContainer()},f.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},f._getContainerSize=d,f._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},f._emitCompleteOnItems=function(t,e){function i(){o.dispatchEvent(t+"Complete",null,[e])}function n(){s++,s==r&&i()}var o=this,r=e.length;if(!e||!r)return void i();var s=0;e.forEach(function(e){e.once(t,n)})},f.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),u)if(this.$element=this.$element||u(this.element),e){var o=u.Event(e);o.type=t,this.$element.trigger(o,i)}else this.$element.trigger(t,i)},f.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},f.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},f.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},f.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},f._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)):void 0},f._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},f._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},f._manageStamp=d,f._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,o=i(t),r={left:e.left-n.left-o.marginLeft,top:e.top-n.top-o.marginTop,right:n.right-e.right-o.marginRight,bottom:n.bottom-e.bottom-o.marginBottom};return r},f.handleEvent=n.handleEvent,f.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},f.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},f.onresize=function(){this.resize()},n.debounceMethod(r,"onresize",100),f.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},f.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},f.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},f.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},f.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},f.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},f.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},f.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},f.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},f.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},f.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},f.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},f.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete c[e],delete this.element.outlayerGUID,u&&u.removeData(this.element,this.constructor.namespace)},r.data=function(t){t=n.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&c[e]},r.create=function(t,e){var i=s(r);return i.defaults=n.extend({},r.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},r.compatOptions),i.namespace=t,i.data=r.data,i.Item=s(o),n.htmlInit(i,t),u&&u.bridget&&u.bridget(t,i),i};var m={ms:1,s:1e3};return r.Item=o,r}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var n=i.prototype;return n._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},n.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var n=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,r=o/n,s=n-o%n,a=s&&1>s?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",r=this[o](n,t),s={x:this.columnWidth*r.col,y:r.y},a=r.y+t.size.outerHeight,h=n+r.col,u=r.col;h>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var o=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=o?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});
3833;
3834/**
3835 * ...
3836 * @author 
3837 */
3838(function() {
3839	/*
3840	var createDemiPanneau = function()
3841	{
3842		this.init = function(dom)
3843		{
3844			new DemiPanneau(dom);
3845		}
3846	}
3847*/
3848	var DemiPanneau = function(dom) {
3849		var _this = this;
3850		this.dom = dom;
3851		this.dom.panneau = this;
3852		dom.setAttribute('tabindex', -1);
3853		dom.setAttribute('aria-hidden', true);
3854
3855		this.fermerButton = dom.querySelector('button.fermeture');
3856		this.fermerButton.addEventListener('click', function(e) {
3857			_this.onFermerClick(e);
3858		});
3859
3860		var keyHandler = function(e) {
3861			if (e.keyCode == 27) {
3862				_this.close();
3863			}
3864		};
3865
3866		this.open = function(btn) {
3867			this.btnOpen = btn;
3868			window.addEventListener('keyup', keyHandler);
3869			dom.removeAttribute('tabindex');
3870			dom.removeAttribute('aria-hidden');
3871
3872			setTimeout(function() {
3873				_this.fermerButton.focus();
3874			}, 100);
3875		};
3876
3877		this.onFermerClick = function(e) {
3878			this.close();
3879		};
3880
3881		this.close = function() {
3882			dom.setAttribute('tabindex', -1);
3883			dom.setAttribute('aria-hidden', true);
3884			window.removeEventListener('keyup', keyHandler);
3885			this.dom.classList.remove('ouvert');
3886			window.disableTabIndexAt(this.dom);
3887			window.enableScroll();
3888			window.enableSectionTabIndex();
3889			window.enableHeaderTabIndex();
3890			window.enableFooterTabIndex();
3891			window.enableSkipLink();
3892			document.body.style.overflow = '';
3893			_this.btnOpen.focus();
3894		};
3895	};
3896
3897	var openDemiPanneau = function(dom, btn) {
3898		var panneau = document.querySelector('.' + dom.dataset.panneau);
3899
3900		panneau.classList.add('ouvert');
3901
3902		window.disableScroll();
3903		window.disableTabIndexAt(document);
3904		window.enableTabIndexAt(panneau);
3905		panneau.panneau.open(btn);
3906
3907		document.body.style.overflow = 'hidden';
3908	};
3909
3910	/*window.openDemiPanneau = openDemiPanneau(dom);*/
3911
3912	var doms = document.querySelectorAll('button.details');
3913	var nDoms = doms.length;
3914
3915	for (var i = 0; i < nDoms; i++) {
3916		doms[i].addEventListener('click', function(e) {
3917			openDemiPanneau(e.currentTarget, this);
3918		});
3919
3920		new DemiPanneau(document.querySelector('.' + doms[i].dataset.panneau));
3921	}
3922})();
3923;
3924// Detect is mobile or not
3925var $ = jQuery;
3926testExp = new RegExp('Android|webOS|iPhone|iPad|' + 'BlackBerry|Windows Phone|' + 'Opera Mini|IEMobile|Mobile', 'i');
3927
3928if (testExp.test(navigator.userAgent)) {
3929    window.isMobile = true;
3930} else {
3931    window.isMobile = false;
3932}
3933
3934// Detect if is IE
3935var ua = window.navigator.userAgent;
3936var isIE = /MSIE|Trident|Edge/.test(ua);
3937
3938if (isIE) {
3939    window.isie = true;
3940} else {
3941    window.isie = false;
3942}
3943var isFirst = true;
3944
3945function filtreselectedlabel() {
3946    // Mise en place de la class selected sur les labels
3947    // console.log(isFirst);
3948    var $filtrelabel = $('#filtre-liste label');
3949    var needApplyFilter = false;
3950    var form;
3951    $filtrelabel.each(function() {
3952        var isSel;
3953        form = this.form;
3954        if ($(this).find('input').is(':checked')) {
3955            $(this).parent().addClass('labelselected');
3956        }
3957        if ($(this).find('input').attr('checked') == 'checked') {
3958            $(this).parent().addClass('labelchecked');
3959        }
3960    });
3961
3962    isFirst = false;
3963
3964    // var $filtrelabel = jQuery('#filtre-liste label');
3965    // $filtrelabel.each(function () {
3966    //   if (jQuery(this).find('input').is(':checked')) {
3967    //     jQuery(this).parent().addClass('labelselected');
3968    //   }
3969    // });
3970    // $filtrelabel.unbind('mousedown').on('mousedown', function () {
3971    //   jQuery(this).parents('.fieldset-wrapper').find('label').parent().removeClass('labelselected');
3972    //   jQuery(this).parent().addClass('labelselected');
3973    // });
3974}
3975
3976window.addEventListener('scroll', updateScrollPosition, true);
3977window.addEventListener('resize', updateScrollPosition, true);
3978var scrollTop = 0;
3979
3980function updateScrollPosition(e) {
3981    var $elt = $('html');
3982    scrollTop = $elt.scrollTop();
3983    // console.log(scrollTop);
3984}
3985
3986var $masonry;
3987var isClickLoadMore;
3988var nbLastItemMasonry;
3989
3990function listemasonry() {
3991    // Mise en place de masonry sur la grille de résultat
3992    var $btnLoadMore = $('.pager__item');
3993    if ($btnLoadMore.length > 0) {
3994        $btnLoadMore.unbind('click', 'button').bind('mouseup', 'button', function(e) {
3995            isClickLoadMore = true;
3996        });
3997        $btnLoadMore.unbind('keyup', 'button').bind('keyup', 'button', function(e) {
3998            if (e.keyCode == 13) {
3999                isClickLoadMore = true;
4000            }
4001        });
4002    }
4003
4004    $masonry = jQuery('.liste-result.applymasonry .form-group').masonry({
4005        // options
4006        itemSelector: '.views-row'
4007    });
4008    if (isClickLoadMore) {
4009        var $item = $('.views-row').eq(nbLastItemMasonry);
4010        $item.attr('tabindex', '-1');
4011        $item[0].focus();
4012        $item.on('blur', function() {
4013            $item.removeAttr('tabindex');
4014            $item.unbind('blur');
4015        });
4016    }
4017    isClickLoadMore = false;
4018
4019    nbLastItemMasonry = $('.views-row').length;
4020    $('html').scrollTop(scrollTop);
4021}
4022
4023function gototop() {
4024    // start button to top
4025    jQuery('.buttontotop').on('click', function(e) {
4026        // e.preventDefault();
4027        jQuery('html, body').stop().animate({ scrollTop: jQuery('header#navbar').parent().offset().top }, 1000);
4028    });
4029    // end button to top
4030}
4031
4032function navglobalhover() {
4033    jQuery('.navGlobal a').hover(
4034        function() {
4035            jQuery('.navGlobal a').addClass('nohover');
4036            jQuery(this).removeClass('nohover');
4037        },
4038        function() {
4039            jQuery('.navGlobal a').removeClass('nohover');
4040        }
4041        );
4042        jQuery('.navGlobal a').focus(function() {
4043            jQuery('.navGlobal a').addClass('nohover');
4044            jQuery(this).removeClass('nohover');
4045        });
4046        jQuery('.navGlobal a').blur(function() {
4047            jQuery('.navGlobal a').removeClass('nohover');
4048        });
4049    }
4050
4051    function refreshFilters() {
4052        var $filtrelabel = $('#filtre-liste label');
4053        $(".accordion .pins").html('');
4054        $filtrelabel.each(function() {
4055            var id = $(this).find('input').attr('id');
4056            var pins = $(this).parents('.card').find('.pins');
4057            if ($(this).find('input').is(':checked')) {
4058                if (pins.find("#pin-" + id).length == 0) {
4059
4060                    pins.append("<span class='pin' id='pin-" + id + "' data-target='" + id + "'>" + $(this).parent().find("label").text().trim() + "</span>");
4061                    pins.find("span").off('click').click(function(e) {
4062                        var checkbox = $("#" + $(e.target).attr('data-target'));
4063                        // checkbox.prop("checked", !checkbox.prop("checked"));
4064                        checkbox.prop("checked", false);
4065                        checkbox.trigger('change');
4066                        $(e.target).remove();
4067                        $("button.form-submit[value='Apply']").click();
4068                    });
4069                }
4070                $(this).parents('.form-item').addClass('labelselected');
4071            } else {
4072                $("#pin-" + id).remove();
4073                $(this).parents('.form-item').removeClass('labelselected');
4074            }
4075            $(this).find('input').off('focus').on('focus', function() {
4076                var $item = $(this).parents('.checkbox')
4077                $item.addClass('focus-within');
4078            });
4079            $(this).find('input').off('blur').on('blur', function() {
4080                var $item = $(this).parents('.checkbox')
4081                $item.removeClass('focus-within');
4082            });
4083        });
4084        var $collapseButtons = $('#filtre-liste .card-header button');
4085        $collapseButtons.click(function(e) {
4086            if ($(this).attr('aria-expanded') == 'false') {
4087                $(this).parent().addClass('expanded');
4088            } else {
4089                $(this).parent().removeClass('expanded');
4090            }
4091
4092        });
4093    }
4094
4095    (function($) {
4096        'use strict';
4097
4098        // Add class if is mobile or not
4099        if (window.isMobile) {
4100            $('html').addClass('touch');
4101        } else {
4102            $('html').addClass('no-touch');
4103        }
4104
4105        // Add class if is IE
4106        if (window.isie) {
4107            $('html').addClass('isie');
4108        } else {
4109            $('html').addClass('notie');
4110        }
4111
4112        Drupal.behaviors.viewMain = {
4113            // Au rafraîchissement de la vue
4114            attach: function(context, settings) {
4115                /****************Debut GTM btn recherche *****/
4116                $('#edit-submit-recherche-home', context).once().on('click', function(e) {
4117                    gtag('event', 'conversion', {
4118                        'allow_custom_scripts': true,
4119                        'send_to': 'DC-3180592/agric0/btnvnt0+unique'
4120                    });
4121
4122                });
4123                /****************Fin GTM recherche ******/
4124                /****************Debut GTM btn formations *****/
4125                $('#btn-recherche-formations', context).once().on('click', function(e) {
4126                    gtag('event', 'conversion', {
4127                        'allow_custom_scripts': true,
4128                        'send_to': 'DC-3180592/agric0/btvvnt1+unique'
4129                      });
4130
4131                });
4132                /****************Fin GTM formations ******/
4133                /****************Debut GTM btn metiers *****/
4134                $('#btn-recherche-metiers', context).once().on('click', function(e) {
4135                    gtag('event', 'conversion', {
4136                        'allow_custom_scripts': true,
4137                        'send_to': 'DC-3180592/agric0/btvvnt2+unique'
4138                      });
4139
4140
4141                });
4142                /****************Fin GTM metiers ******/
4143                /****************Debut GTM btn etablissements *****/
4144                $('#btn-recherche-etablissements', context).once().on('click', function(e) {
4145                    gtag('event', 'conversion', {
4146                        'allow_custom_scripts': true,
4147                        'send_to': 'DC-3180592/agric0/btvvnt3+unique'
4148                      });
4149                });
4150                /****************Fin GTM etablissements ******/
4151                /****************Debut Auto promote Chatbot cta *****/
4152                $('.click-cta-bot-auto-promo').on('click', function(e) {
4153                    document.querySelector('.launcher-icon').click();
4154                    e.preventDefault();
4155                });
4156                /****************Fin Auto promote Chatbot cta ******/
4157
4158                /****************Debut Home thematique filter *****/
4159                $('.form-item-thematique-filter').on('click', function(e) {
4160                    var bottom = $('.view-id-home .view-content').offset().top;
4161                    $('html, body').stop().animate({ scrollTop: bottom }, 1000);
4162                });
4163                /****************Fin Home thematique filter ******/
4164
4165                $('.metiers-search-submit button').click(function(e) {
4166                    $("#edit-field-metier-tr-univers-target-id").val("All");
4167                });
4168                $('.accordion button').click(function(e) {
4169                    e.preventDefault();
4170                });
4171                $("fieldset[data-drupal-selector='edit-type'] input").click(function(e) {
4172                    $(".edit-type-2 input").prop("checked", false);
4173                    // $("button.form-submit[value='Apply']").click();
4174                });
4175                $(document).ajaxComplete(function(e) {
4176                    updateFilterType();
4177                });
4178                updateFilterType();
4179
4180                $('.quiz .photo a').click(function(e) {
4181                    console.log('click');
4182                    var top = $('.quiz-container').offset().top;
4183                    console.log(top);
4184                    $('html, body').scrollTop(top);
4185                })
4186
4187
4188                function updateFilterType() {
4189                    $("fieldset[data-drupal-selector='edit-type'] input").each(function() {
4190                        var $this = $(this);
4191                        var value = $this.val();
4192                        if ($this.prop("checked")) {
4193                            $(".edit-type-2 input[value='" + value + "']").parent('label').css('display', '');
4194                        } else {
4195                            $(".edit-type-2 input[value='" + value + "']").parent('label').css('display', 'none');
4196                        }
4197                    });
4198
4199                    if ($("fieldset[data-drupal-selector='edit-type'] input[checked='checked']").length == 0) {
4200                        $(".edit-type-2").css('display', '');
4201                        $(".edit-type-2 input").parent('label').css('display', '');
4202                    }
4203                    if ($("fieldset[data-drupal-selector='edit-type'] input[checked='checked']").length == 1) {
4204                        $(".edit-type-2 input").parent('label').css('display', 'none');
4205                        $(".edit-type-2").css('display', 'none');
4206                    }
4207
4208
4209                    $(".edit-type-2 input").each(function() {
4210                        if ($(this).prop('checked')) {
4211                            $(this).parents('div').addClass('checked');
4212                        } else {
4213                            $(this).parents('div').removeClass('checked');
4214                        }
4215                    });
4216                }
4217
4218                $(".edit-type-2 input").click(function(e) {
4219                    if ($(this).prop('checked')) {
4220                        $(this).parents('div').addClass('checked');
4221                    } else {
4222                        $(this).parents('div').removeClass('checked');
4223                    }
4224                    $("button.form-submit[value='Rechercher']").click();
4225                });
4226
4227                // Remove args from url to allow ajax refresh on search page
4228                var vars = [];
4229                window.location.href.replace(location.hash, '').replace(
4230                    /[?&]+([^=&]+)=?([^&]*)?/gi, // regexp
4231                    function(m, key, value) { // callback
4232                        vars.push(value);
4233                    }
4234                    );
4235                    // if (window.location.pathname == '/recherche' && vars.length > 0) {
4236                    //     history.pushState(null, '', window.location.pathname);
4237                    // }
4238
4239                    if ($('#filtre-liste').length) {
4240                        $('#filtre-liste', context).once('viewMain').each(function() {
4241                            setTimeout(function() {
4242                                if ($('.js-expandmore.filtre-liste-cold button').length === 0) {
4243                                    var my_expand = van11yAccessibleHideShowAria();
4244                                    my_expand.attach(document.getElementById('filtre-liste'));
4245                                }
4246                            }, 1);
4247                        });
4248                        $(document).ajaxComplete(function() {
4249                            refreshFilters();
4250                        });
4251                        $('#filtre-liste label').find('input').unbind('change').on('change', function(e) {
4252                            refreshFilters();
4253                        });
4254                        refreshFilters();
4255
4256                        gototop();
4257                        navglobalhover();
4258                        if ($('.liste-result.applymasonry').length) {
4259                            let firstElt = $('.liste-result.applymasonry .form-group .views-row:eq(0)');
4260                            if (firstElt.length > 0 && firstElt.get(0).hasAttribute('style')) {
4261                                $('.liste-result.applymasonry .form-group').masonry('destroy');
4262                                $('.liste-result.applymasonry .form-group').removeData('masonry');
4263                                listemasonry();
4264                            } else {
4265                                listemasonry();
4266                            }
4267                        }
4268                    }
4269                    if ($('.filtre-liste-form form').length) {
4270                        $(document).off('ajaxComplete', ajaxComplete);
4271                        $(document).on('ajaxComplete', ajaxComplete);
4272
4273                        $('.filtre-liste-form form').off('change', onChangeFilter);
4274                        $('.filtre-liste-form form').on('change', onChangeFilter);
4275                    }
4276                }
4277            };
4278            Drupal.behaviors.viewsScrollOff = {
4279                attach: function() {
4280                    /* Views Ajax Content Load Autoscroll Feature Disabled */
4281                    if (Drupal.AjaxCommands) {
4282                        Drupal.AjaxCommands.prototype.viewsScrollTop = null;
4283                    }
4284                }
4285            };
4286
4287            var isFilterChange = false;
4288            var intervalIdAjax;
4289
4290            function onChangeFilter(e) {
4291                isFilterChange = true;
4292            }
4293
4294            function ajaxComplete(event, xhr, settings) {
4295                clearTimeout(intervalIdAjax);
4296                intervalIdAjax = setTimeout(function() {
4297                    if (isFilterChange) {
4298                        // $('.filtre-liste-form form input:checked').focus();
4299                        var $result = $('.liste-result');
4300                        if ($result.length) {
4301                            var rect = $result[0].getBoundingClientRect().top;
4302                            if (rect > window.innerHeight * 0.75) {
4303                                var top = $result.offset().top - window.innerHeight * 0.25;
4304                                // $('html').animate({
4305                                //     scrollTop: top
4306                                // }, 500);
4307                            }
4308                        }
4309                    }
4310                    isFilterChange = false;
4311                }, 10);
4312            }
4313
4314            var $html = $('html');
4315            var isMouse = true;
4316            $html.addClass('ismouse');
4317            window.addEventListener('mousemove', function() {
4318                if (isMouse) return;
4319                $html.addClass('ismouse');
4320                isMouse = true;
4321            });
4322
4323            window.addEventListener('keyup', function() {
4324                if (!isMouse) return;
4325                $html.removeClass('ismouse');
4326                isMouse = false;
4327            });
4328        })(jQuery);
4329
4330        (function() {
4331
4332            window.addEventListener("load", function(e) {
4333                initDescriptions();
4334            });
4335
4336
4337            var isOpen = false;
4338            var dom;
4339            var container;
4340            var openedButton;
4341
4342            var initDescriptions = function() {
4343                dom = document.querySelector("aside.input-description-tooltip");
4344
4345                // console.log("----- "+dom);
4346                if (dom != null) {
4347                    window.addEventListener("resize", function(e) {
4348                        closeDescription();
4349                    });
4350                    window.addEventListener("click", function(e) {
4351                        closeDescription();
4352                    });
4353
4354                    container = document.querySelector(".filtres-container");
4355
4356                    var buttons = document.querySelectorAll(".input-description button");
4357                    var nButtons = buttons.length;
4358
4359                    for (var i = 0; i < nButtons; i++) {
4360                        buttons[i].addEventListener("click", function(e) {
4361                          openDescription(e.currentTarget);
4362                        });
4363                    }
4364                }
4365            }
4366
4367            var setTooltipArrow = function(valueOut, valueIn) {
4368                dom.querySelector(".tooltip-arrow-out").style.left = valueOut;
4369                dom.querySelector(".tooltip-arrow-in").style.left = valueIn;
4370            }
4371
4372            var openDescription = function(domButton) {
4373
4374                if (!isOpen) {
4375
4376                    dom.querySelector(".description-content").innerHTML = domButton.parentElement.querySelector(".description-content").innerHTML;
4377                    dom.classList.add("open");
4378                    var rect = domButton.getBoundingClientRect();
4379                    var containerRect = container.getBoundingClientRect();
4380                    var domRect = dom.getBoundingClientRect();
4381
4382                    var left = rect.left - containerRect.left - domRect.width * .5 + 14;
4383
4384
4385                    dom.classList.remove("bottom");
4386
4387                    setTooltipArrow("", "");
4388                    if (left < 10) {
4389                        left = 10;
4390                        setTooltipArrow((rect.left - 8) + "px", (rect.left - 10) + "px");
4391                    }
4392
4393                    if (left + domRect.width > window.innerWidth - 10) {
4394
4395                        left = window.innerWidth - 10 - domRect.width;
4396                        setTooltipArrow(
4397                            (domRect.width - window.innerWidth + rect.left + 12) + "px",
4398                            (domRect.width - window.innerWidth + rect.left + 10) + "px"
4399                            );
4400                        }
4401
4402                        var top = rect.bottom - containerRect.top + 20;
4403
4404                        if (rect.top > window.innerHeight * .5) {
4405                            top = rect.top - containerRect.top - 16 - domRect.height;
4406                            dom.classList.add("bottom");
4407                        } else {
4408                            top = rect.bottom - containerRect.top + 13;
4409                        }
4410
4411                        dom.style.top = top + "px";
4412                        dom.style.left = left + "px";
4413                        domButton.setAttribute('aria-expanded', true);
4414                        openedButton = domButton;
4415                        window.addEventListener('keyup', onkeyup);
4416
4417                        dom.setAttribute('tabindex', -1);
4418                        dom.focus();
4419
4420                        dom.removeEventListener('blur', onblurdom);
4421                        dom.addEventListener('blur', onblurdom);
4422
4423                        setTimeout(function() {
4424                            isOpen = true
4425                        }, 10);
4426                    }
4427                }
4428
4429                var onblurdom = function() {
4430                    closeDescription();
4431                }
4432
4433                var onkeyup = function(e) {
4434                    if (e.keyCode == 27) {
4435                        closeDescription();
4436                    }
4437                }
4438
4439                var closeDescription = function() {
4440                    if (isOpen) {
4441                        dom.removeEventListener('blur', onblurdom);
4442                        dom.classList.remove("open");
4443                        isOpen = false;
4444                        if (openedButton) {
4445                            openedButton.setAttribute('aria-expanded', false);
4446                            openedButton.focus();
4447                            openedButton = null;
4448
4449                        }
4450                        window.removeEventListener('keyup', onkeyup);
4451                    }
4452                }
4453
4454
4455            })();
4456;
4457(function($) {
4458    Drupal.behaviors.focusWithinModule = {
4459        attach: function(context, settings) {
4460			var sel = [];
4461			sel.push('.focus-within-event');
4462			sel.push('.filtre-liste-form fieldset .fieldset-wrapper .form-radios .form-item.radio');			
4463			sel.push('.eta-gmap-filters-form .form-item.checkbox');
4464			
4465            sel = sel.join(',');
4466            
4467			$(sel).each(function(index, element) {
4468				$(element).unbind('focus', 'input').on('focus', '*', function(e) {
4469					$(element).addClass('focus-within');
4470				});
4471				$(element).unbind('blur', 'input').on('blur', '*', function(e) {
4472					$(element).removeClass('focus-within');
4473				});
4474
4475                $(element).unbind('focus', 'input').on('focus', function(e) {
4476					$(element).addClass('focus-within');
4477				});
4478				$(element).unbind('blur', 'input').on('blur', function(e) {
4479					$(element).removeClass('focus-within');
4480				});
4481			});
4482		}
4483	};
4484})(jQuery);
4485;
4486(function($) {
4487	Drupal.behaviors.skipLink = {
4488		attach: function(context, settings) {
4489			$('.nav-skip a').each(function(index, element) {
4490				var link = $(this).attr('href');
4491				var $elt = $(link);
4492				if ($elt.length != 1) {
4493					$(this).css('display', 'none');
4494					$(this).attr('aria-hidden', true);
4495					$(this).attr('tabindex', -1);
4496				} else {
4497				}
4498			});
4499		}
4500	};
4501})(jQuery);
4502;
4503(function() {
4504    window.addEventListener('load', function() {
4505        var elt = document.querySelector('.page-node-type-enseignement-agricole');
4506        if (elt) {
4507            init();
4508        }
4509    });
4510
4511    var nav;
4512    var intro;
4513    var stopNav;
4514    var links;
4515    var lastLink;
4516    var $carouselItem;
4517    window.addEventListener('resize', resize);
4518
4519    function init() {
4520        nav = document.querySelector('.secondary-nav');
4521        intro = document.querySelector('.introduction');
4522        stopNav = document.querySelector('.stop-nav');
4523        links = nav.querySelectorAll('a');
4524        $carouselItem = $('.carrousel .photo');
4525
4526        sommaire = nav.querySelector("button");
4527        sommaire.addEventListener('mousedown', sommaireToggle);
4528
4529        window.addEventListener('scroll', scroll, true);
4530        window.addEventListener('resize', scroll);
4531        scroll();
4532
4533        for (var i = 0; i < links.length; i++) {
4534            links[i].addEventListener('focus', function() {
4535                var rect = this.getBoundingClientRect();
4536                if (rect.y > window.innerHeight || rect.y < 0) {
4537                    document.body.scrollTo(0, rect.y);
4538                }
4539            });
4540
4541            links[i].addEventListener('mouseup', function() {
4542                closeSommaire();
4543            });
4544
4545            links[i].addEventListener('click', function(e) {
4546                var btn = $(nav).find('button:visible');
4547                if (btn.length) {
4548                    e.preventDefault();
4549                    var id = $(this).attr('href');
4550                    id - id.substr(0, id.length);
4551                    var $target = $(id);
4552                    var top = $target.offset().top;
4553                    var h = nav.getBoundingClientRect().height;
4554                    $('html, body').scrollTop(top - h);
4555                    // console.log(top, h)
4556                }
4557
4558            });
4559        }
4560        resize();
4561
4562    }
4563
4564    function sommaireToggle() {
4565        if (nav.classList.contains("open")) {
4566            nav.classList.remove("open");
4567        } else {
4568            nav.classList.add("open");
4569        }
4570
4571    }
4572
4573    function closeSommaire() {
4574        if (nav.classList.contains("open")) {
4575            nav.classList.remove("open");
4576        }
4577    }
4578
4579    function scroll() {
4580        if (lastLink) {
4581            lastLink.classList.remove('active');
4582        }
4583        if (getComputedStyle(nav, null).position == 'fixed') {
4584            var rect = intro.getBoundingClientRect();
4585            var posy = rect.top + rect.height;
4586            if (posy < 0) {
4587                posy = 0;
4588                if (window.innerWidth <= 800) {
4589                    posy = 60;
4590                }
4591            }
4592            var rect2 = stopNav.getBoundingClientRect();
4593            var rect3 = nav.getBoundingClientRect();
4594            var max = rect2.top - rect3.height;
4595            if (posy > max) posy = max;
4596
4597            nav.style.top = posy + 'px';
4598
4599            var current = null;
4600            for (var i = 0; i < links.length; i++) {
4601                var target = document.querySelector(links[i].getAttribute('href'));
4602                var rect = target.getBoundingClientRect();
4603                if (rect.top > -20 && rect.top < window.innerHeight / 2 && !current) {
4604                    current = links[i];
4605                }
4606            }
4607            if (current) {
4608                current.classList.add('active');
4609            }
4610
4611            lastLink = current;
4612        } else {
4613            nav.style.top = '';
4614        }
4615    }
4616
4617    function resize() {
4618        var max = 0;
4619        $carouselItem.each(function(index, element) {
4620            var $titre = $(element).find('.titreConteneur');
4621            var rect = $titre[0].getBoundingClientRect();
4622            var h = rect.height / 2;
4623            var $img = $(element).find('img');
4624            $img.css('margin-bottom', h + 'px');
4625            var rect = $(element).find('img')[0].getBoundingClientRect();
4626            h = rect.height / 2;
4627            if (h > max) max = h;
4628        });
4629        h = max;
4630        $('.carrousel .carrousel-previousitem').css('top', h + 'px');
4631        $('.carrousel .carrousel-nextitem').css('top', h + 'px');
4632    }
4633})();;
4634// (function() {
4635// 	window.addEventListener('load', function() {
4636// 		if (document.querySelector('.path-formations')) {
4637// 			init();
4638// 		}
4639// 	});
4640
vendor: 11,952 bytes, lines 4641-5069
4641// 	function init() {
4642// 		wait();
4643// 	}
4644
4645// 	function wait() {
4646// 		if ($('.filter-button button').length) {
4647// 			$('.filter-button button').click(function(e) {
4648// 				setTimeout(toggle, 30);
4649//             });
4650//             toggle();
4651//             setTimeout(toggle, 300);
4652// 		} else {
4653// 			setTimeout(wait, 500);
4654// 		}
4655// 	}
4656
4657// 	function toggle() {
4658//         if($('.filter-button button').hasClass('is-opened')){
4659//             $('.filter-button button .hide-filter').removeClass('hide');
4660//             $('.filter-button button .show-filter').addClass('hide')
4661//         }else{
4662//             $('.filter-button button .hide-filter').addClass('hide');
4663//             $('.filter-button button .show-filter').removeClass('hide')
4664//         }
4665//     }
4666// })();
4667;
4668(function() {
4669	Drupal.behaviors.customSelect = {
4670		attach: function(context, settings) {
4671			var elts = document.querySelectorAll('select.extendcustomselect');
4672			for (var i = 0; i < elts.length; i++) {
4673				new CustomSelect(elts[i]);
4674			}
4675		}
4676	};
4677
4678	var CustomSelect = function(target) {
4679		var div = target.parentNode.querySelector('.customselect');
4680		if (div) return;
4681		if (!div) {
4682			div = document.createElement('div');
4683			div.classList.add('customselect');
4684			div.classList.add('textbecontacted');
4685			div.setAttribute('aria-hidden', true);
4686		}
4687
4688		// target.parentNode.appendChild(div);
4689		target.parentNode.insertBefore(div, target);
4690		var index = target.selectedIndex;
4691		div.innerHTML = target.options[index].innerHTML;
4692
4693		target.addEventListener('change', function(e) {
4694			console.log('change');
4695			var index = target.selectedIndex;
4696			div.innerHTML = target.options[index].innerHTML;
4697		});
4698
4699		target.addEventListener('focus', function(e) {
4700			target.parentNode.classList.add('focus');
4701		});
4702
4703		target.addEventListener('blur', function(e) {
4704			target.parentNode.classList.remove('focus');
4705		});
4706	};
4707})();
4708;
4709/**!
4710
4711 @license
4712 handlebars v4.0.11
4713
4714Copyright (C) 2011-2017 by Yehuda Katz
4715
4716Permission is hereby granted, free of charge, to any person obtaining a copy
4717of this software and associated documentation files (the "Software"), to deal
4718in the Software without restriction, including without limitation the rights
4719to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
4720copies of the Software, and to permit persons to whom the Software is
4721furnished to do so, subject to the following conditions:
4722
4723The above copyright notice and this permission notice shall be included in
4724all copies or substantial portions of the Software.
4725
4726THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
4727IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
4728FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
4729AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
4730LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
4731OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
4732THE SOFTWARE.
4733
4734*/
4735(function webpackUniversalModuleDefinition(root, factory) {
4736	if(typeof exports === 'object' && typeof module === 'object')
4737		module.exports = factory();
4738	else if(typeof define === 'function' && define.amd)
4739		define([], factory);
4740	else if(typeof exports === 'object')
4741		exports["Handlebars"] = factory();
4742	else
4743		root["Handlebars"] = factory();
4744})(this, function() {
4745return /******/ (function(modules) { // webpackBootstrap
4746/******/ 	// The module cache
4747/******/ 	var installedModules = {};
4748
4749/******/ 	// The require function
4750/******/ 	function __webpack_require__(moduleId) {
4751
4752/******/ 		// Check if module is in cache
4753/******/ 		if(installedModules[moduleId])
4754/******/ 			return installedModules[moduleId].exports;
4755
4756/******/ 		// Create a new module (and put it into the cache)
4757/******/ 		var module = installedModules[moduleId] = {
4758/******/ 			exports: {},
4759/******/ 			id: moduleId,
4760/******/ 			loaded: false
4761/******/ 		};
4762
4763/******/ 		// Execute the module function
4764/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
4765
4766/******/ 		// Flag the module as loaded
4767/******/ 		module.loaded = true;
4768
4769/******/ 		// Return the exports of the module
4770/******/ 		return module.exports;
4771/******/ 	}
4772
4773
4774/******/ 	// expose the modules object (__webpack_modules__)
4775/******/ 	__webpack_require__.m = modules;
4776
4777/******/ 	// expose the module cache
4778/******/ 	__webpack_require__.c = installedModules;
4779
4780/******/ 	// __webpack_public_path__
4781/******/ 	__webpack_require__.p = "";
4782
4783/******/ 	// Load entry module and return exports
4784/******/ 	return __webpack_require__(0);
4785/******/ })
4786/************************************************************************/
4787/******/ ([
4788/* 0 */
4789/***/ (function(module, exports, __webpack_require__) {
4790
4791	'use strict';
4792
4793	var _interopRequireDefault = __webpack_require__(1)['default'];
4794
4795	exports.__esModule = true;
4796
4797	var _handlebarsRuntime = __webpack_require__(2);
4798
4799	var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime);
4800
4801	// Compiler imports
4802
4803	var _handlebarsCompilerAst = __webpack_require__(35);
4804
4805	var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst);
4806
4807	var _handlebarsCompilerBase = __webpack_require__(36);
4808
4809	var _handlebarsCompilerCompiler = __webpack_require__(41);
4810
4811	var _handlebarsCompilerJavascriptCompiler = __webpack_require__(42);
4812
4813	var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler);
4814
4815	var _handlebarsCompilerVisitor = __webpack_require__(39);
4816
4817	var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor);
4818
4819	var _handlebarsNoConflict = __webpack_require__(34);
4820
4821	var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
4822
4823	var _create = _handlebarsRuntime2['default'].create;
4824	function create() {
4825	  var hb = _create();
4826
4827	  hb.compile = function (input, options) {
4828	    return _handlebarsCompilerCompiler.compile(input, options, hb);
4829	  };
4830	  hb.precompile = function (input, options) {
4831	    return _handlebarsCompilerCompiler.precompile(input, options, hb);
4832	  };
4833
4834	  hb.AST = _handlebarsCompilerAst2['default'];
4835	  hb.Compiler = _handlebarsCompilerCompiler.Compiler;
4836	  hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default'];
4837	  hb.Parser = _handlebarsCompilerBase.parser;
4838	  hb.parse = _handlebarsCompilerBase.parse;
4839
4840	  return hb;
4841	}
4842
4843	var inst = create();
4844	inst.create = create;
4845
4846	_handlebarsNoConflict2['default'](inst);
4847
4848	inst.Visitor = _handlebarsCompilerVisitor2['default'];
4849
4850	inst['default'] = inst;
4851
4852	exports['default'] = inst;
4853	module.exports = exports['default'];
4854
4855/***/ }),
4856/* 1 */
4857/***/ (function(module, exports) {
4858
4859	"use strict";
4860
4861	exports["default"] = function (obj) {
4862	  return obj && obj.__esModule ? obj : {
4863	    "default": obj
4864	  };
4865	};
4866
4867	exports.__esModule = true;
4868
4869/***/ }),
4870/* 2 */
4871/***/ (function(module, exports, __webpack_require__) {
4872
4873	'use strict';
4874
4875	var _interopRequireWildcard = __webpack_require__(3)['default'];
4876
4877	var _interopRequireDefault = __webpack_require__(1)['default'];
4878
4879	exports.__esModule = true;
4880
4881	var _handlebarsBase = __webpack_require__(4);
4882
4883	var base = _interopRequireWildcard(_handlebarsBase);
4884
4885	// Each of these augment the Handlebars object. No need to setup here.
4886	// (This is done to easily share code between commonjs and browse envs)
4887
4888	var _handlebarsSafeString = __webpack_require__(21);
4889
4890	var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString);
4891
4892	var _handlebarsException = __webpack_require__(6);
4893
4894	var _handlebarsException2 = _interopRequireDefault(_handlebarsException);
4895
4896	var _handlebarsUtils = __webpack_require__(5);
4897
4898	var Utils = _interopRequireWildcard(_handlebarsUtils);
4899
4900	var _handlebarsRuntime = __webpack_require__(22);
4901
4902	var runtime = _interopRequireWildcard(_handlebarsRuntime);
4903
4904	var _handlebarsNoConflict = __webpack_require__(34);
4905
4906	var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
4907
4908	// For compatibility and usage outside of module systems, make the Handlebars object a namespace
4909	function create() {
4910	  var hb = new base.HandlebarsEnvironment();
4911
4912	  Utils.extend(hb, base);
4913	  hb.SafeString = _handlebarsSafeString2['default'];
4914	  hb.Exception = _handlebarsException2['default'];
4915	  hb.Utils = Utils;
4916	  hb.escapeExpression = Utils.escapeExpression;
4917
4918	  hb.VM = runtime;
4919	  hb.template = function (spec) {
4920	    return runtime.template(spec, hb);
4921	  };
4922
4923	  return hb;
4924	}
4925
4926	var inst = create();
4927	inst.create = create;
4928
4929	_handlebarsNoConflict2['default'](inst);
4930
4931	inst['default'] = inst;
4932
4933	exports['default'] = inst;
4934	module.exports = exports['default'];
4935
4936/***/ }),
4937/* 3 */
4938/***/ (function(module, exports) {
4939
4940	"use strict";
4941
4942	exports["default"] = function (obj) {
4943	  if (obj && obj.__esModule) {
4944	    return obj;
4945	  } else {
4946	    var newObj = {};
4947
4948	    if (obj != null) {
4949	      for (var key in obj) {
4950	        if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
4951	      }
4952	    }
4953
4954	    newObj["default"] = obj;
4955	    return newObj;
4956	  }
4957	};
4958
4959	exports.__esModule = true;
4960
4961/***/ }),
4962/* 4 */
4963/***/ (function(module, exports, __webpack_require__) {
4964
4965	'use strict';
4966
4967	var _interopRequireDefault = __webpack_require__(1)['default'];
4968
4969	exports.__esModule = true;
4970	exports.HandlebarsEnvironment = HandlebarsEnvironment;
4971
4972	var _utils = __webpack_require__(5);
4973
4974	var _exception = __webpack_require__(6);
4975
4976	var _exception2 = _interopRequireDefault(_exception);
4977
4978	var _helpers = __webpack_require__(10);
4979
4980	var _decorators = __webpack_require__(18);
4981
4982	var _logger = __webpack_require__(20);
4983
4984	var _logger2 = _interopRequireDefault(_logger);
4985
4986	var VERSION = '4.0.11';
4987	exports.VERSION = VERSION;
4988	var COMPILER_REVISION = 7;
4989
4990	exports.COMPILER_REVISION = COMPILER_REVISION;
4991	var REVISION_CHANGES = {
4992	  1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
4993	  2: '== 1.0.0-rc.3',
4994	  3: '== 1.0.0-rc.4',
4995	  4: '== 1.x.x',
4996	  5: '== 2.0.0-alpha.x',
4997	  6: '>= 2.0.0-beta.1',
4998	  7: '>= 4.0.0'
4999	};
5000
5001	exports.REVISION_CHANGES = REVISION_CHANGES;
5002	var objectType = '[object Object]';
5003
5004	function HandlebarsEnvironment(helpers, partials, decorators) {
5005	  this.helpers = helpers || {};
5006	  this.partials = partials || {};
5007	  this.decorators = decorators || {};
5008
5009	  _helpers.registerDefaultHelpers(this);
5010	  _decorators.registerDefaultDecorators(this);
5011	}
5012
5013	HandlebarsEnvironment.prototype = {
5014	  constructor: HandlebarsEnvironment,
5015
5016	  logger: _logger2['default'],
5017	  log: _logger2['default'].log,
5018
5019	  registerHelper: function registerHelper(name, fn) {
5020	    if (_utils.toString.call(name) === objectType) {
5021	      if (fn) {
5022	        throw new _exception2['default']('Arg not supported with multiple helpers');
5023	      }
5024	      _utils.extend(this.helpers, name);
5025	    } else {
5026	      this.helpers[name] = fn;
5027	    }
5028	  },
5029	  unregisterHelper: function unregisterHelper(name) {
5030	    delete this.helpers[name];
5031	  },
5032
5033	  registerPartial: function registerPartial(name, partial) {
5034	    if (_utils.toString.call(name) === objectType) {
5035	      _utils.extend(this.partials, name);
5036	    } else {
5037	      if (typeof partial === 'undefined') {
5038	        throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined');
5039	      }
5040	      this.partials[name] = partial;
5041	    }
5042	  },
5043	  unregisterPartial: function unregisterPartial(name) {
5044	    delete this.partials[name];
5045	  },
5046
5047	  registerDecorator: function registerDecorator(name, fn) {
5048	    if (_utils.toString.call(name) === objectType) {
5049	      if (fn) {
5050	        throw new _exception2['default']('Arg not supported with multiple decorators');
5051	      }
5052	      _utils.extend(this.decorators, name);
5053	    } else {
5054	      this.decorators[name] = fn;
5055	    }
5056	  },
5057	  unregisterDecorator: function unregisterDecorator(name) {
5058	    delete this.decorators[name];
5059	  }
5060	};
5061
5062	var log = _logger2['default'].log;
5063
5064	exports.log = log;
5065	exports.createFrame = _utils.createFrame;
5066	exports.logger = _logger2['default'];
5067
5068/***/ }),
5069/* 5 */
vendor: 10,036 bytes, lines 5070-5454
5070/***/ (function(module, exports) {
5071
5072	'use strict';
5073
5074	exports.__esModule = true;
5075	exports.extend = extend;
5076	exports.indexOf = indexOf;
5077	exports.escapeExpression = escapeExpression;
5078	exports.isEmpty = isEmpty;
5079	exports.createFrame = createFrame;
5080	exports.blockParams = blockParams;
5081	exports.appendContextPath = appendContextPath;
5082	var escape = {
5083	  '&': '&amp;',
5084	  '<': '&lt;',
5085	  '>': '&gt;',
5086	  '"': '&quot;',
5087	  "'": '&#x27;',
5088	  '`': '&#x60;',
5089	  '=': '&#x3D;'
5090	};
5091
5092	var badChars = /[&<>"'`=]/g,
5093	    possible = /[&<>"'`=]/;
5094
5095	function escapeChar(chr) {
5096	  return escape[chr];
5097	}
5098
5099	function extend(obj /* , ...source */) {
5100	  for (var i = 1; i < arguments.length; i++) {
5101	    for (var key in arguments[i]) {
5102	      if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
5103	        obj[key] = arguments[i][key];
5104	      }
5105	    }
5106	  }
5107
5108	  return obj;
5109	}
5110
5111	var toString = Object.prototype.toString;
5112
5113	exports.toString = toString;
5114	// Sourced from lodash
5115	// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
5116	/* eslint-disable func-style */
5117	var isFunction = function isFunction(value) {
5118	  return typeof value === 'function';
5119	};
5120	// fallback for older versions of Chrome and Safari
5121	/* istanbul ignore next */
5122	if (isFunction(/x/)) {
5123	  exports.isFunction = isFunction = function (value) {
5124	    return typeof value === 'function' && toString.call(value) === '[object Function]';
5125	  };
5126	}
5127	exports.isFunction = isFunction;
5128
5129	/* eslint-enable func-style */
5130
5131	/* istanbul ignore next */
5132	var isArray = Array.isArray || function (value) {
5133	  return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;
5134	};
5135
5136	exports.isArray = isArray;
5137	// Older IE versions do not directly support indexOf so we must implement our own, sadly.
5138
5139	function indexOf(array, value) {
5140	  for (var i = 0, len = array.length; i < len; i++) {
5141	    if (array[i] === value) {
5142	      return i;
5143	    }
5144	  }
5145	  return -1;
5146	}
5147
5148	function escapeExpression(string) {
5149	  if (typeof string !== 'string') {
5150	    // don't escape SafeStrings, since they're already safe
5151	    if (string && string.toHTML) {
5152	      return string.toHTML();
5153	    } else if (string == null) {
5154	      return '';
5155	    } else if (!string) {
5156	      return string + '';
5157	    }
5158
5159	    // Force a string conversion as this will be done by the append regardless and
5160	    // the regex test will do this transparently behind the scenes, causing issues if
5161	    // an object's to string has escaped characters in it.
5162	    string = '' + string;
5163	  }
5164
5165	  if (!possible.test(string)) {
5166	    return string;
5167	  }
5168	  return string.replace(badChars, escapeChar);
5169	}
5170
5171	function isEmpty(value) {
5172	  if (!value && value !== 0) {
5173	    return true;
5174	  } else if (isArray(value) && value.length === 0) {
5175	    return true;
5176	  } else {
5177	    return false;
5178	  }
5179	}
5180
5181	function createFrame(object) {
5182	  var frame = extend({}, object);
5183	  frame._parent = object;
5184	  return frame;
5185	}
5186
5187	function blockParams(params, ids) {
5188	  params.path = ids;
5189	  return params;
5190	}
5191
5192	function appendContextPath(contextPath, id) {
5193	  return (contextPath ? contextPath + '.' : '') + id;
5194	}
5195
5196/***/ }),
5197/* 6 */
5198/***/ (function(module, exports, __webpack_require__) {
5199
5200	'use strict';
5201
5202	var _Object$defineProperty = __webpack_require__(7)['default'];
5203
5204	exports.__esModule = true;
5205
5206	var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
5207
5208	function Exception(message, node) {
5209	  var loc = node && node.loc,
5210	      line = undefined,
5211	      column = undefined;
5212	  if (loc) {
5213	    line = loc.start.line;
5214	    column = loc.start.column;
5215
5216	    message += ' - ' + line + ':' + column;
5217	  }
5218
5219	  var tmp = Error.prototype.constructor.call(this, message);
5220
5221	  // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
5222	  for (var idx = 0; idx < errorProps.length; idx++) {
5223	    this[errorProps[idx]] = tmp[errorProps[idx]];
5224	  }
5225
5226	  /* istanbul ignore else */
5227	  if (Error.captureStackTrace) {
5228	    Error.captureStackTrace(this, Exception);
5229	  }
5230
5231	  try {
5232	    if (loc) {
5233	      this.lineNumber = line;
5234
5235	      // Work around issue under safari where we can't directly set the column value
5236	      /* istanbul ignore next */
5237	      if (_Object$defineProperty) {
5238	        Object.defineProperty(this, 'column', {
5239	          value: column,
5240	          enumerable: true
5241	        });
5242	      } else {
5243	        this.column = column;
5244	      }
5245	    }
5246	  } catch (nop) {
5247	    /* Ignore if the browser is very particular */
5248	  }
5249	}
5250
5251	Exception.prototype = new Error();
5252
5253	exports['default'] = Exception;
5254	module.exports = exports['default'];
5255
5256/***/ }),
5257/* 7 */
5258/***/ (function(module, exports, __webpack_require__) {
5259
5260	module.exports = { "default": __webpack_require__(8), __esModule: true };
5261
5262/***/ }),
5263/* 8 */
5264/***/ (function(module, exports, __webpack_require__) {
5265
5266	var $ = __webpack_require__(9);
5267	module.exports = function defineProperty(it, key, desc){
5268	  return $.setDesc(it, key, desc);
5269	};
5270
5271/***/ }),
5272/* 9 */
5273/***/ (function(module, exports) {
5274
5275	var $Object = Object;
5276	module.exports = {
5277	  create:     $Object.create,
5278	  getProto:   $Object.getPrototypeOf,
5279	  isEnum:     {}.propertyIsEnumerable,
5280	  getDesc:    $Object.getOwnPropertyDescriptor,
5281	  setDesc:    $Object.defineProperty,
5282	  setDescs:   $Object.defineProperties,
5283	  getKeys:    $Object.keys,
5284	  getNames:   $Object.getOwnPropertyNames,
5285	  getSymbols: $Object.getOwnPropertySymbols,
5286	  each:       [].forEach
5287	};
5288
5289/***/ }),
5290/* 10 */
5291/***/ (function(module, exports, __webpack_require__) {
5292
5293	'use strict';
5294
5295	var _interopRequireDefault = __webpack_require__(1)['default'];
5296
5297	exports.__esModule = true;
5298	exports.registerDefaultHelpers = registerDefaultHelpers;
5299
5300	var _helpersBlockHelperMissing = __webpack_require__(11);
5301
5302	var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing);
5303
5304	var _helpersEach = __webpack_require__(12);
5305
5306	var _helpersEach2 = _interopRequireDefault(_helpersEach);
5307
5308	var _helpersHelperMissing = __webpack_require__(13);
5309
5310	var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing);
5311
5312	var _helpersIf = __webpack_require__(14);
5313
5314	var _helpersIf2 = _interopRequireDefault(_helpersIf);
5315
5316	var _helpersLog = __webpack_require__(15);
5317
5318	var _helpersLog2 = _interopRequireDefault(_helpersLog);
5319
5320	var _helpersLookup = __webpack_require__(16);
5321
5322	var _helpersLookup2 = _interopRequireDefault(_helpersLookup);
5323
5324	var _helpersWith = __webpack_require__(17);
5325
5326	var _helpersWith2 = _interopRequireDefault(_helpersWith);
5327
5328	function registerDefaultHelpers(instance) {
5329	  _helpersBlockHelperMissing2['default'](instance);
5330	  _helpersEach2['default'](instance);
5331	  _helpersHelperMissing2['default'](instance);
5332	  _helpersIf2['default'](instance);
5333	  _helpersLog2['default'](instance);
5334	  _helpersLookup2['default'](instance);
5335	  _helpersWith2['default'](instance);
5336	}
5337
5338/***/ }),
5339/* 11 */
5340/***/ (function(module, exports, __webpack_require__) {
5341
5342	'use strict';
5343
5344	exports.__esModule = true;
5345
5346	var _utils = __webpack_require__(5);
5347
5348	exports['default'] = function (instance) {
5349	  instance.registerHelper('blockHelperMissing', function (context, options) {
5350	    var inverse = options.inverse,
5351	        fn = options.fn;
5352
5353	    if (context === true) {
5354	      return fn(this);
5355	    } else if (context === false || context == null) {
5356	      return inverse(this);
5357	    } else if (_utils.isArray(context)) {
5358	      if (context.length > 0) {
5359	        if (options.ids) {
5360	          options.ids = [options.name];
5361	        }
5362
5363	        return instance.helpers.each(context, options);
5364	      } else {
5365	        return inverse(this);
5366	      }
5367	    } else {
5368	      if (options.data && options.ids) {
5369	        var data = _utils.createFrame(options.data);
5370	        data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name);
5371	        options = { data: data };
5372	      }
5373
5374	      return fn(context, options);
5375	    }
5376	  });
5377	};
5378
5379	module.exports = exports['default'];
5380
5381/***/ }),
5382/* 12 */
5383/***/ (function(module, exports, __webpack_require__) {
5384
5385	'use strict';
5386
5387	var _interopRequireDefault = __webpack_require__(1)['default'];
5388
5389	exports.__esModule = true;
5390
5391	var _utils = __webpack_require__(5);
5392
5393	var _exception = __webpack_require__(6);
5394
5395	var _exception2 = _interopRequireDefault(_exception);
5396
5397	exports['default'] = function (instance) {
5398	  instance.registerHelper('each', function (context, options) {
5399	    if (!options) {
5400	      throw new _exception2['default']('Must pass iterator to #each');
5401	    }
5402
5403	    var fn = options.fn,
5404	        inverse = options.inverse,
5405	        i = 0,
5406	        ret = '',
5407	        data = undefined,
5408	        contextPath = undefined;
5409
5410	    if (options.data && options.ids) {
5411	      contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';
5412	    }
5413
5414	    if (_utils.isFunction(context)) {
5415	      context = context.call(this);
5416	    }
5417
5418	    if (options.data) {
5419	      data = _utils.createFrame(options.data);
5420	    }
5421
5422	    function execIteration(field, index, last) {
5423	      if (data) {
5424	        data.key = field;
5425	        data.index = index;
5426	        data.first = index === 0;
5427	        data.last = !!last;
5428
5429	        if (contextPath) {
5430	          data.contextPath = contextPath + field;
5431	        }
5432	      }
5433
5434	      ret = ret + fn(context[field], {
5435	        data: data,
5436	        blockParams: _utils.blockParams([context[field], field], [contextPath + field, null])
5437	      });
5438	    }
5439
5440	    if (context && typeof context === 'object') {
5441	      if (_utils.isArray(context)) {
5442	        for (var j = context.length; i < j; i++) {
5443	          if (i in context) {
5444	            execIteration(i, i, i === context.length - 1);
5445	          }
5446	        }
5447	      } else {
5448	        var priorKey = undefined;
5449
5450	        for (var key in context) {
5451	          if (context.hasOwnProperty(key)) {
5452	            // We're running the iterations one step out of sync so we can detect
5453	            // the last iteration without have to scan the object twice and create
5454	            // an itermediate keys array.
vendor: 17,949 bytes, lines 5455-6064
5455	            if (priorKey !== undefined) {
5456	              execIteration(priorKey, i - 1);
5457	            }
5458	            priorKey = key;
5459	            i++;
5460	          }
5461	        }
5462	        if (priorKey !== undefined) {
5463	          execIteration(priorKey, i - 1, true);
5464	        }
5465	      }
5466	    }
5467
5468	    if (i === 0) {
5469	      ret = inverse(this);
5470	    }
5471
5472	    return ret;
5473	  });
5474	};
5475
5476	module.exports = exports['default'];
5477
5478/***/ }),
5479/* 13 */
5480/***/ (function(module, exports, __webpack_require__) {
5481
5482	'use strict';
5483
5484	var _interopRequireDefault = __webpack_require__(1)['default'];
5485
5486	exports.__esModule = true;
5487
5488	var _exception = __webpack_require__(6);
5489
5490	var _exception2 = _interopRequireDefault(_exception);
5491
5492	exports['default'] = function (instance) {
5493	  instance.registerHelper('helperMissing', function () /* [args, ]options */{
5494	    if (arguments.length === 1) {
5495	      // A missing field in a {{foo}} construct.
5496	      return undefined;
5497	    } else {
5498	      // Someone is actually trying to call something, blow up.
5499	      throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
5500	    }
5501	  });
5502	};
5503
5504	module.exports = exports['default'];
5505
5506/***/ }),
5507/* 14 */
5508/***/ (function(module, exports, __webpack_require__) {
5509
5510	'use strict';
5511
5512	exports.__esModule = true;
5513
5514	var _utils = __webpack_require__(5);
5515
5516	exports['default'] = function (instance) {
5517	  instance.registerHelper('if', function (conditional, options) {
5518	    if (_utils.isFunction(conditional)) {
5519	      conditional = conditional.call(this);
5520	    }
5521
5522	    // Default behavior is to render the positive path if the value is truthy and not empty.
5523	    // The `includeZero` option may be set to treat the condtional as purely not empty based on the
5524	    // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.
5525	    if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) {
5526	      return options.inverse(this);
5527	    } else {
5528	      return options.fn(this);
5529	    }
5530	  });
5531
5532	  instance.registerHelper('unless', function (conditional, options) {
5533	    return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash });
5534	  });
5535	};
5536
5537	module.exports = exports['default'];
5538
5539/***/ }),
5540/* 15 */
5541/***/ (function(module, exports) {
5542
5543	'use strict';
5544
5545	exports.__esModule = true;
5546
5547	exports['default'] = function (instance) {
5548	  instance.registerHelper('log', function () /* message, options */{
5549	    var args = [undefined],
5550	        options = arguments[arguments.length - 1];
5551	    for (var i = 0; i < arguments.length - 1; i++) {
5552	      args.push(arguments[i]);
5553	    }
5554
5555	    var level = 1;
5556	    if (options.hash.level != null) {
5557	      level = options.hash.level;
5558	    } else if (options.data && options.data.level != null) {
5559	      level = options.data.level;
5560	    }
5561	    args[0] = level;
5562
5563	    instance.log.apply(instance, args);
5564	  });
5565	};
5566
5567	module.exports = exports['default'];
5568
5569/***/ }),
5570/* 16 */
5571/***/ (function(module, exports) {
5572
5573	'use strict';
5574
5575	exports.__esModule = true;
5576
5577	exports['default'] = function (instance) {
5578	  instance.registerHelper('lookup', function (obj, field) {
5579	    return obj && obj[field];
5580	  });
5581	};
5582
5583	module.exports = exports['default'];
5584
5585/***/ }),
5586/* 17 */
5587/***/ (function(module, exports, __webpack_require__) {
5588
5589	'use strict';
5590
5591	exports.__esModule = true;
5592
5593	var _utils = __webpack_require__(5);
5594
5595	exports['default'] = function (instance) {
5596	  instance.registerHelper('with', function (context, options) {
5597	    if (_utils.isFunction(context)) {
5598	      context = context.call(this);
5599	    }
5600
5601	    var fn = options.fn;
5602
5603	    if (!_utils.isEmpty(context)) {
5604	      var data = options.data;
5605	      if (options.data && options.ids) {
5606	        data = _utils.createFrame(options.data);
5607	        data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]);
5608	      }
5609
5610	      return fn(context, {
5611	        data: data,
5612	        blockParams: _utils.blockParams([context], [data && data.contextPath])
5613	      });
5614	    } else {
5615	      return options.inverse(this);
5616	    }
5617	  });
5618	};
5619
5620	module.exports = exports['default'];
5621
5622/***/ }),
5623/* 18 */
5624/***/ (function(module, exports, __webpack_require__) {
5625
5626	'use strict';
5627
5628	var _interopRequireDefault = __webpack_require__(1)['default'];
5629
5630	exports.__esModule = true;
5631	exports.registerDefaultDecorators = registerDefaultDecorators;
5632
5633	var _decoratorsInline = __webpack_require__(19);
5634
5635	var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline);
5636
5637	function registerDefaultDecorators(instance) {
5638	  _decoratorsInline2['default'](instance);
5639	}
5640
5641/***/ }),
5642/* 19 */
5643/***/ (function(module, exports, __webpack_require__) {
5644
5645	'use strict';
5646
5647	exports.__esModule = true;
5648
5649	var _utils = __webpack_require__(5);
5650
5651	exports['default'] = function (instance) {
5652	  instance.registerDecorator('inline', function (fn, props, container, options) {
5653	    var ret = fn;
5654	    if (!props.partials) {
5655	      props.partials = {};
5656	      ret = function (context, options) {
5657	        // Create a new partials stack frame prior to exec.
5658	        var original = container.partials;
5659	        container.partials = _utils.extend({}, original, props.partials);
5660	        var ret = fn(context, options);
5661	        container.partials = original;
5662	        return ret;
5663	      };
5664	    }
5665
5666	    props.partials[options.args[0]] = options.fn;
5667
5668	    return ret;
5669	  });
5670	};
5671
5672	module.exports = exports['default'];
5673
5674/***/ }),
5675/* 20 */
5676/***/ (function(module, exports, __webpack_require__) {
5677
5678	'use strict';
5679
5680	exports.__esModule = true;
5681
5682	var _utils = __webpack_require__(5);
5683
5684	var logger = {
5685	  methodMap: ['debug', 'info', 'warn', 'error'],
5686	  level: 'info',
5687
5688	  // Maps a given level value to the `methodMap` indexes above.
5689	  lookupLevel: function lookupLevel(level) {
5690	    if (typeof level === 'string') {
5691	      var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());
5692	      if (levelMap >= 0) {
5693	        level = levelMap;
5694	      } else {
5695	        level = parseInt(level, 10);
5696	      }
5697	    }
5698
5699	    return level;
5700	  },
5701
5702	  // Can be overridden in the host environment
5703	  log: function log(level) {
5704	    level = logger.lookupLevel(level);
5705
5706	    if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) {
5707	      var method = logger.methodMap[level];
5708	      if (!console[method]) {
5709	        // eslint-disable-line no-console
5710	        method = 'log';
5711	      }
5712
5713	      for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
5714	        message[_key - 1] = arguments[_key];
5715	      }
5716
5717	      console[method].apply(console, message); // eslint-disable-line no-console
5718	    }
5719	  }
5720	};
5721
5722	exports['default'] = logger;
5723	module.exports = exports['default'];
5724
5725/***/ }),
5726/* 21 */
5727/***/ (function(module, exports) {
5728
5729	// Build out our basic SafeString type
5730	'use strict';
5731
5732	exports.__esModule = true;
5733	function SafeString(string) {
5734	  this.string = string;
5735	}
5736
5737	SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
5738	  return '' + this.string;
5739	};
5740
5741	exports['default'] = SafeString;
5742	module.exports = exports['default'];
5743
5744/***/ }),
5745/* 22 */
5746/***/ (function(module, exports, __webpack_require__) {
5747
5748	'use strict';
5749
5750	var _Object$seal = __webpack_require__(23)['default'];
5751
5752	var _interopRequireWildcard = __webpack_require__(3)['default'];
5753
5754	var _interopRequireDefault = __webpack_require__(1)['default'];
5755
5756	exports.__esModule = true;
5757	exports.checkRevision = checkRevision;
5758	exports.template = template;
5759	exports.wrapProgram = wrapProgram;
5760	exports.resolvePartial = resolvePartial;
5761	exports.invokePartial = invokePartial;
5762	exports.noop = noop;
5763
5764	var _utils = __webpack_require__(5);
5765
5766	var Utils = _interopRequireWildcard(_utils);
5767
5768	var _exception = __webpack_require__(6);
5769
5770	var _exception2 = _interopRequireDefault(_exception);
5771
5772	var _base = __webpack_require__(4);
5773
5774	function checkRevision(compilerInfo) {
5775	  var compilerRevision = compilerInfo && compilerInfo[0] || 1,
5776	      currentRevision = _base.COMPILER_REVISION;
5777
5778	  if (compilerRevision !== currentRevision) {
5779	    if (compilerRevision < currentRevision) {
5780	      var runtimeVersions = _base.REVISION_CHANGES[currentRevision],
5781	          compilerVersions = _base.REVISION_CHANGES[compilerRevision];
5782	      throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').');
5783	    } else {
5784	      // Use the embedded version info since the runtime doesn't know about this revision yet
5785	      throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').');
5786	    }
5787	  }
5788	}
5789
5790	function template(templateSpec, env) {
5791	  /* istanbul ignore next */
5792	  if (!env) {
5793	    throw new _exception2['default']('No environment passed to template');
5794	  }
5795	  if (!templateSpec || !templateSpec.main) {
5796	    throw new _exception2['default']('Unknown template object: ' + typeof templateSpec);
5797	  }
5798
5799	  templateSpec.main.decorator = templateSpec.main_d;
5800
5801	  // Note: Using env.VM references rather than local var references throughout this section to allow
5802	  // for external users to override these as psuedo-supported APIs.
5803	  env.VM.checkRevision(templateSpec.compiler);
5804
5805	  function invokePartialWrapper(partial, context, options) {
5806	    if (options.hash) {
5807	      context = Utils.extend({}, context, options.hash);
5808	      if (options.ids) {
5809	        options.ids[0] = true;
5810	      }
5811	    }
5812
5813	    partial = env.VM.resolvePartial.call(this, partial, context, options);
5814	    var result = env.VM.invokePartial.call(this, partial, context, options);
5815
5816	    if (result == null && env.compile) {
5817	      options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
5818	      result = options.partials[options.name](context, options);
5819	    }
5820	    if (result != null) {
5821	      if (options.indent) {
5822	        var lines = result.split('\n');
5823	        for (var i = 0, l = lines.length; i < l; i++) {
5824	          if (!lines[i] && i + 1 === l) {
5825	            break;
5826	          }
5827
5828	          lines[i] = options.indent + lines[i];
5829	        }
5830	        result = lines.join('\n');
5831	      }
5832	      return result;
5833	    } else {
5834	      throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
5835	    }
5836	  }
5837
5838	  // Just add water
5839	  var container = {
5840	    strict: function strict(obj, name) {
5841	      if (!(name in obj)) {
5842	        throw new _exception2['default']('"' + name + '" not defined in ' + obj);
5843	      }
5844	      return obj[name];
5845	    },
5846	    lookup: function lookup(depths, name) {
5847	      var len = depths.length;
5848	      for (var i = 0; i < len; i++) {
5849	        if (depths[i] && depths[i][name] != null) {
5850	          return depths[i][name];
5851	        }
5852	      }
5853	    },
5854	    lambda: function lambda(current, context) {
5855	      return typeof current === 'function' ? current.call(context) : current;
5856	    },
5857
5858	    escapeExpression: Utils.escapeExpression,
5859	    invokePartial: invokePartialWrapper,
5860
5861	    fn: function fn(i) {
5862	      var ret = templateSpec[i];
5863	      ret.decorator = templateSpec[i + '_d'];
5864	      return ret;
5865	    },
5866
5867	    programs: [],
5868	    program: function program(i, data, declaredBlockParams, blockParams, depths) {
5869	      var programWrapper = this.programs[i],
5870	          fn = this.fn(i);
5871	      if (data || depths || blockParams || declaredBlockParams) {
5872	        programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
5873	      } else if (!programWrapper) {
5874	        programWrapper = this.programs[i] = wrapProgram(this, i, fn);
5875	      }
5876	      return programWrapper;
5877	    },
5878
5879	    data: function data(value, depth) {
5880	      while (value && depth--) {
5881	        value = value._parent;
5882	      }
5883	      return value;
5884	    },
5885	    merge: function merge(param, common) {
5886	      var obj = param || common;
5887
5888	      if (param && common && param !== common) {
5889	        obj = Utils.extend({}, common, param);
5890	      }
5891
5892	      return obj;
5893	    },
5894	    // An empty object to use as replacement for null-contexts
5895	    nullContext: _Object$seal({}),
5896
5897	    noop: env.VM.noop,
5898	    compilerInfo: templateSpec.compiler
5899	  };
5900
5901	  function ret(context) {
5902	    var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
5903
5904	    var data = options.data;
5905
5906	    ret._setup(options);
5907	    if (!options.partial && templateSpec.useData) {
5908	      data = initData(context, data);
5909	    }
5910	    var depths = undefined,
5911	        blockParams = templateSpec.useBlockParams ? [] : undefined;
5912	    if (templateSpec.useDepths) {
5913	      if (options.depths) {
5914	        depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths;
5915	      } else {
5916	        depths = [context];
5917	      }
5918	    }
5919
5920	    function main(context /*, options*/) {
5921	      return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);
5922	    }
5923	    main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);
5924	    return main(context, options);
5925	  }
5926	  ret.isTop = true;
5927
5928	  ret._setup = function (options) {
5929	    if (!options.partial) {
5930	      container.helpers = container.merge(options.helpers, env.helpers);
5931
5932	      if (templateSpec.usePartial) {
5933	        container.partials = container.merge(options.partials, env.partials);
5934	      }
5935	      if (templateSpec.usePartial || templateSpec.useDecorators) {
5936	        container.decorators = container.merge(options.decorators, env.decorators);
5937	      }
5938	    } else {
5939	      container.helpers = options.helpers;
5940	      container.partials = options.partials;
5941	      container.decorators = options.decorators;
5942	    }
5943	  };
5944
5945	  ret._child = function (i, data, blockParams, depths) {
5946	    if (templateSpec.useBlockParams && !blockParams) {
5947	      throw new _exception2['default']('must pass block params');
5948	    }
5949	    if (templateSpec.useDepths && !depths) {
5950	      throw new _exception2['default']('must pass parent depths');
5951	    }
5952
5953	    return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
5954	  };
5955	  return ret;
5956	}
5957
5958	function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
5959	  function prog(context) {
5960	    var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
5961
5962	    var currentDepths = depths;
5963	    if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) {
5964	      currentDepths = [context].concat(depths);
5965	    }
5966
5967	    return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);
5968	  }
5969
5970	  prog = executeDecorators(fn, prog, container, depths, data, blockParams);
5971
5972	  prog.program = i;
5973	  prog.depth = depths ? depths.length : 0;
5974	  prog.blockParams = declaredBlockParams || 0;
5975	  return prog;
5976	}
5977
5978	function resolvePartial(partial, context, options) {
5979	  if (!partial) {
5980	    if (options.name === '@partial-block') {
5981	      partial = options.data['partial-block'];
5982	    } else {
5983	      partial = options.partials[options.name];
5984	    }
5985	  } else if (!partial.call && !options.name) {
5986	    // This is a dynamic partial that returned a string
5987	    options.name = partial;
5988	    partial = options.partials[partial];
5989	  }
5990	  return partial;
5991	}
5992
5993	function invokePartial(partial, context, options) {
5994	  // Use the current closure context to save the partial-block if this partial
5995	  var currentPartialBlock = options.data && options.data['partial-block'];
5996	  options.partial = true;
5997	  if (options.ids) {
5998	    options.data.contextPath = options.ids[0] || options.data.contextPath;
5999	  }
6000
6001	  var partialBlock = undefined;
6002	  if (options.fn && options.fn !== noop) {
6003	    (function () {
6004	      options.data = _base.createFrame(options.data);
6005	      // Wrapper function to get access to currentPartialBlock from the closure
6006	      var fn = options.fn;
6007	      partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) {
6008	        var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
6009
6010	        // Restore the partial-block from the closure for the execution of the block
6011	        // i.e. the part inside the block of the partial call.
6012	        options.data = _base.createFrame(options.data);
6013	        options.data['partial-block'] = currentPartialBlock;
6014	        return fn(context, options);
6015	      };
6016	      if (fn.partials) {
6017	        options.partials = Utils.extend({}, options.partials, fn.partials);
6018	      }
6019	    })();
6020	  }
6021
6022	  if (partial === undefined && partialBlock) {
6023	    partial = partialBlock;
6024	  }
6025
6026	  if (partial === undefined) {
6027	    throw new _exception2['default']('The partial ' + options.name + ' could not be found');
6028	  } else if (partial instanceof Function) {
6029	    return partial(context, options);
6030	  }
6031	}
6032
6033	function noop() {
6034	  return '';
6035	}
6036
6037	function initData(context, data) {
6038	  if (!data || !('root' in data)) {
6039	    data = data ? _base.createFrame(data) : {};
6040	    data.root = context;
6041	  }
6042	  return data;
6043	}
6044
6045	function executeDecorators(fn, prog, container, depths, data, blockParams) {
6046	  if (fn.decorator) {
6047	    var props = {};
6048	    prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths);
6049	    Utils.extend(prog, props);
6050	  }
6051	  return prog;
6052	}
6053
6054/***/ }),
6055/* 23 */
6056/***/ (function(module, exports, __webpack_require__) {
6057
6058	module.exports = { "default": __webpack_require__(24), __esModule: true };
6059
6060/***/ }),
6061/* 24 */
6062/***/ (function(module, exports, __webpack_require__) {
6063
6064	__webpack_require__(25);
vendor: 4,201 bytes, lines 6065-6205
6065	module.exports = __webpack_require__(30).Object.seal;
6066
6067/***/ }),
6068/* 25 */
6069/***/ (function(module, exports, __webpack_require__) {
6070
6071	// 19.1.2.17 Object.seal(O)
6072	var isObject = __webpack_require__(26);
6073
6074	__webpack_require__(27)('seal', function($seal){
6075	  return function seal(it){
6076	    return $seal && isObject(it) ? $seal(it) : it;
6077	  };
6078	});
6079
6080/***/ }),
6081/* 26 */
6082/***/ (function(module, exports) {
6083
6084	module.exports = function(it){
6085	  return typeof it === 'object' ? it !== null : typeof it === 'function';
6086	};
6087
6088/***/ }),
6089/* 27 */
6090/***/ (function(module, exports, __webpack_require__) {
6091
6092	// most Object methods by ES6 should accept primitives
6093	var $export = __webpack_require__(28)
6094	  , core    = __webpack_require__(30)
6095	  , fails   = __webpack_require__(33);
6096	module.exports = function(KEY, exec){
6097	  var fn  = (core.Object || {})[KEY] || Object[KEY]
6098	    , exp = {};
6099	  exp[KEY] = exec(fn);
6100	  $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
6101	};
6102
6103/***/ }),
6104/* 28 */
6105/***/ (function(module, exports, __webpack_require__) {
6106
6107	var global    = __webpack_require__(29)
6108	  , core      = __webpack_require__(30)
6109	  , ctx       = __webpack_require__(31)
6110	  , PROTOTYPE = 'prototype';
6111
6112	var $export = function(type, name, source){
6113	  var IS_FORCED = type & $export.F
6114	    , IS_GLOBAL = type & $export.G
6115	    , IS_STATIC = type & $export.S
6116	    , IS_PROTO  = type & $export.P
6117	    , IS_BIND   = type & $export.B
6118	    , IS_WRAP   = type & $export.W
6119	    , exports   = IS_GLOBAL ? core : core[name] || (core[name] = {})
6120	    , target    = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
6121	    , key, own, out;
6122	  if(IS_GLOBAL)source = name;
6123	  for(key in source){
6124	    // contains in native
6125	    own = !IS_FORCED && target && key in target;
6126	    if(own && key in exports)continue;
6127	    // export native or passed
6128	    out = own ? target[key] : source[key];
6129	    // prevent global pollution for namespaces
6130	    exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
6131	    // bind timers to global for call from export context
6132	    : IS_BIND && own ? ctx(out, global)
6133	    // wrap global constructors for prevent change them in library
6134	    : IS_WRAP && target[key] == out ? (function(C){
6135	      var F = function(param){
6136	        return this instanceof C ? new C(param) : C(param);
6137	      };
6138	      F[PROTOTYPE] = C[PROTOTYPE];
6139	      return F;
6140	    // make static versions for prototype methods
6141	    })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
6142	    if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;
6143	  }
6144	};
6145	// type bitmap
6146	$export.F = 1;  // forced
6147	$export.G = 2;  // global
6148	$export.S = 4;  // static
6149	$export.P = 8;  // proto
6150	$export.B = 16; // bind
6151	$export.W = 32; // wrap
6152	module.exports = $export;
6153
6154/***/ }),
6155/* 29 */
6156/***/ (function(module, exports) {
6157
6158	// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
6159	var global = module.exports = typeof window != 'undefined' && window.Math == Math
6160	  ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
6161	if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
6162
6163/***/ }),
6164/* 30 */
6165/***/ (function(module, exports) {
6166
6167	var core = module.exports = {version: '1.2.6'};
6168	if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
6169
6170/***/ }),
6171/* 31 */
6172/***/ (function(module, exports, __webpack_require__) {
6173
6174	// optional / simple context binding
6175	var aFunction = __webpack_require__(32);
6176	module.exports = function(fn, that, length){
6177	  aFunction(fn);
6178	  if(that === undefined)return fn;
6179	  switch(length){
6180	    case 1: return function(a){
6181	      return fn.call(that, a);
6182	    };
6183	    case 2: return function(a, b){
6184	      return fn.call(that, a, b);
6185	    };
6186	    case 3: return function(a, b, c){
6187	      return fn.call(that, a, b, c);
6188	    };
6189	  }
6190	  return function(/* ...args */){
6191	    return fn.apply(that, arguments);
6192	  };
6193	};
6194
6195/***/ }),
6196/* 32 */
6197/***/ (function(module, exports) {
6198
6199	module.exports = function(it){
6200	  if(typeof it != 'function')throw TypeError(it + ' is not a function!');
6201	  return it;
6202	};
6203
6204/***/ }),
6205/* 33 */
vendor: 5,346 bytes, lines 6206-6338
6206/***/ (function(module, exports) {
6207
6208	module.exports = function(exec){
6209	  try {
6210	    return !!exec();
6211	  } catch(e){
6212	    return true;
6213	  }
6214	};
6215
6216/***/ }),
6217/* 34 */
6218/***/ (function(module, exports) {
6219
6220	/* WEBPACK VAR INJECTION */(function(global) {/* global window */
6221	'use strict';
6222
6223	exports.__esModule = true;
6224
6225	exports['default'] = function (Handlebars) {
6226	  /* istanbul ignore next */
6227	  var root = typeof global !== 'undefined' ? global : window,
6228	      $Handlebars = root.Handlebars;
6229	  /* istanbul ignore next */
6230	  Handlebars.noConflict = function () {
6231	    if (root.Handlebars === Handlebars) {
6232	      root.Handlebars = $Handlebars;
6233	    }
6234	    return Handlebars;
6235	  };
6236	};
6237
6238	module.exports = exports['default'];
6239	/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
6240
6241/***/ }),
6242/* 35 */
6243/***/ (function(module, exports) {
6244
6245	'use strict';
6246
6247	exports.__esModule = true;
6248	var AST = {
6249	  // Public API used to evaluate derived attributes regarding AST nodes
6250	  helpers: {
6251	    // a mustache is definitely a helper if:
6252	    // * it is an eligible helper, and
6253	    // * it has at least one parameter or hash segment
6254	    helperExpression: function helperExpression(node) {
6255	      return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash);
6256	    },
6257
6258	    scopedId: function scopedId(path) {
6259	      return (/^\.|this\b/.test(path.original)
6260	      );
6261	    },
6262
6263	    // an ID is simple if it only has one part, and that part is not
6264	    // `..` or `this`.
6265	    simpleId: function simpleId(path) {
6266	      return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth;
6267	    }
6268	  }
6269	};
6270
6271	// Must be exported as an object rather than the root of the module as the jison lexer
6272	// must modify the object to operate properly.
6273	exports['default'] = AST;
6274	module.exports = exports['default'];
6275
6276/***/ }),
6277/* 36 */
6278/***/ (function(module, exports, __webpack_require__) {
6279
6280	'use strict';
6281
6282	var _interopRequireDefault = __webpack_require__(1)['default'];
6283
6284	var _interopRequireWildcard = __webpack_require__(3)['default'];
6285
6286	exports.__esModule = true;
6287	exports.parse = parse;
6288
6289	var _parser = __webpack_require__(37);
6290
6291	var _parser2 = _interopRequireDefault(_parser);
6292
6293	var _whitespaceControl = __webpack_require__(38);
6294
6295	var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl);
6296
6297	var _helpers = __webpack_require__(40);
6298
6299	var Helpers = _interopRequireWildcard(_helpers);
6300
6301	var _utils = __webpack_require__(5);
6302
6303	exports.parser = _parser2['default'];
6304
6305	var yy = {};
6306	_utils.extend(yy, Helpers);
6307
6308	function parse(input, options) {
6309	  // Just return if an already-compiled AST was passed in.
6310	  if (input.type === 'Program') {
6311	    return input;
6312	  }
6313
6314	  _parser2['default'].yy = yy;
6315
6316	  // Altering the shared object here, but this is ok as parser is a sync operation
6317	  yy.locInfo = function (locInfo) {
6318	    return new yy.SourceLocation(options && options.srcName, locInfo);
6319	  };
6320
6321	  var strip = new _whitespaceControl2['default'](options);
6322	  return strip.accept(_parser2['default'].parse(input));
6323	}
6324
6325/***/ }),
6326/* 37 */
6327/***/ (function(module, exports) {
6328
6329	// File ignored in coverage tests via setting in .istanbul.yml
6330	/* Jison generated parser */
6331	"use strict";
6332
6333	exports.__esModule = true;
6334	var handlebars = (function () {
6335	    var parser = { trace: function trace() {},
6336	        yy: {},
6337	        symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition_plus0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 },
6338	        terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 
vendor: 26,539 bytes, lines 6338-6594
633818: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" },
6339	        productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 1], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]],
6340	        performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$
6341	        /**/) {
6342
6343	            var $0 = $$.length - 1;
6344	            switch (yystate) {
6345	                case 1:
6346	                    return $$[$0 - 1];
6347	                    break;
6348	                case 2:
6349	                    this.$ = yy.prepareProgram($$[$0]);
6350	                    break;
6351	                case 3:
6352	                    this.$ = $$[$0];
6353	                    break;
6354	                case 4:
6355	                    this.$ = $$[$0];
6356	                    break;
6357	                case 5:
6358	                    this.$ = $$[$0];
6359	                    break;
6360	                case 6:
6361	                    this.$ = $$[$0];
6362	                    break;
6363	                case 7:
6364	                    this.$ = $$[$0];
6365	                    break;
6366	                case 8:
6367	                    this.$ = $$[$0];
6368	                    break;
6369	                case 9:
6370	                    this.$ = {
6371	                        type: 'CommentStatement',
6372	                        value: yy.stripComment($$[$0]),
6373	                        strip: yy.stripFlags($$[$0], $$[$0]),
6374	                        loc: yy.locInfo(this._$)
6375	                    };
6376
6377	                    break;
6378	                case 10:
6379	                    this.$ = {
6380	                        type: 'ContentStatement',
6381	                        original: $$[$0],
6382	                        value: $$[$0],
6383	                        loc: yy.locInfo(this._$)
6384	                    };
6385
6386	                    break;
6387	                case 11:
6388	                    this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
6389	                    break;
6390	                case 12:
6391	                    this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] };
6392	                    break;
6393	                case 13:
6394	                    this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$);
6395	                    break;
6396	                case 14:
6397	                    this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$);
6398	                    break;
6399	                case 15:
6400	                    this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
6401	                    break;
6402	                case 16:
6403	                    this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
6404	                    break;
6405	                case 17:
6406	                    this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
6407	                    break;
6408	                case 18:
6409	                    this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] };
6410	                    break;
6411	                case 19:
6412	                    var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$),
6413	                        program = yy.prepareProgram([inverse], $$[$0 - 1].loc);
6414	                    program.chained = true;
6415
6416	                    this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true };
6417
6418	                    break;
6419	                case 20:
6420	                    this.$ = $$[$0];
6421	                    break;
6422	                case 21:
6423	                    this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) };
6424	                    break;
6425	                case 22:
6426	                    this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
6427	                    break;
6428	                case 23:
6429	                    this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
6430	                    break;
6431	                case 24:
6432	                    this.$ = {
6433	                        type: 'PartialStatement',
6434	                        name: $$[$0 - 3],
6435	                        params: $$[$0 - 2],
6436	                        hash: $$[$0 - 1],
6437	                        indent: '',
6438	                        strip: yy.stripFlags($$[$0 - 4], $$[$0]),
6439	                        loc: yy.locInfo(this._$)
6440	                    };
6441
6442	                    break;
6443	                case 25:
6444	                    this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
6445	                    break;
6446	                case 26:
6447	                    this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) };
6448	                    break;
6449	                case 27:
6450	                    this.$ = $$[$0];
6451	                    break;
6452	                case 28:
6453	                    this.$ = $$[$0];
6454	                    break;
6455	                case 29:
6456	                    this.$ = {
6457	                        type: 'SubExpression',
6458	                        path: $$[$0 - 3],
6459	                        params: $$[$0 - 2],
6460	                        hash: $$[$0 - 1],
6461	                        loc: yy.locInfo(this._$)
6462	                    };
6463
6464	                    break;
6465	                case 30:
6466	                    this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) };
6467	                    break;
6468	                case 31:
6469	                    this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) };
6470	                    break;
6471	                case 32:
6472	                    this.$ = yy.id($$[$0 - 1]);
6473	                    break;
6474	                case 33:
6475	                    this.$ = $$[$0];
6476	                    break;
6477	                case 34:
6478	                    this.$ = $$[$0];
6479	                    break;
6480	                case 35:
6481	                    this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) };
6482	                    break;
6483	                case 36:
6484	                    this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) };
6485	                    break;
6486	                case 37:
6487	                    this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) };
6488	                    break;
6489	                case 38:
6490	                    this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) };
6491	                    break;
6492	                case 39:
6493	                    this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) };
6494	                    break;
6495	                case 40:
6496	                    this.$ = $$[$0];
6497	                    break;
6498	                case 41:
6499	                    this.$ = $$[$0];
6500	                    break;
6501	                case 42:
6502	                    this.$ = yy.preparePath(true, $$[$0], this._$);
6503	                    break;
6504	                case 43:
6505	                    this.$ = yy.preparePath(false, $$[$0], this._$);
6506	                    break;
6507	                case 44:
6508	                    $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2];
6509	                    break;
6510	                case 45:
6511	                    this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }];
6512	                    break;
6513	                case 46:
6514	                    this.$ = [];
6515	                    break;
6516	                case 47:
6517	                    $$[$0 - 1].push($$[$0]);
6518	                    break;
6519	                case 48:
6520	                    this.$ = [$$[$0]];
6521	                    break;
6522	                case 49:
6523	                    $$[$0 - 1].push($$[$0]);
6524	                    break;
6525	                case 50:
6526	                    this.$ = [];
6527	                    break;
6528	                case 51:
6529	                    $$[$0 - 1].push($$[$0]);
6530	                    break;
6531	                case 58:
6532	                    this.$ = [];
6533	                    break;
6534	                case 59:
6535	                    $$[$0 - 1].push($$[$0]);
6536	                    break;
6537	                case 64:
6538	                    this.$ = [];
6539	                    break;
6540	                case 65:
6541	                    $$[$0 - 1].push($$[$0]);
6542	                    break;
6543	                case 70:
6544	                    this.$ = [];
6545	                    break;
6546	                case 71:
6547	                    $$[$0 - 1].push($$[$0]);
6548	                    break;
6549	                case 78:
6550	                    this.$ = [];
6551	                    break;
6552	                case 79:
6553	                    $$[$0 - 1].push($$[$0]);
6554	                    break;
6555	                case 82:
6556	                    this.$ = [];
6557	                    break;
6558	                case 83:
6559	                    $$[$0 - 1].push($$[$0]);
6560	                    break;
6561	                case 86:
6562	                    this.$ = [];
6563	                    break;
6564	                case 87:
6565	                    $$[$0 - 1].push($$[$0]);
6566	                    break;
6567	                case 90:
6568	                    this.$ = [];
6569	                    break;
6570	                case 91:
6571	                    $$[$0 - 1].push($$[$0]);
6572	                    break;
6573	                case 94:
6574	                    this.$ = [];
6575	                    break;
6576	                case 95:
6577	                    $$[$0 - 1].push($$[$0]);
6578	                    break;
6579	                case 98:
6580	                    this.$ = [$$[$0]];
6581	                    break;
6582	                case 99:
6583	                    $$[$0 - 1].push($$[$0]);
6584	                    break;
6585	                case 100:
6586	                    this.$ = [$$[$0]];
6587	                    break;
6588	                case 101:
6589	                    $$[$0 - 1].push($$[$0]);
6590	                    break;
6591	            }
6592	        },
6593	        table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 13: 40, 15: [1, 20], 17: 39 }, { 20: 42, 56: 41, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 45, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 48, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 42, 56: 49, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 50, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 51] }, { 72: [1, 35], 86: 52 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 53, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 54, 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 55, 47: [2, 54] }, { 28: 60, 43: 61, 44: [1, 59], 47: [2, 56] }, { 13: 63, 15: [1, 20], 18: [1, 62] }, { 15: [2, 48], 18: [2, 48] }, { 33: [2, 86], 57: 64, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 65, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 66, 47: [1, 67] }, { 30: 68, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 69, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 70, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 71, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 75, 33: [2, 80], 50: 72, 63: 73, 64: 76, 65: [1, 44], 69: 74, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 80] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 51] }, { 20: 75, 53: 81, 54: [2, 84], 63: 82, 64: 76, 65: [1, 44], 69: 83, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 84, 47: [1, 67] }, { 47: [2, 55] }, { 4: 85, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 86, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 87, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 88, 47: [1, 67] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 75, 33: [2, 88], 58: 89, 63: 90, 64: 76, 65: [1, 44], 69: 91, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 92, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 93, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 31: 94, 33: [2, 60], 63: 95, 64: 76, 65: [1, 44], 69: 96, 70: 77, 71: 78, 72: [1, 79], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 66], 36: 97, 63: 98, 64: 76, 65: [1, 44], 69: 99, 70: 77, 71: 78, 72: [1, 79], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 22: 100, 23: [2, 52], 63: 101, 64: 76, 65: [1, 44], 69: 102, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 92], 62: 103, 63: 104, 64: 76, 65: [1, 44], 69: 105, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 106] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 107, 72: [1, 108], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 109], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 110] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 112, 46: 111, 47: [2, 76] }, { 33: [2, 70], 40: 113, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 114] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 75, 63: 116, 64: 76, 65: [1, 44], 67: 115, 68: [2, 96], 69: 117, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 118] }, { 32: 119, 33: [2, 62], 74: 120, 75: [1, 121] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 122, 74: 123, 75: [1, 121] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 124] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 125] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 109] }, { 20: 75, 63: 126, 64: 76, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 75, 33: [2, 72], 41: 127, 63: 128, 64: 76, 65: [1, 44], 69: 129, 70: 77, 71: 78, 72: [1, 79], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 130] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 131] }, { 33: [2, 63] }, { 72: [1, 133], 76: 132 }, { 33: [1, 134] }, { 33: [2, 69] }, { 15: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 135, 74: 136, 75: [1, 121] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 138], 77: [1, 137] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 139] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }],
6594	        defaultActions: { 4: [2, 1], 55: [2, 55], 57: [2, 20], 61: [2, 57], 74: [2, 81], 83: [2, 85], 87: [2, 18], 91: [2, 89], 102: [2, 53], 105: [2, 93], 111: [2, 19], 112: [2, 77], 117: [2, 97
6594], 120: [2, 63], 123: [2, 69], 124: [2, 12], 136: [2, 75], 137
vendor: 13,423 bytes, lines 6594-6878
6594: [2, 32] },
6595	        parseError: function parseError(str, hash) {
6596	            throw new Error(str);
6597	        },
6598	        parse: function parse(input) {
6599	            var self = this,
6600	                stack = [0],
6601	                vstack = [null],
6602	                lstack = [],
6603	                table = this.table,
6604	                yytext = "",
6605	                yylineno = 0,
6606	                yyleng = 0,
6607	                recovering = 0,
6608	                TERROR = 2,
6609	                EOF = 1;
6610	            this.lexer.setInput(input);
6611	            this.lexer.yy = this.yy;
6612	            this.yy.lexer = this.lexer;
6613	            this.yy.parser = this;
6614	            if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {};
6615	            var yyloc = this.lexer.yylloc;
6616	            lstack.push(yyloc);
6617	            var ranges = this.lexer.options && this.lexer.options.ranges;
6618	            if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError;
6619	            function popStack(n) {
6620	                stack.length = stack.length - 2 * n;
6621	                vstack.length = vstack.length - n;
6622	                lstack.length = lstack.length - n;
6623	            }
6624	            function lex() {
6625	                var token;
6626	                token = self.lexer.lex() || 1;
6627	                if (typeof token !== "number") {
6628	                    token = self.symbols_[token] || token;
6629	                }
6630	                return token;
6631	            }
6632	            var symbol,
6633	                preErrorSymbol,
6634	                state,
6635	                action,
6636	                a,
6637	                r,
6638	                yyval = {},
6639	                p,
6640	                len,
6641	                newState,
6642	                expected;
6643	            while (true) {
6644	                state = stack[stack.length - 1];
6645	                if (this.defaultActions[state]) {
6646	                    action = this.defaultActions[state];
6647	                } else {
6648	                    if (symbol === null || typeof symbol == "undefined") {
6649	                        symbol = lex();
6650	                    }
6651	                    action = table[state] && table[state][symbol];
6652	                }
6653	                if (typeof action === "undefined" || !action.length || !action[0]) {
6654	                    var errStr = "";
6655	                    if (!recovering) {
6656	                        expected = [];
6657	                        for (p in table[state]) if (this.terminals_[p] && p > 2) {
6658	                            expected.push("'" + this.terminals_[p] + "'");
6659	                        }
6660	                        if (this.lexer.showPosition) {
6661	                            errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
6662	                        } else {
6663	                            errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
6664	                        }
6665	                        this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected });
6666	                    }
6667	                }
6668	                if (action[0] instanceof Array && action.length > 1) {
6669	                    throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
6670	                }
6671	                switch (action[0]) {
6672	                    case 1:
6673	                        stack.push(symbol);
6674	                        vstack.push(this.lexer.yytext);
6675	                        lstack.push(this.lexer.yylloc);
6676	                        stack.push(action[1]);
6677	                        symbol = null;
6678	                        if (!preErrorSymbol) {
6679	                            yyleng = this.lexer.yyleng;
6680	                            yytext = this.lexer.yytext;
6681	                            yylineno = this.lexer.yylineno;
6682	                            yyloc = this.lexer.yylloc;
6683	                            if (recovering > 0) recovering--;
6684	                        } else {
6685	                            symbol = preErrorSymbol;
6686	                            preErrorSymbol = null;
6687	                        }
6688	                        break;
6689	                    case 2:
6690	                        len = this.productions_[action[1]][1];
6691	                        yyval.$ = vstack[vstack.length - len];
6692	                        yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column };
6693	                        if (ranges) {
6694	                            yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
6695	                        }
6696	                        r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
6697	                        if (typeof r !== "undefined") {
6698	                            return r;
6699	                        }
6700	                        if (len) {
6701	                            stack = stack.slice(0, -1 * len * 2);
6702	                            vstack = vstack.slice(0, -1 * len);
6703	                            lstack = lstack.slice(0, -1 * len);
6704	                        }
6705	                        stack.push(this.productions_[action[1]][0]);
6706	                        vstack.push(yyval.$);
6707	                        lstack.push(yyval._$);
6708	                        newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
6709	                        stack.push(newState);
6710	                        break;
6711	                    case 3:
6712	                        return true;
6713	                }
6714	            }
6715	            return true;
6716	        }
6717	    };
6718	    /* Jison generated lexer */
6719	    var lexer = (function () {
6720	        var lexer = { EOF: 1,
6721	            parseError: function parseError(str, hash) {
6722	                if (this.yy.parser) {
6723	                    this.yy.parser.parseError(str, hash);
6724	                } else {
6725	                    throw new Error(str);
6726	                }
6727	            },
6728	            setInput: function setInput(input) {
6729	                this._input = input;
6730	                this._more = this._less = this.done = false;
6731	                this.yylineno = this.yyleng = 0;
6732	                this.yytext = this.matched = this.match = '';
6733	                this.conditionStack = ['INITIAL'];
6734	                this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 };
6735	                if (this.options.ranges) this.yylloc.range = [0, 0];
6736	                this.offset = 0;
6737	                return this;
6738	            },
6739	            input: function input() {
6740	                var ch = this._input[0];
6741	                this.yytext += ch;
6742	                this.yyleng++;
6743	                this.offset++;
6744	                this.match += ch;
6745	                this.matched += ch;
6746	                var lines = ch.match(/(?:\r\n?|\n).*/g);
6747	                if (lines) {
6748	                    this.yylineno++;
6749	                    this.yylloc.last_line++;
6750	                } else {
6751	                    this.yylloc.last_column++;
6752	                }
6753	                if (this.options.ranges) this.yylloc.range[1]++;
6754
6755	                this._input = this._input.slice(1);
6756	                return ch;
6757	            },
6758	            unput: function unput(ch) {
6759	                var len = ch.length;
6760	                var lines = ch.split(/(?:\r\n?|\n)/g);
6761
6762	                this._input = ch + this._input;
6763	                this.yytext = this.yytext.substr(0, this.yytext.length - len - 1);
6764	                //this.yyleng -= len;
6765	                this.offset -= len;
6766	                var oldLines = this.match.split(/(?:\r\n?|\n)/g);
6767	                this.match = this.match.substr(0, this.match.length - 1);
6768	                this.matched = this.matched.substr(0, this.matched.length - 1);
6769
6770	                if (lines.length - 1) this.yylineno -= lines.length - 1;
6771	                var r = this.yylloc.range;
6772
6773	                this.yylloc = { first_line: this.yylloc.first_line,
6774	                    last_line: this.yylineno + 1,
6775	                    first_column: this.yylloc.first_column,
6776	                    last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
6777	                };
6778
6779	                if (this.options.ranges) {
6780	                    this.yylloc.range = [r[0], r[0] + this.yyleng - len];
6781	                }
6782	                return this;
6783	            },
6784	            more: function more() {
6785	                this._more = true;
6786	                return this;
6787	            },
6788	            less: function less(n) {
6789	                this.unput(this.match.slice(n));
6790	            },
6791	            pastInput: function pastInput() {
6792	                var past = this.matched.substr(0, this.matched.length - this.match.length);
6793	                return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
6794	            },
6795	            upcomingInput: function upcomingInput() {
6796	                var next = this.match;
6797	                if (next.length < 20) {
6798	                    next += this._input.substr(0, 20 - next.length);
6799	                }
6800	                return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
6801	            },
6802	            showPosition: function showPosition() {
6803	                var pre = this.pastInput();
6804	                var c = new Array(pre.length + 1).join("-");
6805	                return pre + this.upcomingInput() + "\n" + c + "^";
6806	            },
6807	            next: function next() {
6808	                if (this.done) {
6809	                    return this.EOF;
6810	                }
6811	                if (!this._input) this.done = true;
6812
6813	                var token, match, tempMatch, index, col, lines;
6814	                if (!this._more) {
6815	                    this.yytext = '';
6816	                    this.match = '';
6817	                }
6818	                var rules = this._currentRules();
6819	                for (var i = 0; i < rules.length; i++) {
6820	                    tempMatch = this._input.match(this.rules[rules[i]]);
6821	                    if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
6822	                        match = tempMatch;
6823	                        index = i;
6824	                        if (!this.options.flex) break;
6825	                    }
6826	                }
6827	                if (match) {
6828	                    lines = match[0].match(/(?:\r\n?|\n).*/g);
6829	                    if (lines) this.yylineno += lines.length;
6830	                    this.yylloc = { first_line: this.yylloc.last_line,
6831	                        last_line: this.yylineno + 1,
6832	                        first_column: this.yylloc.last_column,
6833	                        last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length };
6834	                    this.yytext += match[0];
6835	                    this.match += match[0];
6836	                    this.matches = match;
6837	                    this.yyleng = this.yytext.length;
6838	                    if (this.options.ranges) {
6839	                        this.yylloc.range = [this.offset, this.offset += this.yyleng];
6840	                    }
6841	                    this._more = false;
6842	                    this._input = this._input.slice(match[0].length);
6843	                    this.matched += match[0];
6844	                    token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]);
6845	                    if (this.done && this._input) this.done = false;
6846	                    if (token) return token;else return;
6847	                }
6848	                if (this._input === "") {
6849	                    return this.EOF;
6850	                } else {
6851	                    return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno });
6852	                }
6853	            },
6854	            lex: function lex() {
6855	                var r = this.next();
6856	                if (typeof r !== 'undefined') {
6857	                    return r;
6858	                } else {
6859	                    return this.lex();
6860	                }
6861	            },
6862	            begin: function begin(condition) {
6863	                this.conditionStack.push(condition);
6864	            },
6865	            popState: function popState() {
6866	                return this.conditionStack.pop();
6867	            },
6868	            _currentRules: function _currentRules() {
6869	                return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
6870	            },
6871	            topState: function topState() {
6872	                return this.conditionStack[this.conditionStack.length - 2];
6873	            },
6874	            pushState: function begin(condition) {
6875	                this.begin(condition);
6876	            } };
6877	        lexer.options = {};
6878	        lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START
vendor: 7,146 bytes, lines 6878-7058
6878
6879	        /**/) {
6880
6881	            function strip(start, end) {
6882	                return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end);
6883	            }
6884
6885	            var YYSTATE = YY_START;
6886	            switch ($avoiding_name_collisions) {
6887	                case 0:
6888	                    if (yy_.yytext.slice(-2) === "\\\\") {
6889	                        strip(0, 1);
6890	                        this.begin("mu");
6891	                    } else if (yy_.yytext.slice(-1) === "\\") {
6892	                        strip(0, 1);
6893	                        this.begin("emu");
6894	                    } else {
6895	                        this.begin("mu");
6896	                    }
6897	                    if (yy_.yytext) return 15;
6898
6899	                    break;
6900	                case 1:
6901	                    return 15;
6902	                    break;
6903	                case 2:
6904	                    this.popState();
6905	                    return 15;
6906
6907	                    break;
6908	                case 3:
6909	                    this.begin('raw');return 15;
6910	                    break;
6911	                case 4:
6912	                    this.popState();
6913	                    // Should be using `this.topState()` below, but it currently
6914	                    // returns the second top instead of the first top. Opened an
6915	                    // issue about it at https://github.com/zaach/jison/issues/291
6916	                    if (this.conditionStack[this.conditionStack.length - 1] === 'raw') {
6917	                        return 15;
6918	                    } else {
6919	                        yy_.yytext = yy_.yytext.substr(5, yy_.yyleng - 9);
6920	                        return 'END_RAW_BLOCK';
6921	                    }
6922
6923	                    break;
6924	                case 5:
6925	                    return 15;
6926	                    break;
6927	                case 6:
6928	                    this.popState();
6929	                    return 14;
6930
6931	                    break;
6932	                case 7:
6933	                    return 65;
6934	                    break;
6935	                case 8:
6936	                    return 68;
6937	                    break;
6938	                case 9:
6939	                    return 19;
6940	                    break;
6941	                case 10:
6942	                    this.popState();
6943	                    this.begin('raw');
6944	                    return 23;
6945
6946	                    break;
6947	                case 11:
6948	                    return 55;
6949	                    break;
6950	                case 12:
6951	                    return 60;
6952	                    break;
6953	                case 13:
6954	                    return 29;
6955	                    break;
6956	                case 14:
6957	                    return 47;
6958	                    break;
6959	                case 15:
6960	                    this.popState();return 44;
6961	                    break;
6962	                case 16:
6963	                    this.popState();return 44;
6964	                    break;
6965	                case 17:
6966	                    return 34;
6967	                    break;
6968	                case 18:
6969	                    return 39;
6970	                    break;
6971	                case 19:
6972	                    return 51;
6973	                    break;
6974	                case 20:
6975	                    return 48;
6976	                    break;
6977	                case 21:
6978	                    this.unput(yy_.yytext);
6979	                    this.popState();
6980	                    this.begin('com');
6981
6982	                    break;
6983	                case 22:
6984	                    this.popState();
6985	                    return 14;
6986
6987	                    break;
6988	                case 23:
6989	                    return 48;
6990	                    break;
6991	                case 24:
6992	                    return 73;
6993	                    break;
6994	                case 25:
6995	                    return 72;
6996	                    break;
6997	                case 26:
6998	                    return 72;
6999	                    break;
7000	                case 27:
7001	                    return 87;
7002	                    break;
7003	                case 28:
7004	                    // ignore whitespace
7005	                    break;
7006	                case 29:
7007	                    this.popState();return 54;
7008	                    break;
7009	                case 30:
7010	                    this.popState();return 33;
7011	                    break;
7012	                case 31:
7013	                    yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80;
7014	                    break;
7015	                case 32:
7016	                    yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80;
7017	                    break;
7018	                case 33:
7019	                    return 85;
7020	                    break;
7021	                case 34:
7022	                    return 82;
7023	                    break;
7024	                case 35:
7025	                    return 82;
7026	                    break;
7027	                case 36:
7028	                    return 83;
7029	                    break;
7030	                case 37:
7031	                    return 84;
7032	                    break;
7033	                case 38:
7034	                    return 81;
7035	                    break;
7036	                case 39:
7037	                    return 75;
7038	                    break;
7039	                case 40:
7040	                    return 77;
7041	                    break;
7042	                case 41:
7043	                    return 72;
7044	                    break;
7045	                case 42:
7046	                    yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72;
7047	                    break;
7048	                case 43:
7049	                    return 'INVALID';
7050	                    break;
7051	                case 44:
7052	                    return 5;
7053	                    break;
7054	            }
7055	        };
7056	        lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
7057	        lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } };
7058	        return lexer;
vendor: 13,265 bytes, lines 7059-7521
7059	    })();
7060	    parser.lexer = lexer;
7061	    function Parser() {
7062	        this.yy = {};
7063	    }Parser.prototype = parser;parser.Parser = Parser;
7064	    return new Parser();
7065	})();exports["default"] = handlebars;
7066	module.exports = exports["default"];
7067
7068/***/ }),
7069/* 38 */
7070/***/ (function(module, exports, __webpack_require__) {
7071
7072	'use strict';
7073
7074	var _interopRequireDefault = __webpack_require__(1)['default'];
7075
7076	exports.__esModule = true;
7077
7078	var _visitor = __webpack_require__(39);
7079
7080	var _visitor2 = _interopRequireDefault(_visitor);
7081
7082	function WhitespaceControl() {
7083	  var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
7084
7085	  this.options = options;
7086	}
7087	WhitespaceControl.prototype = new _visitor2['default']();
7088
7089	WhitespaceControl.prototype.Program = function (program) {
7090	  var doStandalone = !this.options.ignoreStandalone;
7091
7092	  var isRoot = !this.isRootSeen;
7093	  this.isRootSeen = true;
7094
7095	  var body = program.body;
7096	  for (var i = 0, l = body.length; i < l; i++) {
7097	    var current = body[i],
7098	        strip = this.accept(current);
7099
7100	    if (!strip) {
7101	      continue;
7102	    }
7103
7104	    var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot),
7105	        _isNextWhitespace = isNextWhitespace(body, i, isRoot),
7106	        openStandalone = strip.openStandalone && _isPrevWhitespace,
7107	        closeStandalone = strip.closeStandalone && _isNextWhitespace,
7108	        inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace;
7109
7110	    if (strip.close) {
7111	      omitRight(body, i, true);
7112	    }
7113	    if (strip.open) {
7114	      omitLeft(body, i, true);
7115	    }
7116
7117	    if (doStandalone && inlineStandalone) {
7118	      omitRight(body, i);
7119
7120	      if (omitLeft(body, i)) {
7121	        // If we are on a standalone node, save the indent info for partials
7122	        if (current.type === 'PartialStatement') {
7123	          // Pull out the whitespace from the final line
7124	          current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1];
7125	        }
7126	      }
7127	    }
7128	    if (doStandalone && openStandalone) {
7129	      omitRight((current.program || current.inverse).body);
7130
7131	      // Strip out the previous content node if it's whitespace only
7132	      omitLeft(body, i);
7133	    }
7134	    if (doStandalone && closeStandalone) {
7135	      // Always strip the next node
7136	      omitRight(body, i);
7137
7138	      omitLeft((current.inverse || current.program).body);
7139	    }
7140	  }
7141
7142	  return program;
7143	};
7144
7145	WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) {
7146	  this.accept(block.program);
7147	  this.accept(block.inverse);
7148
7149	  // Find the inverse program that is involed with whitespace stripping.
7150	  var program = block.program || block.inverse,
7151	      inverse = block.program && block.inverse,
7152	      firstInverse = inverse,
7153	      lastInverse = inverse;
7154
7155	  if (inverse && inverse.chained) {
7156	    firstInverse = inverse.body[0].program;
7157
7158	    // Walk the inverse chain to find the last inverse that is actually in the chain.
7159	    while (lastInverse.chained) {
7160	      lastInverse = lastInverse.body[lastInverse.body.length - 1].program;
7161	    }
7162	  }
7163
7164	  var strip = {
7165	    open: block.openStrip.open,
7166	    close: block.closeStrip.close,
7167
7168	    // Determine the standalone candiacy. Basically flag our content as being possibly standalone
7169	    // so our parent can determine if we actually are standalone
7170	    openStandalone: isNextWhitespace(program.body),
7171	    closeStandalone: isPrevWhitespace((firstInverse || program).body)
7172	  };
7173
7174	  if (block.openStrip.close) {
7175	    omitRight(program.body, null, true);
7176	  }
7177
7178	  if (inverse) {
7179	    var inverseStrip = block.inverseStrip;
7180
7181	    if (inverseStrip.open) {
7182	      omitLeft(program.body, null, true);
7183	    }
7184
7185	    if (inverseStrip.close) {
7186	      omitRight(firstInverse.body, null, true);
7187	    }
7188	    if (block.closeStrip.open) {
7189	      omitLeft(lastInverse.body, null, true);
7190	    }
7191
7192	    // Find standalone else statments
7193	    if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) {
7194	      omitLeft(program.body);
7195	      omitRight(firstInverse.body);
7196	    }
7197	  } else if (block.closeStrip.open) {
7198	    omitLeft(program.body, null, true);
7199	  }
7200
7201	  return strip;
7202	};
7203
7204	WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) {
7205	  return mustache.strip;
7206	};
7207
7208	WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) {
7209	  /* istanbul ignore next */
7210	  var strip = node.strip || {};
7211	  return {
7212	    inlineStandalone: true,
7213	    open: strip.open,
7214	    close: strip.close
7215	  };
7216	};
7217
7218	function isPrevWhitespace(body, i, isRoot) {
7219	  if (i === undefined) {
7220	    i = body.length;
7221	  }
7222
7223	  // Nodes that end with newlines are considered whitespace (but are special
7224	  // cased for strip operations)
7225	  var prev = body[i - 1],
7226	      sibling = body[i - 2];
7227	  if (!prev) {
7228	    return isRoot;
7229	  }
7230
7231	  if (prev.type === 'ContentStatement') {
7232	    return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original);
7233	  }
7234	}
7235	function isNextWhitespace(body, i, isRoot) {
7236	  if (i === undefined) {
7237	    i = -1;
7238	  }
7239
7240	  var next = body[i + 1],
7241	      sibling = body[i + 2];
7242	  if (!next) {
7243	    return isRoot;
7244	  }
7245
7246	  if (next.type === 'ContentStatement') {
7247	    return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original);
7248	  }
7249	}
7250
7251	// Marks the node to the right of the position as omitted.
7252	// I.e. {{foo}}' ' will mark the ' ' node as omitted.
7253	//
7254	// If i is undefined, then the first child will be marked as such.
7255	//
7256	// If mulitple is truthy then all whitespace will be stripped out until non-whitespace
7257	// content is met.
7258	function omitRight(body, i, multiple) {
7259	  var current = body[i == null ? 0 : i + 1];
7260	  if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) {
7261	    return;
7262	  }
7263
7264	  var original = current.value;
7265	  current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, '');
7266	  current.rightStripped = current.value !== original;
7267	}
7268
7269	// Marks the node to the left of the position as omitted.
7270	// I.e. ' '{{foo}} will mark the ' ' node as omitted.
7271	//
7272	// If i is undefined then the last child will be marked as such.
7273	//
7274	// If mulitple is truthy then all whitespace will be stripped out until non-whitespace
7275	// content is met.
7276	function omitLeft(body, i, multiple) {
7277	  var current = body[i == null ? body.length - 1 : i - 1];
7278	  if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) {
7279	    return;
7280	  }
7281
7282	  // We omit the last node if it's whitespace only and not preceeded by a non-content node.
7283	  var original = current.value;
7284	  current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, '');
7285	  current.leftStripped = current.value !== original;
7286	  return current.leftStripped;
7287	}
7288
7289	exports['default'] = WhitespaceControl;
7290	module.exports = exports['default'];
7291
7292/***/ }),
7293/* 39 */
7294/***/ (function(module, exports, __webpack_require__) {
7295
7296	'use strict';
7297
7298	var _interopRequireDefault = __webpack_require__(1)['default'];
7299
7300	exports.__esModule = true;
7301
7302	var _exception = __webpack_require__(6);
7303
7304	var _exception2 = _interopRequireDefault(_exception);
7305
7306	function Visitor() {
7307	  this.parents = [];
7308	}
7309
7310	Visitor.prototype = {
7311	  constructor: Visitor,
7312	  mutating: false,
7313
7314	  // Visits a given value. If mutating, will replace the value if necessary.
7315	  acceptKey: function acceptKey(node, name) {
7316	    var value = this.accept(node[name]);
7317	    if (this.mutating) {
7318	      // Hacky sanity check: This may have a few false positives for type for the helper
7319	      // methods but will generally do the right thing without a lot of overhead.
7320	      if (value && !Visitor.prototype[value.type]) {
7321	        throw new _exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type);
7322	      }
7323	      node[name] = value;
7324	    }
7325	  },
7326
7327	  // Performs an accept operation with added sanity check to ensure
7328	  // required keys are not removed.
7329	  acceptRequired: function acceptRequired(node, name) {
7330	    this.acceptKey(node, name);
7331
7332	    if (!node[name]) {
7333	      throw new _exception2['default'](node.type + ' requires ' + name);
7334	    }
7335	  },
7336
7337	  // Traverses a given array. If mutating, empty respnses will be removed
7338	  // for child elements.
7339	  acceptArray: function acceptArray(array) {
7340	    for (var i = 0, l = array.length; i < l; i++) {
7341	      this.acceptKey(array, i);
7342
7343	      if (!array[i]) {
7344	        array.splice(i, 1);
7345	        i--;
7346	        l--;
7347	      }
7348	    }
7349	  },
7350
7351	  accept: function accept(object) {
7352	    if (!object) {
7353	      return;
7354	    }
7355
7356	    /* istanbul ignore next: Sanity code */
7357	    if (!this[object.type]) {
7358	      throw new _exception2['default']('Unknown type: ' + object.type, object);
7359	    }
7360
7361	    if (this.current) {
7362	      this.parents.unshift(this.current);
7363	    }
7364	    this.current = object;
7365
7366	    var ret = this[object.type](object);
7367
7368	    this.current = this.parents.shift();
7369
7370	    if (!this.mutating || ret) {
7371	      return ret;
7372	    } else if (ret !== false) {
7373	      return object;
7374	    }
7375	  },
7376
7377	  Program: function Program(program) {
7378	    this.acceptArray(program.body);
7379	  },
7380
7381	  MustacheStatement: visitSubExpression,
7382	  Decorator: visitSubExpression,
7383
7384	  BlockStatement: visitBlock,
7385	  DecoratorBlock: visitBlock,
7386
7387	  PartialStatement: visitPartial,
7388	  PartialBlockStatement: function PartialBlockStatement(partial) {
7389	    visitPartial.call(this, partial);
7390
7391	    this.acceptKey(partial, 'program');
7392	  },
7393
7394	  ContentStatement: function ContentStatement() /* content */{},
7395	  CommentStatement: function CommentStatement() /* comment */{},
7396
7397	  SubExpression: visitSubExpression,
7398
7399	  PathExpression: function PathExpression() /* path */{},
7400
7401	  StringLiteral: function StringLiteral() /* string */{},
7402	  NumberLiteral: function NumberLiteral() /* number */{},
7403	  BooleanLiteral: function BooleanLiteral() /* bool */{},
7404	  UndefinedLiteral: function UndefinedLiteral() /* literal */{},
7405	  NullLiteral: function NullLiteral() /* literal */{},
7406
7407	  Hash: function Hash(hash) {
7408	    this.acceptArray(hash.pairs);
7409	  },
7410	  HashPair: function HashPair(pair) {
7411	    this.acceptRequired(pair, 'value');
7412	  }
7413	};
7414
7415	function visitSubExpression(mustache) {
7416	  this.acceptRequired(mustache, 'path');
7417	  this.acceptArray(mustache.params);
7418	  this.acceptKey(mustache, 'hash');
7419	}
7420	function visitBlock(block) {
7421	  visitSubExpression.call(this, block);
7422
7423	  this.acceptKey(block, 'program');
7424	  this.acceptKey(block, 'inverse');
7425	}
7426	function visitPartial(partial) {
7427	  this.acceptRequired(partial, 'name');
7428	  this.acceptArray(partial.params);
7429	  this.acceptKey(partial, 'hash');
7430	}
7431
7432	exports['default'] = Visitor;
7433	module.exports = exports['default'];
7434
7435/***/ }),
7436/* 40 */
7437/***/ (function(module, exports, __webpack_require__) {
7438
7439	'use strict';
7440
7441	var _interopRequireDefault = __webpack_require__(1)['default'];
7442
7443	exports.__esModule = true;
7444	exports.SourceLocation = SourceLocation;
7445	exports.id = id;
7446	exports.stripFlags = stripFlags;
7447	exports.stripComment = stripComment;
7448	exports.preparePath = preparePath;
7449	exports.prepareMustache = prepareMustache;
7450	exports.prepareRawBlock = prepareRawBlock;
7451	exports.prepareBlock = prepareBlock;
7452	exports.prepareProgram = prepareProgram;
7453	exports.preparePartialBlock = preparePartialBlock;
7454
7455	var _exception = __webpack_require__(6);
7456
7457	var _exception2 = _interopRequireDefault(_exception);
7458
7459	function validateClose(open, close) {
7460	  close = close.path ? close.path.original : close;
7461
7462	  if (open.path.original !== close) {
7463	    var errorNode = { loc: open.path.loc };
7464
7465	    throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode);
7466	  }
7467	}
7468
7469	function SourceLocation(source, locInfo) {
7470	  this.source = source;
7471	  this.start = {
7472	    line: locInfo.first_line,
7473	    column: locInfo.first_column
7474	  };
7475	  this.end = {
7476	    line: locInfo.last_line,
7477	    column: locInfo.last_column
7478	  };
7479	}
7480
7481	function id(token) {
7482	  if (/^\[.*\]$/.test(token)) {
7483	    return token.substr(1, token.length - 2);
7484	  } else {
7485	    return token;
7486	  }
7487	}
7488
7489	function stripFlags(open, close) {
7490	  return {
7491	    open: open.charAt(2) === '~',
7492	    close: close.charAt(close.length - 3) === '~'
7493	  };
7494	}
7495
7496	function stripComment(comment) {
7497	  return comment.replace(/^\{\{~?\!-?-?/, '').replace(/-?-?~?\}\}$/, '');
7498	}
7499
7500	function preparePath(data, parts, loc) {
7501	  loc = this.locInfo(loc);
7502
7503	  var original = data ? '@' : '',
7504	      dig = [],
7505	      depth = 0,
7506	      depthString = '';
7507
7508	  for (var i = 0, l = parts.length; i < l; i++) {
7509	    var part = parts[i].part,
7510
7511	    // If we have [] syntax then we do not treat path references as operators,
7512	    // i.e. foo.[this] resolves to approximately context.foo['this']
7513	    isLiteral = parts[i].original !== part;
7514	    original += (parts[i].separator || '') + part;
7515
7516	    if (!isLiteral && (part === '..' || part === '.' || part === 'this')) {
7517	      if (dig.length > 0) {
7518	        throw new _exception2['default']('Invalid path: ' + original, { loc: loc });
7519	      } else if (part === '..') {
7520	        depth++;
7521	        depthString += '../'
vendor: 3,286 bytes, lines 7521-7669
7521;
7522	      }
7523	    } else {
7524	      dig.push(part);
7525	    }
7526	  }
7527
7528	  return {
7529	    type: 'PathExpression',
7530	    data: data,
7531	    depth: depth,
7532	    parts: dig,
7533	    original: original,
7534	    loc: loc
7535	  };
7536	}
7537
7538	function prepareMustache(path, params, hash, open, strip, locInfo) {
7539	  // Must use charAt to support IE pre-10
7540	  var escapeFlag = open.charAt(3) || open.charAt(2),
7541	      escaped = escapeFlag !== '{' && escapeFlag !== '&';
7542
7543	  var decorator = /\*/.test(open);
7544	  return {
7545	    type: decorator ? 'Decorator' : 'MustacheStatement',
7546	    path: path,
7547	    params: params,
7548	    hash: hash,
7549	    escaped: escaped,
7550	    strip: strip,
7551	    loc: this.locInfo(locInfo)
7552	  };
7553	}
7554
7555	function prepareRawBlock(openRawBlock, contents, close, locInfo) {
7556	  validateClose(openRawBlock, close);
7557
7558	  locInfo = this.locInfo(locInfo);
7559	  var program = {
7560	    type: 'Program',
7561	    body: contents,
7562	    strip: {},
7563	    loc: locInfo
7564	  };
7565
7566	  return {
7567	    type: 'BlockStatement',
7568	    path: openRawBlock.path,
7569	    params: openRawBlock.params,
7570	    hash: openRawBlock.hash,
7571	    program: program,
7572	    openStrip: {},
7573	    inverseStrip: {},
7574	    closeStrip: {},
7575	    loc: locInfo
7576	  };
7577	}
7578
7579	function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) {
7580	  if (close && close.path) {
7581	    validateClose(openBlock, close);
7582	  }
7583
7584	  var decorator = /\*/.test(openBlock.open);
7585
7586	  program.blockParams = openBlock.blockParams;
7587
7588	  var inverse = undefined,
7589	      inverseStrip = undefined;
7590
7591	  if (inverseAndProgram) {
7592	    if (decorator) {
7593	      throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram);
7594	    }
7595
7596	    if (inverseAndProgram.chain) {
7597	      inverseAndProgram.program.body[0].closeStrip = close.strip;
7598	    }
7599
7600	    inverseStrip = inverseAndProgram.strip;
7601	    inverse = inverseAndProgram.program;
7602	  }
7603
7604	  if (inverted) {
7605	    inverted = inverse;
7606	    inverse = program;
7607	    program = inverted;
7608	  }
7609
7610	  return {
7611	    type: decorator ? 'DecoratorBlock' : 'BlockStatement',
7612	    path: openBlock.path,
7613	    params: openBlock.params,
7614	    hash: openBlock.hash,
7615	    program: program,
7616	    inverse: inverse,
7617	    openStrip: openBlock.strip,
7618	    inverseStrip: inverseStrip,
7619	    closeStrip: close && close.strip,
7620	    loc: this.locInfo(locInfo)
7621	  };
7622	}
7623
7624	function prepareProgram(statements, loc) {
7625	  if (!loc && statements.length) {
7626	    var firstLoc = statements[0].loc,
7627	        lastLoc = statements[statements.length - 1].loc;
7628
7629	    /* istanbul ignore else */
7630	    if (firstLoc && lastLoc) {
7631	      loc = {
7632	        source: firstLoc.source,
7633	        start: {
7634	          line: firstLoc.start.line,
7635	          column: firstLoc.start.column
7636	        },
7637	        end: {
7638	          line: lastLoc.end.line,
7639	          column: lastLoc.end.column
7640	        }
7641	      };
7642	    }
7643	  }
7644
7645	  return {
7646	    type: 'Program',
7647	    body: statements,
7648	    strip: {},
7649	    loc: loc
7650	  };
7651	}
7652
7653	function preparePartialBlock(open, program, close, locInfo) {
7654	  validateClose(open, close);
7655
7656	  return {
7657	    type: 'PartialBlockStatement',
7658	    name: open.path,
7659	    params: open.params,
7660	    hash: open.hash,
7661	    program: program,
7662	    openStrip: open.strip,
7663	    closeStrip: close && close.strip,
7664	    loc: this.locInfo(locInfo)
7665	  };
7666	}
7667
7668/***/ }),
7669/* 4
76691 */
7670/***/ (function(module, exports, __webpack_require__) {
7671
7672	/* eslint-disable new-cap */
7673
7674	'use strict';
7675
7676	var _interopRequireDefault = __webpack_require__(1)['default'];
7677
7678	exports.__esModule = true;
7679	exports.Compiler = Compiler;
7680	exports.precompile = precompile;
7681	exports.compile = compile;
7682
7683	var _exception = __webpack_require__(6);
7684
7685	var _exception2 = _interopRequireDefault(_exception);
7686
7687	var _utils = __webpack_require__(5);
7688
7689	var _ast = __webpack_require__(35);
7690
7691	var _ast2 = _interopRequireDefault(_ast);
7692
7693	var slice = [].slice;
7694
7695	function Compiler() {}
7696
7697	// the foundHelper register will disambiguate helper lookup from finding a
7698	// function in a context. This is necessary for mustache compatibility, which
7699	// requires that context functions in blocks are evaluated by blockHelperMissing,
7700	// and then proceed as if the resulting value was provided to blockHelperMissing.
7701
7702	Compiler.prototype = {
7703	  compiler: Compiler,
7704
7705	  equals: function equals(other) {
7706	    var len = this.opcodes.length;
7707	    if (other.opcodes.length !== len) {
7708	      return false;
7709	    }
7710
7711	    for (var i = 0; i < len; i++) {
7712	      var opcode = this.opcodes[i],
7713	          otherOpcode = other.opcodes[i];
7714	      if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) {
7715	        return false;
7716	      }
7717	    }
7718
7719	    // We know that length is the same between the two arrays because they are directly tied
7720	    // to the opcode behavior above.
7721	    len = this.children.length;
7722	    for (var i = 0; i < len; i++) {
7723	      if (!this.children[i].equals(other.children[i])) {
7724	        return false;
7725	      }
7726	    }
7727
7728	    return true;
7729	  },
7730
7731	  guid: 0,
7732
7733	  compile: function compile(program, options) {
7734	    this.sourceNode = [];
7735	    this.opcodes = [];
7736	    this.children = [];
7737	    this.options = options;
7738	    this.stringParams = options.stringParams;
7739	    this.trackIds = options.trackIds;
7740
7741	    options.blockParams = options.blockParams || [];
7742
7743	    // These changes will propagate to the other compiler components
7744	    var knownHelpers = options.knownHelpers;
7745	    options.knownHelpers = {
7746	      'helperMissing': true,
7747	      'blockHelperMissing': true,
7748	      'each': true,
7749	      'if': true,
7750	      'unless': true,
7751	      'with': true,
7752	      'log': true,
7753	      'lookup': true
7754	    };
7755	    if (knownHelpers) {
7756	      for (var _name in knownHelpers) {
7757	        /* istanbul ignore else */
7758	        if (_name in knownHelpers) {
7759	          this.options.knownHelpers[_name] = knownHelpers[_name];
7760	        }
7761	      }
7762	    }
vendor: 8,795 bytes, lines 7762-8056
7762
7763
7764	    return this.accept(program);
7765	  },
7766
7767	  compileProgram: function compileProgram(program) {
7768	    var childCompiler = new this.compiler(),
7769	        // eslint-disable-line new-cap
7770	    result = childCompiler.compile(program, this.options),
7771	        guid = this.guid++;
7772
7773	    this.usePartial = this.usePartial || result.usePartial;
7774
7775	    this.children[guid] = result;
7776	    this.useDepths = this.useDepths || result.useDepths;
7777
7778	    return guid;
7779	  },
7780
7781	  accept: function accept(node) {
7782	    /* istanbul ignore next: Sanity code */
7783	    if (!this[node.type]) {
7784	      throw new _exception2['default']('Unknown type: ' + node.type, node);
7785	    }
7786
7787	    this.sourceNode.unshift(node);
7788	    var ret = this[node.type](node);
7789	    this.sourceNode.shift();
7790	    return ret;
7791	  },
7792
7793	  Program: function Program(program) {
7794	    this.options.blockParams.unshift(program.blockParams);
7795
7796	    var body = program.body,
7797	        bodyLength = body.length;
7798	    for (var i = 0; i < bodyLength; i++) {
7799	      this.accept(body[i]);
7800	    }
7801
7802	    this.options.blockParams.shift();
7803
7804	    this.isSimple = bodyLength === 1;
7805	    this.blockParams = program.blockParams ? program.blockParams.length : 0;
7806
7807	    return this;
7808	  },
7809
7810	  BlockStatement: function BlockStatement(block) {
7811	    transformLiteralToPath(block);
7812
7813	    var program = block.program,
7814	        inverse = block.inverse;
7815
7816	    program = program && this.compileProgram(program);
7817	    inverse = inverse && this.compileProgram(inverse);
7818
7819	    var type = this.classifySexpr(block);
7820
7821	    if (type === 'helper') {
7822	      this.helperSexpr(block, program, inverse);
7823	    } else if (type === 'simple') {
7824	      this.simpleSexpr(block);
7825
7826	      // now that the simple mustache is resolved, we need to
7827	      // evaluate it by executing `blockHelperMissing`
7828	      this.opcode('pushProgram', program);
7829	      this.opcode('pushProgram', inverse);
7830	      this.opcode('emptyHash');
7831	      this.opcode('blockValue', block.path.original);
7832	    } else {
7833	      this.ambiguousSexpr(block, program, inverse);
7834
7835	      // now that the simple mustache is resolved, we need to
7836	      // evaluate it by executing `blockHelperMissing`
7837	      this.opcode('pushProgram', program);
7838	      this.opcode('pushProgram', inverse);
7839	      this.opcode('emptyHash');
7840	      this.opcode('ambiguousBlockValue');
7841	    }
7842
7843	    this.opcode('append');
7844	  },
7845
7846	  DecoratorBlock: function DecoratorBlock(decorator) {
7847	    var program = decorator.program && this.compileProgram(decorator.program);
7848	    var params = this.setupFullMustacheParams(decorator, program, undefined),
7849	        path = decorator.path;
7850
7851	    this.useDecorators = true;
7852	    this.opcode('registerDecorator', params.length, path.original);
7853	  },
7854
7855	  PartialStatement: function PartialStatement(partial) {
7856	    this.usePartial = true;
7857
7858	    var program = partial.program;
7859	    if (program) {
7860	      program = this.compileProgram(partial.program);
7861	    }
7862
7863	    var params = partial.params;
7864	    if (params.length > 1) {
7865	      throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial);
7866	    } else if (!params.length) {
7867	      if (this.options.explicitPartialContext) {
7868	        this.opcode('pushLiteral', 'undefined');
7869	      } else {
7870	        params.push({ type: 'PathExpression', parts: [], depth: 0 });
7871	      }
7872	    }
7873
7874	    var partialName = partial.name.original,
7875	        isDynamic = partial.name.type === 'SubExpression';
7876	    if (isDynamic) {
7877	      this.accept(partial.name);
7878	    }
7879
7880	    this.setupFullMustacheParams(partial, program, undefined, true);
7881
7882	    var indent = partial.indent || '';
7883	    if (this.options.preventIndent && indent) {
7884	      this.opcode('appendContent', indent);
7885	      indent = '';
7886	    }
7887
7888	    this.opcode('invokePartial', isDynamic, partialName, indent);
7889	    this.opcode('append');
7890	  },
7891	  PartialBlockStatement: function PartialBlockStatement(partialBlock) {
7892	    this.PartialStatement(partialBlock);
7893	  },
7894
7895	  MustacheStatement: function MustacheStatement(mustache) {
7896	    this.SubExpression(mustache);
7897
7898	    if (mustache.escaped && !this.options.noEscape) {
7899	      this.opcode('appendEscaped');
7900	    } else {
7901	      this.opcode('append');
7902	    }
7903	  },
7904	  Decorator: function Decorator(decorator) {
7905	    this.DecoratorBlock(decorator);
7906	  },
7907
7908	  ContentStatement: function ContentStatement(content) {
7909	    if (content.value) {
7910	      this.opcode('appendContent', content.value);
7911	    }
7912	  },
7913
7914	  CommentStatement: function CommentStatement() {},
7915
7916	  SubExpression: function SubExpression(sexpr) {
7917	    transformLiteralToPath(sexpr);
7918	    var type = this.classifySexpr(sexpr);
7919
7920	    if (type === 'simple') {
7921	      this.simpleSexpr(sexpr);
7922	    } else if (type === 'helper') {
7923	      this.helperSexpr(sexpr);
7924	    } else {
7925	      this.ambiguousSexpr(sexpr);
7926	    }
7927	  },
7928	  ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
7929	    var path = sexpr.path,
7930	        name = path.parts[0],
7931	        isBlock = program != null || inverse != null;
7932
7933	    this.opcode('getContext', path.depth);
7934
7935	    this.opcode('pushProgram', program);
7936	    this.opcode('pushProgram', inverse);
7937
7938	    path.strict = true;
7939	    this.accept(path);
7940
7941	    this.opcode('invokeAmbiguous', name, isBlock);
7942	  },
7943
7944	  simpleSexpr: function simpleSexpr(sexpr) {
7945	    var path = sexpr.path;
7946	    path.strict = true;
7947	    this.accept(path);
7948	    this.opcode('resolvePossibleLambda');
7949	  },
7950
7951	  helperSexpr: function helperSexpr(sexpr, program, inverse) {
7952	    var params = this.setupFullMustacheParams(sexpr, program, inverse),
7953	        path = sexpr.path,
7954	        name = path.parts[0];
7955
7956	    if (this.options.knownHelpers[name]) {
7957	      this.opcode('invokeKnownHelper', params.length, name);
7958	    } else if (this.options.knownHelpersOnly) {
7959	      throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr);
7960	    } else {
7961	      path.strict = true;
7962	      path.falsy = true;
7963
7964	      this.accept(path);
7965	      this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path));
7966	    }
7967	  },
7968
7969	  PathExpression: function PathExpression(path) {
7970	    this.addDepth(path.depth);
7971	    this.opcode('getContext', path.depth);
7972
7973	    var name = path.parts[0],
7974	        scoped = _ast2['default'].helpers.scopedId(path),
7975	        blockParamId = !path.depth && !scoped && this.blockParamIndex(name);
7976
7977	    if (blockParamId) {
7978	      this.opcode('lookupBlockParam', blockParamId, path.parts);
7979	    } else if (!name) {
7980	      // Context reference, i.e. `{{foo .}}` or `{{foo ..}}`
7981	      this.opcode('pushContext');
7982	    } else if (path.data) {
7983	      this.options.data = true;
7984	      this.opcode('lookupData', path.depth, path.parts, path.strict);
7985	    } else {
7986	      this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped);
7987	    }
7988	  },
7989
7990	  StringLiteral: function StringLiteral(string) {
7991	    this.opcode('pushString', string.value);
7992	  },
7993
7994	  NumberLiteral: function NumberLiteral(number) {
7995	    this.opcode('pushLiteral', number.value);
7996	  },
7997
7998	  BooleanLiteral: function BooleanLiteral(bool) {
7999	    this.opcode('pushLiteral', bool.value);
8000	  },
8001
8002	  UndefinedLiteral: function UndefinedLiteral() {
8003	    this.opcode('pushLiteral', 'undefined');
8004	  },
8005
8006	  NullLiteral: function NullLiteral() {
8007	    this.opcode('pushLiteral', 'null');
8008	  },
8009
8010	  Hash: function Hash(hash) {
8011	    var pairs = hash.pairs,
8012	        i = 0,
8013	        l = pairs.length;
8014
8015	    this.opcode('pushHash');
8016
8017	    for (; i < l; i++) {
8018	      this.pushParam(pairs[i].value);
8019	    }
8020	    while (i--) {
8021	      this.opcode('assignToHash', pairs[i].key);
8022	    }
8023	    this.opcode('popHash');
8024	  },
8025
8026	  // HELPERS
8027	  opcode: function opcode(name) {
8028	    this.opcodes.push({ opcode: name, args: slice.call(arguments, 1), loc: this.sourceNode[0].loc });
8029	  },
8030
8031	  addDepth: function addDepth(depth) {
8032	    if (!depth) {
8033	      return;
8034	    }
8035
8036	    this.useDepths = true;
8037	  },
8038
8039	  classifySexpr: function classifySexpr(sexpr) {
8040	    var isSimple = _ast2['default'].helpers.simpleId(sexpr.path);
8041
8042	    var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]);
8043
8044	    // a mustache is an eligible helper if:
8045	    // * its id is simple (a single part, not `this` or `..`)
8046	    var isHelper = !isBlockParam && _ast2['default'].helpers.helperExpression(sexpr);
8047
8048	    // if a mustache is an eligible helper but not a definite
8049	    // helper, it is ambiguous, and will be resolved in a later
8050	    // pass or at runtime.
8051	    var isEligible = !isBlockParam && (isHelper || isSimple);
8052
8053	    // if ambiguous, we can possibly resolve the ambiguity now
8054	    // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc.
8055	    if (isEligible && !isHelper) {
8056	      var _name
vendor: 4,602 bytes, lines 8056-8213
80562 = sexpr.path.parts[0],
8057	          options = this.options;
8058
8059	      if (options.knownHelpers[_name2]) {
8060	        isHelper = true;
8061	      } else if (options.knownHelpersOnly) {
8062	        isEligible = false;
8063	      }
8064	    }
8065
8066	    if (isHelper) {
8067	      return 'helper';
8068	    } else if (isEligible) {
8069	      return 'ambiguous';
8070	    } else {
8071	      return 'simple';
8072	    }
8073	  },
8074
8075	  pushParams: function pushParams(params) {
8076	    for (var i = 0, l = params.length; i < l; i++) {
8077	      this.pushParam(params[i]);
8078	    }
8079	  },
8080
8081	  pushParam: function pushParam(val) {
8082	    var value = val.value != null ? val.value : val.original || '';
8083
8084	    if (this.stringParams) {
8085	      if (value.replace) {
8086	        value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.');
8087	      }
8088
8089	      if (val.depth) {
8090	        this.addDepth(val.depth);
8091	      }
8092	      this.opcode('getContext', val.depth || 0);
8093	      this.opcode('pushStringParam', value, val.type);
8094
8095	      if (val.type === 'SubExpression') {
8096	        // SubExpressions get evaluated and passed in
8097	        // in string params mode.
8098	        this.accept(val);
8099	      }
8100	    } else {
8101	      if (this.trackIds) {
8102	        var blockParamIndex = undefined;
8103	        if (val.parts && !_ast2['default'].helpers.scopedId(val) && !val.depth) {
8104	          blockParamIndex = this.blockParamIndex(val.parts[0]);
8105	        }
8106	        if (blockParamIndex) {
8107	          var blockParamChild = val.parts.slice(1).join('.');
8108	          this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild);
8109	        } else {
8110	          value = val.original || value;
8111	          if (value.replace) {
8112	            value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, '');
8113	          }
8114
8115	          this.opcode('pushId', val.type, value);
8116	        }
8117	      }
8118	      this.accept(val);
8119	    }
8120	  },
8121
8122	  setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) {
8123	    var params = sexpr.params;
8124	    this.pushParams(params);
8125
8126	    this.opcode('pushProgram', program);
8127	    this.opcode('pushProgram', inverse);
8128
8129	    if (sexpr.hash) {
8130	      this.accept(sexpr.hash);
8131	    } else {
8132	      this.opcode('emptyHash', omitEmpty);
8133	    }
8134
8135	    return params;
8136	  },
8137
8138	  blockParamIndex: function blockParamIndex(name) {
8139	    for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) {
8140	      var blockParams = this.options.blockParams[depth],
8141	          param = blockParams && _utils.indexOf(blockParams, name);
8142	      if (blockParams && param >= 0) {
8143	        return [depth, param];
8144	      }
8145	    }
8146	  }
8147	};
8148
8149	function precompile(input, options, env) {
8150	  if (input == null || typeof input !== 'string' && input.type !== 'Program') {
8151	    throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input);
8152	  }
8153
8154	  options = options || {};
8155	  if (!('data' in options)) {
8156	    options.data = true;
8157	  }
8158	  if (options.compat) {
8159	    options.useDepths = true;
8160	  }
8161
8162	  var ast = env.parse(input, options),
8163	      environment = new env.Compiler().compile(ast, options);
8164	  return new env.JavaScriptCompiler().compile(environment, options);
8165	}
8166
8167	function compile(input, options, env) {
8168	  if (options === undefined) options = {};
8169
8170	  if (input == null || typeof input !== 'string' && input.type !== 'Program') {
8171	    throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input);
8172	  }
8173
8174	  options = _utils.extend({}, options);
8175	  if (!('data' in options)) {
8176	    options.data = true;
8177	  }
8178	  if (options.compat) {
8179	    options.useDepths = true;
8180	  }
8181
8182	  var compiled = undefined;
8183
8184	  function compileInput() {
8185	    var ast = env.parse(input, options),
8186	        environment = new env.Compiler().compile(ast, options),
8187	        templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true);
8188	    return env.template(templateSpec);
8189	  }
8190
8191	  // Template is only compiled on first use and cached after that point.
8192	  function ret(context, execOptions) {
8193	    if (!compiled) {
8194	      compiled = compileInput();
8195	    }
8196	    return compiled.call(this, context, execOptions);
8197	  }
8198	  ret._setup = function (setupOptions) {
8199	    if (!compiled) {
8200	      compiled = compileInput();
8201	    }
8202	    return compiled._setup(setupOptions);
8203	  };
8204	  ret._child = function (i, data, blockParams, depths) {
8205	    if (!compiled) {
8206	      compiled = compileInput();
8207	    }
8208	    return compiled._child(i, data, blockParams, depths);
8209	  };
8210	  return ret;
8211	}
8212
8213	function argEquals(a, b) {
vendor: 8,012 bytes, lines 8214-8480
8214	  if (a === b) {
8215	    return true;
8216	  }
8217
8218	  if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) {
8219	    for (var i = 0; i < a.length; i++) {
8220	      if (!argEquals(a[i], b[i])) {
8221	        return false;
8222	      }
8223	    }
8224	    return true;
8225	  }
8226	}
8227
8228	function transformLiteralToPath(sexpr) {
8229	  if (!sexpr.path.parts) {
8230	    var literal = sexpr.path;
8231	    // Casting to string here to make false and 0 literal values play nicely with the rest
8232	    // of the system.
8233	    sexpr.path = {
8234	      type: 'PathExpression',
8235	      data: false,
8236	      depth: 0,
8237	      parts: [literal.original + ''],
8238	      original: literal.original + '',
8239	      loc: literal.loc
8240	    };
8241	  }
8242	}
8243
8244/***/ }),
8245/* 42 */
8246/***/ (function(module, exports, __webpack_require__) {
8247
8248	'use strict';
8249
8250	var _interopRequireDefault = __webpack_require__(1)['default'];
8251
8252	exports.__esModule = true;
8253
8254	var _base = __webpack_require__(4);
8255
8256	var _exception = __webpack_require__(6);
8257
8258	var _exception2 = _interopRequireDefault(_exception);
8259
8260	var _utils = __webpack_require__(5);
8261
8262	var _codeGen = __webpack_require__(43);
8263
8264	var _codeGen2 = _interopRequireDefault(_codeGen);
8265
8266	function Literal(value) {
8267	  this.value = value;
8268	}
8269
8270	function JavaScriptCompiler() {}
8271
8272	JavaScriptCompiler.prototype = {
8273	  // PUBLIC API: You can override these methods in a subclass to provide
8274	  // alternative compiled forms for name lookup and buffering semantics
8275	  nameLookup: function nameLookup(parent, name /* , type*/) {
8276	    if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {
8277	      return [parent, '.', name];
8278	    } else {
8279	      return [parent, '[', JSON.stringify(name), ']'];
8280	    }
8281	  },
8282	  depthedLookup: function depthedLookup(name) {
8283	    return [this.aliasable('container.lookup'), '(depths, "', name, '")'];
8284	  },
8285
8286	  compilerInfo: function compilerInfo() {
8287	    var revision = _base.COMPILER_REVISION,
8288	        versions = _base.REVISION_CHANGES[revision];
8289	    return [revision, versions];
8290	  },
8291
8292	  appendToBuffer: function appendToBuffer(source, location, explicit) {
8293	    // Force a source as this simplifies the merge logic.
8294	    if (!_utils.isArray(source)) {
8295	      source = [source];
8296	    }
8297	    source = this.source.wrap(source, location);
8298
8299	    if (this.environment.isSimple) {
8300	      return ['return ', source, ';'];
8301	    } else if (explicit) {
8302	      // This is a case where the buffer operation occurs as a child of another
8303	      // construct, generally braces. We have to explicitly output these buffer
8304	      // operations to ensure that the emitted code goes in the correct location.
8305	      return ['buffer += ', source, ';'];
8306	    } else {
8307	      source.appendToBuffer = true;
8308	      return source;
8309	    }
8310	  },
8311
8312	  initializeBuffer: function initializeBuffer() {
8313	    return this.quotedString('');
8314	  },
8315	  // END PUBLIC API
8316
8317	  compile: function compile(environment, options, context, asObject) {
8318	    this.environment = environment;
8319	    this.options = options;
8320	    this.stringParams = this.options.stringParams;
8321	    this.trackIds = this.options.trackIds;
8322	    this.precompile = !asObject;
8323
8324	    this.name = this.environment.name;
8325	    this.isChild = !!context;
8326	    this.context = context || {
8327	      decorators: [],
8328	      programs: [],
8329	      environments: []
8330	    };
8331
8332	    this.preamble();
8333
8334	    this.stackSlot = 0;
8335	    this.stackVars = [];
8336	    this.aliases = {};
8337	    this.registers = { list: [] };
8338	    this.hashes = [];
8339	    this.compileStack = [];
8340	    this.inlineStack = [];
8341	    this.blockParams = [];
8342
8343	    this.compileChildren(environment, options);
8344
8345	    this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat;
8346	    this.useBlockParams = this.useBlockParams || environment.useBlockParams;
8347
8348	    var opcodes = environment.opcodes,
8349	        opcode = undefined,
8350	        firstLoc = undefined,
8351	        i = undefined,
8352	        l = undefined;
8353
8354	    for (i = 0, l = opcodes.length; i < l; i++) {
8355	      opcode = opcodes[i];
8356
8357	      this.source.currentLocation = opcode.loc;
8358	      firstLoc = firstLoc || opcode.loc;
8359	      this[opcode.opcode].apply(this, opcode.args);
8360	    }
8361
8362	    // Flush any trailing content that might be pending.
8363	    this.source.currentLocation = firstLoc;
8364	    this.pushSource('');
8365
8366	    /* istanbul ignore next */
8367	    if (this.stackSlot || this.inlineStack.length || this.compileStack.length) {
8368	      throw new _exception2['default']('Compile completed with content left on stack');
8369	    }
8370
8371	    if (!this.decorators.isEmpty()) {
8372	      this.useDecorators = true;
8373
8374	      this.decorators.prepend('var decorators = container.decorators;\n');
8375	      this.decorators.push('return fn;');
8376
8377	      if (asObject) {
8378	        this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]);
8379	      } else {
8380	        this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n');
8381	        this.decorators.push('}\n');
8382	        this.decorators = this.decorators.merge();
8383	      }
8384	    } else {
8385	      this.decorators = undefined;
8386	    }
8387
8388	    var fn = this.createFunctionContext(asObject);
8389	    if (!this.isChild) {
8390	      var ret = {
8391	        compiler: this.compilerInfo(),
8392	        main: fn
8393	      };
8394
8395	      if (this.decorators) {
8396	        ret.main_d = this.decorators; // eslint-disable-line camelcase
8397	        ret.useDecorators = true;
8398	      }
8399
8400	      var _context = this.context;
8401	      var programs = _context.programs;
8402	      var decorators = _context.decorators;
8403
8404	      for (i = 0, l = programs.length; i < l; i++) {
8405	        if (programs[i]) {
8406	          ret[i] = programs[i];
8407	          if (decorators[i]) {
8408	            ret[i + '_d'] = decorators[i];
8409	            ret.useDecorators = true;
8410	          }
8411	        }
8412	      }
8413
8414	      if (this.environment.usePartial) {
8415	        ret.usePartial = true;
8416	      }
8417	      if (this.options.data) {
8418	        ret.useData = true;
8419	      }
8420	      if (this.useDepths) {
8421	        ret.useDepths = true;
8422	      }
8423	      if (this.useBlockParams) {
8424	        ret.useBlockParams = true;
8425	      }
8426	      if (this.options.compat) {
8427	        ret.compat = true;
8428	      }
8429
8430	      if (!asObject) {
8431	        ret.compiler = JSON.stringify(ret.compiler);
8432
8433	        this.source.currentLocation = { start: { line: 1, column: 0 } };
8434	        ret = this.objectLiteral(ret);
8435
8436	        if (options.srcName) {
8437	          ret = ret.toStringWithSourceMap({ file: options.destName });
8438	          ret.map = ret.map && ret.map.toString();
8439	        } else {
8440	          ret = ret.toString();
8441	        }
8442	      } else {
8443	        ret.compilerOptions = this.options;
8444	      }
8445
8446	      return ret;
8447	    } else {
8448	      return fn;
8449	    }
8450	  },
8451
8452	  preamble: function preamble() {
8453	    // track the last context pushed into place to allow skipping the
8454	    // getContext opcode when it would be a noop
8455	    this.lastContext = 0;
8456	    this.source = new _codeGen2['default'](this.options.srcName);
8457	    this.decorators = new _codeGen2['default'](this.options.srcName);
8458	  },
8459
8460	  createFunctionContext: function createFunctionContext(asObject) {
8461	    var varDeclarations = '';
8462
8463	    var locals = this.stackVars.concat(this.registers.list);
8464	    if (locals.length > 0) {
8465	      varDeclarations += ', ' + locals.join(', ');
8466	    }
8467
8468	    // Generate minimizer alias mappings
8469	    //
8470	    // When using true SourceNodes, this will update all references to the given alias
8471	    // as the source nodes are reused in situ. For the non-source node compilation mode,
8472	    // aliases will not be used, but this case is already being run on the client and
8473	    // we aren't concern about minimizing the template size.
8474	    var aliasCount = 0;
8475	    for (var alias in this.aliases) {
8476	      // eslint-disable-line guard-for-in
8477	      var node = this.aliases[alias];
8478
8479	      if (this.aliases.hasOwnProperty(alias) && node.children && node.referenceCount > 1) {
8480	        varDeclarations += ', alias' + ++aliasCount + '=' + alias;
vendor: 4,556 bytes, lines 8481-8630
8481	        node.children[0] = 'alias' + aliasCount;
8482	      }
8483	    }
8484
8485	    var params = ['container', 'depth0', 'helpers', 'partials', 'data'];
8486
8487	    if (this.useBlockParams || this.useDepths) {
8488	      params.push('blockParams');
8489	    }
8490	    if (this.useDepths) {
8491	      params.push('depths');
8492	    }
8493
8494	    // Perform a second pass over the output to merge content when possible
8495	    var source = this.mergeSource(varDeclarations);
8496
8497	    if (asObject) {
8498	      params.push(source);
8499
8500	      return Function.apply(this, params);
8501	    } else {
8502	      return this.source.wrap(['function(', params.join(','), ') {\n  ', source, '}']);
8503	    }
8504	  },
8505	  mergeSource: function mergeSource(varDeclarations) {
8506	    var isSimple = this.environment.isSimple,
8507	        appendOnly = !this.forceBuffer,
8508	        appendFirst = undefined,
8509	        sourceSeen = undefined,
8510	        bufferStart = undefined,
8511	        bufferEnd = undefined;
8512	    this.source.each(function (line) {
8513	      if (line.appendToBuffer) {
8514	        if (bufferStart) {
8515	          line.prepend('  + ');
8516	        } else {
8517	          bufferStart = line;
8518	        }
8519	        bufferEnd = line;
8520	      } else {
8521	        if (bufferStart) {
8522	          if (!sourceSeen) {
8523	            appendFirst = true;
8524	          } else {
8525	            bufferStart.prepend('buffer += ');
8526	          }
8527	          bufferEnd.add(';');
8528	          bufferStart = bufferEnd = undefined;
8529	        }
8530
8531	        sourceSeen = true;
8532	        if (!isSimple) {
8533	          appendOnly = false;
8534	        }
8535	      }
8536	    });
8537
8538	    if (appendOnly) {
8539	      if (bufferStart) {
8540	        bufferStart.prepend('return ');
8541	        bufferEnd.add(';');
8542	      } else if (!sourceSeen) {
8543	        this.source.push('return "";');
8544	      }
8545	    } else {
8546	      varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer());
8547
8548	      if (bufferStart) {
8549	        bufferStart.prepend('return buffer + ');
8550	        bufferEnd.add(';');
8551	      } else {
8552	        this.source.push('return buffer;');
8553	      }
8554	    }
8555
8556	    if (varDeclarations) {
8557	      this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n'));
8558	    }
8559
8560	    return this.source.merge();
8561	  },
8562
8563	  // [blockValue]
8564	  //
8565	  // On stack, before: hash, inverse, program, value
8566	  // On stack, after: return value of blockHelperMissing
8567	  //
8568	  // The purpose of this opcode is to take a block of the form
8569	  // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and
8570	  // replace it on the stack with the result of properly
8571	  // invoking blockHelperMissing.
8572	  blockValue: function blockValue(name) {
8573	    var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'),
8574	        params = [this.contextName(0)];
8575	    this.setupHelperArgs(name, 0, params);
8576
8577	    var blockName = this.popStack();
8578	    params.splice(1, 0, blockName);
8579
8580	    this.push(this.source.functionCall(blockHelperMissing, 'call', params));
8581	  },
8582
8583	  // [ambiguousBlockValue]
8584	  //
8585	  // On stack, before: hash, inverse, program, value
8586	  // Compiler value, before: lastHelper=value of last found helper, if any
8587	  // On stack, after, if no lastHelper: same as [blockValue]
8588	  // On stack, after, if lastHelper: value
8589	  ambiguousBlockValue: function ambiguousBlockValue() {
8590	    // We're being a bit cheeky and reusing the options value from the prior exec
8591	    var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'),
8592	        params = [this.contextName(0)];
8593	    this.setupHelperArgs('', 0, params, true);
8594
8595	    this.flushInline();
8596
8597	    var current = this.topStack();
8598	    params.splice(1, 0, current);
8599
8600	    this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']);
8601	  },
8602
8603	  // [appendContent]
8604	  //
8605	  // On stack, before: ...
8606	  // On stack, after: ...
8607	  //
8608	  // Appends the string value of `content` to the current buffer
8609	  appendContent: function appendContent(content) {
8610	    if (this.pendingContent) {
8611	      content = this.pendingContent + content;
8612	    } else {
8613	      this.pendingLocation = this.source.currentLocation;
8614	    }
8615
8616	    this.pendingContent = content;
8617	  },
8618
8619	  // [append]
8620	  //
8621	  // On stack, before: value, ...
8622	  // On stack, after: ...
8623	  //
8624	  // Coerces `value` to a String and appends it to the current buffer.
8625	  //
8626	  // If `value` is truthy, or 0, it is coerced into a string and appended
8627	  // Otherwise, the empty string is appended
8628	  append: function append() {
8629	    if (this.isInline()) {
8630	      this.replaceStack(function (current) {
vendor: 5,813 bytes, lines 8631-8823
8631	        return [' != null ? ', current, ' : ""'];
8632	      });
8633
8634	      this.pushSource(this.appendToBuffer(this.popStack()));
8635	    } else {
8636	      var local = this.popStack();
8637	      this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']);
8638	      if (this.environment.isSimple) {
8639	        this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']);
8640	      }
8641	    }
8642	  },
8643
8644	  // [appendEscaped]
8645	  //
8646	  // On stack, before: value, ...
8647	  // On stack, after: ...
8648	  //
8649	  // Escape `value` and append it to the buffer
8650	  appendEscaped: function appendEscaped() {
8651	    this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')']));
8652	  },
8653
8654	  // [getContext]
8655	  //
8656	  // On stack, before: ...
8657	  // On stack, after: ...
8658	  // Compiler value, after: lastContext=depth
8659	  //
8660	  // Set the value of the `lastContext` compiler value to the depth
8661	  getContext: function getContext(depth) {
8662	    this.lastContext = depth;
8663	  },
8664
8665	  // [pushContext]
8666	  //
8667	  // On stack, before: ...
8668	  // On stack, after: currentContext, ...
8669	  //
8670	  // Pushes the value of the current context onto the stack.
8671	  pushContext: function pushContext() {
8672	    this.pushStackLiteral(this.contextName(this.lastContext));
8673	  },
8674
8675	  // [lookupOnContext]
8676	  //
8677	  // On stack, before: ...
8678	  // On stack, after: currentContext[name], ...
8679	  //
8680	  // Looks up the value of `name` on the current context and pushes
8681	  // it onto the stack.
8682	  lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) {
8683	    var i = 0;
8684
8685	    if (!scoped && this.options.compat && !this.lastContext) {
8686	      // The depthed query is expected to handle the undefined logic for the root level that
8687	      // is implemented below, so we evaluate that directly in compat mode
8688	      this.push(this.depthedLookup(parts[i++]));
8689	    } else {
8690	      this.pushContext();
8691	    }
8692
8693	    this.resolvePath('context', parts, i, falsy, strict);
8694	  },
8695
8696	  // [lookupBlockParam]
8697	  //
8698	  // On stack, before: ...
8699	  // On stack, after: blockParam[name], ...
8700	  //
8701	  // Looks up the value of `parts` on the given block param and pushes
8702	  // it onto the stack.
8703	  lookupBlockParam: function lookupBlockParam(blockParamId, parts) {
8704	    this.useBlockParams = true;
8705
8706	    this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']);
8707	    this.resolvePath('context', parts, 1);
8708	  },
8709
8710	  // [lookupData]
8711	  //
8712	  // On stack, before: ...
8713	  // On stack, after: data, ...
8714	  //
8715	  // Push the data lookup operator
8716	  lookupData: function lookupData(depth, parts, strict) {
8717	    if (!depth) {
8718	      this.pushStackLiteral('data');
8719	    } else {
8720	      this.pushStackLiteral('container.data(data, ' + depth + ')');
8721	    }
8722
8723	    this.resolvePath('data', parts, 0, true, strict);
8724	  },
8725
8726	  resolvePath: function resolvePath(type, parts, i, falsy, strict) {
8727	    // istanbul ignore next
8728
8729	    var _this = this;
8730
8731	    if (this.options.strict || this.options.assumeObjects) {
8732	      this.push(strictLookup(this.options.strict && strict, this, parts, type));
8733	      return;
8734	    }
8735
8736	    var len = parts.length;
8737	    for (; i < len; i++) {
8738	      /* eslint-disable no-loop-func */
8739	      this.replaceStack(function (current) {
8740	        var lookup = _this.nameLookup(current, parts[i], type);
8741	        // We want to ensure that zero and false are handled properly if the context (falsy flag)
8742	        // needs to have the special handling for these values.
8743	        if (!falsy) {
8744	          return [' != null ? ', lookup, ' : ', current];
8745	        } else {
8746	          // Otherwise we can use generic falsy handling
8747	          return [' && ', lookup];
8748	        }
8749	      });
8750	      /* eslint-enable no-loop-func */
8751	    }
8752	  },
8753
8754	  // [resolvePossibleLambda]
8755	  //
8756	  // On stack, before: value, ...
8757	  // On stack, after: resolved value, ...
8758	  //
8759	  // If the `value` is a lambda, replace it on the stack by
8760	  // the return value of the lambda
8761	  resolvePossibleLambda: function resolvePossibleLambda() {
8762	    this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']);
8763	  },
8764
8765	  // [pushStringParam]
8766	  //
8767	  // On stack, before: ...
8768	  // On stack, after: string, currentContext, ...
8769	  //
8770	  // This opcode is designed for use in string mode, which
8771	  // provides the string value of a parameter along with its
8772	  // depth rather than resolving it immediately.
8773	  pushStringParam: function pushStringParam(string, type) {
8774	    this.pushContext();
8775	    this.pushString(type);
8776
8777	    // If it's a subexpression, the string result
8778	    // will be pushed after this opcode.
8779	    if (type !== 'SubExpression') {
8780	      if (typeof string === 'string') {
8781	        this.pushString(string);
8782	      } else {
8783	        this.pushStackLiteral(string);
8784	      }
8785	    }
8786	  },
8787
8788	  emptyHash: function emptyHash(omitEmpty) {
8789	    if (this.trackIds) {
8790	      this.push('{}'); // hashIds
8791	    }
8792	    if (this.stringParams) {
8793	      this.push('{}'); // hashContexts
8794	      this.push('{}'); // hashTypes
8795	    }
8796	    this.pushStackLiteral(omitEmpty ? 'undefined' : '{}');
8797	  },
8798	  pushHash: function pushHash() {
8799	    if (this.hash) {
8800	      this.hashes.push(this.hash);
8801	    }
8802	    this.hash = { values: [], types: [], contexts: [], ids: [] };
8803	  },
8804	  popHash: function popHash() {
8805	    var hash = this.hash;
8806	    this.hash = this.hashes.pop();
8807
8808	    if (this.trackIds) {
8809	      this.push(this.objectLiteral(hash.ids));
8810	    }
8811	    if (this.stringParams) {
8812	      this.push(this.objectLiteral(hash.contexts));
8813	      this.push(this.objectLiteral(hash.types));
8814	    }
8815
8816	    this.push(this.objectLiteral(hash.values));
8817	  },
8818
8819	  // [pushString]
8820	  //
8821	  // On stack, before: ...
8822	  // On stack, after: quotedString(string), ...
8823	  //
8824	  // Push a quoted version of `string` onto the stack
8825	  pushString: function pushString(string) {
8826	    this.pushStackLiteral(this.quotedString(string));
8827	  },
8828
8829	  // [pushLiteral]
8830	  //
8831	  // On stack, before: ...
8832	  // On stack, after: value, ...
8833	  //
8834	  // Pushes a value onto the stack. This operation prevents
8835	  // the compiler from creating a temporary variable to hold
8836	  // it.
8837	  pushLiteral: function pushLiteral(value) {
8838	    this.pushStackLiteral(value);
8839	  },
8840
8841	  // [pushProgram]
8842	  //
8843	  // On stack, before: ...
8844	  // On stack, after: program(guid), ...
8845	  //
8846	  // Push a program expression onto the stack. This takes
8847	  // a compile-time guid and converts it into a runtime-accessible
8848	  // expression.
8849	  pushProgram: function pushProgram(guid) {
8850	    if (guid != null) {
8851	      this.pushStackLiteral(this.programExpression(guid));
8852	    } else {
8853	      this.pushStackLiteral(null);
8854	    }
8855	  },
8856
8857	  // [registerDecorator]
8858	  //
8859	  // On stack, before: hash, program, params..., ...
8860	  // On stack, after: ...
8861	  //
8862	  // Pops off the decorator's parameters, invokes the decorator,
8863	  // and inserts the decorator into the decorators list.
8864	  registerDecorator: function registerDecorator(paramSize, name) {
8865	    var foundDecorator = this.nameLookup('decorators', name, 'decorator'),
8866	        options = this.setupHelperArgs(name, paramSize);
8867
8868	    this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']);
8869	  },
8870
8871	  // [invokeHelper]
8872	  //
8873	  // On stack, before: hash, inverse, program, params..., ...
8874	  // On stack, after: result of helper invocation
8875	  //
8876	  // Pops off the helper's parameters, invokes the helper,
8877	  // and pushes the helper's return value onto the stack.
8878	  //
8879	  // If the helper is not found, `helperMissing` is called.
8880	  invokeHelper: function invokeHelper(paramSize, name, isSimple) {
8881	    var nonHelper = this.popStack(),
8882	        helper = this.setupHelper(paramSize, name),
8883	        simple = isSimple ? [helper.name, ' || '] : '';
8884
8885	    var lookup = ['('].concat(simple, nonHelper);
8886	    if (!this.options.strict) {
8887	      lookup.push(' || ', this.aliasable('helpers.helperMissing'));
8888	    }
8889	    lookup.push(')');
8890
8891	    this.push(this.source.functionCall(lookup, 'call', helper.callParams));
8892	  },
8893
8894	  // [invokeKnownHelper]
8895	  //
8896	  // On stack, before: hash, inverse, program, params..., ...
8897	  // On stack, after: result of helper invocation
8898	  //
8899	  // This operation is used when the helper is known to exist,
8900	  // so a `helperMissing` fallback is not required.
8901	  invokeKnownHelper: function invokeKnownHelper(paramSize, name) {
8902	    var helper = this.setupHelper(paramSize, name);
8903	    this.push(this.source.functionCall(helper.name, 'call', helper.callParams));
8904	  },
8905
8906	  // [invokeAmbiguous]
8907	  //
8908	  // On stack, before: hash, inverse, program, params..., ...
8909	  // On stack, after: result of disambiguation
8910	  //
8911	  // This operation is used when an expression like `{{foo}}`
8912	  // is provided, but we don't know at compile-time whether it
8913	  // is a helper or a path.
8914	  //
8915	  // This operation emits more code than the other options,
8916	  // and can be avoided by passing the `knownHelpers` and
8917	  // `knownHelpersOnly` flags at compile-time.
8918	  invokeAmbiguous: function invokeAmbiguous(name, helperCall) {
8919	    this.useRegister('helper');
8920
8921	    var nonHelper = this.popStack();
8922
8923	    this.emptyHash();
8924	    var helper = this.setupHelper(0, name, helperCall);
8925
8926	    var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper');
8927
8928	    var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')'];
8929	    if (!this.options.strict) {
8930	      lookup[0] = '(helper = ';
8931	      lookup.push(' != null ? helper : ', this.aliasable('helper
vendor: 11,305 bytes, lines 8931-9325
8931s.helperMissing'));
8932	    }
8933
8934	    this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']);
8935	  },
8936
8937	  // [invokePartial]
8938	  //
8939	  // On stack, before: context, ...
8940	  // On stack after: result of partial invocation
8941	  //
8942	  // This operation pops off a context, invokes a partial with that context,
8943	  // and pushes the result of the invocation back.
8944	  invokePartial: function invokePartial(isDynamic, name, indent) {
8945	    var params = [],
8946	        options = this.setupParams(name, 1, params);
8947
8948	    if (isDynamic) {
8949	      name = this.popStack();
8950	      delete options.name;
8951	    }
8952
8953	    if (indent) {
8954	      options.indent = JSON.stringify(indent);
8955	    }
8956	    options.helpers = 'helpers';
8957	    options.partials = 'partials';
8958	    options.decorators = 'container.decorators';
8959
8960	    if (!isDynamic) {
8961	      params.unshift(this.nameLookup('partials', name, 'partial'));
8962	    } else {
8963	      params.unshift(name);
8964	    }
8965
8966	    if (this.options.compat) {
8967	      options.depths = 'depths';
8968	    }
8969	    options = this.objectLiteral(options);
8970	    params.push(options);
8971
8972	    this.push(this.source.functionCall('container.invokePartial', '', params));
8973	  },
8974
8975	  // [assignToHash]
8976	  //
8977	  // On stack, before: value, ..., hash, ...
8978	  // On stack, after: ..., hash, ...
8979	  //
8980	  // Pops a value off the stack and assigns it to the current hash
8981	  assignToHash: function assignToHash(key) {
8982	    var value = this.popStack(),
8983	        context = undefined,
8984	        type = undefined,
8985	        id = undefined;
8986
8987	    if (this.trackIds) {
8988	      id = this.popStack();
8989	    }
8990	    if (this.stringParams) {
8991	      type = this.popStack();
8992	      context = this.popStack();
8993	    }
8994
8995	    var hash = this.hash;
8996	    if (context) {
8997	      hash.contexts[key] = context;
8998	    }
8999	    if (type) {
9000	      hash.types[key] = type;
9001	    }
9002	    if (id) {
9003	      hash.ids[key] = id;
9004	    }
9005	    hash.values[key] = value;
9006	  },
9007
9008	  pushId: function pushId(type, name, child) {
9009	    if (type === 'BlockParam') {
9010	      this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : ''));
9011	    } else if (type === 'PathExpression') {
9012	      this.pushString(name);
9013	    } else if (type === 'SubExpression') {
9014	      this.pushStackLiteral('true');
9015	    } else {
9016	      this.pushStackLiteral('null');
9017	    }
9018	  },
9019
9020	  // HELPERS
9021
9022	  compiler: JavaScriptCompiler,
9023
9024	  compileChildren: function compileChildren(environment, options) {
9025	    var children = environment.children,
9026	        child = undefined,
9027	        compiler = undefined;
9028
9029	    for (var i = 0, l = children.length; i < l; i++) {
9030	      child = children[i];
9031	      compiler = new this.compiler(); // eslint-disable-line new-cap
9032
9033	      var existing = this.matchExistingProgram(child);
9034
9035	      if (existing == null) {
9036	        this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children
9037	        var index = this.context.programs.length;
9038	        child.index = index;
9039	        child.name = 'program' + index;
9040	        this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);
9041	        this.context.decorators[index] = compiler.decorators;
9042	        this.context.environments[index] = child;
9043
9044	        this.useDepths = this.useDepths || compiler.useDepths;
9045	        this.useBlockParams = this.useBlockParams || compiler.useBlockParams;
9046	        child.useDepths = this.useDepths;
9047	        child.useBlockParams = this.useBlockParams;
9048	      } else {
9049	        child.index = existing.index;
9050	        child.name = 'program' + existing.index;
9051
9052	        this.useDepths = this.useDepths || existing.useDepths;
9053	        this.useBlockParams = this.useBlockParams || existing.useBlockParams;
9054	      }
9055	    }
9056	  },
9057	  matchExistingProgram: function matchExistingProgram(child) {
9058	    for (var i = 0, len = this.context.environments.length; i < len; i++) {
9059	      var environment = this.context.environments[i];
9060	      if (environment && environment.equals(child)) {
9061	        return environment;
9062	      }
9063	    }
9064	  },
9065
9066	  programExpression: function programExpression(guid) {
9067	    var child = this.environment.children[guid],
9068	        programParams = [child.index, 'data', child.blockParams];
9069
9070	    if (this.useBlockParams || this.useDepths) {
9071	      programParams.push('blockParams');
9072	    }
9073	    if (this.useDepths) {
9074	      programParams.push('depths');
9075	    }
9076
9077	    return 'container.program(' + programParams.join(', ') + ')';
9078	  },
9079
9080	  useRegister: function useRegister(name) {
9081	    if (!this.registers[name]) {
9082	      this.registers[name] = true;
9083	      this.registers.list.push(name);
9084	    }
9085	  },
9086
9087	  push: function push(expr) {
9088	    if (!(expr instanceof Literal)) {
9089	      expr = this.source.wrap(expr);
9090	    }
9091
9092	    this.inlineStack.push(expr);
9093	    return expr;
9094	  },
9095
9096	  pushStackLiteral: function pushStackLiteral(item) {
9097	    this.push(new Literal(item));
9098	  },
9099
9100	  pushSource: function pushSource(source) {
9101	    if (this.pendingContent) {
9102	      this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation));
9103	      this.pendingContent = undefined;
9104	    }
9105
9106	    if (source) {
9107	      this.source.push(source);
9108	    }
9109	  },
9110
9111	  replaceStack: function replaceStack(callback) {
9112	    var prefix = ['('],
9113	        stack = undefined,
9114	        createdStack = undefined,
9115	        usedLiteral = undefined;
9116
9117	    /* istanbul ignore next */
9118	    if (!this.isInline()) {
9119	      throw new _exception2['default']('replaceStack on non-inline');
9120	    }
9121
9122	    // We want to merge the inline statement into the replacement statement via ','
9123	    var top = this.popStack(true);
9124
9125	    if (top instanceof Literal) {
9126	      // Literals do not need to be inlined
9127	      stack = [top.value];
9128	      prefix = ['(', stack];
9129	      usedLiteral = true;
9130	    } else {
9131	      // Get or create the current stack name for use by the inline
9132	      createdStack = true;
9133	      var _name = this.incrStack();
9134
9135	      prefix = ['((', this.push(_name), ' = ', top, ')'];
9136	      stack = this.topStack();
9137	    }
9138
9139	    var item = callback.call(this, stack);
9140
9141	    if (!usedLiteral) {
9142	      this.popStack();
9143	    }
9144	    if (createdStack) {
9145	      this.stackSlot--;
9146	    }
9147	    this.push(prefix.concat(item, ')'));
9148	  },
9149
9150	  incrStack: function incrStack() {
9151	    this.stackSlot++;
9152	    if (this.stackSlot > this.stackVars.length) {
9153	      this.stackVars.push('stack' + this.stackSlot);
9154	    }
9155	    return this.topStackName();
9156	  },
9157	  topStackName: function topStackName() {
9158	    return 'stack' + this.stackSlot;
9159	  },
9160	  flushInline: function flushInline() {
9161	    var inlineStack = this.inlineStack;
9162	    this.inlineStack = [];
9163	    for (var i = 0, len = inlineStack.length; i < len; i++) {
9164	      var entry = inlineStack[i];
9165	      /* istanbul ignore if */
9166	      if (entry instanceof Literal) {
9167	        this.compileStack.push(entry);
9168	      } else {
9169	        var stack = this.incrStack();
9170	        this.pushSource([stack, ' = ', entry, ';']);
9171	        this.compileStack.push(stack);
9172	      }
9173	    }
9174	  },
9175	  isInline: function isInline() {
9176	    return this.inlineStack.length;
9177	  },
9178
9179	  popStack: function popStack(wrapped) {
9180	    var inline = this.isInline(),
9181	        item = (inline ? this.inlineStack : this.compileStack).pop();
9182
9183	    if (!wrapped && item instanceof Literal) {
9184	      return item.value;
9185	    } else {
9186	      if (!inline) {
9187	        /* istanbul ignore next */
9188	        if (!this.stackSlot) {
9189	          throw new _exception2['default']('Invalid stack pop');
9190	        }
9191	        this.stackSlot--;
9192	      }
9193	      return item;
9194	    }
9195	  },
9196
9197	  topStack: function topStack() {
9198	    var stack = this.isInline() ? this.inlineStack : this.compileStack,
9199	        item = stack[stack.length - 1];
9200
9201	    /* istanbul ignore if */
9202	    if (item instanceof Literal) {
9203	      return item.value;
9204	    } else {
9205	      return item;
9206	    }
9207	  },
9208
9209	  contextName: function contextName(context) {
9210	    if (this.useDepths && context) {
9211	      return 'depths[' + context + ']';
9212	    } else {
9213	      return 'depth' + context;
9214	    }
9215	  },
9216
9217	  quotedString: function quotedString(str) {
9218	    return this.source.quotedString(str);
9219	  },
9220
9221	  objectLiteral: function objectLiteral(obj) {
9222	    return this.source.objectLiteral(obj);
9223	  },
9224
9225	  aliasable: function aliasable(name) {
9226	    var ret = this.aliases[name];
9227	    if (ret) {
9228	      ret.referenceCount++;
9229	      return ret;
9230	    }
9231
9232	    ret = this.aliases[name] = this.source.wrap(name);
9233	    ret.aliasable = true;
9234	    ret.referenceCount = 1;
9235
9236	    return ret;
9237	  },
9238
9239	  setupHelper: function setupHelper(paramSize, name, blockHelper) {
9240	    var params = [],
9241	        paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper);
9242	    var foundHelper = this.nameLookup('helpers', name, 'helper'),
9243	        callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : (container.nullContext || {})');
9244
9245	    return {
9246	      params: params,
9247	      paramsInit: paramsInit,
9248	      name: foundHelper,
9249	      callParams: [callContext].concat(params)
9250	    };
9251	  },
9252
9253	  setupParams: function setupParams(helper, paramSize, params) {
9254	    var options = {},
9255	        contexts = [],
9256	        types = [],
9257	        ids = [],
9258	        objectArgs = !params,
9259	        param = undefined;
9260
9261	    if (objectArgs) {
9262	      params = [];
9263	    }
9264
9265	    options.name = this.quotedString(helper);
9266	    options.hash = this.popStack();
9267
9268	    if (this.trackIds) {
9269	      options.hashIds = this.popStack();
9270	    }
9271	    if (this.stringParams) {
9272	      options.hashTypes = this.popStack();
9273	      options.hashContexts = this.popStack();
9274	    }
9275
9276	    var inverse = this.popStack(),
9277	        program = this.popStack();
9278
9279	    // Avoid setting fn and inverse if neither are set. This allows
9280	    // helpers to do a check for `if (options.fn)`
9281	    if (program || inverse) {
9282	      options.fn = program || 'container.noop';
9283	      options.inverse = inverse || 'container.noop';
9284	    }
9285
9286	    // The parameters go on to the stack in order (making sure that they are evaluated in order)
9287	    // so we need to pop them off the stack in reverse order
9288	    var i = paramSize;
9289	    while (i--) {
9290	      param = this.popStack();
9291	      params[i] = param;
9292
9293	      if (this.trackIds) {
9294	        ids[i] = this.popStack();
9295	      }
9296	      if (this.stringParams) {
9297	        types[i] = this.popStack();
9298	        contexts[i] = this.popStack();
9299	      }
9300	    }
9301
9302	    if (objectArgs) {
9303	      options.args = this.source.generateArray(params);
9304	    }
9305
9306	    if (this.trackIds) {
9307	      options.ids = this.source.generateArray(ids);
9308	    }
9309	    if (this.stringParams) {
9310	      options.types = this.source.generateArray(types);
9311	      options.contexts = this.source.generateArray(contexts);
9312	    }
9313
9314	    if (this.options.data) {
9315	      options.data = 'data';
9316	    }
9317	    if (this.useBlockParams) {
9318	      options.blockParams = 'blockParams';
9319	    }
9320	    return options;
9321	  },
9322
9323	  setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) {
9324	    var options = this.setupParams(helper, paramSize, params);
9325	    options
vendor: 1,005 bytes, lines 9325-9348
9325 = this.objectLiteral(options);
9326	    if (useRegister) {
9327	      this.useRegister('options');
9328	      params.push('options');
9329	      return ['options=', options];
9330	    } else if (params) {
9331	      params.push(options);
9332	      return '';
9333	    } else {
9334	      return options;
9335	    }
9336	  }
9337	};
9338
9339	(function () {
9340	  var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' ');
9341
9342	  var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
9343
9344	  for (var i = 0, l = reservedWords.length; i < l; i++) {
9345	    compilerWords[reservedWords[i]] = true;
9346	  }
9347	})();
9348
vendor: 4,122 bytes, lines 9349-9500
9349	JavaScriptCompiler.isValidJavaScriptVariableName = function (name) {
9350	  return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
9351	};
9352
9353	function strictLookup(requireTerminal, compiler, parts, type) {
9354	  var stack = compiler.popStack(),
9355	      i = 0,
9356	      len = parts.length;
9357	  if (requireTerminal) {
9358	    len--;
9359	  }
9360
9361	  for (; i < len; i++) {
9362	    stack = compiler.nameLookup(stack, parts[i], type);
9363	  }
9364
9365	  if (requireTerminal) {
9366	    return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ')'];
9367	  } else {
9368	    return stack;
9369	  }
9370	}
9371
9372	exports['default'] = JavaScriptCompiler;
9373	module.exports = exports['default'];
9374
9375/***/ }),
9376/* 43 */
9377/***/ (function(module, exports, __webpack_require__) {
9378
9379	/* global define */
9380	'use strict';
9381
9382	exports.__esModule = true;
9383
9384	var _utils = __webpack_require__(5);
9385
9386	var SourceNode = undefined;
9387
9388	try {
9389	  /* istanbul ignore next */
9390	  if (false) {
9391	    // We don't support this in AMD environments. For these environments, we asusme that
9392	    // they are running on the browser and thus have no need for the source-map library.
9393	    var SourceMap = require('source-map');
9394	    SourceNode = SourceMap.SourceNode;
9395	  }
9396	} catch (err) {}
9397	/* NOP */
9398
9399	/* istanbul ignore if: tested but not covered in istanbul due to dist build  */
9400	if (!SourceNode) {
9401	  SourceNode = function (line, column, srcFile, chunks) {
9402	    this.src = '';
9403	    if (chunks) {
9404	      this.add(chunks);
9405	    }
9406	  };
9407	  /* istanbul ignore next */
9408	  SourceNode.prototype = {
9409	    add: function add(chunks) {
9410	      if (_utils.isArray(chunks)) {
9411	        chunks = chunks.join('');
9412	      }
9413	      this.src += chunks;
9414	    },
9415	    prepend: function prepend(chunks) {
9416	      if (_utils.isArray(chunks)) {
9417	        chunks = chunks.join('');
9418	      }
9419	      this.src = chunks + this.src;
9420	    },
9421	    toStringWithSourceMap: function toStringWithSourceMap() {
9422	      return { code: this.toString() };
9423	    },
9424	    toString: function toString() {
9425	      return this.src;
9426	    }
9427	  };
9428	}
9429
9430	function castChunk(chunk, codeGen, loc) {
9431	  if (_utils.isArray(chunk)) {
9432	    var ret = [];
9433
9434	    for (var i = 0, len = chunk.length; i < len; i++) {
9435	      ret.push(codeGen.wrap(chunk[i], loc));
9436	    }
9437	    return ret;
9438	  } else if (typeof chunk === 'boolean' || typeof chunk === 'number') {
9439	    // Handle primitives that the SourceNode will throw up on
9440	    return chunk + '';
9441	  }
9442	  return chunk;
9443	}
9444
9445	function CodeGen(srcFile) {
9446	  this.srcFile = srcFile;
9447	  this.source = [];
9448	}
9449
9450	CodeGen.prototype = {
9451	  isEmpty: function isEmpty() {
9452	    return !this.source.length;
9453	  },
9454	  prepend: function prepend(source, loc) {
9455	    this.source.unshift(this.wrap(source, loc));
9456	  },
9457	  push: function push(source, loc) {
9458	    this.source.push(this.wrap(source, loc));
9459	  },
9460
9461	  merge: function merge() {
9462	    var source = this.empty();
9463	    this.each(function (line) {
9464	      source.add(['  ', line, '\n']);
9465	    });
9466	    return source;
9467	  },
9468
9469	  each: function each(iter) {
9470	    for (var i = 0, len = this.source.length; i < len; i++) {
9471	      iter(this.source[i]);
9472	    }
9473	  },
9474
9475	  empty: function empty() {
9476	    var loc = this.currentLocation || { start: {} };
9477	    return new SourceNode(loc.start.line, loc.start.column, this.srcFile);
9478	  },
9479	  wrap: function wrap(chunk) {
9480	    var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1];
9481
9482	    if (chunk instanceof SourceNode) {
9483	      return chunk;
9484	    }
9485
9486	    chunk = castChunk(chunk, this, loc);
9487
9488	    return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk);
9489	  },
9490
9491	  functionCall: function functionCall(fn, type, params) {
9492	    params = this.generateList(params);
9493	    return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']);
9494	  },
9495
9496	  quotedString: function quotedString(str) {
9497	    return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4
9498	    .replace(/\u2029/g, '\\u2029') + '"';
9499	  },
9500
9501	  objectLiteral: function objectLiteral(obj) {
9502	    var pairs = [];
9503
9504	    for (var key in obj) {
9505	      if (obj.hasOwnProperty(key)) {
9506	        var value = castChunk(obj[key], this);
9507	        if (value !== 'undefined') {
9508	          pairs.push([this.quotedString(key), ':', value]);
9509	        }
9510	      }
9511	    }
9512
9513	    var ret = this.generateList(pairs);
9514	    ret.prepend('{');
9515	    ret.add('}');
9516	    return ret;
9517	  },
9518
9519	  generateList: function generateList(entries) {
9520	    var ret = this.empty();
9521
9522	    for (var i = 0, len = entries.length; i < len; i++) {
9523	      if (i) {
9524	        ret.add(',');
9525	      }
9526
9527	      ret.add(castChunk(entries[i], this));
9528	    }
9529
9530	    return ret;
9531	  },
9532
9533	  generateArray: function generateArray(entries) {
9534	    var ret = this.generateList(entries);
9535	    ret.prepend('[');
9536	    ret.add(']');
9537
9538	    return ret;
9539	  }
9540	};
9541
9542	exports['default'] = CodeGen;
9543	module.exports = exports['default'];
9544
9545/***/ })
9546/******/ ])
9547});
9548;;
9549(function (global, factory) {
9550    if (typeof define === "function" && define.amd) {
9551        define(['exports'], factory);
9552    } else if (typeof exports !== "undefined") {
9553        factory(exports);
9554    } else {
9555        var mod = {
9556            exports: {}
9557        };
9558        factory(mod.exports);
9559        global.bodyScrollLock = mod.exports;
9560    }
9561})(this, function (exports) {
9562    'use strict';
9563
9564    Object.defineProperty(exports, "__esModule", {
9565        value: true
9566    });
9567
9568    function _toConsumableArray(arr) {
9569        if (Array.isArray(arr)) {
9570            for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
9571                arr2[i] = arr[i];
9572            }
9573
9574            return arr2;
9575        } else {
9576            return Array.from(arr);
9577        }
9578    }
9579
9580    // Older browsers don't support event options, feature detect it.
9581
9582    // Adopted and modified solution from Bohdan Didukh (2017)
9583    // https://stackoverflow.com/questions/41594997/ios-10-safari-prevent-scrolling-behind-a-fixed-overlay-and-maintain-scroll-posi
9584
9585    var hasPassiveEvents = false;
9586    if (typeof window !== 'undefined') {
9587        var passiveTestOptions = {
9588            get passive() {
9589                hasPassiveEvents = true;
9590                return undefined;
9591            }
9592        };
9593        window.addEventListener('testPassive', null, passiveTestOptions);
9594        window.removeEventListener('testPassive', null, passiveTestOptions);
9595    }
9596
9597    var isIosDevice = typeof window !== 'undefined' && window.navigator && window.navigator.platform && /iP(ad|hone|od)/.test(window.navigator.platform);
9598
9599
9600    var locks = [];
9601    var documentListenerAdded = false;
9602    var initialClientY = -1;
9603    var previousBodyOverflowSetting = void 0;
9604    var previousBodyPaddingRight = void 0;
9605
9606    // returns true if `el` should be allowed to receive touchmove events
9607    var allowTouchMove = function allowTouchMove(el) {
9608        return locks.some(function (lock) {
9609            if (lock.options.allowTouchMove && lock.options.allowTouchMove(el)) {
9610                return true;
9611            }
9612
9613            return false;
9614        });
9615    };
9616
9617    var preventDefault = function preventDefault(rawEvent) {
9618        var e = rawEvent || window.event;
9619
9620        // For the case whereby consumers adds a touchmove event listener to document.
9621        // Recall that we do document.addEventListener('touchmove', preventDefault, { passive: false })
9622        // in disableBodyScroll - so if we provide this opportunity to allowTouchMove, then
9623        // the touchmove event on document will break.
9624        if (allowTouchMove(e.target)) {
9625            return true;
9626        }
9627
9628        // Do not prevent if the event has more than one touch (usually meaning this is a multi touch gesture like pinch to zoom)
9629        if (e.touches.length > 1) return true;
9630
9631        if (e.preventDefault) e.preventDefault();
9632
9633        return false;
9634    };
9635
9636    var setOverflowHidden = function setOverflowHidden(options) {
9637        // Setting overflow on body/documentElement synchronously in Desktop Safari slows down
9638        // the responsiveness for some reason. Setting within a setTimeout fixes this.
9639        setTimeout(function () {
9640            // If previousBodyPaddingRight is already set, don't set it again.
9641            if (previousBodyPaddingRight === undefined) {
9642                var _reserveScrollBarGap = !!options && options.reserveScrollBarGap === true;
9643                var scrollBarGap = window.innerWidth - document.documentElement.clientWidth;
9644
9645                if (_reserveScrollBarGap && scrollBarGap > 0) {
9646                    previousBodyPaddingRight = document.body.style.paddingRight;
9647                    document.body.style.paddingRight = scrollBarGap + 'px';
9648                }
9649            }
9650
9651            // If previousBodyOverflowSetting is already set, don't set it again.
9652            if (previousBodyOverflowSetting === undefined) {
9653                previousBodyOverflowSetting = document.body.style.overflow;
9654                document.body.style.overflow = 'hidden';
9655            }
9656        });
9657    };
9658
9659    var restoreOverflowSetting = function restoreOverflowSetting() {
9660        // Setting overflow on body/documentElement synchronously in Desktop Safari slows down
9661        // the responsiveness for some reason. Setting within a setTimeout fixes this.
9662        setTimeout(function () {
9663            if (previousBodyPaddingRight !== undefined) {
9664                document.body.style.paddingRight = previousBodyPaddingRight;
9665
9666                // Restore previousBodyPaddingRight to undefined so setOverflowHidden knows it
9667                // can be set again.
9668                previousBodyPaddingRight = undefined;
9669            }
9670
9671            if (previousBodyOverflowSetting !== undefined) {
9672                document.body.style.overflow = previousBodyOverflowSetting;
9673
9674                // Restore previousBodyOverflowSetting to undefined
9675                // so setOverflowHidden knows it can be set again.
9676                previousBodyOverflowSetting = undefined;
9677            }
9678        });
9679    };
9680
9681    // https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#Problems_and_solutions
9682    var isTargetElementTotallyScrolled = function isTargetElementTotallyScrolled(targetElement) {
9683        return targetElement ? targetElement.scrollHeight - targetElement.scrollTop <= targetElement.clientHeight : false;
9684    };
9685
9686    var handleScroll = function handleScroll(event, targetElement) {
9687        var clientY = event.targetTouches[0].clientY - initialClientY;
9688
9689        if (allowTouchMove(event.target)) {
9690            return false;
9691        }
9692
9693        if (targetElement && targetElement.scrollTop === 0 && clientY > 0) {
9694            // element is at the top of its scroll
9695            return preventDefault(event);
9696        }
9697
9698        if (isTargetElementTotallyScrolled(targetElement) && clientY < 0) {
9699            // element is at the top of its scroll
9700            return preventDefault(event);
9701        }
9702
9703        event.stopPropagation();
9704        return true;
9705    };
9706
9707    var disableBodyScroll = exports.disableBodyScroll = function disableBodyScroll(targetElement, options) {
9708        if (isIosDevice) {
9709            // targetElement must be provided, and disableBodyScroll must not have been
9710            // called on this targetElement before.
9711            if (!targetElement) {
9712                // eslint-disable-next-line no-console
9713                console.error('disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.');
9714                return;
9715            }
9716
9717            if (targetElement && !locks.some(function (lock) {
9718                return lock.targetElement === targetElement;
9719            })) {
9720                var lock = {
9721                    targetElement: targetElement,
9722                    options: options || {}
9723                };
9724
9725                locks = [].concat(_toConsumableArray(locks), [lock]);
9726
9727                targetElement.ontouchstart = function (event) {
9728                    if (event.targetTouches.length === 1) {
9729                        // detect single touch
9730                        initialClientY = event.targetTouches[0].clientY;
9731                    }
9732                };
9733                targetElement.ontouchmove = function (event) {
9734                    if (event.targetTouches.length === 1) {
9735                        // detect single touch
9736                        handleScroll(event, targetElement);
9737                    }
9738                };
9739
9740                if (!documentListenerAdded) {
9741                    document.addEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);
9742                    documentListenerAdded = true;
9743                }
9744            }
9745        } else {
9746            setOverflowHidden(options);
9747            var _lock = {
9748                targetElement: targetElement,
9749                options: options || {}
9750            };
9751
9752            locks = [].concat(_toConsumableArray(locks), [_lock]);
9753        }
9754    };
9755
9756    var clearAllBodyScrollLocks = exports.clearAllBodyScrollLocks = function clearAllBodyScrollLocks() {
9757        if (isIosDevice) {
9758            // Clear all locks ontouchstart/ontouchmove handlers, and the references
9759            locks.forEach(function (lock) {
9760                lock.targetElement.ontouchstart = null;
9761                lock.targetElement.ontouchmove = null;
9762            });
9763
9764            if (documentListenerAdded) {
9765                document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);
9766                documentListenerAdded = false;
9767            }
9768
9769            locks = [];
9770
9771            // Reset initial clientY
9772            initialClientY = -1;
9773        } else {
9774            restoreOverflowSetting();
9775            locks = [];
9776        }
9777    };
9778
9779    var enableBodyScroll = exports.enableBodyScroll = function enableBodyScroll(targetElement) {
9780        if (isIosDevice) {
9781            if (!targetElement) {
9782                // eslint-disable-next-line no-console
9783                console.error('enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.');
9784                return;
9785            }
9786
9787            targetElement.ontouchstart = null;
9788            targetElement.ontouchmove = null;
9789
9790            locks = locks.filter(function (lock) {
9791                return lock.targetElement !== targetElement;
9792            });
9793
9794            if (documentListenerAdded && locks.length === 0) {
9795                document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);
9796
9797                documentListenerAdded = false;
9798            }
9799        } else if (locks.length === 1 && locks[0].targetElement === targetElement) {
9800            restoreOverflowSetting();
9801
9802            locks = [];
9803        } else {
9804            locks = locks.filter(function (lock) {
9805                return lock.targetElement !== targetElement;
9806            });
9807        }
9808    };
9809});
9810
9811;
9812function initResponsiveDesign () {
9813  var body = jQuery('body');
9814  var layoutPopin = jQuery('.popin-rgpd-layout');
9815
9816  // The height of the layout is resized relative to the height of the body
9817  layoutPopin.height(body.height());
9818
9819}
9820
9821/**
9822 * Modal Management
9823 */
9824(function ($) {
9825
9826  /**
9827   * Valide all services
9828   */
9829  window.validAllServices = function () {
9830    _RGPDManager.validAllServices();
9831    jQuery('#topbar-cookie-container').hide();
9832    location.reload();
9833  };
9834  /**
9835   * Redimension Event
9836   */
9837  $(window).resize(function () {
9838    initResponsiveDesign();
9839    if(!$('#'+idPopinRgpd).hasClass('hide')) {
9840        bodyScrollLock.clearAllBodyScrollLocks();
9841        var targetElement = document.querySelector('#' + idPopinRgpd + ' #popin-container');
9842        bodyScrollLock.disableBodyScroll(targetElement);
9843    }
9844  });
9845
9846/**
9847 * Print RGPD Modal
9848 */
9849  window.openRGPDModal = function (caller) {
9850
9851
9852    $('.infobulles').hide();
9853
9854    caller = $(caller);
9855
9856    //On utilise le template compilé pour la popin
9857    var popin_rgpd = $('#'+idPopinRgpd);
9858    var targetElement = document.querySelector('#'+idPopinRgpd+' #popin-container');
9859    bodyScrollLock.disableBodyScroll(targetElement);
9860    var _rgpdCookie = RGPDCookieManager.getCookie();
9861
9862    var acceptButton = $('.popin-rgpd-layout .popin-rgpd-entete button.accepter');
9863    var refuseButton = $('.popin-rgpd-layout .popin-rgpd-entete button.refuser');
9864
9865    var submitButton = $('.popin-rgpd-layout button[data-action="submit"]');
9866
9867    popin_rgpd.removeClass('hide');
9868    $('html, body').addClass('hasModal');
9869
9870    $('input[id*="cookie--"][type="checkbox"]').prop('checked', false);
9871    if(RGPDCookieManager.issetCookie()) {
9872      jQuery.each(RGPDCookieManager.getCookie().authorizations, function (key, obj) {
9873        if(obj){
9874          $('input[id="cookie--' + key + '"][type="checkbox"]').prop('checked', true);
9875        }
9876      });
9877    }
9878
9879
9880    initResponsiveDesign();
9881
9882    //Click on layout mask outside the modal have to close it
9883    popin_rgpd.on('click', function (e) {
9884      if (e.target !== this) {
9885        return;
9886      }
9887      $(this).find('[data-action="close"]').click();
9888    });
9889
9890    /**
9891     * Event Click to check all box
9892     */
9893    acceptButton.on('click', function (e) {
9894      e.preventDefault();
9895      $('input[id*="cookie--"][type="checkbox"]').prop('checked', true);
9896      submitButton.focus();
9897    });
9898
9899    /**
9900     * Event Click to uncheck all box
9901     */
9902    refuseButton.on('click', function (e) {
9903      e.preventDefault();
9904      $('input[id*="cookie--"][type="checkbox"]').prop('checked', false);
9905      submitButton.focus();
9906    });
9907
9908    /**
9909     * Event Click to develop info bubble
9910     */
9911    $('#'+idPopinRgpd+' button.btn-infobulles').on('click', function (e) {
9912      e.preventDefault();
9913      var infoBubbleId = $(this).data('select-ib');
9914      var infoBubble = $('#' + infoBubbleId);
9915      $('.infobulles:not(#'+infoBubbleId+')').hide();
9916      infoBubble.fadeToggle(200);
9917
9918    });
9919
9920    //Click on popin close button
9921    $('#'+idPopinRgpd+' [data-action="close"]').on('click',function (e) {
9922      e.preventDefault();
9923
9924      popin_rgpd.addClass('hide');
9925      $('html, body').removeClass('hasModal');
9926
9927      //Get back focus on modal open link
9928      caller.focus();
9929
9930      //Deleting repeat event
9931      $('#'+idPopinRgpd+' button.btn-infobulles').off('click');
9932      bodyScrollLock.clearAllBodyScrollLocks();
9933    });
9934
9935    // Fermeture de la popin via le bouton-clavier Echap
9936    $(popin_rgpd).keyup(function(ev){
9937        if(ev.keyCode == 27)
9938            $(this).find('[data-action="close"]').click();
9939    });
9940
9941    //Submission event button popin form
9942    $('#'+idPopinRgpd+' .btn.btn-submit').on('click', function(e) {
9943      e.preventDefault();
9944      _RGPDManager.saveAuthorizations();
9945    });
9946
9947    //RGAA  Focus management
9948    var inputs = popin_rgpd.find('select, input, textarea, button, a').filter(':visible');
9949    var firstInput = inputs.first();
9950    var lastInput = inputs.last();
9951    /*set focus on first input*/
9952    firstInput.focus();
9953
9954    /*redirect last tab to first input*/
9955    lastInput.on('keydown', function (e) {
9956      if ((e.which === 9 && !e.shiftKey)) {
9957        e.preventDefault();
9958        firstInput.focus();
9959      }
9960    });
9961
9962    /*redirect first shift+tab to last input*/
9963    firstInput.on('keydown', function (e) {
9964      if ((e.which === 9 && e.shiftKey)) {
9965        e.preventDefault();
9966        lastInput.focus();
9967      }
9968    });
9969  };
9970})(jQuery);
9971;
9972/*
9973 * RGPD Modal JS
9974 */
9975/* Handlebar helpers*/
9976
9977
9978Handlebars.registerHelper('debug', function (optionalValue) {
9979  console.log('Current Context')
9980  console.log('====================')
9981  console.log(this)
9982
9983  if (optionalValue) {
9984    console.log('Value')
9985    console.log('====================')
9986    console.log(optionalValue)
9987  }
9988})
9989Handlebars.registerHelper('replace', function (string, to_replace, replacement) {
9990  return (string || '').replace(to_replace, replacement)
9991})
9992
9993window.tplDisclaimerRgpd = null
9994window.tplPopinRgpd = null
9995window.idPopinRgpd = 'popin-rgpd' + '_' + Math.random().toString(36).substr(2, 9)
9996
9997/**
9998 * Get url's parameters
9999 * @param param string of parameter to get
10000 **/
10001
10002function $_GET(param) {
10003  var vars = {};
10004  window.location.href.replace( location.hash, '' ).replace(
10005      /[?&]+([^=&]+)=?([^&]*)?/gi, // regexp
10006      function( m, key, value ) { // callback
10007        vars[key] = value !== undefined ? value : '';
10008      }
10009  );
10010
10011  if ( param ) {
10012    return vars[param] ? vars[param] : null;
10013  }
10014  return vars;
10015}
10016/**
10017 * add template from path
10018 * @param path string : path of template
10019 **/
10020
10021function includeHBS(path, callback) {
10022    jQuery.get(path, function (data) {
10023        jQuery('body').append(data);
10024        callback(); 
10025    });
10026}
10027
10028/**
10029 * Structure of RGPD cookie
10030 * @constructor
10031 */
10032function RGPDCookie () {
10033
10034  /**
10035   * List of all authorised services
10036   * @type {{}}
10037   */
10038  this.authorizations = {}
10039
10040  /**
10041   * Version date of the cookie
10042   * @Type Date
10043   */
10044  this.versionDate = null
10045
10046  /**
10047   *  Add an authorisation
10048   * @param serviceName string Name of authorised service
10049   * @returns {RGPDCookie}
10050   */
10051  this.addAuthorization = function (serviceName) {
10052    this.authorizations[serviceName] = true
10053    return this
10054  }
10055
10056  /**
10057   * Add a refusal on a service
10058   * @param serviceName string Service name to refuse
10059   * @returns {RGPDCookie}
10060   */
10061  this.refuseAuthorization = function (serviceName) {
10062    this.authorizations[serviceName] = false
10063    return this
10064  }
10065
10066  /**
10067   * Set a refuse or an acceptation on a service
10068   * @param serviceName string Service name to set
10069   * @returns {RGPDCookie}
10070   */
10071  this.setAuthorization = function (serviceName, value) {
10072    this.authorizations[serviceName] = value
10073    return this
10074  }
10075
10076  /**
10077   * Get cookie version date
10078   * @returns {Date}
10079   */
10080  this.getVersionDate = function () {
10081    return this.versionDate
10082  }
10083
10084  /**
10085   * Set version date
10086   * @param date Date
10087   */
10088  this.setVersionDate = function (date) {
10089    this.versionDate = date
10090  }
10091  /**
10092   * True if service is authorized
10093   * @param serviceName string Service name
10094   * @returns {boolean|*}
10095   */
10096  this.isAuthorized = function (serviceName) {
10097    return this.authorizations[serviceName] !== undefined && this.authorizations[serviceName]
10098  }
10099  /**
10100   * True if a refuse or an acceptation exists for this service
10101   * @param serviceName string Service name
10102   * @returns {boolean|*}
10103   */
10104  this.issetAuthorization = function (serviceName) {
10105    return this.authorizations[serviceName] !== undefined
10106  }
10107  /**
10108   * Reset all authorisations
10109   * @returns {RGPDCookie}
10110   */
10111  this.resetAuthorizations = function () {
10112    this.authorizations = {}
10113    return this
10114  }
10115
10116  /**
10117   * Serialisze instance to string
10118   * @returns {string}
10119   */
10120  this.serialize = function () {
10121    var now = new Date()
10122    //var tmpData = ['versionDate:'+now.getTime()];
10123    var tmpData = ['versionDate:' + _RGPDManager.getVersionDate()]
10124
10125    if (this.authorizations) {
10126      for (var authorizationId in this.authorizations) {
10127        var authorizationValue = this.authorizations[authorizationId]
10128        tmpData.push(authorizationId + ':' + authorizationValue)
10129      }
10130    }
10131    return tmpData.join('|')
10132  }
10133
10134  /**
10135   * Transform cookie string to RGPDCookie object
10136   * @param serialized
10137   */
10138  this.unserialize = function (serialized) {
10139
10140    if (!serialized) {
10141      return;
10142    }
10143
10144    var tmpAuthorization = serialized.split('|')
10145
10146    for (var key in tmpAuthorization) {
10147      var currentPart = tmpAuthorization[key].split(':')
10148      if ('versionDate' == currentPart[0]) {
10149        this.setVersionDate(new Date(Number(currentPart[1])))
10150      }
10151      else {
10152        this.authorizations[currentPart[0]] = currentPart[1] !== undefined ? currentPart[1] == 'true' : false
10153      }
10154    }
10155  }
10156
10157  /**
10158   * Reset all authorisations
10159   * @param versionDate
10160   * @returns {boolean}
10161   */
10162  this.isExpired = function (versionDate) {
10163    return this.versionDate ? (versionDate > this.versionDate.getTime()) : true;
10164  }
10165
10166}
10167
10168/**
10169 * RGPD Cookie Manager
10170 * @type {{cookieName: string,
10171 *      issetCookie: Window.RGPDManager.issetCookie,
10172 *      saveCookie: Window.RGPDManager.saveCookie,
10173 *      getCookie: Window.RGPDManager.getCookie}}
10174 */
10175var RGPDCookieManager = {
10176  /**
10177   * Nom du cookie
10178   */
10179  cookieName: 'CONSENT_RGPD',
10180
10181  /**
10182   * Cookie life time
10183   */
10184  cookieLifeTime: 365,
10185
10186  /**
10187   * Check if the cookie exist
10188   * @returns {*}
10189   */
10190  issetCookie: function () {
10191    return cookieManager.issetCookie(this.cookieName)
10192  },
10193
10194  /**
10195   * Save cookie
10196   * @param RGPDcookie {RGPDCookie} Instance of RGPDCookie
10197   */
10198  saveCookie: function (rgpdCookie) {
10199    cookieManager.setCookie(this.cookieName, rgpdCookie.serialize(), this.cookieLifeTime)
10200  },
10201
10202  /**
10203   * Get an instance of RGPDCookie
10204   * @returns {RGPDCookie}
10205   */
10206  getCookie: function () {
10207    var rgdpCookie = new RGPDCookie()
10208
10209    rgdpCookie.unserialize(cookieManager.getCookie(this.cookieName))
10210
10211    return rgdpCookie
10212  }
10213
10214}
10215
10216/**
10217 * Cookie Manager
10218 * @type {{setCookie: Window.cookieManager.setCookie,
10219 * getCookie: Window.cookieManager.getCookie,
10220 * issetCookie: Window.cookieManager.issetCookie}}
10221 */
10222window.cookieManager = {
10223
10224  /**
10225   * Create a cookie
10226   * @param name string Cookie name
10227   * @param value string Cookie value
10228   * @param expiration int Cookie expire date
10229   */
10230  setCookie: function (name, value, expiration) {
10231    var d = new Date()
10232    d.setTime(d.getTime() + (expiration * 24 * 60 * 60 * 1000))
10233    var expires = 'expires=' + d.toUTCString()
10234    document.cookie = name + '=' + value + ';' + expires + ';path=/'
10235  },
10236
10237  /**
10238   * Get a cookie
10239   * @param name string cookie name
10240   * @returns {*}
10241   */
10242  getCookie: function (name) {
10243      var match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)'));
10244      if (match) {
10245          return match[2];
10246      }
10247      return null
10248  },
10249  /**
10250   * Check if cookie exists
10251   * @param name string Cookie name
10252   * @returns {boolean}
10253   */
10254  issetCookie: function (name) {
10255    return this.getCookie(name) != null
10256  }
10257}
10258
10259/**
10260 * Popin Manager
10261 * @param options : RGPDManagerOptions
10262 *
10263 */
10264function RGPDManager (options) {
10265
10266  /**
10267   * <RGPDManagerOptions
10268   * @type {{}}
10269   */
10270  this.options = options
10271
10272  /**
10273   * @type RGPDCookie
10274   */
10275  this.cookie = RGPDCookieManager.getCookie()
10276
10277  /**
10278   * @type {RGPDManager}
10279   */
10280  var $this = this;
10281
10282  /**
10283   * Initialize RGPDComponents
10284   */
10285  this.init = function () {
10286    if (this.options.data == null) {
10287      var self = this
10288      var options = this.options.url;
10289
10290      //check if we are in an academic site
10291      var url = document.location.href;
10292      var regex = /(academie).+\/(ac-[^\/]+)/i;
10293      var arrAcad = url.match(regex);
10294      if(arrAcad && arrAcad[1] && arrAcad[2]){
10295        if(arrAcad[1] == "academie") {
10296          options = '/' + arrAcad[2] + options;
10297        }
10298      }
10299
10300      jQuery.getJSON(options, function (result) {
10301        self.options.data = result
10302        self.init()
10303      })
10304      return
10305    }
10306
10307    // Check if cookie exists in browser
10308    if (!RGPDCookieManager.issetCookie()
10309      || (RGPDCookieManager.issetCookie() && $this.cookie.isExpired(this.getVersionDate(
10309)))) {
10310      if (this.isFirstVisit()) {
10311        //Generate disclaimer template
10312        this._generateDisclaimer();
10313      } else {
10314        this._initDefaultCookie();
10315      }
10316    }
10317
10318    //Generate popin template
10319    this._generatePopin();
10320
10321    //Generate share button template
10322    this._generateShareButton();
10323
10324  }
10325
10326  /**
10327   * Set default cookie
10328   * @private
10329   */
10330  this._initDefaultCookie = function () {
10331    var services = this.options.getServices()
10332
10333    if (services) {
10334      services.forEach(function (service) {
10335        if (!$this.cookie.issetAuthorization(service)) {
10336          $this.cookie.addAuthorization(service)
10337        }
10338      })
10339    }
10340
10341    RGPDCookieManager.saveCookie($this.cookie)
10342  }
10343
10344  /**
10345   * Generate the Popin Element
10346   * @private
10347   */
10348  this._generatePopin = function () {
10349    var hdbCompile = {
10350      'popin': this.options.data.popinData,
10351      'groups': this.options.data.serviceGroups,
10352      'idPopin': idPopinRgpd
10353    }
10354
10355    jQuery('body').prepend(Handlebars.compile(this.options.getPopinTemplate())(hdbCompile))
10356
10357    /*
10358    For each internal links in the popin, adding an url parameter
10359    to not create the cookie when the page will be load
10360    (we have to not activate the implicit consent in this case)
10361     */
10362      if (!RGPDCookieManager.issetCookie()
10363          || (RGPDCookieManager.issetCookie() && $this.cookie.isExpired(this.getVersionDate()))) {
10364          if (this.isFirstVisit()) {
10365              jQuery('#' + idPopinRgpd + ' a').each(function () {
10366                  if (this.hostname == window.location.host) {
10367                      if (this.href.indexOf("?") == -1) {
10368                          this.href = this.href + "?rgpd_consent_processing=1";
10369                      }
10370                      else {
10371                          this.href = this.href + "&rgpd_consent_processing=1";
10372                      }
10373                  }
10374
10375              });
10376          }
10377      }
10378  }
10379
10380  /**
10381   * Generate the disclaimer element
10382   * @private
10383   */
10384  this._generateDisclaimer = function () {
10385    var hdbCompile = {
10386      'disclaimer': this.options.data.disclaimerData
10387    }
10388    jQuery('body').prepend(Handlebars.compile(this.options.getDisclaimerTemplate())(hdbCompile))
10389  }
10390
10391  this._generateShareButton = function () {
10392    var jShareButtons = jQuery('.tplShareButton');
10393
10394    jQuery.each(jShareButtons, function(key, shareButton) {
10395
10396      var jShareButton = jQuery(shareButton);
10397      var shareButtonId = jShareButton.attr('data-service-id');
10398
10399      if(RGPDCookieManager.issetCookie()) {
10400
10401        var cookie = RGPDCookieManager.getCookie();
10402
10403        jQuery.each(cookie.authorizations, function(id, state) {
10404
10405          if(id == shareButtonId && state) {
10406            jShareButton.after(Handlebars.compile(jShareButton.html())());
10407            jShareButton.remove();
10408            return;
10409          }
10410        });
10411      }
10412      jShareButton.remove();
10413    });
10414
10415    //Manage share buttons text
10416    this._manageShareButtonsText();
10417  }
10418
10419  this._manageShareButtonsText = function() {
10420    var arr = ['.bookmarks_border', '.liens_contenu_max', '.rgpd_share_bloc'];
10421    arr.forEach(function(val) {
10422      var element = jQuery(val);
10423      if(element.length) {
10424        element.each(function(key, obj) {
10425          var jObj = jQuery(obj);
10426          if(!jObj.find('li').length) {
10427            jObj.hide();
10428          }
10429        });
10430      }
10431    });
10432  }
10433
10434
10435
10436  /**
10437   * Save all authorisations of popin
10438   */
10439  this.saveAuthorizations = function () {
10440    this.cookie.resetAuthorizations();
10441
10442    //List all available services
10443    this.options.getServices().forEach(function(val){
10444      $this.cookie.refuseAuthorization(val);
10445    });
10446
10447    var data = this.options.getPopinResults();
10448
10449    //For each checked services, we add an authorisation
10450    data.forEach(function (element) {
10451      $this.cookie.setAuthorization(element.value, true);
10452    });
10453
10454    RGPDCookieManager.saveCookie(this.cookie);
10455
10456    this.options.onAcceptConsent(this);
10457  }
10458
10459  /**
10460   * Accept All Service
10461   */
10462  this.validAllServices = function () {
10463    jQuery.each(this.options.getServices(), function (key, obj) {
10464      $this.cookie.addAuthorization(obj)
10465    })
10466    RGPDCookieManager.saveCookie($this.cookie);
10467
10468    this.options.onAcceptConsent(this);
10469  }
10470
10471  /**
10472   * Refuse All Services
10473   */
10474  this.refuseAllServices = function () {
10475    jQuery.each(this.options.getServices(), function (key, obj) {
10476      $this.cookie.addAuthorization(obj)
10477    })
10478    RGPDCookieManager.saveCookie($this.cookie);
10479
10480    this.options.onAcceptConsent(this);
10481  }
10482
10483  /**
10484   * Return the version data
10485   * @returns {number}
10486   */
10487  this.getVersionDate = function () {
10488    var versionDate = 0
10489    if (this.options.data != null) {
10490      versionDate = this.options.data.versionDate
10491    }
10492    return versionDate
10493  }
10494
10495  /**
10496   * Teste if user is on it's first visit
10497   * @returns {true|false}
10498   */
10499  this.isFirstVisit = function () {
10500    //Checking if the referer is from the RGPD popin
10501    if($_GET('rgpd_consent_processing') !== null){
10502      return true
10503    }
10504
10505    var hostname = document.location.hostname;
10506    hostRef = document.referrer.split('/')[2];
10507    isNavigating = (hostRef === hostname && document.location.href != document.referrer);
10508    return (!isNavigating);
10509  }
10510
10511}
10512
10513/**
10514 * RGPD Manager Options
10515 */
10516var RGPDManagerOptions = {
10517
10518  /**
10519   * url
10520   * @type {{}}
10521   */
10522  'url': '/themes/custom/adv_theme/rgpd/rgpd.adv/rgpd.json', //'/rgpd.json',
10523  /**
10524   * data
10525   * @type {{}}
10526   */
10527  'data': null,
10528
10529  /* Function getDisclaimerTemplate
10530   * @param manager : RGPDPopinManager
10531   * @return string
10532   */
10533  'getDisclaimerTemplate': function (manager) {
10534    if (jQuery('#tplDisclaimer').length) {
10535      tplDisclaimerRgpd = jQuery('#tplDisclaimer').html()
10536      jQuery('#tplDisclaimer').remove()
10537    }
10538
10539    return tplDisclaimerRgpd
10540  },
10541
10542  /* Function getDisclaimerTemplate
10543   * @param manager : getPopinTemplate
10544   * @return string
10545   */
10546  'getPopinTemplate': function (manager) {
10547    if (jQuery('#tplPopin').length) {
10548      tplPopinRgpd = jQuery('#tplPopin').html()
10549      jQuery('#tplPopin').remove()
10550    }
10551
10552    return tplPopinRgpd
10553  },
10554
10555  /* Function getServices
10556   * @return array
10557   */
10558  'getServices': function () {
10559    var listServices = []
10560    if (this.data.serviceGroups) {
10561      var serviceGroups = this.data.serviceGroups
10562      serviceGroups.forEach(function (serviceGroup) {
10563        var services = serviceGroup.services
10564        services.forEach(function (service) {
10565          listServices.push(service.id)
10566        })
10567      })
10568    }
10569
10570    return listServices
10571  },
10572
10573  /**
10574   * Return the popin results
10575   * @returns {*|jQuery}
10576   */
10577  'getPopinResults': function () {
10578    return jQuery('#'+idPopinRgpd+' form').serializeArray();
10579  },
10580
10581  /**
10582   * Execute when add authorisation to cookie
10583   * @param manager
10584   */
10585  'onAcceptConsent': function (manager) {
10586    jQuery('#'+idPopinRgpd+', #topbar-cookie-container').hide();
10587    location.reload();
10588  }
10589}
10590
10591
10592var _RGPDManager = null
10593jQuery(document).ready(function () {
10594  includeHBS("/themes/custom/adv_theme/rgpd/rgpd.adv/tpl/popin.hbs", function(){
10595    includeHBS("/themes/custom/adv_theme/rgpd/rgpd.adv/tpl/disclaimer.hbs", function(){
10596      /* Initialize RGPDManager */
10597      _RGPDManager = new RGPDManager(RGPDManagerOptions)
10598      _RGPDManager.init(); 
10599    });
10600  });
10601  
10602
10603  
10604  
10605})
10606;
10607/**
10608 * @file
10609 * Drupal Bootstrap object.
10610 */
10611
10612/**
10613 * All Drupal Bootstrap JavaScript APIs are contained in this namespace.
10614 *
10615 * @param {underscore} _
10616 * @param {jQuery} $
10617 * @param {Drupal} Drupal
10618 * @param {drupalSettings} drupalSettings
10619 */
10620(function (_, $, Drupal, drupalSettings) {
10621  'use strict';
10622
10623  /**
10624   * @typedef Drupal.bootstrap
10625   */
10626  var Bootstrap = {
10627    processedOnce: {},
10628    settings: drupalSettings.bootstrap || {}
10629  };
10630
10631  /**
10632   * Wraps Drupal.checkPlain() to ensure value passed isn't empty.
10633   *
10634   * Encodes special characters in a plain-text string for display as HTML.
10635   *
10636   * @param {string} str
10637   *   The string to be encoded.
10638   *
10639   * @return {string}
10640   *   The encoded string.
10641   *
10642   * @ingroup sanitization
10643   */
10644  Bootstrap.checkPlain = function (str) {
10645    return str && Drupal.checkPlain(str) || '';
10646  };
10647
10648  /**
10649   * Creates a jQuery plugin.
10650   *
10651   * @param {String} id
10652   *   A jQuery plugin identifier located in $.fn.
10653   * @param {Function} plugin
10654   *   A constructor function used to initialize the for the jQuery plugin.
10655   * @param {Boolean} [noConflict]
10656   *   Flag indicating whether or not to create a ".noConflict()" helper method
10657   *   for the plugin.
10658   */
10659  Bootstrap.createPlugin = function (id, plugin, noConflict) {
10660    // Immediately return if plugin doesn't exist.
10661    if ($.fn[id] !== void 0) {
10662      return this.fatal('Specified jQuery plugin identifier already exists: @id. Use Drupal.bootstrap.replacePlugin() instead.', {'@id': id});
10663    }
10664
10665    // Immediately return if plugin isn't a function.
10666    if (typeof plugin !== 'function') {
10667      return this.fatal('You must provide a constructor function to create a jQuery plugin "@id": @plugin', {'@id': id, '@plugin':  plugin});
10668    }
10669
10670    // Add a ".noConflict()" helper method.
10671    this.pluginNoConflict(id, plugin, noConflict);
10672
10673    $.fn[id] = plugin;
10674  };
10675
10676  /**
10677   * Diff object properties.
10678   *
10679   * @param {...Object} objects
10680   *   Two or more objects. The first object will be used to return properties
10681   *   values.
10682   *
10683   * @return {Object}
10684   *   Returns the properties of the first passed object that are not present
10685   *   in all other passed objects.
10686   */
10687  Bootstrap.diffObjects = function (objects) {
10688    var args = Array.prototype.slice.call(arguments);
10689    return _.pick(args[0], _.difference.apply(_, _.map(args, function (obj) {
10690      return Object.keys(obj);
10691    })));
10692  };
10693
10694  /**
10695   * Map of supported events by regular expression.
10696   *
10697   * @type {Object<Event|MouseEvent|KeyboardEvent|TouchEvent,RegExp>}
10698   */
10699  Bootstrap.eventMap = {
10700    Event: /^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,
10701    MouseEvent: /^(?:click|dblclick|mouse(?:down|enter|leave|up|over|move|out))$/,
10702    KeyboardEvent: /^(?:key(?:down|press|up))$/,
10703    TouchEvent: /^(?:touch(?:start|end|move|cancel))$/
10704  };
10705
10706  /**
10707   * Extends a jQuery Plugin.
10708   *
10709   * @param {String} id
10710   *   A jQuery plugin identifier located in $.fn.
10711   * @param {Function} callback
10712   *   A constructor function used to initialize the for the jQuery plugin.
10713   *
10714   * @return {Function|Boolean}
10715   *   The jQuery plugin constructor or FALSE if the plugin does not exist.
10716   */
10717  Bootstrap.extendPlugin = function (id, callback) {
10718    // Immediately return if plugin doesn't exist.
10719    if (typeof $.fn[id] !== 'function') {
10720      return this.fatal('Specified jQuery plugin identifier does not exist: @id', {'@id':  id});
10721    }
10722
10723    // Immediately return if callback isn't a function.
10724    if (typeof callback !== 'function') {
10725      return this.fatal('You must provide a callback function to extend the jQuery plugin "@id": @callback', {'@id': id, '@callback':  callback});
10726    }
10727
10728    // Determine existing plugin constructor.
10729    var constructor = $.fn[id] && $.fn[id].Constructor || $.fn[id];
10730    var plugin = callback.apply(constructor, [this.settings]);
10731    if (!$.isPlainObject(plugin)) {
10732      return this.fatal('Returned value from callback is not a plain object that can be used to extend the jQuery plugin "@id": @obj', {'@obj':  plugin});
10733    }
10734
10735    this.wrapPluginConstructor(constructor, plugin, true);
10736
10737    return $.fn[id];
10738  };
10739
10740  Bootstrap.superWrapper = function (parent, fn) {
10741    return function () {
10742      var previousSuper = this.super;
10743      this.super = parent;
10744      var ret = fn.apply(this, arguments);
10745      if (previousSuper) {
10746        this.super = previousSuper;
10747      }
10748      else {
10749        delete this.super;
10750      }
10751      return ret;
10752    };
10753  };
10754
10755  /**
10756   * Provide a helper method for displaying when something is went wrong.
10757   *
10758   * @param {String} message
10759   *   The message to display.
10760   * @param {Object} [args]
10761   *   An arguments to use in message.
10762   *
10763   * @return {Boolean}
10764   *   Always returns FALSE.
10765   */
10766  Bootstrap.fatal = function (message, args) {
10767    if (this.settings.dev && console.warn) {
10768      for (var name in args) {
10769        if (args.hasOwnProperty(name) && typeof args[name] === 'object') {
10770          args[name] = JSON.stringify(args[name]);
10771        }
10772      }
10773      Drupal.throwError(new Error(Drupal.formatString(message, args)));
10774    }
10775    return false;
10776  };
10777
10778  /**
10779   * Intersects object properties.
10780   *
10781   * @param {...Object} objects
10782   *   Two or more objects. The first object will be used to return properties
10783   *   values.
10784   *
10785   * @return {Object}
10786   *   Returns the properties of first passed object that intersects with all
10787   *   other passed objects.
10788   */
10789  Bootstrap.intersectObjects = function (objects) {
10790    var args = Array.prototype.slice.call(arguments);
10791    return _.pick(args[0], _.intersection.apply(_, _.map(args, function (obj) {
10792      return Object.keys(obj);
10793    })));
10794  };
10795
10796  /**
10797   * Normalizes an object's values.
10798   *
10799   * @param {Object} obj
10800   *   The object to normalize.
10801   *
10802   * @return {Object}
10803   *   The normalized object.
10804   */
10805  Bootstrap.normalizeObject = function (obj) {
10806    if (!$.isPlainObject(obj)) {
10807      return obj;
10808    }
10809
10810    for (var k in obj) {
10811      if (typeof obj[k] === 'string') {
10812        if (obj[k] === 'true') {
10813          obj[k] = true;
10814        }
10815        else if (obj[k] === 'false') {
10816          obj[k] = false;
10817        }
10818        else if (obj[k].match(/^[\d-.]$/)) {
10819          obj[k] = parseFloat(obj[k]);
10820        }
10821      }
10822      else if ($.isPlainObject(obj[k])) {
10823        obj[k] = Bootstrap.normalizeObject(obj[k]);
10824      }
10825    }
10826
10827    return obj;
10828  };
10829
10830  /**
10831   * An object based once plugin (similar to jquery.once, but without the DOM).
10832   *
10833   * @param {String} id
10834   *   A unique identifier.
10835   * @param {Function} callback
10836   *   The callback to invoke if the identifier has not yet been seen.
10837   *
10838   * @return {Bootstrap}
10839   */
10840  Bootstrap.once = function (id, callback) {
10841    // Immediately return if identifier has already been processed.
10842    if (this.processedOnce[id]) {
10843      return this;
10844    }
10845    callback.call(this, this.settings);
10846    this.processedOnce[id] = true;
10847    return this;
10848  };
10849
10850  /**
10851   * Provide jQuery UI like ability to get/set options for Bootstrap plugins.
10852   *
10853   * @param {string|object} key
10854   *   A string value of the option to set, can be dot like to a nested key.
10855   *   An object of key/value pairs.
10856   * @param {*} [value]
10857   *   (optional) A value to set for key.
10858   *
10859   * @returns {*}
10860   *   - Returns nothing if key is an object or both key and value parameters
10861   *   were provided to set an option.
10862   *   - Returns the a value for a specific setting if key was provided.
10863   *   - Returns an object of key/value pairs of all the options if no key or
10864   *   value parameter was provided.
10865   *
10866   * @see https://github.com/jquery/jquery-ui/blob/master/ui/widget.js
10867   */
10868  Bootstrap.option = function (key, value) {
10869    var options = $.isPlainObject(key) ? $.extend({}, key) : {};
10870
10871    // Get all options (clone so it doesn't reference the internal object).
10872    if (arguments.length === 0) {
10873      return $.extend({}, this.options);
10874    }
10875
10876    // Get/set single option.
10877    if (typeof key === "string") {
10878      // Handle nested keys in dot notation.
10879      // e.g., "foo.bar" => { foo: { bar: true } }
10880      var parts = key.split('.');
10881      key = parts.shift();
10882      var obj = options;
10883      if (parts.length) {
10884        for (var i = 0; i < parts.length - 1; i++) {
10885          obj[parts[i]] = obj[parts[i]] || {};
10886          obj = obj[parts[i]];
10887        }
10888        key = parts.pop();
10889      }
10890
10891      // Get.
10892      if (arguments.length === 1) {
10893        return obj[key] === void 0 ? null : obj[key];
10894      }
10895
10896      // Set.
10897      obj[key] = value;
10898    }
10899
10900    // Set multiple options.
10901    $.extend(true, this.options, options);
10902  };
10903
10904  /**
10905   * Adds a ".noConflict()" helper method if needed.
10906   *
10907   * @param {String} id
10908   *   A jQuery plugin identifier located in $.fn.
10909   * @param {Function} plugin
10910   * @param {Function} plugin
10911   *   A constructor function used to initialize the for the jQuery plugin.
10912   * @param {Boolean} [noConflict]
10913   *   Flag indicating whether or not to create a ".noConflict()" helper method
10914   *   for the plugin.
10915   */
10916  Bootstrap.pluginNoConflict = function (id, plugin, noConflict) {
10917    if (plugin.noConflict === void 0 && (noConflict === void 0 || noConflict)) {
10918      var old = $.fn[id];
10919      plugin.noConflict = function () {
10920        $.fn[id] = old;
10921        return this;
10922      };
10923    }
10924  };
10925
10926  /**
10927   * Creates a handler that relays to another event name.
10928   *
10929   * @param {HTMLElement|jQuery} target
10930   *   A target element.
10931   * @param {String} name
10932   *   The name of the event to trigger.
10933   * @param {Boolean} [stopPropagation=true]
10934   *   Flag indicating whether to stop the propagation of the event, defaults
10935   *   to true.
10936   *
10937   * @return {Function}
10938   *   An even handler callback function.
10939   */
10940  Bootstrap.relayEvent = function (target, name, stopPropagation) {
10941    return function (e) {
10942      if (stopPropagation === void 0 || stopPropagation) {
10943        e.stopPropagation();
10944      }
10945      var $target = $(target);
10946      var parts = name.split('.').filter(Boolean);
10947      var type = parts.shift();
10948      e.target = $target[0];
10949      e.currentTarget = $target[0];
10950      e.namespace = parts.join('.');
10951      e.type = type;
10952      $target.trigger(e);
10953    };
10954  };
10955
10956  /**
10957   * Replaces a Bootstrap jQuery plugin definition.
10958   *
10959   * @param {String} id
10960   *   A jQuery plugin identifier located in $.fn.
10961   * @param {Function} callback
10962   *   A callback function that is immediately invoked and must return a
10963   *   function that will be used as the plugin constructor.
10964   * @param {Boolean} [noConflict]
10965   *   Flag indicating whether or not to create a ".noConflict()" helper method
10966   *   for the plugin.
10967   */
10968  Bootstrap.replacePlugin = function (id, callback, noConflict) {
10969    // Immediately return if plugin doesn't exist.
10970    if (typeof $.fn[id] !== 'function') {
10971      return this.fatal('Specified jQuery plugin identifier does not exist: @id', {'@id':  id});
10972    }
10973
10974    // Immediately return if callback isn't a function.
10975    if (typeof callback !== 'function') {
10976      return this.fatal('You must provide a valid callback function to replace a jQuery plugin: @callback', {'@callback': callback});
10977    }
10978
10979    // Determine existing plugin constructor.
10980    var constructor = $.fn[id] && $.fn[id].Constructor || $.fn[id];
10981    var plugin = callback.apply(constructor, [this.settings]);
10982
10983    // Immediately return if plugin isn't a function.
10984    if (typeof plugin !== 'function') {
10985      return this.fatal('Returned value from callback is not a usable function to replace a jQuery plugin "@id": @plugin', {'@id': id, '@plugin': plugin});
10986    }
10987
10988    this.wrapPluginConstructor(constructor, plugin);
10989
10990    // Add a ".noConflict()" helper method.
10991    this.pluginNoConflict(id, plugin, noConflict);
10992
10993    $.fn[id] = plugin;
10994  };
10995
10996  /**
10997   * Simulates a native event on an element in the browser.
10998   *
10999   * Note: This is a fairly complete modern implementation. If things aren't
11000   * working quite the way you intend (in older browsers), you may wish to use
11001   * the jQuery.simulate plugin. If it's available, this method will defer to
11002   * that plugin.
11003   *
11004   * @see https://github.com/jquery/jquery-simulate
11005   *
11006   * @param {HTMLElement|jQuery} element
11007   *   A DOM element to dispatch event on. Note: this may be a jQuery object,
11008   *   however be aware that this will trigger the same event for each element
11009   *   inside the jQuery collection; use with caution.
11010   * @param {String|String[]} type
11011   *   The type(s) of event to simulate.
11012   * @param {Object} [options]
11013   *   An object of options to pass to the event constructor. Typically, if
11014   *   an event is being proxied, you should just pass the original event
11015   *   object here. This allows, if the browser supports it, to be a truly
11016   *   simulated event.
11017   *
11018   * @return {Boolean}
11019   *   The return value is false if event is cancelable and at least one of the
11020   *   event handlers which handled this event called Event.preventDefault().
11021   *   Otherwise it returns true.
11022   */
11023  Bootstrap.simulate = function (element, type, options) {
11024    // Handle jQuery object wrappers so it triggers on each element.
11025    var ret = true;
11026    if (element instanceof $) {
11027      element.each(function () {
11028        if (!Bootstrap.simulate(this, type, options)) {
11029          ret = false;
11030        }
11031      });
11032      return ret;
11033    }
11034
11035    if (!(element instanceof HTMLElement)) {
11036      this.fatal('Passed element must be an instance of HTMLElement, got "@type" instead.', {
11037        '@type': typeof element,
11038      });
11039    }
11040
11041    // Defer to the jQuery.simulate plugin, if it's available.
11042    if (typeof $.simulate === 'function') {
11043      new $.simulate(element, type, options);
11044      return true;
11045    }
11046
11047    var event;
11048    var ctor;
11049    var types = [].concat(type);
11050    for (var i = 0, l = types.length; i < l; i++) {
11051      type = types[i];
11052      for (var name in this.eventMap) {
11053        if (this.eventMap[name].test(type)) {
11054          ctor = name;
11055          break;
11056        }
11057      }
11058      if (!ctor) {
11059        throw new SyntaxError('Only rudimentary HTMLEvents, KeyboardEvents and MouseEvents are supported: ' + type);
11060      }
11061      var opts = {bubbles: true, cancelable: true};
11062      if (ctor === 'KeyboardEvent' || ctor === 'MouseEvent') {
11063        $.extend(opts, {ctrlKey: !1, altKey: !1, shiftKey: !1, metaKey: !1});
11064      }
11065      if (ctor === 'MouseEvent') {
11066        $.extend(opts, {button: 0, pointerX: 0, pointerY: 0, view: window});
11067      }
11068      if (options) {
11069        $.extend(opts, options);
11070      }
11071      if (typeof window[ctor] === 'function') {
11072        event = new window[ctor](type, opts);
11073        if (!element.dispatchEvent(event)) {
11074          ret = false;
11075        }
11076      }
11077      else if (document.createEvent) {
11078        event = document.createEvent(ctor);
11079        event.initEvent(type, opts.bubbles, opts.cancelable);
11080        if (!element.dispatchEvent(event)) {
11081          ret = false;
11082        }
11083      }
11084      else if (typeof element.fireEvent === 'function') {
11085        event = $.extend(document.createEventObject(), opts);
11086        if (!element.fireEvent('on' + type, event)) {
11087          ret = false;
11088        }
11089      }
11090      else if (typeof element[type]) {
11091        element[type]();
11092      }
11093    }
11094    return ret;
11095  };
11096
11097  /**
11098   * Strips HTML and returns just text.
11099   *
11100   * @param {String|Element|jQuery} html
11101   *   A string of HTML content, an Element DOM object or a jQuery object.
11102   *
11103   * @return {String}
11104   *   The text without HTML tags.
11105   *
11106   * @todo Replace with http://locutus.io/php/strings/strip_tags/
11107   */
11108  Bootstrap.stripHtml = function (html) {
11109    if (html instanceof $) {
11110      html = html.html();
11111    }
11112    else if (html instanceof Element) {
11113      html = html.innerHTML;
11114    }
11115    var tmp = document.createElement('DIV');
11116    tmp.innerHTML = html;
11117    return (tmp.textContent || tmp.innerText || '').replace(/^[\s\n\t]*|[\s\n\t]*$/, '');
11118  };
11119
11120  /**
11121   * Provide a helper method for displaying when something is unsupported.
11122   *
11123   * @param {String} type
11124   *   The type of unsupported object, e.g. method or option.
11125   * @param {String} name
11126   *   The name of the unsupported object.
11127   * @param {*} [value]
11128   *   The value of the unsupported object.
11129   */
11130  Bootstrap.unsupported = function (type, name, value) {
11131    Bootstrap.warn('Unsupported by Drupal Bootstrap: (@type) @name -> @value', {
11132      '@type': type,
11133      '@name': name,
11134      '@value': typeof value === 'object' ? JSON.stringify(value) : value
11135    });
11136  };
11137
11138  /**
11139   * Provide a helper method to display a warning.
11140   *
11141   * @param {String} message
11142   *   The message to display.
11143   * @param {Object} [args]
11144   *   Arguments to use as replacements in Drupal.formatString.
11145   */
11146  Bootstrap.warn = function (message, args) {
11147    if (this.settings.dev && console.warn) {
11148      console.warn(Drupal.formatString(message, args));
11149    }
11150  };
11151
11152  /**
11153   * Wraps a plugin with common functionality.
11154   *
11155   * @param {Function} constructor
11156   *   A plugin constructor being wrapped.
11157   * @param {Object|Function} plugin
11158   *   The plugin being wrapped.
11159   * @param {Boolean} [extend = false]
11160   *   Whether to add super extensibility.
11161   */
11162  Bootstrap.wrapPluginConstructor = function (constructor, plugin, extend) {
11163    var proto = constructor.prototype;
11164
11165    // Add a jQuery UI like option getter/setter method.
11166    var option = this.option;
11167    if (proto.option === void(0)) {
11168      proto.option = function () {
11169        return option.apply(this, arguments);
11170      };
11171    }
11172
11173    if (extend) {
11174      // Handle prototype properties separately.
11175      if (plugin.prototype !== void 0) {
11176        for (var key in plugin.prototype) {
11177          if (!plugin.prototype.hasOwnProperty(key)) continue;
11178          var value = plugin.prototype[key];
11179          if (typeof value === 'function') {
11180            proto[key] = this.superWrapper(proto[key] || function () {}, value);
11181          }
11182          else {
11183            proto[key] = $.isPlainObject(value) ? $.extend(true, {}, proto[key], value) : value;
11184          }
11185        }
11186      }
11187      delete plugin.prototype;
11188
11189      // Handle static properties.
11190      for (key in plugin) {
11191        if (!plugin.hasOwnProperty(key)) continue;
11192        value = plugin[key];
11193        if (typeof value === 'function') {
11194          constructor[key] = this.superWrapper(constructor[key] || function () {}, value);
11195        }
11196        else {
11197          constructor[key] = $.isPlainObject(value) ? $.extend(true, {}, constructor[key], value) : value;
11198        }
11199      }
11200    }
11201  };
11202
11203  // Add Bootstrap to the global Drupal object.
11204  Drupal.bootstrap = Drupal.bootstrap || Bootstrap;
11205
11206})(window._, window.jQuery, window.Drupal, window.drupalSettings);
11207;
11208(function ($, _) {
11209
11210  /**
11211   * @class Attributes
11212   *
11213   * Modifies attributes.
11214   *
11215   * @param {Object|Attributes} attributes
11216   *   An object to initialize attributes with.
11217   */
11218  var Attributes = function (attributes) {
11219    this.data = {};
11220    this.data['class'] = [];
11221    this.merge(attributes);
11222  };
11223
11224  /**
11225   * Renders the attributes object as a string to inject into an HTML element.
11226   *
11227   * @return {String}
11228   *   A rendered string suitable for inclusion in HTML markup.
11229   */
11230  Attributes.prototype.toString = function () {
11231    var output = '';
11232    var name, value;
11233    var checkPlain = function (str) {
11234      return str && str.toString().replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;') || '';
11235    };
11236    var data = this.getData();
11237    for (name in data) {
11238      if (!data.hasOwnProperty(name)) continue;
11239      value = data[name];
11240      if (_.isFunction(value)) value = value();
11241      if (_.isObject(value)) value = _.values(value);
11242      if (_.isArray(value)) value = value.join(' ');
11243      output += ' ' + checkPlain(name) + '="' + checkPlain(value) + '"';
11244    }
11245    return output;
11246  };
11247
11248  /**
11249   * Renders the Attributes object as a plain object.
11250   *
11251   * @return {Object}
11252   *   A plain object suitable for inclusion in DOM elements.
11253   */
11254  Attributes.prototype.toPlainObject = function () {
11255    var object = {};
11256    var name, value;
11257    var data = this.getData();
11258    for (name in data) {
11259      if (!data.hasOwnProperty(name)) continue;
11260      value = data[name];
11261      if (_.isFunction(value)) value = value();
11262      if (_.isObject(value)) value = _.values(value);
11263      if (_.isArray(value)) value = value.join(' ');
11264      object[name] = value;
11265    }
11266    return object;
11267  };
11268
11269  /**
11270   * Add class(es) to the array.
11271   *
11272   * @param {string|Array} value
11273   *   An individual class or an array of classes to add.
11274   *
11275   * @return {Attributes}
11276   *
11277   * @chainable
11278   */
11279  Attributes.prototype.addClass = function (value) {
11280    var args = Array.prototype.slice.call(arguments);
11281    this.data['class'] = this.sanitizeClasses(this.data['class'].concat(args));
11282    return this;
11283  };
11284
11285  /**
11286   * Returns whether the requested attribute exists.
11287   *
11288   * @param {string} name
11289   *   An attribute name to check.
11290   *
11291   * @return {boolean}
11292   *   TRUE or FALSE
11293   */
11294  Attributes.prototype.exists = function (name) {
11295    return this.data[name] !== void(0) && this.data[name] !== null;
11296  };
11297
11298  /**
11299   * Retrieve a specific attribute from the array.
11300   *
11301   * @param {string} name
11302   *   The specific attribute to retrieve.
11303   * @param {*} defaultValue
11304   *   (optional) The default value to set if the attribute does not exist.
11305   *
11306   * @return {*}
11307   *   A specific attribute value, passed by reference.
11308   */
11309  Attributes.prototype.get = function (name, defaultValue) {
11310    if (!this.exists(name)) this.data[name] = defaultValue;
11311    return this.data[name];
11312  };
11313
11314  /**
11315   * Retrieves a cloned copy of the internal attributes data object.
11316   *
11317   * @return {Object}
11318   */
11319  Attributes.prototype.getData = function () {
11320    return _.extend({}, this.data);
11321  };
11322
11323  /**
11324   * Retrieves classes from the array.
11325   *
11326   * @return {Array}
11327   *   The classes array.
11328   */
11329  Attributes.prototype.getClasses = function () {
11330    return this.get('class', []);
11331  };
11332
11333  /**
11334   * Indicates whether a class is present in the array.
11335   *
11336   * @param {string|Array} className
11337   *   The class(es) to search for.
11338   *
11339   * @return {boolean}
11340   *   TRUE or FALSE
11341   */
11342  Attributes.prototype.hasClass = function (className) {
11343    className = this.sanitizeClasses(Array.prototype.slice.call(arguments));
11344    var classes = this.getClasses();
11345    for (var i = 0, l = className.length; i < l; i++) {
11346      // If one of the classes fails, immediately return false.
11347      if (_.indexOf(classes, className[i]) === -1) {
11348        return false;
11349      }
11350    }
11351    return true;
11352  };
11353
11354  /**
11355   * Merges multiple values into the array.
11356   *
11357   * @param {Attributes|Node|jQuery|Object} object
11358   *   An Attributes object with existing data, a Node DOM element, a jQuery
11359   *   instance or a plain object where the key is the attribute name and the
11360   *   value is the attribute value.
11361   * @param {boolean} [recursive]
11362   *   Flag determining whether or not to recursively merge key/value pairs.
11363   *
11364   * @return {Attributes}
11365   *
11366   * @chainable
11367   */
11368  Attributes.prototype.merge = function (object, recursive) {
11369    // Immediately return if there is nothing to merge.
11370    if (!object) {
11371      return this;
11372    }
11373
11374    // Get attributes from a jQuery element.
11375    if (object instanceof $) {
11376      object = object[0];
11377    }
11378
11379    // Get attributes from a DOM element.
11380    if (object instanceof Node) {
11381      object = Array.prototype.slice.call(object.attributes).reduce(function (attributes, attribute) {
11382        attributes[attribute.name] = attribute.value;
11383        return attributes;
11384      }, {});
11385    }
11386    // Get attributes from an Attributes instance.
11387    else if (object instanceof Attributes) {
11388      object = object.getData();
11389    }
11390    // Otherwise, clone the object.
11391    else {
11392      object = _.extend({}, object);
11393    }
11394
11395    // By this point, there should be a valid plain object.
11396    if (!$.isPlainObject(object)) {
11397      setTimeout(function () {
11398        throw new Error('Passed object is not supported: ' + object);
11399      });
11400      return this;
11401    }
11402
11403    // Handle classes separately.
11404    if (object && object['class'] !== void 0) {
11405      this.addClass(object['class']);
11406      delete object['class'];
11407    }
11408
11409    if (recursive === void 0 || recursive) {
11410      this.data = $.extend(true, {}, this.data, object);
11411    }
11412    else {
11413      this.data = $.extend({}, this.data, object);
11414    }
11415
11416    return this;
11417  };
11418
11419  /**
11420   * Removes an attribute from the array.
11421   *
11422   * @param {string} name
11423   *   The name of the attribute to remove.
11424   *
11425   * @return {Attributes}
11426   *
11427   * @chainable
11428   */
11429  Attributes.prototype.remove = function (name) {
11430    if (this.exists(name)) delete this.data[name];
11431    return this;
11432  };
11433
11434  /**
11435   * Removes a class from the attributes array.
11436   *
11437   * @param {...string|Array} className
11438   *   An individual class or an array of classes to remove.
11439   *
11440   * @return {Attributes}
11441   *
11442   * @chainable
11443   */
11444  Attributes.prototype.removeClass = function (className) {
11445    var remove = this.sanitizeClasses(Array.prototype.slice.apply(arguments));
11446    this.data['class'] = _.without(this.getClasses(), remove);
11447    return this;
11448  };
11449
11450  /**
11451   * Replaces a class in the attributes array.
11452   *
11453   * @param {string} oldValue
11454   *   The old class to remove.
11455   * @param {string} newValue
11456   *   The new class. It will not be added if the old class does not exist.
11457   *
11458   * @return {Attributes}
11459   *
11460   * @chainable
11461   */
11462  Attributes.prototype.replaceClass = function (oldValue, newValue) {
11463    var classes = this.getClasses();
11464    var i = _.indexOf(this.sanitizeClasses(oldValue), classes);
11465    if (i >= 0) {
11466      classes[i] = newValue;
11467      this.set('class', classes);
11468    }
11469    return this;
11470  };
11471
11472  /**
11473   * Ensures classes are flattened into a single is an array and sanitized.
11474   *
11475   * @param {...String|Array} classes
11476   *   The class or classes to sanitize.
11477   *
11478   * @return {Array}
11479   *   A sanitized array of classes.
11480   */
11481  Attributes.prototype.sanitizeClasses = function (classes) {
11482    return _.chain(Array.prototype.slice.call(arguments))
11483      // Flatten in case there's a mix of strings and arrays.
11484      .flatten()
11485
11486      // Split classes that may have been added with a space as a separator.
11487      .map(function (string) {
11488        return string.split(' ');
11489      })
11490
11491      // Flatten again since it was just split into arrays.
11492      .flatten()
11493
11494      // Filter out empty items.
11495      .filter()
11496
11497      // Clean the class to ensure it's a valid class name.
11498      .map(function (value) {
11499        return Attributes.cleanClass(value);
11500      })
11501
11502      // Ensure classes are unique.
11503      .uniq()
11504
11505      // Retrieve the final value.
11506      .value();
11507  };
11508
11509  /**
11510   * Sets an attribute on the array.
11511   *
11512   * @param {string} name
11513   *   The name of the attribute to set.
11514   * @param {*} value
11515   *   The value of the attribute to set.
11516   *
11517   * @return {Attributes}
11518   *
11519   * @chainable
11520   */
11521  Attributes.prototype.set = function (name, value) {
11522    var obj = $.isPlainObject(name) ? name : {};
11523    if (typeof name === 'string') {
11524      obj[name] = value;
11525    }
11526    return this.merge(obj);
11527  };
11528
11529  /**
11530   * Prepares a string for use as a CSS identifier (element, class, or ID name).
11531   *
11532   * Note: this is essentially a direct copy from
11533   * \Drupal\Component\Utility\Html::cleanCssIdentifier
11534   *
11535   * @param {string} identifier
11536   *   The identifier to clean.
11537   * @param {Object} [filter]
11538   *   An object of string replacements to use on the identifier.
11539   *
11540   * @return {string}
11541   *   The cleaned identifier.
11542   */
11543  Attributes.cleanClass = function (identifier, filter) {
11544    filter = filter || {
11545      ' ': '-',
11546      '_': '-',
11547      '/': '-',
11548      '[': '-',
11549      ']': ''
11550    };
11551
11552    identifier = identifier.toLowerCase();
11553
11554    if (filter['__'] === void 0) {
11555      identifier = identifier.replace('__', '#DOUBLE_UNDERSCORE#');
11556    }
11557
11558    identifier = identifier.replace(Object.keys(filter), Object.keys(filter).map(function(key) { return filter[key]; }));
11559
11560    if (filter['__'] === void 0) {
11561      identifier = identifier.replace('#DOUBLE_UNDERSCORE#', '__');
11562    }
11563
11564    identifier = identifier.replace(/[^\u002D\u0030-\u0039\u0041-\u005A\u005F\u0061-\u007A\u00A1-\uFFFF]/g, '');
11565    identifier = identifier.replace(['/^[0-9]/', '/^(-[0-9])|^(--)/'], ['_', '__']);
11566
11567    return identifier;
11568  };
11569
11570  /**
11571   * Creates an Attributes instance.
11572   *
11573   * @param {object|Attributes} [attributes]
11574   *   An object to initialize attributes with.
11575   *
11576   * @return {Attributes}
11577   *   An Attributes instance.
11578   *
11579   * @constructor
11580   */
11581  Attributes.create = function (attributes) {
11582    return new Attributes(attributes);
11583  };
11584
11585  window.Attributes = Attributes;
11586
11587})(window.jQuery, window._);
11588;
11589/**
11590 * @file
11591 * Theme hooks for the Drupal Bootstrap base theme.
11592 */
11593(function ($, Drupal, Bootstrap, Attributes) {
11594
11595  /**
11596   * Fallback for theming an icon if the Icon API module is not installed.
11597   */
11598  if (!Drupal.icon) Drupal.icon = { bundles: {} };
11599  if (!Drupal.theme.icon || Drupal.theme.prototype.icon) {
11600    $.extend(Drupal.theme, /** @lends Drupal.theme */ {
11601      /**
11602       * Renders an icon.
11603       *
11604       * @param {string} bundle
11605       *   The bundle which the icon belongs to.
11606       * @param {string} icon
11607       *   The name of the icon to render.
11608       * @param {object|Attributes} [attributes]
11609       *   An object of attributes to also apply to the icon.
11610       *
11611       * @returns {string}
11612       */
11613      icon: function (bundle, icon, attributes) {
11614        if (!Drupal.icon.bundles[bundle]) return '';
11615        attributes = Attributes.create(attributes).addClass('icon').set('aria-hidden', 'true');
11616        icon = Drupal.icon.bundles[bundle](icon, attributes);
11617        return '<span' + attributes + '></span>';
11618      }
11619    });
11620  }
11621
11622  /**
11623   * Callback for modifying an icon in the "bootstrap" icon bundle.
11624   *
11625   * @param {string} icon
11626   *   The icon being rendered.
11627   * @param {Attributes} attributes
11628   *   Attributes object for the icon.
11629   */
11630  Drupal.icon.bundles.bootstrap = function (icon, attributes) {
11631    attributes.addClass(['glyphicon', 'glyphicon-' + icon]);
11632  };
11633
11634  /**
11635   * Add necessary theming hooks.
11636   */
11637  $.extend(Drupal.theme, /** @lends Drupal.theme */ {
11638
11639    /**
11640     * Renders a Bootstrap AJAX glyphicon throbber.
11641     *
11642     * @returns {string}
11643     */
11644    ajaxThrobber: function () {
11645      return Drupal.theme('bootstrapIcon', 'refresh', {'class': ['ajax-throbber', 'glyphicon-spin'] });
11646    },
11647
11648    /**
11649     * Renders a button element.
11650     *
11651     * @param {object|Attributes} attributes
11652     *   An object of attributes to apply to the button. If it contains one of:
11653     *   - value: The label of the button.
11654     *   - context: The context type of Bootstrap button, can be one of:
11655     *     - default
11656     *     - primary
11657     *     - success
11658     *     - info
11659     *     - warning
11660     *     - danger
11661     *     - link
11662     *
11663     * @returns {string}
11664     */
11665    button: function (attributes) {
11666      attributes = Attributes.create(attributes).addClass('btn');
11667      var context = attributes.get('context', 'default');
11668      var label = attributes.get('value', '');
11669      attributes.remove('context').remove('value');
11670      if (!attributes.hasClass(['btn-default', 'btn-primary', 'btn-success', 'btn-info', 'btn-warning', 'btn-danger', 'btn-link'])) {
11671        attributes.addClass('btn-' + Bootstrap.checkPlain(context));
11672      }
11673
11674      // Attempt to, intelligently, provide a default button "type".
11675      if (!attributes.exists('type')) {
11676        attributes.set('type', attributes.hasClass('form-submit') ? 'submit' : 'button');
11677      }
11678
11679      return '<button' + attributes + '>' + label + '</button>';
11680    },
11681
11682    /**
11683     * Alias for "button" theme hook.
11684     *
11685     * @param {object|Attributes} attributes
11686     *   An object of attributes to apply to the button.
11687     *
11688     * @see Drupal.theme.button()
11689     *
11690     * @returns {string}
11691     */
11692    btn: function (attributes) {
11693      return Drupal.theme('button', attributes);
11694    },
11695
11696    /**
11697     * Renders a button block element.
11698     *
11699     * @param {object|Attributes} attributes
11700     *   An object of attributes to apply to the button.
11701     *
11702     * @see Drupal.theme.button()
11703     *
11704     * @returns {string}
11705     */
11706    'btn-block': function (attributes) {
11707      return Drupal.theme('button', Attributes.create(attributes).addClass('btn-block'));
11708    },
11709
11710    /**
11711     * Renders a large button element.
11712     *
11713     * @param {object|Attributes} attributes
11714     *   An object of attributes to apply to the button.
11715     *
11716     * @see Drupal.theme.button()
11717     *
11718     * @returns {string}
11719     */
11720    'btn-lg': function (attributes) {
11721      return Drupal.theme('button', Attributes.create(attributes).addClass('btn-lg'));
11722    },
11723
11724    /**
11725     * Renders a small button element.
11726     *
11727     * @param {object|Attributes} attributes
11728     *   An object of attributes to apply to the button.
11729     *
11730     * @see Drupal.theme.button()
11731     *
11732     * @returns {string}
11733     */
11734    'btn-sm': function (attributes) {
11735      return Drupal.theme('button', Attributes.create(attributes).addClass('btn-sm'));
11736    },
11737
11738    /**
11739     * Renders an extra small button element.
11740     *
11741     * @param {object|Attributes} attributes
11742     *   An object of attributes to apply to the button.
11743     *
11744     * @see Drupal.theme.button()
11745     *
11746     * @returns {string}
11747     */
11748    'btn-xs': function (attributes) {
11749      return Drupal.theme('button', Attributes.create(attributes).addClass('btn-xs'));
11750    },
11751
11752    /**
11753     * Renders a glyphicon.
11754     *
11755     * @param {string} name
11756     *   The name of the glyphicon.
11757     * @param {object|Attributes} [attributes]
11758     *   An object of attributes to apply to the icon.
11759     *
11760     * @returns {string}
11761     */
11762    bootstrapIcon: function (name, attributes) {
11763      return Drupal.theme('icon', 'bootstrap', name, attributes);
11764    }
11765
11766  });
11767
11768})(window.jQuery, window.Drupal, window.Drupal.bootstrap, window.Attributes);
11769;
11770/**
11771 * @file
11772 * Bootstrap Popovers.
11773 */
11774
11775var Drupal = Drupal || {};
11776
11777(function ($, Drupal, Bootstrap) {
11778  "use strict";
11779
11780  var $document = $(document);
11781
11782  /**
11783   * Extend the Bootstrap Popover plugin constructor class.
11784   */
11785  Bootstrap.extendPlugin('popover', function (settings) {
11786    return {
11787      DEFAULTS: {
11788        animation: !!settings.popover_animation,
11789        autoClose: !!settings.popover_auto_close,
11790        enabled: settings.popover_enabled,
11791        html: !!settings.popover_html,
11792        placement: settings.popover_placement,
11793        selector: settings.popover_selector,
11794        trigger: settings.popover_trigger,
11795        title: settings.popover_title,
11796        content: settings.popover_content,
11797        delay: parseInt(settings.popover_delay, 10),
11798        container: settings.popover_container
11799      }
11800    };
11801  });
11802
11803  /**
11804   * Bootstrap Popovers.
11805   *
11806   * @todo This should really be properly delegated if selector option is set.
11807   */
11808  Drupal.behaviors.bootstrapPopovers = {
11809    $activePopover: null,
11810    attach: function (context) {
11811      // Immediately return if popovers are not available.
11812      if (!$.fn.popover || !$.fn.popover.Constructor.DEFAULTS.enabled) {
11813        return;
11814      }
11815
11816      var _this = this;
11817
11818      $document
11819        .on('show.bs.popover', '[data-toggle=popover]', function () {
11820          var $trigger = $(this);
11821          var popover = $trigger.data('bs.popover');
11822
11823          // Only keep track of clicked triggers that we're manually handling.
11824          if (popover.options.originalTrigger === 'click') {
11825            if (_this.$activePopover && _this.getOption('autoClose') && !_this.$activePopover.is($trigger)) {
11826              _this.$activePopover.popover('hide');
11827            }
11828            _this.$activePopover = $trigger;
11829          }
11830        })
11831        // Unfortunately, :focusable is only made available when using jQuery
11832        // UI. While this would be the most semantic pseudo selector to use
11833        // here, jQuery UI may not always be loaded. Instead, just use :visible
11834        // here as this just needs some sort of selector here. This activates
11835        // delegate binding to elements in jQuery so it can work it's bubbling
11836        // focus magic since elements don't really propagate their focus events.
11837        // @see https://www.drupal.org/project/bootstrap/issues/3013236
11838        .on('focus.bs.popover', ':visible', function (e) {
11839          var $target = $(e.target);
11840          if (_this.$activePopover && _this.getOption('autoClose') && !_this.$activePopover.is($target) && !$target.closest('.popover.in')[0]) {
11841            _this.$activePopover.popover('hide');
11842            _this.$activePopover = null;
11843          }
11844        })
11845        .on('click.bs.popover', function (e) {
11846          var $target = $(e.target);
11847          if (_this.$activePopover && _this.getOption('autoClose') && !$target.is('[data-toggle=popover]') && !$target.closest('.popover.in')[0]) {
11848            _this.$activePopover.popover('hide');
11849            _this.$activePopover = null;
11850          }
11851        })
11852        .on('keyup.bs.popover', function (e) {
11853          if (_this.$activePopover && _this.getOption('autoClose') && e.which === 27) {
11854            _this.$activePopover.popover('hide');
11855            _this.$activePopover = null;
11856          }
11857        })
11858      ;
11859
11860      var elements = $(context).find('[data-toggle=popover]').toArray();
11861      for (var i = 0; i < elements.length; i++) {
11862        var $element = $(elements[i]);
11863        var options = $.extend({}, $.fn.popover.Constructor.DEFAULTS, $element.data());
11864
11865        // Store the original trigger.
11866        options.originalTrigger = options.trigger;
11867
11868        // If the trigger is "click", then we'll handle it manually here.
11869        if (options.trigger === 'click') {
11870          options.trigger = 'manual';
11871        }
11872
11873        // Retrieve content from a target element.
11874        var target = options.target || $element.is('a[href^="#"]') && $element.attr('href');
11875        var $target = $document.find(target).clone();
11876        if (!options.content && $target[0]) {
11877          $target.removeClass('visually-hidden hidden').removeAttr('aria-hidden');
11878          options.content = $target.wrap('<div/>').parent()[options.html ? 'html' : 'text']() || '';
11879        }
11880
11881        // Initialize the popover.
11882        $element.popover(options);
11883
11884        // Handle clicks manually.
11885        if (options.originalTrigger === 'click') {
11886          // To ensure the element is bound multiple times, remove any
11887          // previously set event handler before adding another one.
11888          $element
11889            .off('click.drupal.bootstrap.popover')
11890            .on('click.drupal.bootstrap.popover', function (e) {
11891              $(this).popover('toggle');
11892              e.preventDefault();
11893              e.stopPropagation();
11894            })
11895          ;
11896        }
11897      }
11898    },
11899    detach: function (context) {
11900      // Immediately return if popovers are not available.
11901      if (!$.fn.popover || !$.fn.popover.Constructor.DEFAULTS.enabled) {
11902        return;
11903      }
11904
11905      // Destroy all popovers.
11906      $(context).find('[data-toggle="popover"]')
11907        .off('click.drupal.bootstrap.popover')
11908        .popover('destroy')
11909      ;
11910    },
11911    getOption: function(name, defaultValue, element) {
11912      var $element = element ? $(element) : this.$activePopover;
11913      var options = $.extend(true, {}, $.fn.popover.Constructor.DEFAULTS, ($element && $element.data('bs.popover') || {}).options);
11914      if (options[name] !== void 0) {
11915        return options[name];
11916      }
11917      return defaultValue !== void 0 ? defaultValue : void 0;
11918    }
11919  };
11920
11921})(window.jQuery, window.Drupal, window.Drupal.bootstrap);
11922;
11923/**
11924 * @file
11925 * Bootstrap Tooltips.
11926 */
11927
11928var Drupal = Drupal || {};
11929
11930(function ($, Drupal, Bootstrap) {
11931  "use strict";
11932
11933  /**
11934   * Extend the Bootstrap Tooltip plugin constructor class.
11935   */
11936  Bootstrap.extendPlugin('tooltip', function (settings) {
11937    return {
11938      DEFAULTS: {
11939        animation: !!settings.tooltip_animation,
11940        enabled: settings.tooltip_enabled,
11941        html: !!settings.tooltip_html,
11942        placement: settings.tooltip_placement,
11943        selector: settings.tooltip_selector,
11944        trigger: settings.tooltip_trigger,
11945        delay: parseInt(settings.tooltip_delay, 10),
11946        container: settings.tooltip_container
11947      }
11948    };
11949  });
11950
11951  /**
11952   * Bootstrap Tooltips.
11953   *
11954   * @todo This should really be properly delegated if selector option is set.
11955   */
11956  Drupal.behaviors.bootstrapTooltips = {
11957    attach: function (context) {
11958      // Immediately return if tooltips are not available.
11959      if (!$.fn.tooltip || !$.fn.tooltip.Constructor.DEFAULTS.enabled) {
11960        return;
11961      }
11962
11963      var elements = $(context).find('[data-toggle="tooltip"]').toArray();
11964      for (var i = 0; i < elements.length; i++) {
11965        var $element = $(elements[i]);
11966        var options = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, $element.data());
11967        $element.tooltip(options);
11968      }
11969    },
11970    detach: function (context) {
11971      // Immediately return if tooltips are not available.
11972      if (!$.fn.tooltip || !$.fn.tooltip.Constructor.DEFAULTS.enabled) {
11973        return;
11974      }
11975
11976      // Destroy all tooltips.
11977      $(context).find('[data-toggle="tooltip"]').tooltip('destroy');
11978    }
11979  };
11980
11981})(window.jQuery, window.Drupal, window.Drupal.bootstrap);
11982;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.