vendor: 45,678 bytes, lines 1-1122
1 2/* 3 * jQuery FlexSlider v2.4.0 4 * Copyright 2012 WooThemes 5 * Contributing Author: Tyler Smith 6 */ 7; 8(function ($) { 9 10 //FlexSlider: Object Instance 11 $.flexslider = function(el, options) { 12 var slider = $(el); 13 14 // making variables public 15 slider.vars = $.extend({}, $.flexslider.defaults, options); 16 17 var namespace = slider.vars.namespace, 18 msGesture = window.navigator && window.navigator.msPointerEnabled && window.MSGesture, 19 touch = (( "ontouchstart" in window ) || msGesture || window.DocumentTouch && document instanceof DocumentTouch) && slider.vars.touch, 20 // depricating this idea, as devices are being released with both of these events 21 //eventType = (touch) ? "touchend" : "click", 22 eventType = "click touchend MSPointerUp keyup", 23 watchedEvent = "", 24 watchedEventClearTimer, 25 vertical = slider.vars.direction === "vertical", 26 reverse = slider.vars.reverse, 27 carousel = (slider.vars.itemWidth > 0), 28 fade = slider.vars.animation === "fade", 29 asNav = slider.vars.asNavFor !== "", 30 methods = {}, 31 focused = true; 32 33 // Store a reference to the slider object 34 $.data(el, "flexslider", slider); 35 36 // Private slider methods 37 methods = { 38 init: function() { 39 slider.animating = false; 40 // Get current slide and make sure it is a number 41 slider.currentSlide = parseInt( ( slider.vars.startAt ? slider.vars.startAt : 0), 10 ); 42 if ( isNaN( slider.currentSlide ) ) { slider.currentSlide = 0; } 43 slider.animatingTo = slider.currentSlide; 44 slider.atEnd = (slider.currentSlide === 0 || slider.currentSlide === slider.last); 45 slider.containerSelector = slider.vars.selector.substr(0,slider.vars.selector.search(' ')); 46 slider.slides = $(slider.vars.selector, slider); 47 slider.container = $(slider.containerSelector, slider); 48 slider.count = slider.slides.length; 49 // SYNC: 50 slider.syncExists = $(slider.vars.sync).length > 0; 51 // SLIDE: 52 if (slider.vars.animation === "slide") { slider.vars.animation = "swing"; } 53 slider.prop = (vertical) ? "top" : "marginLeft"; 54 slider.args = {}; 55 // SLIDESHOW: 56 slider.manualPause = false; 57 slider.stopped = false; 58 //PAUSE WHEN INVISIBLE 59 slider.started = false; 60 slider.startTimeout = null; 61 // TOUCH/USECSS: 62 slider.transitions = !slider.vars.video && !fade && slider.vars.useCSS && (function() { 63 var obj = document.createElement('div'), 64 props = ['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective']; 65 for (var i in props) { 66 if ( obj.style[ props[i] ] !== undefined ) { 67 slider.pfx = props[i].replace('Perspective','').toLowerCase(); 68 slider.prop = "-" + slider.pfx + "-transform"; 69 return true; 70 } 71 } 72 return false; 73 }()); 74 slider.ensureAnimationEnd = ''; 75 // CONTROLSCONTAINER: 76 if (slider.vars.controlsContainer !== "") slider.controlsContainer = $(slider.vars.controlsContainer).length > 0 && $(slider.vars.controlsContainer); 77 // MANUAL: 78 if (slider.vars.manualControls !== "") slider.manualControls = $(slider.vars.manualControls).length > 0 && $(slider.vars.manualControls); 79 80 // RANDOMIZE: 81 if (slider.vars.randomize) { 82 slider.slides.sort(function() { return (Math.round(Math.random())-0.5); }); 83 slider.container.empty().append(slider.slides); 84 } 85 86 slider.doMath(); 87 88 // INIT 89 slider.setup("init"); 90 91 // CONTROLNAV: 92 if (slider.vars.controlNav) { methods.controlNav.setup(); } 93 94 // DIRECTIONNAV: 95 if (slider.vars.directionNav) { methods.directionNav.setup(); } 96 97 // KEYBOARD: 98 if (slider.vars.keyboard && ($(slider.containerSelector).length === 1 || slider.vars.multipleKeyboard)) { 99 $(document).bind('keyup', function(event) { 100 var keycode = event.keyCode; 101 if (!slider.animating && (keycode === 39 || keycode === 37)) { 102 var target = (keycode === 39) ? slider.getTarget('next') : 103 (keycode === 37) ? slider.getTarget('prev') : false; 104 slider.flexAnimate(target, slider.vars.pauseOnAction); 105 } 106 }); 107 } 108 // MOUSEWHEEL: 109 if (slider.vars.mousewheel) { 110 slider.bind('mousewheel', function(event, delta, deltaX, deltaY) { 111 event.preventDefault(); 112 var target = (delta < 0) ? slider.getTarget('next') : slider.getTarget('prev'); 113 slider.flexAnimate(target, slider.vars.pauseOnAction); 114 }); 115 } 116 117 // PAUSEPLAY 118 if (slider.vars.pausePlay) { methods.pausePlay.setup(); } 119 120 //PAUSE WHEN INVISIBLE 121 if (slider.vars.slideshow && slider.vars.pauseInvisible) { methods.pauseInvisible.init(); } 122 123 // SLIDSESHOW 124 if (slider.vars.slideshow) { 125 if (slider.vars.pauseOnHover) { 126 slider.hover(function() { 127 if (!slider.manualPlay && !slider.manualPause) { slider.pause(); } 128 }, function() { 129 if (!slider.manualPause && !slider.manualPlay && !slider.stopped) { slider.play(); } 130 }); 131 } 132 // initialize animation 133 //If we're visible, or we don't use PageVisibility API 134 if(!slider.vars.pauseInvisible || !methods.pauseInvisible.isHidden()) { 135 (slider.vars.initDelay > 0) ? slider.startTimeout = setTimeout(slider.play, slider.vars.initDelay) : slider.play(); 136 } 137 } 138 139 // ASNAV: 140 if (asNav) { methods.asNav.setup(); } 141 142 // TOUCH 143 if (touch && slider.vars.touch) { methods.touch(); } 144 145 // FADE&&SMOOTHHEIGHT || SLIDE: 146 if (!fade || (fade && slider.vars.smoothHeight)) { $(window).bind("resize orientationchange focus", methods.resize); } 147 148 slider.find("img").attr("draggable", "false"); 149 150 // API: start() Callback 151 setTimeout(function(){ 152 slider.vars.start(slider); 153 }, 200); 154 }, 155 asNav: { 156 setup: function() { 157 slider.asNav = true; 158 slider.animatingTo = Math.floor(slider.currentSlide/slider.move); 159 slider.currentItem = slider.currentSlide; 160 slider.slides.removeClass(namespace + "active-slide").eq(slider.currentItem).addClass(namespace + "active-slide"); 161 if(!msGesture){ 162 slider.slides.on(eventType, function(e){ 163 e.preventDefault(); 164 var $slide = $(this), 165 target = $slide.index(); 166 var posFromLeft = $slide.offset().left - $(slider).scrollLeft(); // Find position of slide relative to left of slider container 167 if( posFromLeft <= 0 && $slide.hasClass( namespace + 'active-slide' ) ) { 168 slider.flexAnimate(slider.getTarget("prev"), true); 169 } else if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass(namespace + "active-slide")) { 170 slider.direction = (slider.currentItem < target) ? "next" : "prev"; 171 slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true); 172 } 173 }); 174 }else{ 175 el._slider = slider; 176 slider.slides.each(function (){ 177 var that = this; 178 that._gesture = new MSGesture(); 179 that._gesture.target = that; 180 that.addEventListener("MSPointerDown", function (e){ 181 e.preventDefault(); 182 if(e.currentTarget._gesture) { 183 e.currentTarget._gesture.addPointer(e.pointerId); 184 } 185 }, false); 186 that.addEventListener("MSGestureTap", function (e){ 187 e.preventDefault(); 188 var $slide = $(this), 189 target = $slide.index(); 190 if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass('active')) { 191 slider.direction = (slider.currentItem < target) ? "next" : "prev"; 192 slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true); 193 } 194 }); 195 }); 196 } 197 } 198 }, 199 controlNav: { 200 setup: function() { 201 if (!slider.manualControls) { 202 methods.controlNav.setupPaging(); 203 } else { // MANUALCONTROLS: 204 methods.controlNav.setupManual(); 205 } 206 }, 207 setupPaging: function() { 208 var type = (slider.vars.controlNav === "thumbnails") ? 'control-thumbs' : 'control-paging', 209 j = 1, 210 item, 211 slide; 212 213 slider.controlNavScaffold = $('<ol class="'+ namespace + 'control-nav ' + namespace + type + '"></ol>'); 214 215 if (slider.pagingCount > 1) { 216 for (var i = 0; i < slider.pagingCount; i++) { 217 slide = slider.slides.eq(i); 218 item = (slider.vars.controlNav === "thumbnails") ? '<img src="' + slide.attr( 'data-thumb' ) + '"/>' : '<a>' + j + '</a>'; 219 if ( 'thumbnails' === slider.vars.controlNav && true === slider.vars.thumbCaptions ) { 220 var captn = slide.attr( 'data-thumbcaption' ); 221 if ( '' != captn && undefined != captn ) { item += '<span class="' + namespace + 'caption">' + captn + '</span>'; } 222 } 223 slider.controlNavScaffold.append('<li>' + item + '</li>'); 224 j++; 225 } 226 } 227 228 // CONTROLSCONTAINER: 229 (slider.controlsContainer) ? $(slider.controlsContainer).append(slider.controlNavScaffold) : slider.append(slider.controlNavScaffold); 230 methods.controlNav.set(); 231 232 methods.controlNav.active(); 233 234 slider.controlNavScaffold.delegate('a, img', eventType, function(event) { 235 event.preventDefault(); 236 237 if (watchedEvent === "" || watchedEvent === event.type) { 238 var $this = $(this), 239 target = slider.controlNav.index($this); 240 241 if (!$this.hasClass(namespace + 'active')) { 242 slider.direction = (target > slider.currentSlide) ? "next" : "prev"; 243 slider.flexAnimate(target, slider.vars.pauseOnAction); 244 } 245 } 246 247 // setup flags to prevent event duplication 248 if (watchedEvent === "") { 249 watchedEvent = event.type; 250 } 251 methods.setToClearWatchedEvent(); 252 253 }); 254 }, 255 setupManual: function() { 256 slider.controlNav = slider.manualControls; 257 methods.controlNav.active(); 258 259 slider.controlNav.bind(eventType, function(event) { 260 event.preventDefault(); 261 262 if (watchedEvent === "" || watchedEvent === event.type) { 263 var $this = $(this), 264 target = slider.controlNav.index($this); 265 266 if (!$this.hasClass(namespace + 'active')) { 267 (target > slider.currentSlide) ? slider.direction = "next" : slider.direction = "prev"; 268 slider.flexAnimate(target, slider.vars.pauseOnAction); 269 } 270 } 271 272 // setup flags to prevent event duplication 273 if (watchedEvent === "") { 274 watchedEvent = event.type; 275 } 276 methods.setToClearWatchedEvent(); 277 }); 278 }, 279 set: function() { 280 var selector = (slider.vars.controlNav === "thumbnails") ? 'img' : 'a'; 281 slider.controlNav = $('.' + namespace + 'control-nav li ' + selector, (slider.controlsContainer) ? slider.controlsContainer : slider); 282 }, 283 active: function() { 284 slider.controlNav.removeClass(namespace + "active").eq(slider.animatingTo).addClass(namespace + "active"); 285 }, 286 update: function(action, pos) { 287 if (slider.pagingCount > 1 && action === "add") { 288 slider.controlNavScaffold.append($('<li><a>' + slider.count + '</a></li>')); 289 } else if (slider.pagingCount === 1) { 290 slider.controlNavScaffold.find('li').remove(); 291 } else { 292 slider.controlNav.eq(pos).closest('li').remove(); 293 } 294 methods.controlNav.set(); 295 (slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length) ? slider.update(pos, action) : methods.controlNav.active(); 296 } 297 }, 298 directionNav: { 299 setup: function() { 300 var directionNavScaffold = $('<ul class="' + namespace + 'direction-nav"><li class="' + namespace + 'nav-prev"><a class="' + namespace + 'prev" href="#">' + slider.vars.prevText + '</a></li><li class="' + namespace + 'nav-next"><a class="' + namespace + 'next" href="#">' + slider.vars.nextText + '</a></li></ul>'); 301 302 // CONTROLSCONTAINER: 303 if (slider.controlsContainer) { 304 $(slider.controlsContainer).append(directionNavScaffold); 305 slider.directionNav = $('.' + namespace + 'direction-nav li a', slider.controlsContainer); 306 } else { 307 slider.append(directionNavScaffold); 308 slider.directionNav = $('.' + namespace + 'direction-nav li a', slider); 309 } 310 311 methods.directionNav.update(); 312 313 slider.directionNav.bind(eventType, function(event) { 314 event.preventDefault(); 315 var target; 316 317 if (watchedEvent === "" || watchedEvent === event.type) { 318 target = ($(this).hasClass(namespace + 'next')) ? slider.getTarget('next') : slider.getTarget('prev'); 319 slider.flexAnimate(target, slider.vars.pauseOnAction); 320 } 321 322 // setup flags to prevent event duplication 323 if (watchedEvent === "") { 324 watchedEvent = event.type; 325 } 326 methods.setToClearWatchedEvent(); 327 }); 328 }, 329 update: function() { 330 var disabledClass = namespace + 'disabled'; 331 if (slider.pagingCount === 1) { 332 slider.directionNav.addClass(disabledClass).attr('tabindex', '-1'); 333 } else if (!slider.vars.animationLoop) { 334 if (slider.animatingTo === 0) { 335 slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "prev").addClass(disabledClass).attr('tabindex', '-1'); 336 } else if (slider.animatingTo === slider.last) { 337 slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "next").addClass(disabledClass).attr('tabindex', '-1'); 338 } else { 339 slider.directionNav.removeClass(disabledClass).removeAttr('tabindex'); 340 } 341 } else { 342 slider.directionNav.removeClass(disabledClass).removeAttr('tabindex'); 343 } 344 } 345 }, 346 pausePlay: { 347 setup: function() { 348 var pausePlayScaffold = $('<div class="' + namespace + 'pauseplay"><a></a></div>'); 349 350 // CONTROLSCONTAINER: 351 if (slider.controlsContainer) { 352 slider.controlsContainer.append(pausePlayScaffold); 353 slider.pausePlay = $('.' + namespace + 'pauseplay a', slider.controlsContainer); 354 } else { 355 slider.append(pausePlayScaffold); 356 slider.pausePlay = $('.' + namespace + 'pauseplay a', slider); 357 } 358 359 methods.pausePlay.update((slider.vars.slideshow) ? namespace + 'pause' : namespace + 'play'); 360 361 slider.pausePlay.bind(eventType, function(event) { 362 event.preventDefault(); 363 364 if (watchedEvent === "" || watchedEvent === event.type) { 365 if ($(this).hasClass(namespace + 'pause')) { 366 slider.manualPause = true; 367 slider.manualPlay = false; 368 slider.pause(); 369 } else { 370 slider.manualPause = false; 371 slider.manualPlay = true; 372 slider.play(); 373 } 374 } 375 376 // setup flags to prevent event duplication 377 if (watchedEvent === "") { 378 watchedEvent = event.type; 379 } 380 methods.setToClearWatchedEvent(); 381 }); 382 }, 383 update: function(state) { 384 (state === "play") ? slider.pausePlay.removeClass(namespace + 'pause').addClass(namespace + 'play').html(slider.vars.playText) : slider.pausePlay.removeClass(namespace + 'play').addClass(namespace + 'pause').html(slider.vars.pauseText); 385 } 386 }, 387 touch: function() { 388 var startX, 389 startY, 390 offset, 391 cwidth, 392 dx, 393 startT, 394 scrolling = false, 395 localX = 0, 396 localY = 0, 397 accDx = 0; 398 399 if(!msGesture){ 400 el.addEventListener('touchstart', onTouchStart, false); 401 402 function onTouchStart(e) { 403 if (slider.animating) { 404 e.preventDefault(); 405 } else if ( ( window.navigator.msPointerEnabled ) || e.touches.length === 1 ) { 406 slider.pause(); 407 // CAROUSEL: 408 cwidth = (vertical) ? slider.h : slider. w; 409 startT = Number(new Date()); 410 // CAROUSEL: 411 412 // Local vars for X and Y points. 413 localX = e.touches[0].pageX; 414 localY = e.touches[0].pageY; 415 416 offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 : 417 (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) : 418 (carousel && slider.currentSlide === slider.last) ? slider.limit : 419 (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide : 420 (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth; 421 startX = (vertical) ? localY : localX; 422 startY = (vertical) ? localX : localY; 423 424 el.addEventListener('touchmove', onTouchMove, false); 425 el.addEventListener('touchend', onTouchEnd, false); 426 } 427 } 428 429 function onTouchMove(e) { 430 // Local vars for X and Y points. 431 432 localX = e.touches[0].pageX; 433 localY = e.touches[0].pageY; 434 435 dx = (vertical) ? startX - localY : startX - localX; 436 scrolling = (vertical) ? (Math.abs(dx) < Math.abs(localX - startY)) : (Math.abs(dx) < Math.abs(localY - startY)); 437 438 var fxms = 500; 439 440 if ( ! scrolling || Number( new Date() ) - startT > fxms ) { 441 e.preventDefault(); 442 if (!fade && slider.transitions) { 443 if (!slider.vars.animationLoop) { 444 dx = dx/((slider.currentSlide === 0 && dx < 0 || slider.currentSlide === slider.last && dx > 0) ? (Math.abs(dx)/cwidth+2) : 1); 445 } 446 slider.setProps(offset + dx, "setTouch"); 447 } 448 } 449 } 450 451 function onTouchEnd(e) { 452 // finish the touch by undoing the touch session 453 el.removeEventListener('touchmove', onTouchMove, false); 454 455 if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) { 456 var updateDx = (reverse) ? -dx : dx, 457 target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev'); 458 459 if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) { 460 slider.flexAnimate(target, slider.vars.pauseOnAction); 461 } else { 462 if (!fade) { slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); } 463 } 464 } 465 el.removeEventListener('touchend', onTouchEnd, false); 466 467 startX = null; 468 startY = null; 469 dx = null; 470 offset = null; 471 } 472 }else{ 473 el.style.msTouchAction = "none"; 474 el._gesture = new MSGesture(); 475 el._gesture.target = el; 476 el.addEventListener("MSPointerDown", onMSPointerDown, false); 477 el._slider = slider; 478 el.addEventListener("MSGestureChange", onMSGestureChange, false); 479 el.addEventListener("MSGestureEnd", onMSGestureEnd, false); 480 481 function onMSPointerDown(e){ 482 e.stopPropagation(); 483 if (slider.animating) { 484 e.preventDefault(); 485 }else{ 486 slider.pause(); 487 el._gesture.addPointer(e.pointerId); 488 accDx = 0; 489 cwidth = (vertical) ? slider.h : slider. w; 490 startT = Number(new Date()); 491 // CAROUSEL: 492 493 offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 : 494 (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) : 495 (carousel && slider.currentSlide === slider.last) ? slider.limit : 496 (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide : 497 (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth; 498 } 499 } 500 501 function onMSGestureChange(e) { 502 e.stopPropagation(); 503 var slider = e.target._slider; 504 if(!slider){ 505 return; 506 } 507 var transX = -e.translationX, 508 transY = -e.translationY; 509 510 //Accumulate translations. 511 accDx = accDx + ((vertical) ? transY : transX); 512 dx = accDx; 513 scrolling = (vertical) ? (Math.abs(accDx) < Math.abs(-transX)) : (Math.abs(accDx) < Math.abs(-transY)); 514 515 if(e.detail === e.MSGESTURE_FLAG_INERTIA){ 516 setImmediate(function (){ 517 el._gesture.stop(); 518 }); 519 520 return; 521 } 522 523 if (!scrolling || Number(new Date()) - startT > 500) { 524 e.preventDefault(); 525 if (!fade && slider.transitions) { 526 if (!slider.vars.animationLoop) { 527 dx = accDx / ((slider.currentSlide === 0 && accDx < 0 || slider.currentSlide === slider.last && accDx > 0) ? (Math.abs(accDx) / cwidth + 2) : 1); 528 } 529 slider.setProps(offset + dx, "setTouch"); 530 } 531 } 532 } 533 534 function onMSGestureEnd(e) { 535 e.stopPropagation(); 536 var slider = e.target._slider; 537 if(!slider){ 538 return; 539 } 540 if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) { 541 var updateDx = (reverse) ? -dx : dx, 542 target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev'); 543 544 if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) { 545 slider.flexAnimate(target, slider.vars.pauseOnAction); 546 } else { 547 if (!fade) { slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); } 548 } 549 } 550 551 startX = null; 552 startY = null; 553 dx = null; 554 offset = null; 555 accDx = 0; 556 } 557 } 558 }, 559 resize: function() { 560 if (!slider.animating && slider.is(':visible')) { 561 if (!carousel) { slider.doMath(); } 562 563 if (fade) { 564 // SMOOTH HEIGHT: 565 methods.smoothHeight(); 566 } else if (carousel) { //CAROUSEL: 567 slider.slides.width(slider.computedW); 568 slider.update(slider.pagingCount); 569 slider.setProps(); 570 } 571 else if (vertical) { //VERTICAL: 572 slider.viewport.height(slider.h); 573 slider.setProps(slider.h, "setTotal"); 574 } else { 575 // SMOOTH HEIGHT: 576 if (slider.vars.smoothHeight) { methods.smoothHeight(); } 577 slider.newSlides.width(slider.computedW); 578 slider.setProps(slider.computedW, "setTotal"); 579 } 580 } 581 }, 582 smoothHeight: function(dur) { 583 if (!vertical || fade) { 584 var $obj = (fade) ? slider : slider.viewport; 585 (dur) ? $obj.animate({"height": slider.slides.eq(slider.animatingTo).height()}, dur) : $obj.height(slider.slides.eq(slider.animatingTo).height()); 586 } 587 }, 588 sync: function(action) { 589 var $obj = $(slider.vars.sync).data("flexslider"), 590 target = slider.animatingTo; 591 592 switch (action) { 593 case "animate": $obj.flexAnimate(target, slider.vars.pauseOnAction, false, true); break; 594 case "play": if (!$obj.playing && !$obj.asNav) { $obj.play(); } break; 595 case "pause": $obj.pause(); break; 596 } 597 }, 598 uniqueID: function($clone) { 599 // Append _clone to current level and children elements with id attributes 600 $clone.filter( '[id]' ).add($clone.find( '[id]' )).each(function() { 601 var $this = $(this); 602 $this.attr( 'id', $this.attr( 'id' ) + '_clone' ); 603 }); 604 return $clone; 605 }, 606 pauseInvisible: { 607 visProp: null, 608 init: function() { 609 var visProp = methods.pauseInvisible.getHiddenProp(); 610 if (visProp) { 611 var evtname = visProp.replace(/[H|h]idden/,'') + 'visibilitychange'; 612 document.addEventListener(evtname, function() { 613 if (methods.pauseInvisible.isHidden()) { 614 if(slider.startTimeout) { 615 clearTimeout(slider.startTimeout); //If clock is ticking, stop timer and prevent from starting while invisible 616 } else { 617 slider.pause(); //Or just pause 618 } 619 } 620 else { 621 if(slider.started) { 622 slider.play(); //Initiated before, just play 623 } else { 624 if (slider.vars.initDelay > 0) { 625 setTimeout(slider.play, slider.vars.initDelay); 626 } else { 627 slider.play(); //Didn't init before: simply init or wait for it 628 } 629 } 630 } 631 }); 632 } 633 }, 634 isHidden: function() { 635 var prop = methods.pauseInvisible.getHiddenProp(); 636 if (!prop) { 637 return false; 638 } 639 return document[prop]; 640 }, 641 getHiddenProp: function() { 642 var prefixes = ['webkit','moz','ms','o']; 643 // if 'hidden' is natively supported just return it 644 if ('hidden' in document) { 645 return 'hidden'; 646 } 647 // otherwise loop over all the known prefixes until we find one 648 for ( var i = 0; i < prefixes.length; i++ ) { 649 if ((prefixes[i] + 'Hidden') in document) { 650 return prefixes[i] + 'Hidden'; 651 } 652 } 653 // otherwise it's not supported 654 return null; 655 } 656 }, 657 setToClearWatchedEvent: function() { 658 clearTimeout(watchedEventClearTimer); 659 watchedEventClearTimer = setTimeout(function() { 660 watchedEvent = ""; 661 }, 3000); 662 } 663 }; 664 665 // public methods 666 slider.flexAnimate = function(target, pause, override, withSync, fromNav) { 667 if (!slider.vars.animationLoop && target !== slider.currentSlide) { 668 slider.direction = (target > slider.currentSlide) ? "next" : "prev"; 669 } 670 671 if (asNav && slider.pagingCount === 1) slider.direction = (slider.currentItem < target) ? "next" : "prev"; 672 673 if (!slider.animating && (slider.canAdvance(target, fromNav) || override) && slider.is(":visible")) { 674 if (asNav && withSync) { 675 var master = $(slider.vars.asNavFor).data('flexslider'); 676 slider.atEnd = target === 0 || target === slider.count - 1; 677 master.flexAnimate(target, true, false, true, fromNav); 678 slider.direction = (slider.currentItem < target) ? "next" : "prev"; 679 master.direction = slider.direction; 680 681 if (Math.ceil((target + 1)/slider.visible) - 1 !== slider.currentSlide && target !== 0) { 682 slider.currentItem = target; 683 slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide"); 684 target = Math.floor(target/slider.visible); 685 } else { 686 slider.currentItem = target; 687 slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide"); 688 return false; 689 } 690 } 691 692 slider.animating = true; 693 slider.animatingTo = target; 694 695 // SLIDESHOW: 696 if (pause) { slider.pause(); } 697 698 // API: before() animation Callback 699 slider.vars.before(slider); 700 701 // SYNC: 702 if (slider.syncExists && !fromNav) { methods.sync("animate"); } 703 704 // CONTROLNAV 705 if (slider.vars.controlNav) { methods.controlNav.active(); } 706 707 // !CAROUSEL: 708 // CANDIDATE: slide active class (for add/remove slide) 709 if (!carousel) { slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide'); } 710 711 // INFINITE LOOP: 712 // CANDIDATE: atEnd 713 slider.atEnd = target === 0 || target === slider.last; 714 715 // DIRECTIONNAV: 716 if (slider.vars.directionNav) { methods.directionNav.update(); } 717 718 if (target === slider.last) { 719 // API: end() of cycle Callback 720 slider.vars.end(slider); 721 // SLIDESHOW && !INFINITE LOOP: 722 if (!slider.vars.animationLoop) { slider.pause(); } 723 } 724 725 // SLIDE: 726 if (!fade) { 727 var dimension = (vertical) ? slider.slides.filter(':first').height() : slider.computedW, 728 margin, slideString, calcNext; 729 730 // INFINITE LOOP / REVERSE: 731 if (carousel) { 732 //margin = (slider.vars.itemWidth > slider.w) ? slider.vars.itemMargin * 2 : slider.vars.itemMargin; 733 margin = slider.vars.itemMargin; 734 calcNext = ((slider.itemW + margin) * slider.move) * slider.animatingTo; 735 slideString = (calcNext > slider.limit && slider.visible !== 1) ? slider.limit : calcNext; 736 } else if (slider.currentSlide === 0 && target === slider.count - 1 && slider.vars.animationLoop && slider.direction !== "next") { 737 slideString = (reverse) ? (slider.count + slider.cloneOffset) * dimension : 0; 738 } else if (slider.currentSlide === slider.last && target === 0 && slider.vars.animationLoop && slider.direction !== "prev") { 739 slideString = (reverse) ? 0 : (slider.count + 1) * dimension; 740 } else { 741 slideString = (reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension : (target + slider.cloneOffset) * dimension; 742 } 743 slider.setProps(slideString, "", slider.vars.animationSpeed); 744 if (slider.transitions) { 745 if (!slider.vars.animationLoop || !slider.atEnd) { 746 slider.animating = false; 747 slider.currentSlide = slider.animatingTo; 748 } 749 750 // Unbind previous transitionEnd events and re-bind new transitionEnd event 751 slider.container.unbind("webkitTransitionEnd transitionend"); 752 slider.container.bind("webkitTransitionEnd transitionend", function() { 753 clearTimeout(slider.ensureAnimationEnd); 754 slider.wrapup(dimension); 755 }); 756 757 // Insurance for the ever-so-fickle transitionEnd event 758 clearTimeout(slider.ensureAnimationEnd); 759 slider.ensureAnimationEnd = setTimeout(function() { 760 slider.wrapup(dimension); 761 }, slider.vars.animationSpeed + 100); 762 763 } else { 764 slider.container.animate(slider.args, slider.vars.animationSpeed, slider.vars.easing, function(){ 765 slider.wrapup(dimension); 766 }); 767 } 768 } else { // FADE: 769 if (!touch) { 770 //slider.slides.eq(slider.currentSlide).fadeOut(slider.vars.animationSpeed, slider.vars.easing); 771 //slider.slides.eq(target).fadeIn(slider.vars.animationSpeed, slider.vars.easing, slider.wrapup); 772 773 slider.slides.eq(slider.currentSlide).css({"zIndex": 1}).animate({"opacity": 0}, slider.vars.animationSpeed, slider.vars.easing); 774 slider.slides.eq(target).css({"zIndex": 2}).animate({"opacity": 1}, slider.vars.animationSpeed, slider.vars.easing, slider.wrapup); 775 776 } else { 777 slider.slides.eq(slider.currentSlide).css({ "opacity": 0, "zIndex": 1 }); 778 slider.slides.eq(target).css({ "opacity": 1, "zIndex": 2 }); 779 slider.wrapup(dimension); 780 } 781 } 782 // SMOOTH HEIGHT: 783 if (slider.vars.smoothHeight) { methods.smoothHeight(slider.vars.animationSpeed); } 784 } 785 }; 786 slider.wrapup = function(dimension) { 787 // SLIDE: 788 if (!fade && !carousel) { 789 if (slider.currentSlide === 0 && slider.animatingTo === slider.last && slider.vars.animationLoop) { 790 slider.setProps(dimension, "jumpEnd"); 791 } else if (slider.currentSlide === slider.last && slider.animatingTo === 0 && slider.vars.animationLoop) { 792 slider.setProps(dimension, "jumpStart"); 793 } 794 } 795 slider.animating = false; 796 slider.currentSlide = slider.animatingTo; 797 // API: after() animation Callback 798 slider.vars.after(slider); 799 }; 800 801 // SLIDESHOW: 802 slider.animateSlides = function() { 803 if (!slider.animating && focused ) { slider.flexAnimate(slider.getTarget("next")); } 804 }; 805 // SLIDESHOW: 806 slider.pause = function() { 807 clearInterval(slider.animatedSlides); 808 slider.animatedSlides = null; 809 slider.playing = false; 810 // PAUSEPLAY: 811 if (slider.vars.pausePlay) { methods.pausePlay.update("play"); } 812 // SYNC: 813 if (slider.syncExists) { methods.sync("pause"); } 814 }; 815 // SLIDESHOW: 816 slider.play = function() { 817 if (slider.playing) { clearInterval(slider.animatedSlides); } 818 slider.animatedSlides = slider.animatedSlides || setInterval(slider.animateSlides, slider.vars.slideshowSpeed); 819 slider.started = slider.playing = true; 820 // PAUSEPLAY: 821 if (slider.vars.pausePlay) { methods.pausePlay.update("pause"); } 822 // SYNC: 823 if (slider.syncExists) { methods.sync("play"); } 824 }; 825 // STOP: 826 slider.stop = function () { 827 slider.pause(); 828 slider.stopped = true; 829 }; 830 slider.canAdvance = function(target, fromNav) { 831 // ASNAV: 832 var last = (asNav) ? slider.pagingCount - 1 : slider.last; 833 return (fromNav) ? true : 834 (asNav && slider.currentItem === slider.count - 1 && target === 0 && slider.direction === "prev") ? true : 835 (asNav && slider.currentItem === 0 && target === slider.pagingCount - 1 && slider.direction !== "next") ? false : 836 (target === slider.currentSlide && !asNav) ? false : 837 (slider.vars.animationLoop) ? true : 838 (slider.atEnd && slider.currentSlide === 0 && target === last && slider.direction !== "next") ? false : 839 (slider.atEnd && slider.currentSlide === last && target === 0 && slider.direction === "next") ? false : 840 true; 841 }; 842 slider.getTarget = function(dir) { 843 slider.direction = dir; 844 if (dir === "next") { 845 return (slider.currentSlide === slider.last) ? 0 : slider.currentSlide + 1; 846 } else { 847 return (slider.currentSlide === 0) ? slider.last : slider.currentSlide - 1; 848 } 849 }; 850 851 // SLIDE: 852 slider.setProps = function(pos, special, dur) { 853 var target = (function() { 854 var posCheck = (pos) ? pos : ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo, 855 posCalc = (function() { 856 if (carousel) { 857 return (special === "setTouch") ? pos : 858 (reverse && slider.animatingTo === slider.last) ? 0 : 859 (reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) : 860 (slider.animatingTo === slider.last) ? slider.limit : posCheck; 861 } else { 862 switch (special) { 863 case "setTotal": return (reverse) ? ((slider.count - 1) - slider.currentSlide + slider.cloneOffset) * pos : (slider.currentSlide + slider.cloneOffset) * pos; 864 case "setTouch": return (reverse) ? pos : pos; 865 case "jumpEnd": return (reverse) ? pos : slider.count * pos; 866 case "jumpStart": return (reverse) ? slider.count * pos : pos; 867 default: return pos; 868 } 869 } 870 }()); 871 872 return (posCalc * -1) + "px"; 873 }()); 874 875 if (slider.transitions) { 876 target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + target + ",0,0)"; 877 dur = (dur !== undefined) ? (dur/1000) + "s" : "0s"; 878 slider.container.css("-" + slider.pfx + "-transition-duration", dur); 879 slider.container.css("transition-duration", dur); 880 } 881 882 slider.args[slider.prop] = target; 883 if (slider.transitions || dur === undefined) { slider.container.css(slider.args); } 884 885 slider.container.css('transform',target); 886 }; 887 888 slider.setup = function(type) { 889 // SLIDE: 890 if (!fade) { 891 var sliderOffset, arr; 892 893 if (type === "init") { 894 slider.viewport = $('<div class="' + namespace + 'viewport"></div>').css({"overflow": "hidden", "position": "relative"}).appendTo(slider).append(slider.container); 895 // INFINITE LOOP: 896 slider.cloneCount = 0; 897 slider.cloneOffset = 0; 898 // REVERSE: 899 if (reverse) { 900 arr = $.makeArray(slider.slides).reverse(); 901 slider.slides = $(arr); 902 slider.container.empty().append(slider.slides); 903 } 904 } 905 // INFINITE LOOP && !CAROUSEL: 906 if (slider.vars.animationLoop && !carousel) { 907 slider.cloneCount = 2; 908 slider.cloneOffset = 1; 909 // clear out old clones 910 if (type !== "init") { slider.container.find('.clone').remove(); } 911 slider.container.append(methods.uniqueID(slider.slides.first().clone().addClass('clone')).attr('aria-hidden', 'true')) 912 .prepend(methods.uniqueID(slider.slides.last().clone().addClass('clone')).attr('aria-hidden', 'true')); 913 } 914 slider.newSlides = $(slider.vars.selector, slider); 915 916 sliderOffset = (reverse) ? slider.count - 1 - slider.currentSlide + slider.cloneOffset : slider.currentSlide + slider.cloneOffset; 917 // VERTICAL: 918 if (vertical && !carousel) { 919 slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%"); 920 setTimeout(function(){ 921 slider.newSlides.css({"display": "block"}); 922 slider.doMath(); 923 slider.viewport.height(slider.h); 924 slider.setProps(sliderOffset * slider.h, "init"); 925 }, (type === "init") ? 100 : 0); 926 } else { 927 slider.container.width((slider.count + slider.cloneCount) * 200 + "%"); 928 slider.setProps(sliderOffset * slider.computedW, "init"); 929 setTimeout(function(){ 930 slider.doMath(); 931 slider.newSlides.css({"width": slider.computedW, "float": "left", "display": "block"}); 932 // SMOOTH HEIGHT: 933 if (slider.vars.smoothHeight) { methods.smoothHeight(); } 934 }, (type === "init") ? 100 : 0); 935 } 936 } else { // FADE: 937 slider.slides.css({"width": "100%", "float": "left", "marginRight": "-100%", "position": "relative"}); 938 if (type === "init") { 939 if (!touch) { 940 //slider.slides.eq(slider.currentSlide).fadeIn(slider.vars.animationSpeed, slider.vars.easing); 941 if (slider.vars.fadeFirstSlide == false) { 942 slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).css({"opacity": 1}); 943 } else { 944 slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).animate({"opacity": 1},slider.vars.animationSpeed,slider.vars.easing); 945 } 946 } else { 947 slider.slides.css({ "opacity": 0, "display": "block", "webkitTransition": "opacity " + slider.vars.animationSpeed / 1000 + "s ease", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2}); 948 } 949 } 950 // SMOOTH HEIGHT: 951 if (slider.vars.smoothHeight) { methods.smoothHeight(); } 952 } 953 // !CAROUSEL: 954 // CANDIDATE: active slide 955 if (!carousel) { slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide"); } 956 957 //FlexSlider: init() Callback 958 slider.vars.init(slider); 959 }; 960 961 slider.doMath = function() { 962 var slide = slider.slides.first(), 963 slideMargin = slider.vars.itemMargin, 964 minItems = slider.vars.minItems, 965 maxItems = slider.vars.maxItems; 966 967 slider.w = (slider.viewport===undefined) ? slider.width() : slider.viewport.width(); 968 slider.h = slide.height(); 969 slider.boxPadding = slide.outerWidth() - slide.width(); 970 971 // CAROUSEL: 972 if (carousel) { 973 slider.itemT = slider.vars.itemWidth + slideMargin; 974 slider.minW = (minItems) ? minItems * slider.itemT : slider.w; 975 slider.maxW = (maxItems) ? (maxItems * slider.itemT) - slideMargin : slider.w; 976 slider.itemW = (slider.minW > slider.w) ? (slider.w - (slideMargin * (minItems - 1)))/minItems : 977 (slider.maxW < slider.w) ? (slider.w - (slideMargin * (maxItems - 1)))/maxItems : 978 (slider.vars.itemWidth > slider.w) ? slider.w : slider.vars.itemWidth; 979 980 slider.visible = Math.floor(slider.w/(slider.itemW)); 981 slider.move = (slider.vars.move > 0 && slider.vars.move < slider.visible ) ? slider.vars.move : slider.visible; 982 slider.pagingCount = Math.ceil(((slider.count - slider.visible)/slider.move) + 1); 983 slider.last = slider.pagingCount - 1; 984 slider.limit = (slider.pagingCount === 1) ? 0 : 985 (slider.vars.itemWidth > slider.w) ? (slider.itemW * (slider.count - 1)) + (slideMargin * (slider.count - 1)) : ((slider.itemW + slideMargin) * slider.count) - slider.w - slideMargin; 986 } else { 987 slider.itemW = slider.w; 988 slider.pagingCount = slider.count; 989 slider.last = slider.count - 1; 990 } 991 slider.computedW = slider.itemW - slider.boxPadding; 992 }; 993 994 slider.update = function(pos, action) { 995 slider.doMath(); 996 997 // update currentSlide and slider.animatingTo if necessary 998 if (!carousel) { 999 if (pos < slider.currentSlide) { 1000 slider.currentSlide += 1; 1001 } else if (pos <= slider.currentSlide && pos !== 0) { 1002 slider.currentSlide -= 1; 1003 } 1004 slider.animatingTo = slider.currentSlide; 1005 } 1006 1007 // update controlNav 1008 if (slider.vars.controlNav && !slider.manualControls) { 1009 if ((action === "add" && !carousel) || slider.pagingCount > slider.controlNav.length) { 1010 methods.controlNav.update("add"); 1011 } else if ((action === "remove" && !carousel) || slider.pagingCount < slider.controlNav.length) { 1012 if (carousel && slider.currentSlide > slider.last) { 1013 slider.currentSlide -= 1; 1014 slider.animatingTo -= 1; 1015 } 1016 methods.controlNav.update("remove", slider.last); 1017 } 1018 } 1019 // update directionNav 1020 if (slider.vars.directionNav) { methods.directionNav.update(); } 1021 1022 }; 1023 1024 slider.addSlide = function(obj, pos) { 1025 var $obj = $(obj); 1026 1027 slider.count += 1; 1028 slider.last = slider.count - 1; 1029 1030 // append new slide 1031 if (vertical && reverse) { 1032 (pos !== undefined) ? slider.slides.eq(slider.count - pos).after($obj) : slider.container.prepend($obj); 1033 } else { 1034 (pos !== undefined) ? slider.slides.eq(pos).before($obj) : slider.container.append($obj); 1035 } 1036 1037 // update currentSlide, animatingTo, controlNav, and directionNav 1038 slider.update(pos, "add"); 1039 1040 // update slider.slides 1041 slider.slides = $(slider.vars.selector + ':not(.clone)', slider); 1042 // re-setup the slider to accomdate new slide 1043 slider.setup(); 1044 1045 //FlexSlider: added() Callback 1046 slider.vars.added(slider); 1047 }; 1048 slider.removeSlide = function(obj) { 1049 var pos = (isNaN(obj)) ? slider.slides.index($(obj)) : obj; 1050 1051 // update count 1052 slider.count -= 1; 1053 slider.last = slider.count - 1; 1054 1055 // remove slide 1056 if (isNaN(obj)) { 1057 $(obj, slider.slides).remove(); 1058 } else { 1059 (vertical && reverse) ? slider.slides.eq(slider.last).remove() : slider.slides.eq(obj).remove(); 1060 } 1061 1062 // update currentSlide, animatingTo, controlNav, and directionNav 1063 slider.doMath(); 1064 slider.update(pos, "remove"); 1065 1066 // update slider.slides 1067 slider.slides = $(slider.vars.selector + ':not(.clone)', slider); 1068 // re-setup the slider to accomdate new slide 1069 slider.setup(); 1070 1071 // FlexSlider: removed() Callback 1072 slider.vars.removed(slider); 1073 }; 1074 1075 //FlexSlider: Initialize 1076 methods.init(); 1077 }; 1078 1079 // Ensure the slider isn't focussed if the window loses focus. 1080 $( window ).blur( function ( e ) { 1081 focused = false; 1082 }).focus( function ( e ) { 1083 focused = true; 1084 }); 1085 1086 //FlexSlider: Default Settings 1087 $.flexslider.defaults = { 1088 namespace: "flex-", //{NEW} String: Prefix string attached to the class of every element generated by the plugin 1089 selector: ".slides > li", //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril 1090 animation: "fade", //String: Select your animation type, "fade" or "slide" 1091 easing: "swing", //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported! 1092 direction: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical" 1093 reverse: false, //{NEW} Boolean: Reverse the animation direction 1094 animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end 1095 smoothHeight: false, //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode 1096 startAt: 0, //Integer: The slide that the slider should start on. Array notation (0 = first slide) 1097 slideshow: true, //Boolean: Animate slider automatically 1098 slideshowSpeed: 7000, //Integer: Set the speed of the slideshow cycling, in milliseconds 1099 animationSpeed: 600, //Integer: Set the speed of animations, in milliseconds 1100 initDelay: 0, //{NEW} Integer: Set an initialization delay, in milliseconds 1101 randomize: false, //Boolean: Randomize slide order 1102 fadeFirstSlide: true, //Boolean: Fade in the first slide when animation type is "fade" 1103 thumbCaptions: false, //Boolean: Whether or not to put captions on thumbnails when using the "thumbnails" controlNav. 1104 1105 // Usability features 1106 pauseOnAction: true, //Boolean: Pause the slideshow when interacting with control elements, highly recommended. 1107 pauseOnHover: false, //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering 1108 pauseInvisible: true, //{NEW} Boolean: Pause the slideshow when tab is invisible, resume when visible. Provides better UX, lower CPU usage. 1109 useCSS: true, //{NEW} Boolean: Slider will use CSS3 transitions if available 1110 touch: true, //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices 1111 video: false, //{NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches 1112 1113 // Primary Controls 1114 controlNav: true, //Boolean: Create navigation for paging control of each slide? Note: Leave true for manualControls usage 1115 directionNav: true, //Boolean: Create navigation for previous/next navigation? (true/false) 1116 prevText: "Previous", //String: Set the text for the "previous" directionNav item 1117 nextText: "Next", //String: Set the text for the "next" directionNav item 1118 1119 // Secondary Navigation 1120 keyboard: true, //Boolean: Allow slider navigating via keyboard left/right keys 1121 multipleKeyboard: false, //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present. 1122 mousewheel: false, //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel
1123 pausePlay: false, //Boolean: Create pause/play dynamic element 1124 pauseText: "Pause", //String: Set the text for the "pause" pausePlay item 1125 playText: "Play", //String: Set the text for the "play" pausePlay item 1126 1127 // Special properties 1128 controlsContainer: "", //{UPDATED} jQuery Object/Selector: Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be $(".flexslider-container"). Property is ignored if given element is not found. 1129 manualControls: "", //{UPDATED} jQuery Object/Selector: Declare custom control navigation. Examples would be $(".flex-control-nav li") or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs. 1130 sync: "", //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care. 1131 asNavFor: "", //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider 1132 1133 // Carousel Options 1134 itemWidth: 0, //{NEW} Integer: Box-model width of individual carousel items, including horizontal borders and padding. 1135 itemMargin: 0, //{NEW} Integer: Margin between carousel items. 1136 minItems: 1, //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this. 1137 maxItems: 0, //{NEW} Integer: Maxmimum number of carousel items that should be visible. Items will resize fluidly when above this limit. 1138 move: 0, //{NEW} Integer: Number of carousel items that should move on animation. If 0, slider will move all visible items. 1139 allowOneSlide: true, //{NEW} Boolean: Whether or not to allow a slider comprised of a single slide 1140 1141 // Callback API 1142 start: function(){}, //Callback: function(slider) - Fires when the slider loads the first slide 1143 before: function(){}, //Callback: function(slider) - Fires asynchronously with each slider animation 1144 after: function(){}, //Callback: function(slider) - Fires after each slider animation completes 1145 end: function(){}, //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous) 1146 added: function(){}, //{NEW} Callback: function(slider) - Fires after a slide is added 1147 removed: function(){}, //{NEW} Callback: function(slider) - Fires after a slide is removed 1148 init: function() {} //{NEW} Callback: function(slider) - Fires after the slider is initially setup 1149 }; 1150 1151 //FlexSlider: Plugin Function 1152 $.fn.flexslider = function(options) { 1153 if (options === undefined) { options = {}; } 1154 1155 if (typeof options === "object") { 1156 return this.each(function() { 1157 var $this = $(this), 1158 selector = (options.selector) ? options.selector : ".slides > li", 1159 $slides = $this.find(selector); 1160 1161 if ( ( $slides.length === 1 && options.allowOneSlide === true ) || $slides.length === 0 ) { 1162 $slides.fadeIn(400); 1163 if (options.start) { options.start($this); } 1164 } else if ($this.data('flexslider') === undefined) { 1165 new $.flexslider(this, options); 1166 } 1167 }); 1168 } else { 1169 // Helper strings to quickly perform functions on the slider 1170 var $slider = $(this).data('flexslider'); 1171 switch (options) { 1172 case "play": $slider.play(); break; 1173 case "pause": $slider.pause(); break; 1174 case "stop": $slider.stop(); break; 1175 case "next": $slider.flexAnimate($slider.getTarget("next"), true); break; 1176 case "prev": 1177 case "previous": $slider.flexAnimate($slider.getTarget("prev"), true); break; 1178 default: if (typeof options === "number") { $slider.flexAnimate(options, true); } 1179 } 1180 } 1181 }; 1182})(jQuery); 1183 1184/*! Picturefill - v2.1.0 - 2014-07-25 1185 * http://scottjehl.github.io/picturefill 1186 * Copyright (c) 2014 https://github.com/scottjehl/picturefill/blob/master/Authors.txt; Licensed MIT */ 1187window.matchMedia||(window.matchMedia=function(){"use strict";var a=window.styleMedia||window.media;if(!a){var b=document.createElement("style"),c=document.getElementsByTagName("script")[0],d=null;b.type="text/css",b.id="matchmediajs-test",c.parentNode.insertBefore(b,c),d="getComputedStyle"in window&&window.getComputedStyle(b,null)||b.currentStyle,a={matchMedium:function(a){var c="@media "+a+"{ #matchmediajs-test { width: 1px; } }";return b.styleSheet?b.styleSheet.cssText=c:b.textContent=c,"1px"===d.width}}}return function(b){return{matches:a.matchMedium(b||"all"),media:b||"all"}}}()),function(a,b){"use strict";function c(a){var b,c,d,f,g,h=a||{};b=h.elements||e.getAllElements();for(var i=0,j=b.length;j>i;i++)if(c=b[i],d=c.parentNode,f=void 0,g=void 0,c[e.ns]||(c[e.ns]={}),h.reevaluate||!c[e.ns].evaluated){if("PICTURE"===d.nodeName.toUpperCase()){if(e.removeVideoShim(d),f=e.getMatch(c,d),f===!1)continue}else f=void 0;("PICTURE"===d.nodeName.toUpperCase()||c.srcset&&!e.srcsetSupported||!e.sizesSupported&&c.srcset&&c.srcset.indexOf("w")>
1187-1)&&e.dodgeSrcset(c),f?(g=e.processSourceSet(f),e.applyBestCandidate(g,c)):(g=e.processSourceSet(c),(void 0===c.srcset||c[e.ns].srcset)&&e.applyBestCandidate(g,c)),c[e.ns].evaluated=!0}}function d(){c();var d=setInterval(function(){return c(),/^loaded|^i|^c/.test(b.readyState)?void clearInterval(d):void 0},250);if(a.addEventListener){var e;a.addEventListener("resize",function(){a._picturefillWorking||(a._picturefillWorking=!0,a.clearTimeout(e),e=a.setTimeout(function(){c({reevaluate:!0}),a._picturefillWorking=!1},60))},!1)}}if(a.HTMLPictureElement)return void(a.picturefill=function(){});b.createElement("picture");var e={};e.ns="picturefill",e.srcsetSupported="srcset"in b.createElement("img"),e.sizesSupported=a.HTMLImageElement.sizes,e.trim=function(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")},e.endsWith=function(a,b){return a.endsWith?a.endsWith(b):-1!==a.indexOf(b,a.length-b.length)},e.matchesMedia=function(b){return a.matchMedia&&a.matchMedia(b).matches},e.getDpr=function(){return a.devicePixelRatio||1},e.getWidthFromLength=function(a){return a=a&&(parseFloat(a)>0||a.indexOf("calc(")>-1)?a:"100vw",a=a.replace("vw","%"),e.lengthEl||(e.lengthEl=b.createElement("div"),b.documentElement.insertBefore(e.lengthEl,b.documentElement.firstChild)),e.lengthEl.style.cssText="position: absolute; left: 0; width: "+a+";",e.lengthEl.offsetWidth<=0&&(e.lengthEl.style.cssText="width: 100%;"),e.lengthEl.offsetWidth},e.types={},e.types["image/jpeg"]=!0,e.types["image/gif"]=!0,e.types["image/png"]=!0,e.types["image/svg+xml"]=b.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"),e.types["image/webp"]=function(){var b=new a.Image,d="image/webp";b.onerror=function(){e.types[d]=!1,c()},b.onload=function(){e.types[d]=1===b.width,c()},b.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="},e.verifyTypeSupport=function(a){var b=a.getAttribute("type");return null===b||""===b?!0:"function"==typeof e.types[b]?(e.types[b](),"pending"):e.types[b]},e.parseSize=function(a){var b=/(\([^)]+\))?\s*(.+)/g.exec(a);return{media:b&&b[1],length:b&&b[2]}},e.findWidthFromSourceSize=function(a){for(var b,c=e.trim(a).split(/\s*,\s*/),d=0,f=c.length;f>d;d++){var g=c[d],h=e.parseSize(g),i=h.length,j=h.media;if(i&&(!j||e.matchesMedia(j))){b=i;break}}return e.getWidthFromLength(b)},e.parseSrcset=function(a){for(var b=[];""!==a;){a=a.replace(/^\s+/g,"");var c,d=a.search(/\s/g),e=null;if(-1!==d){c=a.slice(0,d);var f=c[c.length-1];if((","===f||""===c)&&(c=c.replace(/,+$/,""),e=""),a=a.slice(d+1),null===e){var g=a.indexOf(",");-1!==g?(e=a.slice(0,g),a=a.slice(g+1)):(e=a,a="")}}else c=a,a="";(c||e)&&b.push({url:c,descriptor:e})}return b},e.parseDescriptor=function(a,b){var c,d=b||"100vw",f=a&&a.replace(/(^\s+|\s+$)/g,""),g=e.findWidthFromSourceSize(d);if(f)for(var h=f.split(" "),i=h.length+1;i>=0;i--)if(void 0!==h[i]){var j=h[i],k=j&&j.slice(j.length-1);if("h"!==k&&"w"!==k||e.sizesSupported){if("x"===k){var l=j&&parseFloat(j,10);c=l&&!isNaN(l)?l:1}}else c=parseFloat(parseInt(j,10)/g)}return c||1},e.getCandidatesFromSourceSet=function(a,b){for(var c=e.parseSrcset(a),d=[],f=0,g=c.length;g>f;f++){var h=c[f];d.push({url:h.url,resolution:e.parseDescriptor(h.descriptor,b)})}return d},e.dodgeSrcset=function(a){a.srcset&&(a[e.ns].srcset=a.srcset,a.removeAttribute("srcset"))},e.processSourceSet=function(a){var b=a.getAttribute("srcset"),c=a.getAttribute("sizes"),d=[];return"IMG"===a.nodeName.toUpperCase()&&a[e.ns]&&a[e.ns].srcset&&(b=a[e.ns].srcset),b&&(d=e.getCandidatesFromSourceSet(b,c)),d},e.applyBestCandidate=function(a,b){var c,d,f;a.sort(e.ascendingSort),d=a.length,f=a[d-1];for(var g=0;d>g;g++)if(c=a[g],c.resolution>=e.getDpr()){f=c;break}f&&!e.endsWith(b.src,f.url)&&(b.src=f.url,b.currentSrc=b.src)},e.ascendingSort=function(a,b){return a.resolution-b.resolution},e.removeVideoShim=function(a){var b=a.getElementsByTagName("video");if(b.length){for(var c=b[0],d=c.getElementsByTagName("source");d.length;)a.insertBefore(d[0],c);c.parentNode.removeChild(c)}},e.getAllElements=function(){for(var a=[],c=b.getElementsByTagName("img"),d=0,f=c.length;f>d;d++){var g=c[d];("PICTURE"===g.parentNode.nodeName.toUpperCase()||null!==g.getAttribute("srcset")||g[e.ns]&&null!==g[e.ns].srcset)&&a.push(g)}return a},e.getMatch=function(a,b){for(var c,d=b.childNodes,f=0,g=d.length;g>f;f++){var h=d[f];if(1===h.nodeType){if(h===a)return c;
1187if("SOURCE"===h.nodeName.toUpperCase()){null!==h.getAttribute("src")&&void 0!==typeof console&&console.warn("The `src` attribute is invalid on `picture` `source` element; instead, use `srcset`.");var i=h.getAttribute("media");if(h.getAttribute("srcset")&&(!i||e.matchesMedia(i))){var j=e.verifyTypeSupport(h);if(j===!0){c=h;break}if("pending"===j)return!1}}}}return c},d(),c._=e,"object"==typeof module&&"object"==typeof module.exports?module.exports=c:"function"==typeof define&&define.amd?define(function(){return c}):"object"==typeof a&&(a.picturefill=c)}(this,this.document); 1188 1189/* 1190 * FancyBox 1191 * Version: Custom-Fix auf Basis von 1.3.4 1192 * Requires: jQuery v1.9+ 1193 */ 1194;(function($) { 1195 var tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right, start_pos, final_pos, 1196 $w = $(window), 1197 $d = $(document), 1198 lastResizeW, 1199 lastResizeH, 1200 selectedIndex = 0, 1201 selectedOpts = {}, 1202 selectedArray = [], 1203 currentIndex = 0, 1204 currentOpts = {}, 1205 currentArray = [], 1206 ajaxLoader = null, 1207 imgPreloader = new Image(), 1208 imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, 1209 swfRegExp = /[^\.]\.(swf)\s*$/i, 1210 loadingTimer, 1211 loadingFrame = 1, 1212 titleHeight = 0, 1213 titleStr = '', 1214 busy = false, 1215 fx = $.extend($('<div/>')[0], { prop: 0 }), 1216 1217 _abort = function() { 1218 loading.hide(); 1219 1220 imgPreloader.onerror = imgPreloader.onload = null; 1221 1222 if (ajaxLoader) { 1223 ajaxLoader.abort(); 1224 } 1225 1226 tmp.empty(); 1227 }, 1228 1229 _error = function() { 1230 if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) { 1231 loading.hide(); 1232 busy = false; 1233 return; 1234 } 1235 1236 selectedOpts.titleShow = false; 1237 1238 selectedOpts.width = 'auto'; 1239 selectedOpts.height = 'auto'; 1240 1241 tmp.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>'); 1242 1243 _process_inline(); 1244 }, 1245 1246 _start = function() { 1247 var obj = selectedArray[ selectedIndex ], 1248 $obj = $(obj), 1249 href, 1250 type, 1251 title, 1252 str, 1253 emb, 1254 ret, 1255 o; 1256 1257 _abort(); 1258 1259 selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $obj.data('fancybox') === 'undefined' ? selectedOpts : $obj.data('fancybox'))); 1260 1261 ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts); 1262 1263 if (ret === false) { 1264 busy = false; 1265 return; 1266 } else if (typeof ret === 'object') { 1267 selectedOpts = $.extend(selectedOpts, ret); 1268 } 1269 1270 title = selectedOpts.title || (obj.nodeName ? $obj.attr('title') : obj.title) || ''; 1271 1272 if (obj.nodeName && !selectedOpts.orig) { 1273 selectedOpts.orig = $obj.children("img:first").length ? $obj.children("img:first") : $obj; 1274 } 1275 1276 if (title === '' && selectedOpts.orig && selectedOpts.titleFromAlt) { 1277 title = selectedOpts.orig.attr('alt'); 1278 } 1279 1280 href = selectedOpts.href || (obj.nodeName ? $obj.attr('href') : obj.href) || null; 1281 1282 if ((/^(?:javascript)/i).test(href) || href === '#') { 1283 href = null; 1284 } 1285 1286 if (selectedOpts.type) { 1287 type = selectedOpts.type; 1288 1289 if (!href) { 1290 href = selectedOpts.content; 1291 } 1292 1293 } else if (selectedOpts.content) { 1294 type = 'html'; 1295 1296 } else if (href) { 1297 if (href.match(imgRegExp)) { 1298 type = 'image'; 1299 1300 } else if (href.match(swfRegExp)) { 1301 type = 'swf'; 1302 1303 } else if ($obj.hasClass("iframe")) { 1304 type = 'iframe'; 1305 1306 } else if (href.indexOf("#") === 0) { 1307 type = 'inline'; 1308 1309 } else { 1310 type = 'ajax'; 1311 } 1312 } 1313 1314 if (!type) { 1315 _error(); 1316 return; 1317 } 1318 1319 if (type === 'inline') { 1320 $obj = $(href.substr(href.indexOf("#"))); 1321 type = $obj.length > 0 ? 'inline' : 'ajax'; 1322 } 1323 1324 selectedOpts.type = type; 1325 selectedOpts.href = href; 1326 selectedOpts.title = title; 1327 1328 if (selectedOpts.autoDimensions) { 1329 if (selectedOpts.type === 'html' || selectedOpts.type === 'inline' || selectedOpts.type === 'ajax') { 1330 selectedOpts.width = 'auto'; 1331 selectedOpts.height = 'auto'; 1332 } else { 1333 selectedOpts.autoDimensions = false; 1334 } 1335 } 1336 1337 if (selectedOpts.modal) { 1338 selectedOpts.overlayShow = true; 1339 selectedOpts.hideOnOverlayClick = false; 1340 selectedOpts.hideOnContentClick = false; 1341 selectedOpts.enableEscapeButton = false;
1342 selectedOpts.showCloseButton = false; 1343 } 1344 1345 selectedOpts.padding = parseInt(selectedOpts.padding, 10); 1346 selectedOpts.margin = parseInt(selectedOpts.margin, 10); 1347 1348 tmp.css('padding', (selectedOpts.padding + selectedOpts.margin)); 1349 1350 $('.fancybox-inline-tmp').off('fancybox-cancel').on('fancybox-change', function() { 1351 $(this).replaceWith(content.children()); 1352 console.log(content); 1353 console.log(content.children()); 1354 }); 1355 1356 switch (type) { 1357 case 'html' : 1358 tmp.html(selectedOpts.content); 1359 _process_inline(); 1360 break; 1361 1362 case 'inline' : 1363 if ($obj.parent().is('#fancybox-content') === true) { 1364 busy = false; 1365 return; 1366 } 1367 1368 $('<div class="fancybox-inline-tmp" />') 1369 .hide() 1370 .insertBefore($obj) 1371 .on('fancybox-cleanup', function() { 1372 $(this).replaceWith(content.children()); 1373 }).on('fancybox-cancel', function() { 1374 $(this).replaceWith(tmp.children()); 1375 }); 1376 1377 $obj.appendTo(tmp); 1378 1379 _process_inline(); 1380 break; 1381 1382 case 'image': 1383 busy = false; 1384 1385 $.fancybox.showActivity(); 1386 1387 imgPreloader = new Image(); 1388 1389 imgPreloader.onerror = function() { 1390 _error(); 1391 }; 1392 1393 imgPreloader.onload = function() { 1394 busy = true; 1395 1396 imgPreloader.onerror = imgPreloader.onload = null; 1397 1398 _process_image(); 1399 }; 1400 1401 imgPreloader.src = href; 1402 break; 1403 1404 case 'swf': 1405 selectedOpts.scrolling = 'no'; 1406 1407 str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"><param name="movie" value="' + href + '"></param>'; 1408 emb = ''; 1409 1410 $.each(selectedOpts.swf, function(name, val) { 1411 str += '<param name="' + name + '" value="' + val + '"></param>'; 1412 emb += ' ' + name + '="' + val + '"'; 1413 }); 1414 1415 str += '<embed src="' + href + '" type="application/x-shockwave-flash" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"' + emb + '></embed></object>'; 1416 1417 tmp.html(str); 1418 1419 _process_inline(); 1420 break; 1421 1422 case 'ajax': 1423 busy = false; 1424 1425 $.fancybox.showActivity(); 1426 1427 selectedOpts.ajax.win = selectedOpts.ajax.success; 1428 1429 ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, { 1430 url : href, 1431 data : selectedOpts.ajax.data || {}, 1432 error : function(XMLHttpRequest) { 1433 if (XMLHttpRequest.status > 0) { 1434 _error(); 1435 } 1436 }, 1437 success : function(data, textStatus, XMLHttpRequest) { 1438 o = typeof XMLHttpRequest === 'object' ? XMLHttpRequest : ajaxLoader; 1439 if (o.status === 200) { 1440 if (typeof selectedOpts.ajax.win === 'function') { 1441 ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest); 1442 1443 if (ret === false) { 1444 loading.hide(); 1445 return; 1446 } else if (typeof ret === 'string' || typeof ret === 'object') { 1447 data = ret; 1448 } 1449 } 1450 1451 tmp.html(data); 1452 _process_inline(); 1453 } 1454 } 1455 })); 1456 1457 break; 1458 1459 case 'iframe': 1460 _show(); 1461 break; 1462 } 1463 }, 1464 1465 _process_inline = function() { 1466 var w = selectedOpts.width, 1467 h = selectedOpts.height; 1468 1469 if (w.toString().indexOf('%') > -1) { 1470 w = parseInt(($w.width() - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px'; 1471 } else { 1472 w = w === 'auto' ? 'auto' : w + 'px'; 1473 } 1474 1475 if (h.toString().indexOf('%') > -1) { 1476 h = parseInt(($w.height() - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px'; 1477 } else { 1478 h = h === 'auto' ? 'auto' : h + 'px'; 1479 } 1480 1481 tmp.wrapInner('<div style="width:' + w + ';height:' + h + ';overflow: ' + (selectedOpts.scrolling === 'auto' ? 'auto' : (selectedOpts.scrolling === 'yes' ? 'scroll' : 'hidden')) + ';position:relative;"></div>'); 1482 1483 selectedOpts.width = tmp.width(); 1484 selectedOpts.height = tmp.height(); 1485 1486 _show(); 1487 }, 1488 1489 _process_image = function() { 1490 selectedOpts.width = imgPreloader.width; 1491 selectedOpts.height = imgPreloader.height; 1492 1493 $("<img />").attr({ 1494 'id' : 'fancybox-img', 1495 'src' : imgPreloader.src, 1496 'alt' : selectedOpts.title 1497 }).appendTo(tmp); 1498 1499 _show(); 1500 }, 1501 1502 _show = function() { 1503 var pos, equal, finish_resizing; 1504 1505 loading.hide(); 1506 1507 if (currentOpts && currentOpts.onCleanup && wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) { 1508 //$.event.trigger('fancybox-cancel'); 1509 $('.fancybox-inline-tmp').trigger('fancybox-cancel'); 1510 busy = false;
1511 return; 1512 } 1513 1514 busy = true; 1515 1516 $(content.add(overlay)).off(); 1517 1518 $w.off("resize.fb scroll.fb"); 1519 $d.off('keydown.fb'); 1520 1521 if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') { 1522 wrap.css('height', wrap.height()); 1523 } 1524 1525 currentArray = selectedArray; 1526 currentIndex = selectedIndex; 1527 currentOpts = selectedOpts; 1528 1529 if (currentOpts.overlayShow) { 1530 overlay.css({ 1531 'background-color' : currentOpts.overlayColor, 1532 'opacity' : currentOpts.overlayOpacity, 1533 'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto', 1534 'height' : $d.height() 1535 }); 1536 1537 if (!overlay.is(':visible')) { 1538 overlay.show(); 1539 } 1540 } else { 1541 overlay.hide(); 1542 } 1543 1544 final_pos = _get_zoom_to(); 1545 1546 _process_title(); 1547 1548 if (wrap.is(":visible")) { 1549 $(close.add(nav_left).add(nav_right)).hide(); 1550 1551 pos = wrap.position(); 1552 1553 start_pos = { 1554 top : pos.top, 1555 left : pos.left, 1556 width : wrap.width(), 1557 height : wrap.height() 1558 }; 1559 1560 equal = (start_pos.width === final_pos.width && start_pos.height === final_pos.height); 1561 1562 content.fadeTo(currentOpts.changeFade, 0.3, function() { 1563 finish_resizing = function() { 1564 content.html(tmp.contents()).fadeTo(currentOpts.changeFade, 1, _finish); 1565 }; 1566 1567 //$.event.trigger('fancybox-change'); 1568 $('.fancybox-inline-tmp').trigger('fancybox-change'); 1569 content 1570 .empty() 1571 .removeAttr('filter') 1572 .css({ 1573 'border-width' : currentOpts.padding, 1574 'width' : final_pos.width - currentOpts.padding * 2, 1575 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2 1576 }); 1577 1578 if (equal) { 1579 finish_resizing(); 1580 } else { 1581 fx.prop = 0; 1582 1583 $(fx).animate({prop: 1}, { 1584 duration : currentOpts.changeSpeed, 1585 easing : currentOpts.easingChange, 1586 step : _draw, 1587 complete : finish_resizing 1588 }); 1589 } 1590 }); 1591 1592 return; 1593 } 1594 1595 wrap.removeAttr("style"); 1596 1597 content.css('border-width', currentOpts.padding); 1598 1599 if (currentOpts.transitionIn === 'elastic') { 1600 start_pos = _get_zoom_from(); 1601 1602 content.html(tmp.contents()); 1603 1604 wrap.show(); 1605 1606 if (currentOpts.opacity) { 1607 final_pos.opacity = 0; 1608 } 1609 1610 fx.prop = 0; 1611 1612 $(fx).animate({prop: 1}, { 1613 duration : currentOpts.speedIn, 1614 easing : currentOpts.easingIn, 1615 step : _draw, 1616 complete : _finish 1617 }); 1618 1619 return; 1620 } 1621 1622 if (currentOpts.titlePosition === 'inside' && titleHeight > 0) { 1623 title.show(); 1624 } 1625 1626 content 1627 .css({ 1628 'width' : final_pos.width - currentOpts.padding * 2, 1629 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2 1630 }) 1631 .html(tmp.contents()); 1632 1633 wrap 1634 .css(final_pos) 1635 .fadeIn(currentOpts.transitionIn === 'none' ? 0 : currentOpts.speedIn, _finish); 1636 }, 1637 1638 _format_title = function(title) { 1639 if (title && title.length) { 1640 if (currentOpts.titlePosition === 'float') { 1641 return '<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">' + title + '</td><td id="fancybox-title-float-right"></td></tr></table>'; 1642 } 1643 1644 return '<div id="fancybox-title-' + currentOpts.titlePosition + '">' + title + '</div>'; 1645 } 1646 1647 return false; 1648 }, 1649 1650 _process_title = function() { 1651 titleStr = currentOpts.title || ''; 1652 titleHeight = 0; 1653 1654 title 1655 .empty() 1656 .removeAttr('style') 1657 .removeClass(); 1658 1659 if (currentOpts.titleShow === false) { 1660 title.hide(); 1661 return; 1662 } 1663 1664 titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr); 1665 1666 if (!titleStr || titleStr === '') { 1667 title.hide(); 1668 return; 1669 } 1670 1671 title 1672 .addClass('fancybox-title-' + currentOpts.titlePosition) 1673 .html(titleStr) 1674 .appendTo('body') 1675 .show(); 1676 1677 switch (currentOpts.titlePosition) { 1678 case 'inside': 1679 title 1680 .css({ 1681 'width' : final_pos.width - (currentOpts.padding * 2), 1682 'marginLeft' : currentOpts.padding, 1683 'marginRight' : currentOpts.padding 1684 }); 1685 1686 titleHeight = title.outerHeight(true); 1687 1688 title.appendTo(outer); 1689 1690 final_pos.height += titleHeight; 1691 break; 1692
1693 case 'over': 1694 title 1695 .css({ 1696 'marginLeft' : currentOpts.padding, 1697 'width' : final_pos.width - (currentOpts.padding * 2), 1698 'bottom' : currentOpts.padding 1699 }) 1700 .appendTo(outer); 1701 break; 1702 1703 case 'float': 1704 title 1705 .css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1) 1706 .appendTo(wrap); 1707 break; 1708 1709 default: 1710 title 1711 .css({ 1712 'width' : final_pos.width - (currentOpts.padding * 2), 1713 'paddingLeft' : currentOpts.padding, 1714 'paddingRight' : currentOpts.padding 1715 }) 1716 .appendTo(wrap); 1717 break; 1718 } 1719 1720 title.hide(); 1721 }, 1722 1723 _set_navigation = function() { 1724 if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) { 1725 $d.on('keydown.fb', function(e) { 1726 if (e.keyCode === 27 && currentOpts.enableEscapeButton) { 1727 e.preventDefault(); 1728 $.fancybox.close(); 1729 1730 } else if ((e.keyCode === 37 || e.keyCode === 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') { 1731 e.preventDefault(); 1732 $.fancybox[ e.keyCode === 37 ? 'prev' : 'next'](); 1733 } 1734 }); 1735 } 1736 1737 if (!currentOpts.showNavArrows) { 1738 nav_left.hide(); 1739 nav_right.hide(); 1740 return; 1741 } 1742 1743 if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) { 1744 nav_left.show(); 1745 } 1746 1747 if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== (currentArray.length -1)) { 1748 nav_right.show(); 1749 } 1750 }, 1751 1752 _finish = function () { 1753 if (selectedOpts.autoDimensions) { 1754 content.css('height', 'auto'); 1755 } 1756 1757 wrap.css('height', 'auto'); 1758 1759 if (titleStr && titleStr.length) { 1760 title.show(); 1761 } 1762 1763 if (currentOpts.showCloseButton) { 1764 close.show(); 1765 } 1766 1767 _set_navigation(); 1768 1769 if (currentOpts.hideOnContentClick) { 1770 content.on('click', $.fancybox.close); 1771 } 1772 1773 if (currentOpts.hideOnOverlayClick) { 1774 overlay.on('click', $.fancybox.close); 1775 } 1776 1777 $w.on("resize.fb", $.fancybox.resize); 1778 1779 if (currentOpts.centerOnScroll) { 1780 $w.on("scroll.fb", $.fancybox.center); 1781 } 1782 1783 if (currentOpts.type === 'iframe') { 1784 $('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '" frameborder="0" hspace="0" allowtransparency="true" scrolling="' + selectedOpts.scrolling + '" src="' + currentOpts.href + '"></iframe>').appendTo(content); 1785 } 1786 1787 wrap.show(); 1788 1789 busy = false; 1790 1791 $.fancybox.center(); 1792 1793 currentOpts.onComplete(currentArray, currentIndex, currentOpts); 1794 1795 _preload_images(); 1796 }, 1797 1798 _preload_images = function() { 1799 var href, 1800 objNext; 1801 1802 if ((currentArray.length -1) > currentIndex) { 1803 href = currentArray[ currentIndex + 1 ].href; 1804 1805 if (typeof href !== 'undefined' && href.match(imgRegExp)) { 1806 objNext = new Image(); 1807 objNext.src = href; 1808 } 1809 } 1810 1811 if (currentIndex > 0) { 1812 href = currentArray[ currentIndex - 1 ].href; 1813 1814 if (typeof href !== 'undefined' && href.match(imgRegExp)) { 1815 objNext = new Image(); 1816 objNext.src = href; 1817 } 1818 } 1819 }, 1820 1821 _draw = function(pos) { 1822 var dim = { 1823 width : parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10), 1824 height : parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10), 1825 1826 top : parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10), 1827 left : parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10) 1828 }; 1829 1830 if (typeof final_pos.opacity !== 'undefined') { 1831 dim.opacity = pos < 0.5 ? 0.5 : pos; 1832 } 1833 1834 wrap.css(dim); 1835 1836 content.css({ 1837 'width' : dim.width - currentOpts.padding * 2, 1838 'height' : dim.height - (titleHeight * pos) - currentOpts.padding * 2 1839 }); 1840 }, 1841 1842 _get_viewport = function() { 1843 return [ 1844 $w.width() - (currentOpts.margin * 2), 1845 $w.height() - (currentOpts.margin * 2), 1846 $d.scrollLeft() + currentOpts.margin, 1847 $d.scrollTop() + currentOpts.margin 1848 ]; 1849 }, 1850 1851 _get_zoom_to = function () { 1852 var view = _get_viewport(), 1853 to = {}, 1854 resize = currentOpts.autoScale, 1855 double_padding = currentOpts.padding * 2, 1856 ratio; 1857 1858 if (currentOpts.width.toString().indexOf('%') > -1) { 1859 to.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10); 1860 } else { 1861 to.width = currentOpts.width + double_padding; 1862 } 1863 1864 if (currentOpts.height.toString().indexOf('%') > -1) { 1865 to.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10); 1866 } else { 1867 to.height = currentOpts.height + double_padding; 1868 } 1869 1870 if (resize && (to.width > view[0] || to.height > view[1])) { 1871 if (selectedOpts.type === 'image' || selectedOpts.type === 'swf') { 1872 ratio = (currentOpts.width) / (currentOpts.height); 1873 1874 if ((to.width) > view[0]) { 1875 to.width = view[0]; 1876 to.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10); 1877 } 1878 1879 if ((to.height) > view[1]) {
1880 to.height = view[1]; 1881 to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10); 1882 } 1883 1884 } else { 1885 to.width = Math.min(to.width, view[0]); 1886 to.height = Math.min(to.height, view[1]); 1887 } 1888 } 1889 1890 to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10); 1891 to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10); 1892 1893 return to; 1894 }, 1895 1896 _get_obj_pos = function(obj) { 1897 var pos = obj.offset(); 1898 1899 pos.top += parseInt(obj.css('paddingTop'), 10) || 0; 1900 pos.left += parseInt(obj.css('paddingLeft'), 10) || 0; 1901 1902 pos.top += parseInt(obj.css('border-top-width'), 10) || 0; 1903 pos.left += parseInt(obj.css('border-left-width'), 10) || 0; 1904 1905 pos.width = obj.width(); 1906 pos.height = obj.height(); 1907 1908 return pos; 1909 }, 1910 1911 _get_zoom_from = function() { 1912 var orig = selectedOpts.orig ? $(selectedOpts.orig) : false, 1913 from = {}, 1914 pos, 1915 view; 1916 1917 if (orig && orig.length) { 1918 pos = _get_obj_pos(orig); 1919 1920 from = { 1921 width : pos.width + (currentOpts.padding * 2), 1922 height : pos.height + (currentOpts.padding * 2), 1923 top : pos.top - currentOpts.padding - 20, 1924 left : pos.left - currentOpts.padding - 20 1925 }; 1926 1927 } else { 1928 view = _get_viewport(); 1929 1930 from = { 1931 width : currentOpts.padding * 2, 1932 height : currentOpts.padding * 2, 1933 top : parseInt(view[3] + view[1] * 0.5, 10), 1934 left : parseInt(view[2] + view[0] * 0.5, 10) 1935 }; 1936 } 1937 1938 return from; 1939 }, 1940 1941 _animate_loading = function() { 1942 if (!loading.is(':visible')){ 1943 clearInterval(loadingTimer); 1944 return; 1945 } 1946 1947 $('div', loading).css('top', (loadingFrame * -40) + 'px'); 1948 1949 loadingFrame = (loadingFrame + 1) % 12; 1950 }; 1951 1952 /* 1953 * Public methods 1954 */ 1955 1956 $.fn.fancybox = function(options) { 1957 var rel, $t = $(this); 1958 1959 if (!$t.length) { 1960 return this; 1961 } 1962 1963 $t 1964 .data('fancybox', $.extend({}, options, ($.metadata ? $t.metadata() : {}))) 1965 .off('click.fb') 1966 .on('click.fb', function(e) { 1967 e.preventDefault(); 1968 1969 if (busy) { 1970 return; 1971 } 1972 1973 busy = true; 1974 1975 $t.blur(); 1976 1977 selectedArray = []; 1978 selectedIndex = 0; 1979 1980 rel = $t.attr('rel') || ''; 1981 1982 if (!rel || rel === 'nofollow') { 1983 selectedArray.push(this); 1984 } else { 1985 selectedArray = $('a[rel="' + rel + '"], area[rel="' + rel + '"]'); 1986 selectedIndex = selectedArray.index(this); 1987 } 1988 1989 _start(); 1990 1991 return; 1992 }); 1993 1994 return this; 1995 }; 1996 1997 $.fancybox = function(obj) { 1998 var i, j, opts; 1999 2000 if (busy) { 2001 return; 2002 } 2003 2004 busy = true; 2005 opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {}; 2006 2007 selectedArray = []; 2008 selectedIndex = parseInt(opts.index, 10) || 0; 2009 2010 if ($.isArray(obj)) { 2011 for (i = 0, j = obj.length; i < j; i++) { 2012 if (typeof obj[i] === 'object') { 2013 $(obj[i]).data('fancybox', $.extend({}, opts, obj[i])); 2014 } else { 2015 obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts)); 2016 } 2017 } 2018 2019 selectedArray = jQuery.merge(selectedArray, obj); 2020 2021 } else { 2022 if (typeof obj === 'object') { 2023 $(obj).data('fancybox', $.extend({}, opts, obj)); 2024 } else { 2025 obj = $({}).data('fancybox', $.extend({content : obj}, opts)); 2026 } 2027 2028 selectedArray.push(obj); 2029 } 2030 2031 if (selectedIndex > selectedArray.length || selectedIndex < 0) { 2032 selectedIndex = 0; 2033 } 2034 2035 _start(); 2036 }; 2037 2038 $.fancybox.showActivity = function() { 2039 clearInterval(loadingTimer); 2040 loading.show(); 2041 loadingTimer = setInterval(_animate_loading, 66); 2042 }; 2043 2044 $.fancybox.hideActivity = function() { 2045 loading.hide(); 2046 }; 2047 2048 $.fancybox.next = function() { 2049 return $.fancybox.pos(currentIndex + 1); 2050 }; 2051 2052 $.fancybox.prev = function() { 2053 return $.fancybox.pos(currentIndex - 1); 2054 }; 2055 2056 $.fancybox.pos = function(pos) { 2057 if (busy) { 2058 return; 2059 } 2060 2061 pos = parseInt(pos, 10); 2062 2063 selectedArray = currentArray; 2064 2065 if (pos > -1 && pos < currentArray.length) { 2066 selectedIndex = pos; 2067 _start(); 2068 2069 } else if (currentOpts.cyclic && currentArray.length > 1) { 2070 selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1; 2071 _start(); 2072 } 2073 2074 return; 2075 }; 2076 2077 $.fancybox.cancel = function() { 2078 if (busy) { 2079 return; 2080 } 2081 2082 busy = true; 2083 2084 //$.event.trigger('fancybox-cancel'); 2085 $('.fancybox-inline-tmp').trigger('fancybox-cancel'); 2086 2087 _abort(); 2088 2089 selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts); 2090 2091 busy = false;
2092 }; 2093 2094 // Note: within an iframe use - parent.$.fancybox.close(); 2095 $.fancybox.close = function() { 2096 var pos; 2097 2098 if (busy || wrap.is(':hidden')) { 2099 return; 2100 } 2101 2102 busy = true; 2103 2104 if (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) { 2105 busy = false; 2106 return; 2107 } 2108 2109 _abort(); 2110 2111 $(close.add(nav_left).add(nav_right)).hide(); 2112 2113 $(content.add(overlay)).off(); 2114 2115 $w.off("resize.fb scroll.fb"); 2116 $d.off('keydown.fb'); 2117 2118 content.find('iframe').attr('src', 'about:blank'); 2119 2120 if (currentOpts.titlePosition !== 'inside') { 2121 title.empty(); 2122 } 2123 2124 wrap.stop(); 2125 2126 function _cleanup() { 2127 overlay.fadeOut('fast'); 2128 2129 title.empty().hide(); 2130 wrap.hide(); 2131 2132 //$.event.trigger('fancybox-cleanup'); 2133 $('.fancybox-inline-tmp, select:not(#fancybox-tmp select)').trigger('fancybox-cleanup'); 2134 2135 content.empty(); 2136 2137 currentOpts.onClosed(currentArray, currentIndex, currentOpts); 2138 2139 currentArray = selectedOpts = []; 2140 currentIndex = selectedIndex = 0; 2141 currentOpts = selectedOpts = {}; 2142 2143 busy = false; 2144 } 2145 2146 if (currentOpts.transitionOut === 'elastic') { 2147 start_pos = _get_zoom_from(); 2148 2149 pos = wrap.position(); 2150 2151 final_pos = { 2152 top : pos.top, 2153 left : pos.left, 2154 width : wrap.width(), 2155 height : wrap.height() 2156 }; 2157 2158 if (currentOpts.opacity) { 2159 final_pos.opacity = 1; 2160 } 2161 2162 title.empty().hide(); 2163 2164 fx.prop = 1; 2165 2166 $(fx).animate({ prop: 0 }, { 2167 duration : currentOpts.speedOut, 2168 easing : currentOpts.easingOut, 2169 step : _draw, 2170 complete : _cleanup 2171 }); 2172 2173 } else { 2174 wrap.fadeOut(currentOpts.transitionOut === 'none' ? 0 : currentOpts.speedOut, _cleanup); 2175 } 2176 }; 2177 2178 $.fancybox.resize = function() { 2179 var newW = $w.width(), 2180 newH = $w.height(); 2181 2182 if (newW !== lastResizeW || newH !== lastResizeH) { 2183 lastResizeW = newW; 2184 lastResizeH = newH; 2185 if (overlay.is(':visible')) { 2186 overlay.css('height', $d.height()); 2187 } 2188 $.fancybox.center(true); 2189 } 2190 }; 2191 2192 $.fancybox.center = function() { 2193 var view, align; 2194 2195 if (busy) { 2196 return; 2197 } 2198 2199 align = arguments[0] === true ? 1 : 0; 2200 view = _get_viewport(); 2201 2202 if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) { 2203 return; 2204 } 2205 2206 wrap 2207 .stop() 2208 .animate({ 2209 'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding), 10), 2210 'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding), 10) 2211 }, typeof arguments[0] === 'number' ? arguments[0] : 200); 2212 }; 2213 2214 $.fancybox.init = function() { 2215 if ($("#fancybox-wrap").length) { 2216 return; 2217 } 2218 2219 $('body').append( 2220 tmp = $('<div id="fancybox-tmp"></div>'), 2221 loading = $('<div id="fancybox-loading"><div></div></div>'), 2222 overlay = $('<div id="fancybox-overlay"></div>'), 2223 wrap = $('<div id="fancybox-wrap"></div>') 2224 ); 2225 2226 outer = $('<div id="fancybox-outer"></div>') 2227 .append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>') 2228 .appendTo(wrap); 2229 2230 outer.append( 2231 content = $('<div id="fancybox-content"></div>'), 2232 close = $('<div id="fancybox-close"></div>'), 2233 title = $('<div id="fancybox-title"></div>'), 2234 2235 nav_left = $('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'), 2236 nav_right = $('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>') 2237 ); 2238 2239 close.click($.fancybox.close); 2240 loading.click($.fancybox.cancel); 2241 2242 nav_left.click(function(e) { 2243 e.preventDefault(); 2244 $.fancybox.prev(); 2245 }); 2246 2247 nav_right.click(function(e) { 2248 e.preventDefault(); 2249 $.fancybox.next(); 2250 }); 2251 2252 if ($.fn.mousewheel) { 2253 wrap.on('mousewheel.fb', function(e, delta) { 2254 if (busy) { 2255 e.preventDefault(); 2256 2257 } else if ($(e.target).get(0).clientHeight === 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight) { 2258 e.preventDefault(); 2259 $.fancybox[ delta > 0 ? 'prev' : 'next'](); 2260 } 2261 }); 2262 } 2263 2264 if (!$.support.opacity) { 2265 wrap.addClass('fancybox-ie'); 2266 } 2267 2268 lastResizeW = $w.width(); 2269 lastResizeH = $w.height(); 2270 }; 2271 2272 $.fn.fancybox.defaults = { 2273 padding : 10, 2274 margin : 40, 2275 opacity : false, 2276 modal : false, 2277 cyclic : false, 2278 scrolling : 'auto', // 'auto', 'yes' or 'no' 2279 2280 width : 560, 2281 height : 340, 2282 2283 autoScale : true, 2284 autoDimensions : true, 2285 centerOnScroll : false, 2286 2287 ajax : {}, 2288 swf : { wmode: 'transparent' }, 2289 2290 hideOnOverlayClick : true, 2291 hideOnContentClick : false, 2292 2293 overlayShow : true, 2294 overlayOpacity : 0.7, 2295 overlayColor : '#777', 2296 2297 titleShow : true, 2298 titlePosition : 'float', // 'float', 'outside', 'inside' or 'over' 2299 titleFormat : null, 2300 titleFromAlt : false, 2301 2302 transitionIn : 'fade', // 'elastic', 'fade' or 'none' 2303 transitionOut : 'fade', // 'elastic', 'fade' or 'none' 2304 2305 speedIn : 300, 2306 speedOut : 300, 2307 2308 changeSpeed : 300, 2309 changeFade : 'fast', 2310 2311 easingIn : 'swing', 2312 easingOut : 'swing', 2313 2314 showCloseButton : true, 2315 showNavArrows : true, 2316 enableEscapeButton : true, 2317 enableKeyboardNav : true, 2318 2319 onStart : function(){}, 2320 onCancel : function(){}, 2321 onComplete : function(){}, 2322 onCleanup : function(){}, 2323 onClosed : function(){}, 2324 onError : function(){} 2325 }; 2326 2327 $d.ready(function() { 2328 $.fancybox.init(); 2329 }); 2330 2331})(jQuery); 2332//! moment.js 2333//! version : 2.8.3 2334//! authors : Tim Wood, Iskren Chernev, Moment.js contributors 2335//! license : MIT 2336//! momentjs.com 2337(function(a){function b(a,b,c){switch(arguments.length){case 2:return null!=a?a:b;case 3:return null!=a?a:null!=b?b:c;default:throw new Error("Implement me")}}function c(a,b){return zb.call(a,b)}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invali
2337dFormat:!1,userInvalidated:!1,iso:!1}}function e(a){tb.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function f(a,b){var c=!0;return m(function(){return c&&(e(a),c=!1),b.apply(this,arguments)},b)}function g(a,b){qc[a]||(e(b),qc[a]=!0)}function h(a,b){return function(c){return p(a.call(this,c),b)}}function i(a,b){return function(c){return this.localeData().ordinal(a.call(this,c),b)}}function j(){}function k(a,b){b!==!1&&F(a),n(this,a),this._d=new Date(+a._d)}function l(a){var b=y(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=tb.localeData(),this._bubble()}function m(a,b){for(var d in b)c(b,d)&&(a[d]=b[d]);return c(b,"toString")&&(a.toString=b.toString),c(b,"valueOf")&&(a.valueOf=b.valueOf),a}function n(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tzm=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=b._pf),"undefined"!=typeof b._locale&&(a._locale=b._locale),Ib.length>0)for(c in Ib)d=Ib[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function o(a){return 0>a?Math.ceil(a):Math.floor(a)}function p(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.length<b;)d="0"+d;return(e?c?"+":"":"-")+d}function q(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function r(a,b){var c;return b=K(b,a),a.isBefore(b)?c=q(a,b):(c=q(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c}function s(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(g(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=tb.duration(c,d),t(this,e,a),this}}function t(a,b,c,d){var e=b._milliseconds,f=b._days,g=b._months;d=null==d?!0:d,e&&a._d.setTime(+a._d+e*c),f&&nb(a,"Date",mb(a,"Date")+f*c),g&&lb(a,mb(a,"Month")+g*c),d&&tb.updateOffset(a,f||g)}function u(a){return"[object Array]"===Object.prototype.toString.call(a)}function v(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function w(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&A(a[d])!==A(b[d]))&&g++;return g+f}function x(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=jc[a]||kc[b]||b}return a}function y(a){var b,d,e={};for(d in a)c(a,d)&&(b=x(d),b&&(e[b]=a[d]));return e}function z(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}tb[b]=function(e,f){var g,h,i=tb._locale[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=tb().utc().set(d,a);return i.call(tb._locale,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function A(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function B(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function C(a,b,c){return hb(tb([a,11,31+b-c]),b,c).week}function D(a){return E(a)?366:365}function E(a){return a%4===0&&a%100!==0||a%400===0}function F(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[Bb]<0||a._a[Bb]>11?Bb:a._a[Cb]<1||a._a[Cb]>B(a._a[Ab],a._a[Bb])?Cb:a._a[Db]<0||a._a[Db]>23?Db:a._a[Eb]<0||a._a[Eb]>59?Eb:a._a[Fb]<0||a._a[Fb]>59?Fb:a._a[Gb]<0||a._a[Gb]>999?Gb:-1,a._pf._overflowDayOfYear&&(Ab>b||b>Cb)&&(b=Cb),a._pf.overflow=b)}
2337function G(a){return null==a._isValid&&(a._isValid=!isNaN(a._d.getTime())&&a._pf.overflow<0&&!a._pf.empty&&!a._pf.invalidMonth&&!a._pf.nullInput&&!a._pf.invalidFormat&&!a._pf.userInvalidated,a._strict&&(a._isValid=a._isValid&&0===a._pf.charsLeftOver&&0===a._pf.unusedTokens.length)),a._isValid}function H(a){return a?a.toLowerCase().replace("_","-"):a}function I(a){for(var b,c,d,e,f=0;f<a.length;){for(e=H(a[f]).split("-"),b=e.length,c=H(a[f+1]),c=c?c.split("-"):null;b>0;){if(d=J(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&w(e,c,!0)>=b-1)break;b--}f++}return null}function J(a){var b=null;if(!Hb[a]&&Jb)try{b=tb.locale(),require("./locale/"+a),tb.locale(b)}catch(c){}return Hb[a]}function K(a,b){return b._isUTC?tb(a).zone(b._offset||0):tb(a).local()}function L(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function M(a){var b,c,d=a.match(Nb);for(b=0,c=d.length;c>b;b++)d[b]=pc[d[b]]?pc[d[b]]:L(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function N(a,b){return a.isValid()?(b=O(b,a.localeData()),lc[b]||(lc[b]=M(b)),lc[b](a)):a.localeData().invalidDate()}function O(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Ob.lastIndex=0;d>=0&&Ob.test(a);)a=a.replace(Ob,c),Ob.lastIndex=0,d-=1;return a}function P(a,b){var c,d=b._strict;switch(a){case"Q":return Zb;case"DDDD":return _b;case"YYYY":case"GGGG":case"gggg":return d?ac:Rb;case"Y":case"G":case"g":return cc;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?bc:Sb;case"S":if(d)return Zb;case"SS":if(d)return $b;case"SSS":if(d)return _b;case"DDD":return Qb;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Ub;case"a":case"A":return b._locale._meridiemParse;case"X":return Xb;case"Z":case"ZZ":return Vb;case"T":return Wb;case"SSSS":return Tb;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?$b:Pb;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Pb;case"Do":return Yb;default:return c=new RegExp(Y(X(a.replace("\\","")),"i"))}}function Q(a){a=a||"";var b=a.match(Vb)||[],c=b[b.length-1]||[],d=(c+"").match(hc)||["-",0,0],e=+(60*d[1])+A(d[2]);return"+"===d[0]?-e:e}function R(a,b,c){var d,e=c._a;switch(a){case"Q":null!=b&&(e[Bb]=3*(A(b)-1));break;case"M":case"MM":null!=b&&(e[Bb]=A(b)-1);break;case"MMM":case"MMMM":d=c._locale.monthsParse(b),null!=d?e[Bb]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[Cb]=A(b));break;case"Do":null!=b&&(e[Cb]=A(parseInt(b,10)));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=A(b));break;case"YY":e[Ab]=tb.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":e[Ab]=A(b);break;case"a":case"A":c._isPm=c._locale.isPM(b);break;case"H":case"HH":case"h":case"hh":e[Db]=A(b);break;case"m":case"mm":e[Eb]=A(b);break;case"s":case"ss":e[Fb]=A(b);break;case"S":case"SS":case"SSS":case"SSSS":e[Gb]=A(1e3*("0."+b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=Q(b);break;case"dd":case"ddd":case"dddd":d=c._locale.weekdaysParse(b),null!=d?(c._w=c._w||{},c._w.d=d):c._pf.invalidWeekday=b;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=A(b));break;case"gg":case"GG":c._w=c._w||{},c._w[a]=tb.parseTwoDigitYear(b)}}function S(a){var c,d,e,f,g,h,i;c=a._w,null!=c.GG||null!=c.W||null!=c.E?(g=1,h=4,d=b(c.GG,a._a[Ab],hb(tb(),1,4).year),e=b(c.W,1),f=b(c.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,d=b(c.gg,a._a[Ab],hb(tb(),g,h).year),e=b(c.w,1),null!=c.d?(f=c.d,g>f&&++e):f=null!=c.e?c.e+g:g),i=ib(d,e,f,h,g),a._a[Ab]=i.year,a._dayOfYear=i.dayOfYear}function T(a){var c,d,e,f,g=[];if(!a._d){for(e=V(a),a._w&&null==a._a[Cb]&&null==a._a[Bb]&&S(a),a._dayOfYear&&(f=b(a._a[Ab],e[Ab]),a._dayOfYear>D(f)&&(a._pf._overflowDayOfYear=!0),d=db(f,0,a._dayOfYear),a._a[Bb]=d.getUTCMonth(),a._a[Cb]=d.getUTCDate()),c=0;3>c&&null==a._a[c];++c)a._a[c]=g[c]=e[c];for(;7>c;c++)a._a[c]=g[c]=null==a._a[c]?2===c?1:0:a._a[c];a._d=(a._useUTC?db:cb).apply(null,g),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()+a._tzm)}}function U(a){var b;a._d||(b=y(a._i),a._a=[b.year,b.month,b.day,b.hour,b.minute,b.second,b.millisecond],T(a))}function V(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function W(a){if(a._f===tb.ISO_8601)return void $(a);a._a=[],a._pf.empty=!0;var b,c,d,e,f,g=""+a._i,h=g.length,i=0;for(d=O(a._f,a._locale).match(Nb)||[],b=0;b<d.length;b++)e=d[b],c=(g.match(P(e,a))||[])[0],c&&(f=g.substr(0,g.indexOf(c)),f.length>0&&a._pf.unusedInput.push(f),g=g.slice(g.indexOf(c)+c.length),i+=c.length),pc[e]?(c?a._pf.empty=!1:a._pf.unusedTokens.push(e),R(e,c,a)):a._strict&&!c&&a._pf.unusedTokens.push(e);a._pf.charsLeftOver=h-i,g.length>0&&a._pf.unusedInput.push(g),a._isPm&&a._a[Db]<12&&(a._a[Db]+=12),a._isPm===!1&&12===a._a[Db]&&(a._a[Db]=0),T(a),F(a)}function X(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function Y(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(a){var b,c,e,f,g;
2337if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(0/0));for(f=0;f<a._f.length;f++)g=0,b=n({},a),null!=a._useUTC&&(b._useUTC=a._useUTC),b._pf=d(),b._f=a._f[f],W(b),G(b)&&(g+=b._pf.charsLeftOver,g+=10*b._pf.unusedTokens.length,b._pf.score=g,(null==e||e>g)&&(e=g,c=b));m(a,c||b)}function $(a){var b,c,d=a._i,e=dc.exec(d);if(e){for(a._pf.iso=!0,b=0,c=fc.length;c>b;b++)if(fc[b][1].exec(d)){a._f=fc[b][0]+(e[6]||" ");break}for(b=0,c=gc.length;c>b;b++)if(gc[b][1].exec(d)){a._f+=gc[b][0];break}d.match(Vb)&&(a._f+="Z"),W(a)}else a._isValid=!1}function _(a){$(a),a._isValid===!1&&(delete a._isValid,tb.createFromInputFallback(a))}function ab(a,b){var c,d=[];for(c=0;c<a.length;++c)d.push(b(a[c],c));return d}function bb(b){var c,d=b._i;d===a?b._d=new Date:v(d)?b._d=new Date(+d):null!==(c=Kb.exec(d))?b._d=new Date(+c[1]):"string"==typeof d?_(b):u(d)?(b._a=ab(d.slice(0),function(a){return parseInt(a,10)}),T(b)):"object"==typeof d?U(b):"number"==typeof d?b._d=new Date(d):tb.createFromInputFallback(b)}function cb(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function db(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function eb(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function fb(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function gb(a,b,c){var d=tb.duration(a).abs(),e=yb(d.as("s")),f=yb(d.as("m")),g=yb(d.as("h")),h=yb(d.as("d")),i=yb(d.as("M")),j=yb(d.as("y")),k=e<mc.s&&["s",e]||1===f&&["m"]||f<mc.m&&["mm",f]||1===g&&["h"]||g<mc.h&&["hh",g]||1===h&&["d"]||h<mc.d&&["dd",h]||1===i&&["M"]||i<mc.M&&["MM",i]||1===j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,fb.apply({},k)}function hb(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=tb(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function ib(a,b,c,d,e){var f,g,h=db(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:D(a-1)+g}}function jb(b){var c=b._i,d=b._f;return b._locale=b._locale||tb.localeData(b._l),null===c||d===a&&""===c?tb.invalid({nullInput:!0}):("string"==typeof c&&(b._i=c=b._locale.preparse(c)),tb.isMoment(c)?new k(c,!0):(d?u(d)?Z(b):W(b):bb(b),new k(b)))}function kb(a,b){var c,d;if(1===b.length&&u(b[0])&&(b=b[0]),!b.length)return tb();for(c=b[0],d=1;d<b.length;++d)b[d][a](c)&&(c=b[d]);return c}function lb(a,b){var c;return"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),B(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a)}function mb(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function nb(a,b,c){return"Month"===b?lb(a,c):a._d["set"+(a._isUTC?"UTC":"")+b](c)}function ob(a,b){return function(c){return null!=c?(nb(this,a,c),tb.updateOffset(this,b),this):mb(this,a)}}function pb(a){return 400*a/146097}function qb(a){return 146097*a/400}function rb(a){tb.duration.fn[a]=function(){return this._data[a]}}function sb(a){"undefined"==typeof ender&&(ub=xb.moment,xb.moment=a?f("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",tb):tb)}for(var tb,ub,vb,wb="2.8.3",xb="undefined"!=typeof global?global:this,yb=Math.round,zb=Object.prototype.hasOwnProperty,Ab=0,Bb=1,Cb=2,Db=3,Eb=4,Fb=5,Gb=6,Hb={},Ib=[],Jb="undefined"!=typeof module&&module.exports,Kb=/^\/?Date\((\-?\d+)/i,Lb=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Mb=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,Nb=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,Ob=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,Pb=/\d\d?/,Qb=/\d{1,3}/,Rb=/\d{1,4}/,Sb=/[+\-]?\d{1,6}/,Tb=/\d+/,Ub=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Vb=/Z|[\+\-]\d\d:?\d\d/gi,Wb=/T/i,Xb=/[\+\-]?\d+(\.\d{1,3})?/,Yb=/\d{1,2}/,Zb=/\d/,$b=/\d\d/,_b=/\d{3}/,ac=/\d{4}/,bc=/[+-]?\d{6}/,cc=/[+-]?\d+/,dc=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ec="YYYY-MM-DDTHH:mm:ssZ",fc=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],gc=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],hc=/([\+\-]|\d\d)/gi,ic=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),jc={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},kc={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},lc={},mc={s:45,m:45,h:22,d:26,M:11},nc="DDD w W M D d".split(" "),oc="M D H h m s w W".split(" "),pc={M:function(){return this.month()+1},MMM:function(a){return this.localeData().monthsShort(this,a)},MMMM:function(a){return this.localeData().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.localeData().weekdaysMin(this,a)},ddd:function(a){return this.localeData().weekdaysShort(this,a)},dddd:function(a){return this.localeData().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return p(this.year()%100,2)},YYYY:function(){return p(this.year(),4)},YYYYY:function(){return p(this.year(),5)},YYYYYY:function(){var a=this.year(),b=a>=0?"+":"-";return b+p(Math.abs(a),6)},gg:function(){return p(this.weekYear()%100,2)},gggg:function(){return p(this.weekYear(),4)},ggggg:function(){return p(this.weekYear(),5)},GG:function(){return p(this.isoWeekYear()%100,2)},GGGG:function(){return p(this.isoWeekYear(),4)},GGGGG:function(){return p(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return A(this.milliseconds()/100)},SS:function(){return p(A(this.milliseconds()/10),2)},SSS:function(){return p(this.milliseconds(),3)},SSSS:function(){return p(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+p(A(a/60),2)+":"+p(A(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+p(A(a/60),2)+p(A(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},qc={},rc=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];nc.length;)vb=nc.pop(),pc[vb+"o"]=i(pc[vb],vb);for(;oc.length;)vb=oc.pop(),pc[vb+vb]=h(pc[vb],2);pc.DDDD=h(pc.DDD,3),m(j.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var b,c,d;for(this._monthsParse||(this._monthsParse=[]),b=0;12>b;b++)if(this._monthsParse[b]||(c=tb.utc([2e3,b]),d="^"+this.months(c,"")+"|^"+this.monthsShort(c,""),this._monthsParse[b]=new RegExp(d.replace(".",""),"i")),this._monthsParse[b].test(a))return b},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=tb([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b){var c=this._calendar[a];return"function"==typeof c?c.apply(b):c},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",preparse:function(a){return a},postformat:function(a){return a},week:function(a){return hb(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),tb=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=b,g._f=c,g._l=e,g._strict=f,g._isUTC=!1,g._pf=d(),jb(g)},tb.suppressDeprecationWarnings=!1,tb.createFromInputFallback=f("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i)}),tb.min=function(){var a=[].slice.call(arguments,0);return kb("isBefore",a)},tb.max=function(){var a=[].slice.call(arguments,0);return kb("isAfter",a)},tb.utc=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=b,g._f=c,g._strict=f,g._pf=d(),jb(g).utc()},tb.unix=function(a){return tb(1e3*a)},tb.duration=function(a,b){var d,e,f,g,h=a,i=null;return tb.isDuration(a)?h={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(h={},b?h[b]=a:h.milliseconds=a):(i=Lb.exec(a))?(d="-"===i[1]?-1:1,h={y:0,d:A(i[Cb])*
2337d,h:A(i[Db])*d,m:A(i[Eb])*d,s:A(i[Fb])*d,ms:A(i[Gb])*d}):(i=Mb.exec(a))?(d="-"===i[1]?-1:1,f=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*d},h={y:f(i[2]),M:f(i[3]),d:f(i[4]),h:f(i[5]),m:f(i[6]),s:f(i[7]),w:f(i[8])}):"object"==typeof h&&("from"in h||"to"in h)&&(g=r(tb(h.from),tb(h.to)),h={},h.ms=g.milliseconds,h.M=g.months),e=new l(h),tb.isDuration(a)&&c(a,"_locale")&&(e._locale=a._locale),e},tb.version=wb,tb.defaultFormat=ec,tb.ISO_8601=function(){},tb.momentProperties=Ib,tb.updateOffset=function(){},tb.relativeTimeThreshold=function(b,c){return mc[b]===a?!1:c===a?mc[b]:(mc[b]=c,!0)},tb.lang=f("moment.lang is deprecated. Use moment.locale instead.",function(a,b){return tb.locale(a,b)}),tb.locale=function(a,b){var c;return a&&(c="undefined"!=typeof b?tb.defineLocale(a,b):tb.localeData(a),c&&(tb.duration._locale=tb._locale=c)),tb._locale._abbr},tb.defineLocale=function(a,b){return null!==b?(b.abbr=a,Hb[a]||(Hb[a]=new j),Hb[a].set(b),tb.locale(a),Hb[a]):(delete Hb[a],null)},tb.langData=f("moment.langData is deprecated. Use moment.localeData instead.",function(a){return tb.localeData(a)}),tb.localeData=function(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return tb._locale;if(!u(a)){if(b=J(a))return b;a=[a]}return I(a)},tb.isMoment=function(a){return a instanceof k||null!=a&&c(a,"_isAMomentObject")},tb.isDuration=function(a){return a instanceof l};for(vb=rc.length-1;vb>=0;--vb)z(rc[vb]);tb.normalizeUnits=function(a){return x(a)},tb.invalid=function(a){var b=tb.utc(0/0);return null!=a?m(b._pf,a):b._pf.userInvalidated=!0,b},tb.parseZone=function(){return tb.apply(null,arguments).parseZone()},tb.parseTwoDigitYear=function(a){return A(a)+(A(a)>68?1900:2e3)},m(tb.fn=k.prototype,{clone:function(){return tb(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=tb(this).utc();return 0<a.year()&&a.year()<=9999?N(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):N(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return G(this)},isDSTShifted:function(){return this._a?this.isValid()&&w(this._a,(this._isUTC?tb.utc(this._a):tb(this._a)).toArray())>0:!1},parsingFlags:function(){return m({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.zone(0,a)},local:function(a){return this._isUTC&&(this.zone(0,a),this._isUTC=!1,a&&this.add(this._dateTzOffset(),"m")),this},format:function(a){var b=N(this,a||tb.defaultFormat);return this.localeData().postformat(b)},add:s(1,"add"),subtract:s(-1,"subtract"),diff:function(a,b,c){var d,e,f,g=K(a,this),h=6e4*(this.zone()-g.zone());return b=x(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+g.daysInMonth()),e=12*(this.year()-g.year())+(this.month()-g.month()),f=this-tb(this).startOf("month")-(g-tb(g).startOf("month")),f-=6e4*(this.zone()-tb(this).startOf("month").zone()-(g.zone()-tb(g).startOf("month").zone())),e+=f/d,"year"===b&&(e/=12)):(d=this-g,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-h)/864e5:"week"===b?(d-h)/6048e5:d),c?e:o(e)},from:function(a,b){return tb.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(tb(),a)},calendar:function(a){var b=a||tb(),c=K(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this))},isLeapYear:function(){return E(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=eb(a,this.localeData()),this.add(a-b,"d")):b},month:ob("Month",!0),startOf:function(a){switch(a=x(a)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(a){return a=x(a),this.startOf(a).add(1,"isoWeek"===a?"week":a).subtract(1,"ms")},isAfter:function(a,b){return b=x("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=tb.isMoment(a)?a:tb(a),+this>+a):+this.clone().startOf(b)>+tb(a).startOf(b)},isBefore:function(a,b){return b=x("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=tb.isMoment(a)?a:tb(a),+a>+this):+this.clone().startOf(b)<+tb(a).startOf(b)},isSame:function(a,b){return b=x(b||"millisecond"),"millisecond"===b?(a=tb.isMoment(a)?a:tb(a),+this===+a):+this.clone().startOf(b)===+K(a,this).startOf(b)},min:f("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(a){return a=tb.apply(null,arguments),this>a?this:a}),max:f("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=tb.apply(null,arguments),a>this?this:a}),zone:function(a,b){var c,d=this._offset||0;return null==a?this._isUTC?d:this._dateTzOffset():("string"==typeof a&&(a=Q(a)),Math.abs(a)<16&&(a=60*a),!this._isUTC&&b&&(c=this._dateTzOffset()),this._offset=a,this._isUTC=!0,null!=c&&this.subtract(c,"m"),d!==a&&(!b||this._changeInProgress?t(this,tb.duration(d-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,tb.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?tb(a).zone():0,(this.zone()-a)%60===0},daysInMonth:function(){return B(this.year(),this.month())},dayOfYear:function(a){var b=yb((tb(this).startOf("day")-tb(this).startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}
2337,quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=hb(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=hb(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=hb(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return C(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return C(this.year(),a.dow,a.doy)},get:function(a){return a=x(a),this[a]()},set:function(a,b){return a=x(a),"function"==typeof this[a]&&this[a](b),this},locale:function(b){var c;return b===a?this._locale._abbr:(c=tb.localeData(b),null!=c&&(this._locale=c),this)},lang:f("moment().lang() is deprecated. Use moment().localeData() instead.",function(b){return b===a?this.localeData():this.locale(b)}),localeData:function(){return this._locale},_dateTzOffset:function(){return 15*Math.round(this._d.getTimezoneOffset()/15)}}),tb.fn.millisecond=tb.fn.milliseconds=ob("Milliseconds",!1),tb.fn.second=tb.fn.seconds=ob("Seconds",!1),tb.fn.minute=tb.fn.minutes=ob("Minutes",!1),tb.fn.hour=tb.fn.hours=ob("Hours",!0),tb.fn.date=ob("Date",!0),tb.fn.dates=f("dates accessor is deprecated. Use date instead.",ob("Date",!0)),tb.fn.year=ob("FullYear",!0),tb.fn.years=f("years accessor is deprecated. Use year instead.",ob("FullYear",!0)),tb.fn.days=tb.fn.day,tb.fn.months=tb.fn.month,tb.fn.weeks=tb.fn.week,tb.fn.isoWeeks=tb.fn.isoWeek,tb.fn.quarters=tb.fn.quarter,tb.fn.toJSON=tb.fn.toISOString,m(tb.duration.fn=l.prototype,{_bubble:function(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;g.milliseconds=d%1e3,a=o(d/1e3),g.seconds=a%60,b=o(a/60),g.minutes=b%60,c=o(b/60),g.hours=c%24,e+=o(c/24),h=o(pb(e)),e-=o(qb(h)),f+=o(e/30),e%=30,h+=o(f/12),f%=12,g.days=e,g.months=f,g.years=h},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return o(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*A(this._months/12)},humanize:function(a){var b=gb(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),this.localeData().postformat(b)},add:function(a,b){var c=tb.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=tb.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=x(a),this[a.toLowerCase()+"s"]()},as:function(a){var b,c;if(a=x(a),"month"===a||"year"===a)return b=this._days+this._milliseconds/864e5,c=this._months+12*pb(b),"month"===a?c:c/12;switch(b=this._days+qb(this._months/12),a){case"week":return b/7+this._milliseconds/6048e5;case"day":return b+this._milliseconds/864e5;case"hour":return 24*b+this._milliseconds/36e5;case"minute":return 24*b*60+this._milliseconds/6e4;case"second":return 24*b*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*b*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+a)}},lang:tb.fn.lang,locale:tb.fn.locale,toIsoString:f("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale}}),tb.duration.fn.toString=tb.duration.fn.toISOString;for(vb in ic)c(ic,vb)&&rb(vb.toLowerCase());tb.duration.fn.asMilliseconds=function(){return this.as("ms")},tb.duration.fn.asSeconds=function(){return this.as("s")},tb.duration.fn.asMinutes=function(){return this.as("m")},tb.duration.fn.asHours=function(){return this.as("h")},tb.duration.fn.asDays=function(){return this.as("d")},tb.duration.fn.asWeeks=function(){return this.as("weeks")},tb.duration.fn.asMonths=function(){return this.as("M")},tb.duration.fn.asYears=function(){return this.as("y")},tb.locale("en",{ordinal:function(a){var b=a%10,c=1===A(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th"; 2338 return a+c}}),function(a){a(tb)}(function(a){return a.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiem:function(a,b,c){return 12>a?c?"vm":"VM":c?"nm":"NM"},longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},ordinal:function(a){return a+(1===a||8===a||a>=20?"ste":"de")},week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("ar-ma",{months:"ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙ_ÙÙÙÙÙ_ÙÙÙÙÙØ²_غشت_Ø´ØªÙØ¨Ø±_Ø£ÙØªÙبر_ÙÙÙØ¨Ø±_Ø¯Ø¬ÙØ¨Ø±".split("_"),monthsShort:"ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙ_ÙÙÙÙÙ_ÙÙÙÙÙØ²_غشت_Ø´ØªÙØ¨Ø±_Ø£ÙØªÙبر_ÙÙÙØ¨Ø±_Ø¯Ø¬ÙØ¨Ø±".split("_"),weekdays:"Ø§ÙØ£ØØ¯_Ø§ÙØ¥ØªÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª".split("_"),weekdaysShort:"Ø§ØØ¯_اتÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_اربعاء_Ø®Ù ÙØ³_ج٠عة_سبت".split("_"),weekdaysMin:"Ø_Ù_Ø«_ر_Ø®_ج_س".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[اÙÙÙ٠عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT",nextDay:"[غدا عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT",nextWeek:"dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT",lastDay:"[أ٠س عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT",lastWeek:"dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT",sameElse:"L"},relativeTime:{future:"ÙÙ %s",past:"Ù ÙØ° %s",s:"Ø«ÙØ§Ù",m:"دÙÙÙØ©",mm:"%d Ø¯ÙØ§Ø¦Ù",h:"ساعة",hh:"%d ساعات",d:"ÙÙÙ ",dd:"%d Ø£ÙØ§Ù ",M:"Ø´ÙØ±",MM:"%d Ø£Ø´ÙØ±",y:"Ø³ÙØ©",yy:"%d سÙÙØ§Øª"},week:{dow:6,doy:12}})}),function(a){a(tb)}(function(a){var b={1:"Ù¡",2:"Ù¢",3:"Ù£",4:"Ù¤",5:"Ù¥",6:"Ù¦",7:"Ù§",8:"Ù¨",9:"Ù©",0:"Ù "},c={"Ù¡":"1","Ù¢":"2","Ù£":"3","Ù¤":"4","Ù¥":"5","Ù¦":"6","Ù§":"7","Ù¨":"8","Ù©":"9","Ù ":"0"};return a.defineLocale("ar-sa",{months:"ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙÙ_ÙÙÙÙÙ_ÙÙÙÙÙ_أغسطس_سبت٠بر_Ø£ÙØªÙبر_ÙÙÙ٠بر_Ø¯ÙØ³Ù بر".split("_"),monthsShort:"ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙÙ_ÙÙÙÙÙ_ÙÙÙÙÙ_أغسطس_سبت٠بر_Ø£ÙØªÙبر_ÙÙÙ٠بر_Ø¯ÙØ³Ù بر".split("_"),weekdays:"Ø§ÙØ£ØØ¯_Ø§ÙØ¥Ø«ÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª".split("_"),weekdaysShort:"Ø£ØØ¯_إثÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_أربعاء_Ø®Ù ÙØ³_ج٠عة_سبت".split("_"),weekdaysMin:"Ø_Ù_Ø«_ر_Ø®_ج_س".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:function(a){return 12>a?"ص":"Ù "},calendar:{sameDay:"[اÙÙÙ٠عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT",nextDay:"[غدا عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT",nextWeek:"dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT",lastDay:"[أ٠س عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT",lastWeek:"dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT",sameElse:"L"},relativeTime:{future:"ÙÙ %s",past:"Ù ÙØ° %s",s:"Ø«ÙØ§Ù",m:"دÙÙÙØ©",mm:"%d Ø¯ÙØ§Ø¦Ù",h:"ساعة",hh:"%d ساعات",d:"ÙÙÙ ",dd:"%d Ø£ÙØ§Ù ",M:"Ø´ÙØ±",MM:"%d Ø£Ø´ÙØ±",y:"Ø³ÙØ©",yy:"%d سÙÙØ§Øª"},preparse:function(a){return a.replace(/[Û°-Û¹]/g,function(a){return c[a]}).replace(/Ø/g,",")},postformat:function(a){return a.replace(/\d/g,function(a){return b[a]}).replace(/,/g,"Ø")},week:{dow:6,doy:12}})}),function(a){a(tb)}(function(a){var b={1:"Ù¡",2:"Ù¢",3:"Ù£",4:"Ù¤",5:"Ù¥",6:"Ù¦",7:"Ù§",8:"Ù¨",9:"Ù©",0:"Ù "},c={"Ù¡":"1","Ù¢":"2","Ù£":"3","Ù¤":"4","Ù¥":"5","Ù¦":"6","Ù§":"7","Ù¨":"8","Ù©":"9","Ù ":"0"},d=function(a){return 0===a?0:1===a?1:2===a?2:a%100>=3&&10>=a%100?3:a%100>=11?4:5},e={s:["Ø£Ù٠٠٠ثاÙÙØ©","ثاÙÙØ© ÙØ§ØØ¯Ø©",["ثاÙÙØªØ§Ù","ثاÙÙØªÙÙ"],"%d Ø«ÙØ§Ù","%d ثاÙÙØ©","%d ثاÙÙØ©"],m:["Ø£Ù٠٠٠دÙÙÙØ©","دÙÙÙØ© ÙØ§ØØ¯Ø©",["دÙÙÙØªØ§Ù","دÙÙÙØªÙÙ"],"%d Ø¯ÙØ§Ø¦Ù","%d دÙÙÙØ©","%d دÙÙÙØ©"],h:["Ø£Ù٠٠٠ساعة","ساعة ÙØ§ØØ¯Ø©",["ساعتاÙ","ساعتÙÙ"],"%d ساعات","%d ساعة","%d ساعة"],d:["Ø£ÙÙ Ù Ù ÙÙÙ ","ÙÙÙ ÙØ§ØØ¯",["ÙÙ٠اÙ","ÙÙÙ ÙÙ"],"%d Ø£ÙØ§Ù ","%d ÙÙÙ ÙØ§","%d ÙÙÙ "],M:["Ø£ÙÙ Ù Ù Ø´ÙØ±","Ø´ÙØ± ÙØ§ØØ¯",["Ø´ÙØ±Ø§Ù","Ø´ÙØ±ÙÙ"],"%d Ø£Ø´ÙØ±","%d Ø´ÙØ±Ø§","%d Ø´ÙØ±"],y:["Ø£Ù٠٠٠عا٠","Ø¹Ø§Ù ÙØ§ØØ¯",["عا٠اÙ","عا٠ÙÙ"],"%d Ø£Ø¹ÙØ§Ù ","%d Ø¹Ø§Ù ÙØ§","%d عا٠"]},f=function(a){return function(b,c){var f=d(b),g=e[a][d(b)];return 2===f&&(g=g[c?0:1]),g.replace(/%d/i,b)}},g=["ÙØ§ÙÙÙ Ø§ÙØ«Ø§ÙÙ ÙÙØ§Ùر","شباط ÙØ¨Ø±Ø§Ùر","آذار ٠ارس","ÙÙØ³Ø§Ù أبرÙÙ","Ø£ÙØ§Ø± ٠اÙÙ","ØØ²Ùرا٠ÙÙÙÙÙ","ØªÙ ÙØ² ÙÙÙÙÙ","آب أغسطس","Ø£ÙÙÙ٠سبت٠بر","تشرÙÙ Ø§ÙØ£ÙÙ Ø£ÙØªÙبر","تشرÙÙ Ø§ÙØ«Ø§ÙÙ ÙÙÙ٠بر","ÙØ§ÙÙÙ Ø§ÙØ£ÙÙ Ø¯ÙØ³Ù بر"];return a.defineLocale("ar",{months:g,monthsShort:g,weekdays:"Ø§ÙØ£ØØ¯_Ø§ÙØ¥Ø«ÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª".split("_"),weekdaysShort:"Ø£ØØ¯_إثÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_أربعاء_Ø®Ù ÙØ³_ج٠عة_سبت".split("_"),weekdaysMin:"Ø_Ù_Ø«_ر_Ø®_ج_س".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:function(a){return 12>a?"ص":"Ù "},calendar:{sameDay:"[اÙÙÙÙ Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT",nextDay:"[ØºØ¯ÙØ§ Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT",nextWeek:"dddd [Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT",lastDay:"[أ٠س Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT",lastWeek:"dddd [Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"Ù ÙØ° %s",s:f("s"),m:f("m"),mm:f("m"),h:f("h"),hh:f("h"),d:f("d"),dd:f("d"),M:f("M"),MM:f("M"),y:f("y"),yy:f("y")},preparse:function(a){return a.replace(/[Û°-Û¹]/g,function(a){return c[a]}).replace(/Ø/g,",")},postformat:function(a){return a.replace(/\d/g,function(a){return b[a]}).replace(/,/g,"Ø")},week:{dow:6,doy:12}})}),function(a){a(tb)}(function(a){var b={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};return a.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertÉsi_ÃÉrÅÉnbÉ axÅamı_ÃÉrÅÉnbÉ_CümÉ axÅamı_CümÉ_ÅÉnbÉ".split("_"),weekdaysShort:"Baz_BzE_ÃAx_ÃÉr_CAx_Cüm_ÅÉn".split("_"),weekdaysMin:"Bz_BE_ÃA_ÃÉ_CA_Cü_ÅÉ".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gÉlÉn hÉftÉ] dddd [saat] LT",lastDay:"[dünÉn] LT",lastWeek:"[keçÉn hÉftÉ] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s ÉvvÉl",s:"birneÃ§É saniyyÉ",m:"bir dÉqiqÉ",mm:"%d dÉqiqÉ",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiem:function(a){return 4>a?"gecÉ":12>a?"sÉhÉr":17>a?"gündüz":"axÅam"}
2338,ordinal:function(a){if(0===a)return a+"-ıncı";var c=a%10,d=a%100-c,e=a>=100?100:null;return a+(b[c]||b[d]||b[e])},week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){function b(a,b){var c=a.split("_");return b%10===1&&b%100!==11?c[0]:b%10>=2&&4>=b%10&&(10>b%100||b%100>=20)?c[1]:c[2]}function c(a,c,d){var e={mm:c?"Ñ
вÑлÑна_Ñ
вÑлÑнÑ_Ñ
вÑлÑн":"Ñ
вÑлÑнÑ_Ñ
вÑлÑнÑ_Ñ
вÑлÑн",hh:c?"гадзÑна_гадзÑнÑ_гадзÑн":"гадзÑнÑ_гадзÑнÑ_гадзÑн",dd:"дзенÑ_днÑ_дзÑн",MM:"меÑÑÑ_меÑÑÑÑ_меÑÑÑаÑ",yy:"год_гадÑ_гадоÑ"};return"m"===d?c?"Ñ
вÑлÑна":"Ñ
вÑлÑнÑ":"h"===d?c?"гадзÑна":"гадзÑнÑ":a+" "+b(e[d],+a)}function d(a,b){var c={nominative:"ÑÑÑдзенÑ_лÑÑÑ_ÑакавÑк_кÑаÑавÑк_ÑÑавенÑ_ÑÑÑвенÑ_лÑпенÑ_жнÑвенÑ_веÑаÑенÑ_каÑÑÑÑÑнÑк_лÑÑÑапад_ÑнежанÑ".split("_"),accusative:"ÑÑÑдзенÑ_лÑÑага_ÑакавÑка_кÑаÑавÑка_ÑÑаÑнÑ_ÑÑÑвенÑ_лÑпенÑ_жнÑÑнÑ_веÑаÑнÑ_каÑÑÑÑÑнÑка_лÑÑÑапада_ÑнежнÑ".split("_")},d=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(b)?"accusative":"nominative";return c[d][a.month()]}function e(a,b){var c={nominative:"нÑдзелÑ_панÑдзелак_аÑÑоÑак_ÑеÑада_ÑаÑвеÑ_пÑÑнÑÑа_ÑÑбоÑа".split("_"),accusative:"нÑдзелÑ_панÑдзелак_аÑÑоÑак_ÑеÑадÑ_ÑаÑвеÑ_пÑÑнÑÑÑ_ÑÑбоÑÑ".split("_")},d=/\[ ?[Ðв] ?(?:мÑнÑлÑÑ|наÑÑÑпнÑÑ)? ?\] ?dddd/.test(b)?"accusative":"nominative";return c[d][a.day()]}return a.defineLocale("be",{months:d,monthsShort:"ÑÑÑд_лÑÑ_Ñак_кÑаÑ_ÑÑав_ÑÑÑв_лÑп_жнÑв_веÑ_каÑÑ_лÑÑÑ_Ñнеж".split("_"),weekdays:e,weekdaysShort:"нд_пн_аÑ_ÑÑ_ÑÑ_пÑ_Ñб".split("_"),weekdaysMin:"нд_пн_аÑ_ÑÑ_ÑÑ_пÑ_Ñб".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., LT",LLLL:"dddd, D MMMM YYYY г., LT"},calendar:{sameDay:"[СÑÐ½Ð½Ñ Ñ] LT",nextDay:"[ÐаÑÑÑа Ñ] LT",lastDay:"[УÑоÑа Ñ] LT",nextWeek:function(){return"[У] dddd [Ñ] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мÑнÑлÑÑ] dddd [Ñ] LT";case 1:case 2:case 4:return"[У мÑнÑлÑ] dddd [Ñ] LT"}},sameElse:"L"},relativeTime:{future:"пÑаз %s",past:"%s ÑамÑ",s:"некалÑÐºÑ ÑекÑнд",m:c,mm:c,h:c,hh:c,d:"дзенÑ",dd:c,M:"меÑÑÑ",MM:c,y:"год",yy:c},meridiem:function(a){return 4>a?"ноÑÑ":12>a?"ÑанÑÑÑ":17>a?"днÑ":"веÑаÑа"},ordinal:function(a,b){switch(b){case"M":case"d":case"DDD":case"w":case"W":return a%10!==2&&a%10!==3||a%100===12||a%100===13?a+"-Ñ":a+"-Ñ";case"D":return a+"-га";default:return a}},week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){return a.defineLocale("bg",{months:"ÑнÑаÑи_ÑевÑÑаÑи_маÑÑ_апÑил_май_Ñни_Ñли_авгÑÑÑ_ÑепÑемвÑи_окÑомвÑи_ноемвÑи_декемвÑи".split("_"),monthsShort:"ÑнÑ_Ñев_маÑ_апÑ_май_Ñни_Ñли_авг_Ñеп_окÑ_ное_дек".split("_"),weekdays:"неделÑ_понеделник_вÑоÑник_ÑÑÑда_ÑеÑвÑÑÑÑк_пеÑÑк_ÑÑбоÑа".split("_"),weekdaysShort:"нед_пон_вÑо_ÑÑÑ_ÑеÑ_пеÑ_ÑÑб".split("_"),weekdaysMin:"нд_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб".split("_"),longDateFormat:{LT:"H:mm",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[ÐÐ½ÐµÑ Ð²] LT",nextDay:"[УÑÑе в] LT",nextWeek:"dddd [в] LT",lastDay:"[ÐÑеÑа в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[РизминалаÑа] dddd [в] LT";case 1:case 2:case 4:case 5:return"[РизминалиÑ] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"Ñлед %s",past:"пÑеди %s",s:"нÑколко ÑекÑнди",m:"минÑÑа",mm:"%d минÑÑи",h:"ÑаÑ",hh:"%d ÑаÑа",d:"ден",dd:"%d дни",M:"меÑеÑ",MM:"%d меÑеÑа",y:"година",yy:"%d години"},ordinal:function(a){var b=a%10,c=a%100;return 0===a?a+"-ев":0===c?a+"-ен":c>10&&20>c?a+"-Ñи":1===b?a+"-ви":2===b?a+"-Ñи":7===b||8===b?a+"-ми":a+"-Ñи"},week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){var b={1:"à§§",2:"২",3:"à§©",4:"৪",5:"à§«",6:"৬",7:"à§",8:"à§®",9:"৯",0:"০"},c={"à§§":"1","২":"2","à§©":"3","৪":"4","à§«":"5","৬":"6","à§":"7","à§®":"8","৯":"9","০":"0"};return a.defineLocale("bn",{months:"à¦à¦¾à¦¨à§à§à¦¾à¦°à§_ফà§à¦¬à§à§à¦¾à¦°à§_মারà§à¦_à¦à¦ªà§à¦°à¦¿à¦²_মà§_à¦à§à¦¨_à¦à§à¦²à¦¾à¦_à¦
à¦à¦¾à¦¸à§à¦_সà§à¦ªà§à¦à§à¦®à§à¦¬à¦°_à¦
à¦à§à¦à§à¦¬à¦°_নà¦à§à¦®à§à¦¬à¦°_ডিসà§à¦®à§à¦¬à¦°".split("_"),monthsShort:"à¦à¦¾à¦¨à§_ফà§à¦¬_মারà§à¦_à¦à¦ªà¦°_মà§_à¦à§à¦¨_à¦à§à¦²_à¦
à¦_সà§à¦ªà§à¦_à¦
à¦à§à¦à§_নà¦_ডিসà§à¦®à§".split("_"),weekdays:"রবিবার_সà§à¦®à¦¬à¦¾à¦°_মà¦à§à¦à¦²à¦¬à¦¾à¦°_বà§à¦§à¦¬à¦¾à¦°_বà§à¦¹à¦¸à§à¦ªà¦¤à§à¦¤à¦¿à¦¬à¦¾à¦°_শà§à¦à§à¦°à§à¦¬à¦¾à¦°_শনিবার".split("_"),weekdaysShort:"রবি_সà§à¦®_মà¦à§à¦à¦²_বà§à¦§_বà§à¦¹à¦¸à§à¦ªà¦¤à§à¦¤à¦¿_শà§à¦à§à¦°à§_শনি".split("_"),weekdaysMin:"রব_সম_মà¦à§à¦_বà§_বà§à¦°à¦¿à¦¹_শà§_শনি".split("_"),longDateFormat:{LT:"A h:mm সমà§",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[à¦à¦] LT",nextDay:"[à¦à¦à¦¾à¦®à§à¦à¦¾à¦²] LT",nextWeek:"dddd, LT",lastDay:"[à¦à¦¤à¦à¦¾à¦²] LT",lastWeek:"[à¦à¦¤] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরà§",past:"%s à¦à¦à§",s:"à¦à¦à¦ সà§à¦à§à¦¨à§à¦¡",m:"à¦à¦ মিনিà¦",mm:"%d মিনিà¦",h:"à¦à¦ à¦à¦¨à§à¦à¦¾",hh:"%d à¦à¦¨à§à¦à¦¾",d:"à¦à¦ দিন",dd:"%d দিন",M:"à¦à¦ মাস",MM:"%d মাস",y:"à¦à¦ বà¦à¦°",yy:"%d বà¦à¦°"},preparse:function(a){return a.replace(/[১২৩৪৫৬à§à§®à§¯à§¦]/g,function(a){return c[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return b[a]})},meridiem:function(a){return 4>a?"রাত":10>a?"শà¦à¦¾à¦²":17>a?"দà§à¦ªà§à¦°":20>a?"বিà¦à§à¦²":"রাত"},week:{dow:0,doy:6}})}),function(a){a(tb)}(function(a){var b={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},c={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};return a.defineLocale("bo",{months:"à½à¾³à¼à½à¼à½à½à¼à½à½¼_à½à¾³à¼à½à¼à½à½à½²à½¦à¼à½_à½à¾³à¼à½à¼à½à½¦à½´à½à¼à½_à½à¾³à¼à½à¼à½à½à½²à¼à½_à½à¾³à¼à½à¼à½£à¾à¼à½_à½à¾³à¼à½à¼à½à¾²à½´à½à¼à½_à½à¾³à¼à½à¼à½à½à½´à½à¼à½_à½à¾³à¼à½à¼à½à½¢à¾à¾±à½à¼à½_à½à¾³à¼à½à¼à½à½à½´à¼à½_à½à¾³à¼à½à¼à½à½
ུà¼à½_à½à¾³à¼à½à¼à½à½
ུà¼à½à½
ིà½à¼à½_à½à¾³à¼à½à¼à½à½
ུà¼à½à½à½²à½¦à¼à½".split("_"),monthsShort:"à½à¾³à¼à½à¼à½à½à¼à½à½¼_à½à¾³à¼à½à¼à½à½à½²à½¦à¼à½_à½à¾³à¼à½à¼à½à½¦à½´à½à¼à½_à½à¾³à¼à½à¼à½à½à½²à¼à½_à½à¾³à¼à½à¼à½£à¾à¼à½_à½à¾³à¼à½à¼à½à¾²à½´à½à¼à½_à½à¾³à¼à½à¼à½à½à½´à½à¼à½_à½à¾³à¼à½à¼à½à½¢à¾à¾±à½à¼à½_à½à¾³à¼à½à¼à½à½à½´à¼à½_à½à¾³à¼à½à¼à½à½
ུà¼à½_à½à¾³à¼à½à¼à½à½
ུà¼à½à½
ིà½à¼à½_à½à¾³à¼à½à¼à½à½
ུà¼à½à½à½²à½¦à¼à½".split("_"),weekdays:"à½à½à½ à¼à½à½²à¼à½à¼_à½à½à½ à¼à½à¾³à¼à½à¼_à½à½à½ à¼à½à½²à½à¼à½à½à½¢à¼_à½à½à½ à¼à½£à¾·à½à¼à½à¼_à½à½à½ à¼à½à½´à½¢à¼à½à½´_à½à½à½ à¼à½à¼à½¦à½à½¦à¼_à½à½à½ à¼à½¦à¾¤à½ºà½à¼à½à¼".split("_"),weekdaysShort:"à½à½²à¼à½à¼_à½à¾³à¼à½à¼_à½à½²à½à¼à½à½à½¢à¼_ལྷà½à¼à½à¼_à½à½´à½¢à¼à½à½´_à½à¼à½¦à½à½¦à¼_སྤེà½à¼à½à¼".split("_"),weekdaysMin:"à½à½²à¼à½à¼_à½à¾³à¼à½à¼_à½à½²à½à¼à½à½à½¢à¼_ལྷà½à¼à½à¼_à½à½´à½¢à¼à½à½´_à½à¼à½¦à½à½¦à¼_སྤེà½à¼à½à¼".split("_"),longDateFormat:{LT:"A h:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[à½à½²à¼à½¢à½²à½] LT",nextDay:"[སà½à¼à½à½²à½] LT",nextWeek:"[à½à½à½´à½à¼à½à¾²à½à¼à½¢à¾à½ºà½¦à¼à½], LT",lastDay:"[à½à¼à½¦à½] LT",lastWeek:"[à½à½à½´à½à¼à½à¾²à½à¼à½à½à½ à¼à½] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལà¼",past:"%s སà¾à½à¼à½£",s:"ལà½à¼à½¦à½",m:"སà¾à½¢à¼à½à¼à½à½
ིà½",mm:"%d སà¾à½¢à¼à½",h:"à½à½´à¼à½à½¼à½à¼à½à½
ིà½",hh:"%
2338d à½à½´à¼à½à½¼à½",d:"à½à½²à½à¼à½à½
ིà½",dd:"%d à½à½²à½à¼",M:"à½à¾³à¼à½à¼à½à½
ིà½",MM:"%d à½à¾³à¼à½",y:"ལོà¼à½à½
ིà½",yy:"%d ལོ"},preparse:function(a){return a.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,function(a){return c[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return b[a]})},meridiem:function(a){return 4>a?"à½à½à½à¼à½à½¼":10>a?"à½à½¼à½à½¦à¼à½à½¦":17>a?"à½à½²à½à¼à½à½´à½":20>a?"à½à½à½¼à½à¼à½à½":"à½à½à½à¼à½à½¼"},week:{dow:0,doy:6}})}),function(a){a(tb)}(function(b){function c(a,b,c){var d={mm:"munutenn",MM:"miz",dd:"devezh"};return a+" "+f(d[c],a)}function d(a){switch(e(a)){case 1:case 3:case 4:case 5:case 9:return a+" bloaz";default:return a+" vloaz"}}function e(a){return a>9?e(a%10):a}function f(a,b){return 2===b?g(a):a}function g(b){var c={m:"v",b:"v",d:"z"};return c[b.charAt(0)]===a?b:c[b.charAt(0)]+b.substring(1)}return b.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),longDateFormat:{LT:"h[e]mm A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY LT",LLLL:"dddd, D [a viz] MMMM YYYY LT"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",m:"ur vunutenn",mm:c,h:"un eur",hh:"%d eur",d:"un devezh",dd:c,M:"ur miz",MM:c,y:"ur bloaz",yy:d},ordinal:function(a){var b=1===a?"añ":"vet";return a+b},week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){function b(a,b,c){var d=a+" ";switch(c){case"m":return b?"jedna minuta":"jedne minute";case"mm":return d+=1===a?"minuta":2===a||3===a||4===a?"minute":"minuta";case"h":return b?"jedan sat":"jednog sata";case"hh":return d+=1===a?"sat":2===a||3===a||4===a?"sata":"sati";case"dd":return d+=1===a?"dan":"dana";case"MM":return d+=1===a?"mjesec":2===a||3===a||4===a?"mjeseca":"mjeseci";case"yy":return d+=1===a?"godina":2===a||3===a||4===a?"godine":"godina"}}return a.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),weekdays:"nedjelja_ponedjeljak_utorak_srijeda_Äetvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._Äet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_Äe_pe_su".split("_"),longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juÄer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[proÅ¡lu] dddd [u] LT";case 6:return"[proÅ¡le] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[proÅ¡li] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:b,mm:b,h:b,hh:b,d:"dan",dd:b,M:"mjesec",MM:b,y:"godinu",yy:b},ordinal:"%d.",week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){return a.defineLocale("ca",{months:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),monthsShort:"gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.".split("_"),weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%
2338d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinal:"%dº",week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){function b(a){return a>1&&5>a&&1!==~~(a/10)}function c(a,c,d,e){var f=a+" ";switch(d){case"s":return c||e?"pár sekund":"pár sekundami";case"m":return c?"minuta":e?"minutu":"minutou";case"mm":return c||e?f+(b(a)?"minuty":"minut"):f+"minutami";break;case"h":return c?"hodina":e?"hodinu":"hodinou";case"hh":return c||e?f+(b(a)?"hodiny":"hodin"):f+"hodinami";break;case"d":return c||e?"den":"dnem";case"dd":return c||e?f+(b(a)?"dny":"dnÃ"):f+"dny";break;case"M":return c||e?"mÄsÃc":"mÄsÃcem";case"MM":return c||e?f+(b(a)?"mÄsÃce":"mÄsÃců"):f+"mÄsÃci";break;case"y":return c||e?"rok":"rokem";case"yy":return c||e?f+(b(a)?"roky":"let"):f+"lety"}}var d="leden_únor_bÅezen_duben_kvÄten_Äerven_Äervenec_srpen_záÅÃ_ÅÃjen_listopad_prosinec".split("_"),e="led_úno_bÅe_dub_kvÄ_Ävn_Ävc_srp_záÅ_ÅÃj_lis_pro".split("_");return a.defineLocale("cs",{months:d,monthsShort:e,monthsParse:function(a,b){var c,d=[];for(c=0;12>c;c++)d[c]=new RegExp("^"+a[c]+"$|^"+b[c]+"$","i");return d}(d,e),weekdays:"nedÄle_pondÄlÃ_úterý_stÅeda_Ätvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_Ät_pá_so".split("_"),weekdaysMin:"ne_po_út_st_Ät_pá_so".split("_"),longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd D. MMMM YYYY LT"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zÃtra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedÄli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve stÅedu v] LT";case 4:return"[ve Ätvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[vÄera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou nedÄli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou stÅedu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pÅed %s",s:c,m:c,mm:c,h:c,hh:c,d:c,dd:c,M:c,MM:c,y:c,yy:c},ordinal:"%d.",week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("cv",{months:"кÄÑлаÑ_наÑÄÑ_пÑÑ_ака_май_çÄÑÑме_ÑÑÄ_çÑÑла_авÄн_Ñпа_Ñӳк_ÑаÑÑав".split("_"),monthsShort:"кÄÑ_наÑ_пÑÑ_ака_май_çÄÑ_ÑÑÄ_çÑÑ_ав_Ñпа_Ñӳк_ÑаÑ".split("_"),weekdays:"вÑÑÑаÑникÑн_ÑÑнÑикÑн_ÑÑлаÑикÑн_ÑнкÑн_кÄçнеÑникÑн_ÑÑнекÑн_ÑÄмаÑкÑн".split("_"),weekdaysShort:"вÑÑ_ÑÑн_ÑÑл_Ñн_кÄç_ÑÑн_ÑÄм".split("_"),weekdaysMin:"вÑ_Ñн_ÑÑ_Ñн_кç_ÑÑ_Ñм".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"YYYY [çÑлÑ
и] MMMM [ÑйÄÑ
Äн] D[-мÄÑÄ]",LLL:"YYYY [çÑлÑ
и] MMMM [ÑйÄÑ
Äн] D[-мÄÑÄ], LT",LLLL:"dddd, YYYY [çÑлÑ
и] MMMM [ÑйÄÑ
Äн] D[-мÄÑÄ], LT"},calendar:{sameDay:"[ÐаÑн] LT [ÑеÑ
еÑÑе]",nextDay:"[ЫÑан] LT [ÑеÑ
еÑÑе]",lastDay:"[ÄнеÑ] LT [ÑеÑ
еÑÑе]",nextWeek:"[ÃиÑеÑ] dddd LT [ÑеÑ
еÑÑе]",lastWeek:"[ÐÑÑнÄ] dddd LT [ÑеÑ
еÑÑе]",sameElse:"L"},relativeTime:{future:function(a){var b=/ÑеÑ
еÑ$/i.exec(a)?"Ñен":/çÑл$/i.exec(a)?"Ñан":"Ñан";return a+b},past:"%s каÑлла",s:"пÄÑ-ик çеккÑнÑ",m:"пÄÑ Ð¼Ð¸Ð½ÑÑ",mm:"%d минÑÑ",h:"пÄÑ ÑеÑ
еÑ",hh:"%d ÑеÑ
еÑ",d:"пÄÑ ÐºÑн",dd:"%d кÑн",M:"пÄÑ ÑйÄÑ
",MM:"%d ÑйÄÑ
",y:"пÄÑ Ã§Ñл",yy:"%d çÑл"},ordinal:"%d-мÄÑ",week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){return a.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},ordinal:function(a){var b=a,c="",d=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"];return b>20?c=40===b||50===b||60===b||80===b||100===b?"fed":"ain":b>0&&(c=d[b]),a+c},week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd [d.] D. MMMM YYYY LT"},calendar:{sameDay:"[I dag kl.] LT",nextDay:"[I morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[I gÃ¥r kl.] LT",lastWeek:"[sidste] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"fÃ¥ sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en mÃ¥ned",MM:"%d mÃ¥neder",y:"et Ã¥r",yy:"%d Ã¥r"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){function b(a,b,c){var d={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[a+" Tage",a+" Tagen"],M:["ein Monat","einem Monat"],MM:[a+" Monate",a+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[a+" Jahre",a+" Jahren"]};return b?d[c][0]:d[c][1]}return a.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm [
2338Uhr]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:b,mm:"%d Minuten",h:b,hh:"%d Stunden",d:b,dd:b,M:b,MM:b,y:b,yy:b},ordinal:"%d.",week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){function b(a,b,c){var d={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[a+" Tage",a+" Tagen"],M:["ein Monat","einem Monat"],MM:[a+" Monate",a+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[a+" Jahre",a+" Jahren"]};return b?d[c][0]:d[c][1]}return a.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm [Uhr]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:b,mm:"%d Minuten",h:b,hh:"%d Stunden",d:b,dd:b,M:b,MM:b,y:b,yy:b},ordinal:"%d.",week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("el",{monthsNominativeEl:"ÎανοÏ
άÏιοÏ_ΦεβÏοÏ
άÏιοÏ_ÎάÏÏιοÏ_ÎÏÏίλιοÏ_ÎάιοÏ_ÎοÏνιοÏ_ÎοÏλιοÏ_ÎÏγοÏ
ÏÏοÏ_ΣεÏÏÎμβÏιοÏ_ÎκÏÏβÏιοÏ_ÎοÎμβÏιοÏ_ÎεκÎμβÏιοÏ".split("_"),monthsGenitiveEl:"ÎανοÏ
αÏίοÏ
_ΦεβÏοÏ
αÏίοÏ
_ÎαÏÏίοÏ
_ÎÏÏιλίοÏ
_ÎαÎοÏ
_ÎοÏ
νίοÏ
_ÎοÏ
λίοÏ
_ÎÏ
γοÏÏÏοÏ
_ΣεÏÏεμβÏίοÏ
_ÎκÏÏβÏίοÏ
_ÎοεμβÏίοÏ
_ÎεκεμβÏίοÏ
".split("_"),months:function(a,b){return/D/.test(b.substring(0,b.indexOf("MMMM")))?this._monthsGenitiveEl[a.month()]:this._monthsNominativeEl[a.month()]},monthsShort:"Îαν_Φεβ_ÎαÏ_ÎÏÏ_ÎαÏ_ÎοÏ
ν_ÎοÏ
λ_ÎÏ
γ_ΣεÏ_ÎκÏ_Îοε_Îεκ".split("_"),weekdays:"ÎÏ
Ïιακή_ÎεÏ
ÏÎÏα_ΤÏίÏη_ΤεÏάÏÏη_Î ÎμÏÏη_ΠαÏαÏκεÏ
ή_ΣάββαÏο".split("_"),weekdaysShort:"ÎÏ
Ï_ÎεÏ
_ΤÏι_ΤεÏ_Πεμ_ΠαÏ_Σαβ".split("_"),weekdaysMin:"ÎÏ
_Îε_ΤÏ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(a,b,c){return a>11?c?"μμ":"ÎÎ":c?"Ïμ":"Î Î"},isPM:function(a){return"μ"===(a+"").toLowerCase()[0]},meridiemParse:/[Î Î]\.?Î?\.?/i,longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendarEl:{sameDay:"[ΣήμεÏα {}] LT",nextDay:"[ÎÏÏιο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Î§Î¸ÎµÏ {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[Ïο ÏÏοηγοÏμενο] dddd [{}] LT";default:return"[Ïην ÏÏοηγοÏμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(a,b){var c=this._calendarEl[a],d=b&&b.hours();return"function"==typeof c&&(c=c.apply(b)),c.replace("{}",d%12===1?"ÏÏη":"ÏÏιÏ")},relativeTime:{future:"Ïε %s",past:"%s ÏÏιν",s:"δεÏ
ÏεÏÏλεÏÏα",m:"Îνα λεÏÏÏ",mm:"%d λεÏÏά",h:"μία ÏÏα",hh:"%d ÏÏεÏ",d:"μία μÎÏα",dd:"%d μÎÏεÏ",M:"ÎÎ½Î±Ï Î¼Î®Î½Î±Ï",MM:"%d μήνεÏ",y:"ÎÎ½Î±Ï ÏÏÏνοÏ",yy:"%d ÏÏÏνια"},ordinal:function(a){return a+"η"},week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c},week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"YYYY-MM-DD",LL:"D MMMM, YYYY",LLL:"D MMMM, YYYY LT",LLLL:"dddd, D MMMM, YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}})}),function(a){a(tb)}(function(a){return a.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c},week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aÅgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aÅg_sep_okt_nov_dec".split("_"),weekdays:"DimanÄo_Lundo_Mardo_Merkredo_Ä´aÅdo_Vendredo_Sabato".split("_"),weekdaysShort:"Dim_Lun_Mard_Merk_Ä´aÅ_Ven_Sab".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Ä´a_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D[-an de] MMMM, YYYY",LLL:"D[-an de] MMMM, YYYY LT",LLLL:"dddd, [la] D[-an de] MMMM, YYYY LT"},meridiem:function(a,b,c){return a>
233811?c?"p.t.m.":"P.T.M.":c?"a.t.m.":"A.T.M."},calendar:{sameDay:"[HodiaÅ je] LT",nextDay:"[MorgaÅ je] LT",nextWeek:"dddd [je] LT",lastDay:"[HieraÅ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"je %s",past:"antaÅ %s",s:"sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},ordinal:"%da",week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){var b="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),c="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_");return a.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(a,d){return/-MMM-/.test(d)?c[a.month()]:b[a.month()]},weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY LT",LLLL:"dddd, D [de] MMMM [de] YYYY LT"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un dÃa",dd:"%d dÃas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:"%dº",week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){function b(a,b,c,d){var e={s:["mõne sekundi","mõni sekund","paar sekundit"],m:["ühe minuti","üks minut"],mm:[a+" minuti",a+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[a+" tunni",a+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[a+" kuu",a+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[a+" aasta",a+" aastat"]};return b?e[c][2]?e[c][2]:e[c][1]:d?e[c][0]:e[c][1]}return a.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:b,m:b,mm:b,h:b,hh:b,d:b,dd:"%d päeva",M:b,MM:b,y:b,yy:b},ordinal:"%d.",week:{dow:1,doy:4}}) 2339}),function(a){a(tb)}(function(a){return a.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] LT",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] LT",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] LT",llll:"ddd, YYYY[ko] MMM D[a] LT"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinal:"%d.",week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){var b={1:"Û±",2:"Û²",3:"Û³",4:"Û´",5:"Ûµ",6:"Û¶",7:"Û·",8:"Û¸",9:"Û¹",0:"Û°"},c={"Û±":"1","Û²":"2","Û³":"3","Û´":"4","Ûµ":"5","Û¶":"6","Û·":"7","Û¸":"8","Û¹":"9","Û°":"0"};return a.defineLocale("fa",{months:"ÚØ§ÙÙÛÙ_ÙÙØ±ÛÙ_٠ارس_Ø¢ÙØ±ÛÙ_Ù Ù_ÚÙØ¦Ù_ÚÙØ¦ÛÙ_Ø§ÙØª_سپتا٠بر_اکتبر_ÙÙØ§Ù بر_دسا٠بر".split("_"),monthsShort:"ÚØ§ÙÙÛÙ_ÙÙØ±ÛÙ_٠ارس_Ø¢ÙØ±ÛÙ_Ù Ù_ÚÙØ¦Ù_ÚÙØ¦ÛÙ_Ø§ÙØª_سپتا٠بر_اکتبر_ÙÙØ§Ù بر_دسا٠بر".split("_"),weekdays:"ÛÚ©âØ´ÙØ¨Ù_Ø¯ÙØ´ÙبÙ_سÙâØ´ÙØ¨Ù_ÚÙØ§Ø±Ø´ÙبÙ_Ù¾ÙØ¬âØ´ÙØ¨Ù_ج٠عÙ_Ø´ÙØ¨Ù".split("_"),weekdaysShort:"ÛÚ©âØ´ÙØ¨Ù_Ø¯ÙØ´ÙبÙ_سÙâØ´ÙØ¨Ù_ÚÙØ§Ø±Ø´ÙبÙ_Ù¾ÙØ¬âØ´ÙØ¨Ù_ج٠عÙ_Ø´ÙØ¨Ù".split("_"),weekdaysMin:"Û_د_س_Ú_Ù¾_ج_Ø´".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},meridiem:function(a){return 12>a?"ÙØ¨Ù از Ø¸ÙØ±":"بعد از Ø¸ÙØ±"},calendar:{sameDay:"[Ø§Ù Ø±ÙØ² ساعت] LT",nextDay:"[ÙØ±Ø¯Ø§ ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[Ø¯ÛØ±Ùز ساعت] LT",lastWeek:"dddd [Ù¾ÛØ´] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s Ù¾ÛØ´",s:"ÚÙØ¯Û٠ثاÙÛÙ",m:"ÛÚ© دÙÛÙÙ",mm:"%d دÙÛÙÙ",h:"ÛÚ© ساعت",hh:"%
2339d ساعت",d:"ÛÚ© Ø±ÙØ²",dd:"%d Ø±ÙØ²",M:"ÛÚ© Ù
اÙ",MM:"%d Ù
اÙ",y:"ÛÚ© ساÙ",yy:"%d ساÙ"},preparse:function(a){return a.replace(/[Û°-Û¹]/g,function(a){return c[a]}).replace(/Ø/g,",")},postformat:function(a){return a.replace(/\d/g,function(a){return b[a]}).replace(/,/g,"Ø")},ordinal:"%dÙ
",week:{dow:6,doy:12}})}),function(a){a(tb)}(function(a){function b(a,b,d,e){var f="";switch(d){case"s":return e?"muutaman sekunnin":"muutama sekunti";case"m":return e?"minuutin":"minuutti";case"mm":f=e?"minuutin":"minuuttia";break;case"h":return e?"tunnin":"tunti";case"hh":f=e?"tunnin":"tuntia";break;case"d":return e?"päivän":"päivä";case"dd":f=e?"päivän":"päivää";break;case"M":return e?"kuukauden":"kuukausi";case"MM":f=e?"kuukauden":"kuukautta";break;case"y":return e?"vuoden":"vuosi";case"yy":f=e?"vuoden":"vuotta"}return f=c(a,e)+" "+f}function c(a,b){return 10>a?b?e[a]:d[a]:a}var d="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),e=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",d[7],d[8],d[9]];return a.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] LT",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] LT",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] LT",llll:"ddd, Do MMM YYYY, [klo] LT"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:b,m:b,mm:b,h:b,hh:b,d:b,dd:b,M:b,MM:b,y:b,yy:b},ordinal:"%d.",week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("fo",{months:"januar_februar_mars_aprÃl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_frÃggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frÃ_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D. MMMM, YYYY LT"},calendar:{sameDay:"[à dag kl.] LT",nextDay:"[à morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[à gjár kl.] LT",lastWeek:"[sÃðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s sÃðani",s:"fá sekund",m:"ein minutt",mm:"%d minuttir",h:"ein tÃmi",hh:"%d tÃmar",d:"ein dagur",dd:"%d dagar",M:"ein mánaði",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à ] LT",nextDay:"[Demain à ] LT",nextWeek:"dddd [à ] LT",lastDay:"[Hier à ] LT",lastWeek:"dddd [dernier à ] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(a){return a+(1===a?"er":"")}})}),function(a){a(tb)}(function(a){return a.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à ] LT",nextDay:"[Demain à ] LT",nextWeek:"dddd [à ] LT",lastDay:"[Hier à ] LT",lastWeek:"dddd [dernier à ] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(a){return a+(1===a?"er":"")},week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("gl",{months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Outubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(a){return"uns segundos"===a?"nuns segundos":"en "+a},past:"hai %s",s:"uns segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%
2339d horas",d:"un dÃa",dd:"%d dÃas",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinal:"%dº",week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){return a.defineLocale("he",{months:"×× ××ר_פ×ר××ר_×רץ_×פר××_×××_××× ×_××××_××××ס×_ספ×××ר_×××§×××ר_× ××××ר_×צ××ר".split("_"),monthsShort:"×× ×׳_פ×ר׳_×רץ_×פר׳_×××_××× ×_××××_×××׳_ספ×׳_××ק׳_× ××׳_×צ×׳".split("_"),weekdays:"ר×ש××_×©× ×_ש××ש×_ר×××¢×_×××ש×_ש×ש×_ש×ת".split("_"),weekdaysShort:"×׳_×׳_×׳_×׳_×׳_×׳_ש׳".split("_"),weekdaysMin:"×_×_×_×_×_×_ש".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D [×]MMMM YYYY",LLL:"D [×]MMMM YYYY LT",LLLL:"dddd, D [×]MMMM YYYY LT",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY LT",llll:"ddd, D MMM YYYY LT"},calendar:{sameDay:"[×××× ×Ö¾]LT",nextDay:"[××ר ×Ö¾]LT",nextWeek:"dddd [×שע×] LT",lastDay:"[×ת××× ×Ö¾]LT",lastWeek:"[××××] dddd [×××ר×× ×שע×] LT",sameElse:"L"},relativeTime:{future:"××¢×× %s",past:"××¤× × %s",s:"×ספר ×©× ××ת",m:"××§×",mm:"%d ××§×ת",h:"שע×",hh:function(a){return 2===a?"שעת×××":a+" שע×ת"},d:"×××",dd:function(a){return 2===a?"××××××":a+" ××××"},M:"×××ש",MM:function(a){return 2===a?"×××ש×××":a+" ×××ש××"},y:"×©× ×",yy:function(a){return 2===a?"×©× ×ª×××":a+" ×©× ××"}}})}),function(a){a(tb)}(function(a){var b={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"à¥",8:"८",9:"९",0:"०"},c={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","à¥":"7","८":"8","९":"9","०":"0"};return a.defineLocale("hi",{months:"à¤à¤¨à¤µà¤°à¥_फ़रवरà¥_मारà¥à¤_à¤
पà¥à¤°à¥à¤²_मà¤_à¤à¥à¤¨_à¤à¥à¤²à¤¾à¤_à¤
à¤à¤¸à¥à¤¤_सितमà¥à¤¬à¤°_à¤
à¤à¥à¤à¥à¤¬à¤°_नवमà¥à¤¬à¤°_दिसमà¥à¤¬à¤°".split("_"),monthsShort:"à¤à¤¨._फ़र._मारà¥à¤_à¤
पà¥à¤°à¥._मà¤_à¤à¥à¤¨_à¤à¥à¤²._à¤
à¤._सित._à¤
à¤à¥à¤à¥._नव._दिस.".split("_"),weekdays:"रविवार_सà¥à¤®à¤µà¤¾à¤°_मà¤à¤à¤²à¤µà¤¾à¤°_बà¥à¤§à¤µà¤¾à¤°_à¤à¥à¤°à¥à¤µà¤¾à¤°_शà¥à¤à¥à¤°à¤µà¤¾à¤°_शनिवार".split("_"),weekdaysShort:"रवि_सà¥à¤®_मà¤à¤à¤²_बà¥à¤§_à¤à¥à¤°à¥_शà¥à¤à¥à¤°_शनि".split("_"),weekdaysMin:"र_सà¥_मà¤_बà¥_à¤à¥_शà¥_श".split("_"),longDateFormat:{LT:"A h:mm बà¤à¥",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[à¤à¤] LT",nextDay:"[à¤à¤²] LT",nextWeek:"dddd, LT",lastDay:"[à¤à¤²] LT",lastWeek:"[पिà¤à¤²à¥] dddd, LT",sameElse:"L"},relativeTime:{future:"%s मà¥à¤",past:"%s पहलà¥",s:"à¤à¥à¤ हॠà¤à¥à¤·à¤£",m:"à¤à¤ मिनà¤",mm:"%d मिनà¤",h:"à¤à¤ à¤à¤à¤à¤¾",hh:"%d à¤à¤à¤à¥",d:"à¤à¤ दिन",dd:"%d दिन",M:"à¤à¤ महà¥à¤¨à¥",MM:"%d महà¥à¤¨à¥",y:"à¤à¤ वरà¥à¤·",yy:"%d वरà¥à¤·"},preparse:function(a){return a.replace(/[१२३४५६à¥à¥®à¥¯à¥¦]/g,function(a){return c[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return b[a]})},meridiem:function(a){return 4>a?"रात":10>a?"सà¥à¤¬à¤¹":17>a?"दà¥à¤ªà¤¹à¤°":20>a?"शाम":"रात"},week:{dow:0,doy:6}})}),function(a){a(tb)}(function(a){function b(a,b,c){var d=a+" ";switch(c){case"m":return b?"jedna minuta":"jedne minute";case"mm":return d+=1===a?"minuta":2===a||3===a||4===a?"minute":"minuta";case"h":return b?"jedan sat":"jednog sata";case"hh":return d+=1===a?"sat":2===a||3===a||4===a?"sata":"sati";case"dd":return d+=1===a?"dan":"dana";case"MM":return d+=1===a?"mjesec":2===a||3===a||4===a?"mjeseca":"mjeseci";case"yy":return d+=1===a?"godina":2===a||3===a||4===a?"godine":"godina"}}return a.defineLocale("hr",{months:"sjeÄanj_veljaÄa_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_"),monthsShort:"sje._vel._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),weekdays:"nedjelja_ponedjeljak_utorak_srijeda_Äetvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._Äet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_Äe_pe_su".split("_"),longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juÄer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[proÅ¡lu] dddd [u] LT";case 6:return"[proÅ¡le] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[proÅ¡li] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:b,mm:b,h:b,hh:b,d:"dan",dd:b,M:"mjesec",MM:b,y:"godinu",yy:b},ordinal:"%d.",week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){function b(a,b,c,d){var e=a;switch(c){case"s":return d||b?"néhány másodperc":"néhány másodperce";case"m":return"egy"+(d||b?" perc":" perce");case"mm":return e+(d||b?" perc":" perce");case"h":return"egy"+(d||b?" óra":" órája");case"hh":return e+(d||b?" óra":" órája");case"d":return"egy"+(d||b?" nap":" napja");case"dd":return e+(d||b?" nap":" napja");case"M":return"egy"+(d||b?" hónap":" hónapja");case"MM":return e+(d||b?" hónap":" hónapja");case"y":return"egy"+(d||b?" év":" éve");case"yy":return e+(d||b?" év":" éve")}return""}function c(a){return(a?"":"[múlt] ")+"["+d[this.day()]+"] LT[-kor]"}var d="vasárnap hétfÅn kedden szerdán csütörtökön pénteken szombaton".split(" ");return a.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfÅ_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D., LT",LLLL:"YYYY. MMMM D., dddd LT"},meridiem:function(a,b,c){return 12>a?c===!0?"de":"DE":c===!0?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return c.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return c.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:b,m:b,mm:b,h:b,hh:b,d:b,dd:b,M:b,MM:b,y:b,yy:b},ordinal:"%d.",week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){function b(a,b){var c={nominative:"Õ°Õ¸ÖÕ¶Õ¾Õ¡Ö_ÖÕ¥Õ¿ÖÕ¾Õ¡Ö_Õ´Õ¡ÖÕ¿_Õ¡ÕºÖÕ«Õ¬_Õ´Õ¡ÕµÕ«Õ½_Õ°Õ¸ÖÕ¶Õ«Õ½_Õ°Õ¸ÖÕ¬Õ«Õ½_Ö
Õ£Õ¸Õ½Õ¿Õ¸Õ½_Õ½Õ¥ÕºÕ¿Õ¥Õ´Õ¢Õ¥Ö_Õ°Õ¸Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö_Õ¶Õ¸ÕµÕ¥Õ´Õ¢Õ¥Ö_Õ¤Õ¥Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö".split("_"),accusative:"Õ°Õ¸ÖÕ¶Õ¾Õ¡ÖÕ«_ÖÕ¥Õ¿ÖÕ¾Õ¡ÖÕ«_Õ´Õ¡ÖÕ¿Õ«_Õ¡ÕºÖÕ«Õ¬Õ«_Õ´Õ¡ÕµÕ«Õ½Õ«_Õ°Õ¸ÖÕ¶Õ«Õ½Õ«_Õ°Õ¸ÖÕ¬Õ«Õ½Õ«_Ö
Õ£Õ¸Õ½Õ¿Õ¸Õ½Õ«_Õ½Õ¥ÕºÕ¿Õ¥Õ´Õ¢Õ¥ÖÕ«_Õ°Õ¸Õ¯Õ¿Õ¥Õ´Õ¢Õ¥ÖÕ«_Õ¶Õ¸ÕµÕ¥Õ´Õ¢Õ¥ÖÕ«_Õ¤Õ¥Õ¯Õ¿Õ¥Õ´Õ¢Õ¥ÖÕ«".split("_")},d=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(b)?"accusative":"nominative";return c[d][a.month()]}function c(a){var b="Õ°Õ¶Õ¾_ÖÕ¿Ö_Õ´ÖÕ¿_Õ¡ÕºÖ_Õ´ÕµÕ½_Õ°Õ¶Õ½_Õ°Õ¬Õ½_Ö
Õ£Õ½_Õ½ÕºÕ¿_Õ°Õ¯Õ¿_Õ¶Õ´Õ¢_Õ¤Õ¯Õ¿".split("_");return b[a.month()]}function d(a){var b="Õ¯Õ«ÖÕ¡Õ¯Õ«_Õ¥ÖÕ¯Õ¸ÖÕ·Õ¡Õ¢Õ©Õ«_Õ¥ÖÕ¥ÖÕ·Õ¡Õ¢Õ©Õ«_Õ¹Õ¸ÖÕ¥ÖÕ·Õ¡Õ¢Õ©Õ«_Õ°Õ«Õ¶Õ£Õ·Õ¡Õ¢Õ©Õ«_Õ¸ÖÖÕ¢Õ¡Õ©_Õ·Õ¡Õ¢Õ¡Õ©".split("_");return b[a.day()]}return a.defineLocale("hy-am",{months:b,monthsShort:c,weekdays:d,weekdaysShort:"Õ¯ÖÕ¯_Õ¥ÖÕ¯_Õ¥ÖÖ_Õ¹ÖÖ_Õ°Õ¶Õ£_Õ¸ÖÖÕ¢_Õ·Õ¢Õ©".split("_"),weekdaysMin:"Õ¯ÖÕ¯_Õ¥ÖÕ¯_Õ¥ÖÖ_Õ¹ÖÖ_Õ°Õ¶Õ£_Õ¸ÖÖÕ¢_Õ·Õ¢Õ©".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY Õ©.",LLL:"D MMMM YYYY Õ©., LT",LLLL:"dddd, D MMMM YYYY Õ©., LT"},calendar:{sameDay:"[Õ¡ÕµÕ½Ö
Ö] LT",nextDay:"[Õ¾Õ¡Õ²Õ¨] LT",lastDay:"[Õ¥ÖÕ¥Õ¯] LT",nextWeek:function(){return"dddd [Ö
ÖÕ¨ ÕªÕ¡Õ´Õ¨] LT"},lastWeek:function(){return"[Õ¡Õ¶ÖÕ¡Õ®] dddd [Ö
ÖÕ¨ ÕªÕ¡Õ´Õ¨] LT"},sameElse:"L"},relativeTime:{future:"%s Õ°Õ¥Õ¿Õ¸",past:"%s Õ¡Õ¼Õ¡Õ»",s:"Õ´Õ« ÖÕ¡Õ¶Õ« Õ¾Õ¡ÕµÖÕ¯ÕµÕ¡Õ¶",m:"ÖÕ¸ÕºÕ¥",mm:"%d ÖÕ¸ÕºÕ¥",h:"ÕªÕ¡Õ´",hh:"%d ÕªÕ¡Õ´",d:"Ö
Ö",dd:"%d Ö
Ö",M:"Õ¡Õ´Õ«Õ½",MM:"%d Õ¡Õ´Õ«Õ½",y:"Õ¿Õ¡ÖÕ«",yy:"%d Õ¿Õ¡ÖÕ«"},meridiem:function(a){return 4>a?"Õ£Õ«Õ·Õ¥ÖÕ¾Õ¡":12>
2339a?"Õ¡Õ¼Õ¡Õ¾Õ¸Õ¿Õ¾Õ¡":17>a?"ÖÕ¥ÖÕ¥Õ¯Õ¾Õ¡":"Õ¥ÖÕ¥Õ¯Õ¸ÕµÕ¡Õ¶"},ordinal:function(a,b){switch(b){case"DDD":case"w":case"W":case"DDDo":return 1===a?a+"-Õ«Õ¶":a+"-ÖÕ¤";default:return a}},week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){return a.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] LT",LLLL:"dddd, D MMMM YYYY [pukul] LT"},meridiem:function(a){return 11>a?"pagi":15>a?"siang":19>a?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){function b(a){return a%100===11?!0:a%10===1?!1:!0}function c(a,c,d,e){var f=a+" ";switch(d){case"s":return c||e?"nokkrar sekúndur":"nokkrum sekúndum";
2339case"m":return c?"mÃnúta":"mÃnútu";case"mm":return b(a)?f+(c||e?"mÃnútur":"mÃnútum"):c?f+"mÃnúta":f+"mÃnútu";case"hh":return b(a)?f+(c||e?"klukkustundir":"klukkustundum"):f+"klukkustund";case"d":return c?"dagur":e?"dag":"degi";case"dd":return b(a)?c?f+"dagar":f+(e?"daga":"dögum"):c?f+"dagur":f+(e?"dag":"degi");case"M":return c?"mánuður":e?"mánuð":"mánuði";case"MM":return b(a)?c?f+"mánuðir":f+(e?"mánuði":"mánuðum"):c?f+"mánuður":f+(e?"mánuð":"mánuði");case"y":return c||e?"ár":"ári";case"yy":return b(a)?f+(c||e?"ár":"árum"):f+(c||e?"ár":"ári")}}return a.defineLocale("is",{months:"janúar_febrúar_mars_aprÃl_maÃ_júnÃ_júlÃ_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maÃ_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Ãr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] LT",LLLL:"dddd, D. MMMM YYYY [kl.] LT"},calendar:{sameDay:"[à dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[à gær kl.] LT",lastWeek:"[sÃðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s sÃðan",s:c,m:c,mm:c,h:"klukkustund",hh:c,d:c,dd:c,M:c,MM:c,y:c,yy:c},ordinal:"%d.",week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),weekdaysMin:"D_L_Ma_Me_G_V_S".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:"[lo scorso] dddd [alle] LT",sameElse:"L"},relativeTime:{future:function(a){return(/^[0-9].+$/.test(a)?"tra":"in")+" "+a},past:"%s fa",s:"alcuni secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:"%dº",week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("ja",{months:"1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ".split("_"),monthsShort:"1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ".split("_"),weekdays:"æ¥ææ¥_æææ¥_ç«ææ¥_æ°´ææ¥_æ¨ææ¥_éææ¥_åææ¥".split("_"),weekdaysShort:"æ¥_æ_ç«_æ°´_æ¨_é_å".split("_"),weekdaysMin:"æ¥_æ_ç«_æ°´_æ¨_é_å".split("_"),longDateFormat:{LT:"Ahæmå",L:"YYYY/MM/DD",LL:"YYYYå¹´MæDæ¥",LLL:"YYYYå¹´MæDæ¥LT",LLLL:"YYYYå¹´MæDæ¥LT dddd"},meridiem:function(a){return 12>a?"åå":"åå¾"},calendar:{sameDay:"[仿¥] LT",nextDay:"[ææ¥] LT",nextWeek:"[æ¥é±]dddd LT",lastDay:"[æ¨æ¥] LT",lastWeek:"[åé±]dddd LT",sameElse:"L"},relativeTime:{future:"%så¾",past:"%så",s:"æ°ç§",m:"1å",mm:"%då",h:"1æé",hh:"%dæé",d:"1æ¥",dd:"%dæ¥",M:"1ã¶æ",MM:"%dã¶æ",y:"1å¹´",yy:"%då¹´"}})}),function(a){a(tb)}(function(a){function b(a,b){var c={nominative:"áááááá á_ááááá áááá_ááá á¢á_ááá ááá_áááá¡á_ááááá¡á_ááááá¡á_ááááá¡á¢á_á¡áá¥á¢ááááá á_áá¥á¢ááááá á_ááááááá á_áááááááá á".split("_"),accusative:"áááááá á¡_ááááá áááá¡_ááá á¢á¡_ááá áááá¡_áááá¡á¡_ááááá¡á¡_ááááá¡á¡_ááááá¡á¢á¡_á¡áá¥á¢ááááá á¡_áá¥á¢ááááá á¡_ááááááá á¡_áááááááá á¡".split("_")},d=/D[oD] *MMMM?/.test(b)?"accusative":"nominative";return c[d][a.month()]}function c(a,b){var c={nominative:"áááá á_áá á¨ááááá_á¡ááá¨ááááá_ááá®á¨ááááá_á®á£áá¨ááááá_ááá áá¡áááá_á¨ááááá".split("_"),accusative:"áááá áá¡_áá á¨ááááá¡_á¡ááá¨ááááá¡_ááá®á¨ááááá¡_á®á£áá¨ááááá¡_ááá áá¡áááá¡_á¨ááááá¡".split("_")},d=/(á¬ááá|á¨ááááá)/.test(b)?"accusative":"nominative";return c[d][a.day()]}
2339return a.defineLocale("ka",{months:b,monthsShort:"ááá_ááá_ááá _ááá _ááá_ááá_ááá_ááá_á¡áá¥_áá¥á¢_ááá_ááá".split("_"),weekdays:c,weekdaysShort:"ááá_áá á¨_á¡áá_ááá®_á®á£á_ááá _á¨áá".split("_"),weekdaysMin:"áá_áá _á¡á_áá_á®á£_áá_á¨á".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[áá¦áá¡] LT[-áá]",nextDay:"[á®ááá] LT[-áá]",lastDay:"[áá£á¨áá] LT[-áá]",nextWeek:"[á¨ááááá] dddd LT[-áá]",lastWeek:"[á¬ááá] dddd LT-áá",sameElse:"L"},relativeTime:{future:function(a){return/(á¬ááá|á¬á£áá|á¡áááá|á¬ááá)/.test(a)?a.replace(/á$/,"á¨á"):a+"á¨á"},past:function(a){return/(á¬ááá|á¬á£áá|á¡áááá|áá¦á|ááá)/.test(a)?a.replace(/(á|á)$/,"áá¡ á¬áá"):/á¬ááá/.test(a)?a.replace(/á¬ááá$/,"á¬ááá¡ á¬áá"):void 0},s:"á áááááááá á¬ááá",m:"á¬á£áá",mm:"%d á¬á£áá",h:"á¡áááá",hh:"%d á¡áááá",d:"áá¦á",dd:"%d áá¦á",M:"ááá",MM:"%d ááá",y:"á¬ááá",yy:"%d á¬ááá"},ordinal:function(a){return 0===a?a:1===a?a+"-áá":20>a||100>=a&&a%20===0||a%100===0?"áá-"+a:a+"-á"},week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){return a.defineLocale("km",{months:"áááá¶_áá»áááá_áá·áá¶_áááá¶_á§ááá¶_áá·áá»áá¶_áááááá¶_áá¸á á¶_ááááá¶_áá»áá¶_áá·á
ááá·áá¶_áááá¼".split("_"),monthsShort:"áááá¶_áá»áááá_áá·áá¶_áááá¶_á§ááá¶_áá·áá»áá¶_áááááá¶_áá¸á á¶_ááááá¶_áá»áá¶_áá·á
ááá·áá¶_áááá¼".split("_"),weekdays:"á¢á¶áá·ááá_á
áááá_á¢áááá¶á_áá»á_áááá ááááá·á_áá»ááá_áá
áá".split("_"),weekdaysShort:"á¢á¶áá·ááá_á
áááá_á¢áááá¶á_áá»á_áááá ááááá·á_áá»ááá_áá
áá".split("_"),weekdaysMin:"á¢á¶áá·ááá_á
áááá_á¢áááá¶á_áá»á_áááá ááááá·á_áá»ááá_áá
áá".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[áááááá áááá] LT",nextDay:"[ááá¢áá áááá] LT",nextWeek:"dddd [áááá] LT",lastDay:"[áááá·ááá·á áááá] LT",lastWeek:"dddd [ááááá¶á ááá»á] [áááá] LT",sameElse:"L"},relativeTime:{future:"%sááá",past:"%sáá»á",s:"ááá»áááá¶ááá·áá¶áá¸",m:"áá½ááá¶áá¸",mm:"%d áá¶áá¸",h:"áá½ááááá",hh:"%d áááá",d:"áá½ááááá",dd:"%d áááá",M:"áá½ááá",MM:"%d áá",y:"áá½ááááá¶á",yy:"%d áááá¶á"},week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("ko",{months:"1ì_2ì_3ì_4ì_5ì_6ì_7ì_8ì_9ì_10ì_11ì_12ì".split("_"),monthsShort:"1ì_2ì_3ì_4ì_5ì_6ì_7ì_8ì_9ì_10ì_11ì_12ì".split("_"),weekdays:"ì¼ìì¼_ììì¼_íìì¼_ììì¼_목ìì¼_ê¸ìì¼_í ìì¼".split("_"),weekdaysShort:"ì¼_ì_í_ì_목_ê¸_í ".split("_"),weekdaysMin:"ì¼_ì_í_ì_목_ê¸_í ".split("_"),longDateFormat:{LT:"A hì më¶",L:"YYYY.MM.DD",LL:"YYYYë
MMMM Dì¼",LLL:"YYYYë
MMMM Dì¼ LT",LLLL:"YYYYë
MMMM Dì¼ dddd LT"},meridiem:function(a){return 12>a?"ì¤ì ":"ì¤í"},calendar:{sameDay:"ì¤ë LT",nextDay:"ë´ì¼ LT",nextWeek:"dddd LT",lastDay:"ì´ì LT",lastWeek:"ì§ë주 dddd LT",sameElse:"L"},relativeTime:{future:"%s í",past:"%s ì ",s:"ëªì´",ss:"%dì´",m:"ì¼ë¶",mm:"%dë¶",h:"íìê°",hh:"%dìê°",d:"í루",dd:"%dì¼",M:"íë¬",MM:"%dë¬",y:"ì¼ë
",yy:"%dë
"},ordinal:"%dì¼",meridiemParse:/(ì¤ì |ì¤í)/,isPM:function(a){return"ì¤í"===a}})}),function(a){a(tb)}(function(a){function b(a,b,c){var d={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return b?d[c][0]:d[c][1]}function c(a){var b=a.substr(0,a.indexOf(" "));return e(b)?"a "+a:"an "+a}function d(a){var b=a.substr(0,a.indexOf(" "));return e(b)?"viru "+a:"virun "+a}function e(a){if(a=parseInt(a,10),isNaN(a))return!1;if(0>a)return!0;
2339if(10>a)return a>=4&&7>=a?!0:!1;if(100>a){var b=a%10,c=a/10;return e(0===b?c:b)}if(1e4>a){for(;a>=10;)a/=10;return e(a)}return a/=1e3,e(a)}return a.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),longDateFormat:{LT:"H:mm [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:c,past:d,s:"e puer Sekonnen",m:b,mm:"%d Minutten",h:b,hh:"%d Stonnen",d:b,dd:"%d Deeg",M:b,MM:"%d Méint",y:b,yy:"%d Joer"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){function b(a,b,c,d){return b?"kelios sekundÄs":d?"kelių sekundžių":"kelias sekundes"}function c(a,b,c,d){return b?e(c)[0]:d?e(c)[1]:e(c)[2]}function d(a){return a%10===0||a>10&&20>a}function e(a){return h[a].split("_")}function f(a,b,f,g){var h=a+" ";return 1===a?h+c(a,b,f[0],g):b?h+(d(a)?e(f)[1]:e(f)[0]):g?h+e(f)[1]:h+(d(a)?e(f)[1]:e(f)[2])}function g(a,b){var c=-1===b.indexOf("dddd HH:mm"),d=i[a.day()];return c?d:d.substring(0,d.length-2)+"į"}var h={m:"minutÄ_minutÄs_minutÄ",mm:"minutÄs_minuÄių_minutes",h:"valanda_valandos_valandÄ
",hh:"valandos_valandų_valandas",d:"diena_dienos_dienÄ
",dd:"dienos_dienų_dienas",M:"mÄnuo_mÄnesio_mÄnesį",MM:"mÄnesiai_mÄnesių_mÄnesius",y:"metai_metų_metus",yy:"metai_metų_metus"},i="sekmadienis_pirmadienis_antradienis_treÄiadienis_ketvirtadienis_penktadienis_Å¡eÅ¡tadienis".split("_");return a.defineLocale("lt",{months:"sausio_vasario_kovo_balandžio_gegužÄs_birželio_liepos_rugpjÅ«Äio_rugsÄjo_spalio_lapkriÄio_gruodžio".split("_"),monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:g,weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Å eÅ¡".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Å ".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], LT [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, LT [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], LT [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, LT [val.]"},calendar:{sameDay:"[Å iandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[PraÄjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieÅ¡ %s",s:b,m:c,mm:f,h:c,hh:f,d:c,dd:f,M:c,MM:f,y:c,yy:f},ordinal:function(a){return a+"-oji"},week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){function b(a,b,c){var d=a.split("_");return c?b%10===1&&11!==b?d[2]:d[3]:b%10===1&&11!==b?d[0]:d[1]}function c(a,c,e){return a+" "+b(d[e],a,c)}var d={mm:"minÅ«ti_minÅ«tes_minÅ«te_minÅ«tes",hh:"stundu_stundas_stunda_stundas",dd:"dienu_dienas_diena_dienas",MM:"mÄnesi_mÄneÅ¡us_mÄnesis_mÄneÅ¡i",yy:"gadu_gadus_gads_gadi"};return a.defineLocale("lv",{months:"janvÄris_februÄris_marts_aprÄ«lis_maijs_jÅ«nijs_jÅ«lijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jÅ«n_jÅ«l_aug_sep_okt_nov_dec".split("_"),weekdays:"svÄtdiena_pirmdiena_otrdiena_treÅ¡diena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, LT",LLLL:"YYYY. [gada] D. MMMM, dddd, LT"},calendar:{sameDay:"[Å odien pulksten] LT",nextDay:"[RÄ«t pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[PagÄjuÅ¡Ä] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"%s vÄlÄk",past:"%s agrÄk",s:"dažas sekundes",m:"minÅ«ti",mm:c,h:"stundu",hh:c,d:"dienu",dd:c,M:"mÄnesi",MM:c,y:"gadu",yy:c},ordinal:"%d.",week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("mk",{months:"ÑанÑаÑи_ÑевÑÑаÑи_маÑÑ_апÑил_маÑ_ÑÑни_ÑÑли_авгÑÑÑ_ÑепÑемвÑи_окÑомвÑи_ноемвÑи_декемвÑи".split("_"),monthsShort:"Ñан_Ñев_маÑ_апÑ_маÑ_ÑÑн_ÑÑл_авг_Ñеп_окÑ_ное_дек".split("_"),weekdays:"недела_понеделник_вÑоÑник_ÑÑеда_ÑеÑвÑÑок_пеÑок_ÑабоÑа".split("_"),weekdaysShort:"нед_пон_вÑо_ÑÑе_ÑеÑ_пеÑ_Ñаб".split("_"),weekdaysMin:"нe_пo_вÑ_ÑÑ_Ñе_пе_Ña".split("_"),longDateFormat:{LT:"H:mm",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[ÐÐµÐ½ÐµÑ Ð²Ð¾] LT",nextDay:"[УÑÑе во] LT",nextWeek:"dddd [во] LT",lastDay:"[ÐÑеÑа во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Ðо изминаÑаÑа] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Ðо изминаÑиоÑ] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"поÑле %s",past:"пÑед %s",s:"Ð½ÐµÐºÐ¾Ð»ÐºÑ ÑекÑнди",m:"минÑÑа",mm:"%d минÑÑи",h:"ÑаÑ",hh:"%
2339d ÑаÑа",d:"ден",dd:"%d дена",M:"меÑеÑ",MM:"%d меÑеÑи",y:"година",yy:"%d години"},ordinal:function(a){var b=a%10,c=a%100;return 0===a?a+"-ев":0===c?a+"-ен":c>10&&20>c?a+"-Ñи":1===b?a+"-ви":2===b?a+"-Ñи":7===b||8===b?a+"-ми":a+"-Ñи"},week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){return a.defineLocale("ml",{months:"à´à´¨àµà´µà´°à´¿_à´«àµà´¬àµà´°àµà´µà´°à´¿_മാർà´àµà´àµ_à´à´ªàµà´°à´¿àµ½_à´®àµà´¯àµ_à´àµàµº_à´àµà´²àµ_à´à´à´¸àµà´±àµà´±àµ_à´¸àµà´ªàµà´±àµà´±à´à´¬àµ¼_à´à´àµà´àµà´¬àµ¼_നവà´à´¬àµ¼_à´¡à´¿à´¸à´à´¬àµ¼".split("_"),monthsShort:"à´à´¨àµ._à´«àµà´¬àµà´°àµ._മാർ._à´à´ªàµà´°à´¿._à´®àµà´¯àµ_à´àµàµº_à´àµà´²àµ._à´à´._à´¸àµà´ªàµà´±àµà´±._à´à´àµà´àµ._നവà´._à´¡à´¿à´¸à´.".split("_"),weekdays:"à´à´¾à´¯à´±à´¾à´´àµà´_തിà´àµà´à´³à´¾à´´àµà´_à´àµà´µàµà´µà´¾à´´àµà´_à´¬àµà´§à´¨à´¾à´´àµà´_à´µàµà´¯à´¾à´´à´¾à´´àµà´_à´µàµà´³àµà´³à´¿à´¯à´¾à´´àµà´_ശനിയാഴàµà´".split("_"),weekdaysShort:"à´à´¾à´¯àµ¼_തിà´àµà´àµ¾_à´àµà´µàµà´µ_à´¬àµà´§àµ»_à´µàµà´¯à´¾à´´à´_à´µàµà´³àµà´³à´¿_ശനി".split("_"),weekdaysMin:"à´à´¾_തി_à´àµ_à´¬àµ_à´µàµà´¯à´¾_à´µàµ_à´¶".split("_"),longDateFormat:{LT:"A h:mm -à´¨àµ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[à´à´¨àµà´¨àµ] LT",nextDay:"[നാളàµ] LT",nextWeek:"dddd, LT",lastDay:"[à´à´¨àµà´¨à´²àµ] LT",lastWeek:"[à´à´´à´¿à´àµà´] dddd, LT",sameElse:"L"},relativeTime:{future:"%s à´à´´à´¿à´àµà´àµ",past:"%s à´®àµàµ»à´ªàµ",s:"ഠൽപ നിമിഷà´àµà´àµ¾",m:"à´à´°àµ മിനിറàµà´±àµ",mm:"%d മിനിറàµà´±àµ",h:"à´à´°àµ മണിà´àµà´àµàµ¼",hh:"%d മണിà´àµà´àµàµ¼",d:"à´à´°àµ ദിവസà´",dd:"%d ദിവസà´",M:"à´à´°àµ മാസà´",MM:"%d മാസà´",y:"à´à´°àµ വർഷà´",yy:"%d വർഷà´"},meridiem:function(a){return 4>a?"രാതàµà´°à´¿":12>a?"രാവിലàµ":17>a?"à´à´àµà´ à´à´´à´¿à´àµà´àµ":20>a?"à´µàµà´àµà´¨àµà´¨àµà´°à´":"രാതàµà´°à´¿"}})}),function(a){a(tb)}(function(a){var b={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"à¥",8:"८",9:"९",0:"०"},c={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","à¥":"7","८":"8","९":"9","०":"0"};return a.defineLocale("mr",{months:"à¤à¤¾à¤¨à¥à¤µà¤¾à¤°à¥_फà¥à¤¬à¥à¤°à¥à¤µà¤¾à¤°à¥_मारà¥à¤_à¤à¤ªà¥à¤°à¤¿à¤²_मà¥_à¤à¥à¤¨_à¤à¥à¤²à¥_à¤à¤à¤¸à¥à¤_सपà¥à¤à¥à¤à¤¬à¤°_à¤à¤à¥à¤à¥à¤¬à¤°_नà¥à¤µà¥à¤¹à¥à¤à¤¬à¤°_डिसà¥à¤à¤¬à¤°".split("_"),monthsShort:"à¤à¤¾à¤¨à¥._फà¥à¤¬à¥à¤°à¥._मारà¥à¤._à¤à¤ªà¥à¤°à¤¿._मà¥._à¤à¥à¤¨._à¤à¥à¤²à¥._à¤à¤._सपà¥à¤à¥à¤._à¤à¤à¥à¤à¥._नà¥à¤µà¥à¤¹à¥à¤._डिसà¥à¤.".split("_"),weekdays:"रविवार_सà¥à¤®à¤µà¤¾à¤°_मà¤à¤à¤³à¤µà¤¾à¤°_बà¥à¤§à¤µà¤¾à¤°_à¤à¥à¤°à¥à¤µà¤¾à¤°_शà¥à¤à¥à¤°à¤µà¤¾à¤°_शनिवार".split("_"),weekdaysShort:"रवि_सà¥à¤®_मà¤à¤à¤³_बà¥à¤§_à¤à¥à¤°à¥_शà¥à¤à¥à¤°_शनि".split("_"),weekdaysMin:"र_सà¥_मà¤_बà¥_à¤à¥_शà¥_श".split("_"),longDateFormat:{LT:"A h:mm वाà¤à¤¤à¤¾",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[à¤à¤] LT",nextDay:"[à¤à¤¦à¥à¤¯à¤¾] LT",nextWeek:"dddd, LT",lastDay:"[à¤à¤¾à¤²] LT",lastWeek:"[माà¤à¥à¤²] dddd, LT",sameElse:"L"},relativeTime:{future:"%s नà¤à¤¤à¤°",past:"%s पà¥à¤°à¥à¤µà¥",s:"सà¥à¤à¤à¤¦",m:"à¤à¤ मिनिà¤",mm:"%d मिनिà¤à¥",h:"à¤à¤ तास",hh:"%d तास",d:"à¤à¤ दिवस",dd:"%d दिवस",M:"à¤à¤ महिना",MM:"%d महिनà¥",y:"à¤à¤ वरà¥à¤·",yy:"%d वरà¥à¤·à¥"},preparse:function(a){return a.replace(/[१२३४५६à¥à¥®à¥¯à¥¦]/g,function(a){return c[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return b[a]})},meridiem:function(a){return 4>a?"रातà¥à¤°à¥":10>a?"सà¤à¤¾à¤³à¥":17>a?"दà¥à¤ªà¤¾à¤°à¥":20>a?"सायà¤à¤à¤¾à¤³à¥":"रातà¥à¤°à¥"},week:{dow:0,doy:6}})}),function(a){a(tb)}(function(a){return a.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] LT",LLLL:"dddd, D MMMM YYYY [pukul] LT"},meridiem:function(a){return 11>a?"pagi":15>a?"tengahari":19>a?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){var b={1:"á",2:"á",3:"á",4:"á",5:"á ",6:"á",7:"á",8:"á",9:"á",0:"á"},c={"á":"1","á":"2","á":"3","á":"4","á ":"5","á":"6","á":"7","á":"8","á":"9","á":"0"}; 2340 return a.defineLocale("my",{months:"áááºááá«áá®_áá±áá±á¬áºáá«áá®_áááº_á§áá¼á®_áá±_áá½ááº_áá°ááá¯ááº_áá¼áá¯ááº_á ááºáááºáá¬_á¡á±á¬ááºááá¯áá¬_ááá¯áááºáá¬_áá®áááºáá¬".split("_"),monthsShort:"áááº_áá±_áááº_áá¼á®_áá±_áá½ááº_ááá¯ááº_áá¼_á ááº_á¡á±á¬ááº_ááá¯_áá®".split("_"),weekdays:"ááááºá¹ááá½á±_ááááºá¹áá¬_á¡ááºá¹áá«_áá¯áá¹ááá°á¸_áá¼á¬áááá±á¸_áá±á¬áá¼á¬_á áá±".split("_"),weekdaysShort:"áá½á±_áá¬_ááºá¹áá«_áá°á¸_áá¼á¬_áá±á¬_áá±".split("_"),weekdaysMin:"áá½á±_áá¬_ááºá¹áá«_áá°á¸_áá¼á¬_áá±á¬_áá±".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[ááá±.] LT [áá¾á¬]",nextDay:"[ááááºáá¼ááº] LT [áá¾á¬]",nextWeek:"dddd LT [áá¾á¬]",lastDay:"[ááá±.á] LT [áá¾á¬]",lastWeek:"[áá¼á®á¸áá²á·áá±á¬] dddd LT [áá¾á¬]",sameElse:"L"},relativeTime:{future:"áá¬áááºá· %s áá¾á¬",past:"áá½ááºáá²á·áá±á¬ %s á",s:"á áá¹áááº.á¡ááá
2340ºá¸áááº",m:"áá
áºáááá
áº",mm:"%d áááá
áº",h:"áá
áºáá¬áá®",hh:"%d áá¬áá®",d:"áá
áºáááº",dd:"%d áááº",M:"áá
áºá",MM:"%d á",y:"áá
áºáá¾á
áº",yy:"%d áá¾á
áº"},preparse:function(a){return a.replace(/[ááááá
ááááá]/g,function(a){return c[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return b[a]})},week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tirs_ons_tors_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"H.mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] LT",LLLL:"dddd D. MMMM YYYY [kl.] LT"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i gÃ¥r kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en mÃ¥ned",MM:"%d mÃ¥neder",y:"ett Ã¥r",yy:"%d Ã¥r"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){var b={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"à¥",8:"८",9:"९",0:"०"},c={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","à¥":"7","८":"8","९":"9","०":"0"};return a.defineLocale("ne",{months:"à¤à¤¨à¤µà¤°à¥_फà¥à¤¬à¥à¤°à¥à¤µà¤°à¥_मारà¥à¤_à¤
पà¥à¤°à¤¿à¤²_मà¤_à¤à¥à¤¨_à¤à¥à¤²à¤¾à¤_à¤
à¤à¤·à¥à¤_सà¥à¤ªà¥à¤à¥à¤®à¥à¤¬à¤°_à¤
à¤à¥à¤à¥à¤¬à¤°_नà¥à¤à¥à¤®à¥à¤¬à¤°_डिसà¥à¤®à¥à¤¬à¤°".split("_"),monthsShort:"à¤à¤¨._फà¥à¤¬à¥à¤°à¥._मारà¥à¤_à¤
पà¥à¤°à¤¿._मà¤_à¤à¥à¤¨_à¤à¥à¤²à¤¾à¤._à¤
à¤._सà¥à¤ªà¥à¤._à¤
à¤à¥à¤à¥._नà¥à¤à¥._डिसà¥.".split("_"),weekdays:"à¤à¤à¤¤à¤¬à¤¾à¤°_सà¥à¤®à¤¬à¤¾à¤°_मà¤à¥à¤à¤²à¤¬à¤¾à¤°_बà¥à¤§à¤¬à¤¾à¤°_बिहिबार_शà¥à¤à¥à¤°à¤¬à¤¾à¤°_शनिबार".split("_"),weekdaysShort:"à¤à¤à¤¤._सà¥à¤®._मà¤à¥à¤à¤²._बà¥à¤§._बिहि._शà¥à¤à¥à¤°._शनि.".split("_"),weekdaysMin:"à¤à¤._सà¥._मà¤à¥_बà¥._बि._शà¥._श.".split("_"),longDateFormat:{LT:"Aà¤à¥ h:mm बà¤à¥",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},preparse:function(a){return a.replace(/[१२३४५६à¥à¥®à¥¯à¥¦]/g,function(a){return c[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return b[a]})},meridiem:function(a){return 3>a?"रातà¥":10>a?"बिहान":15>a?"दिà¤à¤à¤¸à¥":18>a?"बà¥à¤²à¥à¤à¤¾":20>a?"साà¤à¤":"रातà¥"},calendar:{sameDay:"[à¤à¤] LT",nextDay:"[à¤à¥à¤²à¥] LT",nextWeek:"[à¤à¤à¤à¤¦à¥] dddd[,] LT",lastDay:"[हिà¤à¥] LT",lastWeek:"[à¤à¤à¤à¥] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s à¤
à¤à¤¾à¤¡à¥",s:"à¤à¥à¤¹à¥ समय",m:"à¤à¤ मिनà¥à¤",mm:"%d मिनà¥à¤",h:"à¤à¤ à¤à¤£à¥à¤à¤¾",hh:"%d à¤à¤£à¥à¤à¤¾",d:"à¤à¤ दिन",dd:"%d दिन",M:"à¤à¤ महिना",MM:"%d महिना",y:"à¤à¤ बरà¥à¤·",yy:"%d बरà¥à¤·"},week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){var b="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),c="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_");return a.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(a,d){return/-MMM-/.test(d)?c[a.month()]:b[a.month()]},weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinal:function(a){return a+(1===a||8===a||a>=20?"ste":"de")},week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_mÃ¥ndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mÃ¥n_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_mÃ¥_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I gÃ¥r klokka] LT",lastWeek:"[FøregÃ¥ande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s sidan",s:"nokre sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein mÃ¥nad",MM:"%d mÃ¥nader",y:"eit Ã¥r",yy:"%d Ã¥r"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){function b(a){return 5>a%10&&a%10>1&&~~(a/10)%10!==1}function c(a,c,d){var e=a+" ";switch(d){case"m":return c?"minuta":"minutÄ";case"mm":return e+(b(a)?"minuty":"minut");case"h":return c?"godzina":"godzinÄ";case"hh":return e+(b(a)?"godziny":"godzin");case"MM":return e+(b(a)?"miesiÄ
ce":"miesiÄcy");case"yy":return e+(b(a)?"lata":"lat")}}
2340var d="styczeÅ_luty_marzec_kwiecieÅ_maj_czerwiec_lipiec_sierpieÅ_wrzesieÅ_październik_listopad_grudzieÅ".split("_"),e="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_wrzeÅnia_października_listopada_grudnia".split("_");return a.defineLocale("pl",{months:function(a,b){return/D MMMM/.test(b)?e[a.month()]:d[a.month()]},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziaÅek_wtorek_Åroda_czwartek_piÄ
tek_sobota".split("_"),weekdaysShort:"nie_pon_wt_År_czw_pt_sb".split("_"),weekdaysMin:"N_Pn_Wt_År_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[DziÅ o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszÅÄ
niedzielÄ o] LT";case 3:return"[W zeszÅÄ
ÅrodÄ o] LT";case 6:return"[W zeszÅÄ
sobotÄ o] LT";default:return"[W zeszÅy] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:c,mm:c,h:c,hh:c,d:"1 dzieÅ",dd:"%d dni",M:"miesiÄ
c",MM:c,y:"rok",yy:c},ordinal:"%d.",week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"dom_2ª_3ª_4ª_5ª_6ª_sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [à s] LT",LLLL:"dddd, D [de] MMMM [de] YYYY [à s] LT"},calendar:{sameDay:"[Hoje à s] LT",nextDay:"[Amanhã à s] LT",nextWeek:"dddd [à s] LT",lastDay:"[Ontem à s] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Ãltimo] dddd [à s] LT":"[Ãltima] dddd [à s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:"%dº"})}),function(a){a(tb)}(function(a){return a.defineLocale("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"dom_2ª_3ª_4ª_5ª_6ª_sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY LT",LLLL:"dddd, D [de] MMMM [de] YYYY LT"},calendar:{sameDay:"[Hoje à s] LT",nextDay:"[Amanhã à s] LT",nextWeek:"dddd [à s] LT",lastDay:"[Ontem à s] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Ãltimo] dddd [à s] LT":"[Ãltima] dddd [à s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:"%dº",week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){function b(a,b,c){var d={mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"},e=" ";return(a%100>=20||a>=100&&a%100===0)&&(e=" de "),a+e+d[c]}return a.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),weekdays:"duminicÄ_luni_marÈi_miercuri_joi_vineri_sâmbÄtÄ".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmÄ",s:"câteva secunde",m:"un minut",mm:b,h:"o orÄ",hh:b,d:"o zi",dd:b,M:"o lunÄ",MM:b,y:"un an",yy:b},week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){function b(a,b){var c=a.split("_");return b%10===1&&b%100!==11?c[0]:b%10>=2&&4>=b%10&&(10>b%100||b%100>=20)?c[1]:c[2]}function c(a,c,d){var e={mm:c?"минÑÑа_минÑÑÑ_минÑÑ":"минÑÑÑ_минÑÑÑ_минÑÑ",hh:"ÑаÑ_ÑаÑа_ÑаÑов",dd:"денÑ_днÑ_дней",MM:"меÑÑÑ_меÑÑÑа_меÑÑÑев",yy:"год_года_леÑ"};return"m"===d?c?"минÑÑа":"минÑÑÑ":a+" "+b(e[d],+a)}function d(a,b){var c={nominative:"ÑнваÑÑ_ÑевÑалÑ_маÑÑ_апÑелÑ_май_иÑнÑ_иÑлÑ_авгÑÑÑ_ÑенÑÑбÑÑ_окÑÑбÑÑ_ноÑбÑÑ_декабÑÑ".split("_"),accusative:"ÑнваÑÑ_ÑевÑалÑ_маÑÑа_апÑелÑ_маÑ_иÑнÑ_иÑлÑ_авгÑÑÑа_ÑенÑÑбÑÑ_окÑÑбÑÑ_ноÑбÑÑ_декабÑÑ".split("_")},d=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(b)?"accusative":"nominative";return c[d][a.month()]}function e(a,b){var c={nominative:"Ñнв_Ñев_маÑ_апÑ_май_иÑнÑ_иÑлÑ_авг_Ñен_окÑ_ноÑ_дек".split("_"),accusative:"Ñнв_Ñев_маÑ_апÑ_маÑ_иÑнÑ_иÑлÑ_авг_Ñен_окÑ_ноÑ_дек".split("_")},d=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(b)?"accusative":"nominative";return c[d][a.month()]}function f(a,b){var c={nominative:"воÑкÑеÑенÑе_понеделÑник_вÑоÑник_ÑÑеда_ÑеÑвеÑг_пÑÑниÑа_ÑÑббоÑа".split("_"),accusative:"воÑкÑеÑенÑе_понеделÑник_вÑоÑник_ÑÑедÑ_ÑеÑвеÑг_пÑÑниÑÑ_ÑÑббоÑÑ".split("_")},d=/\[ ?[Ðв] ?(?:пÑоÑлÑÑ|ÑледÑÑÑÑÑ)? ?\] ?dddd/.test(b)?"accusative":"nominative";return c[d][a.day()]}return a.defineLocale("ru",{months:d,monthsShort:e,weekdays:f,weekdaysShort:"вÑ_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб".split("_"),weekdaysMin:"вÑ_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб".split("_"),monthsParse:[/^Ñнв/i,/^Ñев/i,/^маÑ/i,/^апÑ/i,/^ма[й|Ñ]/i,/^иÑн/i,/^иÑл/i,/^авг/i,/^Ñен/i,/^окÑ/i,/^ноÑ/i,/^дек/i],longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., LT",LLLL:"dddd, D MMMM YYYY г., LT"},calendar:{sameDay:"[Ð¡ÐµÐ³Ð¾Ð´Ð½Ñ Ð²] LT",nextDay:"[ÐавÑÑа в] LT",lastDay:"[ÐÑеÑа в] LT",nextWeek:function(){return 2===this.day()?"[Ðо] dddd [в] LT":"[Ð] dddd [в] LT"},lastWeek:function(){switch(this.day()){case 0:return"[РпÑоÑлое] dddd [в] LT";case 1:case 2:case 4:return"[РпÑоÑлÑй] dddd [в] LT";
2340case 3:case 5:case 6:return"[РпÑоÑлÑÑ] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"ÑеÑез %s",past:"%s назад",s:"неÑколÑко ÑекÑнд",m:c,mm:c,h:"ÑаÑ",hh:c,d:"денÑ",dd:c,M:"меÑÑÑ",MM:c,y:"год",yy:c},meridiemParse:/ноÑи|ÑÑÑа|днÑ|веÑеÑа/i,isPM:function(a){return/^(днÑ|веÑеÑа)$/.test(a)},meridiem:function(a){return 4>a?"ноÑи":12>a?"ÑÑÑа":17>a?"днÑ":"веÑеÑа"},ordinal:function(a,b){switch(b){case"M":case"d":case"DDD":return a+"-й";case"D":return a+"-го";case"w":case"W":return a+"-Ñ";default:return a}},week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){function b(a){return a>1&&5>a}function c(a,c,d,e){var f=a+" ";switch(d){case"s":return c||e?"pár sekúnd":"pár sekundami";case"m":return c?"minúta":e?"minútu":"minútou";case"mm":return c||e?f+(b(a)?"minúty":"minút"):f+"minútami";break;case"h":return c?"hodina":e?"hodinu":"hodinou";case"hh":return c||e?f+(b(a)?"hodiny":"hodÃn"):f+"hodinami";break;case"d":return c||e?"deÅ":"dÅom";case"dd":return c||e?f+(b(a)?"dni":"dnÃ"):f+"dÅami";break;case"M":return c||e?"mesiac":"mesiacom";case"MM":return c||e?f+(b(a)?"mesiace":"mesiacov"):f+"mesiacmi";break;case"y":return c||e?"rok":"rokom";case"yy":return c||e?f+(b(a)?"roky":"rokov"):f+"rokmi"}}var d="január_február_marec_aprÃl_máj_jún_júl_august_september_október_november_december".split("_"),e="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");return a.defineLocale("sk",{months:d,monthsShort:e,monthsParse:function(a,b){var c,d=[];for(c=0;12>c;c++)d[c]=new RegExp("^"+a[c]+"$|^"+b[c]+"$","i");return d}(d,e),weekdays:"nedeľa_pondelok_utorok_streda_Å¡tvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_Å¡t_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_Å¡t_pi_so".split("_"),longDateFormat:{LT:"H:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd D. MMMM YYYY LT"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo Å¡tvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[vÄera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:c,m:c,mm:c,h:c,hh:c,d:c,dd:c,M:c,MM:c,y:c,yy:c},ordinal:"%d.",week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){function b(a,b,c){var d=a+" ";switch(c){case"m":return b?"ena minuta":"eno minuto";case"mm":return d+=1===a?"minuta":2===a?"minuti":3===a||4===a?"minute":"minut";case"h":return b?"ena ura":"eno uro";case"hh":return d+=1===a?"ura":2===a?"uri":3===a||4===a?"ure":"ur";case"dd":return d+=1===a?"dan":"dni";case"MM":return d+=1===a?"mesec":2===a?"meseca":3===a||4===a?"mesece":"mesecev";case"yy":return d+=1===a?"leto":2===a?"leti":3===a||4===a?"leta":"let"}}return a.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),weekdays:"nedelja_ponedeljek_torek_sreda_Äetrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._Äet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_Äe_pe_so".split("_"),longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[vÄeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[prejÅ¡nja] dddd [ob] LT";case 1:case 2:case 4:case 5:return"[prejÅ¡nji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"Äez %s",past:"%s nazaj",s:"nekaj sekund",m:b,mm:b,h:b,hh:b,d:"en dan",dd:b,M:"en mesec",MM:b,y:"eno leto",yy:b},ordinal:"%d.",week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){return a.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),meridiem:function(a){return 12>a?"PD":"MD"},longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){var b={words:{m:["Ñедан минÑÑ","Ñедне минÑÑе"],mm:["минÑÑ","минÑÑе","минÑÑа"],h:["Ñедан ÑаÑ","Ñедног ÑаÑа"],hh:["ÑаÑ","ÑаÑа","ÑаÑи"],dd:["дан","дана","дана"],MM:["меÑеÑ","меÑеÑа","меÑеÑи"],yy:["година","године","година"]},correctGrammaticalCase:function(a,b){return 1===a?b[0]:a>=2&&4>=a?b[1]:b[2]},translate:function(a,c,d){var e=b.words[d];return 1===d.length?c?e[0]:e[1]:a+" "+b.correctGrammaticalCase(a,e)}};return a.defineLocale("sr-cyrl",{months:["ÑанÑаÑ","ÑебÑÑаÑ","маÑÑ","апÑил","маÑ","ÑÑн","ÑÑл","авгÑÑÑ","ÑепÑембаÑ","окÑобаÑ","новембаÑ","деÑембаÑ"],monthsShort:["Ñан.","Ñеб.","маÑ.","апÑ.","маÑ","ÑÑн","ÑÑл","авг.","Ñеп.","окÑ.","нов.","деÑ."],weekdays:["недеÑа","понедеÑак","ÑÑоÑак","ÑÑеда","ÑеÑвÑÑак","пеÑак","ÑÑбоÑа"],weekdaysShort:["нед.","пон.","ÑÑо.","ÑÑе.","ÑеÑ.","пеÑ.","ÑÑб."],weekdaysMin:["не","по","ÑÑ","ÑÑ","Ñе","пе","ÑÑ"],longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Ð´Ð°Ð½Ð°Ñ Ñ] LT",nextDay:"[ÑÑÑÑа Ñ] LT",nextWeek:function(){switch(this.day()){case 0:return"[Ñ] [недеÑÑ] [Ñ] LT";case 3:return"[Ñ] [ÑÑедÑ] [Ñ] LT";case 6:return"[Ñ] [ÑÑбоÑÑ] [Ñ] LT";case 1:case 2:case 4:case 5:return"[Ñ] dddd [Ñ] LT"}},lastDay:"[ÑÑÑе Ñ] LT",lastWeek:function(){var a=["[пÑоÑле] [недеÑе] [Ñ] LT","[пÑоÑлог] [понедеÑка] [Ñ] LT","[пÑоÑлог] [ÑÑоÑка] [Ñ] LT","[пÑоÑле] [ÑÑеде] [Ñ] LT","[пÑоÑлог] [ÑеÑвÑÑка] [Ñ] LT","[пÑоÑлог] [пеÑка] [Ñ] LT","[пÑоÑле] [ÑÑбоÑе] [Ñ] LT"];return a[this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пÑе %s",s:"неколико ÑекÑнди",m:b.translate,mm:b.translate,h:b.translate,hh:b.translate,d:"дан",dd:b.translate,M:"меÑеÑ",MM:b.translate,y:"годинÑ",yy:b.translate},ordinal:"%d.",week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){var b={words:{m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(a,b){return 1===a?b[0]:a>=2&&4>=a?b[1]:b[2]},translate:function(a,c,d){var e=b.words[d];return 1===d.length?c?e[0]:e[1]:a+" "+b.correctGrammaticalCase(a,e)}};return a.defineLocale("sr",{months:["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar"],monthsShort:["jan.","feb.","mar.","apr.","maj","jun","jul","avg.","sep.","okt.","nov.","dec."],weekdays:["nedelja","ponedeljak","utorak","sreda","Äetvrtak","petak","
2340subota"],weekdaysShort:["ned.","pon.","uto.","sre.","Äet.","pet.","sub."],weekdaysMin:["ne","po","ut","sr","Äe","pe","su"],longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juÄe u] LT",lastWeek:function(){var a=["[proÅ¡le] [nedelje] [u] LT","[proÅ¡log] [ponedeljka] [u] LT","[proÅ¡log] [utorka] [u] LT","[proÅ¡le] [srede] [u] LT","[proÅ¡log] [Äetvrtka] [u] LT","[proÅ¡log] [petka] [u] LT","[proÅ¡le] [subote] [u] LT"];return a[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",m:b.translate,mm:b.translate,h:b.translate,hh:b.translate,d:"dan",dd:b.translate,M:"mesec",MM:b.translate,y:"godinu",yy:b.translate},ordinal:"%d.",week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){return a.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_mÃ¥ndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mÃ¥n_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_mÃ¥_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[IgÃ¥r] LT",nextWeek:"dddd LT",lastWeek:"[Förra] dddd[en] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"nÃ¥gra sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en mÃ¥nad",MM:"%d mÃ¥nader",y:"ett Ã¥r",yy:"%d Ã¥r"},ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"e":1===b?"a":2===b?"a":3===b?"e":"e";return a+c},week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("ta",{months:"à®à®©à®µà®°à®¿_பிபà¯à®°à®µà®°à®¿_மாரà¯à®à¯_à®à®ªà¯à®°à®²à¯_à®®à¯_à®à¯à®©à¯_à®à¯à®²à¯_à®à®à®¸à¯à®à¯_à®à¯à®ªà¯à®à¯à®®à¯à®ªà®°à¯_à®
à®à¯à®à¯à®¾à®ªà®°à¯_நவமà¯à®ªà®°à¯_à®à®¿à®à®®à¯à®ªà®°à¯".split("_"),monthsShort:"à®à®©à®µà®°à®¿_பிபà¯à®°à®µà®°à®¿_மாரà¯à®à¯_à®à®ªà¯à®°à®²à¯_à®®à¯_à®à¯à®©à¯_à®à¯à®²à¯_à®à®à®¸à¯à®à¯_à®à¯à®ªà¯à®à¯à®®à¯à®ªà®°à¯_à®
à®à¯à®à¯à®¾à®ªà®°à¯_நவமà¯à®ªà®°à¯_à®à®¿à®à®®à¯à®ªà®°à¯".split("_"),weekdays:"à®à®¾à®¯à®¿à®±à¯à®±à¯à®à¯à®à®¿à®´à®®à¯_திà®à¯à®à®à¯à®à®¿à®´à®®à¯_à®à¯à®µà¯à®µà®¾à®¯à¯à®à®¿à®´à®®à¯_பà¯à®¤à®©à¯à®à®¿à®´à®®à¯_வியாழà®à¯à®à®¿à®´à®®à¯_வà¯à®³à¯à®³à®¿à®à¯à®à®¿à®´à®®à¯_à®à®©à®¿à®à¯à®à®¿à®´à®®à¯".split("_"),weekdaysShort:"à®à®¾à®¯à®¿à®±à¯_திà®à¯à®à®³à¯_à®à¯à®µà¯à®µà®¾à®¯à¯_பà¯à®¤à®©à¯_வியாழனà¯_வà¯à®³à¯à®³à®¿_à®à®©à®¿".split("_"),weekdaysMin:"à®à®¾_தி_à®à¯_பà¯_வி_வà¯_à®".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[à®à®©à¯à®±à¯] LT",nextDay:"[நாளà¯] LT",nextWeek:"dddd, LT",lastDay:"[நà¯à®±à¯à®±à¯] LT",lastWeek:"[à®à®à®¨à¯à®¤ வாரமà¯] dddd, LT",sameElse:"L"},relativeTime:{future:"%s à®à®²à¯",past:"%s à®®à¯à®©à¯",s:"à®à®°à¯ à®à®¿à®² விநாà®à®¿à®à®³à¯",m:"à®à®°à¯ நிமிà®à®®à¯",mm:"%d நிமிà®à®à¯à®à®³à¯",h:"à®à®°à¯ மணி நà¯à®°à®®à¯",hh:"%d மணி நà¯à®°à®®à¯",d:"à®à®°à¯ நாளà¯",dd:"%d நாà®à¯à®à®³à¯",M:"à®à®°à¯ மாதமà¯",MM:"%d மாதà®à¯à®à®³à¯",y:"à®à®°à¯ வரà¯à®à®®à¯",yy:"%d à®à®£à¯à®à¯à®à®³à¯"},ordinal:function(a){return a+"வதà¯"},meridiem:function(a){return a>=6&&10>=a?" à®à®¾à®²à¯":a>=10&&14>=a?" நணà¯à®ªà®à®²à¯":a>=14&&18>=a?" à®à®±à¯à®ªà®¾à®à¯":a>=18&&20>=a?" மாலà¯":a>=20&&24>=a?" à®à®°à®µà¯":a>=0&&6>=a?" வà¯à®à®±à¯":void 0},week:{dow:0,doy:6}})}),function(a){a(tb)}(function(a){return a.defineLocale("th",{months:"มà¸à¸£à¸²à¸à¸¡_à¸à¸¸à¸¡à¸ าà¸à¸±à¸à¸à¹_มีà¸à¸²à¸à¸¡_à¹à¸¡à¸©à¸²à¸¢à¸_à¸à¸¤à¸©à¸ าà¸à¸¡_มิà¸à¸¸à¸à¸²à¸¢à¸_à¸à¸£à¸à¸à¸²à¸à¸¡_สิà¸à¸«à¸²à¸à¸¡_à¸à¸±à¸à¸¢à¸²à¸¢à¸_à¸à¸¸à¸¥à¸²à¸à¸¡_à¸à¸¤à¸¨à¸à¸´à¸à¸²à¸¢à¸_à¸à¸±à¸à¸§à¸²à¸à¸¡".split("_"),monthsShort:"มà¸
2340รา_à¸à¸¸à¸¡à¸ า_มีà¸à¸²_à¹à¸¡à¸©à¸²_à¸à¸¤à¸©à¸ า_มิà¸à¸¸à¸à¸²_à¸à¸£à¸à¸à¸²_สิà¸à¸«à¸²_à¸à¸±à¸à¸¢à¸²_à¸à¸¸à¸¥à¸²_à¸à¸¤à¸¨à¸à¸´à¸à¸²_à¸à¸±à¸à¸§à¸²".split("_"),weekdays:"à¸à¸²à¸à¸´à¸à¸¢à¹_à¸à¸±à¸à¸à¸£à¹_à¸à¸±à¸à¸à¸²à¸£_à¸à¸¸à¸_à¸à¸¤à¸«à¸±à¸ªà¸à¸à¸µ_ศุà¸à¸£à¹_à¹à¸ªà¸²à¸£à¹".split("_"),weekdaysShort:"à¸à¸²à¸à¸´à¸à¸¢à¹_à¸à¸±à¸à¸à¸£à¹_à¸à¸±à¸à¸à¸²à¸£_à¸à¸¸à¸_à¸à¸¤à¸«à¸±à¸ª_ศุà¸à¸£à¹_à¹à¸ªà¸²à¸£à¹".split("_"),weekdaysMin:"à¸à¸²._à¸._à¸._à¸._à¸à¸¤._ศ._ส.".split("_"),longDateFormat:{LT:"H à¸à¸²à¸¬à¸´à¸à¸² m à¸à¸²à¸à¸µ",L:"YYYY/MM/DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY à¹à¸§à¸¥à¸² LT",LLLL:"วัà¸ddddà¸à¸µà¹ D MMMM YYYY à¹à¸§à¸¥à¸² LT"},meridiem:function(a){return 12>a?"à¸à¹à¸à¸à¹à¸à¸µà¹à¸¢à¸":"หลัà¸à¹à¸à¸µà¹à¸¢à¸"},calendar:{sameDay:"[วัà¸à¸à¸µà¹ à¹à¸§à¸¥à¸²] LT",nextDay:"[à¸à¸£à¸¸à¹à¸à¸à¸µà¹ à¹à¸§à¸¥à¸²] LT",nextWeek:"dddd[หà¸à¹à¸² à¹à¸§à¸¥à¸²] LT",lastDay:"[à¹à¸¡à¸·à¹à¸à¸§à¸²à¸à¸à¸µà¹ à¹à¸§à¸¥à¸²] LT",lastWeek:"[วัà¸]dddd[à¸à¸µà¹à¹à¸¥à¹à¸§ à¹à¸§à¸¥à¸²] LT",sameElse:"L"},relativeTime:{future:"à¸à¸µà¸ %s",past:"%sà¸à¸µà¹à¹à¸¥à¹à¸§",s:"à¹à¸¡à¹à¸à¸µà¹à¸§à¸´à¸à¸²à¸à¸µ",m:"1 à¸à¸²à¸à¸µ",mm:"%d à¸à¸²à¸à¸µ",h:"1 à¸à¸±à¹à¸§à¹à¸¡à¸",hh:"%d à¸à¸±à¹à¸§à¹à¸¡à¸",d:"1 วัà¸",dd:"%d วัà¸",M:"1 à¹à¸à¸·à¸à¸",MM:"%d à¹à¸à¸·à¸à¸",y:"1 à¸à¸µ",yy:"%d à¸à¸µ"}})}),function(a){a(tb)}(function(a){return a.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM DD, YYYY LT"},calendar:{sameDay:"[Ngayon sa] LT",nextDay:"[Bukas sa] LT",nextWeek:"dddd [sa] LT",lastDay:"[Kahapon sa] LT",lastWeek:"dddd [huling linggo] LT",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},ordinal:function(a){return a},week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){var b={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};return a.defineLocale("tr",{months:"Ocak_Åubat_Mart_Nisan_Mayıs_Haziran_Temmuz_AÄustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Åub_Mar_Nis_May_Haz_Tem_AÄu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_ÃarÅamba_PerÅembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Ãar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ãa_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(a){if(0===a)return a+"'ıncı";var c=a%10,d=a%100-c,e=a>=100?100:null;return a+(b[c]||b[d]||b[e])},week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){return a.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibr
2340ir_mayyw_ywnyw_ywlywz_É£wÅ¡t_Å¡wtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_É£wÅ¡t_Å¡wtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiá¸yas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiá¸yas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiá¸yas".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",m:"minuá¸",mm:"%d minuá¸",h:"saÉa",hh:"%d tassaÉin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}),function(a){a(tb)}(function(a){return a.defineLocale("tzm",{months:"âµâµâµâ´°âµ¢âµ_â´±âµâ´°âµ¢âµ_âµâ´°âµâµ_âµâ´±âµâµâµ_âµâ´°âµ¢âµ¢âµ_âµ¢âµâµâµ¢âµ_âµ¢âµâµâµ¢âµâµ£_âµâµâµâµ_âµâµâµâ´°âµâ´±âµâµ_â´½âµâµâ´±âµ_âµâµâµ¡â´°âµâ´±âµâµ_â´·âµâµâµâ´±âµâµ".split("_"),monthsShort:"âµâµâµâ´°âµ¢âµ_â´±âµâ´°âµ¢âµ_âµâ´°âµâµ_âµâ´±âµâµâµ_âµâ´°âµ¢âµ¢âµ_âµ¢âµâµâµ¢âµ_âµ¢âµâµâµ¢âµâµ£_âµâµâµâµ_âµâµâµâ´°âµâ´±âµâµ_â´½âµâµâ´±âµ_âµâµâµ¡â´°âµâ´±âµâµ_â´·âµâµâµâ´±âµâµ".split("_"),weekdays:"â´°âµâ´°âµâ´°âµ_â´°âµ¢âµâ´°âµ_â´°âµâµâµâ´°âµ_â´°â´½âµâ´°âµ_ⴰⴽⵡⴰâµ_â´°âµâµâµâµ¡â´°âµ_â´°âµâµâ´¹âµ¢â´°âµ".split("_"),weekdaysShort:"â´°âµâ´°âµâ´°âµ_â´°âµ¢âµâ´°âµ_â´°âµâµâµâ´°âµ_â´°â´½âµâ´°âµ_ⴰⴽⵡⴰâµ_â´°âµâµâµâµ¡â´°âµ_â´°âµâµâ´¹âµ¢â´°âµ".split("_"),weekdaysMin:"â´°âµâ´°âµâ´°âµ_â´°âµ¢âµâ´°âµ_â´°âµâµâµâ´°âµ_â´°â´½âµâ´°âµ_ⴰⴽⵡⴰâµ_â´°âµâµâµâµ¡â´°âµ_â´°âµâµâ´¹âµ¢â´°âµ".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[â´°âµâ´·âµ
â´´] LT",nextDay:"[â´°âµâ´½â´° â´´] LT",nextWeek:"dddd [â´´] LT",lastDay:"[â´°âµâ´°âµâµ â´´] LT",lastWeek:"dddd [â´´] LT",sameElse:"L"},relativeTime:{future:"â´·â´°â´·âµ
ⵠⵢⴰⵠ%s",past:"ⵢⴰⵠ%s",s:"âµâµâµâ´½",m:"âµâµâµâµâ´º",mm:"%d âµâµâµâµâ´º",h:"âµâ´°âµâ´°",hh:"%d âµâ´°âµâµâ´°âµâµâµ",d:"â´°âµâµ",dd:"%d oâµâµâ´°âµ",M:"â´°âµ¢oâµâµ",MM:"%d âµâµ¢âµ¢âµâµâµ",y:"â´°âµâ´³â´°âµ",yy:"%d âµâµâ´³â´°âµâµ"},week:{dow:6,doy:12}})}),function(a){a(tb)}(function(a){function b(a,b){var c=a.split("_");return b%10===1&&b%100!==11?c[0]:b%10>=2&&4>=b%10&&(10>b%100||b%100>=20)?c[1]:c[2]}function c(a,c,d){var e={mm:"Ñ
вилина_Ñ
вилини_Ñ
вилин",hh:"година_години_годин",dd:"денÑ_днÑ_днÑв",MM:"мÑÑÑÑÑ_мÑÑÑÑÑ_мÑÑÑÑÑв",yy:"ÑÑк_Ñоки_ÑокÑв"};return"m"===d?c?"Ñ
вилина":"Ñ
вилинÑ":"h"===d?c?"година":"годинÑ":a+" "+b(e[d],+a)}function d(a,b){var c={nominative:"ÑÑÑенÑ_лÑÑий_беÑезенÑ_квÑÑенÑ_ÑÑавенÑ_ÑеÑвенÑ_липенÑ_ÑеÑпенÑ_веÑеÑенÑ_жовÑенÑ_лиÑÑопад_гÑÑденÑ".split("_"),accusative:"ÑÑÑнÑ_лÑÑого_беÑезнÑ_квÑÑнÑ_ÑÑавнÑ_ÑеÑвнÑ_липнÑ_ÑеÑпнÑ_веÑеÑнÑ_жовÑнÑ_лиÑÑопада_гÑÑднÑ".split("_")},d=/D[oD]? *MMMM?/.test(b)?"accusative":"nominative";return c[d][a.month()]}function e(a,b){var c={nominative:"недÑлÑ_понедÑлок_вÑвÑоÑок_ÑеÑеда_ÑеÑвеÑ_пâÑÑниÑÑ_ÑÑбоÑа".split("_"),accusative:"недÑлÑ_понедÑлок_вÑвÑоÑок_ÑеÑедÑ_ÑеÑвеÑ_пâÑÑниÑÑ_ÑÑбоÑÑ".split("_"),genitive:"недÑлÑ_понедÑлка_вÑвÑоÑка_ÑеÑеди_ÑеÑвеÑга_пâÑÑниÑÑ_ÑÑбоÑи".split("_")},d=/(\[[ÐвУÑ]\]) ?dddd/.test(b)?"accusative":/\[?(?:минÑлоÑ|наÑÑÑпноÑ)? ?\] ?dddd/.test(b)?"genitive":"nominative";return c[d][a.day()]}function f(a){return function(){return a+"о"+(11===this.hours()?"б":"")+"] LT"}}return a.defineLocale("uk",{months:d,monthsShort:"ÑÑÑ_лÑÑ_беÑ_квÑÑ_ÑÑав_ÑеÑв_лип_ÑеÑп_веÑ_жовÑ_лиÑÑ_гÑÑд".split("_"),weekdays:e,weekdaysShort:"нд_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб".split("_"),weekdaysMin:"нд_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY Ñ.",LLL:"D MMMM YYYY Ñ., LT",LLLL:"dddd, D MMMM YYYY Ñ., LT"},calendar:{sameDay:f("[СÑÐ¾Ð³Ð¾Ð´Ð½Ñ "),nextDay:f("[ÐавÑÑа "),lastDay:f("[ÐÑоÑа "),nextWeek:f("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case
23406:return f("[ÐинÑлоÑ] dddd [").call(this);case 1:case 2:case 4:return f("[ÐинÑлого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s ÑомÑ",s:"декÑлÑка ÑекÑнд",m:c,mm:c,h:"годинÑ",hh:c,d:"денÑ",dd:c,M:"мÑÑÑÑÑ",MM:c,y:"ÑÑк",yy:c},meridiem:function(a){return 4>a?"ноÑÑ":12>a?"ÑанкÑ":17>a?"днÑ":"веÑоÑа"},ordinal:function(a,b){switch(b){case"M":case"d":case"DDD":case"w":case"W":return a+"-й";case"D":return a+"-го";default:return a}},week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){return a.defineLocale("uz",{months:"ÑнваÑÑ_ÑевÑалÑ_маÑÑ_апÑелÑ_май_иÑнÑ_иÑлÑ_авгÑÑÑ_ÑенÑÑбÑÑ_окÑÑбÑÑ_ноÑбÑÑ_декабÑÑ".split("_"),monthsShort:"Ñнв_Ñев_маÑ_апÑ_май_иÑн_иÑл_авг_Ñен_окÑ_ноÑ_дек".split("_"),weekdays:"ЯкÑанба_ÐÑÑанба_СеÑанба_ЧоÑÑанба_ÐайÑанба_ÐÑма_Шанба".split("_"),weekdaysShort:"ЯкÑ_ÐÑÑ_СеÑ_ЧоÑ_Ðай_ÐÑм_Шан".split("_"),weekdaysMin:"Як_ÐÑ_Се_Чо_Ðа_ÐÑ_Ша".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"D MMMM YYYY, dddd LT"},calendar:{sameDay:"[ÐÑгÑн ÑоаÑ] LT [да]",nextDay:"[ÐÑÑага] LT [да]",nextWeek:"dddd [кÑни ÑоаÑ] LT [да]",lastDay:"[ÐеÑа ÑоаÑ] LT [да]",lastWeek:"[УÑган] dddd [кÑни ÑоаÑ] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s иÑида",past:"ÐÐ¸Ñ Ð½ÐµÑа %s олдин",s:"ÑÑÑÑаÑ",m:"Ð±Ð¸Ñ Ð´Ð°ÐºÐ¸ÐºÐ°",mm:"%d дакика",h:"Ð±Ð¸Ñ ÑоаÑ",hh:"%d ÑоаÑ",d:"Ð±Ð¸Ñ ÐºÑн",dd:"%d кÑн",M:"Ð±Ð¸Ñ Ð¾Ð¹",MM:"%d ой",y:"Ð±Ð¸Ñ Ð¹Ð¸Ð»",yy:"%d йил"},week:{dow:1,doy:7}})}),function(a){a(tb)}(function(a){return a.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),weekdays:"chá»§ nháºt_thứ hai_thứ ba_thứ tư_thứ nÄm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM [nÄm] YYYY",LLL:"D MMMM [nÄm] YYYY LT",LLLL:"dddd, D MMMM [nÄm] YYYY LT",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY LT",llll:"ddd, D MMM YYYY LT"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngà y mai lúc] LT",nextWeek:"dddd [tuần tá»i lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rá»i lúc] LT",sameElse:"L"},relativeTime:{future:"%s tá»i",past:"%s trưá»c",s:"và i giây",m:"má»t phút",mm:"%d phút",h:"má»t giá»",hh:"%d giá»",d:"má»t ngà y",dd:"%d ngà y",M:"má»t tháng",MM:"%d tháng",y:"má»t nÄm",yy:"%d nÄm"},ordinal:function(a){return a},week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("zh-cn",{months:"䏿_äºæ_䏿_åæ_äºæ_å æ_䏿_å «æ_乿_åæ_å䏿_åäºæ".split("_"),monthsShort:"1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ".split("_"),weekdays:"æææ¥_ææä¸_ææäº_ææä¸_ææå_ææäº_ææå ".split("_"),weekdaysShort:"卿¥_å¨ä¸_å¨äº_å¨ä¸_å¨å_å¨äº_å¨å ".split("_"),weekdaysMin:"æ¥_ä¸_äº_ä¸_å_äº_å ".split("_"),longDateFormat:{LT:"Ahç¹mm",L:"YYYY-MM-DD",LL:"YYYYå¹´MMMDæ¥",LLL:"YYYYå¹´MMMDæ¥LT",LLLL:"YYYYå¹´MMMDæ¥ddddLT",l:"YYYY-MM-DD",ll:"YYYYå¹´MMMDæ¥",lll:"YYYYå¹´MMMDæ¥LT",llll:"YYYYå¹´MMMDæ¥ddddLT"},meridiem:function(a,b){var c=100*a+b; 2341 return 600>c?"忍":900>c?"æ©ä¸":1130>c?"ä¸å":1230>c?"ä¸å":1800>c?"ä¸å":"æä¸"},calendar:{sameDay:function(){return 0===this.minutes()?"[ä»å¤©]Ah[ç¹æ´]":"[ä»å¤©]LT"},nextDay:function(){return 0===this.minutes()?"[æå¤©]Ah[ç¹æ´]":"[æå¤©]LT"},lastDay:function(){return 0===this.minutes()?"[æ¨å¤©]Ah[ç¹æ´]":"[æ¨å¤©]LT"},nextWeek:function(){var b,c;return b=a().startOf("week"),c=this.unix()-b.unix()>=604800?"[ä¸]":"[æ¬]",0===this.minutes()?c+"dddAhç¹æ´":c+"dddAhç¹mm"},lastWeek:function(){var b,c;return b=a().startOf("week"),c=this.unix()<b.unix()?"[ä¸]":"[æ¬]",0===this.minutes()?c+"dddAhç¹æ´":c+"dddAhç¹mm"},sameElse:"LL"},ordinal:function(a,b){switch(b){case"d":case"D":case"DDD":return a+"æ¥";case"M":return a+"æ";case"w":case"W":return a+"å¨";default:return a}},relativeTime:{future:"%så ",past:"%så",s:"å ç§",m:"1åé",mm:"%dåé",h:"1å°æ¶",hh:"%då°æ¶",d:"1天",dd:"%d天",M:"1个æ",MM:"%d个æ",y:"1å¹´",yy:"%då¹´"},week:{dow:1,doy:4}})}),function(a){a(tb)}(function(a){return a.defineLocale("zh-tw",{months:"䏿_äºæ_䏿_åæ_äºæ_å æ_䏿_å «æ_乿_åæ_å䏿_åäºæ".split("_"),monthsShort:"1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ".split("_"),weekdays:"æææ¥_ææä¸_ææäº_ææä¸_ææå_ææäº_ææå ".split("_"),weekdaysShort:"鱿¥_é±ä¸_é±äº_é±ä¸_é±å_é±äº_é±å ".split("_"),weekdaysMin:"æ¥_ä¸_äº_ä¸_å_äº_å ".split("_"),longDateFormat:{LT:"Ahé»mm",L:"YYYYå¹´MMMDæ¥",LL:"YYYYå¹´MMMDæ¥",LLL:"YYYYå¹´MMMDæ¥LT",LLLL:"YYYYå¹´MMMDæ¥ddddLT",l:"YYYYå¹´MMMDæ¥",ll:"YYYYå¹´MMMDæ¥",lll:"YYYYå¹´MMMDæ¥LT",llll:"YYYYå¹´MMMDæ¥ddddLT"},meridiem:function(a,b){var c=100*a+b;return 900>c?"æ©ä¸":1130>c?"ä¸å":1230>c?"ä¸å":1800>c?"ä¸å":"æä¸"},calendar:{sameDay:"[ä»å¤©]LT",nextDay:"[æå¤©]LT",nextWeek:"[ä¸]ddddLT",lastDay:"[æ¨å¤©]LT",lastWeek:"[ä¸]ddddLT",sameElse:"L"},ordinal:function(a,b){switch(b){case"d":case"D":case"DDD":return a+"æ¥";case"M":return a+"æ";case"w":case"W":return a+"é±";default:return a}},relativeTime:{future:"%så §",past:"%så",s:"å¹¾ç§",m:"ä¸åé",mm:"%dåé",h:"ä¸å°æ",hh:"%
2341då°æ",d:"ä¸å¤©",dd:"%d天",M:"ä¸åæ",MM:"%dåæ",y:"ä¸å¹´",yy:"%då¹´"}})}),tb.locale("en"),Jb?module.exports=tb:"function"==typeof define&&define.amd?(define("moment",function(a,b,c){return c.config&&c.config()&&c.config().noGlobal===!0&&(xb.moment=ub),tb}),sb(!0)):sb()}).call(this); 2342/** 2343 * @license 2344 * lodash 3.7.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE 2345 * Build: `lodash include="template"` 2346 */ 2347;(function(){function t(t){return typeof t=="function"||false}function n(t){return typeof t=="string"?t:null==t?"":t+""}function r(t){return z[t]}function e(t){return"\\"+H[t]}function o(t){return!!t&&typeof t=="object"}function u(){}function c(t,n,r,e){return t!==S&&rt.call(e,r)?t:n}function a(t,n,r){var e=Ot(n);ct.apply(e,vt(n));for(var o=-1,u=e.length;++o<u;){var c=e[o],a=t[c],i=r(a,n[c],c,t,n);(i===i?i===a:a!==a)&&(a!==S||c in t)||(t[c]=i)}return t}function i(t,n,r){r||(r={});for(var e=-1,o=n.length;++e<o;){ 2348var u=n[e];r[u]=t[u]}return r}function l(t,n){for(var r=-1,e=n.length,o=Array(e);++r<e;)o[r]=t[n[r]];return o}function s(t,n){return t=+t,n=null==n?yt:n,-1<t&&0==t%1&&t<n}function p(t,n,r){if(!j(r))return false;var e=typeof n;return"number"==e?(e=jt(r),e=f(e)&&s(n,e)):e="string"==e&&n in r,e?(n=r[n],t===t?t===n:n!==n):false}function f(t){return typeof t=="number"&&-1<t&&0==t%1&&t<=yt}function g(t){for(var n=E(t),r=n.length,e=r&&t.length,o=u.support,o=e&&f(e)&&(_t(t)||o.nonEnumStrings&&_(t)||o.nonEnumArgs&&h(t)),c=-1,a=[];++c<r;){ 2349var i=n[c];(o&&s(i,e)||rt.call(t,i))&&a.push(i)}return a}function y(t){if(u.support.unindexedChars&&_(t)){for(var n=-1,r=t.length,e=Object(t);++n<r;)e[n]=t.charAt(n);return e}return j(t)?t:Object(t)}function b(t,n){if(typeof t!="function")throw new TypeError(d);return n=gt(n===S?t.length-1:+n||0,0),function(){for(var r=arguments,e=-1,o=gt(r.length-n,0),u=Array(o);++e<o;)u[e]=r[n+e];switch(n){case 0:return t.call(this,u);case 1:return t.call(this,r[0],u);case 2:return t.call(this,r[0],r[1],u)}for(o=Array(n+1), 2350e=-1;++e<n;)o[e]=r[e];return o[n]=u,t.apply(this,o)}}function h(t){return f(o(t)?t.length:S)&&et.call(t)==w}function m(t){return o(t)&&typeof t.message=="string"&&et.call(t)==A}function j(t){var n=typeof t;return"function"==n||!!t&&"object"==n}function v(t){return null==t?false:et.call(t)==P?ot.test(nt.call(t)):o(t)&&(X(t)?ot:M).test(t)}function _(t){return typeof t=="string"||o(t)&&et.call(t)==$}function E(t){if(null==t)return[];j(t)||(t=Object(t));for(var n=t.length,r=u.support,n=n&&f(n)&&(_t(t)||r.nonEnumStrings&&_(t)||r.nonEnumArgs&&h(t))&&n||0,e=t.constructor,o=-1,e=Et(e)&&e.prototype||Z,c=e===t,a=Array(n),i=0<n,l=r.enumErrorProps&&(t===Y||t instanceof Error),p=r.enumPrototypes&&Et(t);++o<n;)a[o]=o+""; 2351 2352for(var g in t)p&&"prototype"==g||l&&("message"==g||"name"==g)||i&&s(g,n)||"constructor"==g&&(c||!rt.call(t,g))||a.push(g);if(r.nonEnumShadows&&t!==Z)for(n=t===tt?$:t===Y?A:et.call(t),r=bt[n]||bt[R],n==R&&(e=Z),n=V.length;n--;)g=V[n],o=r[g],c&&o||(o?!rt.call(t,g):t[g]===e[g])||a.push(g);return a}function O(t){return(t=n(t))&&C.test(t)?t.replace(k,"\\$&"):t}function x(t){return function(){return t}}var S,d="Expected a function",w="[object Arguments]",A="[object Error]",P="[object Function]",R="[object Object]",$="[object String]",F=/\b__p\+='';/g,L=/\b(__p\+=)''\+/g,T=/(__e\(.*?\)|\b__t\))\+'';/g,I=/[&<>"'`]/g,N=RegExp(I.source),U=/<%=([\s\S]+?)%>/g,k=/[.*+?^${}()|[\]\/\\]/g,C=RegExp(k.source),D=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,M=/^\[object .+?Constructor\]$/,q=/($^)/,B=/['\n\r\u2028\u2029\\]/g,V="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),z={ 2353"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},G={"function":true,object:true},H={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},J=G[typeof exports]&&exports&&!exports.nodeType&&exports,K=G[typeof module]&&module&&!module.nodeType&&module,Q=G[typeof self]&&self&&self.Object&&self,W=G[typeof window]&&window&&window.Object&&window,G=K&&K.exports===J&&J,Q=J&&K&&typeof global=="object"&&global&&global.Object&&global||W!==(this&&this.window)&&W||Q||this,X=function(){ 2354try{Object({toString:0}+"")}catch(t){return function(){return false}}return function(t){return typeof t.toString!="function"&&typeof(t+"")=="string"}}(),W=Array.prototype,Y=Error.prototype,Z=Object.prototype,tt=String.prototype,nt=Function.prototype.toString,rt=Z.hasOwnProperty,et=Z.toString,ot=RegExp("^"+O(et).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ut=v(ut=Object.getOwnPropertySymbols)&&ut,ct=W.push,at=v(Object.preventExtensions=Object.preventExtensions)&&at,it=Z.propertyIsEnumerable,lt=W.splice,st=v(st=Q.Uint8Array)&&st,W=function(){ 2355var t={1:0},n=at&&v(n=Object.assign)&&n;try{n(at(t),"xo")}catch(r){}return!t[1]&&n}(),pt=v(pt=Array.isArray)&&pt,ft=v(ft=Object.keys)&&ft,gt=Math.max,yt=Math.pow(2,53)-1,bt={};bt["[object Array]"]=bt["[object Date]"]=bt["[object Number]"]={constructor:true,toLocaleStr
2355ing:true,toString:true,valueOf:true},bt["[object Boolean]"]=bt[$]={constructor:true,toString:true,valueOf:true},bt[A]=bt[P]=bt["[object RegExp]"]={constructor:true,toString:true},bt[R]={constructor:true},function(t,n){for(var r=-1,e=t.length;++r<e&&false!==n(t[r],r,t);); 2356return t}(V,function(t){for(var n in bt)if(rt.call(bt,n)){var r=bt[n];r[t]=rt.call(r,t)}});var ht=u.support={};!function(t){function n(){this.x=t}var r={0:t,length:t},e=[];n.prototype={valueOf:t,y:t};for(var o in new n)e.push(o);ht.argsTag=et.call(arguments)==w,ht.enumErrorProps=it.call(Y,"message")||it.call(Y,"name"),ht.enumPrototypes=it.call(n,"prototype"),ht.funcDecomp=/\bthis\b/.test(function(){return this}),ht.funcNames=typeof Function.name=="string",ht.nonEnumStrings=!it.call("x",0),ht.nonEnumShadows=!/valueOf/.test(e), 2357ht.spliceObjects=(lt.call(r,0,1),!r[0]),ht.unindexedChars="xx"!="x"[0]+Object("x")[0];try{ht.nonEnumArgs=!it.call(arguments,1)}catch(u){ht.nonEnumArgs=true}}(1,0),u.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:U,variable:"",imports:{_:u}};var mt=W||function(t,n){return null==n?t:i(n,vt(n),i(n,Ot(n),t))},jt=function(t){return function(n){return null==n?S:y(n)[t]}}("length"),vt=ut?function(t){return ut(y(t))}:x([]);ht.argsTag||(h=function(t){return f(o(t)?t.length:S)&&rt.call(t,"callee")&&!it.call(t,"callee"); 2358 2359});var _t=pt||function(t){return o(t)&&f(t.length)&&"[object Array]"==et.call(t)},Et=t(/x/)||st&&!t(st)?function(t){return et.call(t)==P}:t,Ot=ft?function(t){if(t)var n=t.constructor,r=t.length;return typeof n=="function"&&n.prototype===t||(typeof t=="function"?u.support.enumPrototypes:f(r))?g(t):j(t)?ft(t):[]}:g,xt=b(function(t,n){try{return t.apply(S,n)}catch(r){return m(r)?r:Error(r)}});u.constant=x,u.keys=Ot,u.keysIn=E,u.restParam=b,u.attempt=xt,u.escape=function(t){return(t=n(t))&&N.test(t)?t.replace(I,r):t; 2360 2361},u.escapeRegExp=O,u.isArguments=h,u.isArray=_t,u.isError=m,u.isFunction=Et,u.isNative=v,u.isObject=j,u.isString=_,u.template=function(t,r,o){var i=u.templateSettings;o&&p(t,r,o)&&(r=o=null),t=n(t),r=a(mt({},o||r),i,c),o=a(mt({},r.imports),i.imports,c);var s,f,g=Ot(o),y=l(o,g),b=0;o=r.interpolate||q;var h="__p+='",j="sourceURL"in r?"//# sourceURL="+r.sourceURL+"\n":"";if(t.replace(RegExp((r.escape||q).source+"|"+o.source+"|"+(o===U?D:q).source+"|"+(r.evaluate||q).source+"|$","g"),function(n,r,o,u,c,a){ 2362return o||(o=u),h+=t.slice(b,a).replace(B,e),r&&(s=true,h+="'+__e("+r+")+'"),c&&(f=true,h+="';"+c+";\n__p+='"),o&&(h+="'+((__t=("+o+"))==null?'':__t)+'"),b=a+n.length,n}),h+="';",(r=r.variable)||(h="with(obj){"+h+"}"),h=(f?h.replace(F,""):h).replace(L,"$1").replace(T,"$1;"),h="function("+(r||"obj")+"){"+(r?"":"obj||(obj={});")+"var __t,__p=''"+(s?",__e=_.escape":"")+(f?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+h+"return __p}",r=xt(function(){return Function(g,j+"return "+h).apply(S,y); 2363 2364}),r.source=h,m(r))throw r;return r},u.VERSION="3.7.0",typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Q._=u, define(function(){return u})):J&&K?G?(K.exports=u)._=u:J._=u:Q._=u}).call(this); 2365/*! clndr.min.js v1.2.10 2015-03-11 */ 2366!function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){function c(c,d){if(this.element=c,this.options=a.extend(!0,{},f,d),this.options.events.length&&(this.options.events=this.options.multiDayEvents?this.addMultiDayMomentObjectsToEvents(this.options.events):this.addMomentObjectToEvents(this.options.events)),this.month=this.options.startWithMonth?b(this.options.startWithMonth).startOf("month"):b().startOf("month"),this.options.constraints){if(this.options.constraints.startDate){var g=b(this.options.constraints.startDate);this.month.isBefore(g,"month")&&(this.month.set("month",g.month()),this.month.set("year",g.year()))}if(this.options.constraints.endDate){var h=b(this.options.constraints.endDate);this.month.isAfter(h,"month")&&this.month.set("month",h.month()).set("year",h.year())}}this._defaults=f,this._name=e,this.init()}
2366var d="<div class='clndr-controls'><div class='clndr-control-button'><span class='clndr-previous-button'>previous</span></div><div class='month'><%= month %> <%= year %></div><div class='clndr-control-button rightalign'><span class='clndr-next-button'>next</span></div></div><table class='clndr-table' border='0' cellspacing='0' cellpadding='0'><thead><tr class='header-days'><% for(var i = 0; i < daysOfTheWeek.length; i++) { %><td class='header-day'><%= daysOfTheWeek[i] %></td><% } %></tr></thead><tbody><% for(var i = 0; i < numberOfRows; i++){ %><tr><% for(var j = 0; j < 7; j++){ %><% var d = j + i * 7; %><td class='<%= days[d].classes %>'><div class='day-contents'><%= days[d].day %></div></td><% } %></tr><% } %></tbody></table>",e="clndr",f={template:d,weekOffset:0,startWithMonth:null,clickEvents:{click:null,nextMonth:null,previousMonth:null,nextYear:null,previousYear:null,today:null,onMonthChange:null,onYearChange:null},targets:{nextButton:"clndr-next-button",previousButton:"clndr-previous-button",nextYearButton:"clndr-next-year-button",previousYearButton:"clndr-previous-year-button",todayButton:"clndr-today-button",day:"day",empty:"empty"},classes:{today:"today",event:"event",past:"past",lastMonth:"last-month",nextMonth:"next-month",adjacentMonth:"adjacent-month",inactive:"inactive"},events:[],extras:null,dateParameter:"date",multiDayEvents:null,doneRendering:null,render:null,daysOfTheWeek:null,showAdjacentMonths:!0,adjacentDaysChangeMonth:!1,ready:null,constraints:null,forceSixRows:null};c.prototype.init=function(){if(this.daysOfTheWeek=this.options.daysOfTheWeek||[],!this.options.daysOfTheWeek){this.daysOfTheWeek=[];for(var c=0;7>c;c++)this.daysOfTheWeek.push(b().weekday(c).format("dd").charAt(0))}if(this.options.weekOffset&&(this.daysOfTheWeek=this.shiftWeekdayLabels(this.options.weekOffset)),!a.isFunction(this.options.render)){if(this.options.render=null,"undefined"==typeof _)throw new Error("Underscore was not found. Please include underscore.js OR provide a custom render function.");this.compiledClndrTemplate=_.template(this.options.template)}a(this.element).html("<div class='clndr'></div>"),this.calendarContainer=a(".clndr",this.element),this.bindEvents(),this.render(),this.options.ready&&this.options.ready.apply(this,[])},c.prototype.shiftWeekdayLabels=function(a){for(var b=this.daysOfTheWeek,c=0;a>c;c++)b.push(b.shift());return b},c.prototype.createDaysObject=function(c){var d=[],e=c.startOf("month");if(this.eventsLastMonth=[],this.eventsThisMonth=[],this.eventsNextMonth=[],this.options.events.length)if(this.options.multiDayEvents){if(this.eventsThisMonth=a(this.options.events).filter(function(){return this._clndrStartDateObject.format("YYYY-MM")===c.format("YYYY-MM")||this._clndrEndDateObject.format("YYYY-MM")===c.format("YYYY-MM")?!0:this._clndrStartDateObject.format("YYYY-MM")<=c.format("YYYY-MM")&&this._clndrEndDateObject.format("YYYY-MM")>=c.format("YYYY-MM")?!0:!1}).toArray(),this.options.showAdjacentMonths){var f=c.clone().subtract(1,"months"),g=c.clone().add(1,"months");this.eventsLastMonth=a(this.options.events).filter(function(){return this._clndrStartDateObject.format("YYYY-MM")===f.format("YYYY-MM")||this._clndrEndDateObject.format("YYYY-MM")===f.format("YYYY-MM")?!0:this._clndrStartDateObject.format("YYYY-MM")<=f.format("YYYY-MM")&&this._clndrEndDateObject.format("YYYY-MM")>=f.format("YYYY-MM")?!0:!1}).toArray(),this.eventsNextMonth=a(this.options.events).filter(function(){return this._clndrStartDateObject.format("YYYY-MM")===g.format("YYYY-MM")||this._clndrEndDateObject.format("YYYY-MM")===g.format("YYYY-MM")?!0:this._clndrStartDateObject.format("YYYY-MM")<=g.format("YYYY-MM")&&this._clndrEndDateObject.format("YYYY-MM")>=g.format("YYYY-MM")?!0:!1}).toArray()}}else if(this.eventsThisMonth=a(this.options.events).filter(function(){return this._clndrDateObject.format("YYYY-MM")==c.format("YYYY-MM")}).toArray(),this.options.showAdjacentMonths){var f=c.clone().subtract(1,"months"),g=c.clone().add(1,"months");this.eventsLastMonth=a(this.options.events).filter(function(){return this._clndrDateObject.format("YYYY-MM")==f.format("YYYY-MM")}).toArray(),this.eventsNextMonth=a(this.options.events).filter(function(){return this._clndrDateObject.format("YYYY-MM")==g.format("YYYY-MM")}).toArray()}var h=e.weekday()-this.options.weekOffset;if(0>h&&(h+=7),this.options.showAdjacentMonths)for(var i=0;h>i;i++){var j=b([c.year(),c.month(),i-h+1]);d.push(this.createDayObject(j,this.eventsLastMonth))}else for(var i=0;h>i;i++)d.push(this.calendarDay({classes:this.options.targets.empty+" "+this.options.classes.lastMonth}));for(var k=e.daysInMonth(),i=1;k>=i;i++){var j=b([c.year(),c.month(),i]);d.push(this.createDayObject(j,this.eventsThisMonth))}for(var i=1;d.length%7!==0;){if(this.options.showAdjacentMonths){var j=b([c.year(),c.month(),k+i]);d.push(this.createDayObject(j,this.eventsNextMonth))}else d.push(this.calendarDay({classes:this.options.targets.empty+" "+this.options.classes.nextMonth}));i++}if(this.options.forceSixRows&&42!==d.length)for(var l=b(d[d.length-1].date).add(1,"days");d.length<42;)this.options.showAdjacentMonths?(d.push(this.createDayObject(b(l),this.eventsNextMonth)),l.add(1,"days")):d.push(this.calendarDay({classes:this.options.targets.empty+" "+this.options.classes.nextMonth}));return d},c.prototype.createDayObject=function(a,c){var d=[],e=b(),f=this,g=0,h=c.length;for(g;h>g;g++){var i,j,k=c[g];f.options.multiDayEvents?(i=k._clndrStartDateObject,j=k._clndrEndDateObject):i=k._clndrDateObject,f.options.multiDayEvents&&j.diff(i,!1)?(a.isSame(i,"day")||a.isAfter(i,"day"))&&(a.isSame(j,"day")||a.isBefore(j,"day"))&&d.push(k):a.isSame(i,"day")&&d.push(k)}var l="";return e.format("YYYY-MM-DD")==a.format("YYYY-MM-DD")&&(l+=" "+this.options.classes.today),a.isBefore(e,"day")&&(l+=" "+this.options.classes.past),d.length&&(l+=" "+this.options.classes.event),this.month.month()>a.month()?(l+=" "+this.options.classes.adjacentMonth,l+=this.month.year()===a.year()?" "+this.options.classes.lastMonth:" "+this.options.classes.nextMonth):this.month.month()<a.month()&&(l+=" "+this.options.classes.adjacentMonth,l+=this.month.year()===a.year()?" "+this.options.classes.nextMonth:" "+this.options.classes.lastMonth),this.options.constraints&&(this.options.constraints.startDate&&a.isBefore(b(this.options.constraints.startDate))&&(l+=" "+this.options.classes.inactive),this.options.constraints.endDate&&a.isAfter(b(this.options.constraints.endDate))&&(l+=" "+this.options.classes.inactive)),!a.isValid()&&a.hasOwnProperty("_d")&&void 0!=a._d&&(a=b(a._d)),l+=" calendar-day-"
2366+a.format("YYYY-MM-DD"),l+=" calendar-dow-"+a.weekday(),this.calendarDay({day:a.date(),classes:this.options.targets.day+l,events:d,date:a})},c.prototype.render=function(){this.calendarContainer.children().remove();var a=this.createDaysObject(this.month),c=(this.month,{daysOfTheWeek:this.daysOfTheWeek,numberOfRows:Math.ceil(a.length/7),days:a,previousMonth:this.month.clone().subtract(1,"month").format("MMMM"),month:this.month.format("MMMM"),nextMonth:this.month.clone().add(1,"month").format("MMMM"),year:this.month.year(),eventsThisMonth:this.eventsThisMonth,eventsLastMonth:this.eventsLastMonth,eventsNextMonth:this.eventsNextMonth,extras:this.options.extras});if(this.calendarContainer.html(this.options.render?this.options.render.apply(this,[c]):this.compiledClndrTemplate(c)),this.options.constraints){for(var d in this.options.targets)d!=this.options.targets.day&&this.element.find("."+this.options.targets[d]).toggleClass(this.options.classes.inactive,!1);var e=null,f=null;this.options.constraints.startDate&&(e=b(this.options.constraints.startDate)),this.options.constraints.endDate&&(f=b(this.options.constraints.endDate)),e&&this.month.isSame(e,"month")&&this.element.find("."+this.options.targets.previousButton).toggleClass(this.options.classes.inactive,!0),f&&this.month.isSame(f,"month")&&this.element.find("."+this.options.targets.nextButton).toggleClass(this.options.classes.inactive,!0),e&&b(e).subtract(1,"years").isBefore(b(this.month).subtract(1,"years"))&&this.element.find("."+this.options.targets.previousYearButton).toggleClass(this.options.classes.inactive,!0),f&&b(f).add(1,"years").isAfter(b(this.month).add(1,"years"))&&this.element.find("."+this.options.targets.nextYearButton).toggleClass(this.options.classes.inactive,!0),(e&&e.isAfter(b(),"month")||f&&f.isBefore(b(),"month"))&&this.element.find("."+this.options.targets.today).toggleClass(this.options.classes.inactive,!0)}this.options.doneRendering&&this.options.doneRendering.apply(this,[])},c.prototype.bindEvents=function(){var b=a(this.element),c=this;b.on("click","."+this.options.targets.day,function(b){if(c.options.clickEvents.click){var d=c.buildTargetObject(b.currentTarget,!0);c.options.clickEvents.click.apply(c,[d])}c.options.adjacentDaysChangeMonth&&(a(b.currentTarget).is("."+c.options.classes.lastMonth)?c.backActionWithContext(c):a(b.currentTarget).is("."+c.options.classes.nextMonth)&&c.forwardActionWithContext(c))}),b.on("click","."+this.options.targets.empty,function(b){if(c.options.clickEvents.click){var d=c.buildTargetObject(b.currentTarget,!1);c.options.clickEvents.click.apply(c,[d])}c.options.adjacentDaysChangeMonth&&(a(b.currentTarget).is("."+c.options.classes.lastMonth)?c.backActionWithContext(c):a(b.currentTarget).is("."+c.options.classes.nextMonth)&&c.forwardActionWithContext(c))}),b.on("click","."+this.options.targets.previousButton,{context:this},this.backAction).on("click","."+this.options.targets.nextButton,{context:this},this.forwardAction).on("click","."+this.options.targets.todayButton,{context:this},this.todayAction).on("click","."+this.options.targets.nextYearButton,{context:this},this.nextYearAction).on("click","."+this.options.targets.previousYearButton,{context:this},this.previousYearAction)},c.prototype.buildTargetObject=function(c,d){var e={element:c,events:[],date:null};if(d){var f,g=c.className.indexOf("calendar-day-");0!==g?(f=c.className.substring(g+13,g+23),e.date=b(f)):e.date=null,this.options.events&&(e.events=a.makeArray(this.options.multiDayEvents?a(this.options.events).filter(function(){return(e.date.isSame(this._clndrStartDateObject,"day")||e.date.isAfter(this._clndrStartDateObject,"day"))&&(e.date.isSame(this._clndrEndDateObject,"day")||e.date.isBefore(this._clndrEndDateObject,"day"))}):a(this.options.events).filter(function(){return this._clndrDateObject.format("YYYY-MM-DD")==f})))}return e},c.prototype.forwardAction=function(a){var b=a.data.context;b.forwardActionWithContext(b)},c.prototype.backAction=function(a){var b=a.data.context;b.backActionWithContext(b)},c.prototype.backActionWithContext=function(a){if(!a.element.find("."+a.options.targets.previousButton).hasClass("inactive")){var c=!a.month.isSame(b(a.month).subtract(1,"months"),"year");a.month.subtract(1,"months"),a.render(),a.options.clickEvents.previousMonth&&a.options.clickEvents.previousMonth.apply(a,[b(a.month)]),a.options.clickEvents.onMonthChange&&a.options.clickEvents.onMonthChange.apply(a,[b(a.month)]),c&&a.options.clickEvents.onYearChange&&a.options.clickEvents.onYearChange.apply(a,[b(a.month)])}}
2366,c.prototype.forwardActionWithContext=function(a){if(!a.element.find("."+a.options.targets.nextButton).hasClass("inactive")){var c=!a.month.isSame(b(a.month).add(1,"months"),"year");a.month.add(1,"months"),a.render(),a.options.clickEvents.nextMonth&&a.options.clickEvents.nextMonth.apply(a,[b(a.month)]),a.options.clickEvents.onMonthChange&&a.options.clickEvents.onMonthChange.apply(a,[b(a.month)]),c&&a.options.clickEvents.onYearChange&&a.options.clickEvents.onYearChange.apply(a,[b(a.month)])}},c.prototype.todayAction=function(a){var c=a.data.context,d=!c.month.isSame(b(),"month"),e=!c.month.isSame(b(),"year");c.month=b().startOf("month"),c.options.clickEvents.today&&c.options.clickEvents.today.apply(c,[b(c.month)]),d&&(c.render(),c.month=b(),c.options.clickEvents.onMonthChange&&c.options.clickEvents.onMonthChange.apply(c,[b(c.month)]),e&&c.options.clickEvents.onYearChange&&c.options.clickEvents.onYearChange.apply(c,[b(c.month)]))},c.prototype.nextYearAction=function(a){var c=a.data.context;c.element.find("."+c.options.targets.nextYearButton).hasClass("inactive")||(c.month.add(1,"years"),c.render(),c.options.clickEvents.nextYear&&c.options.clickEvents.nextYear.apply(c,[b(c.month)]),c.options.clickEvents.onMonthChange&&c.options.clickEvents.onMonthChange.apply(c,[b(c.month)]),c.options.clickEvents.onYearChange&&c.options.clickEvents.onYearChange.apply(c,[b(c.month)]))},c.prototype.previousYearAction=function(a){var c=a.data.context;c.element.find("."+c.options.targets.previousYear).hasClass("inactive")||(c.month.subtract(1,"years"),c.render(),c.options.clickEvents.previousYear&&c.options.clickEvents.previousYear.apply(c,[b(c.month)]),c.options.clickEvents.onMonthChange&&c.options.clickEvents.onMonthChange.apply(c,[b(c.month)]),c.options.clickEvents.onYearChange&&c.options.clickEvents.onYearChange.apply(c,[b(c.month)]))},c.prototype.forward=function(a){return this.month.add(1,"months"),this.render(),a&&a.withCallbacks&&(this.options.clickEvents.onMonthChange&&this.options.clickEvents.onMonthChange.apply(this,[b(this.month)]),0===this.month.month()&&this.options.clickEvents.onYearChange&&this.options.clickEvents.onYearChange.apply(this,[b(this.month)])),this},c.prototype.back=function(a){return this.month.subtract(1,"months"),this.render(),a&&a.withCallbacks&&(this.options.clickEvents.onMonthChange&&this.options.clickEvents.onMonthChange.apply(this,[b(this.month)]),11===this.month.month()&&this.options.clickEvents.onYearChange&&this.options.clickEvents.onYearChange.apply(this,[b(this.month)])),this},c.prototype.next=function(a){return this.forward(a),this},c.prototype.previous=function(a){return this.back(a),this},c.prototype.setMonth=function(a,c){return this.month.month(a),this.render(),c&&c.withCallbacks&&this.options.clickEvents.onMonthChange&&this.options.clickEvents.onMonthChange.apply(this,[b(this.month)]),this},c.prototype.nextYear=function(a){return this.month.add(1,"year"),this.render(),a&&a.withCallbacks&&this.options.clickEvents.onYearChange&&this.options.clickEvents.onYearChange.apply(this,[b(this.month)]),this},c.prototype.previousYear=function(a){return this.month.subtract(1,"year"),this.render(),a&&a.withCallbacks&&this.options.clickEvents.onYearChange&&this.options.clickEvents.onYearChange.apply(this,[b(this.month)]),this},c.prototype.setYear=function(a,c){return this.month.year(a),this.render(),c&&c.withCallbacks&&this.options.clickEvents.onYearChange&&this.options.clickEvents.onYearChange.apply(this,[b(this.month)]),this},c.prototype.setEvents=function(a){return this.options.events=this.options.multiDayEvents?this.addMultiDayMomentObjectsToEvents(a):this.addMomentObjectToEvents(a),this.render(),this},c.prototype.addEvents=function(b){return this.options.events=this.options.multiDayEvents?a.merge(this.options.events,this.addMultiDayMomentObjectsToEvents(b)):a.merge(this.options.events,this.addMomentObjectToEvents(b)),this.render(),this},c.prototype.removeEvents=function(a){for(var b=this.options.events.length-1;b>=0;b--)1==a(this.options.events[b])&&this.options.events.splice(b,1);return this.render(),this},c.prototype.addMomentObjectToEvents=function(a){var c=this,d=0,e=a.length;for(d;e>d;d++)a[d]._clndrDateObject=b(a[d][c.options.dateParameter]);return a},c.prototype.addMultiDayMomentObjectsToEvents=function(a){var c=this,d=0,e=a.length;for(d;e>d;d++)a[d][c.options.multiDayEvents.endDate]||a[d][c.options.multiDayEvents.startDate]?(a[d]._clndrEndDateObject=b(a[d][c.options.multiDayEvents.endDate]||a[d][c.options.multiDayEvents.startDate]),a[d]._clndrStartDateObject=b(a[d][c.options.multiDayEvents.startDate]||a[d][c.options.multiDayEvents.endDate])):(a[d]._clndrEndDateObject=b(a[d][c.options.multiDayEvents.singleDay]),a[d]._clndrStartDateObject=b(a[d][c.options.multiDayEvents.singleDay]));return a},c.prototype.calendarDay=function(b){var c={day:"",classes:this.options.targets.empty,events:[],date:null};return a.extend({},c,b)}
vendor: 26,249 bytes, lines 2366-3174
2366,a.fn.clndr=function(a){if(1===this.length){if(!this.data("plugin_clndr")){var b=new c(this,a);return this.data("plugin_clndr",b),b}}else if(this.length>1)throw new Error("CLNDR does not support multiple elements yet. Make sure your clndr selector returns only one element.")}}); 2367;(function () { 2368 'use strict'; 2369 2370 /** 2371 * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs. 2372 * 2373 * @codingstandard ftlabs-jsv2 2374 * @copyright The Financial Times Limited [All Rights Reserved] 2375 * @license MIT License (see LICENSE.txt) 2376 */ 2377 2378 /*jslint browser:true, node:true*/ 2379 /*global define, Event, Node*/ 2380 2381 2382 /** 2383 * Instantiate fast-clicking listeners on the specified layer. 2384 * 2385 * @constructor 2386 * @param {Element} layer The layer to listen on 2387 * @param {Object} [options={}] The options to override the defaults 2388 */ 2389 function FastClick(layer, options) { 2390 var oldOnClick; 2391 2392 options = options || {}; 2393 2394 /** 2395 * Whether a click is currently being tracked. 2396 * 2397 * @type boolean 2398 */ 2399 this.trackingClick = false; 2400 2401 2402 /** 2403 * Timestamp for when click tracking started. 2404 * 2405 * @type number 2406 */ 2407 this.trackingClickStart = 0; 2408 2409 2410 /** 2411 * The element being tracked for a click. 2412 * 2413 * @type EventTarget 2414 */ 2415 this.targetElement = null; 2416 2417 2418 /** 2419 * X-coordinate of touch start event. 2420 * 2421 * @type number 2422 */ 2423 this.touchStartX = 0; 2424 2425 2426 /** 2427 * Y-coordinate of touch start event. 2428 * 2429 * @type number 2430 */ 2431 this.touchStartY = 0; 2432 2433 2434 /** 2435 * ID of the last touch, retrieved from Touch.identifier. 2436 * 2437 * @type number 2438 */ 2439 this.lastTouchIdentifier = 0; 2440 2441 2442 /** 2443 * Touchmove boundary, beyond which a click will be cancelled. 2444 * 2445 * @type number 2446 */ 2447 this.touchBoundary = options.touchBoundary || 10; 2448 2449 2450 /** 2451 * The FastClick layer. 2452 * 2453 * @type Element 2454 */ 2455 this.layer = layer; 2456 2457 /** 2458 * The minimum time between tap(touchstart and touchend) events 2459 * 2460 * @type number 2461 */ 2462 this.tapDelay = options.tapDelay || 200; 2463 2464 /** 2465 * The maximum time for a tap 2466 * 2467 * @type number 2468 */ 2469 this.tapTimeout = options.tapTimeout || 700; 2470 2471 if (FastClick.notNeeded(layer)) { 2472 return; 2473 } 2474 2475 // Some old versions of Android don't have Function.prototype.bind 2476 function bind(method, context) { 2477 return function() { return method.apply(context, arguments); }; 2478 } 2479 2480 2481 var methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel']; 2482 var context = this; 2483 for (var i = 0, l = methods.length; i < l; i++) { 2484 context[methods[i]] = bind(context[methods[i]], context); 2485 } 2486 2487 // Set up event handlers as required 2488 if (deviceIsAndroid) { 2489 layer.addEventListener('mouseover', this.onMouse, true); 2490 layer.addEventListener('mousedown', this.onMouse, true); 2491 layer.addEventListener('mouseup', this.onMouse, true); 2492 } 2493 2494 layer.addEventListener('click', this.onClick, true); 2495 layer.addEventListener('touchstart', this.onTouchStart, false); 2496 layer.addEventListener('touchmove', this.onTouchMove, false); 2497 layer.addEventListener('touchend', this.onTouchEnd, false); 2498 layer.addEventListener('touchcancel', this.onTouchCancel, false); 2499 2500 // Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2) 2501 // which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick 2502 // layer when they are cancelled. 2503 if (!Event.prototype.stopImmediatePropagation) { 2504 layer.removeEventListener = function(type, callback, capture) { 2505 var rmv = Node.prototype.removeEventListener; 2506 if (type === 'click') { 2507 rmv.call(layer, type, callback.hijacked || callback, capture); 2508 } else { 2509 rmv.call(layer, type, callback, capture); 2510 } 2511 }; 2512 2513 layer.addEventListener = function(type, callback, capture) { 2514 var adv = Node.prototype.addEventListener; 2515 if (type === 'click') { 2516 adv.call(layer, type, callback.hijacked || (callback.hijacked = function(event) { 2517 if (!event.propagationStopped) { 2518 callback(event); 2519 } 2520 }), capture); 2521 } else { 2522 adv.call(layer, type, callback, capture); 2523 } 2524 }; 2525 } 2526 2527 // If a handler is already declared in the element's onclick attribute, it will be fired before 2528 // FastClick's onClick handler. Fix this by pulling out the user-defined handler function and 2529 // adding it as listener. 2530 if (typeof layer.onclick === 'function') { 2531 2532 // Android browser on at least 3.2 requires a new reference to the function in layer.onclick 2533 // - the old one won't work if passed to addEventListener directly. 2534 oldOnClick = layer.onclick; 2535 layer.addEventListener('click', function(event) { 2536 oldOnClick(event); 2537 }, false); 2538 layer.onclick = null; 2539 } 2540 } 2541 2542 /** 2543 * Windows Phone 8.1 fakes user agent string to look like Android and iPhone. 2544 * 2545 * @type boolean 2546 */ 2547 var deviceIsWindowsPhone = navigator.userAgent.indexOf("Windows Phone") >= 0; 2548 2549 /** 2550 * Android requires exceptions. 2551 * 2552 * @type boolean 2553 */ 2554 var deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0 && !deviceIsWindowsPhone; 2555 2556 2557 /** 2558 * iOS requires exceptions. 2559 * 2560 * @type boolean 2561 */ 2562 var deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent) && !deviceIsWindowsPhone; 2563 2564 2565 /** 2566 * iOS 4 requires an exception for select elements. 2567 * 2568 * @type boolean 2569 */ 2570 var deviceIsIOS4 = deviceIsIOS && (/OS 4_\d(_\d)?/).test(navigator.userAgent); 2571 2572 2573 /** 2574 * iOS 6.0-7.* requires the target element to be manually derived 2575 * 2576 * @type boolean 2577 */ 2578 var deviceIsIOSWithBadTarget = deviceIsIOS && (/OS [6-7]_\d/).test(navigator.userAgent); 2579 2580 /** 2581 * BlackBerry requires exceptions. 2582 * 2583 * @type boolean 2584 */ 2585 var deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0; 2586 2587 /** 2588 * Determine whether a given element requires a native click. 2589 * 2590 * @param {EventTarget|Element} target Target DOM element 2591 * @returns {boolean} Returns true if the element needs a native click 2592 */ 2593 FastClick.prototype.needsClick = function(target) { 2594 switch (target.nodeName.toLowerCase()) { 2595 2596 // Don't send a synthetic click to disabled inputs (issue #62) 2597 case 'button': 2598 case 'select': 2599 case 'textarea': 2600 if (target.disabled) { 2601 return true; 2602 } 2603 2604 break; 2605 case 'input': 2606 2607 // File inputs need real clicks on iOS 6 due to a browser bug (issue #68) 2608 if ((deviceIsIOS && target.type === 'file') || target.disabled) { 2609 return true; 2610 } 2611 2612 break; 2613 case 'label': 2614 case 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames 2615 case 'video': 2616 return true; 2617 } 2618 2619 return (/\bneedsclick\b/).test(target.className); 2620 }; 2621 2622 2623 /** 2624 * Determine whether a given element requires a call to focus to simulate click into element. 2625 * 2626 * @param {EventTarget|Element} target Target DOM element 2627 * @returns {boolean} Returns true if the element requires a call to focus to simulate native click. 2628 */ 2629 FastClick.prototype.needsFocus = function(target) { 2630 switch (target.nodeName.toLowerCase()) { 2631 case 'textarea': 2632 return true; 2633 case 'select': 2634 return !deviceIsAndroid; 2635 case 'input': 2636 switch (target.type) { 2637 case 'button': 2638 case 'checkbox': 2639 case 'file': 2640 case 'image': 2641 case 'radio': 2642 case 'submit': 2643 return false; 2644 } 2645 2646 // No point in attempting to focus disabled inputs 2647 return !target.disabled && !target.readOnly; 2648 default: 2649 return (/\bneedsfocus\b/).test(target.className); 2650 } 2651 }; 2652 2653 2654 /** 2655 * Send a click event to the specified element. 2656 * 2657 * @param {EventTarget|Element} targetElement 2658 * @param {Event} event 2659 */ 2660 FastClick.prototype.sendClick = function(targetElement, event) { 2661 var clickEvent, touch; 2662 2663 // On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24) 2664 if (document.activeElement && document.activeElement !== targetElement) { 2665 document.activeElement.blur(); 2666 } 2667 2668 touch = event.changedTouches[0]; 2669 2670 // Synthesise a click event, with an extra attribute so it can be tracked 2671 clickEvent = document.createEvent('MouseEvents'); 2672 clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null); 2673 clickEvent.forwardedTouchEvent = true; 2674 targetElement.dispatchEvent(clickEvent); 2675 }; 2676 2677 FastClick.prototype.determineEventType = function(targetElement) { 2678 2679 //Issue #159: Android Chrome Select Box does not open with a synthetic click event 2680 if (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') { 2681 return 'mousedown'; 2682 } 2683 2684 return 'click'; 2685 }; 2686 2687 2688 /** 2689 * @param {EventTarget|Element} targetElement 2690 */ 2691 FastClick.prototype.focus = function(targetElement) { 2692 var length; 2693 2694 // Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724. 2695 if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') { 2696 length = targetElement.value.length; 2697 targetElement.setSelectionRange(length, length); 2698 } else { 2699 targetElement.focus(); 2700 } 2701 }; 2702 2703 2704 /** 2705 * Check whether the given target element is a child of a scrollable layer and if so, set a flag on it. 2706 * 2707 * @param {EventTarget|Element} targetElement 2708 */ 2709 FastClick.prototype.updateScrollParent = function(targetElement) { 2710 var scrollParent, parentElement; 2711 2712 scrollParent = targetElement.fastClickScrollParent; 2713 2714 // Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the 2715 // target element was moved to another parent. 2716 if (!scrollParent || !scrollParent.contains(targetElement)) { 2717 parentElement = targetElement; 2718 do { 2719 if (parentElement.scrollHeight > parentElement.offsetHeight) { 2720 scrollParent = parentElement; 2721 targetElement.fastClickScrollParent = parentElement; 2722 break; 2723 } 2724 2725 parentElement = parentElement.parentElement; 2726 } while (parentElement); 2727 } 2728 2729 // Always update the scroll top tracker if possible. 2730 if (scrollParent) { 2731 scrollParent.fastClickLastScrollTop = scrollParent.scrollTop; 2732 } 2733 }; 2734 2735 2736 /** 2737 * @param {EventTarget} targetElement 2738 * @returns {Element|EventTarget} 2739 */ 2740 FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) { 2741 2742 // On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node. 2743 if (eventTarget.nodeType === Node.TEXT_NODE) { 2744 return eventTarget.parentNode; 2745 } 2746 2747 return eventTarget; 2748 }; 2749 2750 2751 /** 2752 * On touch start, record the position and scroll offset. 2753 * 2754 * @param {Event} event 2755 * @returns {boolean} 2756 */ 2757 FastClick.prototype.onTouchStart = function(event) { 2758 var targetElement, touch, selection; 2759 2760 // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111). 2761 if (event.targetTouches.length > 1) { 2762 return true; 2763 } 2764 2765 targetElement = this.getTargetElementFromEventTarget(event.target); 2766 touch = event.targetTouches[0]; 2767 2768 if (deviceIsIOS) { 2769 2770 // Only trusted events will deselect text on iOS (issue #49) 2771 selection = window.getSelection(); 2772 if (selection.rangeCount && !selection.isCollapsed) { 2773 return true; 2774 } 2775 2776 if (!deviceIsIOS4) { 2777 2778 // Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23): 2779 // when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched 2780 // with the same identifier as the touch event that previously triggered the click that triggered the alert. 2781 // Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an 2782 // immediately preceeding touch event (issue #52), so this fix is unavailable on that platform. 2783 // Issue 120: touch.identifier is 0 when Chrome dev tools 'Emulate touch events' is set with an iOS device UA string, 2784 // which causes all touch events to be ignored. As this block only applies to iOS, and iOS identifiers are always long, 2785 // random integers, it's safe to to continue if the identifier is 0 here. 2786 if (touch.identifier && touch.identifier === this.lastTouchIdentifier) { 2787 event.preventDefault(); 2788 return false; 2789 } 2790 2791 this.lastTouchIdentifier = touch.identifier; 2792 2793 // If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and: 2794 // 1) the user does a fling scroll on the scrollable layer 2795 // 2) the user stops the fling scroll with another tap 2796 // then the event.target of the last 'touchend' event will be the element that was under the user's finger 2797 // when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check 2798 // is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42). 2799 this.updateScrollParent(targetElement); 2800 } 2801 } 2802 2803 this.trackingClick = true; 2804 this.trackingClickStart = event.timeStamp; 2805 this.targetElement = targetElement; 2806 2807 this.touchStartX = touch.pageX; 2808 this.touchStartY = touch.pageY; 2809 2810 // Prevent phantom clicks on fast double-tap (issue #36) 2811 if ((event.timeStamp - this.lastClickTime) < this.tapDelay) { 2812 event.preventDefault(); 2813 } 2814 2815 return true; 2816 }; 2817 2818 2819 /** 2820 * Based on a touchmove event object, check whether the touch has moved past a boundary since it started. 2821 * 2822 * @param {Event} event 2823 * @returns {boolean} 2824 */ 2825 FastClick.prototype.touchHasMoved = function(event) { 2826 var touch = event.changedTouches[0], boundary = this.touchBoundary; 2827 2828 if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) { 2829 return true; 2830 } 2831 2832 return false; 2833 }; 2834 2835 2836 /** 2837 * Update the last position. 2838 * 2839 * @param {Event} event 2840 * @returns {boolean} 2841 */ 2842 FastClick.prototype.onTouchMove = function(event) { 2843 if (!this.trackingClick) { 2844 return true; 2845 } 2846 2847 // If the touch has moved, cancel the click tracking 2848 if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) { 2849 this.trackingClick = false; 2850 this.targetElement = null; 2851 } 2852 2853 return true; 2854 }; 2855 2856 2857 /** 2858 * Attempt to find the labelled control for the given label element. 2859 * 2860 * @param {EventTarget|HTMLLabelElement} labelElement 2861 * @returns {Element|null} 2862 */ 2863 FastClick.prototype.findControl = function(labelElement) { 2864 2865 // Fast path for newer browsers supporting the HTML5 control attribute 2866 if (labelElement.control !== undefined) { 2867 return labelElement.control; 2868 } 2869 2870 // All browsers under test that support touch events also support the HTML5 htmlFor attribute 2871 if (labelElement.htmlFor) { 2872 return document.getElementById(labelElement.htmlFor); 2873 } 2874 2875 // If no for attribute exists, attempt to retrieve the first labellable descendant element 2876 // the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label 2877 return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea'); 2878 }; 2879 2880 2881 /** 2882 * On touch end, determine whether to send a click event at once. 2883 * 2884 * @param {Event} event 2885 * @returns {boolean} 2886 */ 2887 FastClick.prototype.onTouchEnd = function(event) { 2888 var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement; 2889 2890 if (!this.trackingClick) { 2891 return true; 2892 } 2893 2894 // Prevent phantom clicks on fast double-tap (issue #36) 2895 if ((event.timeStamp - this.lastClickTime) < this.tapDelay) { 2896 this.cancelNextClick = true; 2897 return true; 2898 } 2899 2900 if ((event.timeStamp - this.trackingClickStart) > this.tapTimeout) { 2901 return true; 2902 } 2903 2904 // Reset to prevent wrong click cancel on input (issue #156). 2905 this.cancelNextClick = false; 2906 2907 this.lastClickTime = event.timeStamp; 2908 2909 trackingClickStart = this.trackingClickStart; 2910 this.trackingClick = false; 2911 this.trackingClickStart = 0; 2912 2913 // On some iOS devices, the targetElement supplied with the event is invalid if the layer 2914 // is performing a transition or scroll, and has to be re-detected manually. Note that 2915 // for this to function correctly, it must be called *after* the event target is checked! 2916 // See issue #57; also filed as rdar://13048589 . 2917 if (deviceIsIOSWithBadTarget) { 2918 touch = event.changedTouches[0]; 2919 2920 // In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null 2921 targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement; 2922 targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent; 2923 } 2924 2925 targetTagName = targetElement.tagName.toLowerCase(); 2926 if (targetTagName === 'label') { 2927 forElement = this.findControl(targetElement); 2928 if (forElement) { 2929 this.focus(targetElement); 2930 if (deviceIsAndroid) { 2931 return false; 2932 } 2933 2934 targetElement = forElement; 2935 } 2936 } else if (this.needsFocus(targetElement)) { 2937 2938 // Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through. 2939 // Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37). 2940 if ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window && targetTagName === 'input')) { 2941 this.targetElement = null; 2942 return false; 2943 } 2944 2945 this.focus(targetElement); 2946 this.sendClick(targetElement, event); 2947 2948 // Select elements need the event to go through on iOS 4, otherwise the selector menu won't open. 2949 // Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others) 2950 if (!deviceIsIOS || targetTagName !== 'select') { 2951 this.targetElement = null; 2952 event.preventDefault(); 2953 } 2954 2955 return false; 2956 } 2957 2958 if (deviceIsIOS && !deviceIsIOS4) { 2959 2960 // Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled 2961 // and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42). 2962 scrollParent = targetElement.fastClickScrollParent; 2963 if (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) { 2964 return true; 2965 } 2966 } 2967 2968 // Prevent the actual click from going though - unless the target node is marked as requiring 2969 // real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted. 2970 if (!this.needsClick(targetElement)) { 2971 event.preventDefault(); 2972 this.sendClick(targetElement, event); 2973 } 2974 2975 return false; 2976 }; 2977 2978 2979 /** 2980 * On touch cancel, stop tracking the click. 2981 * 2982 * @returns {void} 2983 */ 2984 FastClick.prototype.onTouchCancel = function() { 2985 this.trackingClick = false; 2986 this.targetElement = null; 2987 }; 2988 2989 2990 /** 2991 * Determine mouse events which should be permitted. 2992 * 2993 * @param {Event} event 2994 * @returns {boolean} 2995 */ 2996 FastClick.prototype.onMouse = function(event) { 2997 2998 // If a target element was never set (because a touch event was never fired) allow the event 2999 if (!this.targetElement) { 3000 return true; 3001 } 3002 3003 if (event.forwardedTouchEvent) { 3004 return true; 3005 } 3006 3007 // Programmatically generated events targeting a specific element should be permitted 3008 if (!event.cancelable) { 3009 return true; 3010 } 3011 3012 // Derive and check the target element to see whether the mouse event needs to be permitted; 3013 // unless explicitly enabled, prevent non-touch click events from triggering actions, 3014 // to prevent ghost/doubleclicks. 3015 if (!this.needsClick(this.targetElement) || this.cancelNextClick) { 3016 3017 // Prevent any user-added listeners declared on FastClick element from being fired. 3018 if (event.stopImmediatePropagation) { 3019 event.stopImmediatePropagation(); 3020 } else { 3021 3022 // Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2) 3023 event.propagationStopped = true; 3024 } 3025 3026 // Cancel the event 3027 event.stopPropagation(); 3028 event.preventDefault(); 3029 3030 return false; 3031 } 3032 3033 // If the mouse event is permitted, return true for the action to go through. 3034 return true; 3035 }; 3036 3037 3038 /** 3039 * On actual clicks, determine whether this is a touch-generated click, a click action occurring 3040 * naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or 3041 * an actual click which should be permitted. 3042 * 3043 * @param {Event} event 3044 * @returns {boolean} 3045 */ 3046 FastClick.prototype.onClick = function(event) { 3047 var permitted; 3048 3049 // It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early. 3050 if (this.trackingClick) { 3051 this.targetElement = null; 3052 this.trackingClick = false; 3053 return true; 3054 } 3055 3056 // Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target. 3057 if (event.target.type === 'submit' && event.detail === 0) { 3058 return true; 3059 } 3060 3061 permitted = this.onMouse(event); 3062 3063 // Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through. 3064 if (!permitted) { 3065 this.targetElement = null; 3066 } 3067 3068 // If clicks are permitted, return true for the action to go through. 3069 return permitted; 3070 }; 3071 3072 3073 /** 3074 * Remove all FastClick's event listeners. 3075 * 3076 * @returns {void} 3077 */ 3078 FastClick.prototype.destroy = function() { 3079 var layer = this.layer; 3080 3081 if (deviceIsAndroid) { 3082 layer.removeEventListener('mouseover', this.onMouse, true); 3083 layer.removeEventListener('mousedown', this.onMouse, true); 3084 layer.removeEventListener('mouseup', this.onMouse, true); 3085 } 3086 3087 layer.removeEventListener('click', this.onClick, true); 3088 layer.removeEventListener('touchstart', this.onTouchStart, false); 3089 layer.removeEventListener('touchmove', this.onTouchMove, false); 3090 layer.removeEventListener('touchend', this.onTouchEnd, false); 3091 layer.removeEventListener('touchcancel', this.onTouchCancel, false); 3092 }; 3093 3094 3095 /** 3096 * Check whether FastClick is needed. 3097 * 3098 * @param {Element} layer The layer to listen on 3099 */ 3100 FastClick.notNeeded = function(layer) { 3101 var metaViewport; 3102 var chromeVersion; 3103 var blackberryVersion; 3104 var firefoxVersion; 3105 3106 // Devices that don't support touch don't need FastClick 3107 if (typeof window.ontouchstart === 'undefined') { 3108 return true; 3109 } 3110 3111 // Chrome version - zero for other browsers 3112 chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1]; 3113 3114 if (chromeVersion) { 3115 3116 if (deviceIsAndroid) { 3117 metaViewport = document.querySelector('meta[name=viewport]'); 3118 3119 if (metaViewport) { 3120 // Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89) 3121 if (metaViewport.content.indexOf('user-scalable=no') !== -1) { 3122 return true; 3123 } 3124 // Chrome 32 and above with width=device-width or less don't need FastClick 3125 if (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) { 3126 return true; 3127 } 3128 } 3129 3130 // Chrome desktop doesn't need FastClick (issue #15) 3131 } else { 3132 return true; 3133 } 3134 } 3135 3136 if (deviceIsBlackBerry10) { 3137 blackberryVersion = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/); 3138 3139 // BlackBerry 10.3+ does not require Fastclick library. 3140 // https://github.com/ftlabs/fastclick/issues/251 3141 if (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) { 3142 metaViewport = document.querySelector('meta[name=viewport]'); 3143 3144 if (metaViewport) { 3145 // user-scalable=no eliminates click delay. 3146 if (metaViewport.content.indexOf('user-scalable=no') !== -1) { 3147 return true; 3148 } 3149 // width=device-width (or less than device-width) eliminates click delay. 3150 if (document.documentElement.scrollWidth <= window.outerWidth) { 3151 return true; 3152 } 3153 } 3154 } 3155 } 3156 3157 // IE10 with -ms-touch-action: none or manipulation, which disables double-tap-to-zoom (issue #97) 3158 if (layer.style.msTouchAction === 'none' || layer.style.touchAction === 'manipulation') { 3159 return true; 3160 } 3161 3162 // Firefox version - zero for other browsers 3163 firefoxVersion = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1]; 3164 3165 if (firefoxVersion >= 27) { 3166 // Firefox 27+ does not have tap delay if the content is not zoomable - https://bugzilla.mozilla.org/show_bug.cgi?id=922896 3167 3168 metaViewport = document.querySelector('meta[name=viewport]'); 3169 if (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) { 3170 return true; 3171 } 3172 } 3173 3174 // IE11: prefixed -ms-touch-action is no longer supported and it's recomended to use non-prefixed version
3175 // http://msdn.microsoft.com/en-us/library/windows/apps/Hh767313.aspx 3176 if (layer.style.touchAction === 'none' || layer.style.touchAction === 'manipulation') { 3177 return true; 3178 } 3179 3180 return false; 3181 }; 3182 3183 3184 /** 3185 * Factory method for creating a FastClick object 3186 * 3187 * @param {Element} layer The layer to listen on 3188 * @param {Object} [options={}] The options to override the defaults 3189 */ 3190 FastClick.attach = function(layer, options) { 3191 return new FastClick(layer, options); 3192 }; 3193 3194 3195 if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) { 3196 3197 // AMD. Register as an anonymous module. 3198 define(function() { 3199 return FastClick; 3200 }); 3201 } else if (typeof module !== 'undefined' && module.exports) { 3202 module.exports = FastClick.attach; 3203 module.exports.FastClick = FastClick; 3204 } else { 3205 window.FastClick = FastClick; 3206 } 3207}()); 3208/*! VelocityJS.org (1.2.2). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */ 3209 3210/************************* 3211 Velocity jQuery Shim 3212 *************************/ 3213 3214/*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */ 3215 3216/* This file contains the jQuery functions that Velocity relies on, thereby removing Velocity's dependency on a full copy of jQuery, and allowing it to work in any environment. */ 3217/* These shimmed functions are only used if jQuery isn't present. If both this shim and jQuery are loaded, Velocity defaults to jQuery proper. */ 3218/* Browser support: Using this shim instead of jQuery proper removes support for IE8. */ 3219 3220;(function (window) { 3221 /*************** 3222 Setup 3223 ***************/ 3224 3225 /* If jQuery is already loaded, there's no point in loading this shim. */ 3226 if (window.jQuery) { 3227 return; 3228 } 3229 3230 /* jQuery base. */ 3231 var $ = function (selector, context) { 3232 return new $.fn.init(selector, context); 3233 }; 3234 3235 /******************** 3236 Private Methods 3237 ********************/ 3238 3239 /* jQuery */ 3240 $.isWindow = function (obj) { 3241 /* jshint eqeqeq: false */ 3242 return obj != null && obj == obj.window; 3243 }; 3244 3245 /* jQuery */ 3246 $.type = function (obj) { 3247 if (obj == null) { 3248 return obj + ""; 3249 } 3250 3251 return typeof obj === "object" || typeof obj === "function" ? 3252 class2type[toString.call(obj)] || "object" : 3253 typeof obj; 3254 }; 3255 3256 /* jQuery */ 3257 $.isArray = Array.isArray || function (obj) { 3258 return $.type(obj) === "array"; 3259 }; 3260 3261 /* jQuery */ 3262 function isArraylike (obj) { 3263 var length = obj.length, 3264 type = $.type(obj); 3265 3266 if (type === "function" || $.isWindow(obj)) { 3267 return false; 3268 } 3269 3270 if (obj.nodeType === 1 && length) { 3271 return true; 3272 } 3273 3274 return type === "array" || length === 0 || typeof length === "number" && length > 0 && (length - 1) in obj; 3275 } 3276 3277 /*************** 3278 $ Methods 3279 ***************/ 3280 3281 /* jQuery: Support removed for IE<9. */ 3282 $.isPlainObject = function (obj) { 3283 var key; 3284 3285 if (!obj || $.type(obj) !== "object" || obj.nodeType || $.isWindow(obj)) { 3286 return false; 3287 } 3288 3289 try { 3290 if (obj.constructor && 3291 !hasOwn.call(obj, "constructor") && 3292 !hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) { 3293 return false; 3294 } 3295 } catch (e) { 3296 return false; 3297 } 3298 3299 for (key in obj) {} 3300 3301 return key === undefined || hasOwn.call(obj, key); 3302 }; 3303 3304 /* jQuery */ 3305 $.each = function(obj, callback, args) { 3306 var value, 3307 i = 0, 3308 length = obj.length, 3309 isArray = isArraylike(obj); 3310 3311 if (args) { 3312 if (isArray) { 3313 for (; i < length; i++) { 3314 value = callback.apply(obj[i], args); 3315 3316 if (value === false) { 3317 break; 3318 } 3319 } 3320 } else { 3321 for (i in obj) { 3322 value = callback.apply(obj[i], args); 3323 3324 if (value === false) { 3325 break; 3326 } 3327 } 3328 } 3329 3330 } else { 3331 if (isArray) { 3332 for (; i < length; i++) { 3333 value = callback.call(obj[i], i, obj[i]); 3334 3335 if (value === false) { 3336 break; 3337 } 3338 } 3339 } else { 3340 for (i in obj) { 3341 value = callback.call(obj[i], i, obj[i]); 3342 3343 if (value === false) { 3344 break; 3345 } 3346 } 3347 } 3348 } 3349 3350 return obj;
vendor: 8,509 bytes, lines 3351-3685
3351 }; 3352 3353 /* Custom */ 3354 $.data = function (node, key, value) { 3355 /* $.getData() */ 3356 if (value === undefined) { 3357 var id = node[$.expando], 3358 store = id && cache[id]; 3359 3360 if (key === undefined) { 3361 return store; 3362 } else if (store) { 3363 if (key in store) { 3364 return store[key]; 3365 } 3366 } 3367 /* $.setData() */ 3368 } else if (key !== undefined) { 3369 var id = node[$.expando] || (node[$.expando] = ++$.uuid); 3370 3371 cache[id] = cache[id] || {}; 3372 cache[id][key] = value; 3373 3374 return value; 3375 } 3376 }; 3377 3378 /* Custom */ 3379 $.removeData = function (node, keys) { 3380 var id = node[$.expando], 3381 store = id && cache[id]; 3382 3383 if (store) { 3384 $.each(keys, function(_, key) { 3385 delete store[key]; 3386 }); 3387 } 3388 }; 3389 3390 /* jQuery */ 3391 $.extend = function () { 3392 var src, copyIsArray, copy, name, options, clone, 3393 target = arguments[0] || {}, 3394 i = 1, 3395 length = arguments.length, 3396 deep = false; 3397 3398 if (typeof target === "boolean") { 3399 deep = target; 3400 3401 target = arguments[i] || {}; 3402 i++; 3403 } 3404 3405 if (typeof target !== "object" && $.type(target) !== "function") { 3406 target = {}; 3407 } 3408 3409 if (i === length) { 3410 target = this; 3411 i--; 3412 } 3413 3414 for (; i < length; i++) { 3415 if ((options = arguments[i]) != null) { 3416 for (name in options) { 3417 src = target[name]; 3418 copy = options[name]; 3419 3420 if (target === copy) { 3421 continue; 3422 } 3423 3424 if (deep && copy && ($.isPlainObject(copy) || (copyIsArray = $.isArray(copy)))) { 3425 if (copyIsArray) { 3426 copyIsArray = false; 3427 clone = src && $.isArray(src) ? src : []; 3428 3429 } else { 3430 clone = src && $.isPlainObject(src) ? src : {}; 3431 } 3432 3433 target[name] = $.extend(deep, clone, copy); 3434 3435 } else if (copy !== undefined) { 3436 target[name] = copy; 3437 } 3438 } 3439 } 3440 } 3441 3442 return target; 3443 }; 3444 3445 /* jQuery 1.4.3 */ 3446 $.queue = function (elem, type, data) { 3447 function $makeArray (arr, results) { 3448 var ret = results || []; 3449 3450 if (arr != null) { 3451 if (isArraylike(Object(arr))) { 3452 /* $.merge */ 3453 (function(first, second) { 3454 var len = +second.length, 3455 j = 0, 3456 i = first.length; 3457 3458 while (j < len) { 3459 first[i++] = second[j++]; 3460 } 3461 3462 if (len !== len) { 3463 while (second[j] !== undefined) { 3464 first[i++] = second[j++]; 3465 } 3466 } 3467 3468 first.length = i; 3469 3470 return first; 3471 })(ret, typeof arr === "string" ? [arr] : arr); 3472 } else { 3473 [].push.call(ret, arr); 3474 } 3475 } 3476 3477 return ret; 3478 } 3479 3480 if (!elem) { 3481 return; 3482 } 3483 3484 type = (type || "fx") + "queue"; 3485 3486 var q = $.data(elem, type); 3487 3488 if (!data) { 3489 return q || []; 3490 } 3491 3492 if (!q || $.isArray(data)) { 3493 q = $.data(elem, type, $makeArray(data)); 3494 } else { 3495 q.push(data); 3496 } 3497 3498 return q; 3499 }; 3500 3501 /* jQuery 1.4.3 */ 3502 $.dequeue = function (elems, type) { 3503 /* Custom: Embed element iteration. */ 3504 $.each(elems.nodeType ? [ elems ] : elems, function(i, elem) { 3505 type = type || "fx"; 3506 3507 var queue = $.queue(elem, type), 3508 fn = queue.shift(); 3509 3510 if (fn === "inprogress") { 3511 fn = queue.shift(); 3512 } 3513 3514 if (fn) { 3515 if (type === "fx") { 3516 queue.unshift("inprogress"); 3517 } 3518 3519 fn.call(elem, function() { 3520 $.dequeue(elem, type); 3521 }); 3522 } 3523 }); 3524 }; 3525 3526 /****************** 3527 $.fn Methods 3528 ******************/ 3529 3530 /* jQuery */ 3531 $.fn = $.prototype = { 3532 init: function (selector) { 3533 /* Just return the element wrapped inside an array; don't proceed with the actual jQuery node wrapping process. */ 3534 if (selector.nodeType) { 3535 this[0] = selector; 3536 3537 return this; 3538 } else { 3539 throw new Error("Not a DOM node."); 3540 } 3541 }, 3542 3543 offset: function () { 3544 /* jQuery altered code: Dropped disconnected DOM node checking. */ 3545 var box = this[0].getBoundingClientRect ? this[0].getBoundingClientRect() : { top: 0, left: 0 }; 3546 3547 return { 3548 top: box.top + (window.pageYOffset || document.scrollTop || 0) - (document.clientTop || 0), 3549 left: box.left + (window.pageXOffset || document.scrollLeft || 0) - (document.clientLeft || 0) 3550 }; 3551 }, 3552 3553 position: function () { 3554 /* jQuery */ 3555 function offsetParent() { 3556 var offsetParent = this.offsetParent || document; 3557 3558 while (offsetParent && (!offsetParent.nodeType.toLowerCase === "html" && offsetParent.style.position === "static")) { 3559 offsetParent = offsetParent.offsetParent; 3560 } 3561 3562 return offsetParent || document; 3563 } 3564 3565 /* Zepto */ 3566 var elem = this[0], 3567 offsetParent = offsetParent.apply(elem), 3568 offset = this.offset(), 3569 parentOffset = /^(?:body|html)$/i.test(offsetParent.nodeName) ? { top: 0, left: 0 } : $(offsetParent).offset() 3570 3571 offset.top -= parseFloat(elem.style.marginTop) || 0; 3572 offset.left -= parseFloat(elem.style.marginLeft) || 0; 3573 3574 if (offsetParent.style) { 3575 parentOffset.top += parseFloat(offsetParent.style.borderTopWidth) || 0 3576 parentOffset.left += parseFloat(offsetParent.style.borderLeftWidth) || 0 3577 } 3578 3579 return { 3580 top: offset.top - parentOffset.top, 3581 left: offset.left - parentOffset.left 3582 }; 3583 } 3584 }; 3585 3586 /********************** 3587 Private Variables 3588 **********************/ 3589 3590 /* For $.data() */ 3591 var cache = {}; 3592 $.expando = "velocity" + (new Date().getTime()); 3593 $.uuid = 0; 3594 3595 /* For $.queue() */ 3596 var class2type = {}, 3597 hasOwn = class2type.hasOwnProperty, 3598 toString = class2type.toString; 3599 3600 var types = "Boolean Number String Function Array Date RegExp Object Error".split(" "); 3601 for (var i = 0; i < types.length; i++) { 3602 class2type["[object " + types[i] + "]"] = types[i].toLowerCase(); 3603 } 3604 3605 /* Makes $(node) possible, without having to call init. */ 3606 $.fn.init.prototype = $.fn; 3607 3608 /* Globalize Velocity onto the window, and assign its Utilities property. */ 3609 window.Velocity = { Utilities: $ }; 3610})(window); 3611 3612/****************** 3613 Velocity.js 3614 ******************/ 3615 3616;(function (factory) { 3617 /* CommonJS module. */ 3618 if (typeof module === "object" && typeof module.exports === "object") { 3619 module.exports = factory(); 3620 /* AMD module. */ 3621 } else if (typeof define === "function" && define.amd) { 3622 define(factory); 3623 /* Browser globals. */ 3624 } else { 3625 factory(); 3626 } 3627}(function() { 3628 return function (global, window, document, undefined) { 3629 3630 /*************** 3631 Summary 3632 ***************/ 3633 3634 /* 3635 - CSS: CSS stack that works independently from the rest of Velocity. 3636 - animate(): Core animation method that iterates over the targeted elements and queues the incoming call onto each element individually. 3637 - Pre-Queueing: Prepare the element for animation by instantiating its data cache and processing the call's options. 3638 - Queueing: The logic that runs once the call has reached its point of execution in the element's $.queue() stack. 3639 Most logic is placed here to avoid risking it becoming stale (if the element's properties have changed). 3640 - Pushing: Consolidation of the tween data followed by its push onto the global in-progress calls container. 3641 - tick(): The single requestAnimationFrame loop responsible for tweening all in-progress calls. 3642 - completeCall(): Handles the cleanup process for each Velocity call. 3643 */ 3644 3645 /********************* 3646 Helper Functions 3647 *********************/ 3648 3649 /* IE detection. Gist: https://gist.github.com/julianshapiro/9098609 */ 3650 var IE = (function() { 3651 if (document.documentMode) { 3652 return document.documentMode; 3653 } else { 3654 for (var i = 7; i > 4; i--) { 3655 var div = document.createElement("div"); 3656 3657 div.innerHTML = "<!--[if IE " + i + "]><span></span><![endif]-->"; 3658 3659 if (div.getElementsByTagName("span").length) { 3660 div = null; 3661 3662 return i; 3663 } 3664 } 3665 } 3666 3667 return undefined; 3668 })(); 3669 3670 /* rAF shim. Gist: https://gist.github.com/julianshapiro/9497513 */ 3671 var rAFShim = (function() { 3672 var timeLast = 0; 3673 3674 return window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { 3675 var timeCurrent = (new Date()).getTime(), 3676 timeDelta; 3677 3678 /* Dynamically set delay on a per-tick basis to match 60fps. */ 3679 /* Technique by Erik Moller. MIT license: https://gist.github.com/paulirish/1579671 */ 3680 timeDelta = Math.max(0, 16 - (timeCurrent - timeLast)); 3681 timeLast = timeCurrent + timeDelta; 3682 3683 return setTimeout(function() { callback(timeCurrent + timeDelta); }, timeDelta); 3684 }; 3685 })();
3686 3687 /* Array compacting. Copyright Lo-Dash. MIT License: https://github.com/lodash/lodash/blob/master/LICENSE.txt */ 3688 function compactSparseArray (array) { 3689 var index = -1, 3690 length = array ? array.length : 0, 3691 result = []; 3692 3693 while (++index < length) { 3694 var value = array[index]; 3695 3696 if (value) { 3697 result.push(value); 3698 } 3699 } 3700 3701 return result; 3702 } 3703 3704 function sanitizeElements (elements) { 3705 /* Unwrap jQuery/Zepto objects. */ 3706 if (Type.isWrapped(elements)) { 3707 elements = [].slice.call(elements); 3708 /* Wrap a single element in an array so that $.each() can iterate with the element instead of its node's children. */ 3709 } else if (Type.isNode(elements)) { 3710 elements = [ elements ]; 3711 } 3712 3713 return elements; 3714 } 3715 3716 var Type = { 3717 isString: function (variable) { 3718 return (typeof variable === "string"); 3719 }, 3720 isArray: Array.isArray || function (variable) { 3721 return Object.prototype.toString.call(variable) === "[object Array]"; 3722 }, 3723 isFunction: function (variable) { 3724 return Object.prototype.toString.call(variable) === "[object Function]"; 3725 }, 3726 isNode: function (variable) { 3727 return variable && variable.nodeType; 3728 }, 3729 /* Copyright Martin Bohm. MIT License: https://gist.github.com/Tomalak/818a78a226a0738eaade */ 3730 isNodeList: function (variable) { 3731 return typeof variable === "object" && 3732 /^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(variable)) && 3733 variable.length !== undefined && 3734 (variable.length === 0 || (typeof variable[0] === "object" && variable[0].nodeType > 0)); 3735 }, 3736 /* Determine if variable is a wrapped jQuery or Zepto element. */ 3737 isWrapped: function (variable) { 3738 return variable && (variable.jquery || (window.Zepto && window.Zepto.zepto.isZ(variable))); 3739 }, 3740 isSVG: function (variable) { 3741 return window.SVGElement && (variable instanceof window.SVGElement); 3742 }, 3743 isEmptyObject: function (variable) { 3744 for (var name in variable) { 3745 return false; 3746 } 3747 3748 return true; 3749 } 3750 }; 3751 3752 /***************** 3753 Dependencies 3754 *****************/ 3755 3756 var $, 3757 isJQuery = false; 3758 3759 if (global.fn && global.fn.jquery) { 3760 $ = global; 3761 isJQuery = true; 3762 } else { 3763 $ = window.Velocity.Utilities; 3764 } 3765 3766 if (IE <= 8 && !isJQuery) { 3767 throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity."); 3768 } else if (IE <= 7) { 3769 /* Revert to jQuery's $.animate(), and lose Velocity's extra features. */ 3770 jQuery.fn.velocity = jQuery.fn.animate; 3771 3772 /* Now that $.fn.velocity is aliased, abort this Velocity declaration. */ 3773 return; 3774 } 3775 3776 /***************** 3777 Constants 3778 *****************/ 3779 3780 var DURATION_DEFAULT = 400, 3781 EASING_DEFAULT = "swing"; 3782 3783 /************* 3784 State 3785 *************/ 3786 3787 var Velocity = { 3788 /* Container for page-wide Velocity state data. */ 3789 State: { 3790 /* Detect mobile devices to determine if mobileHA should be turned on. */ 3791 isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), 3792 /* The mobileHA option's behavior changes on older Android devices (Gingerbread, versions 2.3.3-2.3.7). */ 3793 isAndroid: /Android/i.test(navigator.userAgent), 3794 isGingerbread: /Android 2\.3\.[3-7]/i.test(navigator.userAgent), 3795 isChrome: window.chrome, 3796 isFirefox: /Firefox/i.test(navigator.userAgent), 3797 /* Create a cached element for re-use when checking for CSS property prefixes. */ 3798 prefixElement: document.createElement("div"), 3799 /* Cache every prefix match to avoid repeating lookups. */ 3800 prefixMatches: {}, 3801 /* Cache the anchor used for animating window scrolling. */ 3802 scrollAnchor: null, 3803 /* Cache the browser-specific property names associated with the scroll anchor. */ 3804 scrollPropertyLeft: null, 3805 scrollPropertyTop: null, 3806 /* Keep track of whether our RAF tick is running. */ 3807 isTicking: false, 3808 /* Container for every in-progress call to Velocity. */ 3809 calls: [] 3810 }, 3811 /* Velocity's custom CSS stack. Made global for unit testing. */ 3812 CSS: { /* Defined below. */ }, 3813 /* A shim of the jQuery utility functions used by Velocity -- provided by Velocity's optional jQuery shim. */ 3814 Utilities: $, 3815 /* Container for the user's custom animation redirects that are referenced by name in place of the properties map argument. */ 3816 Redirects: { /* Manually registered by the user. */ }, 3817 Easings: { /* Defined below. */ }, 3818 /* Attempt to use ES6 Promises by default. Users can override this with a third-party promises library. */ 3819 Promise: window.Promise, 3820 /* Velocity option defaults, which can be overriden by the user. */ 3821 defaults: { 3822 queue: "", 3823 duration: DURATION_DEFAULT, 3824 easing: EASING_DEFAULT, 3825 begin: undefined, 3826 complete: undefined, 3827 progress: undefined, 3828 display: undefined, 3829 visibility: undefined, 3830 loop: false,
vendor: 57,261 bytes, lines 3831-5044
3831 delay: false, 3832 mobileHA: true, 3833 /* Advanced: Set to false to prevent property values from being cached between consecutive Velocity-initiated chain calls. */ 3834 _cacheValues: true 3835 }, 3836 /* A design goal of Velocity is to cache data wherever possible in order to avoid DOM requerying. Accordingly, each element has a data cache. */ 3837 init: function (element) { 3838 $.data(element, "velocity", { 3839 /* Store whether this is an SVG element, since its properties are retrieved and updated differently than standard HTML elements. */ 3840 isSVG: Type.isSVG(element), 3841 /* Keep track of whether the element is currently being animated by Velocity. 3842 This is used to ensure that property values are not transferred between non-consecutive (stale) calls. */ 3843 isAnimating: false, 3844 /* A reference to the element's live computedStyle object. Learn more here: https://developer.mozilla.org/en/docs/Web/API/window.getComputedStyle */ 3845 computedStyle: null, 3846 /* Tween data is cached for each animation on the element so that data can be passed across calls -- 3847 in particular, end values are used as subsequent start values in consecutive Velocity calls. */ 3848 tweensContainer: null, 3849 /* The full root property values of each CSS hook being animated on this element are cached so that: 3850 1) Concurrently-animating hooks sharing the same root can have their root values' merged into one while tweening. 3851 2) Post-hook-injection root values can be transferred over to consecutively chained Velocity calls as starting root values. */ 3852 rootPropertyValueCache: {}, 3853 /* A cache for transform updates, which must be manually flushed via CSS.flushTransformCache(). */ 3854 transformCache: {} 3855 }); 3856 }, 3857 /* A parallel to jQuery's $.css(), used for getting/setting Velocity's hooked CSS properties. */ 3858 hook: null, /* Defined below. */ 3859 /* Velocity-wide animation time remapping for testing purposes. */ 3860 mock: false, 3861 version: { major: 1, minor: 2, patch: 2 }, 3862 /* Set to 1 or 2 (most verbose) to output debug info to console. */ 3863 debug: false 3864 }; 3865 3866 /* Retrieve the appropriate scroll anchor and property name for the browser: https://developer.mozilla.org/en-US/docs/Web/API/Window.scrollY */ 3867 if (window.pageYOffset !== undefined) { 3868 Velocity.State.scrollAnchor = window; 3869 Velocity.State.scrollPropertyLeft = "pageXOffset"; 3870 Velocity.State.scrollPropertyTop = "pageYOffset"; 3871 } else { 3872 Velocity.State.scrollAnchor = document.documentElement || document.body.parentNode || document.body; 3873 Velocity.State.scrollPropertyLeft = "scrollLeft"; 3874 Velocity.State.scrollPropertyTop = "scrollTop"; 3875 } 3876 3877 /* Shorthand alias for jQuery's $.data() utility. */ 3878 function Data (element) { 3879 /* Hardcode a reference to the plugin name. */ 3880 var response = $.data(element, "velocity"); 3881 3882 /* jQuery <=1.4.2 returns null instead of undefined when no match is found. We normalize this behavior. */ 3883 return response === null ? undefined : response; 3884 }; 3885 3886 /************** 3887 Easing 3888 **************/ 3889 3890 /* Step easing generator. */ 3891 function generateStep (steps) { 3892 return function (p) { 3893 return Math.round(p * steps) * (1 / steps); 3894 }; 3895 } 3896 3897 /* Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */ 3898 function generateBezier (mX1, mY1, mX2, mY2) { 3899 var NEWTON_ITERATIONS = 4, 3900 NEWTON_MIN_SLOPE = 0.001, 3901 SUBDIVISION_PRECISION = 0.0000001, 3902 SUBDIVISION_MAX_ITERATIONS = 10, 3903 kSplineTableSize = 11, 3904 kSampleStepSize = 1.0 / (kSplineTableSize - 1.0), 3905 float32ArraySupported = "Float32Array" in window; 3906 3907 /* Must contain four arguments. */ 3908 if (arguments.length !== 4) { 3909 return false; 3910 } 3911 3912 /* Arguments must be numbers. */ 3913 for (var i = 0; i < 4; ++i) { 3914 if (typeof arguments[i] !== "number" || isNaN(arguments[i]) || !isFinite(arguments[i])) { 3915 return false; 3916 } 3917 } 3918 3919 /* X values must be in the [0, 1] range. */ 3920 mX1 = Math.min(mX1, 1); 3921 mX2 = Math.min(mX2, 1); 3922 mX1 = Math.max(mX1, 0); 3923 mX2 = Math.max(mX2, 0); 3924 3925 var mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize); 3926 3927 function A (aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; } 3928 function B (aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; } 3929 function C (aA1) { return 3.0 * aA1; } 3930 3931 function calcBezier (aT, aA1, aA2) { 3932 return ((A(aA1, aA2)*aT + B(aA1, aA2))*aT + C(aA1))*aT; 3933 } 3934 3935 function getSlope (aT, aA1, aA2) { 3936 return 3.0 * A(aA1, aA2)*aT*aT + 2.0 * B(aA1, aA2) * aT + C(aA1); 3937 } 3938 3939 function newtonRaphsonIterate (aX, aGuessT) { 3940 for (var i = 0; i < NEWTON_ITERATIONS; ++i) { 3941 var currentSlope = getSlope(aGuessT, mX1, mX2); 3942 3943 if (currentSlope === 0.0) return aGuessT; 3944 3945 var currentX = calcBezier(aGuessT, mX1, mX2) - aX; 3946 aGuessT -= currentX / currentSlope; 3947 } 3948 3949 return aGuessT; 3950 } 3951 3952 function calcSampleValues () { 3953 for (var i = 0; i < kSplineTableSize; ++i) { 3954 mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2); 3955 } 3956 } 3957 3958 function binarySubdivide (aX, aA, aB) { 3959 var currentX, currentT, i = 0; 3960 3961 do { 3962 currentT = aA + (aB - aA) / 2.0; 3963 currentX = calcBezier(currentT, mX1, mX2) - aX; 3964 if (currentX > 0.0) { 3965 aB = currentT; 3966 } else { 3967 aA = currentT; 3968 } 3969 } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS); 3970 3971 return currentT; 3972 } 3973 3974 function getTForX (aX) { 3975 var intervalStart = 0.0, 3976 currentSample = 1, 3977 lastSample = kSplineTableSize - 1; 3978 3979 for (; currentSample != lastSample && mSampleValues[currentSample] <= aX; ++currentSample) { 3980 intervalStart += kSampleStepSize; 3981 } 3982 3983 --currentSample; 3984 3985 var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample+1] - mSampleValues[currentSample]), 3986 guessForT = intervalStart + dist * kSampleStepSize, 3987 initialSlope = getSlope(guessForT, mX1, mX2); 3988 3989 if (initialSlope >= NEWTON_MIN_SLOPE) { 3990 return newtonRaphsonIterate(aX, guessForT); 3991 } else if (initialSlope == 0.0) { 3992 return guessForT; 3993 } else { 3994 return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize); 3995 } 3996 } 3997 3998 var _precomputed = false; 3999 4000 function precompute() { 4001 _precomputed = true; 4002 if (mX1 != mY1 || mX2 != mY2) calcSampleValues(); 4003 } 4004 4005 var f = function (aX) { 4006 if (!_precomputed) precompute(); 4007 if (mX1 === mY1 && mX2 === mY2) return aX; 4008 if (aX === 0) return 0; 4009 if (aX === 1) return 1; 4010 4011 return calcBezier(getTForX(aX), mY1, mY2); 4012 }; 4013 4014 f.getControlPoints = function() { return [{ x: mX1, y: mY1 }, { x: mX2, y: mY2 }]; }; 4015 4016 var str = "generateBezier(" + [mX1, mY1, mX2, mY2] + ")"; 4017 f.toString = function () { return str; }; 4018 4019 return f; 4020 } 4021 4022 /* Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ 4023 /* Given a tension, friction, and duration, a simulation at 60FPS will first run without a defined duration in order to calculate the full path. A second pass 4024 then adjusts the time delta -- using the relation between actual time and duration -- to calculate the path for the duration-constrained animation. */ 4025 var generateSpringRK4 = (function () { 4026 function springAccelerationForState (state) { 4027 return (-state.tension * state.x) - (state.friction * state.v); 4028 } 4029 4030 function springEvaluateStateWithDerivative (initialState, dt, derivative) { 4031 var state = { 4032 x: initialState.x + derivative.dx * dt, 4033 v: initialState.v + derivative.dv * dt, 4034 tension: initialState.tension, 4035 friction: initialState.friction 4036 }; 4037 4038 return { dx: state.v, dv: springAccelerationForState(state) }; 4039 } 4040 4041 function springIntegrateState (state, dt) { 4042 var a = { 4043 dx: state.v, 4044 dv: springAccelerationForState(state) 4045 }, 4046 b = springEvaluateStateWithDerivative(state, dt * 0.5, a), 4047 c = springEvaluateStateWithDerivative(state, dt * 0.5, b), 4048 d = springEvaluateStateWithDerivative(state, dt, c), 4049 dxdt = 1.0 / 6.0 * (a.dx + 2.0 * (b.dx + c.dx) + d.dx), 4050 dvdt = 1.0 / 6.0 * (a.dv + 2.0 * (b.dv + c.dv) + d.dv); 4051 4052 state.x = state.x + dxdt * dt; 4053 state.v = state.v + dvdt * dt; 4054 4055 return state; 4056 } 4057 4058 return function springRK4Factory (tension, friction, duration) { 4059 4060 var initState = { 4061 x: -1, 4062 v: 0, 4063 tension: null, 4064 friction: null 4065 }, 4066 path = [0], 4067 time_lapsed = 0, 4068 tolerance = 1 / 10000, 4069 DT = 16 / 1000, 4070 have_duration, dt, last_state; 4071 4072 tension = parseFloat(tension) || 500; 4073 friction = parseFloat(friction) || 20; 4074 duration = duration || null; 4075 4076 initState.tension = tension; 4077 initState.friction = friction; 4078 4079 have_duration = duration !== null; 4080 4081 /* Calculate the actual time it takes for this animation to complete with the provided conditions. */ 4082 if (have_duration) { 4083 /* Run the simulation without a duration. */ 4084 time_lapsed = springRK4Factory(tension, friction); 4085 /* Compute the adjusted time delta. */ 4086 dt = time_lapsed / duration * DT; 4087 } else { 4088 dt = DT; 4089 } 4090 4091 while (true) { 4092 /* Next/step function .*/ 4093 last_state = springIntegrateState(last_state || initState, dt); 4094 /* Store the position. */ 4095 path.push(1 + last_state.x); 4096 time_lapsed += 16; 4097 /* If the change threshold is reached, break. */ 4098 if (!(Math.abs(last_state.x) > tolerance && Math.abs(last_state.v) > tolerance)) { 4099 break; 4100 } 4101 } 4102 4103 /* If duration is not defined, return the actual time required for completing this animation. Otherwise, return a closure that holds the 4104 computed path and returns a snapshot of the position according to a given percentComplete. */ 4105 return !have_duration ? time_lapsed : function(percentComplete) { return path[ (percentComplete * (path.length - 1)) | 0 ]; }; 4106 }; 4107 }()); 4108 4109 /* jQuery easings. */ 4110 Velocity.Easings = { 4111 linear: function(p) { return p; }, 4112 swing: function(p) { return 0.5 - Math.cos( p * Math.PI ) / 2 }, 4113 /* Bonus "spring" easing, which is a less exaggerated version of easeInOutElastic. */ 4114 spring: function(p) { return 1 - (Math.cos(p * 4.5 * Math.PI) * Math.exp(-p * 6)); } 4115 }; 4116 4117 /* CSS3 and Robert Penner easings. */ 4118 $.each( 4119 [ 4120 [ "ease", [ 0.25, 0.1, 0.25, 1.0 ] ], 4121 [ "ease-in", [ 0.42, 0.0, 1.00, 1.0 ] ], 4122 [ "ease-out", [ 0.00, 0.0, 0.58, 1.0 ] ], 4123 [ "ease-in-out", [ 0.42, 0.0, 0.58, 1.0 ] ], 4124 [ "easeInSine", [ 0.47, 0, 0.745, 0.715 ] ], 4125 [ "easeOutSine", [ 0.39, 0.575, 0.565, 1 ] ], 4126 [ "easeInOutSine", [ 0.445, 0.05, 0.55, 0.95 ] ], 4127 [ "easeInQuad", [ 0.55, 0.085, 0.68, 0.53 ] ], 4128 [ "easeOutQuad", [ 0.25, 0.46, 0.45, 0.94 ] ], 4129 [ "easeInOutQuad", [ 0.455, 0.03, 0.515, 0.955 ] ], 4130 [ "easeInCubic", [ 0.55, 0.055, 0.675, 0.19 ] ], 4131 [ "easeOutCubic", [ 0.215, 0.61, 0.355, 1 ] ], 4132 [ "easeInOutCubic", [ 0.645, 0.045, 0.355, 1 ] ], 4133 [ "easeInQuart", [ 0.895, 0.03, 0.685, 0.22 ] ], 4134 [ "easeOutQuart", [ 0.165, 0.84, 0.44, 1 ] ], 4135 [ "easeInOutQuart", [ 0.77, 0, 0.175, 1 ] ], 4136 [ "easeInQuint", [ 0.755, 0.05, 0.855, 0.06 ] ], 4137 [ "easeOutQuint", [ 0.23, 1, 0.32, 1 ] ], 4138 [ "easeInOutQuint", [ 0.86, 0, 0.07, 1 ] ], 4139 [ "easeInExpo", [ 0.95, 0.05, 0.795, 0.035 ] ], 4140 [ "easeOutExpo", [ 0.19, 1, 0.22, 1 ] ], 4141 [ "easeInOutExpo", [ 1, 0, 0, 1 ] ], 4142 [ "easeInCirc", [ 0.6, 0.04, 0.98, 0.335 ] ], 4143 [ "easeOutCirc", [ 0.075, 0.82, 0.165, 1 ] ], 4144 [ "easeInOutCirc", [ 0.785, 0.135, 0.15, 0.86 ] ] 4145 ], function(i, easingArray) { 4146 Velocity.Easings[easingArray[0]] = generateBezier.apply(null, easingArray[1]); 4147 }); 4148 4149 /* Determine the appropriate easing type given an easing input. */ 4150 function getEasing(value, duration) { 4151 var easing = value; 4152 4153 /* The easing option can either be a string that references a pre-registered easing, 4154 or it can be a two-/four-item array of integers to be converted into a bezier/spring function. */ 4155 if (Type.isString(value)) { 4156 /* Ensure that the easing has been assigned to jQuery's Velocity.Easings object. */ 4157 if (!Velocity.Easings[value]) { 4158 easing = false; 4159 } 4160 } else if (Type.isArray(value) && value.length === 1) { 4161 easing = generateStep.apply(null, value); 4162 } else if (Type.isArray(value) && value.length === 2) { 4163 /* springRK4 must be passed the animation's duration. */ 4164 /* Note: If the springRK4 array contains non-numbers, generateSpringRK4() returns an easing 4165 function generated with default tension and friction values. */ 4166 easing = generateSpringRK4.apply(null, value.concat([ duration ])); 4167 } else if (Type.isArray(value) && value.length === 4) { 4168 /* Note: If the bezier array contains non-numbers, generateBezier() returns false. */ 4169 easing = generateBezier.apply(null, value); 4170 } else { 4171 easing = false; 4172 } 4173 4174 /* Revert to the Velocity-wide default easing type, or fall back to "swing" (which is also jQuery's default) 4175 if the Velocity-wide default has been incorrectly modified. */ 4176 if (easing === false) { 4177 if (Velocity.Easings[Velocity.defaults.easing]) { 4178 easing = Velocity.defaults.easing; 4179 } else { 4180 easing = EASING_DEFAULT; 4181 } 4182 } 4183 4184 return easing; 4185 } 4186 4187 /***************** 4188 CSS Stack 4189 *****************/ 4190 4191 /* The CSS object is a highly condensed and performant CSS stack that fully replaces jQuery's. 4192 It handles the validation, getting, and setting of both standard CSS properties and CSS property hooks. */ 4193 /* Note: A "CSS" shorthand is aliased so that our code is easier to read. */ 4194 var CSS = Velocity.CSS = { 4195 4196 /************* 4197 RegEx 4198 *************/ 4199 4200 RegEx: { 4201 isHex: /^#([A-f\d]{3}){1,2}$/i, 4202 /* Unwrap a property value's surrounding text, e.g. "rgba(4, 3, 2, 1)" ==> "4, 3, 2, 1" and "rect(4px 3px 2px 1px)" ==> "4px 3px 2px 1px". */ 4203 valueUnwrap: /^[A-z]+\((.*)\)$/i, 4204 wrappedValueAlreadyExtracted: /[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/, 4205 /* Split a multi-value property into an array of subvalues, e.g. "rgba(4, 3, 2, 1) 4px 3px 2px 1px" ==> [ "rgba(4, 3, 2, 1)", "4px", "3px", "2px", "1px" ]. */ 4206 valueSplit: /([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/ig 4207 }, 4208 4209 /************ 4210 Lists 4211 ************/ 4212 4213 Lists: { 4214 colors: [ "fill", "stroke", "stopColor", "color", "backgroundColor", "borderColor", "borderTopColor", "borderRightColor", "borderBottomColor", "borderLeftColor", "outlineColor" ], 4215 transformsBase: [ "translateX", "translateY", "scale", "scaleX", "scaleY", "skewX", "skewY", "rotateZ" ], 4216 transforms3D: [ "transformPerspective", "translateZ", "scaleZ", "rotateX", "rotateY" ] 4217 }, 4218 4219 /************ 4220 Hooks 4221 ************/ 4222 4223 /* Hooks allow a subproperty (e.g. "boxShadowBlur") of a compound-value CSS property 4224 (e.g. "boxShadow: X Y Blur Spread Color") to be animated as if it were a discrete property. */ 4225 /* Note: Beyond enabling fine-grained property animation, hooking is necessary since Velocity only 4226 tweens properties with single numeric values; unlike CSS transitions, Velocity does not interpolate compound-values. */ 4227 Hooks: { 4228 /******************** 4229 Registration 4230 ********************/ 4231 4232 /* Templates are a concise way of indicating which subproperties must be individually registered for each compound-value CSS property. */ 4233 /* Each template consists of the compound-value's base name, its constituent subproperty names, and those subproperties' default values. */ 4234 templates: { 4235 "textShadow": [ "Color X Y Blur", "black 0px 0px 0px" ], 4236 "boxShadow": [ "Color X Y Blur Spread", "black 0px 0px 0px 0px" ], 4237 "clip": [ "Top Right Bottom Left", "0px 0px 0px 0px" ], 4238 "backgroundPosition": [ "X Y", "0% 0%" ], 4239 "transformOrigin": [ "X Y Z", "50% 50% 0px" ], 4240 "perspectiveOrigin": [ "X Y", "50% 50%" ] 4241 }, 4242 4243 /* A "registered" hook is one that has been converted from its template form into a live, 4244 tweenable property. It contains data to associate it with its root property. */ 4245 registered: { 4246 /* Note: A registered hook looks like this ==> textShadowBlur: [ "textShadow", 3 ], 4247 which consists of the subproperty's name, the associated root property's name, 4248 and the subproperty's position in the root's value. */ 4249 }, 4250 /* Convert the templates into individual hooks then append them to the registered object above. */ 4251 register: function () { 4252 /* Color hooks registration: Colors are defaulted to white -- as opposed to black -- since colors that are 4253 currently set to "transparent" default to their respective template below when color-animated, 4254 and white is typically a closer match to transparent than black is. An exception is made for text ("color"), 4255 which is almost always set closer to black than white. */ 4256 for (var i = 0; i < CSS.Lists.colors.length; i++) { 4257 var rgbComponents = (CSS.Lists.colors[i] === "color") ? "0 0 0 1" : "255 255 255 1"; 4258 CSS.Hooks.templates[CSS.Lists.colors[i]] = [ "Red Green Blue Alpha", rgbComponents ]; 4259 } 4260 4261 var rootProperty, 4262 hookTemplate, 4263 hookNames; 4264 4265 /* In IE, color values inside compound-value properties are positioned at the end the value instead of at the beginning. 4266 Thus, we re-arrange the templates accordingly. */ 4267 if (IE) { 4268 for (rootProperty in CSS.Hooks.templates) { 4269 hookTemplate = CSS.Hooks.templates[rootProperty]; 4270 hookNames = hookTemplate[0].split(" "); 4271 4272 var defaultValues = hookTemplate[1].match(CSS.RegEx.valueSplit); 4273 4274 if (hookNames[0] === "Color") { 4275 /* Reposition both the hook's name and its default value to the end of their respective strings. */ 4276 hookNames.push(hookNames.shift()); 4277 defaultValues.push(defaultValues.shift()); 4278 4279 /* Replace the existing template for the hook's root property. */ 4280 CSS.Hooks.templates[rootProperty] = [ hookNames.join(" "), defaultValues.join(" ") ]; 4281 } 4282 } 4283 } 4284 4285 /* Hook registration. */ 4286 for (rootProperty in CSS.Hooks.templates) { 4287 hookTemplate = CSS.Hooks.templates[rootProperty]; 4288 hookNames = hookTemplate[0].split(" "); 4289 4290 for (var i in hookNames) { 4291 var fullHookName = rootProperty + hookNames[i], 4292 hookPosition = i; 4293 4294 /* For each hook, register its full name (e.g. textShadowBlur) with its root property (e.g. textShadow) 4295 and the hook's position in its template's default value string. */ 4296 CSS.Hooks.registered[fullHookName] = [ rootProperty, hookPosition ]; 4297 } 4298 } 4299 }, 4300 4301 /***************************** 4302 Injection and Extraction 4303 *****************************/ 4304 4305 /* Look up the root property associated with the hook (e.g. return "textShadow" for "textShadowBlur"). */ 4306 /* Since a hook cannot be set directly (the browser won't recognize it), style updating for hooks is routed through the hook's root property. */ 4307 getRoot: function (property) { 4308 var hookData = CSS.Hooks.registered[property]; 4309 4310 if (hookData) { 4311 return hookData[0]; 4312 } else { 4313 /* If there was no hook match, return the property name untouched. */ 4314 return property; 4315 } 4316 }, 4317 /* Convert any rootPropertyValue, null or otherwise, into a space-delimited list of hook values so that 4318 the targeted hook can be injected or extracted at its standard position. */ 4319 cleanRootPropertyValue: function(rootProperty, rootPropertyValue) { 4320 /* If the rootPropertyValue is wrapped with "rgb()", "clip()", etc., remove the wrapping to normalize the value before manipulation. */ 4321 if (CSS.RegEx.valueUnwrap.test(rootPropertyValue)) { 4322 rootPropertyValue = rootPropertyValue.match(CSS.RegEx.valueUnwrap)[1]; 4323 } 4324 4325 /* If rootPropertyValue is a CSS null-value (from which there's inherently no hook value to extract), 4326 default to the root's default value as defined in CSS.Hooks.templates. */ 4327 /* Note: CSS null-values include "none", "auto", and "transparent". They must be converted into their 4328 zero-values (e.g. textShadow: "none" ==> textShadow: "0px 0px 0px black") for hook manipulation to proceed. */ 4329 if (CSS.Values.isCSSNullValue(rootPropertyValue)) { 4330 rootPropertyValue = CSS.Hooks.templates[rootProperty][1]; 4331 } 4332 4333 return rootPropertyValue; 4334 }, 4335 /* Extracted the hook's value from its root property's value. This is used to get the starting value of an animating hook. */ 4336 extractValue: function (fullHookName, rootPropertyValue) { 4337 var hookData = CSS.Hooks.registered[fullHookName]; 4338 4339 if (hookData) { 4340 var hookRoot = hookData[0], 4341 hookPosition = hookData[1]; 4342 4343 rootPropertyValue = CSS.Hooks.cleanRootPropertyValue(hookRoot, rootPropertyValue); 4344 4345 /* Split rootPropertyValue into its constituent hook values then grab the desired hook at its standard position. */ 4346 return rootPropertyValue.toString().match(CSS.RegEx.valueSplit)[hookPosition]; 4347 } else { 4348 /* If the provided fullHookName isn't a registered hook, return the rootPropertyValue that was passed in. */ 4349 return rootPropertyValue; 4350 } 4351 }, 4352 /* Inject the hook's value into its root property's value. This is used to piece back together the root property 4353 once Velocity has updated one of its individually hooked values through tweening. */ 4354 injectValue: function (fullHookName, hookValue, rootPropertyValue) { 4355 var hookData = CSS.Hooks.registered[fullHookName]; 4356 4357 if (hookData) { 4358 var hookRoot = hookData[0], 4359 hookPosition = hookData[1], 4360 rootPropertyValueParts, 4361 rootPropertyValueUpdated; 4362 4363 rootPropertyValue = CSS.Hooks.cleanRootPropertyValue(hookRoot, rootPropertyValue); 4364 4365 /* Split rootPropertyValue into its individual hook values, replace the targeted value with hookValue, 4366 then reconstruct the rootPropertyValue string. */ 4367 rootPropertyValueParts = rootPropertyValue.toString().match(CSS.RegEx.valueSplit); 4368 rootPropertyValueParts[hookPosition] = hookValue; 4369 rootPropertyValueUpdated = rootPropertyValueParts.join(" "); 4370 4371 return rootPropertyValueUpdated; 4372 } else { 4373 /* If the provided fullHookName isn't a registered hook, return the rootPropertyValue that was passed in. */ 4374 return rootPropertyValue; 4375 } 4376 } 4377 }, 4378 4379 /******************* 4380 Normalizations 4381 *******************/ 4382 4383 /* Normalizations standardize CSS property manipulation by pollyfilling browser-specific implementations (e.g. opacity) 4384 and reformatting special properties (e.g. clip, rgba) to look like standard ones. */ 4385 Normalizations: { 4386 /* Normalizations are passed a normalization target (either the property's name, its extracted value, or its injected value), 4387 the targeted element (which may need to be queried), and the targeted property value. */ 4388 registered: { 4389 clip: function (type, element, propertyValue) { 4390 switch (type) { 4391 case "name": 4392 return "clip"; 4393 /* Clip needs to be unwrapped and stripped of its commas during extraction. */ 4394 case "extract": 4395 var extracted; 4396 4397 /* If Velocity also extracted this value, skip extraction. */ 4398 if (CSS.RegEx.wrappedValueAlreadyExtracted.test(propertyValue)) { 4399 extracted = propertyValue; 4400 } else { 4401 /* Remove the "rect()" wrapper. */ 4402 extracted = propertyValue.toString().match(CSS.RegEx.valueUnwrap); 4403 4404 /* Strip off commas. */ 4405 extracted = extracted ? extracted[1].replace(/,(\s+)?/g, " ") : propertyValue; 4406 } 4407 4408 return extracted; 4409 /* Clip needs to be re-wrapped during injection. */ 4410 case "inject": 4411 return "rect(" + propertyValue + ")"; 4412 } 4413 }, 4414 4415 blur: function(type, element, propertyValue) { 4416 switch (type) { 4417 case "name": 4418 return Velocity.State.isFirefox ? "filter" : "-webkit-filter"; 4419 case "extract": 4420 var extracted = parseFloat(propertyValue); 4421 4422 /* If extracted is NaN, meaning the value isn't already extracted. */ 4423 if (!(extracted || extracted === 0)) { 4424 var blurComponent = propertyValue.toString().match(/blur\(([0-9]+[A-z]+)\)/i); 4425 4426 /* If the filter string had a blur component, return just the blur value and unit type. */ 4427 if (blurComponent) { 4428 extracted = blurComponent[1]; 4429 /* If the component doesn't exist, default blur to 0. */ 4430 } else { 4431 extracted = 0; 4432 } 4433 } 4434 4435 return extracted; 4436 /* Blur needs to be re-wrapped during injection. */ 4437 case "inject": 4438 /* For the blur effect to be fully de-applied, it needs to be set to "none" instead of 0. */ 4439 if (!parseFloat(propertyValue)) { 4440 return "none"; 4441 } else { 4442 return "blur(" + propertyValue + ")"; 4443 } 4444 } 4445 }, 4446 4447 /* <=IE8 do not support the standard opacity property. They use filter:alpha(opacity=INT) instead. */ 4448 opacity: function (type, element, propertyValue) { 4449 if (IE <= 8) { 4450 switch (type) { 4451 case "name": 4452 return "filter"; 4453 case "extract": 4454 /* <=IE8 return a "filter" value of "alpha(opacity=\d{1,3})". 4455 Extract the value and convert it to a decimal value to match the standard CSS opacity property's formatting. */ 4456 var extracted = propertyValue.toString().match(/alpha\(opacity=(.*)\)/i); 4457 4458 if (extracted) { 4459 /* Convert to decimal value. */ 4460 propertyValue = extracted[1] / 100; 4461 } else { 4462 /* When extracting opacity, default to 1 since a null value means opacity hasn't been set. */ 4463 propertyValue = 1; 4464 } 4465 4466 return propertyValue; 4467 case "inject": 4468 /* Opacified elements are required to have their zoom property set to a non-zero value. */ 4469 element.style.zoom = 1; 4470 4471 /* Setting the filter property on elements with certain font property combinations can result in a 4472 highly unappealing ultra-bolding effect. There's no way to remedy this throughout a tween, but dropping the 4473 value altogether (when opacity hits 1) at leasts ensures that the glitch is gone post-tweening. */ 4474 if (parseFloat(propertyValue) >= 1) { 4475 return ""; 4476 } else { 4477 /* As per the filter property's spec, convert the decimal value to a whole number and wrap the value. */ 4478 return "alpha(opacity=" + parseInt(parseFloat(propertyValue) * 100, 10) + ")"; 4479 } 4480 } 4481 /* With all other browsers, normalization is not required; return the same values that were passed in. */ 4482 } else { 4483 switch (type) { 4484 case "name": 4485 return "opacity"; 4486 case "extract": 4487 return propertyValue; 4488 case "inject": 4489 return propertyValue; 4490 } 4491 } 4492 } 4493 }, 4494 4495 /***************************** 4496 Batched Registrations 4497 *****************************/ 4498 4499 /* Note: Batched normalizations extend the CSS.Normalizations.registered object. */ 4500 register: function () { 4501 4502 /***************** 4503 Transforms 4504 *****************/ 4505 4506 /* Transforms are the subproperties contained by the CSS "transform" property. Transforms must undergo normalization 4507 so that they can be referenced in a properties map by their individual names. */ 4508 /* Note: When transforms are "set", they are actually assigned to a per-element transformCache. When all transform 4509 setting is complete complete, CSS.flushTransformCache() must be manually called to flush the values to the DOM. 4510 Transform setting is batched in this way to improve performance: the transform style only needs to be updated 4511 once when multiple transform subproperties are being animated simultaneously. */ 4512 /* Note: IE9 and Android Gingerbread have support for 2D -- but not 3D -- transforms. Since animating unsupported 4513 transform properties results in the browser ignoring the *entire* transform string, we prevent these 3D values 4514 from being normalized for these browsers so that tweening skips these properties altogether 4515 (since it will ignore them as being unsupported by the browser.) */ 4516 if (!(IE <= 9) && !Velocity.State.isGingerbread) { 4517 /* Note: Since the standalone CSS "perspective" property and the CSS transform "perspective" subproperty 4518 share the same name, the latter is given a unique token within Velocity: "transformPerspective". */ 4519 CSS.Lists.transformsBase = CSS.Lists.transformsBase.concat(CSS.Lists.transforms3D); 4520 } 4521 4522 for (var i = 0; i < CSS.Lists.transformsBase.length; i++) { 4523 /* Wrap the dynamically generated normalization function in a new scope so that transformName's value is 4524 paired with its respective function. (Otherwise, all functions would take the final for loop's transformName.) */ 4525 (function() { 4526 var transformName = CSS.Lists.transformsBase[i]; 4527 4528 CSS.Normalizations.registered[transformName] = function (type, element, propertyValue) { 4529 switch (type) { 4530 /* The normalized property name is the parent "transform" property -- the property that is actually set in CSS. */ 4531 case "name": 4532 return "transform"; 4533 /* Transform values are cached onto a per-element transformCache object. */ 4534 case "extract": 4535 /* If this transform has yet to be assigned a value, return its null value. */ 4536 if (Data(element) === undefined || Data(element).transformCache[transformName] === undefined) { 4537 /* Scale CSS.Lists.transformsBase default to 1 whereas all other transform properties default to 0. */ 4538 return /^scale/i.test(transformName) ? 1 : 0; 4539 /* When transform values are set, they are wrapped in parentheses as per the CSS spec. 4540 Thus, when extracting their values (for tween calculations), we strip off the parentheses. */ 4541 } else { 4542 return Data(element).transformCache[transformName].replace(/[()]/g, ""); 4543 } 4544 case "inject": 4545 var invalid = false; 4546 4547 /* If an individual transform property contains an unsupported unit type, the browser ignores the *entire* transform property. 4548 Thus, protect users from themselves by skipping setting for transform values supplied with invalid unit types. */ 4549 /* Switch on the base transform type; ignore the axis by removing the last letter from the transform's name. */ 4550 switch (transformName.substr(0, transformName.length - 1)) { 4551 /* Whitelist unit types for each transform. */ 4552 case "translate": 4553 invalid = !/(%|px|em|rem|vw|vh|\d)$/i.test(propertyValue); 4554 break; 4555 /* Since an axis-free "scale" property is supported as well, a little hack is used here to detect it by chopping off its last letter. */ 4556 case "scal": 4557 case "scale": 4558 /* Chrome on Android has a bug in which scaled elements blur if their initial scale 4559 value is below 1 (which can happen with forcefeeding). Thus, we detect a yet-unset scale property 4560 and ensure that its first value is always 1. More info: http://stackoverflow.com/questions/10417890/css3-animations-with-transform-causes-blurred-elements-on-webkit/10417962#10417962 */ 4561 if (Velocity.State.isAndroid && Data(element).transformCache[transformName] === undefined && propertyValue < 1) { 4562 propertyValue = 1; 4563 } 4564 4565 invalid = !/(\d)$/i.test(propertyValue); 4566 break; 4567 case "skew": 4568 invalid = !/(deg|\d)$/i.test(propertyValue); 4569 break; 4570 case "rotate": 4571 invalid = !/(deg|\d)$/i.test(propertyValue); 4572 break; 4573 } 4574 4575 if (!invalid) { 4576 /* As per the CSS spec, wrap the value in parentheses. */ 4577 Data(element).transformCache[transformName] = "(" + propertyValue + ")"; 4578 } 4579 4580 /* Although the value is set on the transformCache object, return the newly-updated value for the calling code to process as normal. */ 4581 return Data(element).transformCache[transformName]; 4582 } 4583 }; 4584 })(); 4585 } 4586 4587 /************* 4588 Colors 4589 *************/ 4590 4591 /* Since Velocity only animates a single numeric value per property, color animation is achieved by hooking the individual RGBA components of CSS color properties. 4592 Accordingly, color values must be normalized (e.g. "#ff0000", "red", and "rgb(255, 0, 0)" ==> "255 0 0 1") so that their components can be injected/extracted by CSS.Hooks logic. */ 4593 for (var i = 0; i < CSS.Lists.colors.length; i++) { 4594 /* Wrap the dynamically generated normalization function in a new scope so that colorName's value is paired with its respective function. 4595 (Otherwise, all functions would take the final for loop's colorName.) */ 4596 (function () { 4597 var colorName = CSS.Lists.colors[i]; 4598 4599 /* Note: In IE<=8, which support rgb but not rgba, color properties are reverted to rgb by stripping off the alpha component. */ 4600 CSS.Normalizations.registered[colorName] = function(type, element, propertyValue) { 4601 switch (type) { 4602 case "name": 4603 return colorName; 4604 /* Convert all color values into the rgb format. (Old IE can return hex values and color names instead of rgb/rgba.) */ 4605 case "extract": 4606 var extracted; 4607 4608 /* If the color is already in its hookable form (e.g. "255 255 255 1") due to having been previously extracted, skip extraction. */ 4609 if (CSS.RegEx.wrappedValueAlreadyExtracted.test(propertyValue)) { 4610 extracted = propertyValue; 4611 } else { 4612 var converted, 4613 colorNames = { 4614 black: "rgb(0, 0, 0)", 4615 blue: "rgb(0, 0, 255)", 4616 gray: "rgb(128, 128, 128)", 4617 green: "rgb(0, 128, 0)", 4618 red: "rgb(255, 0, 0)", 4619 white: "rgb(255, 255, 255)" 4620 }; 4621 4622 /* Convert color names to rgb. */ 4623 if (/^[A-z]+$/i.test(propertyValue)) { 4624 if (colorNames[propertyValue] !== undefined) { 4625 converted = colorNames[propertyValue] 4626 } else { 4627 /* If an unmatched color name is provided, default to black. */ 4628 converted = colorNames.black; 4629 } 4630 /* Convert hex values to rgb. */ 4631 } else if (CSS.RegEx.isHex.test(propertyValue)) { 4632 converted = "rgb(" + CSS.Values.hexToRgb(propertyValue).join(" ") + ")"; 4633 /* If the provided color doesn't match any of the accepted color formats, default to black. */ 4634 } else if (!(/^rgba?\(/i.test(propertyValue))) { 4635 converted = colorNames.black; 4636 } 4637 4638 /* Remove the surrounding "rgb/rgba()" string then replace commas with spaces and strip 4639 repeated spaces (in case the value included spaces to begin with). */ 4640 extracted = (converted || propertyValue).toString().match(CSS.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g, " "); 4641 } 4642 4643 /* So long as this isn't <=IE8, add a fourth (alpha) component if it's missing and default it to 1 (visible). */ 4644 if (!(IE <= 8) && extracted.split(" ").length === 3) { 4645 extracted += " 1"; 4646 } 4647 4648 return extracted; 4649 case "inject": 4650 /* If this is IE<=8 and an alpha component exists, strip it off. */ 4651 if (IE <= 8) { 4652 if (propertyValue.split(" ").length === 4) { 4653 propertyValue = propertyValue.split(/\s+/).slice(0, 3).join(" "); 4654 } 4655 /* Otherwise, add a fourth (alpha) component if it's missing and default it to 1 (visible). */ 4656 } else if (propertyValue.split(" ").length === 3) { 4657 propertyValue += " 1"; 4658 } 4659 4660 /* Re-insert the browser-appropriate wrapper("rgb/rgba()"), insert commas, and strip off decimal units 4661 on all values but the fourth (R, G, and B only accept whole numbers). */ 4662 return (IE <= 8 ? "rgb" : "rgba") + "(" + propertyValue.replace(/\s+/g, ",").replace(/\.(\d)+(?=,)/g, "") + ")"; 4663 } 4664 }; 4665 })(); 4666 } 4667 } 4668 }, 4669 4670 /************************ 4671 CSS Property Names 4672 ************************/ 4673 4674 Names: { 4675 /* Camelcase a property name into its JavaScript notation (e.g. "background-color" ==> "backgroundColor"). 4676 Camelcasing is used to normalize property names between and across calls. */ 4677 camelCase: function (property) { 4678 return property.replace(/-(\w)/g, function (match, subMatch) { 4679 return subMatch.toUpperCase(); 4680 }); 4681 }, 4682 4683 /* For SVG elements, some properties (namely, dimensional ones) are GET/SET via the element's HTML attributes (instead of via CSS styles). */ 4684 SVGAttribute: function (property) { 4685 var SVGAttributes = "width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2"; 4686 4687 /* Certain browsers require an SVG transform to be applied as an attribute. (Otherwise, application via CSS is preferable due to 3D support.) */ 4688 if (IE || (Velocity.State.isAndroid && !Velocity.State.isChrome)) { 4689 SVGAttributes += "|transform"; 4690 } 4691 4692 return new RegExp("^(" + SVGAttributes + ")$", "i").test(property); 4693 }, 4694 4695 /* Determine whether a property should be set with a vendor prefix. */ 4696 /* If a prefixed version of the property exists, return it. Otherwise, return the original property name. 4697 If the property is not at all supported by the browser, return a false flag. */ 4698 prefixCheck: function (property) { 4699 /* If this property has already been checked, return the cached value. */ 4700 if (Velocity.State.prefixMatches[property]) { 4701 return [ Velocity.State.prefixMatches[property], true ]; 4702 } else { 4703 var vendors = [ "", "Webkit", "Moz", "ms", "O" ]; 4704 4705 for (var i = 0, vendorsLength = vendors.length; i < vendorsLength; i++) { 4706 var propertyPrefixed; 4707 4708 if (i === 0) { 4709 propertyPrefixed = property; 4710 } else { 4711 /* Capitalize the first letter of the property to conform to JavaScript vendor prefix notation (e.g. webkitFilter). */ 4712 propertyPrefixed = vendors[i] + property.replace(/^\w/, function(match) { return match.toUpperCase(); }); 4713 } 4714 4715 /* Check if the browser supports this property as prefixed. */ 4716 if (Type.isString(Velocity.State.prefixElement.style[propertyPrefixed])) { 4717 /* Cache the match. */ 4718 Velocity.State.prefixMatches[property] = propertyPrefixed; 4719 4720 return [ propertyPrefixed, true ]; 4721 } 4722 } 4723 4724 /* If the browser doesn't support this property in any form, include a false flag so that the caller can decide how to proceed. */ 4725 return [ property, false ]; 4726 } 4727 } 4728 }, 4729 4730 /************************ 4731 CSS Property Values 4732 ************************/ 4733 4734 Values: { 4735 /* Hex to RGB conversion. Copyright Tim Down: http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb */ 4736 hexToRgb: function (hex) { 4737 var shortformRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, 4738 longformRegex = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, 4739 rgbParts; 4740 4741 hex = hex.replace(shortformRegex, function (m, r, g, b) { 4742 return r + r + g + g + b + b; 4743 }); 4744 4745 rgbParts = longformRegex.exec(hex); 4746 4747 return rgbParts ? [ parseInt(rgbParts[1], 16), parseInt(rgbParts[2], 16), parseInt(rgbParts[3], 16) ] : [ 0, 0, 0 ]; 4748 }, 4749 4750 isCSSNullValue: function (value) { 4751 /* The browser defaults CSS values that have not been set to either 0 or one of several possible null-value strings. 4752 Thus, we check for both falsiness and these special strings. */ 4753 /* Null-value checking is performed to default the special strings to 0 (for the sake of tweening) or their hook 4754 templates as defined as CSS.Hooks (for the sake of hook injection/extraction). */ 4755 /* Note: Chrome returns "rgba(0, 0, 0, 0)" for an undefined color whereas IE returns "transparent". */ 4756 return (value == 0 || /^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(value)); 4757 }, 4758 4759 /* Retrieve a property's default unit type. Used for assigning a unit type when one is not supplied by the user. */ 4760 getUnitType: function (property) { 4761 if (/^(rotate|skew)/i.test(property)) { 4762 return "deg"; 4763 } else if (/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(property)) { 4764 /* The above properties are unitless. */ 4765 return ""; 4766 } else { 4767 /* Default to px for all other properties. */ 4768 return "px"; 4769 } 4770 }, 4771 4772 /* HTML elements default to an associated display type when they're not set to display:none. */ 4773 /* Note: This function is used for correctly setting the non-"none" display value in certain Velocity redirects, such as fadeIn/Out. */ 4774 getDisplayType: function (element) { 4775 var tagName = element && element.tagName.toString().toLowerCase(); 4776 4777 if (/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(tagName)) { 4778 return "inline"; 4779 } else if (/^(li)$/i.test(tagName)) { 4780 return "list-item"; 4781 } else if (/^(tr)$/i.test(tagName)) { 4782 return "table-row"; 4783 } else if (/^(table)$/i.test(tagName)) { 4784 return "table"; 4785 } else if (/^(tbody)$/i.test(tagName)) { 4786 return "table-row-group"; 4787 /* Default to "block" when no match is found. */ 4788 } else { 4789 return "block"; 4790 } 4791 }, 4792 4793 /* The class add/remove functions are used to temporarily apply a "velocity-animating" class to elements while they're animating. */ 4794 addClass: function (element, className) { 4795 if (element.classList) { 4796 element.classList.add(className); 4797 } else { 4798 element.className += (element.className.length ? " " : "") + className; 4799 } 4800 }, 4801 4802 removeClass: function (element, className) { 4803 if (element.classList) { 4804 element.classList.remove(className); 4805 } else { 4806 element.className = element.className.toString().replace(new RegExp("(^|\\s)" + className.split(" ").join("|") + "(\\s|$)", "gi"), " "); 4807 } 4808 } 4809 }, 4810 4811 /**************************** 4812 Style Getting & Setting 4813 ****************************/ 4814 4815 /* The singular getPropertyValue, which routes the logic for all normalizations, hooks, and standard CSS properties. */ 4816 getPropertyValue: function (element, property, rootPropertyValue, forceStyleLookup) { 4817 /* Get an element's computed property value. */ 4818 /* Note: Retrieving the value of a CSS property cannot simply be performed by checking an element's 4819 style attribute (which only reflects user-defined values). Instead, the browser must be queried for a property's 4820 *computed* value. You can read more about getComputedStyle here: https://developer.mozilla.org/en/docs/Web/API/window.getComputedStyle */ 4821 function computePropertyValue (element, property) { 4822 /* When box-sizing isn't set to border-box, height and width style values are incorrectly computed when an 4823 element's scrollbars are visible (which expands the element's dimensions). Thus, we defer to the more accurate 4824 offsetHeight/Width property, which includes the total dimensions for interior, border, padding, and scrollbar. 4825 We subtract border and padding to get the sum of interior + scrollbar. */ 4826 var computedValue = 0; 4827 4828 /* IE<=8 doesn't support window.getComputedStyle, thus we defer to jQuery, which has an extensive array 4829 of hacks to accurately retrieve IE8 property values. Re-implementing that logic here is not worth bloating the 4830 codebase for a dying browser. The performance repercussions of using jQuery here are minimal since 4831 Velocity is optimized to rarely (and sometimes never) query the DOM. Further, the $.css() codepath isn't that slow. */ 4832 if (IE <= 8) { 4833 computedValue = $.css(element, property); /* GET */ 4834 /* All other browsers support getComputedStyle. The returned live object reference is cached onto its 4835 associated element so that it does not need to be refetched upon every GET. */ 4836 } else { 4837 /* Browsers do not return height and width values for elements that are set to display:"none". Thus, we temporarily 4838 toggle display to the element type's default value. */ 4839 var toggleDisplay = false; 4840 4841 if (/^(width|height)$/.test(property) && CSS.getPropertyValue(element, "display") === 0) { 4842 toggleDisplay = true; 4843 CSS.setPropertyValue(element, "display", CSS.Values.getDisplayType(element)); 4844 } 4845 4846 function revertDisplay () { 4847 if (toggleDisplay) { 4848 CSS.setPropertyValue(element, "display", "none"); 4849 } 4850 } 4851 4852 if (!forceStyleLookup) { 4853 if (property === "height" && CSS.getPropertyValue(element, "boxSizing").toString().toLowerCase() !== "border-box") { 4854 var contentBoxHeight = element.offsetHeight - (parseFloat(CSS.getPropertyValue(element, "borderTopWidth")) || 0) - (parseFloat(CSS.getPropertyValue(element, "borderBottomWidth")) || 0) - (parseFloat(CSS.getPropertyValue(element, "paddingTop")) || 0) - (parseFloat(CSS.getPropertyValue(element, "paddingBottom")) || 0); 4855 revertDisplay(); 4856 4857 return contentBoxHeight; 4858 } else if (property === "width" && CSS.getPropertyValue(element, "boxSizing").toString().toLowerCase() !== "border-box") { 4859 var contentBoxWidth = element.offsetWidth - (parseFloat(CSS.getPropertyValue(element, "borderLeftWidth")) || 0) - (parseFloat(CSS.getPropertyValue(element, "borderRightWidth")) || 0) - (parseFloat(CSS.getPropertyValue(element, "paddingLeft")) || 0) - (parseFloat(CSS.getPropertyValue(element, "paddingRight")) || 0); 4860 revertDisplay(); 4861 4862 return contentBoxWidth; 4863 } 4864 } 4865 4866 var computedStyle; 4867 4868 /* For elements that Velocity hasn't been called on directly (e.g. when Velocity queries the DOM on behalf 4869 of a parent of an element its animating), perform a direct getComputedStyle lookup since the object isn't cached. */ 4870 if (Data(element) === undefined) { 4871 computedStyle = window.getComputedStyle(element, null); /* GET */ 4872 /* If the computedStyle object has yet to be cached, do so now. */ 4873 } else if (!Data(element).computedStyle) { 4874 computedStyle = Data(element).computedStyle = window.getComputedStyle(element, null); /* GET */ 4875 /* If computedStyle is cached, use it. */ 4876 } else { 4877 computedStyle = Data(element).computedStyle; 4878 } 4879 4880 /* IE and Firefox do not return a value for the generic borderColor -- they only return individual values for each border side's color. 4881 Also, in all browsers, when border colors aren't all the same, a compound value is returned that Velocity isn't setup to parse. 4882 So, as a polyfill for querying individual border side colors, we just return the top border's color and animate all borders from that value. */ 4883 if (property === "borderColor") { 4884 property = "borderTopColor"; 4885 } 4886 4887 /* IE9 has a bug in which the "filter" property must be accessed from computedStyle using the getPropertyValue method 4888 instead of a direct property lookup. The getPropertyValue method is slower than a direct lookup, which is why we avoid it by default. */ 4889 if (IE === 9 && property === "filter") { 4890 computedValue = computedStyle.getPropertyValue(property); /* GET */ 4891 } else { 4892 computedValue = computedStyle[property]; 4893 } 4894 4895 /* Fall back to the property's style value (if defined) when computedValue returns nothing, 4896 which can happen when the element hasn't been painted. */ 4897 if (computedValue === "" || computedValue === null) { 4898 computedValue = element.style[property]; 4899 } 4900 4901 revertDisplay(); 4902 } 4903 4904 /* For top, right, bottom, and left (TRBL) values that are set to "auto" on elements of "fixed" or "absolute" position, 4905 defer to jQuery for converting "auto" to a numeric value. (For elements with a "static" or "relative" position, "auto" has the same 4906 effect as being set to 0, so no conversion is necessary.) */ 4907 /* An example of why numeric conversion is necessary: When an element with "position:absolute" has an untouched "left" 4908 property, which reverts to "auto", left's value is 0 relative to its parent element, but is often non-zero relative 4909 to its *containing* (not parent) element, which is the nearest "position:relative" ancestor or the viewport (and always the viewport in the case of "position:fixed"). */ 4910 if (computedValue === "auto" && /^(top|right|bottom|left)$/i.test(property)) { 4911 var position = computePropertyValue(element, "position"); /* GET */ 4912 4913 /* For absolute positioning, jQuery's $.position() only returns values for top and left; 4914 right and bottom will have their "auto" value reverted to 0. */ 4915 /* Note: A jQuery object must be created here since jQuery doesn't have a low-level alias for $.position(). 4916 Not a big deal since we're currently in a GET batch anyway. */ 4917 if (position === "fixed" || (position === "absolute" && /top|left/i.test(property))) { 4918 /* Note: jQuery strips the pixel unit from its returned values; we re-add it here to conform with computePropertyValue's behavior. */ 4919 computedValue = $(element).position()[property] + "px"; /* GET */ 4920 } 4921 } 4922 4923 return computedValue; 4924 } 4925 4926 var propertyValue; 4927 4928 /* If this is a hooked property (e.g. "clipLeft" instead of the root property of "clip"), 4929 extract the hook's value from a normalized rootPropertyValue using CSS.Hooks.extractValue(). */ 4930 if (CSS.Hooks.registered[property]) { 4931 var hook = property, 4932 hookRoot = CSS.Hooks.getRoot(hook); 4933 4934 /* If a cached rootPropertyValue wasn't passed in (which Velocity always attempts to do in order to avoid requerying the DOM), 4935 query the DOM for the root property's value. */ 4936 if (rootPropertyValue === undefined) { 4937 /* Since the browser is now being directly queried, use the official post-prefixing property name for this lookup. */ 4938 rootPropertyValue = CSS.getPropertyValue(element, CSS.Names.prefixCheck(hookRoot)[0]); /* GET */ 4939 } 4940 4941 /* If this root has a normalization registered, peform the associated normalization extraction. */ 4942 if (CSS.Normalizations.registered[hookRoot]) { 4943 rootPropertyValue = CSS.Normalizations.registered[hookRoot]("extract", element, rootPropertyValue); 4944 } 4945 4946 /* Extract the hook's value. */ 4947 propertyValue = CSS.Hooks.extractValue(hook, rootPropertyValue); 4948 4949 /* If this is a normalized property (e.g. "opacity" becomes "filter" in <=IE8) or "translateX" becomes "transform"), 4950 normalize the property's name and value, and handle the special case of transforms. */ 4951 /* Note: Normalizing a property is mutually exclusive from hooking a property since hook-extracted values are strictly 4952 numerical and therefore do not require normalization extraction. */ 4953 } else if (CSS.Normalizations.registered[property]) { 4954 var normalizedPropertyName, 4955 normalizedPropertyValue; 4956 4957 normalizedPropertyName = CSS.Normalizations.registered[property]("name", element); 4958 4959 /* Transform values are calculated via normalization extraction (see below), which checks against the element's transformCache. 4960 At no point do transform GETs ever actually query the DOM; initial stylesheet values are never processed. 4961 This is because parsing 3D transform matrices is not always accurate and would bloat our codebase; 4962 thus, normalization extraction defaults initial transform values to their zero-values (e.g. 1 for scaleX and 0 for translateX). */ 4963 if (normalizedPropertyName !== "transform") { 4964 normalizedPropertyValue = computePropertyValue(element, CSS.Names.prefixCheck(normalizedPropertyName)[0]); /* GET */ 4965 4966 /* If the value is a CSS null-value and this property has a hook template, use that zero-value template so that hooks can be extracted from it. */ 4967 if (CSS.Values.isCSSNullValue(normalizedPropertyValue) && CSS.Hooks.templates[property]) { 4968 normalizedPropertyValue = CSS.Hooks.templates[property][1]; 4969 } 4970 } 4971 4972 propertyValue = CSS.Normalizations.registered[property]("extract", element, normalizedPropertyValue); 4973 } 4974 4975 /* If a (numeric) value wasn't produced via hook extraction or normalization, query the DOM. */ 4976 if (!/^[\d-]/.test(propertyValue)) { 4977 /* For SVG elements, dimensional properties (which SVGAttribute() detects) are tweened via 4978 their HTML attribute values instead of their CSS style values. */ 4979 if (Data(element) && Data(element).isSVG && CSS.Names.SVGAttribute(property)) { 4980 /* Since the height/width attribute values must be set manually, they don't reflect computed values. 4981 Thus, we use use getBBox() to ensure we always get values for elements with undefined height/width attributes. */ 4982 if (/^(height|width)$/i.test(property)) { 4983 /* Firefox throws an error if .getBBox() is called on an SVG that isn't attached to the DOM. */ 4984 try { 4985 propertyValue = element.getBBox()[property]; 4986 } catch (error) { 4987 propertyValue = 0; 4988 } 4989 /* Otherwise, access the attribute value directly. */ 4990 } else { 4991 propertyValue = element.getAttribute(property); 4992 } 4993 } else { 4994 propertyValue = computePropertyValue(element, CSS.Names.prefixCheck(property)[0]); /* GET */ 4995 } 4996 } 4997 4998 /* Since property lookups are for animation purposes (which entails computing the numeric delta between start and end values), 4999 convert CSS null-values to an integer of value 0. */ 5000 if (CSS.Values.isCSSNullValue(propertyValue)) { 5001 propertyValue = 0; 5002 } 5003 5004 if (Velocity.debug >= 2) console.log("Get " + property + ": " + propertyValue); 5005 5006 return propertyValue; 5007 }, 5008 5009 /* The singular setPropertyValue, which routes the logic for all normalizations, hooks, and standard CSS properties. */ 5010 setPropertyValue: function(element, property, propertyValue, rootPropertyValue, scrollData) { 5011 var propertyName = property; 5012 5013 /* In order to be subjected to call options and element queueing, scroll animation is routed through Velocity as if it were a standard CSS property. */ 5014 if (property === "scroll") { 5015 /* If a container option is present, scroll the container instead of the browser window. */ 5016 if (scrollData.container) { 5017 scrollData.container["scroll" + scrollData.direction] = propertyValue; 5018 /* Otherwise, Velocity defaults to scrolling the browser window. */ 5019 } else { 5020 if (scrollData.direction === "Left") { 5021 window.scrollTo(propertyValue, scrollData.alternateValue); 5022 } else { 5023 window.scrollTo(scrollData.alternateValue, propertyValue); 5024 } 5025 } 5026 } else { 5027 /* Transforms (translateX, rotateZ, etc.) are applied to a per-element transformCache object, which is manually flushed via flushTransformCache(). 5028 Thus, for now, we merely cache transforms being SET. */ 5029 if (CSS.Normalizations.registered[property] && CSS.Normalizations.registered[property]("name", element) === "transform") { 5030 /* Perform a normalization injection. */ 5031 /* Note: The normalization logic handles the transformCache updating. */ 5032 CSS.Normalizations.registered[property]("inject", element, propertyValue); 5033 5034 propertyName = "transform"; 5035 propertyValue = Data(element).transformCache[property]; 5036 } else { 5037 /* Inject hooks. */ 5038 if (CSS.Hooks.registered[property]) { 5039 var hookName = property, 5040 hookRoot = CSS.Hooks.getRoot(property); 5041 5042 /* If a cached rootPropertyValue was not provided, query the DOM for the hookRoot's current value. */ 5043 rootPropertyValue = rootPropertyValue || CSS.getPropertyValue(element, hookRoot); /* GET */ 5044
5045 propertyValue = CSS.Hooks.injectValue(hookName, propertyValue, rootPropertyValue); 5046 property = hookRoot; 5047 } 5048 5049 /* Normalize names and values. */ 5050 if (CSS.Normalizations.registered[property]) { 5051 propertyValue = CSS.Normalizations.registered[property]("inject", element, propertyValue); 5052 property = CSS.Normalizations.registered[property]("name", element); 5053 } 5054 5055 /* Assign the appropriate vendor prefix before performing an official style update. */ 5056 propertyName = CSS.Names.prefixCheck(property)[0]; 5057 5058 /* A try/catch is used for IE<=8, which throws an error when "invalid" CSS values are set, e.g. a negative width. 5059 Try/catch is avoided for other browsers since it incurs a performance overhead. */ 5060 if (IE <= 8) { 5061 try { 5062 element.style[propertyName] = propertyValue; 5063 } catch (error) { if (Velocity.debug) console.log("Browser does not support [" + propertyValue + "] for [" + propertyName + "]"); } 5064 /* SVG elements have their dimensional properties (width, height, x, y, cx, etc.) applied directly as attributes instead of as styles. */ 5065 /* Note: IE8 does not support SVG elements, so it's okay that we skip it for SVG animation. */ 5066 } else if (Data(element) && Data(element).isSVG && CSS.Names.SVGAttribute(property)) { 5067 /* Note: For SVG attributes, vendor-prefixed property names are never used. */ 5068 /* Note: Not all CSS properties can be animated via attributes, but the browser won't throw an error for unsupported properties. */ 5069 element.setAttribute(property, propertyValue); 5070 } else { 5071 element.style[propertyName] = propertyValue; 5072 } 5073 5074 if (Velocity.debug >= 2) console.log("Set " + property + " (" + propertyName + "): " + propertyValue); 5075 } 5076 } 5077 5078 /* Return the normalized property name and value in case the caller wants to know how these values were modified before being applied to the DOM. */ 5079 return [ propertyName, propertyValue ]; 5080 }, 5081 5082 /* To increase performance by batching transform updates into a single SET, transforms are not directly applied to an element until flushTransformCache() is called. */ 5083 /* Note: Velocity applies transform properties in the same order that they are chronogically introduced to the element's CSS styles. */ 5084 flushTransformCache: function(element) { 5085 var transformString = ""; 5086 5087 /* Certain browsers require that SVG transforms be applied as an attribute. However, the SVG transform attribute takes a modified version of CSS's transform string 5088 (units are dropped and, except for skewX/Y, subproperties are merged into their master property -- e.g. scaleX and scaleY are merged into scale(X Y). */ 5089 if ((IE || (Velocity.State.isAndroid && !Velocity.State.isChrome)) && Data(element).isSVG) { 5090 /* Since transform values are stored in their parentheses-wrapped form, we use a helper function to strip out their numeric values. 5091 Further, SVG transform properties only take unitless (representing pixels) values, so it's okay that parseFloat() strips the unit suffixed to the float value. */ 5092 function getTransformFloat (transformProperty) { 5093 return parseFloat(CSS.getPropertyValue(element, transformProperty)); 5094 } 5095 5096 /* Create an object to organize all the transforms that we'll apply to the SVG element. To keep the logic simple, 5097 we process *all* transform properties -- even those that may not be explicitly applied (since they default to their zero-values anyway). */ 5098 var SVGTransforms = { 5099 translate: [ getTransformFloat("translateX"), getTransformFloat("translateY") ], 5100 skewX: [ getTransformFloat("skewX") ], skewY: [ getTransformFloat("skewY") ], 5101 /* If the scale property is set (non-1), use that value for the scaleX and scaleY values 5102 (this behavior mimics the result of animating all these properties at once on HTML elements). */ 5103 scale: getTransformFloat("scale") !== 1 ? [ getTransformFloat("scale"), getTransformFloat("scale") ] : [ getTransformFloat("scaleX"), getTransformFloat("scaleY") ], 5104 /* Note: SVG's rotate transform takes three values: rotation degrees followed by the X and Y values 5105 defining the rotation's origin point. We ignore the origin values (default them to 0). */ 5106 rotate: [ getTransformFloat("rotateZ"), 0, 0 ] 5107 }; 5108 5109 /* Iterate through the transform properties in the user-defined property map order. 5110 (This mimics the behavior of non-SVG transform animation.) */ 5111 $.each(Data(element).transformCache, function(transformName) { 5112 /* Except for with skewX/Y, revert the axis-specific transform subproperties to their axis-free master 5113 properties so that they match up with SVG's accepted transform properties. */ 5114 if (/^translate/i.test(transformName)) { 5115 transformName = "translate"; 5116 } else if (/^scale/i.test(transformName)) { 5117 transformName = "scale"; 5118 } else if (/^rotate/i.test(transformName)) { 5119 transformName = "rotate"; 5120 } 5121 5122 /* Check that we haven't yet deleted the property from the SVGTransforms container. */ 5123 if (SVGTransforms[transformName]) { 5124 /* Append the transform property in the SVG-supported transform format. As per the spec, surround the space-delimited values in parentheses. */ 5125 transformString += transformName + "(" + SVGTransforms[transformName].join(" ") + ")" + " "; 5126 5127 /* After processing an SVG transform property, delete it from the SVGTransforms container so we don't 5128 re-insert the same master property if we encounter another one of its axis-specific properties. */ 5129 delete SVGTransforms[transformName]; 5130 } 5131 });
vendor: 12,394 bytes, lines 5132-5413
5132 } else { 5133 var transformValue, 5134 perspective; 5135 5136 /* Transform properties are stored as members of the transformCache object. Concatenate all the members into a string. */ 5137 $.each(Data(element).transformCache, function(transformName) { 5138 transformValue = Data(element).transformCache[transformName]; 5139 5140 /* Transform's perspective subproperty must be set first in order to take effect. Store it temporarily. */ 5141 if (transformName === "transformPerspective") { 5142 perspective = transformValue; 5143 return true; 5144 } 5145 5146 /* IE9 only supports one rotation type, rotateZ, which it refers to as "rotate". */ 5147 if (IE === 9 && transformName === "rotateZ") { 5148 transformName = "rotate"; 5149 } 5150 5151 transformString += transformName + transformValue + " "; 5152 }); 5153 5154 /* If present, set the perspective subproperty first. */ 5155 if (perspective) { 5156 transformString = "perspective" + perspective + " " + transformString; 5157 } 5158 } 5159 5160 CSS.setPropertyValue(element, "transform", transformString); 5161 } 5162 }; 5163 5164 /* Register hooks and normalizations. */ 5165 CSS.Hooks.register(); 5166 CSS.Normalizations.register(); 5167 5168 /* Allow hook setting in the same fashion as jQuery's $.css(). */ 5169 Velocity.hook = function (elements, arg2, arg3) { 5170 var value = undefined; 5171 5172 elements = sanitizeElements(elements); 5173 5174 $.each(elements, function(i, element) { 5175 /* Initialize Velocity's per-element data cache if this element hasn't previously been animated. */ 5176 if (Data(element) === undefined) { 5177 Velocity.init(element); 5178 } 5179 5180 /* Get property value. If an element set was passed in, only return the value for the first element. */ 5181 if (arg3 === undefined) { 5182 if (value === undefined) { 5183 value = Velocity.CSS.getPropertyValue(element, arg2); 5184 } 5185 /* Set property value. */ 5186 } else { 5187 /* sPV returns an array of the normalized propertyName/propertyValue pair used to update the DOM. */ 5188 var adjustedSet = Velocity.CSS.setPropertyValue(element, arg2, arg3); 5189 5190 /* Transform properties don't automatically set. They have to be flushed to the DOM. */ 5191 if (adjustedSet[0] === "transform") { 5192 Velocity.CSS.flushTransformCache(element); 5193 } 5194 5195 value = adjustedSet; 5196 } 5197 }); 5198 5199 return value; 5200 }; 5201 5202 /***************** 5203 Animation 5204 *****************/ 5205 5206 var animate = function() { 5207 5208 /****************** 5209 Call Chain 5210 ******************/ 5211 5212 /* Logic for determining what to return to the call stack when exiting out of Velocity. */ 5213 function getChain () { 5214 /* If we are using the utility function, attempt to return this call's promise. If no promise library was detected, 5215 default to null instead of returning the targeted elements so that utility function's return value is standardized. */ 5216 if (isUtility) { 5217 return promiseData.promise || null; 5218 /* Otherwise, if we're using $.fn, return the jQuery-/Zepto-wrapped element set. */ 5219 } else { 5220 return elementsWrapped; 5221 } 5222 } 5223 5224 /************************* 5225 Arguments Assignment 5226 *************************/ 5227 5228 /* To allow for expressive CoffeeScript code, Velocity supports an alternative syntax in which "elements" (or "e"), "properties" (or "p"), and "options" (or "o") 5229 objects are defined on a container object that's passed in as Velocity's sole argument. */ 5230 /* Note: Some browsers automatically populate arguments with a "properties" object. We detect it by checking for its default "names" property. */ 5231 var syntacticSugar = (arguments[0] && (arguments[0].p || (($.isPlainObject(arguments[0].properties) && !arguments[0].properties.names) || Type.isString(arguments[0].properties)))), 5232 /* Whether Velocity was called via the utility function (as opposed to on a jQuery/Zepto object). */ 5233 isUtility, 5234 /* When Velocity is called via the utility function ($.Velocity()/Velocity()), elements are explicitly 5235 passed in as the first parameter. Thus, argument positioning varies. We normalize them here. */ 5236 elementsWrapped, 5237 argumentIndex; 5238 5239 var elements, 5240 propertiesMap, 5241 options; 5242 5243 /* Detect jQuery/Zepto elements being animated via the $.fn method. */ 5244 if (Type.isWrapped(this)) { 5245 isUtility = false; 5246 5247 argumentIndex = 0; 5248 elements = this; 5249 elementsWrapped = this; 5250 /* Otherwise, raw elements are being animated via the utility function. */ 5251 } else { 5252 isUtility = true; 5253 5254 argumentIndex = 1; 5255 elements = syntacticSugar ? (arguments[0].elements || arguments[0].e) : arguments[0]; 5256 } 5257 5258 elements = sanitizeElements(elements); 5259 5260 if (!elements) { 5261 return; 5262 } 5263 5264 if (syntacticSugar) { 5265 propertiesMap = arguments[0].properties || arguments[0].p; 5266 options = arguments[0].options || arguments[0].o; 5267 } else { 5268 propertiesMap = arguments[argumentIndex]; 5269 options = arguments[argumentIndex + 1]; 5270 } 5271 5272 /* The length of the element set (in the form of a nodeList or an array of elements) is defaulted to 1 in case a 5273 single raw DOM element is passed in (which doesn't contain a length property). */ 5274 var elementsLength = elements.length, 5275 elementsIndex = 0; 5276 5277 /*************************** 5278 Argument Overloading 5279 ***************************/ 5280 5281 /* Support is included for jQuery's argument overloading: $.animate(propertyMap [, duration] [, easing] [, complete]). 5282 Overloading is detected by checking for the absence of an object being passed into options. */ 5283 /* Note: The stop and finish actions do not accept animation options, and are therefore excluded from this check. */ 5284 if (!/^(stop|finish)$/i.test(propertiesMap) && !$.isPlainObject(options)) { 5285 /* The utility function shifts all arguments one position to the right, so we adjust for that offset. */ 5286 var startingArgumentPosition = argumentIndex + 1; 5287 5288 options = {}; 5289 5290 /* Iterate through all options arguments */ 5291 for (var i = startingArgumentPosition; i < arguments.length; i++) { 5292 /* Treat a number as a duration. Parse it out. */ 5293 /* Note: The following RegEx will return true if passed an array with a number as its first item. 5294 Thus, arrays are skipped from this check. */ 5295 if (!Type.isArray(arguments[i]) && (/^(fast|normal|slow)$/i.test(arguments[i]) || /^\d/.test(arguments[i]))) { 5296 options.duration = arguments[i]; 5297 /* Treat strings and arrays as easings. */ 5298 } else if (Type.isString(arguments[i]) || Type.isArray(arguments[i])) { 5299 options.easing = arguments[i]; 5300 /* Treat a function as a complete callback. */ 5301 } else if (Type.isFunction(arguments[i])) { 5302 options.complete = arguments[i]; 5303 } 5304 } 5305 } 5306 5307 /*************** 5308 Promises 5309 ***************/ 5310 5311 var promiseData = { 5312 promise: null, 5313 resolver: null, 5314 rejecter: null 5315 }; 5316 5317 /* If this call was made via the utility function (which is the default method of invocation when jQuery/Zepto are not being used), and if 5318 promise support was detected, create a promise object for this call and store references to its resolver and rejecter methods. The resolve 5319 method is used when a call completes naturally or is prematurely stopped by the user. In both cases, completeCall() handles the associated 5320 call cleanup and promise resolving logic. The reject method is used when an invalid set of arguments is passed into a Velocity call. */ 5321 /* Note: Velocity employs a call-based queueing architecture, which means that stopping an animating element actually stops the full call that 5322 triggered it -- not that one element exclusively. Similarly, there is one promise per call, and all elements targeted by a Velocity call are 5323 grouped together for the purposes of resolving and rejecting a promise. */ 5324 if (isUtility && Velocity.Promise) { 5325 promiseData.promise = new Velocity.Promise(function (resolve, reject) { 5326 promiseData.resolver = resolve; 5327 promiseData.rejecter = reject; 5328 }); 5329 } 5330 5331 /********************* 5332 Action Detection 5333 *********************/ 5334 5335 /* Velocity's behavior is categorized into "actions": Elements can either be specially scrolled into view, 5336 or they can be started, stopped, or reversed. If a literal or referenced properties map is passed in as Velocity's 5337 first argument, the associated action is "start". Alternatively, "scroll", "reverse", or "stop" can be passed in instead of a properties map. */ 5338 var action; 5339 5340 switch (propertiesMap) { 5341 case "scroll": 5342 action = "scroll"; 5343 break; 5344 5345 case "reverse": 5346 action = "reverse"; 5347 break; 5348 5349 case "finish": 5350 case "stop": 5351 /******************* 5352 Action: Stop 5353 *******************/ 5354 5355 /* Clear the currently-active delay on each targeted element. */ 5356 $.each(elements, function(i, element) { 5357 if (Data(element) && Data(element).delayTimer) { 5358 /* Stop the timer from triggering its cached next() function. */ 5359 clearTimeout(Data(element).delayTimer.setTimeout); 5360 5361 /* Manually call the next() function so that the subsequent queue items can progress. */ 5362 if (Data(element).delayTimer.next) { 5363 Data(element).delayTimer.next(); 5364 } 5365 5366 delete Data(element).delayTimer; 5367 } 5368 }); 5369 5370 var callsToStop = []; 5371 5372 /* When the stop action is triggered, the elements' currently active call is immediately stopped. The active call might have 5373 been applied to multiple elements, in which case all of the call's elements will be stopped. When an element 5374 is stopped, the next item in its animation queue is immediately triggered. */ 5375 /* An additional argument may be passed in to clear an element's remaining queued calls. Either true (which defaults to the "fx" queue) 5376 or a custom queue string can be passed in. */ 5377 /* Note: The stop command runs prior to Velocity's Queueing phase since its behavior is intended to take effect *immediately*, 5378 regardless of the element's current queue state. */ 5379 5380 /* Iterate through every active call. */ 5381 $.each(Velocity.State.calls, function(i, activeCall) { 5382 /* Inactive calls are set to false by the logic inside completeCall(). Skip them. */ 5383 if (activeCall) { 5384 /* Iterate through the active call's targeted elements. */ 5385 $.each(activeCall[1], function(k, activeElement) { 5386 /* If true was passed in as a secondary argument, clear absolutely all calls on this element. Otherwise, only 5387 clear calls associated with the relevant queue. */ 5388 /* Call stopping logic works as follows: 5389 - options === true --> stop current default queue calls (and queue:false calls), including remaining queued ones. 5390 - options === undefined --> stop current queue:"" call and all queue:false calls. 5391 - options === false --> stop only queue:false calls. 5392 - options === "custom" --> stop current queue:"custom" call, including remaining queued ones (there is no functionality to only clear the currently-running queue:"custom" call). */ 5393 var queueName = (options === undefined) ? "" : options; 5394 5395 if (queueName !== true && (activeCall[2].queue !== queueName) && !(options === undefined && activeCall[2].queue === false)) { 5396 return true; 5397 } 5398 5399 /* Iterate through the calls targeted by the stop command. */ 5400 $.each(elements, function(l, element) { 5401 /* Check that this call was applied to the target element. */ 5402 if (element === activeElement) { 5403 /* Optionally clear the remaining queued calls. */ 5404 if (options === true || Type.isString(options)) { 5405 /* Iterate through the items in the element's queue. */ 5406 $.each($.queue(element, Type.isString(options) ? options : ""), function(_, item) { 5407 /* The queue array can contain an "inprogress" string, which we skip. */ 5408 if (Type.isFunction(item)) { 5409 /* Pass the item's callback a flag indicating that we want to abort from the queue call. 5410 (Specifically, the queue will resolve the call's associated promise then abort.) */ 5411 item(null, true); 5412 } 5413 });
5414 5415 /* Clearing the $.queue() array is achieved by resetting it to []. */ 5416 $.queue(element, Type.isString(options) ? options : "", []); 5417 } 5418 5419 if (propertiesMap === "stop") { 5420 /* Since "reverse" uses cached start values (the previous call's endValues), these values must be 5421 changed to reflect the final value that the elements were actually tweened to. */ 5422 /* Note: If only queue:false animations are currently running on an element, it won't have a tweensContainer 5423 object. Also, queue:false animations can't be reversed. */ 5424 if (Data(element) && Data(element).tweensContainer && queueName !== false) { 5425 $.each(Data(element).tweensContainer, function(m, activeTween) { 5426 activeTween.endValue = activeTween.currentValue; 5427 }); 5428 } 5429 5430 callsToStop.push(i); 5431 } else if (propertiesMap === "finish") { 5432 /* To get active tweens to finish immediately, we forcefully shorten their durations to 1ms so that 5433 they finish upon the next rAf tick then proceed with normal call completion logic. */ 5434 activeCall[2].duration = 1; 5435 } 5436 } 5437 });
vendor: 4,653 bytes, lines 5438-5526
5438 }); 5439 } 5440 }); 5441 5442 /* Prematurely call completeCall() on each matched active call. Pass an additional flag for "stop" to indicate 5443 that the complete callback and display:none setting should be skipped since we're completing prematurely. */ 5444 if (propertiesMap === "stop") { 5445 $.each(callsToStop, function(i, j) { 5446 completeCall(j, true); 5447 }); 5448 5449 if (promiseData.promise) { 5450 /* Immediately resolve the promise associated with this stop call since stop runs synchronously. */ 5451 promiseData.resolver(elements); 5452 } 5453 } 5454 5455 /* Since we're stopping, and not proceeding with queueing, exit out of Velocity. */ 5456 return getChain(); 5457 5458 default: 5459 /* Treat a non-empty plain object as a literal properties map. */ 5460 if ($.isPlainObject(propertiesMap) && !Type.isEmptyObject(propertiesMap)) { 5461 action = "start"; 5462 5463 /**************** 5464 Redirects 5465 ****************/ 5466 5467 /* Check if a string matches a registered redirect (see Redirects above). */ 5468 } else if (Type.isString(propertiesMap) && Velocity.Redirects[propertiesMap]) { 5469 var opts = $.extend({}, options), 5470 durationOriginal = opts.duration, 5471 delayOriginal = opts.delay || 0; 5472 5473 /* If the backwards option was passed in, reverse the element set so that elements animate from the last to the first. */ 5474 if (opts.backwards === true) { 5475 elements = $.extend(true, [], elements).reverse(); 5476 } 5477 5478 /* Individually trigger the redirect for each element in the set to prevent users from having to handle iteration logic in their redirect. */ 5479 $.each(elements, function(elementIndex, element) { 5480 /* If the stagger option was passed in, successively delay each element by the stagger value (in ms). Retain the original delay value. */ 5481 if (parseFloat(opts.stagger)) { 5482 opts.delay = delayOriginal + (parseFloat(opts.stagger) * elementIndex); 5483 } else if (Type.isFunction(opts.stagger)) { 5484 opts.delay = delayOriginal + opts.stagger.call(element, elementIndex, elementsLength); 5485 } 5486 5487 /* If the drag option was passed in, successively increase/decrease (depending on the presense of opts.backwards) 5488 the duration of each element's animation, using floors to prevent producing very short durations. */ 5489 if (opts.drag) { 5490 /* Default the duration of UI pack effects (callouts and transitions) to 1000ms instead of the usual default duration of 400ms. */ 5491 opts.duration = parseFloat(durationOriginal) || (/^(callout|transition)/.test(propertiesMap) ? 1000 : DURATION_DEFAULT); 5492 5493 /* For each element, take the greater duration of: A) animation completion percentage relative to the original duration, 5494 B) 75% of the original duration, or C) a 200ms fallback (in case duration is already set to a low value). 5495 The end result is a baseline of 75% of the redirect's duration that increases/decreases as the end of the element set is approached. */ 5496 opts.duration = Math.max(opts.duration * (opts.backwards ? 1 - elementIndex/elementsLength : (elementIndex + 1) / elementsLength), opts.duration * 0.75, 200); 5497 } 5498 5499 /* Pass in the call's opts object so that the redirect can optionally extend it. It defaults to an empty object instead of null to 5500 reduce the opts checking logic required inside the redirect. */ 5501 Velocity.Redirects[propertiesMap].call(element, element, opts || {}, elementIndex, elementsLength, elements, promiseData.promise ? promiseData : undefined); 5502 }); 5503 5504 /* Since the animation logic resides within the redirect's own code, abort the remainder of this call. 5505 (The performance overhead up to this point is virtually non-existant.) */ 5506 /* Note: The jQuery call chain is kept intact by returning the complete element set. */ 5507 return getChain(); 5508 } else { 5509 var abortError = "Velocity: First argument (" + propertiesMap + ") was not a property map, a known action, or a registered redirect. Aborting."; 5510 5511 if (promiseData.promise) { 5512 promiseData.rejecter(new Error(abortError)); 5513 } else { 5514 console.log(abortError); 5515 } 5516 5517 return getChain(); 5518 } 5519 } 5520 5521 /************************** 5522 Call-Wide Variables 5523 **************************/ 5524 5525 /* A container for CSS unit conversion ratios (e.g. %, rem, and em ==> px) that is used to cache ratios across all elements 5526 being animated in a single Velocity call. Calculating unit ratios necessitates DOM querying and updating, and is therefore
5527 avoided (via caching) wherever possible. This container is call-wide instead of page-wide to avoid the risk of using stale 5528 conversion metrics across Velocity animations that are not immediately consecutively chained. */ 5529 var callUnitConversionData = { 5530 lastParent: null, 5531 lastPosition: null, 5532 lastFontSize: null, 5533 lastPercentToPxWidth: null, 5534 lastPercentToPxHeight: null, 5535 lastEmToPx: null, 5536 remToPx: null, 5537 vwToPx: null, 5538 vhToPx: null 5539 }; 5540 5541 /* A container for all the ensuing tween data and metadata associated with this call. This container gets pushed to the page-wide 5542 Velocity.State.calls array that is processed during animation ticking. */ 5543 var call = []; 5544 5545 /************************ 5546 Element Processing 5547 ************************/ 5548 5549 /* Element processing consists of three parts -- data processing that cannot go stale and data processing that *can* go stale (i.e. third-party style modifications): 5550 1) Pre-Queueing: Element-wide variables, including the element's data storage, are instantiated. Call options are prepared. If triggered, the Stop action is executed. 5551 2) Queueing: The logic that runs once this call has reached its point of execution in the element's $.queue() stack. Most logic is placed here to avoid risking it becoming stale. 5552 3) Pushing: Consolidation of the tween data followed by its push onto the global in-progress calls container. 5553 */ 5554 5555 function processElement () { 5556 5557 /************************* 5558 Part I: Pre-Queueing 5559 *************************/ 5560 5561 /*************************** 5562 Element-Wide Variables 5563 ***************************/ 5564 5565 var element = this, 5566 /* The runtime opts object is the extension of the current call's options and Velocity's page-wide option defaults. */ 5567 opts = $.extend({}, Velocity.defaults, options), 5568 /* A container for the processed data associated with each property in the propertyMap. 5569 (Each property in the map produces its own "tween".) */ 5570 tweensContainer = {}, 5571 elementUnitConversionData; 5572 5573 /****************** 5574 Element Init 5575 ******************/ 5576 5577 if (Data(element) === undefined) { 5578 Velocity.init(element); 5579 } 5580 5581 /****************** 5582 Option: Delay 5583 ******************/ 5584 5585 /* Since queue:false doesn't respect the item's existing queue, we avoid injecting its delay here (it's set later on). */ 5586 /* Note: Velocity rolls its own delay function since jQuery doesn't have a utility alias for $.fn.delay() 5587 (and thus requires jQuery element creation, which we avoid since its overhead includes DOM querying). */ 5588 if (parseFloat(opts.delay) && opts.queue !== false) { 5589 $.queue(element, opts.queue, function(next) { 5590 /* This is a flag used to indicate to the upcoming completeCall() function that this queue entry was initiated by Velocity. See completeCall() for further details. */ 5591 Velocity.velocityQueueEntryFlag = true; 5592 5593 /* The ensuing queue item (which is assigned to the "next" argument that $.queue() automatically passes in) will be triggered after a setTimeout delay. 5594 The setTimeout is stored so that it can be subjected to clearTimeout() if this animation is prematurely stopped via Velocity's "stop" command. */ 5595 Data(element).delayTimer = { 5596 setTimeout: setTimeout(next, parseFloat(opts.delay)), 5597 next: next 5598 }; 5599 }); 5600 } 5601 5602 /********************* 5603 Option: Duration 5604 *********************/ 5605 5606 /* Support for jQuery's named durations. */ 5607 switch (opts.duration.toString().toLowerCase()) { 5608 case "fast": 5609 opts.duration = 200; 5610 break; 5611 5612 case "normal": 5613 opts.duration = DURATION_DEFAULT; 5614 break; 5615 5616 case "slow": 5617 opts.duration = 600; 5618 break; 5619 5620 default: 5621 /* Remove the potential "ms" suffix and default to 1 if the user is attempting to set a duration of 0 (in order to produce an immediate style change). */ 5622 opts.duration = parseFloat(opts.duration) || 1; 5623 } 5624 5625 /************************ 5626 Global Option: Mock 5627 ************************/ 5628 5629 if (Velocity.mock !== false) { 5630 /* In mock mode, all animations are forced to 1ms so that they occur immediately upon the next rAF tick. 5631 Alternatively, a multiplier can be passed in to time remap all delays and durations. */ 5632 if (Velocity.mock === true) {
vendor: 9,052 bytes, lines 5633-5794
5633 opts.duration = opts.delay = 1; 5634 } else { 5635 opts.duration *= parseFloat(Velocity.mock) || 1; 5636 opts.delay *= parseFloat(Velocity.mock) || 1; 5637 } 5638 } 5639 5640 /******************* 5641 Option: Easing 5642 *******************/ 5643 5644 opts.easing = getEasing(opts.easing, opts.duration); 5645 5646 /********************** 5647 Option: Callbacks 5648 **********************/ 5649 5650 /* Callbacks must functions. Otherwise, default to null. */ 5651 if (opts.begin && !Type.isFunction(opts.begin)) { 5652 opts.begin = null; 5653 } 5654 5655 if (opts.progress && !Type.isFunction(opts.progress)) { 5656 opts.progress = null; 5657 } 5658 5659 if (opts.complete && !Type.isFunction(opts.complete)) { 5660 opts.complete = null; 5661 } 5662 5663 /********************************* 5664 Option: Display & Visibility 5665 *********************************/ 5666 5667 /* Refer to Velocity's documentation (VelocityJS.org/#displayAndVisibility) for a description of the display and visibility options' behavior. */ 5668 /* Note: We strictly check for undefined instead of falsiness because display accepts an empty string value. */ 5669 if (opts.display !== undefined && opts.display !== null) { 5670 opts.display = opts.display.toString().toLowerCase(); 5671 5672 /* Users can pass in a special "auto" value to instruct Velocity to set the element to its default display value. */ 5673 if (opts.display === "auto") { 5674 opts.display = Velocity.CSS.Values.getDisplayType(element); 5675 } 5676 } 5677 5678 if (opts.visibility !== undefined && opts.visibility !== null) { 5679 opts.visibility = opts.visibility.toString().toLowerCase(); 5680 } 5681 5682 /********************** 5683 Option: mobileHA 5684 **********************/ 5685 5686 /* When set to true, and if this is a mobile device, mobileHA automatically enables hardware acceleration (via a null transform hack) 5687 on animating elements. HA is removed from the element at the completion of its animation. */ 5688 /* Note: Android Gingerbread doesn't support HA. If a null transform hack (mobileHA) is in fact set, it will prevent other tranform subproperties from taking effect. */ 5689 /* Note: You can read more about the use of mobileHA in Velocity's documentation: VelocityJS.org/#mobileHA. */ 5690 opts.mobileHA = (opts.mobileHA && Velocity.State.isMobile && !Velocity.State.isGingerbread); 5691 5692 /*********************** 5693 Part II: Queueing 5694 ***********************/ 5695 5696 /* When a set of elements is targeted by a Velocity call, the set is broken up and each element has the current Velocity call individually queued onto it. 5697 In this way, each element's existing queue is respected; some elements may already be animating and accordingly should not have this current Velocity call triggered immediately. */ 5698 /* In each queue, tween data is processed for each animating property then pushed onto the call-wide calls array. When the last element in the set has had its tweens processed, 5699 the call array is pushed to Velocity.State.calls for live processing by the requestAnimationFrame tick. */ 5700 function buildQueue (next) { 5701 5702 /******************* 5703 Option: Begin 5704 *******************/ 5705 5706 /* The begin callback is fired once per call -- not once per elemenet -- and is passed the full raw DOM element set as both its context and its first argument. */ 5707 if (opts.begin && elementsIndex === 0) { 5708 /* We throw callbacks in a setTimeout so that thrown errors don't halt the execution of Velocity itself. */ 5709 try { 5710 opts.begin.call(elements, elements); 5711 } catch (error) { 5712 setTimeout(function() { throw error; }, 1); 5713 } 5714 } 5715 5716 /***************************************** 5717 Tween Data Construction (for Scroll) 5718 *****************************************/ 5719 5720 /* Note: In order to be subjected to chaining and animation options, scroll's tweening is routed through Velocity as if it were a standard CSS property animation. */ 5721 if (action === "scroll") { 5722 /* The scroll action uniquely takes an optional "offset" option -- specified in pixels -- that offsets the targeted scroll position. */ 5723 var scrollDirection = (/^x$/i.test(opts.axis) ? "Left" : "Top"), 5724 scrollOffset = parseFloat(opts.offset) || 0, 5725 scrollPositionCurrent, 5726 scrollPositionCurrentAlternate, 5727 scrollPositionEnd; 5728 5729 /* Scroll also uniquely takes an optional "container" option, which indicates the parent element that should be scrolled -- 5730 as opposed to the browser window itself. This is useful for scrolling toward an element that's inside an overflowing parent element. */ 5731 if (opts.container) { 5732 /* Ensure that either a jQuery object or a raw DOM element was passed in. */ 5733 if (Type.isWrapped(opts.container) || Type.isNode(opts.container)) { 5734 /* Extract the raw DOM element from the jQuery wrapper. */ 5735 opts.container = opts.container[0] || opts.container; 5736 /* Note: Unlike other properties in Velocity, the browser's scroll position is never cached since it so frequently changes 5737 (due to the user's natural interaction with the page). */ 5738 scrollPositionCurrent = opts.container["scroll" + scrollDirection]; /* GET */ 5739 5740 /* $.position() values are relative to the container's currently viewable area (without taking into account the container's true dimensions 5741 -- say, for example, if the container was not overflowing). Thus, the scroll end value is the sum of the child element's position *and* 5742 the scroll container's current scroll position. */ 5743 scrollPositionEnd = (scrollPositionCurrent + $(element).position()[scrollDirection.toLowerCase()]) + scrollOffset; /* GET */ 5744 /* If a value other than a jQuery object or a raw DOM element was passed in, default to null so that this option is ignored. */ 5745 } else { 5746 opts.container = null; 5747 } 5748 } else { 5749 /* If the window itself is being scrolled -- not a containing element -- perform a live scroll position lookup using 5750 the appropriate cached property names (which differ based on browser type). */ 5751 scrollPositionCurrent = Velocity.State.scrollAnchor[Velocity.State["scrollProperty" + scrollDirection]]; /* GET */ 5752 /* When scrolling the browser window, cache the alternate axis's current value since window.scrollTo() doesn't let us change only one value at a time. */ 5753 scrollPositionCurrentAlternate = Velocity.State.scrollAnchor[Velocity.State["scrollProperty" + (scrollDirection === "Left" ? "Top" : "Left")]]; /* GET */ 5754 5755 /* Unlike $.position(), $.offset() values are relative to the browser window's true dimensions -- not merely its currently viewable area -- 5756 and therefore end values do not need to be compounded onto current values. */ 5757 scrollPositionEnd = $(element).offset()[scrollDirection.toLowerCase()] + scrollOffset; /* GET */ 5758 } 5759 5760 /* Since there's only one format that scroll's associated tweensContainer can take, we create it manually. */ 5761 tweensContainer = { 5762 scroll: { 5763 rootPropertyValue: false, 5764 startValue: scrollPositionCurrent, 5765 currentValue: scrollPositionCurrent, 5766 endValue: scrollPositionEnd, 5767 unitType: "", 5768 easing: opts.easing, 5769 scrollData: { 5770 container: opts.container, 5771 direction: scrollDirection, 5772 alternateValue: scrollPositionCurrentAlternate 5773 } 5774 }, 5775 element: element 5776 }; 5777 5778 if (Velocity.debug) console.log("tweensContainer (scroll): ", tweensContainer.scroll, element); 5779 5780 /****************************************** 5781 Tween Data Construction (for Reverse) 5782 ******************************************/ 5783 5784 /* Reverse acts like a "start" action in that a property map is animated toward. The only difference is 5785 that the property map used for reverse is the inverse of the map used in the previous call. Thus, we manipulate 5786 the previous call to construct our new map: use the previous map's end values as our new map's start values. Copy over all other data. */ 5787 /* Note: Reverse can be directly called via the "reverse" parameter, or it can be indirectly triggered via the loop option. (Loops are composed of multiple reverses.) */ 5788 /* Note: Reverse calls do not need to be consecutively chained onto a currently-animating element in order to operate on cached values; 5789 there is no harm to reverse being called on a potentially stale data cache since reverse's behavior is simply defined 5790 as reverting to the element's values as they were prior to the previous *Velocity* call. */ 5791 } else if (action === "reverse") { 5792 /* Abort if there is no prior animation data to reverse to. */ 5793 if (!Data(element).tweensContainer) { 5794 /* Dequeue the element so that this queue entry releases itself immediately, allowing subsequent queue entr
5794ies to run. */ 5795 $.dequeue(element, opts.queue); 5796 5797 return; 5798 } else { 5799 /********************* 5800 Options Parsing 5801 *********************/ 5802 5803 /* If the element was hidden via the display option in the previous call, 5804 revert display to "auto" prior to reversal so that the element is visible again. */ 5805 if (Data(element).opts.display === "none") { 5806 Data(element).opts.display = "auto"; 5807 } 5808 5809 if (Data(element).opts.visibility === "hidden") { 5810 Data(element).opts.visibility = "visible"; 5811 } 5812 5813 /* If the loop option was set in the previous call, disable it so that "reverse" calls aren't recursively generated. 5814 Further, remove the previous call's callback options; typically, users do not want these to be refired. */ 5815 Data(element).opts.loop = false; 5816 Data(element).opts.begin = null; 5817 Data(element).opts.complete = null; 5818 5819 /* Since we're extending an opts object that has already been extended with the defaults options object, 5820 we remove non-explicitly-defined properties that are auto-assigned values. */ 5821 if (!options.easing) { 5822 delete opts.easing; 5823 } 5824 5825 if (!options.duration) { 5826 delete opts.duration; 5827 } 5828 5829 /* The opts object used for reversal is an extension of the options object optionally passed into this 5830 reverse call plus the options used in the previous Velocity call. */ 5831 opts = $.extend({}, Data(element).opts, opts); 5832 5833 /************************************* 5834 Tweens Container Reconstruction 5835 *************************************/ 5836 5837 /* Create a deepy copy (indicated via the true flag) of the previous call's tweensContainer. */ 5838 var lastTweensContainer = $.extend(true, {}, Data(element).tweensContainer); 5839 5840 /* Manipulate the previous tweensContainer by replacing its end values and currentValues with its start values. */ 5841 for (var lastTween in lastTweensContainer) { 5842 /* In addition to tween data, tweensContainers contain an element property that we ignore here. */ 5843 if (lastTween !== "element") { 5844 var lastStartValue = lastTweensContainer[lastTween].startValue; 5845 5846 lastTweensContainer[lastTween].startValue = lastTweensContainer[lastTween].currentValue = lastTweensContainer[lastTween].endValue; 5847 lastTweensContainer[lastTween].endValue = lastStartValue; 5848 5849 /* Easing is the only option that embeds into the individual tween data (since it can be defined on a per-property basis). 5850 Accordingly, every property's easing value must be updated when an options object is passed in with a reverse call. 5851 The side effect of this extensibility is that all per-property easing values are forcefully reset to the new value. */ 5852 if (!Type.isEmptyObject(options)) { 5853 lastTweensContainer[lastTween].easing = opts.easing; 5854 } 5855 5856 if (Velocity.debug) console.log("reverse tweensContainer (" + lastTween + "): " + JSON.stringify(lastTweensContainer[lastTween]), element); 5857 } 5858 } 5859 5860 tweensContainer = lastTweensContainer; 5861 } 5862 5863 /***************************************** 5864 Tween Data Construction (for Start) 5865 *****************************************/ 5866 5867 } else if (action === "start") { 5868 5869 /************************* 5870 Value Transferring 5871 *************************/ 5872 5873 /* If this queue entry follows a previous Velocity-initiated queue entry *and* if this entry was created 5874 while the element was in the process of being animated by Velocity, then this current call is safe to use 5875 the end values from the prior call as its start values. Velocity attempts to perform this value transfer 5876 process whenever possible in order to avoid requerying the DOM. */ 5877 /* If values aren't transferred from a prior call and start values were not forcefed by the user (more on this below), 5878 then the DOM is queried for the element's current values as a last resort. */ 5879 /* Note: Conversely, animation reversal (and looping) *always* perform inter-call value transfers; they never requery the DOM. */ 5880 var lastTweensContainer; 5881 5882 /* The per-element isAnimating flag is used to indicate whether it's safe (i.e. the data isn't stale) 5883 to transfer over end values to use as start values. If it's set to true and there is a previous 5884 Velocity call to pull values from, do so. */ 5885 if (Data(element).tweensContainer && Data(element).isAnimating === true) { 5886 lastTweensContainer = Data(element).tweensContainer; 5887 } 5888 5889 /*************************** 5890 Tween Data Calculation 5891 ***************************/ 5892 5893 /* This function parses property data and defaults endValue, easing, and startValue as appropriate. */ 5894 /* Property map values can either take the form of 1) a single value representing the end value, 5895 or 2) an array in the form of [ endValue, [, easing] [, startValue] ]. 5896 The optional third parameter is a forcefed startValue to be used instead of querying the DOM for 5897 the element's current value. Read Velocity's docmentation to learn more about forcefeeding: VelocityJS.org/#forcefeeding */ 5898 function parsePropertyValue (valueData, skipResolvingEasing) { 5899 var endValue = undefined, 5900 easing = undefined, 5901 startValue = undefined; 5902 5903 /* Handle the array format, which can be structured as one of three potential overloads: 5904 A) [ endValue, easing, startValue ], B) [ endValue, easing ], or C) [ endValue, startValue ] */ 5905 if (Type.isArray(valueData)) { 5906 /* endValue is always the first item in the array. Don't bother validating endValue's value now 5907 since the ensuing property cycling logic does that. */ 5908 endValue = valueData[0]; 5909 5910 /* Two-item array format: If the second item is a number, function, or hex string, treat it as a 5911 start value since easings can only be non-hex strings or arrays. */ 5912 if ((!Type.isArray(valueData[1]) && /^[\d-]/.test(valueData[1])) || Type.isFunction(valueData[1]) || CSS.RegEx.isHex.test(valueData[1])) { 5913 startValue = valueData[1]; 5914 /* Two or three-item array: If the second item is a non-hex string or an array, treat it as an easing. */ 5915 } else if ((Type.isString(valueData[1]) && !CSS.RegEx.isHex.test(valueData[1])) || Type.isArray(valueData[1])) { 5916 easing = skipResolvingEasing ? valueData[1] : getEasing(valueData[1], opts.duration); 5917 5918 /* Don't bother validating startValue's value now since the ensuing property cycling logic inherently does that. */ 5919 if (valueData[2] !== undefined) { 5920 startValue = valueData[2]; 5921 } 5922 } 5923 /* Handle the single-value format. */ 5924 } else { 5925 endValue = valueData; 5926 } 5927 5928 /* Default to the call's easing if a per-property easing type was not defined. */ 5929 if (!skipResolvingEasing) { 5930 easing = easing || opts.easing; 5931 } 5932 5933 /* If functions were passed in as values, pass the function the current element as its context, 5934 plus the element's index and the element set's size as arguments. Then, assign the returned value. */
5935 if (Type.isFunction(endValue)) { 5936 endValue = endValue.call(element, elementsIndex, elementsLength); 5937 } 5938 5939 if (Type.isFunction(startValue)) { 5940 startValue = startValue.call(element, elementsIndex, elementsLength); 5941 } 5942 5943 /* Allow startValue to be left as undefined to indicate to the ensuing code that its value was not forcefed. */ 5944 return [ endValue || 0, easing, startValue ]; 5945 } 5946 5947 /* Cycle through each property in the map, looking for shorthand color properties (e.g. "color" as opposed to "colorRed"). Inject the corresponding 5948 colorRed, colorGreen, and colorBlue RGB component tweens into the propertiesMap (which Velocity understands) and remove the shorthand property. */ 5949 $.each(propertiesMap, function(property, value) { 5950 /* Find shorthand color properties that have been passed a hex string. */ 5951 if (RegExp("^" + CSS.Lists.colors.join("$|^") + "$").test(property)) { 5952 /* Parse the value data for each shorthand. */ 5953 var valueData = parsePropertyValue(value, true), 5954 endValue = valueData[0], 5955 easing = valueData[1], 5956 startValue = valueData[2]; 5957 5958 if (CSS.RegEx.isHex.test(endValue)) { 5959 /* Convert the hex strings into their RGB component arrays. */ 5960 var colorComponents = [ "Red", "Green", "Blue" ], 5961 endValueRGB = CSS.Values.hexToRgb(endValue), 5962 startValueRGB = startValue ? CSS.Values.hexToRgb(startValue) : undefined; 5963 5964 /* Inject the RGB component tweens into propertiesMap. */ 5965 for (var i = 0; i < colorComponents.length; i++) { 5966 var dataArray = [ endValueRGB[i] ]; 5967 5968 if (easing) { 5969 dataArray.push(easing); 5970 } 5971 5972 if (startValueRGB !== undefined) { 5973 dataArray.push(startValueRGB[i]); 5974 } 5975 5976 propertiesMap[property + colorComponents[i]] = dataArray; 5977 } 5978 5979 /* Remove the intermediary shorthand property entry now that we've processed it. */ 5980 delete propertiesMap[property]; 5981 } 5982 } 5983 }); 5984 5985 /* Create a tween out of each property, and append its associated data to tweensContainer. */ 5986 for (var property in propertiesMap) { 5987 5988 /************************** 5989 Start Value Sourcing 5990 **************************/ 5991 5992 /* Parse out endValue, easing, and startValue from the property's data. */ 5993 var valueData = parsePropertyValue(propertiesMap[property]), 5994 endValue = valueData[0], 5995 easing = valueData[1], 5996 startValue = valueData[2]; 5997 5998 /* Now that the original property name's format has been used for the parsePropertyValue() lookup above, 5999 we force the property to its camelCase styling to normalize it for manipulation. */ 6000 property = CSS.Names.camelCase(property); 6001 6002 /* In case this property is a hook, there are circumstances where we will intend to work on the hook's root property and not the hooked subproperty. */ 6003 var rootProperty = CSS.Hooks.getRoot(property), 6004 rootPropertyValue = false; 6005 6006 /* Other than for the dummy tween property, properties that are not supported by the browser (and do not have an associated normalization) will 6007 inherently produce no style changes when set, so they are skipped in order to decrease animation tick overhead. 6008 Property support is determined via prefixCheck(), which returns a false flag when no supported is detected. */ 6009 /* Note: Since SVG elements have some of their properties directly applied as HTML attributes, 6010 there is no way to check for their explicit browser support, and so we skip skip this check for them. */ 6011 if (!Data(element).isSVG && rootProperty !== "tween" && CSS.Names.prefixCheck(rootProperty)[1] === false && CSS.Normalizations.registered[rootProperty] === undefined) { 6012 if (Velocity.debug) console.log("Skipping [" + rootProperty + "] due to a lack of browser support."); 6013 6014 continue; 6015 } 6016
vendor: 21,048 bytes, lines 6017-6384
6017 /* If the display option is being set to a non-"none" (e.g. "block") and opacity (filter on IE<=8) is being 6018 animated to an endValue of non-zero, the user's intention is to fade in from invisible, thus we forcefeed opacity 6019 a startValue of 0 if its startValue hasn't already been sourced by value transferring or prior forcefeeding. */ 6020 if (((opts.display !== undefined && opts.display !== null && opts.display !== "none") || (opts.visibility !== undefined && opts.visibility !== "hidden")) && /opacity|filter/.test(property) && !startValue && endValue !== 0) { 6021 startValue = 0; 6022 } 6023 6024 /* If values have been transferred from the previous Velocity call, extract the endValue and rootPropertyValue 6025 for all of the current call's properties that were *also* animated in the previous call. */ 6026 /* Note: Value transferring can optionally be disabled by the user via the _cacheValues option. */ 6027 if (opts._cacheValues && lastTweensContainer && lastTweensContainer[property]) { 6028 if (startValue === undefined) { 6029 startValue = lastTweensContainer[property].endValue + lastTweensContainer[property].unitType; 6030 } 6031 6032 /* The previous call's rootPropertyValue is extracted from the element's data cache since that's the 6033 instance of rootPropertyValue that gets freshly updated by the tweening process, whereas the rootPropertyValue 6034 attached to the incoming lastTweensContainer is equal to the root property's value prior to any tweening. */ 6035 rootPropertyValue = Data(element).rootPropertyValueCache[rootProperty]; 6036 /* If values were not transferred from a previous Velocity call, query the DOM as needed. */ 6037 } else { 6038 /* Handle hooked properties. */ 6039 if (CSS.Hooks.registered[property]) { 6040 if (startValue === undefined) { 6041 rootPropertyValue = CSS.getPropertyValue(element, rootProperty); /* GET */ 6042 /* Note: The following getPropertyValue() call does not actually trigger a DOM query; 6043 getPropertyValue() will extract the hook from rootPropertyValue. */ 6044 startValue = CSS.getPropertyValue(element, property, rootPropertyValue); 6045 /* If startValue is already defined via forcefeeding, do not query the DOM for the root property's value; 6046 just grab rootProperty's zero-value template from CSS.Hooks. This overwrites the element's actual 6047 root property value (if one is set), but this is acceptable since the primary reason users forcefeed is 6048 to avoid DOM queries, and thus we likewise avoid querying the DOM for the root property's value. */ 6049 } else { 6050 /* Grab this hook's zero-value template, e.g. "0px 0px 0px black". */ 6051 rootPropertyValue = CSS.Hooks.templates[rootProperty][1]; 6052 } 6053 /* Handle non-hooked properties that haven't already been defined via forcefeeding. */ 6054 } else if (startValue === undefined) { 6055 startValue = CSS.getPropertyValue(element, property); /* GET */ 6056 } 6057 } 6058 6059 /************************** 6060 Value Data Extraction 6061 **************************/ 6062 6063 var separatedValue, 6064 endValueUnitType, 6065 startValueUnitType, 6066 operator = false; 6067 6068 /* Separates a property value into its numeric value and its unit type. */ 6069 function separateValue (property, value) { 6070 var unitType, 6071 numericValue; 6072 6073 numericValue = (value || "0") 6074 .toString() 6075 .toLowerCase() 6076 /* Match the unit type at the end of the value. */ 6077 .replace(/[%A-z]+$/, function(match) { 6078 /* Grab the unit type. */ 6079 unitType = match; 6080 6081 /* Strip the unit type off of value. */ 6082 return ""; 6083 }); 6084 6085 /* If no unit type was supplied, assign one that is appropriate for this property (e.g. "deg" for rotateZ or "px" for width). */ 6086 if (!unitType) { 6087 unitType = CSS.Values.getUnitType(property); 6088 } 6089 6090 return [ numericValue, unitType ]; 6091 } 6092 6093 /* Separate startValue. */ 6094 separatedValue = separateValue(property, startValue); 6095 startValue = separatedValue[0]; 6096 startValueUnitType = separatedValue[1]; 6097 6098 /* Separate endValue, and extract a value operator (e.g. "+=", "-=") if one exists. */ 6099 separatedValue = separateValue(property, endValue); 6100 endValue = separatedValue[0].replace(/^([+-\/*])=/, function(match, subMatch) { 6101 operator = subMatch; 6102 6103 /* Strip the operator off of the value. */ 6104 return ""; 6105 }); 6106 endValueUnitType = separatedValue[1]; 6107 6108 /* Parse float values from endValue and startValue. Default to 0 if NaN is returned. */ 6109 startValue = parseFloat(startValue) || 0; 6110 endValue = parseFloat(endValue) || 0; 6111 6112 /*************************************** 6113 Property-Specific Value Conversion 6114 ***************************************/ 6115 6116 /* Custom support for properties that don't actually accept the % unit type, but where pollyfilling is trivial and relatively foolproof. */ 6117 if (endValueUnitType === "%") { 6118 /* A %-value fontSize/lineHeight is relative to the parent's fontSize (as opposed to the parent's dimensions), 6119 which is identical to the em unit's behavior, so we piggyback off of that. */ 6120 if (/^(fontSize|lineHeight)$/.test(property)) { 6121 /* Convert % into an em decimal value. */ 6122 endValue = endValue / 100; 6123 endValueUnitType = "em"; 6124 /* For scaleX and scaleY, convert the value into its decimal format and strip off the unit type. */ 6125 } else if (/^scale/.test(property)) { 6126 endValue = endValue / 100; 6127 endValueUnitType = ""; 6128 /* For RGB components, take the defined percentage of 255 and strip off the unit type. */ 6129 } else if (/(Red|Green|Blue)$/i.test(property)) { 6130 endValue = (endValue / 100) * 255; 6131 endValueUnitType = ""; 6132 } 6133 } 6134 6135 /*************************** 6136 Unit Ratio Calculation 6137 ***************************/ 6138 6139 /* When queried, the browser returns (most) CSS property values in pixels. Therefore, if an endValue with a unit type of 6140 %, em, or rem is animated toward, startValue must be converted from pixels into the same unit type as endValue in order 6141 for value manipulation logic (increment/decrement) to proceed. Further, if the startValue was forcefed or transferred 6142 from a previous call, startValue may also not be in pixels. Unit conversion logic therefore consists of two steps: 6143 1) Calculating the ratio of %/em/rem/vh/vw relative to pixels 6144 2) Converting startValue into the same unit of measurement as endValue based on these ratios. */ 6145 /* Unit conversion ratios are calculated by inserting a sibling node next to the target node, copying over its position property, 6146 setting values with the target unit type then comparing the returned pixel value. */ 6147 /* Note: Even if only one of these unit types is being animated, all unit ratios are calculated at once since the overhead 6148 of batching the SETs and GETs together upfront outweights the potential overhead 6149 of layout thrashing caused by re-querying for uncalculated ratios for subsequently-processed properties. */ 6150 /* Todo: Shift this logic into the calls' first tick instance so that it's synced with RAF. */ 6151 function calculateUnitRatios () { 6152 6153 /************************ 6154 Same Ratio Checks 6155 ************************/ 6156 6157 /* The properties below are used to determine whether the element differs sufficiently from this call's 6158 previously iterated element to also differ in its unit conversion ratios. If the properties match up with those 6159 of the prior element, the prior element's conversion ratios are used. Like most optimizations in Velocity, 6160 this is done to minimize DOM querying. */ 6161 var sameRatioIndicators = { 6162 myParent: element.parentNode || document.body, /* GET */ 6163 position: CSS.getPropertyValue(element, "position"), /* GET */ 6164 fontSize: CSS.getPropertyValue(element, "fontSize") /* GET */ 6165 }, 6166 /* Determine if the same % ratio can be used. % is based on the element's position value and its parent's width and height dimensions. */ 6167 samePercentRatio = ((sameRatioIndicators.position === callUnitConversionData.lastPosition) && (sameRatioIndicators.myParent === callUnitConversionData.lastParent)), 6168 /* Determine if the same em ratio can be used. em is relative to the element's fontSize. */ 6169 sameEmRatio = (sameRatioIndicators.fontSize === callUnitConversionData.lastFontSize); 6170 6171 /* Store these ratio indicators call-wide for the next element to compare against. */ 6172 callUnitConversionData.lastParent = sameRatioIndicators.myParent; 6173 callUnitConversionData.lastPosition = sameRatioIndicators.position; 6174 callUnitConversionData.lastFontSize = sameRatioIndicators.fontSize; 6175 6176 /*************************** 6177 Element-Specific Units 6178 ***************************/ 6179 6180 /* Note: IE8 rounds to the nearest pixel when returning CSS values, thus we perform conversions using a measurement 6181 of 100 (instead of 1) to give our ratios a precision of at least 2 decimal values. */ 6182 var measurement = 100, 6183 unitRatios = {}; 6184 6185 if (!sameEmRatio || !samePercentRatio) { 6186 var dummy = Data(element).isSVG ? document.createElementNS("http://www.w3.org/2000/svg", "rect") : document.createElement("div"); 6187 6188 Velocity.init(dummy); 6189 sameRatioIndicators.myParent.appendChild(dummy); 6190 6191 /* To accurately and consistently calculate conversion ratios, the element's cascaded overflow and box-sizing are stripped. 6192 Similarly, since width/height can be artificially constrained by their min-/max- equivalents, these are controlled for as well. */ 6193 /* Note: Overflow must be also be controlled for per-axis since the overflow property overwrites its per-axis values. */ 6194 $.each([ "overflow", "overflowX", "overflowY" ], function(i, property) { 6195 Velocity.CSS.setPropertyValue(dummy, property, "hidden"); 6196 }); 6197 Velocity.CSS.setPropertyValue(dummy, "position", sameRatioIndicators.position); 6198 Velocity.CSS.setPropertyValue(dummy, "fontSize", sameRatioIndicators.fontSize); 6199 Velocity.CSS.setPropertyValue(dummy, "boxSizing", "content-box"); 6200 6201 /* width and height act as our proxy properties for measuring the horizontal and vertical % ratios. */ 6202 $.each([ "minWidth", "maxWidth", "width", "minHeight", "maxHeight", "height" ], function(i, property) { 6203 Velocity.CSS.setPropertyValue(dummy, property, measurement + "%"); 6204 }); 6205 /* paddingLeft arbitrarily acts as our proxy property for the em ratio. */ 6206 Velocity.CSS.setPropertyValue(dummy, "paddingLeft", measurement + "em"); 6207 6208 /* Divide the returned value by the measurement to get the ratio between 1% and 1px. Default to 1 since working with 0 can produce Infinite. */ 6209 unitRatios.percentToPxWidth = callUnitConversionData.lastPercentToPxWidth = (parseFloat(CSS.getPropertyValue(dummy, "width", null, true)) || 1) / measurement; /* GET */ 6210 unitRatios.percentToPxHeight = callUnitConversionData.lastPercentToPxHeight = (parseFloat(CSS.getPropertyValue(dummy, "height", null, true)) || 1) / measurement; /* GET */ 6211 unitRatios.emToPx = callUnitConversionData.lastEmToPx = (parseFloat(CSS.getPropertyValue(dummy, "paddingLeft")) || 1) / measurement; /* GET */ 6212 6213 sameRatioIndicators.myParent.removeChild(dummy); 6214 } else { 6215 unitRatios.emToPx = callUnitConversionData.lastEmToPx; 6216 unitRatios.percentToPxWidth = callUnitConversionData.lastPercentToPxWidth; 6217 unitRatios.percentToPxHeight = callUnitConversionData.lastPercentToPxHeight; 6218 } 6219 6220 /*************************** 6221 Element-Agnostic Units 6222 ***************************/ 6223 6224 /* Whereas % and em ratios are determined on a per-element basis, the rem unit only needs to be checked 6225 once per call since it's exclusively dependant upon document.body's fontSize. If this is the first time 6226 that calculateUnitRatios() is being run during this call, remToPx will still be set to its default value of null, 6227 so we calculate it now. */ 6228 if (callUnitConversionData.remToPx === null) { 6229 /* Default to browsers' default fontSize of 16px in the case of 0. */ 6230 callUnitConversionData.remToPx = parseFloat(CSS.getPropertyValue(document.body, "fontSize")) || 16; /* GET */ 6231 } 6232 6233 /* Similarly, viewport units are %-relative to the window's inner dimensions. */ 6234 if (callUnitConversionData.vwToPx === null) { 6235 callUnitConversionData.vwToPx = parseFloat(window.innerWidth) / 100; /* GET */ 6236 callUnitConversionData.vhToPx = parseFloat(window.innerHeight) / 100; /* GET */ 6237 } 6238 6239 unitRatios.remToPx = callUnitConversionData.remToPx; 6240 unitRatios.vwToPx = callUnitConversionData.vwToPx; 6241 unitRatios.vhToPx = callUnitConversionData.vhToPx; 6242 6243 if (Velocity.debug >= 1) console.log("Unit ratios: " + JSON.stringify(unitRatios), element); 6244 6245 return unitRatios; 6246 } 6247 6248 /******************** 6249 Unit Conversion 6250 ********************/ 6251 6252 /* The * and / operators, which are not passed in with an associated unit, inherently use startValue's unit. Skip value and unit conversion. */ 6253 if (/[\/*]/.test(operator)) { 6254 endValueUnitType = startValueUnitType; 6255 /* If startValue and endValue differ in unit type, convert startValue into the same unit type as endValue so that if endValueUnitType 6256 is a relative unit (%, em, rem), the values set during tweening will continue to be accurately relative even if the metrics they depend 6257 on are dynamically changing during the course of the animation. Conversely, if we always normalized into px and used px for setting values, the px ratio 6258 would become stale if the original unit being animated toward was relative and the underlying metrics change during the animation. */ 6259 /* Since 0 is 0 in any unit type, no conversion is necessary when startValue is 0 -- we just start at 0 with endValueUnitType. */ 6260 } else if ((startValueUnitType !== endValueUnitType) && startValue !== 0) { 6261 /* Unit conversion is also skipped when endValue is 0, but *startValueUnitType* must be used for tween values to remain accurate. */ 6262 /* Note: Skipping unit conversion here means that if endValueUnitType was originally a relative unit, the animation won't relatively 6263 match the underlying metrics if they change, but this is acceptable since we're animating toward invisibility instead of toward visibility, 6264 which remains past the point of the animation's completion. */ 6265 if (endValue === 0) { 6266 endValueUnitType = startValueUnitType; 6267 } else { 6268 /* By this point, we cannot avoid unit conversion (it's undesirable since it causes layout thrashing). 6269 If we haven't already, we trigger calculateUnitRatios(), which runs once per element per call. */ 6270 elementUnitConversionData = elementUnitConversionData || calculateUnitRatios(); 6271 6272 /* The following RegEx matches CSS properties that have their % values measured relative to the x-axis. */ 6273 /* Note: W3C spec mandates that all of margin and padding's properties (even top and bottom) are %-relative to the *width* of the parent element. */ 6274 var axis = (/margin|padding|left|right|width|text|word|letter/i.test(property) || /X$/.test(property) || property === "x") ? "x" : "y"; 6275 6276 /* In order to avoid generating n^2 bespoke conversion functions, unit conversion is a two-step process: 6277 1) Convert startValue into pixels. 2) Convert this new pixel value into endValue's unit type. */ 6278 switch (startValueUnitType) { 6279 case "%": 6280 /* Note: translateX and translateY are the only properties that are %-relative to an element's own dimensions -- not its parent's dimensions. 6281 Velocity does not include a special conversion process to account for this behavior. Therefore, animating translateX/Y from a % value 6282 to a non-% value will produce an incorrect start value. Fortunately, this sort of cross-unit conversion is rarely done by users in practice. */ 6283 startValue *= (axis === "x" ? elementUnitConversionData.percentToPxWidth : elementUnitConversionData.percentToPxHeight); 6284 break; 6285 6286 case "px": 6287 /* px acts as our midpoint in the unit conversion process; do nothing. */ 6288 break; 6289 6290 default: 6291 startValue *= elementUnitConversionData[startValueUnitType + "ToPx"]; 6292 } 6293 6294 /* Invert the px ratios to convert into to the target unit. */ 6295 switch (endValueUnitType) { 6296 case "%": 6297 startValue *= 1 / (axis === "x" ? elementUnitConversionData.percentToPxWidth : elementUnitConversionData.percentToPxHeight); 6298 break; 6299 6300 case "px": 6301 /* startValue is already in px, do nothing; we're done. */ 6302 break; 6303 6304 default: 6305 startValue *= 1 / elementUnitConversionData[endValueUnitType + "ToPx"]; 6306 } 6307 } 6308 } 6309 6310 /********************* 6311 Relative Values 6312 *********************/ 6313 6314 /* Operator logic must be performed last since it requires unit-normalized start and end values. */ 6315 /* Note: Relative *percent values* do not behave how most people think; while one would expect "+=50%" 6316 to increase the property 1.5x its current value, it in fact increases the percent units in absolute terms: 6317 50 points is added on top of the current % value. */ 6318 switch (operator) { 6319 case "+": 6320 endValue = startValue + endValue; 6321 break; 6322 6323 case "-": 6324 endValue = startValue - endValue; 6325 break; 6326 6327 case "*": 6328 endValue = startValue * endValue; 6329 break; 6330 6331 case "/": 6332 endValue = startValue / endValue; 6333 break; 6334 } 6335 6336 /************************** 6337 tweensContainer Push 6338 **************************/ 6339 6340 /* Construct the per-property tween object, and push it to the element's tweensContainer. */ 6341 tweensContainer[property] = { 6342 rootPropertyValue: rootPropertyValue, 6343 startValue: startValue, 6344 currentValue: startValue, 6345 endValue: endValue, 6346 unitType: endValueUnitType, 6347 easing: easing 6348 }; 6349 6350 if (Velocity.debug) console.log("tweensContainer (" + property + "): " + JSON.stringify(tweensContainer[property]), element); 6351 } 6352 6353 /* Along with its property data, store a reference to the element itself onto tweensContainer. */ 6354 tweensContainer.element = element; 6355 } 6356 6357 /***************** 6358 Call Push 6359 *****************/ 6360 6361 /* Note: tweensContainer can be empty if all of the properties in this call's property map were skipped due to not 6362 being supported by the browser. The element property is used for checking that the tweensContainer has been appended to. */ 6363 if (tweensContainer.element) { 6364 /* Apply the "velocity-animating" indicator class. */ 6365 CSS.Values.addClass(element, "velocity-animating"); 6366 6367 /* The call array houses the tweensContainers for each element being animated in the current call. */ 6368 call.push(tweensContainer); 6369 6370 /* Store the tweensContainer and options if we're working on the default effects queue, so that they can be used by the reverse command. */ 6371 if (opts.queue === "") { 6372 Data(element).tweensContainer = tweensContainer; 6373 Data(element).opts = opts; 6374 } 6375 6376 /* Switch on the element's animating flag. */ 6377 Data(element).isAnimating = true; 6378 6379 /* Once the final element in this call's element set has been processed, push the call array onto 6380 Velocity.State.calls for the animation tick to immediately begin processing. */ 6381 if (elementsIndex === elementsLength - 1) { 6382 /* Add the current call plus its associated metadata (the element set and the call's options) onto the global call container. 6383 Anything on this call container is subjected to tick() processing. */ 6384 Velocity.State.calls.push([ call, elements, opts, null, promiseData.resolver ]);
6385 6386 /* If the animation tick isn't running, start it. (Velocity shuts it off when there are no active calls to process.) */ 6387 if (Velocity.State.isTicking === false) { 6388 Velocity.State.isTicking = true; 6389 6390 /* Start the tick loop. */ 6391 tick(); 6392 } 6393 } else { 6394 elementsIndex++; 6395 } 6396 } 6397 } 6398 6399 /* When the queue option is set to false, the call skips the element's queue and fires immediately. */ 6400 if (opts.queue === false) { 6401 /* Since this buildQueue call doesn't respect the element's existing queue (which is where a delay option would have been appended), 6402 we manually inject the delay property here with an explicit setTimeout. */ 6403 if (opts.delay) { 6404 setTimeout(buildQueue, opts.delay); 6405 } else { 6406 buildQueue(); 6407 } 6408 /* Otherwise, the call undergoes element queueing as normal. */ 6409 /* Note: To interoperate with jQuery, Velocity uses jQuery's own $.queue() stack for queuing logic. */ 6410 } else { 6411 $.queue(element, opts.queue, function(next, clearQueue) { 6412 /* If the clearQueue flag was passed in by the stop command, resolve this call's promise. (Promises can only be resolved once, 6413 so it's fine if this is repeatedly triggered for each element in the associated call.) */ 6414 if (clearQueue === true) { 6415 if (promiseData.promise) { 6416 promiseData.resolver(elements); 6417 } 6418 6419 /* Do not continue with animation queueing. */ 6420 return true; 6421 } 6422 6423 /* This flag indicates to the upcoming completeCall() function that this queue entry was initiated by Velocity. 6424 See completeCall() for further details. */ 6425 Velocity.velocityQueueEntryFlag = true; 6426 6427 buildQueue(next); 6428 }); 6429 } 6430 6431 /********************* 6432 Auto-Dequeuing 6433 *********************/ 6434 6435 /* As per jQuery's $.queue() behavior, to fire the first non-custom-queue entry on an element, the element 6436 must be dequeued if its queue stack consists *solely* of the current call. (This can be determined by checking 6437 for the "inprogress" item that jQuery prepends to active queue stack arrays.) Regardless, whenever the element's 6438 queue is further appended with additional items -- including $.delay()'s or even $.animate() calls, the queue's 6439 first entry is automatically fired. This behavior contrasts that of custom queues, which never auto-fire. */ 6440 /* Note: When an element set is being subjected to a non-parallel Velocity call, the animation will not begin until 6441 each one of the elements in the set has reached the end of its individually pre-existing queue chain. */ 6442 /* Note: Unfortunately, most people don't fully grasp jQuery's powerful, yet quirky, $.queue() function. 6443 Lean more here: http://stackoverflow.com/questions/1058158/can-somebody-explain-jquery-queue-to-me */ 6444 if ((opts.queue === "" || opts.queue === "fx") && $.queue(element)[0] !== "inprogress") { 6445 $.dequeue(element); 6446 } 6447 } 6448 6449 /************************** 6450 Element Set Iteration 6451 **************************/ 6452 6453 /* If the "nodeType" property exists on the elements variable, we're animating a single element. 6454 Place it in an array so that $.each() can iterate over it. */ 6455 $.each(elements, function(i, element) { 6456 /* Ensure each element in a set has a nodeType (is a real element) to avoid throwing errors. */ 6457 if (Type.isNode(element)) { 6458 processElement.call(element); 6459 } 6460 }); 6461 6462 /****************** 6463 Option: Loop 6464 ******************/ 6465 6466 /* The loop option accepts an integer indicating how many times the element should loop between the values in the 6467 current call's properties map and the element's property values prior to this call. */ 6468 /* Note: The loop option's logic is performed here -- after element processing -- because the current call needs 6469 to undergo its queue insertion prior to the loop option generating its series of constituent "reverse" calls, 6470 which chain after the current call. Two reverse calls (two "alternations") constitute one loop. */ 6471 var opts = $.extend({}, Velocity.defaults, options), 6472 reverseCallsCount; 6473 6474 opts.loop = parseInt(opts.loop); 6475 reverseCallsCount = (opts.loop * 2) - 1; 6476 6477 if (opts.loop) {
6478 /* Double the loop count to convert it into its appropriate number of "reverse" calls. 6479 Subtract 1 from the resulting value since the current call is included in the total alternation count. */ 6480 for (var x = 0; x < reverseCallsCount; x++) { 6481 /* Since the logic for the reverse action occurs inside Queueing and therefore this call's options object 6482 isn't parsed until then as well, the current call's delay option must be explicitly passed into the reverse 6483 call so that the delay logic that occurs inside *Pre-Queueing* can process it. */ 6484 var reverseOptions = { 6485 delay: opts.delay, 6486 progress: opts.progress 6487 }; 6488 6489 /* If a complete callback was passed into this call, transfer it to the loop redirect's final "reverse" call 6490 so that it's triggered when the entire redirect is complete (and not when the very first animation is complete). */ 6491 if (x === reverseCallsCount - 1) { 6492 reverseOptions.display = opts.display; 6493 reverseOptions.visibility = opts.visibility; 6494 reverseOptions.complete = opts.complete; 6495 } 6496 6497 animate(elements, "reverse", reverseOptions); 6498 } 6499 } 6500 6501 /*************** 6502 Chaining 6503 ***************/ 6504 6505 /* Return the elements back to the call chain, with wrapped elements taking precedence in case Velocity was called via the $.fn. extension. */ 6506 return getChain(); 6507 }; 6508 6509 /* Turn Velocity into the animation function, extended with the pre-existing Velocity object. */ 6510 Velocity = $.extend(animate, Velocity); 6511 /* For legacy support, also expose the literal animate method. */ 6512 Velocity.animate = animate; 6513 6514 /************** 6515 Timing 6516 **************/ 6517 6518 /* Ticker function. */ 6519 var ticker = window.requestAnimationFrame || rAFShim; 6520 6521 /* Inactive browser tabs pause rAF, which results in all active animations immediately sprinting to their completion states when the tab refocuses. 6522 To get around this, we dynamically switch rAF to setTimeout (which the browser *doesn't* pause) when the tab loses focus. We skip this for mobile 6523 devices to avoid wasting battery power on inactive tabs. */ 6524 /* Note: Tab focus detection doesn't work on older versions of IE, but that's okay since they don't support rAF to begin with. */ 6525 if (!Velocity.State.isMobile && document.hidden !== undefined) { 6526 document.addEventListener("visibilitychange", function() { 6527 /* Reassign the rAF function (which the global tick() function uses) based on the tab's focus state. */ 6528 if (document.hidden) { 6529 ticker = function(callback) { 6530 /* The tick function needs a truthy first argument in order to pass its internal timestamp check. */ 6531 return setTimeout(function() { callback(true) }, 16); 6532 }; 6533 6534 /* The rAF loop has been paused by the browser, so we manually restart the tick. */ 6535 tick(); 6536 } else { 6537 ticker = window.requestAnimationFrame || rAFShim; 6538 } 6539 }); 6540 } 6541 6542 /************ 6543 Tick 6544 ************/ 6545 6546 /* Note: All calls to Velocity are pushed to the Velocity.State.calls array, which is fully iterated through upon each tick. */ 6547 function tick (timestamp) { 6548 /* An empty timestamp argument indicates that this is the first tick occurence since ticking was turned on. 6549 We leverage this metadata to fully ignore the first tick pass since RAF's initial pass is fired whenever 6550 the browser's next tick sync time occurs, which results in the first elements subjected to Velocity 6551 calls being animated out of sync with any elements animated immediately thereafter. In short, we ignore 6552 the first RAF tick pass so that elements being immediately consecutively animated -- instead of simultaneously animated 6553 by the same Velocity call -- are properly batched into the same initial RAF tick and consequently remain in sync thereafter. */ 6554 if (timestamp) { 6555 /* We ignore RAF's high resolution timestamp since it can be significantly offset when the browser is 6556 under high stress; we opt for choppiness over allowing the browser to drop huge chunks of frames. */ 6557 var timeCurrent = (new Date).getTime(); 6558 6559 /******************** 6560 Call Iteration 6561 ********************/ 6562 6563 var callsLength = Velocity.State.calls.length; 6564 6565 /* To speed up iterating over this array, it is compacted (falsey items -- calls that have completed -- are removed) 6566 when its length has ballooned to a point that can impact tick performance. This only becomes necessary when animation 6567 has been continuous with many elements over a long period of time; whenever all active calls are completed, completeCall() clears Velocity.State.calls. */ 6568 if (callsLength > 10000) { 6569 Velocity.State.calls = compactSparseArray(Velocity.State.calls); 6570 } 6571 6572 /* Iterate through each active call. */ 6573 for (var i = 0; i < callsLength; i++) { 6574 /* When a Velocity call is completed, its Velocity.State.calls entry is set to false. Continue on to the next call. */ 6575 if (!Velocity.State.calls[i]) { 6576 continue; 6577 } 6578 6579 /************************ 6580 Call-Wide Variables 6581 ************************/ 6582 6583 var callContainer = Velocity.State.calls[i], 6584 call = callContainer[0], 6585 opts = callContainer[2], 6586 timeStart = callContainer[3], 6587 firstTick = !!timeStart, 6588 tweenDummyValue = null; 6589 6590 /* If timeStart is undefined, then this is the first time that this call has been processed by tick(). 6591 We assign timeStart now so that its value is as close to the real animation start time as possible. 6592 (Conversely, had timeStart been defined when this call was added to Velocity.State.calls, the delay 6593 between that time and now would cause the first few frames of the tween to be skipped since 6594 percentComplete is calculated relative to timeStart.) */ 6595 /* Further, subtract 16ms (the approximate resolution of RAF) from the current time value so that the 6596 first tick iteration isn't wasted by animating at 0% tween completion, which would produce the 6597 same style value as the element's current value. */ 6598 if (!timeStart) { 6599 timeStart = Velocity.State.calls[i][3] = timeCurrent - 16; 6600 } 6601 6602 /* The tween's completion percentage is relative to the tween's start time, not the tween's start value 6603 (which would result in unpredictable tween durations since JavaScript's timers are not particularly accurate). 6604 Accordingly, we ensure that percentComplete does not exceed 1. */ 6605 var percentComplete = Math.min((timeCurrent - timeStart) / opts.duration, 1); 6606 6607 /********************** 6608 Element Iteration 6609 **********************/ 6610 6611 /* For every call, iterate through each of the elements in its set. */ 6612 for (var j = 0, callLength = call.length; j < callLength; j++) { 6613 var tweensContainer = call[j], 6614 element = tweensContainer.element; 6615 6616 /* Check to see if this element has been deleted midway through the animation by checking for the 6617 continued existence of its data cache. If it's gone, skip animating this element. */ 6618 if (!Data(element)) { 6619 continue; 6620 } 6621 6622 var transformPropertyExists = false; 6623 6624 /********************************** 6625 Display & Visibility Toggling 6626 **********************************/ 6627 6628 /* If the display option is set to non-"none", set it upfront so that the element can become visible before tweening begins. 6629 (Otherwise, display's "none" value is set in completeCall() once the animation has completed.) */ 6630 if (opts.display !== undefined && opts.display !== null && opts.display !== "none") { 6631 if (opts.display === "flex") { 6632 var flexValues = [ "-webkit-box", "-moz-box", "-ms-flexbox", "-webkit-flex" ]; 6633 6634 $.each(flexValues, function(i, flexValue) { 6635 CSS.setPropertyValue(element, "display", flexValue); 6636 });
6637 } 6638 6639 CSS.setPropertyValue(element, "display", opts.display); 6640 } 6641 6642 /* Same goes with the visibility option, but its "none" equivalent is "hidden". */ 6643 if (opts.visibility !== undefined && opts.visibility !== "hidden") { 6644 CSS.setPropertyValue(element, "visibility", opts.visibility); 6645 } 6646 6647 /************************ 6648 Property Iteration 6649 ************************/ 6650 6651 /* For every element, iterate through each property. */ 6652 for (var property in tweensContainer) { 6653 /* Note: In addition to property tween data, tweensContainer contains a reference to its associated element. */ 6654 if (property !== "element") { 6655 var tween = tweensContainer[property], 6656 currentValue, 6657 /* Easing can either be a pre-genereated function or a string that references a pre-registered easing 6658 on the Velocity.Easings object. In either case, return the appropriate easing *function*. */ 6659 easing = Type.isString(tween.easing) ? Velocity.Easings[tween.easing] : tween.easing; 6660 6661 /****************************** 6662 Current Value Calculation 6663 ******************************/ 6664 6665 /* If this is the last tick pass (if we've reached 100% completion for this tween), 6666 ensure that currentValue is explicitly set to its target endValue so that it's not subjected to any rounding. */ 6667 if (percentComplete === 1) { 6668 currentValue = tween.endValue; 6669 /* Otherwise, calculate currentValue based on the current delta from startValue. */ 6670 } else { 6671 var tweenDelta = tween.endValue - tween.startValue; 6672 currentValue = tween.startValue + (tweenDelta * easing(percentComplete, opts, tweenDelta)); 6673 6674 /* If no value change is occurring, don't proceed with DOM updating. */ 6675 if (!firstTick && (currentValue === tween.currentValue)) { 6676 continue; 6677 } 6678 } 6679 6680 tween.currentValue = currentValue; 6681 6682 /* If we're tweening a fake 'tween' property in order to log transition values, update the one-per-call variable so that 6683 it can be passed into the progress callback. */ 6684 if (property === "tween") { 6685 tweenDummyValue = currentValue; 6686 } else { 6687 /****************** 6688 Hooks: Part I 6689 ******************/ 6690 6691 /* For hooked properties, the newly-updated rootPropertyValueCache is cached onto the element so that it can be used 6692 for subsequent hooks in this call that are associated with the same root property. If we didn't cache the updated 6693 rootPropertyValue, each subsequent update to the root property in this tick pass would reset the previous hook's 6694 updates to rootPropertyValue prior to injection. A nice performance byproduct of rootPropertyValue caching is that 6695 subsequently chained animations using the same hookRoot but a different hook can use this cached rootPropertyValue. */ 6696 if (CSS.Hooks.registered[property]) { 6697 var hookRoot = CSS.Hooks.getRoot(property), 6698 rootPropertyValueCache = Data(element).rootPropertyValueCache[hookRoot]; 6699 6700 if (rootPropertyValueCache) { 6701 tween.rootPropertyValue = rootPropertyValueCache; 6702 } 6703 } 6704 6705 /***************** 6706 DOM Update 6707 *****************/ 6708 6709 /* setPropertyValue() returns an array of the property name and property value post any normalization that may have been performed. */ 6710 /* Note: To solve an IE<=8 positioning bug, the unit type is dropped when setting a property value of 0. */ 6711 var adjustedSetData = CSS.setPropertyValue(element, /* SET */ 6712 property, 6713 tween.currentValue + (parseFloat(currentValue) === 0 ? "" : tween.unitType), 6714 tween.rootPropertyValue, 6715 tween.scrollData); 6716 6717 /******************* 6718 Hooks: Part II 6719 *******************/ 6720 6721 /* Now that we have the hook's updated rootPropertyValue (the post-processed value provided by adjustedSetData), cache it onto the element. */ 6722 if (CSS.Hooks.registered[property]) {
vendor: 6,085 bytes, lines 6723-6859
6723 /* Since adjustedSetData contains normalized data ready for DOM updating, the rootPropertyValue needs to be re-extracted from its normalized form. ?? */ 6724 if (CSS.Normalizations.registered[hookRoot]) { 6725 Data(element).rootPropertyValueCache[hookRoot] = CSS.Normalizations.registered[hookRoot]("extract", null, adjustedSetData[1]); 6726 } else { 6727 Data(element).rootPropertyValueCache[hookRoot] = adjustedSetData[1]; 6728 } 6729 } 6730 6731 /*************** 6732 Transforms 6733 ***************/ 6734 6735 /* Flag whether a transform property is being animated so that flushTransformCache() can be triggered once this tick pass is complete. */ 6736 if (adjustedSetData[0] === "transform") { 6737 transformPropertyExists = true; 6738 } 6739 6740 } 6741 } 6742 } 6743 6744 /**************** 6745 mobileHA 6746 ****************/ 6747 6748 /* If mobileHA is enabled, set the translate3d transform to null to force hardware acceleration. 6749 It's safe to override this property since Velocity doesn't actually support its animation (hooks are used in its place). */ 6750 if (opts.mobileHA) { 6751 /* Don't set the null transform hack if we've already done so. */ 6752 if (Data(element).transformCache.translate3d === undefined) { 6753 /* All entries on the transformCache object are later concatenated into a single transform string via flushTransformCache(). */ 6754 Data(element).transformCache.translate3d = "(0px, 0px, 0px)"; 6755 6756 transformPropertyExists = true; 6757 } 6758 } 6759 6760 if (transformPropertyExists) { 6761 CSS.flushTransformCache(element); 6762 } 6763 } 6764 6765 /* The non-"none" display value is only applied to an element once -- when its associated call is first ticked through. 6766 Accordingly, it's set to false so that it isn't re-processed by this call in the next tick. */ 6767 if (opts.display !== undefined && opts.display !== "none") { 6768 Velocity.State.calls[i][2].display = false; 6769 } 6770 if (opts.visibility !== undefined && opts.visibility !== "hidden") { 6771 Velocity.State.calls[i][2].visibility = false; 6772 } 6773 6774 /* Pass the elements and the timing data (percentComplete, msRemaining, timeStart, tweenDummyValue) into the progress callback. */ 6775 if (opts.progress) { 6776 opts.progress.call(callContainer[1], 6777 callContainer[1], 6778 percentComplete, 6779 Math.max(0, (timeStart + opts.duration) - timeCurrent), 6780 timeStart, 6781 tweenDummyValue); 6782 } 6783 6784 /* If this call has finished tweening, pass its index to completeCall() to handle call cleanup. */ 6785 if (percentComplete === 1) { 6786 completeCall(i); 6787 } 6788 } 6789 } 6790 6791 /* Note: completeCall() sets the isTicking flag to false when the last call on Velocity.State.calls has completed. */ 6792 if (Velocity.State.isTicking) { 6793 ticker(tick); 6794 } 6795 } 6796 6797 /********************** 6798 Call Completion 6799 **********************/ 6800 6801 /* Note: Unlike tick(), which processes all active calls at once, call completion is handled on a per-call basis. */ 6802 function completeCall (callIndex, isStopped) { 6803 /* Ensure the call exists. */ 6804 if (!Velocity.State.calls[callIndex]) { 6805 return false; 6806 } 6807 6808 /* Pull the metadata from the call. */ 6809 var call = Velocity.State.calls[callIndex][0], 6810 elements = Velocity.State.calls[callIndex][1], 6811 opts = Velocity.State.calls[callIndex][2], 6812 resolver = Velocity.State.calls[callIndex][4]; 6813 6814 var remainingCallsExist = false; 6815 6816 /************************* 6817 Element Finalization 6818 *************************/ 6819 6820 for (var i = 0, callLength = call.length; i < callLength; i++) { 6821 var element = call[i].element; 6822 6823 /* If the user set display to "none" (intending to hide the element), set it now that the animation has completed. */ 6824 /* Note: display:none isn't set when calls are manually stopped (via Velocity("stop"). */ 6825 /* Note: Display gets ignored with "reverse" calls and infinite loops, since this behavior would be undesirable. */ 6826 if (!isStopped && !opts.loop) { 6827 if (opts.display === "none") { 6828 CSS.setPropertyValue(element, "display", opts.display); 6829 } 6830 6831 if (opts.visibility === "hidden") { 6832 CSS.setPropertyValue(element, "visibility", opts.visibility); 6833 } 6834 } 6835 6836 /* If the element's queue is empty (if only the "inprogress" item is left at position 0) or if its queue is about to run 6837 a non-Velocity-initiated entry, turn off the isAnimating flag. A non-Velocity-initiatied queue entry's logic might alter 6838 an element's CSS values and thereby cause Velocity's cached value data to go stale. To detect if a queue entry was initiated by Velocity, 6839 we check for the existence of our special Velocity.queueEntryFlag declaration, which minifiers won't rename since the flag 6840 is assigned to jQuery's global $ object and thus exists out of Velocity's own scope. */ 6841 if (opts.loop !== true && ($.queue(element)[1] === undefined || !/\.velocityQueueEntryFlag/i.test($.queue(element)[1]))) { 6842 /* The element may have been deleted. Ensure that its data cache still exists before acting on it. */ 6843 if (Data(element)) { 6844 Data(element).isAnimating = false; 6845 /* Clear the element's rootPropertyValueCache, which will become stale. */ 6846 Data(element).rootPropertyValueCache = {}; 6847 6848 var transformHAPropertyExists = false; 6849 /* If any 3D transform subproperty is at its default value (regardless of unit type), remove it. */ 6850 $.each(CSS.Lists.transforms3D, function(i, transformName) { 6851 var defaultValue = /^scale/.test(transformName) ? 1 : 0, 6852 currentValue = Data(element).transformCache[transformName]; 6853 6854 if (Data(element).transformCache[transformName] !== undefined && new RegExp("^\\(" + defaultValue + "[^.]").test(currentValue)) { 6855 transformHAPropertyExists = true; 6856 6857 delete Data(element).transformCache[transformName]; 6858 } 6859 });
6860 6861 /* Mobile devices have hardware acceleration removed at the end of the animation in order to avoid hogging the GPU's memory. */ 6862 if (opts.mobileHA) { 6863 transformHAPropertyExists = true; 6864 delete Data(element).transformCache.translate3d; 6865 } 6866 6867 /* Flush the subproperty removals to the DOM. */ 6868 if (transformHAPropertyExists) { 6869 CSS.flushTransformCache(element); 6870 } 6871 6872 /* Remove the "velocity-animating" indicator class. */ 6873 CSS.Values.removeClass(element, "velocity-animating"); 6874 } 6875 } 6876 6877 /********************* 6878 Option: Complete 6879 *********************/ 6880 6881 /* Complete is fired once per call (not once per element) and is passed the full raw DOM element set as both its context and its first argument. */ 6882 /* Note: Callbacks aren't fired when calls are manually stopped (via Velocity("stop"). */ 6883 if (!isStopped && opts.complete && !opts.loop && (i === callLength - 1)) { 6884 /* We throw callbacks in a setTimeout so that thrown errors don't halt the execution of Velocity itself. */ 6885 try { 6886 opts.complete.call(elements, elements); 6887 } catch (error) { 6888 setTimeout(function() { throw error; }, 1); 6889 } 6890 } 6891 6892 /********************** 6893 Promise Resolving 6894 **********************/ 6895 6896 /* Note: Infinite loops don't return promises. */ 6897 if (resolver && opts.loop !== true) { 6898 resolver(elements); 6899 } 6900 6901 /**************************** 6902 Option: Loop (Infinite) 6903 ****************************/ 6904 6905 if (Data(element) && opts.loop === true && !isStopped) { 6906 /* If a rotateX/Y/Z property is being animated to 360 deg with loop:true, swap tween start/end values to enable 6907 continuous iterative rotation looping. (Otherise, the element would just rotate back and forth.) */ 6908 $.each(Data(element).tweensContainer, function(propertyName, tweenContainer) { 6909 if (/^rotate/.test(propertyName) && parseFloat(tweenContainer.endValue) === 360) { 6910 tweenContainer.endValue = 0; 6911 tweenContainer.startValue = 360; 6912 } 6913 6914 if (/^backgroundPosition/.test(propertyName) && parseFloat(tweenContainer.endValue) === 100 && tweenContainer.unitType === "%") { 6915 tweenContainer.endValue = 0; 6916 tweenContainer.startValue = 100; 6917 } 6918 }); 6919 6920 Velocity(element, "reverse", { loop: true, delay: opts.delay }); 6921 } 6922 6923 /*************** 6924 Dequeueing 6925 ***************/ 6926 6927 /* Fire the next call in the queue so long as this call's queue wasn't set to false (to trigger a parallel animation), 6928 which would have already caused the next call to fire. Note: Even if the end of the animation queue has been reached, 6929 $.dequeue() must still be called in order to completely clear jQuery's animation queue. */ 6930 if (opts.queue !== false) { 6931 $.dequeue(element, opts.queue); 6932 } 6933 } 6934 6935 /************************ 6936 Calls Array Cleanup 6937 ************************/ 6938 6939 /* Since this call is complete, set it to false so that the rAF tick skips it. This array is later compacted via compactSparseArray(). 6940 (For performance reasons, the call is set to false instead of being deleted from the array: http://www.html5rocks.com/en/tutorials/speed/v8/) */ 6941 Velocity.State.calls[callIndex] = false; 6942 6943 /* Iterate through the calls array to determine if this was the final in-progress animation. 6944 If so, set a flag to end ticking and clear the calls array. */ 6945 for (var j = 0, callsLength = Velocity.State.calls.length; j < callsLength; j++) { 6946 if (Velocity.State.calls[j] !== false) { 6947 remainingCallsExist = true; 6948 6949 break; 6950 } 6951 } 6952 6953 if (remainingCallsExist === false) { 6954 /* tick() will detect this flag upon its next iteration and subsequently turn itself off. */ 6955 Velocity.State.isTicking = false; 6956 6957 /* Clear the calls array so that its length is reset. */ 6958 delete Velocity.State.calls; 6959 Velocity.State.calls = []; 6960 } 6961 } 6962 6963 /****************** 6964 Frameworks 6965 ******************/ 6966 6967 /* Both jQuery and Zepto allow their $.fn object to be extended to allow wrapped elements to be subjected to plugin calls. 6968 If either framework is loaded, register a "velocity" extension pointing to Velocity's core animate() method. Velocity 6969 also registers itself onto a global container (window.jQuery || window.Zepto || window) so that certain features are 6970 accessible beyond just a per-element scope. This master object c
6970ontains an .animate() method, which is later assigned to $.fn 6971 (if jQuery or Zepto are present). Accordingly, Velocity can both act on wrapped DOM elements and stand alone for targeting raw DOM elements. */ 6972 global.Velocity = Velocity; 6973 6974 if (global !== window) { 6975 /* Assign the element function to Velocity's core animate() method. */ 6976 global.fn.velocity = animate; 6977 /* Assign the object function's defaults to Velocity's global defaults object. */ 6978 global.fn.velocity.defaults = Velocity.defaults; 6979 } 6980 6981 /*********************** 6982 Packaged Redirects 6983 ***********************/ 6984 6985 /* slideUp, slideDown */ 6986 $.each([ "Down", "Up" ], function(i, direction) { 6987 Velocity.Redirects["slide" + direction] = function (element, options, elementsIndex, elementsSize, elements, promiseData) { 6988 var opts = $.extend({}, options), 6989 begin = opts.begin, 6990 complete = opts.complete, 6991 computedValues = { height: "", marginTop: "", marginBottom: "", paddingTop: "", paddingBottom: "" }, 6992 inlineValues = {}; 6993 6994 if (opts.display === undefined) { 6995 /* Show the element before slideDown begins and hide the element after slideUp completes. */ 6996 /* Note: Inline elements cannot have dimensions animated, so they're reverted to inline-block. */ 6997 opts.display = (direction === "Down" ? (Velocity.CSS.Values.getDisplayType(element) === "inline" ? "inline-block" : "block") : "none"); 6998 } 6999 7000 opts.begin = function() { 7001 /* If the user passed in a begin callback, fire it now. */ 7002 begin && begin.call(elements, elements); 7003 7004 /* Cache the elements' original vertical dimensional property values so that we can animate back to them. */ 7005 for (var property in computedValues) { 7006 inlineValues[property] = element.style[property]; 7007 7008 /* For slideDown, use forcefeeding to animate all vertical properties from 0. For slideUp, 7009 use forcefeeding to start from computed values and animate down to 0. */ 7010 var propertyValue = Velocity.CSS.getPropertyValue(element, property); 7011 computedValues[property] = (direction === "Down") ? [ propertyValue, 0 ] : [ 0, propertyValue ]; 7012 } 7013 7014 /* Force vertical overflow content to clip so that sliding works as expected. */ 7015 inlineValues.overflow = element.style.overflow; 7016 element.style.overflow = "hidden"; 7017 } 7018 7019 opts.complete = function() { 7020 /* Reset element to its pre-slide inline values once its slide animation is complete. */ 7021 for (var property in inlineValues) { 7022 element.style[property] = inlineValues[property]; 7023 } 7024 7025 /* If the user passed in a complete callback, fire it now. */ 7026 complete && complete.call(elements, elements); 7027 promiseData && promiseData.resolver(elements); 7028 }; 7029 7030 Velocity(element, computedValues, opts); 7031 }; 7032 }); 7033 7034 /* fadeIn, fadeOut */ 7035 $.each([ "In", "Out" ], function(i, direction) { 7036 Velocity.Redirects["fade" + direction] = function (element, options, elementsIndex, elementsSize, elements, promiseData) { 7037 var opts = $.extend({}, options), 7038 propertiesMap = { opacity: (direction === "In") ? 1 : 0 }, 7039 originalComplete = opts.complete; 7040 7041 /* Since redirects are triggered individually for each element in the animated set, avoid repeatedly triggering 7042 callbacks by firing them only when the final element has been reached. */ 7043 if (elementsIndex !== elementsSize - 1) { 7044 opts.complete = opts.begin = null; 7045 } else { 7046 opts.complete = function() { 7047 if (originalComplete) { 7048 originalComplete.call(elements, elements); 7049 } 7050 7051 promiseData && promiseData.resolver(elements); 7052 } 7053 } 7054 7055 /* If a display was passed in, use it. Otherwise, default to "none" for fadeOut or the element-specific default for fadeIn. */ 7056 /* Note: We allow users to pass in "null" to skip display setting altogether. */ 7057 if (opts.display === undefined) { 7058 opts.display = (direction === "In" ? "auto" : "none"); 7059 } 7060 7061 Velocity(this, propertiesMap, opts); 7062 }; 7063 }); 7064 7065 return Velocity; 7066 }((window.jQuery || window.Zepto || window), window, document); 7067})); 7068 7069/****************** 7070 Known Issues
7071 ******************/ 7072 7073/* The CSS spec mandates that the translateX/Y/Z transforms are %-relative to the element itself -- not its parent. 7074 Velocity, however, doesn't make this distinction. Thus, converting to or from the % unit with these subproperties 7075 will produce an inaccurate conversion value. The same issue exists with the cx/cy attributes of SVG circles and ellipses. */ 7076var BB = BB || {}; 7077 7078(function ($) { 7079 7080BB.Mobile = { 7081 7082 isAndroid : false, 7083 isBlackBerry: false, 7084 isiOS : false, 7085 isMobile : false, 7086 isTablet : false, 7087 version : '0', 7088 hasTouch : 'ontouchstart' in window, 7089 eClick : 'click', 7090 7091 bodyClass : '', 7092 7093 init: function () { 7094 var bodyClass = '', 7095 UA = navigator.userAgent; 7096 this.isiOS = (/iPad|iPhone|iPod/).test(UA) ? true : false; 7097 this.isAndroid = !this.isiOS && (/Android/).test(UA) ? true : false; 7098 this.isBlackBerry = !this.isiOS && !this.isAndroid && (/BlackBerry|BB10/).test(UA) ? true : false; 7099 this.isMobile = this.isiOS || this.isAndroid || this.isBlackBerry; 7100 this.isTablet = (/iPad/).test(UA) ? true : false; 7101 7102 if (this.hasTouch) { 7103 this.eClick = 'fclick'; 7104 bodyClass += ' touch'; 7105 } else { 7106 bodyClass += ' mouse'; 7107 } 7108 7109 if (this.isAndroid) { 7110 this.version = (UA.match(/Android (\d+(\.\d+)?(\.\d+)?);/) || [])[1] || '0'; 7111 bodyClass += ' android android' + (this.version.split('.')[0]); 7112 } else if (this.isiOS) { 7113 this.version = ((UA.match(/OS (\d+(_\d+)?(_\d+)?)/) || [])[1] || '0').replace(/_/g, '.'); 7114 bodyClass += ' iOS iOS' + (this.version.split('.')[0]); 7115 } 7116 7117 7118 if (this.isMobile && !this.isTablet) { 7119 bodyClass += ' mobile'; 7120 } else { 7121 bodyClass += ' standard'; 7122 } 7123 7124 this.bodyClass = bodyClass; 7125 $(this.setBodyClass); 7126 }, 7127 7128 setBodyClass: function () { 7129 $(document.body).removeClass('standard').addClass(BB.Mobile.bodyClass); 7130 }, 7131 7132 // Vergleicht Versionsnummern 7133 cmpVersion: function (a, b) { 7134 var i, l, d; 7135 7136 a = a.split('.'); 7137 b = b.split('.'); 7138 l = Math.min(a.length, b.length); 7139 7140 for (i=0; i<l; i++) { 7141 d = parseInt(a[i], 10) - parseInt(b[i], 10); 7142 if (d !== 0) { 7143 return d; 7144 } 7145 } 7146 7147 return a.length - b.length; 7148 } 7149}; 7150BB.Mobile.init(); 7151})(jQuery); 7152; 7153(function ($, window, document, undefined) { 7154 var pluginName = "bbRadioCheck", 7155 defaults = { 7156 propertyName: "value" 7157 }; 7158 7159 function Plugin(element, options) { 7160 this.element = element; 7161 this.options = $.extend({}, defaults, options); 7162 this._defaults = defaults; 7163 this._name = pluginName; 7164 this.init(); 7165 } 7166 7167 Plugin.prototype = { 7168 7169 init: function () { 7170 if (!$(this.element).data('init')) { 7171 $(this.element) 7172 .on('click', '.radioBtnElement:not(".disable") div.skinnedRadio, .checkboxElement:not(".disable") div.skinnedCheckbox', $.proxy(this._onClick, this)) 7173 .on('change updateSkin', '.radioBtnElement:not(".disable") div.skinnedRadio input, .checkboxElement:not(".disable") div.skinnedCheckbox input', $.proxy(this._onChange, this)); 7174 $(this.element).find(':checked' ).parent('div.skinnedRadio, div.skinnedCheckbox' ).addClass('checked'); 7175 $(this.element).data('init', true); 7176 } 7177 }, 7178 7179 _onClick: function (e) { 7180 var eTarget = $(e.target), 7181 skin = $(e.currentTarget), 7182 inp = skin.find('input'), 7183 isDisabled = inp.is(':disabled'), 7184 isInput = eTarget.is('input'), 7185 isChecked = inp.is(':checked'), 7186 isRadioBtn = inp.is(':radio'); 7187 7188 inp.focus(); 7189 7190 if (!isDisabled && !isInput) { 7191 if (!isChecked) { 7192 inp.prop('checked', true); 7193 } else if (!isRadioBtn) { 7194 inp.prop('checked', false); 7195 } 7196 7197 inp.change(); 7198 } 7199 }, 7200 7201 _onChange: function (e) { 7202 var input = $(e.currentTarget), 7203 group; 7204 7205 if (input.is(':checkbox')) { 7206 input.parent().toggleClass('checked'); 7207 } else if (input.is(':radio')) { 7208 group = input.closest('.radioGroup').find('input[type="radio"][name="' + input[0].name + '"]'); 7209 group.parent().removeClass('checked disabled'); 7210 group.filter(':checked').parent().addClass('checked'); 7211 group.filter(':disabled').parent().addClass('disabled'); 7212 } 7213 } 7214 }; 7215 7216 $.fn[pluginName] = function (options) { 7217 return this.each(function () { 7218 if (!$.data(this, "plugin_" + pluginName)) { 7219 $.data(this, "plugin_" + pluginName, 7220 new Plugin(this, options)); 7221 } 7222 }); 7223 }; 7224 7225})(jQuery, window, document); 7226/* 7227 * jQuery Boilerplate - v3.3.4 7228 * A jump-start for jQuery plugins development. 7229 * http://jqueryboilerplate.com 7230 * 7231 * Made by Zeno Rocha 7232 * Under MIT License 7233 */ 7234// the semi-colon before function invocation is a safety net against concatenated 7235// scripts and/or other plugins which may not be closed properly. 7236;(function ( $, window, document, undefined ) { 7237 7238 // undefined is used here as the undefined global variable in ECMAScript 3 is 7239 // mutable (ie. it can be changed by someone else). undefined isn't really being 7240 // passed in so we can ensure the value of it is truly undefined. In ES5, undefined 7241 // can no longer be modified. 7242 7243 // window and document are passed through as local variable rather than global 7244 // as this (slightly) quickens the resolution process and can be more efficiently 7245 // minified (especially when both are regularly referenced in your plugin). 7246 7247 // Create the defaults once 7248 var pluginName = "bbAccordion", 7249 defaults = { 7250 slideUpTime: 300, 7251 slideDownTime: 300, 7252 selectorHead: '.fHead', 7253 selectorContent: '.fContent', 7254 classOpen: pluginName + '-open', 7255 eClick: 'click', 7256 allClosed: true, // Am Anfang werden alle Einträge geschlossen, auÃer ein Eintrag hat die Klasse settings.classOpen 7257 singleOpened: true, // Höchstens ein Eintrag darf Gleichzeitig geöffnet sein 7258 oneOpened: false, // Mindestens ein Eintrag muss geöffnet sein 7259 eventOpened: pluginName + '-opened' 7260 }; 7261 7262 // The actual plugin constructor 7263 function Plugin ( element, options ) { 7264 this.element = element; 7265 this.$el = $(this.element); 7266 7267 // jQuery has an extend method which merges the contents of two or 7268 // more objects, storing the result in the first object. The first object 7269 // is generally empty as we don't want to alter the default options for 7270 // future instances of the plugin 7271 this.settings = $.extend( {}, defaults, options ); 7272 this._defaults = defaults; 7273 this._name = pluginName; 7274 this.init(); 7275 } 7276 7277 // Avoid Plugin.prototype conflicts 7278 $.extend(Plugin.prototype, { 7279 init: function () { 7280 // Place initialization logic here 7281 // You already have access to the DOM element and 7282 // the options via the instance, e.g. this.element 7283 // and this.settings 7284 // you can add more functions like the one below and 7285 // call them like so: this.yourOtherFunction(this.element, this.settings). 7286 this.$heads = this.$el.find(this.settings.selectorHead); 7287 this.$contents = this.$el.find(this.settings.selectorContent); 7288 7289 if (this.settings.allClosed) this._closeAll( false, true ); 7290 if (this.settings.oneOpened && this.$heads.filter('.'+this.settings.classOpen).length === 0) this.$contents.first().slideDown(0); 7291 this.$heads.on(this.settings.eClick, $.proxy(this._toggleFold, this)); 7292 }, 7293 7294 _toggleFold: function ( e ) { 7295 var btn = $(e.currentTarget), 7296 content = btn.next(this.settings.selectorContent), 7297 doClose = btn.hasClass(this.settings.classOpen); 7298 7299 if(!btn.hasClass('run')){ 7300 btn.addClass('run'); 7301 if (doClose) { 7302 if ( !(this.settings.oneOpened && this.$heads.filter('.'+this.settings.classOpen).length <= 1) ) { 7303 7304 content.slideUp({ 7305 duration: this.settings.slideUpTime, 7306 start: function(){ 7307 $(this).trigger('startclose'); 7308 }, 7309 done: function(){ 7310 btn.removeClass('run'); 7311 } 7312 }); 7313 7314 btn.toggleClass(this.settings.classOpen, !doClose); 7315 } 7316 } else { 7317 if ( this.settings.singleOpened ) { 7318 this._closeAll( true ); 7319 //this.$heads 7320 // .filter('.'+this.settings.classOpen) 7321 // .trigger(this.settings.eClick); 7322 } 7323 7324 var t = this; 7325 7326 content.slideDown({ 7327 duration: this.settings.slideDownTime, 7328 start: function(){ 7329 $(this).trigger('startopen'); 7330 }, 7331 done: function(){ 7332 $(t.element).trigger('open'); 7333 btn.removeClass('run'); 7334 } 7335 }); 7336 7337 btn.trigger(this.settings.eventOpened); 7338 btn.toggleClass(this.settings.classOpen, !doClose); 7339 } 7340 } 7341 }, 7342 7343 _closeAll: function( animated, keepInitial ) { 7344 var initialOpenedHeads = this.$heads.filter('.' + this.settings.classOpen); 7345 var initialOpenedContents = initialOpenedHeads.next(); 7346 7347 this.$heads.removeClass(this.settings.classOpen); 7348 this.$contents.slideUp( animated ? this.settings.slideDownTime : 0); 7349 7350 if ( keepInitial ) { 7351 initialOpenedHeads.addClass(this.settings.classOpen); 7352 initialOpenedContents.slideDown(0); 7353 } 7354 } 7355 7356 }); 7357 7358 // A really lightweight plugin wrapper around the constructor, 7359 // preventing against multiple instantiations 7360 $.fn[ pluginName ] = function ( options ) { 7361 var plugin; 7362 this.each(function() { 7363 plugin = $.data( this, "plugin_" + pluginName ); 7364 if ( !plugin ) { 7365 $.data( this, "plugin_" + pluginName, new Plugin( this, options ) ); 7366 } else if ( options ) { 7367 plugin.settings = $.extend( plugin.settings, options ); 7368 } 7369 }); 7370 7371 // chain jQuery functions 7372 return this; 7373 }; 7374 7375})( jQuery, window, document ); 7376/*! lazysizes - v1.0.1 - Licensed MIT */ 7377!function(a,b){var c=b(a,a.document);a.lazySizes=c,"object"==typeof module&&module.exports?module.exports=c:"function"==typeof define&&define.amd&&define(c)}(window,function(a,b){"use strict";if(b.getElementsByClassName){var c,d=b.documentElement,e=a.addEventListener,f=/^picture$/i,g=["load","error","lazyincluded","_lazyloaded"],h=function(a,b){var c=new RegExp("(\\s|^)"+b+"(\\s|$)");return a.className.match(c)&&c},i=function(a,b){h(a,b)||(a.className+=" "+b)},j=function(a,b){var c;(c=h(a,b))&&(a.className=a.className.replace(c," "))},k=function(a,b,c){var d=c?"addEventListener":"removeEventListener";c&&k(a,b),g.forEach(function(c){a[d](c,b)}
7377)},l=function(a,c,d,e,f){var g=b.createEvent("Event");return g.initEvent(c,!e,!f),g.details=d||{},a.dispatchEvent(g),g},m=function(b,d){var e;a.HTMLPictureElement||((e=a.picturefill||a.respimage||c.pf)?e({reevaluate:!0,reparse:!0,elements:[b]}):d&&d.src&&(b.src=d.src))},n=function(a,b){return getComputedStyle(a,null)[b]},o=function(a,b){for(var d=a.offsetWidth;d<c.minSize&&b&&!a._lazysizesWidth;)d=b.offsetWidth,b=b.parentNode;return d},p=function(a){var c,d,e=function(){c&&(c=!1,a())},f=function(){clearInterval(d),b.hidden||(e(),d=setInterval(e,51))};return b.addEventListener("visibilitychange",f),f(),function(a){c=!0,a===!0&&e()}},q=function(){var g,o,q,s,t,u,v,w,x,y,z,A,B,C=/^img$/i,D=/^iframe$/i,E="onscroll"in a&&!/glebot/.test(navigator.userAgent),F=0,G=0,H=0,I=0,J=0,K=function(a){I--,a&&a.target&&k(a.target,K),(!a||0>I||!a.target)&&(I=0)},L=function(a,b){var c,d=a,e="hidden"!=n(a,"visibility");for(w-=b,z+=b,x-=b,y+=b;e&&(d=d.offsetParent);)e=q&&2>I||(n(d,"opacity")||1)>0,e&&"visible"!=n(d,"overflow")&&(c=d.getBoundingClientRect(),e=y>c.left&&x<c.right&&z>c.top-1&&w<c.bottom+1);return e},M=function(){var a,b,d,e,f,h,i,j,k,l=g.length;if(l&&(t=c.loadMode)){for(b=Date.now(),a=J,H++,B>G&&1>I&&H>5&&t>2?(G=B,H=0):G=G!=A&&t>1&&H>4?A:F;l>a;a++,J++)if(g[a]&&!g[a]._lazyRace)if(E){if((j=g[a].getAttribute("data-expand"))&&(h=1*j)||(h=G),!(I>6&&(!j||"src"in g[a])))if(h>F&&(2>t||I>3)&&(h=F),k!==h&&(u=innerWidth+h,v=innerHeight+h,i=-1*h,k=h),d=g[a].getBoundingClientRect(),(z=d.bottom)>=i&&(w=d.top)<=v&&(y=d.right)>=i&&(x=d.left)<=u&&(z||y||x||w)&&(q&&B>G&&3>I&&4>H&&!j&&t>2||L(g[a],h)))J--,b+=2,Q(g[a]),f=!0;else{if(Date.now()-b>3)return J++,void N();!f&&q&&!e&&3>I&&4>H&&t>2&&(o[0]||c.preloadAfterLoad)&&(o[0]||!j&&(z||y||x||w||"auto"!=g[a].getAttribute(c.sizesAttr)))&&(e=o[0]||g[a])}}else Q(g[a]);J=0,e&&!f&&Q(e)}},N=p(M),O=function(a){i(a.target,c.loadedClass),j(a.target,c.loadingClass),k(a.target,O)},P=function(a,b){try{a.contentWindow.location.replace(b)}catch(c){a.setAttribute("src",b)}},Q=function(a,b){var d,e,g,n,o,p,t,u,v,w,x,y=a.currentSrc||a.src,z=C.test(a.nodeName),A=a.getAttribute(c.sizesAttr)||a.getAttribute("sizes"),B="auto"==A;if(!B&&q||!z||!y||a.complete||h(a,c.errorClass)){if(a._lazyRace=!0,!(v=l(a,"lazybeforeunveil",{force:!!b})).defaultPrevented){if(A&&(B?r.updateElem(a,!0):a.setAttribute("sizes",A)),p=a.getAttribute(c.srcsetAttr),o=a.getAttribute(c.srcAttr),z&&(t=a.parentNode,u=f.test(t.nodeName||"")),w=v.details.firesLoad||"src"in a&&(p||o||u),w&&(I++,k(a,K,!0),clearTimeout(s),s=setTimeout(K,3e3)),u)for(d=t.getElementsByTagName("source"),e=0,g=d.length;g>e;e++)(x=c.customMedia[d[e].getAttribute("data-media")||d[e].getAttribute("media")])&&d[e].setAttribute("media",x),n=d[e].getAttribute(c.srcsetAttr),n&&d[e].setAttribute("srcset",n);p?a.setAttribute("srcset",p):o&&(D.test(a.nodeName)?P(a,o):a.setAttribute("src",o)),i(a,c.loadingClass),k(a,O,!0)}setTimeout(function(){a._lazyRace&&delete a._lazyRace,"auto"==A&&i(a,c.autosizesClass),(p||u)&&m(a,{src:o}),j(a,c.lazyClass),(!w||a.complete&&y==(a.currentSrc||a.src))&&(w&&K(v),O(v)),a=null})}},R=function(){var a,b=function(){c.loadMode=3,N()};q=!0,H+=8,c.loadMode=3,N(!0),e("scroll",function(){3==c.loadMode&&(c.loadMode=2),clearTimeout(a),a=setTimeout(b,66)},!0)};return{_:function(){g=b.getElementsByClassName(c.lazyClass),o=b.getElementsByClassName(c.lazyClass+" "+c.preloadClass),A=c.expand,B=A*c.expFactor,e("scroll",N,!0),e("resize",N,!0),a.MutationObserver?new MutationObserver(N).observe(d,{childList:!0,subtree:!0,attributes:!0}):(d.addEventListener("DOMNodeInserted",N,!0),d.addEventListener("DOMAttrModified",N,!0),setInterval(N,3e3)),e("hashchange",N,!0),["transitionstart","transitionend","load","focus","mouseover","animationend","click"].forEach(function(a){b.addEventListener(a,N,!0)}),(q=/d$|^c/.test(b.readyState))?R():(e("load",R),b.addEventListener("DOMContentLoaded",N)),N(g.length>0)},checkElems:N,unveil:Q}}(),r=function(){var a,d=function(a,b){var c,d,e,g,h,i=a.parentNode;if(i&&(c=o(a,i),h=l(a,"lazybeforesizes",{width:c,dataAttr:!!b}),!h.defaultPrevented&&(c=h.details.width,c&&c!==a._lazysizesWidth))){if(a._lazysizesWidth=c,c+="px",a.setAttribute("sizes",c),f.test(i.nodeName||""))for(d=i.getElementsByTagName("source"),e=0,g=d.length;g>e;e++)d[e].setAttribute("sizes",c);h.details.dataAttr||m(a,h.details)}},g=function(){var b,c=a.length;if(c)for(b=0;c>b;b++)d(a[b])},h=p(g);return{_:function(){a=b.getElementsByClassName(c.autosizesClass),e("resize",h)},checkElems:h,updateElem:d}}(),s=function(){s.i||(s.i=!0,r._(),q._())};return function(){var b,d={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:50,customMedia:{},init:!0,expFactor:2,expand:300,loadMode:2};c=a.lazySizesConfig||{};for(b in d)b in c||(c[b]=d[b]);a.lazySizesConfig=c,setTimeout(function(){c.init&&s()})}(),{cfg:c,autoSizer:r,loader:q,init:s,uP:m,aC:i,rC:j,hC:h,fire:l,gW:o}}}); 7378/*! 7379 * JavaScript Cookie v2.2.0 7380 * https://github.com/js-cookie/js-cookie 7381 * 7382 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack 7383 * Released under the MIT license 7384 */ 7385;(function (factory) { 7386 var registeredInModuleLoader; 7387 if (typeof define === 'function' && define.amd) { 7388 define(factory); 7389 registeredInModuleLoader = true; 7390 } 7391 if (typeof exports === 'object') { 7392 module.exports = factory(); 7393 registeredInModuleLoader = true; 7394 } 7395 if (!registeredInModuleLoader) { 7396 var OldCookies = window.Cookies; 7397 var api = window.Cookies = factory(); 7398 api.noConflict = function () { 7399 window.Cookies = OldCookies; 7400 return api; 7401 }; 7402 } 7403}(function () { 7404 function extend () { 7405 var i = 0; 7406 var result = {}; 7407 for (; i < arguments.length; i++) { 7408 var attributes = arguments[ i ]; 7409 for (var key in attributes) { 7410 result[key] = attributes[key]; 7411 } 7412 } 7413 return result; 7414 } 7415 7416 function init (converter) { 7417 function api (key, value, attributes) { 7418 if (typeof document === 'undefined') { 7419 return; 7420 } 7421 7422 // Write 7423
7424 if (arguments.length > 1) { 7425 attributes = extend({ 7426 path: '/' 7427 }, api.defaults, attributes); 7428 7429 if (typeof attributes.expires === 'number') { 7430 attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5); 7431 } 7432 7433 // We're using "expires" because "max-age" is not supported by IE 7434 attributes.expires = attributes.expires ? attributes.expires.toUTCString() : ''; 7435 7436 try { 7437 var result = JSON.stringify(value); 7438 if (/^[\{\[]/.test(result)) { 7439 value = result; 7440 } 7441 } catch (e) {} 7442 7443 value = converter.write ? 7444 converter.write(value, key) : 7445 encodeURIComponent(String(value)) 7446 .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); 7447 7448 key = encodeURIComponent(String(key)) 7449 .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent) 7450 .replace(/[\(\)]/g, escape); 7451 7452 var stringifiedAttributes = ''; 7453 for (var attributeName in attributes) { 7454 if (!attributes[attributeName]) { 7455 continue; 7456 } 7457 stringifiedAttributes += '; ' + attributeName; 7458 if (attributes[attributeName] === true) { 7459 continue; 7460 } 7461 7462 // Considers RFC 6265 section 5.2: 7463 // ... 7464 // 3. If the remaining unparsed-attributes contains a %x3B (";") 7465 // character: 7466 // Consume the characters of the unparsed-attributes up to, 7467 // not including, the first %x3B (";") character. 7468 // ... 7469 stringifiedAttributes += '=' + attributes[attributeName].split(';')[0]; 7470 } 7471 7472 return (document.cookie = key + '=' + value + stringifiedAttributes); 7473 } 7474 7475 // Read 7476 7477 var jar = {}; 7478 var decode = function (s) { 7479 return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent); 7480 }; 7481 // To prevent the for loop in the first place assign an empty array 7482 // in case there are no cookies at all. 7483 var cookies = document.cookie ? document.cookie.split('; ') : []; 7484 var i = 0; 7485 7486 for (; i < cookies.length; i++) { 7487 var parts = cookies[i].split('='); 7488 var cookie = parts.slice(1).join('='); 7489 7490 if (!this.json && cookie.charAt(0) === '"') { 7491 cookie = cookie.slice(1, -1); 7492 } 7493 7494 try { 7495 var name = decode(parts[0]); 7496 cookie = (converter.read || converter)(cookie, name) || 7497 decode(cookie); 7498 7499 if (this.json) { 7500 try { 7501 cookie = JSON.parse(cookie); 7502 } catch (e) {} 7503 } 7504 7505 jar[name] = cookie; 7506 7507 if (key === name) { 7508 break; 7509 } 7510 } catch (e) {} 7511 } 7512 7513 return key ? jar[key] : jar; 7514 } 7515 7516 api.set = api; 7517 api.get = function (key) { 7518 return api.call(api, key); 7519 }; 7520 api.getJSON = function (key) { 7521 return api.call({ 7522 json: true 7523 }, key); 7524 }; 7525 api.remove = function (key, attributes) { 7526 api(key, '', extend(attributes, { 7527 expires: -1 7528 })); 7529 }; 7530 7531 api.defaults = {}; 7532 7533 api.withConverter = init; 7534 7535 return api; 7536 } 7537 7538 return init(function () {}); 7539})); 7540 7541var TP = window.TP || {}; 7542TP.Config = $.extend(true, { 7543 debug: false, 7544 showCSSGrid: false, 7545 animation: { 7546 navi: { 7547 showHideDuration: 250, 7548 showHideSubNaviDuration: 300 7549 } 7550 }, 7551 slider: { 7552 animation: 'slide' 7553 }, 7554 booking: { 7555 endpoint: 'fileadmin/tigerpalast/assets/adticket/adticketfeed.json', 7556 7557 de: { 7558 dateFormat: 'DD.MM.YYYY', 7559 timeFormat: 'H:mm [Uhr]', 7560 noBookings: 'An diesem Tag sind keine Online-Buchungen möglich. Bitte fragen Sie an unserer Buchungshotline nach Verfügbarkeiten:', 7561 notAvailable: 'Nicht verfügbar', 7562 buyTicket: 'Ticket kaufen', 7563 daysOfTheWeek: ['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'], 7564 weekOffset: 0 7565 }, 7566 en: { 7567 dateFormat: 'MM/DD/YYYY', 7568 timeFormat: 'h:mm a', 7569 noBookings: 'At this day no online bookings available. For further information call', 7570 notAvailable: 'Not available', 7571 buyTicket: 'buy ticket', 7572 daysOfTheWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], 7573 weekOffset: 1 7574 } 7575 }, 7576 cookies: { 7577 cookieWarning: { 7578 cookieName: 'tp_cookie_warning', 7579 animation: { 7580 duration: 250 7581 } 7582 } 7583 }, 7584 promoPopup: { 7585 popupClass: "promoPopup", 7586 cookie: "promoPopupHide" 7587 } 7588}, TP.Config); 7589/* global FastClick */ 7590var TP = window.TP || {}; 7591TP.Core = (function($){ 7592 7593 var _$b, 7594 _$w, 7595 _isGridVisible = false,
7596 _$nav; 7597 7598 function _init() { 7599 _$b = $(document.body); 7600 _$w = $(window); 7601 _$nav = _$b.find('nav'); 7602 7603 FastClick.attach(document.body); 7604 _initAccordion(); 7605 copynavi(); 7606 teaser(); 7607 7608 document.addEventListener('lazybeforeunveil', function(e){ 7609 var $t = $(e.target), 7610 $slider = $t.closest('.flexslider'); 7611 7612 if ($slider && $slider.length) { 7613 $slider.data('flexslider').setup(); 7614 $slider.data('flexslider').resize(); 7615 } 7616 }); 7617 7618 _$b.append('<div class="mq-desktop"></div>'); 7619 _$b.on('click', 'section a, .csc-default a', _onClickContLink); 7620 7621 if (TP.Config.debug && TP.Config.showCSSGrid) { 7622 _$b.append('<div class="gridbutton">TOGGLE GRID</div>'); 7623 _$b.on('click', '.gridbutton', function(){ 7624 if (!_isGridVisible) { 7625 showCSSGrid(); 7626 } else { 7627 hideCSSGrid(); 7628 } 7629 }); 7630 } 7631 7632 _$b.has('.landingpage').addClass('fullpage'); 7633 $('html').has('.landingpage-content').addClass('fullpageFixed'); 7634 _$b.has('.flexslider.fullpage.flexsliderWide:not(.flexsliderChanneling)').addClass('startpage'); 7635 $('.gm').parent().removeClass('cont'); /* Remove .cont Class of Google Maps parent div */ 7636 7637 } 7638 7639 function _onClickContLink(e) { 7640 var curNaviHref, 7641 $t = $(e.currentTarget), 7642 linkHref = $t.attr('href'), 7643 founded = false, 7644 $foundedLink, 7645 isFlexSlider = $t.closest('.flex-control-nav, .flex-direction-nav') && $t.closest('.flex-control-nav, .flex-direction-nav').length; 7646 7647 _$nav.find('li a').each(function(){ 7648 curNaviHref = $(this).attr('data-target-href'); 7649 if (curNaviHref === linkHref) { 7650 founded = true; 7651 $foundedLink = $(this); 7652 return false; 7653 } 7654 }); 7655 7656 if (founded && !isFlexSlider) { 7657 if ($foundedLink.closest('.active').length > 0) { 7658 $foundedLink.trigger('click'); 7659 } else { 7660 window.location = $foundedLink.attr('href'); 7661 } 7662 return false; 7663 } 7664 } 7665 7666 function teaser() { 7667 var counter; 7668 $('.teaser').each(function(i){ 7669 var teaser = $(this); 7670 if ( teaser.prev('.teaser' ).length === 0 ) { 7671 counter = 1; 7672 } 7673 if ( (counter % 3) === 0 ) { 7674 teaser.addClass('nth3'); 7675 } 7676 7677 if ( (counter % 2) === 0 ) { 7678 teaser.addClass('nth2'); 7679 } 7680 counter++; 7681 }); 7682 } 7683 7684 function copynavi() { 7685 var navi = $('header.main nav').clone(), 7686 btnNavi = $('header.main .btnNavi').clone(), 7687 logo = $('header.main .logo').clone(); 7688 7689 $('header.sticky .innerHeader').append(logo); 7690 $('header.sticky .innerHeader').append(btnNavi); 7691 $('header.sticky .innerHeader').append(navi); 7692 } 7693 7694 function _initAccordion() { 7695 $('.accordion').bbAccordion( {'selectorHead': 'dt', 'selectorContent': 'dd', singleOpened: false }); 7696 _$b.find('.accordion dd').on('startopen', function(e){ 7697 var $dd = $(this), 7698 $slider = $dd.find('.flexslider'); 7699 7700 if ($slider && $slider.length) { 7701 $slider.data('flexslider').resize(); 7702 } 7703 }); 7704 } 7705 7706 function showCSSGrid() { 7707 var $grid = _$b.find('#showGrid'); 7708 7709 if (!$grid || !$grid.length) { 7710 _$b.append('<div id="showGrid"></div>'); 7711 } else { 7712 _$b.find('#showGrid').show(); 7713 } 7714 7715 _isGridVisible = true; 7716 } 7717 7718 function hideCSSGrid() { 7719 _$b.find('#showGrid').hide(); 7720 _isGridVisible = false; 7721 } 7722 7723 function isDesktop() { 7724 return _$b.find('.mq-desktop').is(':visible'); 7725 } 7726 7727 $(_init); 7728 7729 return { 7730 showCSSGrid: showCSSGrid, 7731 hideCSSGrid: hideCSSGrid, 7732 isDesktop: isDesktop 7733 }; 7734 7735})(jQuery); 7736/* global BB */ 7737 7738$(window).load(function() { 7739 //console.log('onload global'); 7740}); 7741 7742var TP = window.TP || {}; 7743TP.Navi = (function($){ 7744 7745 var _$b, // body 7746 _$w, // window 7747 _$navi, // (navi) 7748 _$stickyNavi, // added (sticky navi) 7749 _$header, 7750 _lastScrollTop, 7751 _scrollPosOnOpen; 7752 7753 function _init() { 7754 _$b = $('body'); 7755 _$w = $(window); 7756 _$navi = _$b.find('header.main nav'); // added .main 7757 _$naviItems = _$navi.find('.scroll > ul > li'); // added - Zählt die Menüunterpunkte (erste Navigationsebene) 7758 _$naviItemLast = _$navi.find('.scroll > ul > li.last'); // added 7759 _$stickyNavi = _$b.find('header.sticky nav'); // added 7760 _$header = _$b.find('header'); 7761 _resizeLastNavigationChild();
7761 // Berechnet die Position des letzten, ausklappenden Navigationspunktes, damit diese nicht über das Browserfenster hinaus geht. 7762 7763 _$w 7764 .on('scroll', _onScrollBody) 7765 .on('resize', _onWindowResize) 7766 .on('orientationchange', _onOrientationchange); 7767 7768 _$b 7769 .on('click', 'header.main .btnNavi', _showHide) //added header.main 7770 .on('click', 'header.sticky .btnNavi', _toggleStickyNav) //added ... btnNavi -> Burger Icon um Navigation einzublenden 7771 .on('click', 'header.main .scroll > ul > li > a.hasSub', _showSubNavi) // header.main added for target between mobile and desktop sticky nav (li:not(.directLink)) 7772 .on('click', 'header.sticky .scroll > ul > li > a.hasSub', _showStickySubNavi) 7773 .on('click', 'li.active li a', _scrollToContent) 7774 .on('click', 'ul.firstLvlOnepage li:not(.directLink) a', _scrollToContent) /* added: Damit bei Lafleur und Siesmayer direkt die Hauptnavigation per Smooth Scrolling verlinkt */ 7775 .on('click', '.formAuswahl1', _changeFormOptionValue1) /* added */ 7776 .on('click', '.formAuswahl2', _changeFormOptionValue2) /* added */ 7777 .on('click', '.formAuswahl3', _changeFormOptionValue3) /* added */ 7778 .on('click', '.formAuswahl4', _changeFormOptionValue4) /* added */ 7779 .on('click', '.formAuswahl5', _changeFormOptionValue5) /* added */ 7780 .on('click', '.formAuswahl6', _changeFormOptionValue6); /* added */ 7781 7782 7783 /* Check, ob ein Slider auf der Seite vorhanden ist 7784 sliderReady wird bei vorhandenem Slider NACH dem erfolgreichen Laden auf TRUE gesetzt */ 7785 if ( $('.flexslider').length || $('.flexsliderWide').length){ 7786 sliderReady = false; 7787 } else { 7788 sliderReady = true; 7789 } 7790 7791 /* Bei # in der URL führe einen simulierten Klick aus (SmoothScroll) 7792 Wenn der Slider nicht nach x-Versuchen fertig geladen hat, führe den Klick dennoch aus. */ 7793 if ( location.hash ) { 7794 var sliderTimeOut = 1; 7795 (function move() { 7796 if(sliderReady == false && sliderTimeOut < 15) { 7797 setTimeout(move, 100); 7798 sliderTimeOut++ 7799 } else { 7800 _$navi.find('a[href$='+decodeURI(location.hash).replace(/ /g, "")+']' ).click(); 7801 } 7802 })(); 7803 } 7804 7805 /*Old Anchor Link Detection (Does not wait for slider to load)*/ 7806 /*if ( location.hash ) { 7807 $(window).load(function() { 7808 _$navi.find('a[href$='+location.hash+']' ).click(); 7809 }); 7810 }*/ 7811 7812 // Fügt einen möglichen Zeilenumbruch nach x-Buchstaben hinzu 7813 /*$( 'header.main nav ul > li > a span:not(:contains("&"))' ).each(function() { 7814 $(this).html($(this).html().substring(0, 9) + '​' + $(this).html().substring(9)); //Works for IE 7815 });*/ 7816 } 7817 7818 function _onScrollBody() { 7819 _lastScrollTop = $(window).scrollTop(); 7820 _$navi.find('li.open').removeClass('open'); 7821 } 7822 7823 function _scrollToContent(e) { 7824 e.preventDefault(); 7825 _hide(); 7826 window.setTimeout(function(){ 7827 var $t = $(e.currentTarget), 7828 idx = $t.closest('li').index(), 7829 $section = $('section.hubContent').eq(idx), 7830 sectionTop = $section.offset().top; 7831 sectionTop -= 70; /* added */ 7832 7833 /* removed */ 7834 /*if (idx === 0 ) { 7835 sectionTop = 0; 7836 } else { 7837 sectionTop -= 70; 7838 }*/ 7839 7840 $("html, body").animate({ scrollTop: sectionTop }); 7841 }, 0); /* TIME OUT für anchor links scrolling */ 7842 } 7843 7844 // Sollte zusammengefasst werden: 7845 function _changeFormOptionValue1(e){ 7846 e.preventDefault(); 7847 var contactFormAnchor = $('#contact').offset().top; /* "a[name='kontaktformular']" */ 7848 contactFormAnchor -= 100; 7849 $('#location').val('1').trigger('change'); 7850 $("html, body").animate({ scrollTop: contactFormAnchor }); 7851 } 7852 7853 function _changeFormOptionValue2(e){ 7854 e.preventDefault(); 7855 var contactFormAnchor = $('#contact').offset().top; /* "a[name='kontaktformular']" */ 7856 contactFormAnchor -= 100; 7857 $('#location').val('2').trigger('change'); 7858 $("html, body").animate({ scrollTop: contactFormAnchor }); 7859 } 7860 7861 function _changeFormOptionValue3(e){ 7862 e.preventDefault(); 7863 var contactFormAnchor = $('#contact').offset().top; /* "a[name='kontaktformular']" */ 7864 contactFormAnchor -= 100; 7865 $('#location').val('3').trigger('change'); 7866 $("html, body").animate({ scrollTop: contactFormAnchor });
7867 } 7868 7869 function _changeFormOptionValue4(e){ 7870 e.preventDefault(); 7871 var contactFormAnchor = $('#contact').offset().top; /* "a[name='kontaktformular']" */ 7872 contactFormAnchor -= 100; 7873 $('#location').val('4').trigger('change'); 7874 $("html, body").animate({ scrollTop: contactFormAnchor }); 7875 } 7876 7877 function _changeFormOptionValue5(e){ 7878 e.preventDefault(); 7879 var contactFormAnchor = $('#contact').offset().top; /* "a[name='kontaktformular']" */ 7880 contactFormAnchor -= 100; 7881 $('#location').val('5').trigger('change'); 7882 $("html, body").animate({ scrollTop: contactFormAnchor }); 7883 } 7884 7885 function _changeFormOptionValue6(e){ 7886 e.preventDefault(); 7887 var contactFormAnchor = $('#contact').offset().top; /* "a[name='kontaktformular']" */ 7888 contactFormAnchor -= 100; 7889 $('#location').val('6').trigger('change'); 7890 $("html, body").animate({ scrollTop: contactFormAnchor }); 7891 } 7892 7893 function _onWindowResize() { 7894 window.setTimeout(function(){ 7895 if (TP.Core.isDesktop()) { 7896 _$navi.attr('style', ''); 7897 _$navi.find('li ul').attr('style', ''); 7898 7899 _$navi.show(); 7900 _$navi.removeClass('open'); 7901 _$navi.find('.openIn').removeClass('openIn'); 7902 _enbaleBodyScroll(); 7903 _toggleNaviButton(false); 7904 7905 var last = _$navi.find('.scroll > ul > li.last'); 7906 7907 last.each(function(){ 7908 if($(this).find('ul').length > 0){ 7909 if ($(window).width() < ($(this).find('ul').offset().left + $(this).find('ul').outerWidth()) ) { 7910 $(this).addClass('openIn'); 7911 } 7912 } 7913 }); 7914 7915 _resizeLastNavigationChild(); 7916 7917 } else { 7918 _$navi.find('li.last ul').css('margin-left', '0'); // Setzt die Position des letzten ausklappendne Navigationspunktes zurück, da dieses auf mobilen Endgeräten nicht verschoben werden muss 7919 } 7920 7921 }, 0); 7922 } 7923 7924 function _resizeLastNavigationChild() { 7925 if (TP.Core.isDesktop()) { 7926 _naviCalcLastPos = -(_$navi.find('li.last ul').outerWidth() - _$naviItemLast.outerWidth());// Zieht die Breite des Hauptmenüpunktes von der des Untermenüs ab 7927 _$navi.find('li.last ul').css('margin-left', _naviCalcLastPos + 'px'); 7928 } else { 7929 _$navi.find('li.last ul').css('margin-left', '0'); 7930 } 7931 } 7932 7933 /* ADDED */ 7934 $(window).on('load resize', function () { 7935 _calcMenuItemWidth(); /* added */ 7936 }); 7937 7938 function _onOrientationchange() { 7939 if (!TP.Core.isDesktop()) { 7940 _$navi.hide(); 7941 _$navi.removeClass('open'); 7942 _$navi.find('li ul.open').hide(); 7943 _toggleNaviButton(false); 7944 _enbaleBodyScroll(); 7945 } 7946 } 7947 7948 function _disbaleBodyScroll() { 7949 _$b.css('width', _$b.width()); 7950 _$b.find('.overlay').show(); 7951 _$b.addClass('noscroll'); 7952 _lastScrollTop = _lastScrollTop; 7953 _scrollPosOnOpen = _lastScrollTop; 7954 _$b.css('top', -_lastScrollTop); 7955 7956 } 7957 7958 function _calcMenuItemWidth() { /* added */ 7959 if (TP.Core.isDesktop()) { 7960 _naviCalcSize = 100 / (( _$naviItems.length) - _$naviItems.filter(".directLink").length); // Zieht die Direktlinks ab (Siesmayer, Gesellschaftshaus, Restaurant), die nicht angezeigt werden sollen /* TODO */ 7961 _$naviItems.css('width', _naviCalcSize + '%'); 7962 } else { 7963 _$naviItems.css('width', '100%'); 7964 } 7965 } 7966 7967 function _enbaleBodyScroll() { 7968 _$b.find('.overlay').show(); 7969 _$b.removeClass('noscroll'); 7970 _$b.css('top', 0); 7971 _$b.scrollTop(_scrollPosOnOpen); 7972 _$b.css('width', 'auto'); 7973 } 7974 7975 function _showHide(e) { 7976 e.preventDefault(); 7977 e.stopPropagation(); 7978 if (!TP.Core.isDesktop()) { 7979 var isOpen = _$navi.hasClass('open'); 7980 7981 if (!isOpen) { 7982 _show(); 7983 } else { 7984 _hide(); 7985 } 7986 } 7987 } 7988 7989 // Zeige die Sticky Nav an 7990 function _toggleStickyNav(e) { 7991 e.preventDefault(); 7992 e.stopPropagation(); 7993 if (TP.Core.isDesktop()) { 7994 var isStickyOpen = _$stickyNavi.hasClass('open'); 7995 7996 if (!isStickyOpen) { 7997 _showSticky(); 7998 //_$stickyNavi.addClass('open'); 7999 } else { 8000 _hideSticky(); 8001 //_$stickyNavi.removeClass('open'); 8002 } 8003 } 8004 } 8005 8006 // Testweise eingeführt. _disableBodyScroll Funktion scheint nicht zu funktionieren & sorgt für Probleme auf iOS. 8007 function _showSticky() { 8008 if (!TP.Core.isDesktop()) { 8009 _$navi.velocity('fadeIn', { 8010 duration: TP.Config.animation.navi.showHideDuration, 8011 complete: function() { 8012 if (BB.Mobile.isMobile) { 8013 _$navi.find('.scroll').css('max-height',_$w.height() - 130); 8014 //_disbaleBodyScroll(); 8015 } 8016 } 8017 }); 8018 _$navi.addClass('open'); 8019 _toggleNaviButton(true); 8020 } else { 8021 _$stickyNavi.velocity('fadeIn', { 8022 duration: TP.Config.animation.navi.showHideDuration, 8023 complete: function() { 8024 if (BB.Mobile.isMobile) { 8025 _$stickyNavi.find('.scroll').css('max-height',_$w.height() - 130); 8026 //_disbaleBodyScroll(); 8027 } 8028 } 8029 }); 8030 _$stickyNavi.addClass('open'); 8031 _toggleNaviButton(true); 8032 } 8033 } 8034 8035 // Testweise eingeführt. _disableBodyScroll Funktion scheint nicht zu funktionieren & sorgt für Probleme auf iOS. 8036 function _hideSticky() { 8037 if (!TP.Core.isDesktop()) { 8038 _$navi.velocity('fadeOut', { duration: TP.Config.animation.navi.showHideDuration }); 8039 _$navi.removeClass('open'); 8040 _toggleNaviButton(false); 8041 //_enbaleBodyScroll(); 8042 } else { 8043 _$stickyNavi.velocity('fadeOut', { duration: TP.Config.animation.navi.showHideDuration }); 8044 _$stickyNavi.removeClass('open'); 8045 _toggleNaviButton(false); 8046 //_enbaleBodyScroll(); 8047 } 8048 } 8049 8050 function _show() { 8051 if (!TP.Core.isDesktop()) { 8052 _$navi.velocity('fadeIn', { 8053 duration: TP.Config.animation.navi.showHideDuration, 8054 complete: function() { 8055 if (BB.Mobile.isMobile) { 8056 _$navi.find('.scroll').css('max-height',_$w.height() - 130); 8057 _disbaleBodyScroll(); 8058 } 8059 } 8060 }); 8061 _$navi.addClass('open'); 8062 _toggleNaviButton(true); 8063 } else { 8064 _$stickyNavi.velocity('fadeIn', { 8065 duration: TP.Config.animation.navi.showHideDuration, 8066 complete: function() { 8067 if (BB.Mobile.isMobile) { 8068 _$stickyNavi.find('.scroll').css('max-height',_$w.height() - 130); 8069 _disbaleBodyScroll(); 8070 } 8071 } 8072 }); 8073 _$stickyNavi.addClass('open'); 8074 _toggleNaviButton(true); 8075 } 8076 } 8077 8078 function _hide() { 8079 if (!TP.Core.isDesktop()) { 8080 _$navi.velocity('fadeOut', { duration: TP.Config.animation.navi.showHideDuration }); 8081 _$navi.removeClass('open'); 8082 _toggleNaviButton(false); 8083 _enbaleBodyScroll(); 8084 } else { 8085 _$stickyNavi.velocity('fadeOut', { duration: TP.Config.animation.navi.showHideDuration }); 8086 _$stickyNavi.removeClass('open'); 8087 _toggleNaviButton(false); 8088 _enbaleBodyScroll(); 8089 } 8090 } 8091 8092 function _toggleNaviButton(isOpen){ 8093 _$header.find('.btnShowNavi')[isOpen ? 'hide' : 'show'](); 8094 _$header.find('.btnCloseNavi')[isOpen ? 'show' : 'hide'](); 8095 } 8096 8097 function _showSubNavi(e) { 8098 e.stopPropagation(); 8099 8100 var $t = $(e.currentTarget), 8101 $wrapperLi = $t.closest('li'), 8102 $nav = $t.closest('nav'), 8103 $subNavi = $wrapperLi.find('ul'), 8104 $opendSubNavi = $nav.find('ul.open'), 8105 isOpen = $wrapperLi.find('ul.open').length; 8106 8107 8108 if (!TP.Core.isDesktop()) { 8109 e.preventDefault(); 8110 if (!isOpen) { 8111 _closeSubNavi($opendSubNavi, function(){ 8112 }); 8113 _openSubNavi($subNavi, function(){ 8114 8115 }); 8116 } else { 8117 _closeSubNavi($subNavi); 8118 } 8119 $nav.hide(); 8120 $nav.show(); 8121 } else { 8122 if (_$b.hasClass('touch')) { 8123 e.preventDefault(); 8124 $nav.find('.scroll > ul > li').not($wrapperLi).removeClass('open'); 8125 if (!isOpen) { 8126 $wrapperLi.addClass('open'); 8127 } else { 8128 $wrapperLi.removeClass('open'); 8129 } 8130 } 8131 } 8132 } 8133 8134 // Unterpunkte anzeigen bei Sticky Desktop Navigation 8135 function _showStickySubNavi(e) { 8136 e.stopPropagation(); 8137 8138 var $t = $(e.currentTarget), 8139 $wrapperLi = $t.closest('li'), 8140 $nav = $t.closest('nav'), 8141 $subNavi = $wrapperLi.find('ul'), 8142 $opendSubNavi = $nav.find('ul.open'), 8143 isOpen = $wrapperLi.find('ul.open').length; 8144 8145 if (TP.Core.isDesktop()) { 8146 e.preventDefault(); 8147 if (!isOpen) { 8148 _closeSubNavi($opendSubNavi, function(){ 8149 }); 8150 _openSubNavi($subNavi, function(){ 8151 8152 }); 8153 } else { 8154 _closeSubNavi($subNavi); 8155 } 8156 $nav.hide(); 8157 $nav.show(); 8158 } else { 8159 /* TODO - Testen der Sticky Nav auf Touch. */ 8160 /*if (_$b.hasClass('touch')) { 8161 e.preventDefault(); 8162 $nav.find('.scroll > ul > li').not($wrapperLi).removeClass('open'); 8163 if (!isOpen) { 8164 $wrapperLi.addClass('open'); 8165 } else { 8166 $wrapperLi.removeClass('open'); 8167 } 8168 }*/ 8169 } 8170 } 8171 8172 function _openSubNavi($sub, callback) { 8173 if ($sub && $sub.length) { 8174 $sub.velocity('slideDown', { 8175 duration: TP.Config.animation.navi.showHideSubNaviDuration, 8176 complete: function() { 8177 if (callback) { 8178 callback(); 8179 } 8180 } 8181 }); 8182 $sub.addClass('open'); 8183 } 8184 } 8185 8186 function _closeSubNavi($sub, callback) { 8187 if ($sub && $sub.length) { 8188 $sub.velocity('slideUp', { 8189 duration: TP.Config.animation.navi.showHideSubNaviDuration, 8190 complete: function () { 8191 if (callback) { 8192 callback(); 8193 } 8194 } 8195 }); 8196 $sub.removeClass('open'); 8197 } 8198 } 8199 8200 $(_init); 8201})(jQuery); 8202/* global YT */ 8203var TP = window.TP || {}; 8204TP.Slider = (function($){ 8205 8206 var _$b, 8207 _$slider, 8208 _$sliderWide, 8209 _$sliderChannelingPage, 8210 _player = [], 8211 _timeoutid = 0, 8212 _autoVideoHideDuration = 5000; 8213 8214 function _init() { 8215 _$b = $(document.body); 8216 _$slider = _$b.find('.flexslider:not(.flexsliderWide)'); 8217 _$sliderWide = _$b.find('.flexsliderWide:not(.flexsliderChanneling)'); 8218 _$sliderChannelingPage = _$b.find('.flexsliderChanneling'); 8219 _$sliderWide.on('click', 'li[yt-video-id]', _playvideo);
8220 _createFlexSlider(); 8221 } 8222 8223 function _playvideo(e) { 8224 e.stopPropagation(); 8225 e.preventDefault(); 8226 var $t = $(e.currentTarget), 8227 videoId = $t.attr('yt-video-id'), 8228 $slider = $t.closest('.flexslider'); 8229 8230 if (!$t.data('videoAdded')) { 8231 _addPlayer(videoId, $t); 8232 $slider.flexslider('stop'); 8233 $t.find('.sliderCont').css('visibility', 'hidden'); 8234 if (BB.Mobile) { 8235 $slider.find('.flex-control-nav').hide(); 8236 } 8237 $t.find('.slidePlayer').css('visibility', 'visible'); 8238 } 8239 } 8240 8241 function _addPlayer(id, $t) { 8242 if(!window.YT) { 8243 window.addEventListener('CookiebotOnAccept', function (e) { 8244 if (Cookiebot.consent.marketing) { 8245 var intervalCount = 5; 8246 var intervalId = setInterval(function(){ 8247 if(window.YT && window.YT.Player) { 8248 clearInterval(intervalId); 8249 $('.flexslider li[yt-video-id]:visible').click(); 8250 } 8251 if(intervalCount === 0 || window.YT && window.YT.Player) { 8252 clearInterval(intervalId); 8253 } 8254 intervalCount--; 8255 }, 500); 8256 } 8257 }, false); 8258 } else { 8259 var player = new YT.Player('player-' + id, { 8260 videoId: id, 8261 events: { 8262 'onReady': onPlayerReady, 8263 'onStateChange': onPlayerStateChange 8264 }, 8265 playerVars: { 8266 autoplay: 1, 8267 playsinline: 1 8268 } 8269 }); 8270 $t.data('videoAdded', true); 8271 $t.data('player', player); 8272 _player.push({ 8273 player: player, 8274 target: $t 8275 }); 8276 } 8277 } 8278 8279 function _destroyVideos() { 8280 var i, l, curPlayer, curTarget; 8281 8282 for (i = 0, l = _player.length; i < l; i++ ) { 8283 curPlayer = _player[i].player; 8284 curTarget = _player[i].target; 8285 curPlayer.destroy(); 8286 curTarget.data('videoAdded', false); 8287 } 8288 8289 if (BB.Mobile) { 8290 _$sliderWide.find('.flex-control-nav').show(); 8291 } 8292 8293 _$sliderWide.find('.sliderCont').css('visibility', 'visible'); 8294 _$sliderWide.find('.slidePlayer').css('visibility', 'hidden'); 8295 _player = []; 8296 } 8297 8298 function onPlayerReady(e) { 8299 var $slider = $(e.target.getIframe()).closest('.flexslider'); 8300 $slider.flexslider('stop'); 8301 //e.target.playVideo(); 8302 } 8303 8304 function onPlayerStateChange(e) { 8305 var $slider = $(e.target.getIframe()).closest('.flexslider'); 8306 8307 window.clearTimeout(_timeoutid); 8308 8309 if (e.data === 0) { 8310 $slider.flexslider('play'); 8311 _destroyVideos(); 8312 } else if (e.data === 2) { 8313 _timeoutid = window.setTimeout(function(){ 8314 _destroyVideos(); 8315 }, _autoVideoHideDuration); 8316 } 8317 } 8318 8319 8320 8321 function _createFlexSlider() { 8322 if (_$slider && _$slider.length) { 8323 _$slider.flexslider({ 8324 animation: TP.Config.slider.animation, 8325 directionNav: true, 8326 slideshow: false, 8327 start: function() { 8328 sliderReady = true; 8329/* if ( location.hash ) { 8330 console.log('SLIDER GELADEN, URL ENTHÃLT #..'); 8331 }*/ 8332 } 8333 }); 8334 8335 _$slider.data('flexslider').resize(); 8336 } 8337 8338 if (_$sliderWide && _$sliderWide.length) { 8339 _$sliderWide.flexslider({ 8340 animation: TP.Config.slider.animation, 8341 directionNav: true, 8342 video: true, 8343 before: function() { 8344 8345 }, 8346 after: function(){ 8347 if (!BB.Mobile) { 8348 _destroyVideos(); 8349 } 8350 } 8351 }); 8352 8353 _$sliderWide.data('flexslider').resize(); 8354 } 8355 8356 if (_$sliderChannelingPage &&Â _$sliderChannelingPage.length) { 8357 _$sliderChannelingPage.flexslider({ 8358 animation: 'fade', 8359 directionNav: false, 8360 controlNav: false, 8361 video: false, 8362 randomize: true, 8363 before: function() { 8364 8365 }, 8366 after: function(){ 8367 if (!BB.Mobile) { 8368 _destroyVideos(); 8369 } 8370 } 8371 }); 8372 8373 _$sliderChannelingPage.data('flexslider').resize(); 8374 } 8375 } 8376 8377 $(_init); 8378 8379 8380})(jQuery); 8381/* global google */ 8382/* GOOGLE API KEY: AIzaSyBtuu4tUWCM03HMGmJN-WiXqUl-jqwGRK0 */ 8383var TP = window.TP || {}; 8384TP.Map = (function($){ 8385 8386 var map, 8387 $w; 8388 8389 function _init() { 8390 $w = $(window); 8391 8392 window.initMap = function (){ 8393 _initMap(); 8394 } 8395 8396 window.addEventListener('CookiebotOnAccept', function (e) { 8397 if (Cookiebot.consent.marketing) { 8398 if(document.getElementById('gm')){ 8399 var mapLoaded = window.google && window.google && window.google.maps && window.google.maps.Map; 8400 8401 if(!mapLoaded) { 8402 var script = document.createElement('script'); 8403 script.src =
8404 'https://maps.googleapis.com/maps/api/js?libraries=places,visualization&key=AIzaSyDu1U6goWOHo0zg5upoPM-Ulnvq7jH2JyY&v=weekly&callback=initMap'; 8405 script.async=true; 8406 document.head.appendChild(script); 8407 } 8408 } 8409 } 8410 }, false); 8411 8412 $w.on('resize', _onReisze); 8413 } 8414 8415 8416 function _onReisze() { 8417 if (map) { 8418 if (TP.Core.isDesktop()) { 8419 map.setOptions({disableDefaultUI : false }); 8420 } else { 8421 map.setOptions({disableDefaultUI : true }); 8422 } 8423 } 8424 } 8425 8426 function _initMap() { 8427 8428 if($('#gm').hasClass('gh')){ 8429 var lan = 50.121692; 8430 var lat = 8.656844; 8431 } 8432 else if($('#gm').hasClass('rl')){ 8433 var lan = 50.121425; 8434 var lat = 8.656683; 8435 } 8436 else if($('#gm').hasClass('cs')){ 8437 var lan = 50.122300; 8438 var lat = 8.658640; 8439 } 8440 else { 8441 var lan = 8.656844; 8442 var lat = 8.656844; 8443 } 8444 8445 map = new google.maps.Map(document.getElementById('gm'), { 8446 center: new google.maps.LatLng(lan, lat), 8447 zoom: 15, 8448 streetViewControl: false, 8449 mapTypeControl: false, 8450 styles : [ 8451 { 8452 "featureType": "landscape", 8453 "stylers": [ 8454 { 8455 "saturation": -100 8456 }, 8457 { 8458 "lightness": 65 8459 }, 8460 { 8461 "visibility": "on" 8462 } 8463 ] 8464 }, 8465 { 8466 "featureType": "poi", 8467 "stylers": [ 8468 { 8469 "saturation": -100 8470 }, 8471 { 8472 "lightness": 51 8473 }, 8474 { 8475 "visibility": "simplified" 8476 } 8477 ] 8478 }, 8479 { 8480 "featureType": "road.highway", 8481 "stylers": [ 8482 { 8483 "saturation": -100 8484 }, 8485 { 8486 "visibility": "simplified" 8487 } 8488 ] 8489 }, 8490 { 8491 "featureType": "road.arterial", 8492 "stylers": [ 8493 { 8494 "saturation": -100 8495 }, 8496 { 8497 "lightness": 30 8498 }, 8499 { 8500 "visibility": "on" 8501 } 8502 ] 8503 }, 8504 { 8505 "featureType": "road.local", 8506 "stylers": [ 8507 { 8508 "saturation": -100 8509 }, 8510 { 8511 "lightness": 40 8512 }, 8513 { 8514 "visibility": "on" 8515 } 8516 ] 8517 }, 8518 { 8519 "featureType": "transit", 8520 "stylers": [ 8521 { 8522 "saturation": -100 8523 }, 8524 { 8525 "visibility": "simplified" 8526 } 8527 ] 8528 }, 8529 { 8530 "featureType": "administrative.province", 8531 "stylers": [ 8532 { 8533 "visibility": "off" 8534 } 8535 ] 8536 }, 8537 { 8538 "featureType": "water", 8539 "elementType": "labels", 8540 "stylers": [ 8541 { 8542 "visibility": "on" 8543 }, 8544 { 8545 "lightness": -25 8546 }, 8547 { 8548 "saturation": -100 8549 } 8550 ] 8551 }, 8552 { 8553 "featureType": "water", 8554 "elementType": "geometry", 8555 "stylers": [ 8556 { 8557 "hue": "#ffff00" 8558 }, 8559 { 8560 "lightness": -25 8561 }, 8562 { 8563 "saturation": -97 8564 } 8565 ] 8566 } 8567 ] 8568 }); 8569 8570 _onReisze(); 8571 8572 8573 if($('#gm').hasClass('gh')){ 8574 var marker = new google.maps.Marker({ 8575 position: new google.maps.LatLng(50.121692, 8.656844), /* Tigerpalast hatte: 50.115481, 8.691524 */ 8576 map: map, 8577 icon: 'fileadmin/palmengarten-gastronomie/gesellschaftshaus/assets/img/gm-marker.png' /* live */ 8578 /*icon: 'assets/img/gesellschaftshaus/gm-marker.png'*/ /* lokal */ 8579 }); 8580 } else if ($('#gm').hasClass('rl')){ 8581 var marker = new google.maps.Marker({ 8582 position: new google.maps.LatLng(50.121425, 8.656683), 8583 map: map, 8584 icon: 'fileadmin/palmengarten-gastronomie/restaurant_lafleur/assets/img/gm-marker.png' /* live */ 8585 /*icon: 'assets/img/restaurant_lafleur/gm-marker.png'*/ /* lokal */ 8586 }); 8587 } else if ($('#gm').hasClass('cs')){ 8588 var marker = new google.maps.Marker({ 8589 position: new google.maps.LatLng(50.122300, 8.658640), 8590 map: map, 8591 icon: 'fileadmin/palmengarten-gastronomie/cafehaus_siesmayer/assets/img/gm-marker.png' /* live */ 8592 /*icon: 'assets/img/cafehaus_siesmayer/gm-marker.png'*/ /* lokal */ 8593 }); 8594 } else { 8595 var marker = new google.maps.Marker({ 8596 position: new google.maps.LatLng(50.121692, 8.656844), 8597 map: map, 8598 icon: 'fileadmin/palmengarten-gastronomie/shared/assets/img/gm-marker.png' /* live */ 8599 /*icon: 'assets/img/gm-marker.png'*/ /* lokal */ 8600 });
8601 } 8602 8603 8604 } 8605 8606 window.addEventListener('load', _init, false); 8607 8608})(jQuery); 8609var TP = window.TP || {}; 8610TP.StickyHeader = (function($){ 8611 8612 var _$w, 8613 _$b, 8614 _$headerMain, 8615 _$headerSticky, 8616 _startScrollPos = 210; /* 210 */ 8617 8618 function _init() { 8619 _$w = $(window); 8620 _$headerMain = $('header.main'); 8621 _$headerSticky = $('header.sticky'); 8622 _$b = $('body'); 8623 8624 8625 _$w.on('resize', _onScroll); 8626 8627 if (window.addEventListener) { 8628 window.addEventListener('scroll', _onScroll, false); 8629 } else { 8630 window.attachEvent('onscroll', _onScroll); 8631 } 8632 } 8633 8634 function _onScroll() { 8635 if (TP.Core.isDesktop()) { 8636 if (_$w.scrollTop() >= _startScrollPos) { 8637 _$headerSticky.addClass('show'); 8638 _$headerMain.addClass('is-sticky'); 8639 } else { 8640 _$headerSticky.removeClass('show'); 8641 _$headerMain.removeClass('is-sticky'); 8642 } 8643 } 8644 } 8645 8646 $(_init); 8647 8648})(jQuery); 8649var TP = window.TP || {}; 8650TP.Form = (function($){ 8651 8652 8653 var _$b; 8654 8655 function _init() { 8656 _$b = $(document.body); 8657 _$b.on('click', 'form .submit', _submit); 8658 _initRadioCheck(); 8659 8660 } 8661 8662 function _initRadioCheck() { 8663 $('.radioGroup, .checkBox').bbRadioCheck(); 8664 } 8665 function _submit(e) { 8666 e.preventDefault(); 8667 8668 var $t = $(e.currentTarget), 8669 $form = $t.closest('form'), 8670 $submit = $form.find('input.submitForm:enabled'), 8671 $loadingAni = $form.find('.loading_ajax-submit'); 8672 8673 if ($submit && $submit.length) { 8674 $loadingAni.addClass('show'); 8675 $submit.trigger('click'); 8676 } 8677 8678 } 8679 8680 function submitCallback() { 8681 _initRadioCheck(); 8682 } 8683 8684 $(_init); 8685 8686 return { 8687 submitCallback: submitCallback 8688 }; 8689 8690})(jQuery); 8691/*global BB:true, jQuery:true*/ 8692/*jshint expr:true*/ 8693var TP = window.TP || {}; 8694 8695TP.PromoPopup = (function($){ 8696 8697 var _promoPopup; 8698 8699 function _init( ) { 8700 _promoPopup = $('.'+TP.Config.promoPopup.popupClass); 8701 8702 if(_promoPopup.length >= 1) { 8703 if (_readCookie(TP.Config.promoPopup.cookie) === false ) { 8704 _createCookie(TP.Config.promoPopup.cookie, true); 8705 setTimeout(function () { 8706 _show(); 8707 }, 1000); 8708 } 8709 } 8710 } 8711 8712 function _show(){ 8713 $.fancybox({ 8714 href: _promoPopup.find("div.trigger").data("banner"), 8715 padding: 25, 8716 overlayShow: true, 8717 hideOnOverlayClick: false, 8718 onComplete: function(){} 8719 }); 8720 } 8721 8722 function _createCookie(name, value) { 8723 sessionStorage.setItem(name, value); 8724 } 8725 8726 function _readCookie(name) { 8727 return sessionStorage.getItem(name) === null ? false : true; 8728 } 8729 8730 $(_init); 8731 8732 return { 8733 init: _init 8734 }; 8735 8736})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.