├── LICENSE
├── README.md
├── bootstrap
├── bootstrap.css
├── bootstrap.css.map
└── bootstrap.js
├── css
└── app.css
├── index.html
├── js
├── README.md
├── angular-cookie.min.js
├── angular-ui-router.min.js
├── angular.js
├── app.js
├── jquery.min.js
└── ng-ckeditor.js
└── partials
├── createAccountModal.html
├── main.html
└── navbar.html
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Scotho
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | What's it do?
3 | ---------------------
4 | *Firebased was designed to be a starting point for any AngularFire (AngularJS+Firebase) web application. Here are a few feature highlights...*
5 |
6 | - Account handling (includes cookie session storage)
7 | - [Dead simple three way data binding](https://www.firebase.com/blog/2013-10-04-firebase-angular-data-binding.html) on user-specific arrays. *(Confused? Open 2 demo pages simultaneously and modify some text)*
8 | - A functional and responsive bootstrap template
9 | - Implements a wide range of Angular, Firebase, and MVC concepts out of the box.
10 |
11 | Depends on [Bootstrap](http://getbootstrap.com/), [jQuery](https://jquery.com/), [firebase](https://www.firebase.com/), [angularfire](https://www.firebase.com/docs/web/libraries/angular/), and [angular-cookie](https://github.com/ivpusic/angular-cookie)
12 |
13 | [Click here to see the demo](http://craigryansmith.com/firebased/)
14 |
15 |
16 | How do I get started?
17 | ---------------------
18 | *To get started, simply change "appName" at the top of app.js to your [firebase](https://www.firebase.com) appName and run index.html. Currently, all logic is contained in the controllers found in app.js*
19 |
20 | - Please note that this is a beta version of which is still under developmet. Any and all contributions are greatly appreciated!
21 |
22 | *Documentation coming soon!*
23 |
24 |
--------------------------------------------------------------------------------
/bootstrap/bootstrap.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap v3.3.2 (http://getbootstrap.com)
3 | * Copyright 2011-2015 Twitter, Inc.
4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5 | */
6 |
7 | if (typeof jQuery === 'undefined') {
8 | throw new Error('Bootstrap\'s JavaScript requires jQuery')
9 | }
10 |
11 | +function ($) {
12 | 'use strict';
13 | var version = $.fn.jquery.split(' ')[0].split('.')
14 | if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {
15 | throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher')
16 | }
17 | }(jQuery);
18 |
19 | /* ========================================================================
20 | * Bootstrap: transition.js v3.3.2
21 | * http://getbootstrap.com/javascript/#transitions
22 | * ========================================================================
23 | * Copyright 2011-2015 Twitter, Inc.
24 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
25 | * ======================================================================== */
26 |
27 |
28 | +function ($) {
29 | 'use strict';
30 |
31 | // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
32 | // ============================================================
33 |
34 | function transitionEnd() {
35 | var el = document.createElement('bootstrap')
36 |
37 | var transEndEventNames = {
38 | WebkitTransition : 'webkitTransitionEnd',
39 | MozTransition : 'transitionend',
40 | OTransition : 'oTransitionEnd otransitionend',
41 | transition : 'transitionend'
42 | }
43 |
44 | for (var name in transEndEventNames) {
45 | if (el.style[name] !== undefined) {
46 | return { end: transEndEventNames[name] }
47 | }
48 | }
49 |
50 | return false // explicit for ie8 ( ._.)
51 | }
52 |
53 | // http://blog.alexmaccaw.com/css-transitions
54 | $.fn.emulateTransitionEnd = function (duration) {
55 | var called = false
56 | var $el = this
57 | $(this).one('bsTransitionEnd', function () { called = true })
58 | var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
59 | setTimeout(callback, duration)
60 | return this
61 | }
62 |
63 | $(function () {
64 | $.support.transition = transitionEnd()
65 |
66 | if (!$.support.transition) return
67 |
68 | $.event.special.bsTransitionEnd = {
69 | bindType: $.support.transition.end,
70 | delegateType: $.support.transition.end,
71 | handle: function (e) {
72 | if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
73 | }
74 | }
75 | })
76 |
77 | }(jQuery);
78 |
79 | /* ========================================================================
80 | * Bootstrap: alert.js v3.3.2
81 | * http://getbootstrap.com/javascript/#alerts
82 | * ========================================================================
83 | * Copyright 2011-2015 Twitter, Inc.
84 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
85 | * ======================================================================== */
86 |
87 |
88 | +function ($) {
89 | 'use strict';
90 |
91 | // ALERT CLASS DEFINITION
92 | // ======================
93 |
94 | var dismiss = '[data-dismiss="alert"]'
95 | var Alert = function (el) {
96 | $(el).on('click', dismiss, this.close)
97 | }
98 |
99 | Alert.VERSION = '3.3.2'
100 |
101 | Alert.TRANSITION_DURATION = 150
102 |
103 | Alert.prototype.close = function (e) {
104 | var $this = $(this)
105 | var selector = $this.attr('data-target')
106 |
107 | if (!selector) {
108 | selector = $this.attr('href')
109 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
110 | }
111 |
112 | var $parent = $(selector)
113 |
114 | if (e) e.preventDefault()
115 |
116 | if (!$parent.length) {
117 | $parent = $this.closest('.alert')
118 | }
119 |
120 | $parent.trigger(e = $.Event('close.bs.alert'))
121 |
122 | if (e.isDefaultPrevented()) return
123 |
124 | $parent.removeClass('in')
125 |
126 | function removeElement() {
127 | // detach from parent, fire event then clean up data
128 | $parent.detach().trigger('closed.bs.alert').remove()
129 | }
130 |
131 | $.support.transition && $parent.hasClass('fade') ?
132 | $parent
133 | .one('bsTransitionEnd', removeElement)
134 | .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
135 | removeElement()
136 | }
137 |
138 |
139 | // ALERT PLUGIN DEFINITION
140 | // =======================
141 |
142 | function Plugin(option) {
143 | return this.each(function () {
144 | var $this = $(this)
145 | var data = $this.data('bs.alert')
146 |
147 | if (!data) $this.data('bs.alert', (data = new Alert(this)))
148 | if (typeof option == 'string') data[option].call($this)
149 | })
150 | }
151 |
152 | var old = $.fn.alert
153 |
154 | $.fn.alert = Plugin
155 | $.fn.alert.Constructor = Alert
156 |
157 |
158 | // ALERT NO CONFLICT
159 | // =================
160 |
161 | $.fn.alert.noConflict = function () {
162 | $.fn.alert = old
163 | return this
164 | }
165 |
166 |
167 | // ALERT DATA-API
168 | // ==============
169 |
170 | $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
171 |
172 | }(jQuery);
173 |
174 | /* ========================================================================
175 | * Bootstrap: button.js v3.3.2
176 | * http://getbootstrap.com/javascript/#buttons
177 | * ========================================================================
178 | * Copyright 2011-2015 Twitter, Inc.
179 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
180 | * ======================================================================== */
181 |
182 |
183 | +function ($) {
184 | 'use strict';
185 |
186 | // BUTTON PUBLIC CLASS DEFINITION
187 | // ==============================
188 |
189 | var Button = function (element, options) {
190 | this.$element = $(element)
191 | this.options = $.extend({}, Button.DEFAULTS, options)
192 | this.isLoading = false
193 | }
194 |
195 | Button.VERSION = '3.3.2'
196 |
197 | Button.DEFAULTS = {
198 | loadingText: 'loading...'
199 | }
200 |
201 | Button.prototype.setState = function (state) {
202 | var d = 'disabled'
203 | var $el = this.$element
204 | var val = $el.is('input') ? 'val' : 'html'
205 | var data = $el.data()
206 |
207 | state = state + 'Text'
208 |
209 | if (data.resetText == null) $el.data('resetText', $el[val]())
210 |
211 | // push to event loop to allow forms to submit
212 | setTimeout($.proxy(function () {
213 | $el[val](data[state] == null ? this.options[state] : data[state])
214 |
215 | if (state == 'loadingText') {
216 | this.isLoading = true
217 | $el.addClass(d).attr(d, d)
218 | } else if (this.isLoading) {
219 | this.isLoading = false
220 | $el.removeClass(d).removeAttr(d)
221 | }
222 | }, this), 0)
223 | }
224 |
225 | Button.prototype.toggle = function () {
226 | var changed = true
227 | var $parent = this.$element.closest('[data-toggle="buttons"]')
228 |
229 | if ($parent.length) {
230 | var $input = this.$element.find('input')
231 | if ($input.prop('type') == 'radio') {
232 | if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
233 | else $parent.find('.active').removeClass('active')
234 | }
235 | if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
236 | } else {
237 | this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
238 | }
239 |
240 | if (changed) this.$element.toggleClass('active')
241 | }
242 |
243 |
244 | // BUTTON PLUGIN DEFINITION
245 | // ========================
246 |
247 | function Plugin(option) {
248 | return this.each(function () {
249 | var $this = $(this)
250 | var data = $this.data('bs.button')
251 | var options = typeof option == 'object' && option
252 |
253 | if (!data) $this.data('bs.button', (data = new Button(this, options)))
254 |
255 | if (option == 'toggle') data.toggle()
256 | else if (option) data.setState(option)
257 | })
258 | }
259 |
260 | var old = $.fn.button
261 |
262 | $.fn.button = Plugin
263 | $.fn.button.Constructor = Button
264 |
265 |
266 | // BUTTON NO CONFLICT
267 | // ==================
268 |
269 | $.fn.button.noConflict = function () {
270 | $.fn.button = old
271 | return this
272 | }
273 |
274 |
275 | // BUTTON DATA-API
276 | // ===============
277 |
278 | $(document)
279 | .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
280 | var $btn = $(e.target)
281 | if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
282 | Plugin.call($btn, 'toggle')
283 | e.preventDefault()
284 | })
285 | .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
286 | $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
287 | })
288 |
289 | }(jQuery);
290 |
291 | /* ========================================================================
292 | * Bootstrap: carousel.js v3.3.2
293 | * http://getbootstrap.com/javascript/#carousel
294 | * ========================================================================
295 | * Copyright 2011-2015 Twitter, Inc.
296 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
297 | * ======================================================================== */
298 |
299 |
300 | +function ($) {
301 | 'use strict';
302 |
303 | // CAROUSEL CLASS DEFINITION
304 | // =========================
305 |
306 | var Carousel = function (element, options) {
307 | this.$element = $(element)
308 | this.$indicators = this.$element.find('.carousel-indicators')
309 | this.options = options
310 | this.paused =
311 | this.sliding =
312 | this.interval =
313 | this.$active =
314 | this.$items = null
315 |
316 | this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
317 |
318 | this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
319 | .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
320 | .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
321 | }
322 |
323 | Carousel.VERSION = '3.3.2'
324 |
325 | Carousel.TRANSITION_DURATION = 600
326 |
327 | Carousel.DEFAULTS = {
328 | interval: 5000,
329 | pause: 'hover',
330 | wrap: true,
331 | keyboard: true
332 | }
333 |
334 | Carousel.prototype.keydown = function (e) {
335 | if (/input|textarea/i.test(e.target.tagName)) return
336 | switch (e.which) {
337 | case 37: this.prev(); break
338 | case 39: this.next(); break
339 | default: return
340 | }
341 |
342 | e.preventDefault()
343 | }
344 |
345 | Carousel.prototype.cycle = function (e) {
346 | e || (this.paused = false)
347 |
348 | this.interval && clearInterval(this.interval)
349 |
350 | this.options.interval
351 | && !this.paused
352 | && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
353 |
354 | return this
355 | }
356 |
357 | Carousel.prototype.getItemIndex = function (item) {
358 | this.$items = item.parent().children('.item')
359 | return this.$items.index(item || this.$active)
360 | }
361 |
362 | Carousel.prototype.getItemForDirection = function (direction, active) {
363 | var activeIndex = this.getItemIndex(active)
364 | var willWrap = (direction == 'prev' && activeIndex === 0)
365 | || (direction == 'next' && activeIndex == (this.$items.length - 1))
366 | if (willWrap && !this.options.wrap) return active
367 | var delta = direction == 'prev' ? -1 : 1
368 | var itemIndex = (activeIndex + delta) % this.$items.length
369 | return this.$items.eq(itemIndex)
370 | }
371 |
372 | Carousel.prototype.to = function (pos) {
373 | var that = this
374 | var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
375 |
376 | if (pos > (this.$items.length - 1) || pos < 0) return
377 |
378 | if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
379 | if (activeIndex == pos) return this.pause().cycle()
380 |
381 | return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
382 | }
383 |
384 | Carousel.prototype.pause = function (e) {
385 | e || (this.paused = true)
386 |
387 | if (this.$element.find('.next, .prev').length && $.support.transition) {
388 | this.$element.trigger($.support.transition.end)
389 | this.cycle(true)
390 | }
391 |
392 | this.interval = clearInterval(this.interval)
393 |
394 | return this
395 | }
396 |
397 | Carousel.prototype.next = function () {
398 | if (this.sliding) return
399 | return this.slide('next')
400 | }
401 |
402 | Carousel.prototype.prev = function () {
403 | if (this.sliding) return
404 | return this.slide('prev')
405 | }
406 |
407 | Carousel.prototype.slide = function (type, next) {
408 | var $active = this.$element.find('.item.active')
409 | var $next = next || this.getItemForDirection(type, $active)
410 | var isCycling = this.interval
411 | var direction = type == 'next' ? 'left' : 'right'
412 | var that = this
413 |
414 | if ($next.hasClass('active')) return (this.sliding = false)
415 |
416 | var relatedTarget = $next[0]
417 | var slideEvent = $.Event('slide.bs.carousel', {
418 | relatedTarget: relatedTarget,
419 | direction: direction
420 | })
421 | this.$element.trigger(slideEvent)
422 | if (slideEvent.isDefaultPrevented()) return
423 |
424 | this.sliding = true
425 |
426 | isCycling && this.pause()
427 |
428 | if (this.$indicators.length) {
429 | this.$indicators.find('.active').removeClass('active')
430 | var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
431 | $nextIndicator && $nextIndicator.addClass('active')
432 | }
433 |
434 | var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
435 | if ($.support.transition && this.$element.hasClass('slide')) {
436 | $next.addClass(type)
437 | $next[0].offsetWidth // force reflow
438 | $active.addClass(direction)
439 | $next.addClass(direction)
440 | $active
441 | .one('bsTransitionEnd', function () {
442 | $next.removeClass([type, direction].join(' ')).addClass('active')
443 | $active.removeClass(['active', direction].join(' '))
444 | that.sliding = false
445 | setTimeout(function () {
446 | that.$element.trigger(slidEvent)
447 | }, 0)
448 | })
449 | .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
450 | } else {
451 | $active.removeClass('active')
452 | $next.addClass('active')
453 | this.sliding = false
454 | this.$element.trigger(slidEvent)
455 | }
456 |
457 | isCycling && this.cycle()
458 |
459 | return this
460 | }
461 |
462 |
463 | // CAROUSEL PLUGIN DEFINITION
464 | // ==========================
465 |
466 | function Plugin(option) {
467 | return this.each(function () {
468 | var $this = $(this)
469 | var data = $this.data('bs.carousel')
470 | var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
471 | var action = typeof option == 'string' ? option : options.slide
472 |
473 | if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
474 | if (typeof option == 'number') data.to(option)
475 | else if (action) data[action]()
476 | else if (options.interval) data.pause().cycle()
477 | })
478 | }
479 |
480 | var old = $.fn.carousel
481 |
482 | $.fn.carousel = Plugin
483 | $.fn.carousel.Constructor = Carousel
484 |
485 |
486 | // CAROUSEL NO CONFLICT
487 | // ====================
488 |
489 | $.fn.carousel.noConflict = function () {
490 | $.fn.carousel = old
491 | return this
492 | }
493 |
494 |
495 | // CAROUSEL DATA-API
496 | // =================
497 |
498 | var clickHandler = function (e) {
499 | var href
500 | var $this = $(this)
501 | var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
502 | if (!$target.hasClass('carousel')) return
503 | var options = $.extend({}, $target.data(), $this.data())
504 | var slideIndex = $this.attr('data-slide-to')
505 | if (slideIndex) options.interval = false
506 |
507 | Plugin.call($target, options)
508 |
509 | if (slideIndex) {
510 | $target.data('bs.carousel').to(slideIndex)
511 | }
512 |
513 | e.preventDefault()
514 | }
515 |
516 | $(document)
517 | .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
518 | .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
519 |
520 | $(window).on('load', function () {
521 | $('[data-ride="carousel"]').each(function () {
522 | var $carousel = $(this)
523 | Plugin.call($carousel, $carousel.data())
524 | })
525 | })
526 |
527 | }(jQuery);
528 |
529 | /* ========================================================================
530 | * Bootstrap: collapse.js v3.3.2
531 | * http://getbootstrap.com/javascript/#collapse
532 | * ========================================================================
533 | * Copyright 2011-2015 Twitter, Inc.
534 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
535 | * ======================================================================== */
536 |
537 |
538 | +function ($) {
539 | 'use strict';
540 |
541 | // COLLAPSE PUBLIC CLASS DEFINITION
542 | // ================================
543 |
544 | var Collapse = function (element, options) {
545 | this.$element = $(element)
546 | this.options = $.extend({}, Collapse.DEFAULTS, options)
547 | this.$trigger = $(this.options.trigger).filter('[href="#' + element.id + '"], [data-target="#' + element.id + '"]')
548 | this.transitioning = null
549 |
550 | if (this.options.parent) {
551 | this.$parent = this.getParent()
552 | } else {
553 | this.addAriaAndCollapsedClass(this.$element, this.$trigger)
554 | }
555 |
556 | if (this.options.toggle) this.toggle()
557 | }
558 |
559 | Collapse.VERSION = '3.3.2'
560 |
561 | Collapse.TRANSITION_DURATION = 350
562 |
563 | Collapse.DEFAULTS = {
564 | toggle: true,
565 | trigger: '[data-toggle="collapse"]'
566 | }
567 |
568 | Collapse.prototype.dimension = function () {
569 | var hasWidth = this.$element.hasClass('width')
570 | return hasWidth ? 'width' : 'height'
571 | }
572 |
573 | Collapse.prototype.show = function () {
574 | if (this.transitioning || this.$element.hasClass('in')) return
575 |
576 | var activesData
577 | var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
578 |
579 | if (actives && actives.length) {
580 | activesData = actives.data('bs.collapse')
581 | if (activesData && activesData.transitioning) return
582 | }
583 |
584 | var startEvent = $.Event('show.bs.collapse')
585 | this.$element.trigger(startEvent)
586 | if (startEvent.isDefaultPrevented()) return
587 |
588 | if (actives && actives.length) {
589 | Plugin.call(actives, 'hide')
590 | activesData || actives.data('bs.collapse', null)
591 | }
592 |
593 | var dimension = this.dimension()
594 |
595 | this.$element
596 | .removeClass('collapse')
597 | .addClass('collapsing')[dimension](0)
598 | .attr('aria-expanded', true)
599 |
600 | this.$trigger
601 | .removeClass('collapsed')
602 | .attr('aria-expanded', true)
603 |
604 | this.transitioning = 1
605 |
606 | var complete = function () {
607 | this.$element
608 | .removeClass('collapsing')
609 | .addClass('collapse in')[dimension]('')
610 | this.transitioning = 0
611 | this.$element
612 | .trigger('shown.bs.collapse')
613 | }
614 |
615 | if (!$.support.transition) return complete.call(this)
616 |
617 | var scrollSize = $.camelCase(['scroll', dimension].join('-'))
618 |
619 | this.$element
620 | .one('bsTransitionEnd', $.proxy(complete, this))
621 | .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
622 | }
623 |
624 | Collapse.prototype.hide = function () {
625 | if (this.transitioning || !this.$element.hasClass('in')) return
626 |
627 | var startEvent = $.Event('hide.bs.collapse')
628 | this.$element.trigger(startEvent)
629 | if (startEvent.isDefaultPrevented()) return
630 |
631 | var dimension = this.dimension()
632 |
633 | this.$element[dimension](this.$element[dimension]())[0].offsetHeight
634 |
635 | this.$element
636 | .addClass('collapsing')
637 | .removeClass('collapse in')
638 | .attr('aria-expanded', false)
639 |
640 | this.$trigger
641 | .addClass('collapsed')
642 | .attr('aria-expanded', false)
643 |
644 | this.transitioning = 1
645 |
646 | var complete = function () {
647 | this.transitioning = 0
648 | this.$element
649 | .removeClass('collapsing')
650 | .addClass('collapse')
651 | .trigger('hidden.bs.collapse')
652 | }
653 |
654 | if (!$.support.transition) return complete.call(this)
655 |
656 | this.$element
657 | [dimension](0)
658 | .one('bsTransitionEnd', $.proxy(complete, this))
659 | .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
660 | }
661 |
662 | Collapse.prototype.toggle = function () {
663 | this[this.$element.hasClass('in') ? 'hide' : 'show']()
664 | }
665 |
666 | Collapse.prototype.getParent = function () {
667 | return $(this.options.parent)
668 | .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
669 | .each($.proxy(function (i, element) {
670 | var $element = $(element)
671 | this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
672 | }, this))
673 | .end()
674 | }
675 |
676 | Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
677 | var isOpen = $element.hasClass('in')
678 |
679 | $element.attr('aria-expanded', isOpen)
680 | $trigger
681 | .toggleClass('collapsed', !isOpen)
682 | .attr('aria-expanded', isOpen)
683 | }
684 |
685 | function getTargetFromTrigger($trigger) {
686 | var href
687 | var target = $trigger.attr('data-target')
688 | || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
689 |
690 | return $(target)
691 | }
692 |
693 |
694 | // COLLAPSE PLUGIN DEFINITION
695 | // ==========================
696 |
697 | function Plugin(option) {
698 | return this.each(function () {
699 | var $this = $(this)
700 | var data = $this.data('bs.collapse')
701 | var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
702 |
703 | if (!data && options.toggle && option == 'show') options.toggle = false
704 | if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
705 | if (typeof option == 'string') data[option]()
706 | })
707 | }
708 |
709 | var old = $.fn.collapse
710 |
711 | $.fn.collapse = Plugin
712 | $.fn.collapse.Constructor = Collapse
713 |
714 |
715 | // COLLAPSE NO CONFLICT
716 | // ====================
717 |
718 | $.fn.collapse.noConflict = function () {
719 | $.fn.collapse = old
720 | return this
721 | }
722 |
723 |
724 | // COLLAPSE DATA-API
725 | // =================
726 |
727 | $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
728 | var $this = $(this)
729 |
730 | if (!$this.attr('data-target')) e.preventDefault()
731 |
732 | var $target = getTargetFromTrigger($this)
733 | var data = $target.data('bs.collapse')
734 | var option = data ? 'toggle' : $.extend({}, $this.data(), { trigger: this })
735 |
736 | Plugin.call($target, option)
737 | })
738 |
739 | }(jQuery);
740 |
741 | /* ========================================================================
742 | * Bootstrap: dropdown.js v3.3.2
743 | * http://getbootstrap.com/javascript/#dropdowns
744 | * ========================================================================
745 | * Copyright 2011-2015 Twitter, Inc.
746 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
747 | * ======================================================================== */
748 |
749 |
750 | +function ($) {
751 | 'use strict';
752 |
753 | // DROPDOWN CLASS DEFINITION
754 | // =========================
755 |
756 | var backdrop = '.dropdown-backdrop'
757 | var toggle = '[data-toggle="dropdown"]'
758 | var Dropdown = function (element) {
759 | $(element).on('click.bs.dropdown', this.toggle)
760 | }
761 |
762 | Dropdown.VERSION = '3.3.2'
763 |
764 | Dropdown.prototype.toggle = function (e) {
765 | var $this = $(this)
766 |
767 | if ($this.is('.disabled, :disabled')) return
768 |
769 | var $parent = getParent($this)
770 | var isActive = $parent.hasClass('open')
771 |
772 | clearMenus()
773 |
774 | if (!isActive) {
775 | if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
776 | // if mobile we use a backdrop because click events don't delegate
777 | $('
').insertAfter($(this)).on('click', clearMenus)
778 | }
779 |
780 | var relatedTarget = { relatedTarget: this }
781 | $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
782 |
783 | if (e.isDefaultPrevented()) return
784 |
785 | $this
786 | .trigger('focus')
787 | .attr('aria-expanded', 'true')
788 |
789 | $parent
790 | .toggleClass('open')
791 | .trigger('shown.bs.dropdown', relatedTarget)
792 | }
793 |
794 | return false
795 | }
796 |
797 | Dropdown.prototype.keydown = function (e) {
798 | if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
799 |
800 | var $this = $(this)
801 |
802 | e.preventDefault()
803 | e.stopPropagation()
804 |
805 | if ($this.is('.disabled, :disabled')) return
806 |
807 | var $parent = getParent($this)
808 | var isActive = $parent.hasClass('open')
809 |
810 | if ((!isActive && e.which != 27) || (isActive && e.which == 27)) {
811 | if (e.which == 27) $parent.find(toggle).trigger('focus')
812 | return $this.trigger('click')
813 | }
814 |
815 | var desc = ' li:not(.divider):visible a'
816 | var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
817 |
818 | if (!$items.length) return
819 |
820 | var index = $items.index(e.target)
821 |
822 | if (e.which == 38 && index > 0) index-- // up
823 | if (e.which == 40 && index < $items.length - 1) index++ // down
824 | if (!~index) index = 0
825 |
826 | $items.eq(index).trigger('focus')
827 | }
828 |
829 | function clearMenus(e) {
830 | if (e && e.which === 3) return
831 | $(backdrop).remove()
832 | $(toggle).each(function () {
833 | var $this = $(this)
834 | var $parent = getParent($this)
835 | var relatedTarget = { relatedTarget: this }
836 |
837 | if (!$parent.hasClass('open')) return
838 |
839 | $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
840 |
841 | if (e.isDefaultPrevented()) return
842 |
843 | $this.attr('aria-expanded', 'false')
844 | $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
845 | })
846 | }
847 |
848 | function getParent($this) {
849 | var selector = $this.attr('data-target')
850 |
851 | if (!selector) {
852 | selector = $this.attr('href')
853 | selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
854 | }
855 |
856 | var $parent = selector && $(selector)
857 |
858 | return $parent && $parent.length ? $parent : $this.parent()
859 | }
860 |
861 |
862 | // DROPDOWN PLUGIN DEFINITION
863 | // ==========================
864 |
865 | function Plugin(option) {
866 | return this.each(function () {
867 | var $this = $(this)
868 | var data = $this.data('bs.dropdown')
869 |
870 | if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
871 | if (typeof option == 'string') data[option].call($this)
872 | })
873 | }
874 |
875 | var old = $.fn.dropdown
876 |
877 | $.fn.dropdown = Plugin
878 | $.fn.dropdown.Constructor = Dropdown
879 |
880 |
881 | // DROPDOWN NO CONFLICT
882 | // ====================
883 |
884 | $.fn.dropdown.noConflict = function () {
885 | $.fn.dropdown = old
886 | return this
887 | }
888 |
889 |
890 | // APPLY TO STANDARD DROPDOWN ELEMENTS
891 | // ===================================
892 |
893 | $(document)
894 | .on('click.bs.dropdown.data-api', clearMenus)
895 | .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
896 | .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
897 | .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
898 | .on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
899 | .on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
900 |
901 | }(jQuery);
902 |
903 | /* ========================================================================
904 | * Bootstrap: modal.js v3.3.2
905 | * http://getbootstrap.com/javascript/#modals
906 | * ========================================================================
907 | * Copyright 2011-2015 Twitter, Inc.
908 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
909 | * ======================================================================== */
910 |
911 |
912 | +function ($) {
913 | 'use strict';
914 |
915 | // MODAL CLASS DEFINITION
916 | // ======================
917 |
918 | var Modal = function (element, options) {
919 | this.options = options
920 | this.$body = $(document.body)
921 | this.$element = $(element)
922 | this.$backdrop =
923 | this.isShown = null
924 | this.scrollbarWidth = 0
925 |
926 | if (this.options.remote) {
927 | this.$element
928 | .find('.modal-content')
929 | .load(this.options.remote, $.proxy(function () {
930 | this.$element.trigger('loaded.bs.modal')
931 | }, this))
932 | }
933 | }
934 |
935 | Modal.VERSION = '3.3.2'
936 |
937 | Modal.TRANSITION_DURATION = 300
938 | Modal.BACKDROP_TRANSITION_DURATION = 150
939 |
940 | Modal.DEFAULTS = {
941 | backdrop: true,
942 | keyboard: true,
943 | show: true
944 | }
945 |
946 | Modal.prototype.toggle = function (_relatedTarget) {
947 | return this.isShown ? this.hide() : this.show(_relatedTarget)
948 | }
949 |
950 | Modal.prototype.show = function (_relatedTarget) {
951 | var that = this
952 | var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
953 |
954 | this.$element.trigger(e)
955 |
956 | if (this.isShown || e.isDefaultPrevented()) return
957 |
958 | this.isShown = true
959 |
960 | this.checkScrollbar()
961 | this.setScrollbar()
962 | this.$body.addClass('modal-open')
963 |
964 | this.escape()
965 | this.resize()
966 |
967 | this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
968 |
969 | this.backdrop(function () {
970 | var transition = $.support.transition && that.$element.hasClass('fade')
971 |
972 | if (!that.$element.parent().length) {
973 | that.$element.appendTo(that.$body) // don't move modals dom position
974 | }
975 |
976 | that.$element
977 | .show()
978 | .scrollTop(0)
979 |
980 | if (that.options.backdrop) that.adjustBackdrop()
981 | that.adjustDialog()
982 |
983 | if (transition) {
984 | that.$element[0].offsetWidth // force reflow
985 | }
986 |
987 | that.$element
988 | .addClass('in')
989 | .attr('aria-hidden', false)
990 |
991 | that.enforceFocus()
992 |
993 | var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
994 |
995 | transition ?
996 | that.$element.find('.modal-dialog') // wait for modal to slide in
997 | .one('bsTransitionEnd', function () {
998 | that.$element.trigger('focus').trigger(e)
999 | })
1000 | .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
1001 | that.$element.trigger('focus').trigger(e)
1002 | })
1003 | }
1004 |
1005 | Modal.prototype.hide = function (e) {
1006 | if (e) e.preventDefault()
1007 |
1008 | e = $.Event('hide.bs.modal')
1009 |
1010 | this.$element.trigger(e)
1011 |
1012 | if (!this.isShown || e.isDefaultPrevented()) return
1013 |
1014 | this.isShown = false
1015 |
1016 | this.escape()
1017 | this.resize()
1018 |
1019 | $(document).off('focusin.bs.modal')
1020 |
1021 | this.$element
1022 | .removeClass('in')
1023 | .attr('aria-hidden', true)
1024 | .off('click.dismiss.bs.modal')
1025 |
1026 | $.support.transition && this.$element.hasClass('fade') ?
1027 | this.$element
1028 | .one('bsTransitionEnd', $.proxy(this.hideModal, this))
1029 | .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
1030 | this.hideModal()
1031 | }
1032 |
1033 | Modal.prototype.enforceFocus = function () {
1034 | $(document)
1035 | .off('focusin.bs.modal') // guard against infinite focus loop
1036 | .on('focusin.bs.modal', $.proxy(function (e) {
1037 | if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
1038 | this.$element.trigger('focus')
1039 | }
1040 | }, this))
1041 | }
1042 |
1043 | Modal.prototype.escape = function () {
1044 | if (this.isShown && this.options.keyboard) {
1045 | this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
1046 | e.which == 27 && this.hide()
1047 | }, this))
1048 | } else if (!this.isShown) {
1049 | this.$element.off('keydown.dismiss.bs.modal')
1050 | }
1051 | }
1052 |
1053 | Modal.prototype.resize = function () {
1054 | if (this.isShown) {
1055 | $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
1056 | } else {
1057 | $(window).off('resize.bs.modal')
1058 | }
1059 | }
1060 |
1061 | Modal.prototype.hideModal = function () {
1062 | var that = this
1063 | this.$element.hide()
1064 | this.backdrop(function () {
1065 | that.$body.removeClass('modal-open')
1066 | that.resetAdjustments()
1067 | that.resetScrollbar()
1068 | that.$element.trigger('hidden.bs.modal')
1069 | })
1070 | }
1071 |
1072 | Modal.prototype.removeBackdrop = function () {
1073 | this.$backdrop && this.$backdrop.remove()
1074 | this.$backdrop = null
1075 | }
1076 |
1077 | Modal.prototype.backdrop = function (callback) {
1078 | var that = this
1079 | var animate = this.$element.hasClass('fade') ? 'fade' : ''
1080 |
1081 | if (this.isShown && this.options.backdrop) {
1082 | var doAnimate = $.support.transition && animate
1083 |
1084 | this.$backdrop = $('')
1085 | .prependTo(this.$element)
1086 | .on('click.dismiss.bs.modal', $.proxy(function (e) {
1087 | if (e.target !== e.currentTarget) return
1088 | this.options.backdrop == 'static'
1089 | ? this.$element[0].focus.call(this.$element[0])
1090 | : this.hide.call(this)
1091 | }, this))
1092 |
1093 | if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
1094 |
1095 | this.$backdrop.addClass('in')
1096 |
1097 | if (!callback) return
1098 |
1099 | doAnimate ?
1100 | this.$backdrop
1101 | .one('bsTransitionEnd', callback)
1102 | .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
1103 | callback()
1104 |
1105 | } else if (!this.isShown && this.$backdrop) {
1106 | this.$backdrop.removeClass('in')
1107 |
1108 | var callbackRemove = function () {
1109 | that.removeBackdrop()
1110 | callback && callback()
1111 | }
1112 | $.support.transition && this.$element.hasClass('fade') ?
1113 | this.$backdrop
1114 | .one('bsTransitionEnd', callbackRemove)
1115 | .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
1116 | callbackRemove()
1117 |
1118 | } else if (callback) {
1119 | callback()
1120 | }
1121 | }
1122 |
1123 | // these following methods are used to handle overflowing modals
1124 |
1125 | Modal.prototype.handleUpdate = function () {
1126 | if (this.options.backdrop) this.adjustBackdrop()
1127 | this.adjustDialog()
1128 | }
1129 |
1130 | Modal.prototype.adjustBackdrop = function () {
1131 | this.$backdrop
1132 | .css('height', 0)
1133 | .css('height', this.$element[0].scrollHeight)
1134 | }
1135 |
1136 | Modal.prototype.adjustDialog = function () {
1137 | var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
1138 |
1139 | this.$element.css({
1140 | paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
1141 | paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
1142 | })
1143 | }
1144 |
1145 | Modal.prototype.resetAdjustments = function () {
1146 | this.$element.css({
1147 | paddingLeft: '',
1148 | paddingRight: ''
1149 | })
1150 | }
1151 |
1152 | Modal.prototype.checkScrollbar = function () {
1153 | this.bodyIsOverflowing = document.body.scrollHeight > document.documentElement.clientHeight
1154 | this.scrollbarWidth = this.measureScrollbar()
1155 | }
1156 |
1157 | Modal.prototype.setScrollbar = function () {
1158 | var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
1159 | if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
1160 | }
1161 |
1162 | Modal.prototype.resetScrollbar = function () {
1163 | this.$body.css('padding-right', '')
1164 | }
1165 |
1166 | Modal.prototype.measureScrollbar = function () { // thx walsh
1167 | var scrollDiv = document.createElement('div')
1168 | scrollDiv.className = 'modal-scrollbar-measure'
1169 | this.$body.append(scrollDiv)
1170 | var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
1171 | this.$body[0].removeChild(scrollDiv)
1172 | return scrollbarWidth
1173 | }
1174 |
1175 |
1176 | // MODAL PLUGIN DEFINITION
1177 | // =======================
1178 |
1179 | function Plugin(option, _relatedTarget) {
1180 | return this.each(function () {
1181 | var $this = $(this)
1182 | var data = $this.data('bs.modal')
1183 | var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
1184 |
1185 | if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
1186 | if (typeof option == 'string') data[option](_relatedTarget)
1187 | else if (options.show) data.show(_relatedTarget)
1188 | })
1189 | }
1190 |
1191 | var old = $.fn.modal
1192 |
1193 | $.fn.modal = Plugin
1194 | $.fn.modal.Constructor = Modal
1195 |
1196 |
1197 | // MODAL NO CONFLICT
1198 | // =================
1199 |
1200 | $.fn.modal.noConflict = function () {
1201 | $.fn.modal = old
1202 | return this
1203 | }
1204 |
1205 |
1206 | // MODAL DATA-API
1207 | // ==============
1208 |
1209 | $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
1210 | var $this = $(this)
1211 | var href = $this.attr('href')
1212 | var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
1213 | var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
1214 |
1215 | if ($this.is('a')) e.preventDefault()
1216 |
1217 | $target.one('show.bs.modal', function (showEvent) {
1218 | if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
1219 | $target.one('hidden.bs.modal', function () {
1220 | $this.is(':visible') && $this.trigger('focus')
1221 | })
1222 | })
1223 | Plugin.call($target, option, this)
1224 | })
1225 |
1226 | }(jQuery);
1227 |
1228 | /* ========================================================================
1229 | * Bootstrap: tooltip.js v3.3.2
1230 | * http://getbootstrap.com/javascript/#tooltip
1231 | * Inspired by the original jQuery.tipsy by Jason Frame
1232 | * ========================================================================
1233 | * Copyright 2011-2015 Twitter, Inc.
1234 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1235 | * ======================================================================== */
1236 |
1237 |
1238 | +function ($) {
1239 | 'use strict';
1240 |
1241 | // TOOLTIP PUBLIC CLASS DEFINITION
1242 | // ===============================
1243 |
1244 | var Tooltip = function (element, options) {
1245 | this.type =
1246 | this.options =
1247 | this.enabled =
1248 | this.timeout =
1249 | this.hoverState =
1250 | this.$element = null
1251 |
1252 | this.init('tooltip', element, options)
1253 | }
1254 |
1255 | Tooltip.VERSION = '3.3.2'
1256 |
1257 | Tooltip.TRANSITION_DURATION = 150
1258 |
1259 | Tooltip.DEFAULTS = {
1260 | animation: true,
1261 | placement: 'top',
1262 | selector: false,
1263 | template: '',
1264 | trigger: 'hover focus',
1265 | title: '',
1266 | delay: 0,
1267 | html: false,
1268 | container: false,
1269 | viewport: {
1270 | selector: 'body',
1271 | padding: 0
1272 | }
1273 | }
1274 |
1275 | Tooltip.prototype.init = function (type, element, options) {
1276 | this.enabled = true
1277 | this.type = type
1278 | this.$element = $(element)
1279 | this.options = this.getOptions(options)
1280 | this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
1281 |
1282 | var triggers = this.options.trigger.split(' ')
1283 |
1284 | for (var i = triggers.length; i--;) {
1285 | var trigger = triggers[i]
1286 |
1287 | if (trigger == 'click') {
1288 | this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
1289 | } else if (trigger != 'manual') {
1290 | var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
1291 | var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
1292 |
1293 | this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
1294 | this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
1295 | }
1296 | }
1297 |
1298 | this.options.selector ?
1299 | (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
1300 | this.fixTitle()
1301 | }
1302 |
1303 | Tooltip.prototype.getDefaults = function () {
1304 | return Tooltip.DEFAULTS
1305 | }
1306 |
1307 | Tooltip.prototype.getOptions = function (options) {
1308 | options = $.extend({}, this.getDefaults(), this.$element.data(), options)
1309 |
1310 | if (options.delay && typeof options.delay == 'number') {
1311 | options.delay = {
1312 | show: options.delay,
1313 | hide: options.delay
1314 | }
1315 | }
1316 |
1317 | return options
1318 | }
1319 |
1320 | Tooltip.prototype.getDelegateOptions = function () {
1321 | var options = {}
1322 | var defaults = this.getDefaults()
1323 |
1324 | this._options && $.each(this._options, function (key, value) {
1325 | if (defaults[key] != value) options[key] = value
1326 | })
1327 |
1328 | return options
1329 | }
1330 |
1331 | Tooltip.prototype.enter = function (obj) {
1332 | var self = obj instanceof this.constructor ?
1333 | obj : $(obj.currentTarget).data('bs.' + this.type)
1334 |
1335 | if (self && self.$tip && self.$tip.is(':visible')) {
1336 | self.hoverState = 'in'
1337 | return
1338 | }
1339 |
1340 | if (!self) {
1341 | self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1342 | $(obj.currentTarget).data('bs.' + this.type, self)
1343 | }
1344 |
1345 | clearTimeout(self.timeout)
1346 |
1347 | self.hoverState = 'in'
1348 |
1349 | if (!self.options.delay || !self.options.delay.show) return self.show()
1350 |
1351 | self.timeout = setTimeout(function () {
1352 | if (self.hoverState == 'in') self.show()
1353 | }, self.options.delay.show)
1354 | }
1355 |
1356 | Tooltip.prototype.leave = function (obj) {
1357 | var self = obj instanceof this.constructor ?
1358 | obj : $(obj.currentTarget).data('bs.' + this.type)
1359 |
1360 | if (!self) {
1361 | self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1362 | $(obj.currentTarget).data('bs.' + this.type, self)
1363 | }
1364 |
1365 | clearTimeout(self.timeout)
1366 |
1367 | self.hoverState = 'out'
1368 |
1369 | if (!self.options.delay || !self.options.delay.hide) return self.hide()
1370 |
1371 | self.timeout = setTimeout(function () {
1372 | if (self.hoverState == 'out') self.hide()
1373 | }, self.options.delay.hide)
1374 | }
1375 |
1376 | Tooltip.prototype.show = function () {
1377 | var e = $.Event('show.bs.' + this.type)
1378 |
1379 | if (this.hasContent() && this.enabled) {
1380 | this.$element.trigger(e)
1381 |
1382 | var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
1383 | if (e.isDefaultPrevented() || !inDom) return
1384 | var that = this
1385 |
1386 | var $tip = this.tip()
1387 |
1388 | var tipId = this.getUID(this.type)
1389 |
1390 | this.setContent()
1391 | $tip.attr('id', tipId)
1392 | this.$element.attr('aria-describedby', tipId)
1393 |
1394 | if (this.options.animation) $tip.addClass('fade')
1395 |
1396 | var placement = typeof this.options.placement == 'function' ?
1397 | this.options.placement.call(this, $tip[0], this.$element[0]) :
1398 | this.options.placement
1399 |
1400 | var autoToken = /\s?auto?\s?/i
1401 | var autoPlace = autoToken.test(placement)
1402 | if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
1403 |
1404 | $tip
1405 | .detach()
1406 | .css({ top: 0, left: 0, display: 'block' })
1407 | .addClass(placement)
1408 | .data('bs.' + this.type, this)
1409 |
1410 | this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
1411 |
1412 | var pos = this.getPosition()
1413 | var actualWidth = $tip[0].offsetWidth
1414 | var actualHeight = $tip[0].offsetHeight
1415 |
1416 | if (autoPlace) {
1417 | var orgPlacement = placement
1418 | var $container = this.options.container ? $(this.options.container) : this.$element.parent()
1419 | var containerDim = this.getPosition($container)
1420 |
1421 | placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' :
1422 | placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' :
1423 | placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
1424 | placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
1425 | placement
1426 |
1427 | $tip
1428 | .removeClass(orgPlacement)
1429 | .addClass(placement)
1430 | }
1431 |
1432 | var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
1433 |
1434 | this.applyPlacement(calculatedOffset, placement)
1435 |
1436 | var complete = function () {
1437 | var prevHoverState = that.hoverState
1438 | that.$element.trigger('shown.bs.' + that.type)
1439 | that.hoverState = null
1440 |
1441 | if (prevHoverState == 'out') that.leave(that)
1442 | }
1443 |
1444 | $.support.transition && this.$tip.hasClass('fade') ?
1445 | $tip
1446 | .one('bsTransitionEnd', complete)
1447 | .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
1448 | complete()
1449 | }
1450 | }
1451 |
1452 | Tooltip.prototype.applyPlacement = function (offset, placement) {
1453 | var $tip = this.tip()
1454 | var width = $tip[0].offsetWidth
1455 | var height = $tip[0].offsetHeight
1456 |
1457 | // manually read margins because getBoundingClientRect includes difference
1458 | var marginTop = parseInt($tip.css('margin-top'), 10)
1459 | var marginLeft = parseInt($tip.css('margin-left'), 10)
1460 |
1461 | // we must check for NaN for ie 8/9
1462 | if (isNaN(marginTop)) marginTop = 0
1463 | if (isNaN(marginLeft)) marginLeft = 0
1464 |
1465 | offset.top = offset.top + marginTop
1466 | offset.left = offset.left + marginLeft
1467 |
1468 | // $.fn.offset doesn't round pixel values
1469 | // so we use setOffset directly with our own function B-0
1470 | $.offset.setOffset($tip[0], $.extend({
1471 | using: function (props) {
1472 | $tip.css({
1473 | top: Math.round(props.top),
1474 | left: Math.round(props.left)
1475 | })
1476 | }
1477 | }, offset), 0)
1478 |
1479 | $tip.addClass('in')
1480 |
1481 | // check to see if placing tip in new offset caused the tip to resize itself
1482 | var actualWidth = $tip[0].offsetWidth
1483 | var actualHeight = $tip[0].offsetHeight
1484 |
1485 | if (placement == 'top' && actualHeight != height) {
1486 | offset.top = offset.top + height - actualHeight
1487 | }
1488 |
1489 | var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
1490 |
1491 | if (delta.left) offset.left += delta.left
1492 | else offset.top += delta.top
1493 |
1494 | var isVertical = /top|bottom/.test(placement)
1495 | var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
1496 | var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
1497 |
1498 | $tip.offset(offset)
1499 | this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
1500 | }
1501 |
1502 | Tooltip.prototype.replaceArrow = function (delta, dimension, isHorizontal) {
1503 | this.arrow()
1504 | .css(isHorizontal ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
1505 | .css(isHorizontal ? 'top' : 'left', '')
1506 | }
1507 |
1508 | Tooltip.prototype.setContent = function () {
1509 | var $tip = this.tip()
1510 | var title = this.getTitle()
1511 |
1512 | $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
1513 | $tip.removeClass('fade in top bottom left right')
1514 | }
1515 |
1516 | Tooltip.prototype.hide = function (callback) {
1517 | var that = this
1518 | var $tip = this.tip()
1519 | var e = $.Event('hide.bs.' + this.type)
1520 |
1521 | function complete() {
1522 | if (that.hoverState != 'in') $tip.detach()
1523 | that.$element
1524 | .removeAttr('aria-describedby')
1525 | .trigger('hidden.bs.' + that.type)
1526 | callback && callback()
1527 | }
1528 |
1529 | this.$element.trigger(e)
1530 |
1531 | if (e.isDefaultPrevented()) return
1532 |
1533 | $tip.removeClass('in')
1534 |
1535 | $.support.transition && this.$tip.hasClass('fade') ?
1536 | $tip
1537 | .one('bsTransitionEnd', complete)
1538 | .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
1539 | complete()
1540 |
1541 | this.hoverState = null
1542 |
1543 | return this
1544 | }
1545 |
1546 | Tooltip.prototype.fixTitle = function () {
1547 | var $e = this.$element
1548 | if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
1549 | $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
1550 | }
1551 | }
1552 |
1553 | Tooltip.prototype.hasContent = function () {
1554 | return this.getTitle()
1555 | }
1556 |
1557 | Tooltip.prototype.getPosition = function ($element) {
1558 | $element = $element || this.$element
1559 |
1560 | var el = $element[0]
1561 | var isBody = el.tagName == 'BODY'
1562 |
1563 | var elRect = el.getBoundingClientRect()
1564 | if (elRect.width == null) {
1565 | // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
1566 | elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
1567 | }
1568 | var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
1569 | var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
1570 | var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
1571 |
1572 | return $.extend({}, elRect, scroll, outerDims, elOffset)
1573 | }
1574 |
1575 | Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
1576 | return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1577 | placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1578 | placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
1579 | /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
1580 |
1581 | }
1582 |
1583 | Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
1584 | var delta = { top: 0, left: 0 }
1585 | if (!this.$viewport) return delta
1586 |
1587 | var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
1588 | var viewportDimensions = this.getPosition(this.$viewport)
1589 |
1590 | if (/right|left/.test(placement)) {
1591 | var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
1592 | var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
1593 | if (topEdgeOffset < viewportDimensions.top) { // top overflow
1594 | delta.top = viewportDimensions.top - topEdgeOffset
1595 | } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
1596 | delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
1597 | }
1598 | } else {
1599 | var leftEdgeOffset = pos.left - viewportPadding
1600 | var rightEdgeOffset = pos.left + viewportPadding + actualWidth
1601 | if (leftEdgeOffset < viewportDimensions.left) { // left overflow
1602 | delta.left = viewportDimensions.left - leftEdgeOffset
1603 | } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
1604 | delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
1605 | }
1606 | }
1607 |
1608 | return delta
1609 | }
1610 |
1611 | Tooltip.prototype.getTitle = function () {
1612 | var title
1613 | var $e = this.$element
1614 | var o = this.options
1615 |
1616 | title = $e.attr('data-original-title')
1617 | || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
1618 |
1619 | return title
1620 | }
1621 |
1622 | Tooltip.prototype.getUID = function (prefix) {
1623 | do prefix += ~~(Math.random() * 1000000)
1624 | while (document.getElementById(prefix))
1625 | return prefix
1626 | }
1627 |
1628 | Tooltip.prototype.tip = function () {
1629 | return (this.$tip = this.$tip || $(this.options.template))
1630 | }
1631 |
1632 | Tooltip.prototype.arrow = function () {
1633 | return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
1634 | }
1635 |
1636 | Tooltip.prototype.enable = function () {
1637 | this.enabled = true
1638 | }
1639 |
1640 | Tooltip.prototype.disable = function () {
1641 | this.enabled = false
1642 | }
1643 |
1644 | Tooltip.prototype.toggleEnabled = function () {
1645 | this.enabled = !this.enabled
1646 | }
1647 |
1648 | Tooltip.prototype.toggle = function (e) {
1649 | var self = this
1650 | if (e) {
1651 | self = $(e.currentTarget).data('bs.' + this.type)
1652 | if (!self) {
1653 | self = new this.constructor(e.currentTarget, this.getDelegateOptions())
1654 | $(e.currentTarget).data('bs.' + this.type, self)
1655 | }
1656 | }
1657 |
1658 | self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
1659 | }
1660 |
1661 | Tooltip.prototype.destroy = function () {
1662 | var that = this
1663 | clearTimeout(this.timeout)
1664 | this.hide(function () {
1665 | that.$element.off('.' + that.type).removeData('bs.' + that.type)
1666 | })
1667 | }
1668 |
1669 |
1670 | // TOOLTIP PLUGIN DEFINITION
1671 | // =========================
1672 |
1673 | function Plugin(option) {
1674 | return this.each(function () {
1675 | var $this = $(this)
1676 | var data = $this.data('bs.tooltip')
1677 | var options = typeof option == 'object' && option
1678 |
1679 | if (!data && option == 'destroy') return
1680 | if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
1681 | if (typeof option == 'string') data[option]()
1682 | })
1683 | }
1684 |
1685 | var old = $.fn.tooltip
1686 |
1687 | $.fn.tooltip = Plugin
1688 | $.fn.tooltip.Constructor = Tooltip
1689 |
1690 |
1691 | // TOOLTIP NO CONFLICT
1692 | // ===================
1693 |
1694 | $.fn.tooltip.noConflict = function () {
1695 | $.fn.tooltip = old
1696 | return this
1697 | }
1698 |
1699 | }(jQuery);
1700 |
1701 | /* ========================================================================
1702 | * Bootstrap: popover.js v3.3.2
1703 | * http://getbootstrap.com/javascript/#popovers
1704 | * ========================================================================
1705 | * Copyright 2011-2015 Twitter, Inc.
1706 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1707 | * ======================================================================== */
1708 |
1709 |
1710 | +function ($) {
1711 | 'use strict';
1712 |
1713 | // POPOVER PUBLIC CLASS DEFINITION
1714 | // ===============================
1715 |
1716 | var Popover = function (element, options) {
1717 | this.init('popover', element, options)
1718 | }
1719 |
1720 | if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
1721 |
1722 | Popover.VERSION = '3.3.2'
1723 |
1724 | Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
1725 | placement: 'right',
1726 | trigger: 'click',
1727 | content: '',
1728 | template: ''
1729 | })
1730 |
1731 |
1732 | // NOTE: POPOVER EXTENDS tooltip.js
1733 | // ================================
1734 |
1735 | Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
1736 |
1737 | Popover.prototype.constructor = Popover
1738 |
1739 | Popover.prototype.getDefaults = function () {
1740 | return Popover.DEFAULTS
1741 | }
1742 |
1743 | Popover.prototype.setContent = function () {
1744 | var $tip = this.tip()
1745 | var title = this.getTitle()
1746 | var content = this.getContent()
1747 |
1748 | $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
1749 | $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
1750 | this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
1751 | ](content)
1752 |
1753 | $tip.removeClass('fade top bottom left right in')
1754 |
1755 | // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
1756 | // this manually by checking the contents.
1757 | if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
1758 | }
1759 |
1760 | Popover.prototype.hasContent = function () {
1761 | return this.getTitle() || this.getContent()
1762 | }
1763 |
1764 | Popover.prototype.getContent = function () {
1765 | var $e = this.$element
1766 | var o = this.options
1767 |
1768 | return $e.attr('data-content')
1769 | || (typeof o.content == 'function' ?
1770 | o.content.call($e[0]) :
1771 | o.content)
1772 | }
1773 |
1774 | Popover.prototype.arrow = function () {
1775 | return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
1776 | }
1777 |
1778 | Popover.prototype.tip = function () {
1779 | if (!this.$tip) this.$tip = $(this.options.template)
1780 | return this.$tip
1781 | }
1782 |
1783 |
1784 | // POPOVER PLUGIN DEFINITION
1785 | // =========================
1786 |
1787 | function Plugin(option) {
1788 | return this.each(function () {
1789 | var $this = $(this)
1790 | var data = $this.data('bs.popover')
1791 | var options = typeof option == 'object' && option
1792 |
1793 | if (!data && option == 'destroy') return
1794 | if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
1795 | if (typeof option == 'string') data[option]()
1796 | })
1797 | }
1798 |
1799 | var old = $.fn.popover
1800 |
1801 | $.fn.popover = Plugin
1802 | $.fn.popover.Constructor = Popover
1803 |
1804 |
1805 | // POPOVER NO CONFLICT
1806 | // ===================
1807 |
1808 | $.fn.popover.noConflict = function () {
1809 | $.fn.popover = old
1810 | return this
1811 | }
1812 |
1813 | }(jQuery);
1814 |
1815 | /* ========================================================================
1816 | * Bootstrap: scrollspy.js v3.3.2
1817 | * http://getbootstrap.com/javascript/#scrollspy
1818 | * ========================================================================
1819 | * Copyright 2011-2015 Twitter, Inc.
1820 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1821 | * ======================================================================== */
1822 |
1823 |
1824 | +function ($) {
1825 | 'use strict';
1826 |
1827 | // SCROLLSPY CLASS DEFINITION
1828 | // ==========================
1829 |
1830 | function ScrollSpy(element, options) {
1831 | var process = $.proxy(this.process, this)
1832 |
1833 | this.$body = $('body')
1834 | this.$scrollElement = $(element).is('body') ? $(window) : $(element)
1835 | this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
1836 | this.selector = (this.options.target || '') + ' .nav li > a'
1837 | this.offsets = []
1838 | this.targets = []
1839 | this.activeTarget = null
1840 | this.scrollHeight = 0
1841 |
1842 | this.$scrollElement.on('scroll.bs.scrollspy', process)
1843 | this.refresh()
1844 | this.process()
1845 | }
1846 |
1847 | ScrollSpy.VERSION = '3.3.2'
1848 |
1849 | ScrollSpy.DEFAULTS = {
1850 | offset: 10
1851 | }
1852 |
1853 | ScrollSpy.prototype.getScrollHeight = function () {
1854 | return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
1855 | }
1856 |
1857 | ScrollSpy.prototype.refresh = function () {
1858 | var offsetMethod = 'offset'
1859 | var offsetBase = 0
1860 |
1861 | if (!$.isWindow(this.$scrollElement[0])) {
1862 | offsetMethod = 'position'
1863 | offsetBase = this.$scrollElement.scrollTop()
1864 | }
1865 |
1866 | this.offsets = []
1867 | this.targets = []
1868 | this.scrollHeight = this.getScrollHeight()
1869 |
1870 | var self = this
1871 |
1872 | this.$body
1873 | .find(this.selector)
1874 | .map(function () {
1875 | var $el = $(this)
1876 | var href = $el.data('target') || $el.attr('href')
1877 | var $href = /^#./.test(href) && $(href)
1878 |
1879 | return ($href
1880 | && $href.length
1881 | && $href.is(':visible')
1882 | && [[$href[offsetMethod]().top + offsetBase, href]]) || null
1883 | })
1884 | .sort(function (a, b) { return a[0] - b[0] })
1885 | .each(function () {
1886 | self.offsets.push(this[0])
1887 | self.targets.push(this[1])
1888 | })
1889 | }
1890 |
1891 | ScrollSpy.prototype.process = function () {
1892 | var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
1893 | var scrollHeight = this.getScrollHeight()
1894 | var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
1895 | var offsets = this.offsets
1896 | var targets = this.targets
1897 | var activeTarget = this.activeTarget
1898 | var i
1899 |
1900 | if (this.scrollHeight != scrollHeight) {
1901 | this.refresh()
1902 | }
1903 |
1904 | if (scrollTop >= maxScroll) {
1905 | return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
1906 | }
1907 |
1908 | if (activeTarget && scrollTop < offsets[0]) {
1909 | this.activeTarget = null
1910 | return this.clear()
1911 | }
1912 |
1913 | for (i = offsets.length; i--;) {
1914 | activeTarget != targets[i]
1915 | && scrollTop >= offsets[i]
1916 | && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
1917 | && this.activate(targets[i])
1918 | }
1919 | }
1920 |
1921 | ScrollSpy.prototype.activate = function (target) {
1922 | this.activeTarget = target
1923 |
1924 | this.clear()
1925 |
1926 | var selector = this.selector +
1927 | '[data-target="' + target + '"],' +
1928 | this.selector + '[href="' + target + '"]'
1929 |
1930 | var active = $(selector)
1931 | .parents('li')
1932 | .addClass('active')
1933 |
1934 | if (active.parent('.dropdown-menu').length) {
1935 | active = active
1936 | .closest('li.dropdown')
1937 | .addClass('active')
1938 | }
1939 |
1940 | active.trigger('activate.bs.scrollspy')
1941 | }
1942 |
1943 | ScrollSpy.prototype.clear = function () {
1944 | $(this.selector)
1945 | .parentsUntil(this.options.target, '.active')
1946 | .removeClass('active')
1947 | }
1948 |
1949 |
1950 | // SCROLLSPY PLUGIN DEFINITION
1951 | // ===========================
1952 |
1953 | function Plugin(option) {
1954 | return this.each(function () {
1955 | var $this = $(this)
1956 | var data = $this.data('bs.scrollspy')
1957 | var options = typeof option == 'object' && option
1958 |
1959 | if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
1960 | if (typeof option == 'string') data[option]()
1961 | })
1962 | }
1963 |
1964 | var old = $.fn.scrollspy
1965 |
1966 | $.fn.scrollspy = Plugin
1967 | $.fn.scrollspy.Constructor = ScrollSpy
1968 |
1969 |
1970 | // SCROLLSPY NO CONFLICT
1971 | // =====================
1972 |
1973 | $.fn.scrollspy.noConflict = function () {
1974 | $.fn.scrollspy = old
1975 | return this
1976 | }
1977 |
1978 |
1979 | // SCROLLSPY DATA-API
1980 | // ==================
1981 |
1982 | $(window).on('load.bs.scrollspy.data-api', function () {
1983 | $('[data-spy="scroll"]').each(function () {
1984 | var $spy = $(this)
1985 | Plugin.call($spy, $spy.data())
1986 | })
1987 | })
1988 |
1989 | }(jQuery);
1990 |
1991 | /* ========================================================================
1992 | * Bootstrap: tab.js v3.3.2
1993 | * http://getbootstrap.com/javascript/#tabs
1994 | * ========================================================================
1995 | * Copyright 2011-2015 Twitter, Inc.
1996 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1997 | * ======================================================================== */
1998 |
1999 |
2000 | +function ($) {
2001 | 'use strict';
2002 |
2003 | // TAB CLASS DEFINITION
2004 | // ====================
2005 |
2006 | var Tab = function (element) {
2007 | this.element = $(element)
2008 | }
2009 |
2010 | Tab.VERSION = '3.3.2'
2011 |
2012 | Tab.TRANSITION_DURATION = 150
2013 |
2014 | Tab.prototype.show = function () {
2015 | var $this = this.element
2016 | var $ul = $this.closest('ul:not(.dropdown-menu)')
2017 | var selector = $this.data('target')
2018 |
2019 | if (!selector) {
2020 | selector = $this.attr('href')
2021 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
2022 | }
2023 |
2024 | if ($this.parent('li').hasClass('active')) return
2025 |
2026 | var $previous = $ul.find('.active:last a')
2027 | var hideEvent = $.Event('hide.bs.tab', {
2028 | relatedTarget: $this[0]
2029 | })
2030 | var showEvent = $.Event('show.bs.tab', {
2031 | relatedTarget: $previous[0]
2032 | })
2033 |
2034 | $previous.trigger(hideEvent)
2035 | $this.trigger(showEvent)
2036 |
2037 | if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
2038 |
2039 | var $target = $(selector)
2040 |
2041 | this.activate($this.closest('li'), $ul)
2042 | this.activate($target, $target.parent(), function () {
2043 | $previous.trigger({
2044 | type: 'hidden.bs.tab',
2045 | relatedTarget: $this[0]
2046 | })
2047 | $this.trigger({
2048 | type: 'shown.bs.tab',
2049 | relatedTarget: $previous[0]
2050 | })
2051 | })
2052 | }
2053 |
2054 | Tab.prototype.activate = function (element, container, callback) {
2055 | var $active = container.find('> .active')
2056 | var transition = callback
2057 | && $.support.transition
2058 | && (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)
2059 |
2060 | function next() {
2061 | $active
2062 | .removeClass('active')
2063 | .find('> .dropdown-menu > .active')
2064 | .removeClass('active')
2065 | .end()
2066 | .find('[data-toggle="tab"]')
2067 | .attr('aria-expanded', false)
2068 |
2069 | element
2070 | .addClass('active')
2071 | .find('[data-toggle="tab"]')
2072 | .attr('aria-expanded', true)
2073 |
2074 | if (transition) {
2075 | element[0].offsetWidth // reflow for transition
2076 | element.addClass('in')
2077 | } else {
2078 | element.removeClass('fade')
2079 | }
2080 |
2081 | if (element.parent('.dropdown-menu')) {
2082 | element
2083 | .closest('li.dropdown')
2084 | .addClass('active')
2085 | .end()
2086 | .find('[data-toggle="tab"]')
2087 | .attr('aria-expanded', true)
2088 | }
2089 |
2090 | callback && callback()
2091 | }
2092 |
2093 | $active.length && transition ?
2094 | $active
2095 | .one('bsTransitionEnd', next)
2096 | .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
2097 | next()
2098 |
2099 | $active.removeClass('in')
2100 | }
2101 |
2102 |
2103 | // TAB PLUGIN DEFINITION
2104 | // =====================
2105 |
2106 | function Plugin(option) {
2107 | return this.each(function () {
2108 | var $this = $(this)
2109 | var data = $this.data('bs.tab')
2110 |
2111 | if (!data) $this.data('bs.tab', (data = new Tab(this)))
2112 | if (typeof option == 'string') data[option]()
2113 | })
2114 | }
2115 |
2116 | var old = $.fn.tab
2117 |
2118 | $.fn.tab = Plugin
2119 | $.fn.tab.Constructor = Tab
2120 |
2121 |
2122 | // TAB NO CONFLICT
2123 | // ===============
2124 |
2125 | $.fn.tab.noConflict = function () {
2126 | $.fn.tab = old
2127 | return this
2128 | }
2129 |
2130 |
2131 | // TAB DATA-API
2132 | // ============
2133 |
2134 | var clickHandler = function (e) {
2135 | e.preventDefault()
2136 | Plugin.call($(this), 'show')
2137 | }
2138 |
2139 | $(document)
2140 | .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
2141 | .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
2142 |
2143 | }(jQuery);
2144 |
2145 | /* ========================================================================
2146 | * Bootstrap: affix.js v3.3.2
2147 | * http://getbootstrap.com/javascript/#affix
2148 | * ========================================================================
2149 | * Copyright 2011-2015 Twitter, Inc.
2150 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2151 | * ======================================================================== */
2152 |
2153 |
2154 | +function ($) {
2155 | 'use strict';
2156 |
2157 | // AFFIX CLASS DEFINITION
2158 | // ======================
2159 |
2160 | var Affix = function (element, options) {
2161 | this.options = $.extend({}, Affix.DEFAULTS, options)
2162 |
2163 | this.$target = $(this.options.target)
2164 | .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
2165 | .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
2166 |
2167 | this.$element = $(element)
2168 | this.affixed =
2169 | this.unpin =
2170 | this.pinnedOffset = null
2171 |
2172 | this.checkPosition()
2173 | }
2174 |
2175 | Affix.VERSION = '3.3.2'
2176 |
2177 | Affix.RESET = 'affix affix-top affix-bottom'
2178 |
2179 | Affix.DEFAULTS = {
2180 | offset: 0,
2181 | target: window
2182 | }
2183 |
2184 | Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
2185 | var scrollTop = this.$target.scrollTop()
2186 | var position = this.$element.offset()
2187 | var targetHeight = this.$target.height()
2188 |
2189 | if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
2190 |
2191 | if (this.affixed == 'bottom') {
2192 | if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
2193 | return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
2194 | }
2195 |
2196 | var initializing = this.affixed == null
2197 | var colliderTop = initializing ? scrollTop : position.top
2198 | var colliderHeight = initializing ? targetHeight : height
2199 |
2200 | if (offsetTop != null && scrollTop <= offsetTop) return 'top'
2201 | if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
2202 |
2203 | return false
2204 | }
2205 |
2206 | Affix.prototype.getPinnedOffset = function () {
2207 | if (this.pinnedOffset) return this.pinnedOffset
2208 | this.$element.removeClass(Affix.RESET).addClass('affix')
2209 | var scrollTop = this.$target.scrollTop()
2210 | var position = this.$element.offset()
2211 | return (this.pinnedOffset = position.top - scrollTop)
2212 | }
2213 |
2214 | Affix.prototype.checkPositionWithEventLoop = function () {
2215 | setTimeout($.proxy(this.checkPosition, this), 1)
2216 | }
2217 |
2218 | Affix.prototype.checkPosition = function () {
2219 | if (!this.$element.is(':visible')) return
2220 |
2221 | var height = this.$element.height()
2222 | var offset = this.options.offset
2223 | var offsetTop = offset.top
2224 | var offsetBottom = offset.bottom
2225 | var scrollHeight = $('body').height()
2226 |
2227 | if (typeof offset != 'object') offsetBottom = offsetTop = offset
2228 | if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
2229 | if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
2230 |
2231 | var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
2232 |
2233 | if (this.affixed != affix) {
2234 | if (this.unpin != null) this.$element.css('top', '')
2235 |
2236 | var affixType = 'affix' + (affix ? '-' + affix : '')
2237 | var e = $.Event(affixType + '.bs.affix')
2238 |
2239 | this.$element.trigger(e)
2240 |
2241 | if (e.isDefaultPrevented()) return
2242 |
2243 | this.affixed = affix
2244 | this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
2245 |
2246 | this.$element
2247 | .removeClass(Affix.RESET)
2248 | .addClass(affixType)
2249 | .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
2250 | }
2251 |
2252 | if (affix == 'bottom') {
2253 | this.$element.offset({
2254 | top: scrollHeight - height - offsetBottom
2255 | })
2256 | }
2257 | }
2258 |
2259 |
2260 | // AFFIX PLUGIN DEFINITION
2261 | // =======================
2262 |
2263 | function Plugin(option) {
2264 | return this.each(function () {
2265 | var $this = $(this)
2266 | var data = $this.data('bs.affix')
2267 | var options = typeof option == 'object' && option
2268 |
2269 | if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
2270 | if (typeof option == 'string') data[option]()
2271 | })
2272 | }
2273 |
2274 | var old = $.fn.affix
2275 |
2276 | $.fn.affix = Plugin
2277 | $.fn.affix.Constructor = Affix
2278 |
2279 |
2280 | // AFFIX NO CONFLICT
2281 | // =================
2282 |
2283 | $.fn.affix.noConflict = function () {
2284 | $.fn.affix = old
2285 | return this
2286 | }
2287 |
2288 |
2289 | // AFFIX DATA-API
2290 | // ==============
2291 |
2292 | $(window).on('load', function () {
2293 | $('[data-spy="affix"]').each(function () {
2294 | var $spy = $(this)
2295 | var data = $spy.data()
2296 |
2297 | data.offset = data.offset || {}
2298 |
2299 | if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
2300 | if (data.offsetTop != null) data.offset.top = data.offsetTop
2301 |
2302 | Plugin.call($spy, data)
2303 | })
2304 | })
2305 |
2306 | }(jQuery);
2307 |
--------------------------------------------------------------------------------
/css/app.css:
--------------------------------------------------------------------------------
1 | /*---------------NAVBAR-------------*/
2 | .navstatic{
3 | z-index:1030;
4 | top:0;
5 | right:0;
6 | left:0;
7 | position:fixed;
8 | width:100%;
9 | height:80px;
10 | background-color:white;
11 | }
12 | .pulled-left{
13 | float:left;
14 | }
15 | .pulled-right{
16 | float:right;
17 | height:45px;
18 | margin-bottom:0px;
19 | }
20 | .rich-toolbar{
21 | z-index:1035;
22 | display:none;
23 | }
24 | .focussed{
25 | display:block;
26 | }
27 | .navbarcontainer{
28 | z-index:1030;
29 | display:inline-block;
30 | position:fixed;
31 | background-color:#f8f8f8;
32 | width:100%;
33 | height:45px;
34 | }
35 | .navwell{
36 | position:relative;
37 | left:1%;
38 | width:98%;
39 | height:80px;
40 | -webkit-border-radius: 10px;
41 | -moz-border-radius: 10px;
42 | border-radius: 10px;
43 | border:1px solid #DDDDDD;
44 | background-color:#f0f0f0;
45 | }
46 | .navgroup{
47 | margin-right:15px;
48 | margin-left:15px;
49 | margin-top:10px;
50 | }
51 | .navaddress{
52 | height:30px;
53 | margin-top:50px;
54 | text-align:center;
55 | font-style:italic;
56 | z-index:1035;
57 | }
58 | .navdropdown{
59 | padding:5px;
60 | width:100%;
61 | text-align:center;
62 | }
63 | .navaddressinput{
64 | text-align:center;
65 | }
66 | .dropshadow{
67 | box-shadow: 5px 5px 2.5px #888888;
68 | }
69 | .dropdown{
70 | width:100%;
71 | }
72 | .dropdown-menu{
73 | right:0;
74 | left:0;
75 | top:0;
76 | width:auto;
77 | position:fixed;
78 | margin-top:45px;
79 | margin-right:1px;
80 | margin-left:8px;
81 | }
82 | .navuser{
83 | color:grey;
84 | font-style:italic;
85 | font-size:15px;
86 | }
87 | .navelement{
88 | color:black;
89 | }
90 | .globalsearch{
91 | background-color:transparent;
92 | margin-top:3px;
93 | width:50px;
94 | font-style:italic;
95 | font-size:12px;
96 | }
97 |
98 | /*---------------/NAVBAR--------------*/
99 |
100 |
101 | /*---------------BULLETGROUP-------------*/
102 |
103 | .bulletgroup{
104 | padding-top:85px;
105 | padding-bottom:180px;
106 | z-index:1005;
107 | overflow-y:scroll;
108 | height:auto;
109 | position:relative;
110 | }
111 |
112 | .bullet{
113 | position:absolute;
114 | float:left;
115 | margin-top:6.2px;
116 | width:10px;
117 | height:10px;
118 | border-radius:11px;
119 | border:2px double #ccc;
120 | font-size:5px;
121 | color:#666;
122 | line-height:20px;
123 | vertical-align:center;
124 | text-decoration:none;
125 | text-shadow:0 1px 0 #fff;
126 | background:#F2F5F2
127 | }
128 |
129 | .bullet:hover{
130 | border:4px double #bbb;
131 | color:#aaa;
132 | background:#e6e6e6;
133 | z-index: -1;
134 | }
135 |
136 | .bulletinput {
137 | width:90%;
138 | margin-left:15px;
139 | }
140 |
141 | /*--MENU--*/
142 |
143 | .menuspacer{
144 | width:30px;
145 | position:absolute;
146 | height:20px;
147 | background-color:transparent;
148 | }
149 |
150 | .bulletmenu{
151 | margin-top:20px;
152 | width:100px;
153 | height:180px;
154 | position:absolute;
155 | background-color:#F5F5F5;
156 | box-shadow: 5px 5px 2.5px #888888;
157 | text-align:center;
158 | z-index: 100;
159 | }
160 | /*--/MENU--/
161 |
162 | /*--------------/BULLETGROUP-------------*/
163 |
164 |
165 |
166 | /*---------------MISC-------------*/
167 |
168 |
169 | .smallshadow{
170 | box-shadow: 1px 1px 3px #888888;
171 | }
172 |
173 | input.form-control {
174 | position:relative;
175 | margin-bottom: 0;
176 | border-radius: 0;
177 | border: 2px;
178 | padding-right: 20px;
179 | }
180 | html,body{
181 | width:100%;
182 | height:0px;
183 | position:relative;
184 | }
185 | #main{
186 | margin-top:100px;
187 | }
188 | .inline {
189 | display: inline;
190 | }
191 |
192 | .footer {
193 | z-index:1030;
194 | bottom:0;
195 | right:0;
196 | left:0;
197 | position:fixed;
198 | width:100%;
199 | height:90px;
200 | background-color:#F2F2F2;
201 | }
202 |
203 | .footerAd {
204 | margin:8px;;
205 | background-color:#FFFFFF;
206 | height:50px;
207 | width:98%
208 |
209 | }
210 | .footerText {
211 | height:20px;
212 | width:100%;
213 | text-align:center;
214 | font-style:italic;
215 | font-size:12px;
216 |
217 | }
218 | input {
219 | border: none;
220 | /* Good browsers universal rule */
221 | outline: none;
222 | /* safari and its variants */
223 | outline-offset: 0;
224 | /* IE and its variants */
225 | -webkit-appearance: none;
226 | /* Chrome and its variants */
227 | }
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
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 |
--------------------------------------------------------------------------------
/js/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Scotho/Firebased/9cb8d42858d0f185f26788542d20905cc00e4d4c/js/README.md
--------------------------------------------------------------------------------
/js/angular-cookie.min.js:
--------------------------------------------------------------------------------
1 | angular.module("ivpusic.cookie",["ipCookie"]),angular.module("ipCookie",["ng"]).factory("ipCookie",["$document",function(e){"use strict";function i(e){try{return decodeURIComponent(e)}catch(i){}}return function(){function t(t,n,r){var o,s,p,u,a,c,x,d,f;if(r=r||{},void 0!==n)return n="object"==typeof n?JSON.stringify(n):n+"","number"==typeof r.expires&&(f=r.expires,r.expires=new Date,-1===f?r.expires=new Date("Thu, 01 Jan 1970 00:00:00 GMT"):void 0!==r.expirationUnit?"hours"===r.expirationUnit?r.expires.setHours(r.expires.getHours()+f):"minutes"===r.expirationUnit?r.expires.setMinutes(r.expires.getMinutes()+f):"seconds"===r.expirationUnit?r.expires.setSeconds(r.expires.getSeconds()+f):r.expires.setDate(r.expires.getDate()+f):r.expires.setDate(r.expires.getDate()+f)),e[0].cookie=[encodeURIComponent(t),"=",encodeURIComponent(n),r.expires?"; expires="+r.expires.toUTCString():"",r.path?"; path="+r.path:"",r.domain?"; domain="+r.domain:"",r.secure?"; secure":""].join("");for(s=[],d=e[0].cookie,d&&(s=d.split("; ")),o={},x=!1,p=0;s.length>p;++p)if(s[p]){if(u=s[p],a=u.indexOf("="),c=u.substring(0,a),n=i(u.substring(a+1)),angular.isUndefined(n))continue;if(void 0===t||t===c){try{o[c]=JSON.parse(n)}catch(g){o[c]=n}if(t===c)return o[c];x=!0}}return x&&void 0===t?o:void 0}return t.remove=function(e,i){var n=void 0!==t(e);return n&&(i||(i={}),i.expires=-1,t(e,"",i)),n},t}()}]);
--------------------------------------------------------------------------------
/js/angular-ui-router.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * State-based routing for AngularJS
3 | * @version v0.2.13
4 | * @link http://angular-ui.github.com/
5 | * @license MIT License, http://www.opensource.org/licenses/MIT
6 | */
7 | "undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(a,b,c){"use strict";function d(a,b){return M(new(M(function(){},{prototype:a})),b)}function e(a){return L(arguments,function(b){b!==a&&L(b,function(b,c){a.hasOwnProperty(c)||(a[c]=b)})}),a}function f(a,b){var c=[];for(var d in a.path){if(a.path[d]!==b.path[d])break;c.push(a.path[d])}return c}function g(a){if(Object.keys)return Object.keys(a);var c=[];return b.forEach(a,function(a,b){c.push(b)}),c}function h(a,b){if(Array.prototype.indexOf)return a.indexOf(b,Number(arguments[2])||0);var c=a.length>>>0,d=Number(arguments[2])||0;for(d=0>d?Math.ceil(d):Math.floor(d),0>d&&(d+=c);c>d;d++)if(d in a&&a[d]===b)return d;return-1}function i(a,b,c,d){var e,i=f(c,d),j={},k=[];for(var l in i)if(i[l].params&&(e=g(i[l].params),e.length))for(var m in e)h(k,e[m])>=0||(k.push(e[m]),j[e[m]]=a[e[m]]);return M({},j,b)}function j(a,b,c){if(!c){c=[];for(var d in a)c.push(d)}for(var e=0;e "));if(s[c]=d,I(a))q.push(c,[function(){return b.get(a)}],j);else{var e=b.annotate(a);L(e,function(a){a!==c&&i.hasOwnProperty(a)&&n(i[a],a)}),q.push(c,a,e)}r.pop(),s[c]=f}}function o(a){return J(a)&&a.then&&a.$$promises}if(!J(i))throw new Error("'invocables' must be an object");var p=g(i||{}),q=[],r=[],s={};return L(i,n),i=r=s=null,function(d,f,g){function h(){--u||(v||e(t,f.$$values),r.$$values=t,r.$$promises=r.$$promises||!0,delete r.$$inheritedValues,n.resolve(t))}function i(a){r.$$failure=a,n.reject(a)}function j(c,e,f){function j(a){l.reject(a),i(a)}function k(){if(!G(r.$$failure))try{l.resolve(b.invoke(e,g,t)),l.promise.then(function(a){t[c]=a,h()},j)}catch(a){j(a)}}var l=a.defer(),m=0;L(f,function(a){s.hasOwnProperty(a)&&!d.hasOwnProperty(a)&&(m++,s[a].then(function(b){t[a]=b,--m||k()},j))}),m||k(),s[c]=l.promise}if(o(d)&&g===c&&(g=f,f=d,d=null),d){if(!J(d))throw new Error("'locals' must be an object")}else d=k;if(f){if(!o(f))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else f=m;var n=a.defer(),r=n.promise,s=r.$$promises={},t=M({},d),u=1+q.length/3,v=!1;if(G(f.$$failure))return i(f.$$failure),r;f.$$inheritedValues&&e(t,l(f.$$inheritedValues,p)),M(s,f.$$promises),f.$$values?(v=e(t,l(f.$$values,p)),r.$$inheritedValues=l(f.$$values,p),h()):(f.$$inheritedValues&&(r.$$inheritedValues=l(f.$$inheritedValues,p)),f.then(h,i));for(var w=0,x=q.length;x>w;w+=3)d.hasOwnProperty(q[w])?h():j(q[w],q[w+1],q[w+2]);return r}},this.resolve=function(a,b,c,d){return this.study(a)(b,c,d)}}function p(a,b,c){this.fromConfig=function(a,b,c){return G(a.template)?this.fromString(a.template,b):G(a.templateUrl)?this.fromUrl(a.templateUrl,b):G(a.templateProvider)?this.fromProvider(a.templateProvider,b,c):null},this.fromString=function(a,b){return H(a)?a(b):a},this.fromUrl=function(c,d){return H(c)&&(c=c(d)),null==c?null:a.get(c,{cache:b,headers:{Accept:"text/html"}}).then(function(a){return a.data})},this.fromProvider=function(a,b,d){return c.invoke(a,null,d||{params:b})}}function q(a,b,e){function f(b,c,d,e){if(q.push(b),o[b])return o[b];if(!/^\w+(-+\w+)*(?:\[\])?$/.test(b))throw new Error("Invalid parameter name '"+b+"' in pattern '"+a+"'");if(p[b])throw new Error("Duplicate parameter name '"+b+"' in pattern '"+a+"'");return p[b]=new O.Param(b,c,d,e),p[b]}function g(a,b,c){var d=["",""],e=a.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!b)return e;switch(c){case!1:d=["(",")"];break;case!0:d=["?(",")?"];break;default:d=["("+c+"|",")?"]}return e+d[0]+b+d[1]}function h(c,e){var f,g,h,i,j;return f=c[2]||c[3],j=b.params[f],h=a.substring(m,c.index),g=e?c[4]:c[4]||("*"==c[1]?".*":null),i=O.type(g||"string")||d(O.type("string"),{pattern:new RegExp(g)}),{id:f,regexp:g,segment:h,type:i,cfg:j}}b=M({params:{}},J(b)?b:{});var i,j=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,k=/([:]?)([\w\[\]-]+)|\{([\w\[\]-]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,l="^",m=0,n=this.segments=[],o=e?e.params:{},p=this.params=e?e.params.$$new():new O.ParamSet,q=[];this.source=a;for(var r,s,t;(i=j.exec(a))&&(r=h(i,!1),!(r.segment.indexOf("?")>=0));)s=f(r.id,r.type,r.cfg,"path"),l+=g(r.segment,s.type.pattern.source,s.squash),n.push(r.segment),m=j.lastIndex;t=a.substring(m);var u=t.indexOf("?");if(u>=0){var v=this.sourceSearch=t.substring(u);if(t=t.substring(0,u),this.sourcePath=a.substring(0,m+u),v.length>0)for(m=0;i=k.exec(v);)r=h(i,!0),s=f(r.id,r.type,r.cfg,"search"),m=j.lastIndex}else this.sourcePath=a,this.sourceSearch="";l+=g(t)+(b.strict===!1?"/?":"")+"$",n.push(t),this.regexp=new RegExp(l,b.caseInsensitive?"i":c),this.prefix=n[0],this.$$paramNames=q}function r(a){M(this,a)}function s(){function a(a){return null!=a?a.toString().replace(/\//g,"%2F"):a}function e(a){return null!=a?a.toString().replace(/%2F/g,"/"):a}function f(a){return this.pattern.test(a)}function i(){return{strict:t,caseInsensitive:p}}function j(a){return H(a)||K(a)&&H(a[a.length-1])}function k(){for(;x.length;){var a=x.shift();if(a.pattern)throw new Error("You cannot override a type's .pattern at runtime.");b.extend(v[a.name],o.invoke(a.def))}}function l(a){M(this,a||{})}O=this;var o,p=!1,t=!0,u=!1,v={},w=!0,x=[],y={string:{encode:a,decode:e,is:f,pattern:/[^/]*/},"int":{encode:a,decode:function(a){return parseInt(a,10)},is:function(a){return G(a)&&this.decode(a.toString())===a},pattern:/\d+/},bool:{encode:function(a){return a?1:0},decode:function(a){return 0!==parseInt(a,10)},is:function(a){return a===!0||a===!1},pattern:/0|1/},date:{encode:function(a){return this.is(a)?[a.getFullYear(),("0"+(a.getMonth()+1)).slice(-2),("0"+a.getDate()).slice(-2)].join("-"):c},decode:function(a){if(this.is(a))return a;var b=this.capture.exec(a);return b?new Date(b[1],b[2]-1,b[3]):c},is:function(a){return a instanceof Date&&!isNaN(a.valueOf())},equals:function(a,b){return this.is(a)&&this.is(b)&&a.toISOString()===b.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:b.toJson,decode:b.fromJson,is:b.isObject,equals:b.equals,pattern:/[^/]*/},any:{encode:b.identity,decode:b.identity,is:b.identity,equals:b.equals,pattern:/.*/}};s.$$getDefaultValue=function(a){if(!j(a.value))return a.value;if(!o)throw new Error("Injectable functions cannot be called at configuration time");return o.invoke(a.value)},this.caseInsensitive=function(a){return G(a)&&(p=a),p},this.strictMode=function(a){return G(a)&&(t=a),t},this.defaultSquashPolicy=function(a){if(!G(a))return u;if(a!==!0&&a!==!1&&!I(a))throw new Error("Invalid squash policy: "+a+". Valid policies: false, true, arbitrary-string");return u=a,a},this.compile=function(a,b){return new q(a,M(i(),b))},this.isMatcher=function(a){if(!J(a))return!1;var b=!0;return L(q.prototype,function(c,d){H(c)&&(b=b&&G(a[d])&&H(a[d]))}),b},this.type=function(a,b,c){if(!G(b))return v[a];if(v.hasOwnProperty(a))throw new Error("A type named '"+a+"' has already been defined.");return v[a]=new r(M({name:a},b)),c&&(x.push({name:a,def:c}),w||k()),this},L(y,function(a,b){v[b]=new r(M({name:b},a))}),v=d(v,{}),this.$get=["$injector",function(a){return o=a,w=!1,k(),L(y,function(a,b){v[b]||(v[b]=new r(a))}),this}],this.Param=function(a,b,d,e){function f(a){var b=J(a)?g(a):[],c=-1===h(b,"value")&&-1===h(b,"type")&&-1===h(b,"squash")&&-1===h(b,"array");return c&&(a={value:a}),a.$$fn=j(a.value)?a.value:function(){return a.value},a}function i(b,c,d){if(b.type&&c)throw new Error("Param '"+a+"' has two type configurations.");return c?c:b.type?b.type instanceof r?b.type:new r(b.type):"config"===d?v.any:v.string}function k(){var b={array:"search"===e?"auto":!1},c=a.match(/\[\]$/)?{array:!0}:{};return M(b,c,d).array}function l(a,b){var c=a.squash;if(!b||c===!1)return!1;if(!G(c)||null==c)return u;if(c===!0||I(c))return c;throw new Error("Invalid squash policy: '"+c+"'. Valid policies: false, true, or arbitrary string")}function p(a,b,d,e){var f,g,i=[{from:"",to:d||b?c:""},{from:null,to:d||b?c:""}];return f=K(a.replace)?a.replace:[],I(e)&&f.push({from:e,to:c}),g=n(f,function(a){return a.from}),m(i,function(a){return-1===h(g,a.from)}).concat(f)}function q(){if(!o)throw new Error("Injectable functions cannot be called at configuration time");return o.invoke(d.$$fn)}function s(a){function b(a){return function(b){return b.from===a}}function c(a){var c=n(m(w.replace,b(a)),function(a){return a.to});return c.length?c[0]:a}return a=c(a),G(a)?w.type.decode(a):q()}function t(){return"{Param:"+a+" "+b+" squash: '"+z+"' optional: "+y+"}"}var w=this;d=f(d),b=i(d,b,e);var x=k();b=x?b.$asArray(x,"search"===e):b,"string"!==b.name||x||"path"!==e||d.value!==c||(d.value="");var y=d.value!==c,z=l(d,y),A=p(d,x,y,z);M(this,{id:a,type:b,location:e,array:x,squash:z,replace:A,isOptional:y,value:s,dynamic:c,config:d,toString:t})},l.prototype={$$new:function(){return d(this,M(new l,{$$parent:this}))},$$keys:function(){for(var a=[],b=[],c=this,d=g(l.prototype);c;)b.push(c),c=c.$$parent;return b.reverse(),L(b,function(b){L(g(b),function(b){-1===h(a,b)&&-1===h(d,b)&&a.push(b)})}),a},$$values:function(a){var b={},c=this;return L(c.$$keys(),function(d){b[d]=c[d].value(a&&a[d])}),b},$$equals:function(a,b){var c=!0,d=this;return L(d.$$keys(),function(e){var f=a&&a[e],g=b&&b[e];d[e].type.equals(f,g)||(c=!1)}),c},$$validates:function(a){var b,c,d,e=!0,f=this;return L(this.$$keys(),function(g){d=f[g],c=a[g],b=!c&&d.isOptional,e=e&&(b||!!d.type.is(c))}),e},$$parent:c},this.ParamSet=l}function t(a,d){function e(a){var b=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(a.source);return null!=b?b[1].replace(/\\(.)/g,"$1"):""}function f(a,b){return a.replace(/\$(\$|\d{1,2})/,function(a,c){return b["$"===c?0:Number(c)]})}function g(a,b,c){if(!c)return!1;var d=a.invoke(b,b,{$match:c});return G(d)?d:!0}function h(d,e,f,g){function h(a,b,c){return"/"===p?a:b?p.slice(0,-1)+a:c?p.slice(1)+a:a}function m(a){function b(a){var b=a(f,d);return b?(I(b)&&d.replace().url(b),!0):!1}if(!a||!a.defaultPrevented){var e=o&&d.url()===o;if(o=c,e)return!0;var g,h=j.length;for(g=0;h>g;g++)if(b(j[g]))return;k&&b(k)}}function n(){return i=i||e.$on("$locationChangeSuccess",m)}var o,p=g.baseHref(),q=d.url();return l||n(),{sync:function(){m()},listen:function(){return n()},update:function(a){return a?void(q=d.url()):void(d.url()!==q&&(d.url(q),d.replace()))},push:function(a,b,e){d.url(a.format(b||{})),o=e&&e.$$avoidResync?d.url():c,e&&e.replace&&d.replace()},href:function(c,e,f){if(!c.validates(e))return null;var g=a.html5Mode();b.isObject(g)&&(g=g.enabled);var i=c.format(e);if(f=f||{},g||null===i||(i="#"+a.hashPrefix()+i),i=h(i,g,f.absolute),!f.absolute||!i)return i;var j=!g&&i?"/":"",k=d.port();return k=80===k||443===k?"":":"+k,[d.protocol(),"://",d.host(),k,j,i].join("")}}}var i,j=[],k=null,l=!1;this.rule=function(a){if(!H(a))throw new Error("'rule' must be a function");return j.push(a),this},this.otherwise=function(a){if(I(a)){var b=a;a=function(){return b}}else if(!H(a))throw new Error("'rule' must be a function");return k=a,this},this.when=function(a,b){var c,h=I(b);if(I(a)&&(a=d.compile(a)),!h&&!H(b)&&!K(b))throw new Error("invalid 'handler' in when()");var i={matcher:function(a,b){return h&&(c=d.compile(b),b=["$match",function(a){return c.format(a)}]),M(function(c,d){return g(c,b,a.exec(d.path(),d.search()))},{prefix:I(a.prefix)?a.prefix:""})},regex:function(a,b){if(a.global||a.sticky)throw new Error("when() RegExp must not be global or sticky");return h&&(c=b,b=["$match",function(a){return f(c,a)}]),M(function(c,d){return g(c,b,a.exec(d.path()))},{prefix:e(a)})}},j={matcher:d.isMatcher(a),regex:a instanceof RegExp};for(var k in j)if(j[k])return this.rule(i[k](a,b));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(a){a===c&&(a=!0),l=a},this.$get=h,h.$inject=["$location","$rootScope","$injector","$browser"]}function u(a,e){function f(a){return 0===a.indexOf(".")||0===a.indexOf("^")}function l(a,b){if(!a)return c;var d=I(a),e=d?a:a.name,g=f(e);if(g){if(!b)throw new Error("No reference point given for path '"+e+"'");b=l(b);for(var h=e.split("."),i=0,j=h.length,k=b;j>i;i++)if(""!==h[i]||0!==i){if("^"!==h[i])break;if(!k.parent)throw new Error("Path '"+e+"' not valid for state '"+b.name+"'");k=k.parent}else k=b;h=h.slice(i).join("."),e=k.name+(k.name&&h?".":"")+h}var m=y[e];return!m||!d&&(d||m!==a&&m.self!==a)?c:m}function m(a,b){z[a]||(z[a]=[]),z[a].push(b)}function o(a){for(var b=z[a]||[];b.length;)p(b.shift())}function p(b){b=d(b,{self:b,resolve:b.resolve||{},toString:function(){return this.name}});var c=b.name;if(!I(c)||c.indexOf("@")>=0)throw new Error("State must have a valid name");if(y.hasOwnProperty(c))throw new Error("State '"+c+"'' is already defined");var e=-1!==c.indexOf(".")?c.substring(0,c.lastIndexOf(".")):I(b.parent)?b.parent:J(b.parent)&&I(b.parent.name)?b.parent.name:"";if(e&&!y[e])return m(e,b.self);for(var f in B)H(B[f])&&(b[f]=B[f](b,B.$delegates[f]));return y[c]=b,!b[A]&&b.url&&a.when(b.url,["$match","$stateParams",function(a,c){x.$current.navigable==b&&j(a,c)||x.transitionTo(b,a,{inherit:!0,location:!1})}]),o(c),b}function q(a){return a.indexOf("*")>-1}function r(a){var b=a.split("."),c=x.$current.name.split(".");if("**"===b[0]&&(c=c.slice(h(c,b[1])),c.unshift("**")),"**"===b[b.length-1]&&(c.splice(h(c,b[b.length-2])+1,Number.MAX_VALUE),c.push("**")),b.length!=c.length)return!1;for(var d=0,e=b.length;e>d;d++)"*"===b[d]&&(c[d]="*");return c.join("")===b.join("")}function s(a,b){return I(a)&&!G(b)?B[a]:H(b)&&I(a)?(B[a]&&!B.$delegates[a]&&(B.$delegates[a]=B[a]),B[a]=b,this):this}function t(a,b){return J(a)?b=a:b.name=a,p(b),this}function u(a,e,f,h,m,o,p){function s(b,c,d,f){var g=a.$broadcast("$stateNotFound",b,c,d);if(g.defaultPrevented)return p.update(),B;if(!g.retry)return null;if(f.$retry)return p.update(),C;var h=x.transition=e.when(g.retry);return h.then(function(){return h!==x.transition?u:(b.options.$retry=!0,x.transitionTo(b.to,b.toParams,b.options))},function(){return B}),p.update(),h}function t(a,c,d,g,i,j){var l=d?c:k(a.params.$$keys(),c),n={$stateParams:l};i.resolve=m.resolve(a.resolve,n,i.resolve,a);var o=[i.resolve.then(function(a){i.globals=a})];return g&&o.push(g),L(a.views,function(c,d){var e=c.resolve&&c.resolve!==a.resolve?c.resolve:{};e.$template=[function(){return f.load(d,{view:c,locals:n,params:l,notify:j.notify})||""}],o.push(m.resolve(e,n,i.resolve,a).then(function(f){if(H(c.controllerProvider)||K(c.controllerProvider)){var g=b.extend({},e,n);f.$$controller=h.invoke(c.controllerProvider,null,g)}else f.$$controller=c.controller;f.$$state=a,f.$$controllerAs=c.controllerAs,i[d]=f}))}),e.all(o).then(function(){return i})}var u=e.reject(new Error("transition superseded")),z=e.reject(new Error("transition prevented")),B=e.reject(new Error("transition aborted")),C=e.reject(new Error("transition failed"));return w.locals={resolve:null,globals:{$stateParams:{}}},x={params:{},current:w.self,$current:w,transition:null},x.reload=function(){return x.transitionTo(x.current,o,{reload:!0,inherit:!1,notify:!0})},x.go=function(a,b,c){return x.transitionTo(a,b,M({inherit:!0,relative:x.$current},c))},x.transitionTo=function(b,c,f){c=c||{},f=M({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},f||{});var g,j=x.$current,m=x.params,n=j.path,q=l(b,f.relative);if(!G(q)){var r={to:b,toParams:c,options:f},y=s(r,j.self,m,f);if(y)return y;if(b=r.to,c=r.toParams,f=r.options,q=l(b,f.relative),!G(q)){if(!f.relative)throw new Error("No such state '"+b+"'");throw new Error("Could not resolve '"+b+"' from state '"+f.relative+"'")}}if(q[A])throw new Error("Cannot transition to abstract state '"+b+"'");if(f.inherit&&(c=i(o,c||{},x.$current,q)),!q.params.$$validates(c))return C;c=q.params.$$values(c),b=q;var B=b.path,D=0,E=B[D],F=w.locals,H=[];if(!f.reload)for(;E&&E===n[D]&&E.ownParams.$$equals(c,m);)F=H[D]=E.locals,D++,E=B[D];if(v(b,j,F,f))return b.self.reloadOnSearch!==!1&&p.update(),x.transition=null,e.when(x.current);if(c=k(b.params.$$keys(),c||{}),f.notify&&a.$broadcast("$stateChangeStart",b.self,c,j.self,m).defaultPrevented)return p.update(),z;for(var I=e.when(F),J=D;J=D;d--)g=n[d],g.self.onExit&&h.invoke(g.self.onExit,g.self,g.locals.globals),g.locals=null;for(d=D;d=0?e:e+"@"+(f?f.state.name:"")}function A(a,b){var c,d=a.match(/^\s*({[^}]*})\s*$/);if(d&&(a=b+"("+d[1]+")"),c=a.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!c||4!==c.length)throw new Error("Invalid state ref '"+a+"'");return{state:c[1],paramExpr:c[3]||null}}function B(a){var b=a.parent().inheritedData("$uiView");return b&&b.state&&b.state.name?b.state:void 0}function C(a,c){var d=["location","inherit","reload"];return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(e,f,g,h){var i=A(g.uiSref,a.current.name),j=null,k=B(f)||a.$current,l=null,m="A"===f.prop("tagName"),n="FORM"===f[0].nodeName,o=n?"action":"href",p=!0,q={relative:k,inherit:!0},r=e.$eval(g.uiSrefOpts)||{};b.forEach(d,function(a){a in r&&(q[a]=r[a])});var s=function(c){if(c&&(j=b.copy(c)),p){l=a.href(i.state,j,q);var d=h[1]||h[0];return d&&d.$$setStateInfo(i.state,j),null===l?(p=!1,!1):void g.$set(o,l)}};i.paramExpr&&(e.$watch(i.paramExpr,function(a){a!==j&&s(a)},!0),j=b.copy(e.$eval(i.paramExpr))),s(),n||f.bind("click",function(b){var d=b.which||b.button;if(!(d>1||b.ctrlKey||b.metaKey||b.shiftKey||f.attr("target"))){var e=c(function(){a.go(i.state,j,q)});b.preventDefault();var g=m&&!l?1:0;b.preventDefault=function(){g--<=0&&c.cancel(e)}}})}}}function D(a,b,c){return{restrict:"A",controller:["$scope","$element","$attrs",function(b,d,e){function f(){g()?d.addClass(j):d.removeClass(j)}function g(){return"undefined"!=typeof e.uiSrefActiveEq?h&&a.is(h.name,i):h&&a.includes(h.name,i)}var h,i,j;j=c(e.uiSrefActiveEq||e.uiSrefActive||"",!1)(b),this.$$setStateInfo=function(b,c){h=a.get(b,B(d)),i=c,f()},b.$on("$stateChangeSuccess",f)}]}}function E(a){var b=function(b){return a.is(b)};return b.$stateful=!0,b}function F(a){var b=function(b){return a.includes(b)};return b.$stateful=!0,b}var G=b.isDefined,H=b.isFunction,I=b.isString,J=b.isObject,K=b.isArray,L=b.forEach,M=b.extend,N=b.copy;b.module("ui.router.util",["ng"]),b.module("ui.router.router",["ui.router.util"]),b.module("ui.router.state",["ui.router.router","ui.router.util"]),b.module("ui.router",["ui.router.state"]),b.module("ui.router.compat",["ui.router"]),o.$inject=["$q","$injector"],b.module("ui.router.util").service("$resolve",o),p.$inject=["$http","$templateCache","$injector"],b.module("ui.router.util").service("$templateFactory",p);var O;q.prototype.concat=function(a,b){var c={caseInsensitive:O.caseInsensitive(),strict:O.strictMode(),squash:O.defaultSquashPolicy()};return new q(this.sourcePath+a+this.sourceSearch,M(c,b),this)},q.prototype.toString=function(){return this.source},q.prototype.exec=function(a,b){function c(a){function b(a){return a.split("").reverse().join("")}function c(a){return a.replace(/\\-/,"-")}var d=b(a).split(/-(?!\\)/),e=n(d,b);return n(e,c).reverse()}var d=this.regexp.exec(a);if(!d)return null;b=b||{};var e,f,g,h=this.parameters(),i=h.length,j=this.segments.length-1,k={};if(j!==d.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");for(e=0;j>e;e++){g=h[e];var l=this.params[g],m=d[e+1];for(f=0;fe;e++)g=h[e],k[g]=this.params[g].value(b[g]);return k},q.prototype.parameters=function(a){return G(a)?this.params[a]||null:this.$$paramNames},q.prototype.validates=function(a){return this.params.$$validates(a)},q.prototype.format=function(a){function b(a){return encodeURIComponent(a).replace(/-/g,function(a){return"%5C%"+a.charCodeAt(0).toString(16).toUpperCase()})}a=a||{};var c=this.segments,d=this.parameters(),e=this.params;if(!this.validates(a))return null;var f,g=!1,h=c.length-1,i=d.length,j=c[0];for(f=0;i>f;f++){var k=h>f,l=d[f],m=e[l],o=m.value(a[l]),p=m.isOptional&&m.type.equals(m.value(),o),q=p?m.squash:!1,r=m.type.encode(o);if(k){var s=c[f+1];if(q===!1)null!=r&&(j+=K(r)?n(r,b).join("-"):encodeURIComponent(r)),j+=s;else if(q===!0){var t=j.match(/\/$/)?/\/?(.*)/:/(.*)/;j+=s.match(t)[1]}else I(q)&&(j+=q+s)}else{if(null==r||p&&q!==!1)continue;K(r)||(r=[r]),r=n(r,encodeURIComponent).join("&"+l+"="),j+=(g?"&":"?")+(l+"="+r),g=!0}}return j},r.prototype.is=function(){return!0},r.prototype.encode=function(a){return a},r.prototype.decode=function(a){return a},r.prototype.equals=function(a,b){return a==b},r.prototype.$subPattern=function(){var a=this.pattern.toString();return a.substr(1,a.length-2)},r.prototype.pattern=/.*/,r.prototype.toString=function(){return"{Type:"+this.name+"}"},r.prototype.$asArray=function(a,b){function d(a,b){function d(a,b){return function(){return a[b].apply(a,arguments)}}function e(a){return K(a)?a:G(a)?[a]:[]}function f(a){switch(a.length){case 0:return c;case 1:return"auto"===b?a[0]:a;default:return a}}function g(a){return!a}function h(a,b){return function(c){c=e(c);var d=n(c,a);return b===!0?0===m(d,g).length:f(d)}}function i(a){return function(b,c){var d=e(b),f=e(c);if(d.length!==f.length)return!1;for(var g=0;g bulobj.address) {
182 | $scope.bullets[i].address++;
183 | $scope.bullets.$save($scope.bullets[i]);
184 | }
185 |
186 | }
187 |
188 | setTimeout(function () {
189 | angular.element(document.querySelector('#f_' + (indx + 2)))[0].focus();
190 | }, 50);
191 | }
192 | $scope.DeleteCheck = function (bulobj, msg, indx, address) {
193 | if (bulobj.text === '' && $scope.bullets.length > 1) {
194 | $scope.bullets.$remove(bulobj);
195 | setTimeout(function () {
196 | angular.element(document.querySelector('#f_' + (indx)))[0].focus();
197 | }, 15);
198 |
199 | for (i = 0; i <= $scope.bullets.length - 1; i++) {
200 | if ($scope.bullets[i].address > address) {
201 | $scope.bullets[i].address--;
202 | $scope.bullets.$save($scope.bullets[i]);
203 | }
204 | }
205 | }
206 | }; //called by ngDelete
207 | //---------------------------------------------------
208 |
209 | });
210 |
211 | //KEYPRESS DIRECTIVES
212 | //---------------------------------------------------
213 | app.directive('ngDelete', function () {
214 | return function (scope, element, attrs) {
215 | element.bind("keydown keypress", function (event) {
216 | if (event.which === 8) {
217 | scope.$apply(function () {
218 | scope.$eval(attrs.ngDelete);
219 | });
220 |
221 | }
222 | });
223 | };
224 | });
225 | app.directive('ngEnter', function () {
226 | return function (scope, element, attrs) {
227 | element.bind("keydown keypress", function (event) {
228 | if (event.which === 13) {
229 | scope.$apply(function () {
230 | scope.$eval(attrs.ngEnter);
231 | });
232 | event.stopPropagation();
233 |
234 | event.preventDefault();
235 | }
236 | });
237 | };
238 | });
239 | //directive for keypress down
240 | app.directive('ngDown', function () {
241 | return function (scope, element, attrs) {
242 | element.bind("keydown keypress", function (event) {
243 | if (event.which === 40) {
244 | scope.$apply(function () {
245 | scope.$eval(attrs.ngDown);
246 | });
247 |
248 | event.preventDefault();
249 | }
250 | });
251 | };
252 | });
253 | app.directive('ngUp', function () {
254 | return function (scope, element, attrs) {
255 | element.bind("keydown keypress", function (event) {
256 | if (event.which === 38) {
257 | scope.$apply(function () {
258 | scope.$eval(attrs.ngUp);
259 | });
260 |
261 | event.preventDefault();
262 | }
263 | });
264 | };
265 | });
266 | })();
--------------------------------------------------------------------------------
/js/jquery.min.js:
--------------------------------------------------------------------------------
1 | /*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
2 | !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),jb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=gb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=gb.selectors={cacheLength:50,createPseudo:ib,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||gb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sb(tb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),gb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)
3 | },removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*\s*$/g,ib={option:[1,""],thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1>$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1>$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),f.removeChild(c),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))
4 | },removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec=/#.*$/,fc=/([?&])_=[^&]*/,gc=/^(.*?):[ \t]*([^\r\n]*)$/gm,hc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ic=/^(?:GET|HEAD)$/,jc=/^\/\//,kc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lc={},mc={},nc="*/".concat("*"),oc=a.location.href,pc=kc.exec(oc.toLowerCase())||[];function qc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function rc(a,b,c,d){var e={},f=a===mc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function sc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function tc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function uc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:oc,type:"GET",isLocal:hc.test(pc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?sc(sc(a,n.ajaxSettings),b):sc(n.ajaxSettings,a)},ajaxPrefilter:qc(lc),ajaxTransport:qc(mc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=gc.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||oc)+"").replace(ec,"").replace(jc,pc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=kc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===pc[1]&&h[2]===pc[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(pc[3]||("http:"===pc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),rc(lc,k,b,v),2===t)return v;i=n.event&&k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!ic.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=fc.test(d)?d.replace(fc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+nc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=rc(mc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=tc(k,v,f)),u=uc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var vc=/%20/g,wc=/\[\]$/,xc=/\r?\n/g,yc=/^(?:submit|button|image|reset|file)$/i,zc=/^(?:input|select|textarea|keygen)/i;function Ac(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||wc.test(a)?d(a,e):Ac(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Ac(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Ac(c,a[c],b,e);return d.join("&").replace(vc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&zc.test(this.nodeName)&&!yc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(xc,"\r\n")}}):{name:b.name,value:c.replace(xc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Bc=0,Cc={},Dc={0:200,1223:204},Ec=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Cc)Cc[a]()}),k.cors=!!Ec&&"withCredentials"in Ec,k.ajax=Ec=!!Ec,n.ajaxTransport(function(a){var b;return k.cors||Ec&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Bc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Cc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Dc[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Cc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("