1/*! 2 * Beagle v1.5.2 3 * https://foxythemes.net 4 * 5 * Copyright (c) 2018 Foxy Themes 6 */ 7 8var App = (function () { 9 'use strict'; 10 11 //Basic Config 12 var config = { 13 assetsPath: 'assets', 14 imgPath: 'img', 15 jsPath: 'js', 16 libsPath: 'lib', 17 leftSidebarSlideSpeed: 200, 18 leftSidebarToggleSpeed: 300, 19 enableLeftSidebar: true, 20 enableSwipe: true, 21 swipeTreshold: 100, 22 scrollTop: true, 23 openRightSidebarClass: 'open-right-sidebar', 24 openLeftSidebarClass: 'open-left-sidebar', 25 disabledLeftSidebarClass: 'be-left-sidebar-disabled', 26 offCanvasLeftSidebarClass: 'be-offcanvas-menu', 27 toggleLeftSidebarButton: $('.be-toggle-left-sidebar'), 28 closeRsOnClickOutside: true, 29 removeLeftSidebarClass: 'be-nosidebar-left', 30 collapsibleSidebarClass: 'be-collapsible-sidebar', 31 collapsibleSidebarCollapsedClass: 'be-collapsible-sidebar-collapsed', 32 openLeftSidebarOnClick: true, 33 transitionClass: 'be-animate', 34 openSidebarDelay: 400 35 }; 36 37 var colors = {}; 38 var scrollers = {}; 39 var body, wrapper, leftSidebar, rightSidebar, asideDiv, notificationsDiv, openSidebar; 40 41 //Perfect scrollbar variables 42 var ps_be_scroller_notifications, 43 ps_left_sidebar, 44 ps_be_scroller_left_sidebar, 45 ps_sub_menu_scroller, 46 ps_chat_scroll, 47 ps_todo_scroll, 48 ps_settings_scroll, 49 ps_messages_scroll, 50 ps_aside_scroll; 51 52 //Get the template css colors into js vars 53 function getColor( c ){ 54 var tmp = $("<div>", { class: c }).appendTo("body"); 55 var color = tmp.css("background-color"); 56 tmp.remove(); 57 58 return color; 59 } 60 61 // Refresh scroller 62 function updateScroller(ps_object){ 63 ps_object.update(); 64 } 65 66 // Destroy scroller 67 function destroyScroller(ps_object){ 68 ps_object.destroy(); 69 } 70 71 // Initialize scroller 72 function initScroller(domObject) { 73 return new PerfectScrollbar(domObject[0], { 74 wheelPropagation: false 75 }); 76 } 77 78 //Core private functions 79 function leftSidebarInit(){ 80 81 var firstAnchor = $(".sidebar-elements > li > a", leftSidebar); 82 var anchor = $(".sidebar-elements li a", leftSidebar); 83 var lsc = $(".left-sidebar-scroll", leftSidebar); 84 var lsToggle = $(".left-sidebar-toggle", leftSidebar); 85 var openLeftSidebarOnClick = config.openLeftSidebarOnClick ? true : false; 86 87 // Collapsible sidebar toggle functionality 88 function toggleSideBar(){ 89 var button = $(".be-toggle-left-sidebar"); 90 91 button.on("click", function(){ 92 if( wrapper.hasClass( config.collapsibleSidebarCollapsedClass ) ) { 93 wrapper.removeClass( config.collapsibleSidebarCollapsedClass ); 94 $("li.open", leftSidebar).removeClass("open"); 95 $("li.active", leftSidebar).parents(".parent").addClass("active open"); 96 leftSidebar.trigger( "shown.left-sidebar.collapse" ); 97 if (typeof ps_be_scroller_left_sidebar === "undefined" || !ps_be_scroller_left_sidebar || !ps_be_scroller_left_sidebar.nodeName) { 98 ps_be_scroller_left_sidebar = initScroller($(".be-scroller", leftSidebar)); 99 } 100 destroyScroller(ps_be_scroller_left_sidebar); 101 // Destroy Perfect Scrollbar collapsed instance 102 if (typeof ps_sub_menu_scroller !== "undefined") { 103 destroyScroller(ps_sub_menu_scroller); 104 } 105 } else { 106 wrapper.addClass( config.collapsibleSidebarCollapsedClass ); 107 $("li.active", leftSidebar).parents(".parent").removeClass("open"); 108 $("li.open", leftSidebar).removeClass("open"); 109 leftSidebar.trigger( "hidden.left-sidebar.collapse" ); 110 } 111 }); 112 } 113 114 // Tooltip sidebar funcionality 115 function tooltipSidebar(){ 116 var menu = $(".sidebar-elements > li > a", leftSidebar); 117 118 for(var i = 0; i <= menu.length; i++ ){ 119 var _self = menu[i]; 120 var title = $("> span", _self).text(); 121 122 $(_self).attr({ 123 'data-toggle': 'tooltip', 124 'data-placement': 'right', 125 'title': title 126 }); 127 128 $(_self).tooltip({ 129 trigger: 'manual' 130 }); 131 } 132 133 menu.on('mouseenter', function(){ 134 if(!$.isSm() && wrapper.hasClass(config.collapsibleSidebarCollapsedClass)){ 135 $(this).tooltip('show'); 136 } 137 }); 138 139 menu.on('mouseleave', function(){ 140 $(this).tooltip('hide'); 141 }); 142 } 143
144 // Collapsed sidebar submenu title 145 function syncSubMenu( item ){ 146 var elements; 147 148 if( typeof item !== "undefined" ) { 149 elements = item; 150 } else { 151 elements = $(".sidebar-elements > li", leftSidebar); 152 } 153 154 $.each( elements, function(){ 155 var title = $(this).find("> a span").html(); 156 var ul = $(this).find("> ul"); 157 var subEls = $("> li", ul); 158 title = $('<li class="title">' + title + '</li>'); 159 var subContainer = $('<li class="nav-items"><div class="be-scroller"><div class="content"><ul></ul></div></div></li>'); 160 161 if( !ul.find("> li.title").length ){ 162 ul.prepend( title ); 163 subEls.appendTo( subContainer.find(".content ul") ); 164 subContainer.appendTo( ul ); 165 } 166 }); 167 } 168 169 // Return boolean whether the sidebar is collapsed or not 170 function isCollapsed(){ 171 return wrapper.hasClass( config.collapsibleSidebarCollapsedClass ); 172 } 173 174 // Return true if the collapsible left sidebar is enabled 175 function isCollapsible(){ 176 return wrapper.hasClass( config.collapsibleSidebarClass ); 177 } 178 179 // Close submenu function 180 function closeSubMenu( subMenu, event ){ 181 var target = $( event.currentTarget ); 182 var li = $( subMenu ).parent(); 183 var openChildren = $( 'li.open', li ); 184 185 var clickOutside = !target.closest( leftSidebar ).length; 186 var slideSpeed = config.leftSidebarSlideSpeed; 187 var isFirstLevel = target.parents().eq( 1 ).hasClass( 'sidebar-elements' ); 188 189 // If left sidebar is collapsed, is not small device 190 // and the trigger element is first level 191 // or click outside the left sidebar 192 if ( !$.isSm() && isCollapsed() && ( isFirstLevel || clickOutside ) ){ 193 194 li.removeClass( 'open' ); 195 subMenu.removeClass( 'visible' ); 196 openChildren.removeClass( 'open' ).removeAttr( 'style' ); 197 198 } else { // If not execute classic slide interaction 199 200 subMenu.slideUp({ duration: slideSpeed, complete: function(){ 201 li.removeClass( 'open' ); 202 $( this ).removeAttr( 'style' ); 203 204 // Close opened child submenus 205 openChildren.removeClass( 'open' ).removeAttr( 'style' ); 206 if( wrapper.hasClass("be-fixed-sidebar") && !$.isSm() ){ 207 updateScroller(ps_left_sidebar); 208 } 209 }}); 210 211 } 212 } 213 214 // Open submenu function 215 function openSubMenu( anchor, event ){ 216 var _el = $( anchor ); 217 var li = $( _el ).parent(); 218 var subMenu = $( _el ).next(); 219 220 var slideSpeed = config.leftSidebarSlideSpeed; 221 var isFirstLevel = $( event.currentTarget ).parents().eq( 1 ).hasClass( 'sidebar-elements' ); 222 223 // Get the open sub menus 224 var openSubMenus = li.siblings( '.open' ); 225 226 // If there are open sub menus close them 227 if( openSubMenus ) { 228 closeSubMenu( $( '> ul', openSubMenus ), event ); 229 } 230 231 // If left sidebar is collapsed, is not small device 232 // and the trigger element is first level 233 if ( !$.isSm() && isCollapsed() && isFirstLevel ){ 234 li.addClass( 'open' ); 235 subMenu.addClass( 'visible' ); 236 237 //Renew Perfect Scroller instance 238 if (typeof ps_sub_menu_scroller !== "undefined") { 239 destroyScroller(ps_sub_menu_scroller); 240 } 241 if (typeof ps_sub_menu_scroller === "undefined" || !ps_sub_menu_scroller || !ps_sub_menu_scroller.nodeName) { 242 ps_sub_menu_scroller = initScroller(li.find('.be-scroller')); 243 } 244 245 $(window).resize(function () { 246 waitForFinalEvent(function(){ 247 if( !$.isXs() ){ 248 if (typeof ps_sub_menu_scroller !== "undefined") { 249 updateScroller(ps_sub_menu_scroller); 250 } 251 } 252 }, 500, "am_check_phone_classes"); 253 }); 254 255 } else { // If not execute classic slide interaction 256 257 subMenu.slideDown({ duration: slideSpeed, complete: function(){ 258 li.addClass( 'open' ); 259 $( this ).removeAttr( 'style' ); 260 if( wrapper.hasClass("be-fixed-sidebar") && !$.isSm() ){ 261 updateScroller(ps_left_sidebar); 262 } 263 }}); 264 265 } 266 } 267 268 // Execute if collapsible sidebar is enabled 269 if ( isCollapsible() ){ 270 /*Create sub menu elements*/ 271 syncSubMenu(); 272 toggleSideBar(); 273 tooltipSidebar(); 274 275 if( !openLeftSidebarOnClick ){ 276 277 /*Open sub-menu on hover*/ 278 firstAnchor.on('mouseover',function( event ){ 279 if( isCollapsed() ) { 280 openSubMenu( this, event ); 281 } 282 }); 283 284 /*Open sub-menu on click (fix for touch devices)*/ 285 firstAnchor.on('touchstart',function( event ){ 286 var anchor = $( this ); 287 var li = anchor.parent(); 288 var subMenu = anchor.next(); 289 290 if( isCollapsed() && !$.isSm() ) { 291 292 if ($(this).attr('href') == '#') { 293 if (li.hasClass('open')) { 294 closeSubMenu(subMenu, event); 295 } else { 296 openSubMenu(this, event); 297 } 298 299 if ($(this).next().is('ul')) { 300 event.preventDefault(); 301 } 302 } 303 } 304 }); 305 306 /*Sub-menu delay on mouse leave*/ 307 firstAnchor.on('mouseleave',function( event ){ 308 var _self = $( this ); 309 var _li = _self.parent(); 310 var subMenu = _li.find( '> ul' ); 311 312 if( !$.isSm() && isCollapsed() ){ 313 314 //If mouse is over sub menu attach an additional mouseleave event to submenu 315 if ( subMenu.length > 0 ){ 316 317 setTimeout(function(){ 318 if( subMenu.is( ':hover' ) ){ 319 320 subMenu.on( 'mouseleave', function(){ 321 setTimeout(function(){ 322 if( !_self.is( ':hover' ) ){ 323 closeSubMenu( subMenu, event ); 324 subMenu.off( 'mouseleave' ); 325 } 326 }, 300); 327 }); 328 329 }else{ 330 closeSubMenu( subMenu, event ); 331 } 332 }, 300); 333 334 }else{ 335 _li.removeClass( 'open' ); 336 } 337 } 338 }); 339 } 340 341 /*Close sidebar on click outside*/ 342 $( document ).on("mousedown touchstart",function( event ){ 343 if ( !$( event.target ).closest( leftSidebar ).length && !$.isSm() ) { 344 closeSubMenu( $( "ul.visible", leftSidebar), event ); 345 } 346 }); 347 } 348 349 /*Open sub-menu functionality*/ 350 anchor.on("click",function( event ){ 351 var $el = $(this), $open; 352 var $li = $el.parent(); 353 var $subMenu = $el.next(); 354 var isFirstLevel = $el.parents().eq(1).hasClass('sidebar-elements'); 355 356 // Get the open menus 357 $open = $li.siblings(".open"); 358 359 if ($(this).attr('href') == '#') { 360 if ($li.hasClass('open')) { 361 closeSubMenu($subMenu, event); 362 } else { 363 openSubMenu(this, event); 364 } 365 366 //If current element has children stop link action 367 if ($el.next().is('ul')) { 368 event.preventDefault(); 369 } 370 } 371 }); 372 373 /*Calculate sidebar tree active & open classes*/ 374 if ( wrapper.hasClass( config.collapsibleSidebarCollapsedClass ) ){ 375 $("li.active", leftSidebar).parents(".parent").addClass("active"); 376 } else { 377 $("li.active", leftSidebar).parents(".parent").addClass("active open"); 378 } 379 380 /*Scrollbar plugin init when left sidebar is fixed*/ 381 if( wrapper.hasClass("be-fixed-sidebar") ){ 382 if( !$.isSm() || wrapper.hasClass( config.offCanvasLeftSidebarClass ) ) { 383 if (typeof ps_left_sidebar === "undefined" || !ps_left_sidebar || !ps_left_sidebar.nodeName) { 384 ps_left_sidebar = initScroller(lsc); 385 } 386 } 387 388 /*Update scrollbar height on window resize*/ 389 $(window).resize(function () { 390 waitForFinalEvent(function(){ 391 if( $.isSm() && !wrapper.hasClass( config.offCanvasLeftSidebarClass ) ) { 392 destroyScroller(ps_left_sidebar); 393 } else { 394 if( lsc.hasClass('ps') ) { 395 updateScroller(ps_left_sidebar); 396 } else { 397 if (typeof ps_left_sidebar === "undefined" || !ps_left_sidebar || !ps_left_sidebar.nodeName) { 398 ps_left_sidebar = initScroller(lsc); 399 } 400 } 401 } 402 }, 500, "be_update_scroller"); 403 }); 404 } 405 406 /*Toggle sidebar on small devices*/ 407 lsToggle.on('click',function( e ){ 408 var spacer = $(this).next('.left-sidebar-spacer'), toggleBtn = $(this); 409 toggleBtn.toggleClass('open'); 410 spacer.slideToggle(config.leftSidebarToggleSpeed, function(){ 411 $(this).removeAttr('style').toggleClass('open'); 412 }); 413 }); 414 415 /*Off canvas menu*/ 416 function leftSidebarOffCanvas() { 417 418 /*Open Sidebar with toggle button*/ 419 config.toggleLeftSidebarButton.on("click", function(e){ 420 if ( openSidebar && body.hasClass( config.openLeftSidebarClass) ) { 421 body.removeClass(config.openLeftSidebarClass); 422 sidebarDelay(); 423 } else { 424 body.addClass( config.openLeftSidebarClass + " " + config.transitionClass); 425 openSidebar = true; 426 } 427 e.preventDefault(); 428 }); 429 430 /*Close sidebar on click outside*/ 431 $( document ).on("mousedown touchstart",function( e ){ 432 if ( !$( e.target ).closest( leftSidebar ).length && !$( e.target ).closest( config.toggleLeftSidebarButton ).length && body.hasClass( config.openLeftSidebarClass ) ) { 433 body.removeClass( config.openLeftSidebarClass ); 434 sidebarDelay(); 435 } 436 }); 437 } 438 439 // Left sidebar off-canvas 440 if ( wrapper.hasClass( config.offCanvasLeftSidebarClass ) ) { 441 leftSidebarOffCanvas(); 442 } 443 } 444 445 function rightSidebarInit(){ 446 447 var rsScrollbar = $(".be-scroller", rightSidebar); 448 var rsChatScrollbar = $(".be-scroller-chat", rightSidebar); 449 var rsTodoScrollbar = $(".be-scroller-todo", rightSidebar);
450 var rsSettingsScrollbar = $(".be-scroller-settings", rightSidebar); 451 452 function oSidebar(){ 453 body.addClass( config.openRightSidebarClass + " " + config.transitionClass ); 454 openSidebar = true; 455 } 456 457 function cSidebar(){ 458 body.removeClass( config.openRightSidebarClass ).addClass( config.transitionClass ); 459 sidebarDelay(); 460 } 461 462 if( rightSidebar.length > 0 ){ 463 /*Open-Sidebar when click on topbar button*/ 464 $('.be-toggle-right-sidebar').on("click", function(e){ 465 if( openSidebar && body.hasClass( config.openRightSidebarClass ) ){ 466 cSidebar(); 467 }else if( !openSidebar ){ 468 oSidebar(); 469 } 470 471 e.preventDefault(); 472 }); 473 474 /*Close sidebar on click outside*/ 475 $( document ).on("mousedown touchstart",function( e ){ 476 if ( !$( e.target ).closest( rightSidebar ).length && body.hasClass( config.openRightSidebarClass ) && (config.closeRsOnClickOutside || $.isSm()) ) { 477 cSidebar(); 478 } 479 }); 480 } 481 482 if (typeof ps_chat_scroll === "undefined" || !ps_chat_scroll || !ps_chat_scroll.nodeName) { 483 ps_chat_scroll = initScroller(rsChatScrollbar); 484 } 485 if (typeof ps_todo_scroll === "undefined" || !ps_todo_scroll || !ps_todo_scroll.nodeName) { 486 ps_todo_scroll = initScroller(rsTodoScrollbar); 487 } 488 if (typeof ps_settings_scroll === "undefined" || !ps_settings_scroll || !ps_settings_scroll.nodeName) { 489 ps_settings_scroll = initScroller(rsSettingsScrollbar); 490 } 491 492 /*Update scrollbar height on window resize*/ 493 $(window).resize(function () { 494 waitForFinalEvent(function(){ 495 updateScroller(ps_chat_scroll); 496 updateScroller(ps_todo_scroll); 497 updateScroller(ps_settings_scroll); 498 }, 500, "be_rs_update_scroller"); 499 }); 500 501 /*Update scrollbar when click on a tab*/ 502 $('a[data-toggle="tab"]', rightSidebar).on('shown.bs.tab', function (e) { 503 updateScroller(ps_chat_scroll); 504 updateScroller(ps_todo_scroll); 505 updateScroller(ps_settings_scroll); 506 }); 507 } 508 509 function sidebarDelay(){ 510 openSidebar = true; 511 setTimeout(function(){ 512 openSidebar = false; 513 }, config.openSidebarDelay ); 514 } 515 516 function sidebarSwipe(){ 517 /*Open sidedar on swipe*/ 518 wrapper.swipe( { 519 allowPageScroll: "vertical", 520 preventDefaultEvents: false, 521 fallbackToMouseEvents: false, 522 swipeLeft: function(e){ 523 if( !openSidebar && rightSidebar.length > 0 ){ 524 body.addClass( config.openRightSidebarClass + " " + config.transitionClass ); 525 openSidebar = true; 526 } 527 }, 528 threshold: config.swipeTreshold 529 }); 530 } 531 532 function chatWidget(){ 533 var chat = $(".be-right-sidebar .tab-chat"); 534 var contactsEl = $(".chat-contacts", chat); 535 var conversationEl = $(".chat-window", chat); 536 var messagesContainer = $(".chat-messages", conversationEl); 537 var messagesList = $(".content ul", messagesContainer); 538 var messagesScroll = $(".be-scroller-messages", messagesContainer); 539 var chatInputContainer = $(".chat-input", conversationEl); 540 var chatInput = $("input", chatInputContainer); 541 var chatInputSendButton = $(".send-msg", chatInputContainer); 542 543 function openChatWindow(){ 544 if( !chat.hasClass("chat-opened") ){ 545 chat.addClass("chat-opened"); 546 if (typeof ps_messages_scroll === "undefined" || !ps_messages_scroll || !ps_messages_scroll.nodeName) { 547 ps_messages_scroll = initScroller(messagesScroll); 548 } 549 } 550 } 551 552 function closeChatWindow(){ 553 if( chat.hasClass("chat-opened") ){ 554 chat.removeClass("chat-opened"); 555 } 556 } 557 558 /*Open Conversation Window when click on chat user*/ 559 $(".user a", contactsEl).on('click',function( e ){ 560 openChatWindow(); 561 e.preventDefault(); 562 }); 563 564 /*Close chat conv window*/ 565 $(".title .return", conversationEl).on('click',function( e ){ 566 closeChatWindow(); 567 scrollerInit(); 568 }); 569 570 /*Send message*/ 571 function sendMsg(msg, self){ 572 var $message = $('<li class="' + ((self)?'self':'friend') + '"></li>'); 573 574 if( msg != '' ){ 575 $('<div class="msg">' + msg + '</div>').appendTo($message); 576 $message.appendTo(messagesList); 577 578 messagesScroll.stop().animate({ 579 'scrollTop': messagesScroll.prop("scrollHeight") 580 }, 900, 'swing'); 581 582 updateScroller(ps_messages_scroll); 583 } 584 } 585 586 /*Send msg when click on 'send' button or press 'Enter'*/ 587 chatInput.keypress(function(event){ 588 var keycode = (event.keyCode ? event.keyCode : event.which); 589 var msg = $(this).val(); 590 591 if(keycode == '13'){ 592 sendMsg(msg, true); 593 $(this).val(""); 594 } 595 event.stopPropagation(); 596 }); 597 598 chatInputSendButton.on('click',function(){ 599 var msg = chatInput.val(); 600 sendMsg(msg, true); 601 chatInput.val(""); 602 }); 603 } 604 605 function scrollerInit(){ 606 if (typeof ps_be_scroller_notifications === "undefined" || !ps_be_scroller_notifications || !ps_be_scroller_notifications.nodeName) { 607 ps_be_scroller_notifications = initScroller(notificationsDiv); 608 } 609 } 610 611 function scrollTopButton(){ 612 var offset = 220; 613 var duration = 500; 614 var button = $('<div class="be-scroll-top"></div>'); 615 button.appendTo("body"); 616 617 $(window).on('scroll',function() { 618 if ( $(this).scrollTop() > offset ) { 619 button.fadeIn(duration); 620 } else { 621 button.fadeOut(duration); 622 } 623 }); 624 625 button.on('touchstart mouseup',function( e ) { 626 $( 'html, body' ).animate({ scrollTop: 0 }, duration); 627 e.preventDefault(); 628 }); 629 } 630 631 //Add and remove active class on left sidebar 632 function activeItemLeftSidebar(menu_item){ 633 var firstAnchor = menu_item; 634 var li = $(firstAnchor).parent(); 635 var menu = $(li).parents('li'); 636 637 if( !li.hasClass('active') ){ 638 $('li.active', leftSidebar).removeClass('active'); 639 $(menu).addClass('active'); 640 $(li).addClass('active'); 641 } 642 } 643 644 function initAsidePS() { 645 var pas = asideDiv; 646 ps_aside_scroll = initScroller(asideDiv); 647 $(window).resize(function () { 648 if( $.isSm() && !wrapper.hasClass( config.offCanvasLeftSidebarClass ) ) { 649 destroyScroller(ps_aside_scroll); 650 } else { 651 if( pas.hasClass('ps') ) { 652 updateScroller(ps_aside_scroll); 653 } else { 654 if (typeof ps_aside_scroll === "undefined" || !ps_aside_scroll || !ps_aside_scroll.nodeName) { 655 ps_aside_scroll = initScroller(asideDiv); 656 } 657 } 658 } 659 }); 660 } 661 662 //Wait for final event on window resize 663 var waitForFinalEvent = (function () { 664 var timers = {}; 665 return function (callback, ms, uniqueId) { 666 if (!uniqueId) { 667 uniqueId = "x1x2x3x4"; 668 } 669 if (timers[uniqueId]) { 670 clearTimeout (timers[uniqueId]); 671 } 672 timers[uniqueId] = setTimeout(callback, ms); 673 }; 674 })(); 675 676 return { 677 //General data 678 conf: config, 679 color: colors, 680 scroller: scrollers, 681 682 //Init function 683 init: function (options) { 684 685 //Get the main elements when document is ready 686 body = $("body"); 687 wrapper = $(".be-wrapper"); 688 leftSidebar = $(".be-left-sidebar"); 689 rightSidebar = $(".be-right-sidebar"); 690 asideDiv = $(".be-scroller-aside"); 691 notificationsDiv = $(".be-scroller-notifications"); 692 openSidebar = false;
693 694 //Extends basic config with options 695 $.extend( config, options ); 696 697 /*FastClick on mobile*/ 698 FastClick.attach(document.body); 699 700 /*Left Sidebar*/ 701 if ( config.enableLeftSidebar ){ 702 leftSidebarInit(); 703 } else { 704 wrapper.addClass(config.disabledLeftSidebarClass); 705 } 706 707 /*Right Sidebar*/ 708 if ( rightSidebar.length ){ 709 rightSidebarInit(); 710 chatWidget(); 711 } 712 713 /*Sidebars Swipe*/ 714 if( config.enableSwipe ){ 715 sidebarSwipe(); 716 } 717 718 /*Scroll Top button*/ 719 if( config.scrollTop ){ 720 scrollTopButton(); 721 } 722 723 /*Page Aside*/ 724 if( asideDiv.length ){ 725 initAsidePS(); 726 } 727 728 /*Scroller plugin init*/ 729 if ( notificationsDiv.length ){ 730 scrollerInit(); 731 } 732 733 /*Get colors*/ 734 colors.primary = getColor('clr-primary'); 735 colors.success = getColor('clr-success'); 736 colors.warning = getColor('clr-warning'); 737 colors.danger = getColor('clr-danger'); 738 colors.grey = getColor('clr-grey'); 739 740 /*Get scrollers*/ 741 scrollers.be_scroller_notifications = ps_be_scroller_notifications; 742 scrollers.left_sidebar_scroll = ps_left_sidebar; 743 scrollers.be_left_sidebar_scroll = ps_be_scroller_left_sidebar; 744 scrollers.sub_menu_scroll = ps_sub_menu_scroller; 745 scrollers.chat_scroll = ps_chat_scroll; 746 scrollers.todo_scroll = ps_todo_scroll; 747 scrollers.settings_scroll = ps_settings_scroll; 748 scrollers.messages_scroll = ps_messages_scroll; 749 scrollers.aside_scroll = ps_aside_scroll; 750 scrollers.updateScroller = updateScroller; 751 scrollers.destroyScroller = destroyScroller; 752 scrollers.initScroller = initScroller; 753 754 //Prevent Connections Dropdown closes on click 755 $(".be-connections").on("click",function( e ){ 756 e.stopPropagation(); 757 }); 758 759 /*Bind plugins on hidden elements*/ 760 /*Dropdown shown event*/ 761 $('.be-icons-nav .dropdown').on('shown.bs.dropdown', function () { 762 updateScroller(ps_be_scroller_notifications); 763 }); 764 765 /*Tooltips*/ 766 $('[data-toggle="tooltip"]').tooltip(); 767 768 /*Popover*/ 769 $('[data-toggle="popover"]').popover(); 770 771 /*Bootstrap modal scroll top fix*/ 772 $('.modal').on('show.bs.modal', function(){ 773 $("html").addClass('be-modal-open'); 774 }); 775 776 $('.modal').on('hidden.bs.modal', function(){ 777 $("html").removeClass('be-modal-open'); 778 }); 779 }, 780 781 //Methods 782 activeItemLeftSidebar: activeItemLeftSidebar 783 }; 784 785})(); 786 787function FastClick(e,t){"use strict";var n;if(t=t||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=t.touchBoundary||10,this.layer=e,this.tapDelay=t.tapDelay||200,!FastClick.notNeeded(e)){for(var i=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],o=this,r=0,s=i.length;r<s;r++)o[i[r]]=c(o[i[r]],o);deviceIsAndroid&&(e.addEventListener("mouseover",this.onMouse,!0),e.addEventListener("mousedown",this.onMouse,!0),e.addEventListener("mouseup",this.onMouse,!0)),e.addEventListener("click",this.onClick,!0),e.addEventListener("touchstart",this.onTouchStart,!1),e.addEventListener("touchmove",this.onTouchMove,!1),e.addEventListener("touchend",this.onTouchEnd,!1),e.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(e.removeEventListener=function(t,n,i){var o=Node.prototype.removeEventListener;"click"===t?o.call(e,t,n.hijacked||n,i):o.call(e,t,n,i)},e.addEventListener=function(t,n,i){var o=Node.prototype.addEventListener;"click"===t?o.call(e,t,n.hijacked||(n.hijacked=function(e){e.propagationStopped||n(e)}),i):o.call(e,t,n,i)}),"function"==typeof e.onclick&&(n=e.onclick,e.addEventListener("click",function(e){n(e)},!1),e.onclick=null)}function c(e,t){return function(){return e.apply(t,arguments)}}}var deviceIsAndroid=navigator.userAgent.indexOf("Android")>0,deviceIsIOS=/iP(ad|hone|od)/.test(navigator.userAgent),deviceIsIOS4=deviceIsIOS&&/OS 4_\d(_\d)?/.test(navigator.userAgent),deviceIsIOSWithBadTarget=deviceIsIOS&&/OS ([6-9]|\d{2})_\d/.test(navigator.userAgent),deviceIsBlackBerry10=navigator.userAgent.indexOf("BB10")>0;FastClick.prototype.needsClick=function(e){"use strict";switch(e.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(e.disabled)return!0;break;case"input":if(deviceIsIOS&&"file"===e.type||e.disabled)return!0;break;case"label":case"video":return!0}return/\bneedsclick\b/.test(e.className)},FastClick.prototype.needsFocus=function(e){"use strict";switch(e.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!deviceIsAndroid;case"input":switch(e.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!e.disabled&&!e.readOnly;default:return/\bneedsfocus\b/.test(e.className)}},FastClick.prototype.sendClick=function(e,t){"use strict";var n,i,o,r;document.activeElement&&document.activeElement!==e&&document.activeElement.blur(),r=t.changedTouches[0],(o=document.createEvent("MouseEvents")).initMouseEvent("mousedown",!0,!0,window,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),o.forwardedTouchEvent=!0,e.dispatchEvent(o),(i=document.createEvent("MouseEvents")).initMouseEvent("mouseup",!0,!0,window,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),i.forwardedTouchEvent=!0,e.dispatchEvent(i),(n=document.createEvent("MouseEvents")).initMouseEvent(this.determineEventType(e),!0,!0,window,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,e.dispatchEvent(n)},FastClick.prototype.determineEventType=function(e){"use strict";return deviceIsAndroid&&"select"===e.tagName.toLowerCase()?"mousedown":"click"}
787,FastClick.prototype.focus=function(e){"use strict";var t;deviceIsIOS&&e.setSelectionRange&&0!==e.type.indexOf("date")&&"time"!==e.type?(t=e.value.length,e.setSelectionRange(t,t)):e.focus()},FastClick.prototype.updateScrollParent=function(e){"use strict";var t,n;if(!(t=e.fastClickScrollParent)||!t.contains(e)){n=e;do{if(n.scrollHeight>n.offsetHeight){t=n,e.fastClickScrollParent=n;break}n=n.parentElement}while(n)}t&&(t.fastClickLastScrollTop=t.scrollTop)},FastClick.prototype.getTargetElementFromEventTarget=function(e){"use strict";return e.nodeType===Node.TEXT_NODE?e.parentNode:e},FastClick.prototype.onTouchStart=function(e){"use strict";var t,n,i;if(e.targetTouches.length>1)return!0;if(t=this.getTargetElementFromEventTarget(e.target),n=e.targetTouches[0],deviceIsIOS){if((i=window.getSelection()).rangeCount&&!i.isCollapsed)return!0;if(!deviceIsIOS4){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return e.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(t)}}return this.trackingClick=!0,this.trackingClickStart=e.timeStamp,this.targetElement=t,this.touchStartX=n.pageX,this.touchStartY=n.pageY,e.timeStamp-this.lastClickTime<this.tapDelay&&e.preventDefault(),!0},FastClick.prototype.touchHasMoved=function(e){"use strict";var t=e.changedTouches[0],n=this.touchBoundary;return Math.abs(t.pageX-this.touchStartX)>n||Math.abs(t.pageY-this.touchStartY)>n},FastClick.prototype.onTouchMove=function(e){"use strict";return!this.trackingClick||((this.targetElement!==this.getTargetElementFromEventTarget(e.target)||this.touchHasMoved(e))&&(this.trackingClick=!1,this.targetElement=null),!0)},FastClick.prototype.findControl=function(e){"use strict";return void 0!==e.control?e.control:e.htmlFor?document.getElementById(e.htmlFor):e.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},FastClick.prototype.onTouchEnd=function(e){"use strict";var t,n,i,o,r,s=this.targetElement;if(!this.trackingClick)return!0;if(e.timeStamp-this.lastClickTime<this.tapDelay)return this.cancelNextClick=!0,!0;if(this.cancelNextClick=!1,this.lastClickTime=e.timeStamp,n=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,deviceIsIOSWithBadTarget&&(r=e.changedTouches[0],(s=document.elementFromPoint(r.pageX-window.pageXOffset,r.pageY-window.pageYOffset)||s).fastClickScrollParent=this.targetElement.fastClickScrollParent),"label"===(i=s.tagName.toLowerCase())){if(t=this.findControl(s)){if(this.focus(s),deviceIsAndroid)return!1;s=t}}else if(this.needsFocus(s))return e.timeStamp-n>100||deviceIsIOS&&window.top!==window&&"input"===i?(this.targetElement=null,!1):(this.focus(s),this.sendClick(s,e),deviceIsIOS&&"select"===i||(this.targetElement=null,e.preventDefault()),!1);return!(!deviceIsIOS||deviceIsIOS4||!(o=s.fastClickScrollParent)||o.fastClickLastScrollTop===o.scrollTop)||(this.needsClick(s)||(e.preventDefault(),this.sendClick(s,e)),!1)},FastClick.prototype.onTouchCancel=function(){"use strict";this.trackingClick=!1,this.targetElement=null},FastClick.prototype.onMouse=function(e){"use strict";return!this.targetElement||(!!e.forwardedTouchEvent||(!e.cancelable||(!(!this.needsClick(this.targetElement)||this.cancelNextClick)||(e.stopImmediatePropagation?e.stopImmediatePropagation():e.propagationStopped=!0,e.stopPropagation(),e.preventDefault(),!1))))},FastClick.prototype.onClick=function(e){"use strict";var t;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===e.target.type&&0===e.detail||((t=this.onMouse(e))||(this.targetElement=null),t)},FastClick.prototype.destroy=function(){"use strict";var e=this.layer;deviceIsAndroid&&(e.removeEventListener("mouseover",this.onMouse,!0),e.removeEventListener("mousedown",this.onMouse,!0),e.removeEventListener("mouseup",this.onMouse,!0)),e.removeEventListener("click",this.onClick,!0),e.removeEventListener("touchstart",this.onTouchStart,!1),e.removeEventListener("touchmove",this.onTouchMove,!1),e.removeEventListener("touchend",this.onTouchEnd,!1),e.removeEventListener("touchcancel",this.onTouchCancel,!1)},FastClick.notNeeded=function(e){"use strict";var t,n,i;if(void 0===window.ontouchstart)return!0;
787if(n=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!deviceIsAndroid)return!0;if(t=document.querySelector("meta[name=viewport]")){if(-1!==t.content.indexOf("user-scalable=no"))return!0;if(n>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(deviceIsBlackBerry10&&(i=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/))[1]>=10&&i[2]>=3&&(t=document.querySelector("meta[name=viewport]"))){if(-1!==t.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===e.style.msTouchAction},FastClick.attach=function(e,t){"use strict";return new FastClick(e,t)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){"use strict";return FastClick}):"undefined"!=typeof module&&module.exports?(module.exports=FastClick.attach,module.exports.FastClick=FastClick):window.FastClick=FastClick; 788/*! 789 * @fileOverview TouchSwipe - jQuery Plugin 790 * @version 1.6.18 791 * 792 * @author Matt Bryson http://www.github.com/mattbryson 793 * @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin 794 * @see http://labs.rampinteractive.co.uk/touchSwipe/ 795 * @see http://plugins.jquery.com/project/touchSwipe 796 * @license 797 * Copyright (c) 2010-2015 Matt Bryson 798 * Dual licensed under the MIT or GPL Version 2 licenses. 799 * 800 */ 801!function(factory){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],factory):factory("undefined"!=typeof module&&module.exports?require("jquery"):jQuery)}(function($){"use strict";function init(options){return!options||void 0!==options.allowPageScroll||void 0===options.swipe&&void 0===options.swipeStatus||(options.allowPageScroll=NONE),void 0!==options.click&&void 0===options.tap&&(options.tap=options.click),options||(options={}),options=$.extend({},$.fn.swipe.defaults,options),this.each(function(){var $this=$(this),plugin=$this.data(PLUGIN_NS);plugin||(plugin=new TouchSwipe(this,options),$this.data(PLUGIN_NS,plugin))})}function TouchSwipe(element,options){function touchStart(jqEvent){if(!(getTouchInProgress()||$(jqEvent.target).closest(options.excludedElements,$element).length>0)){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(!event.pointerType||"mouse"!=event.pointerType||0!=options.fallbackToMouseEvents){var ret,touches=event.touches,evt=touches?touches[0]:event;return phase=PHASE_START,touches?fingerCount=touches.length:options.preventDefaultEvents!==!1&&jqEvent.preventDefault(),distance=0,direction=null,currentDirection=null,pinchDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,maximumsMap=createMaximumsData(),cancelMultiFingerRelease(),createFingerData(0,evt),!touches||fingerCount===options.fingers||options.fingers===ALL_FINGERS||hasPinches()?(startTime=getTimeStamp(),2==fingerCount&&(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)),(options.swipeStatus||options.pinchStatus)&&(ret=triggerHandler(event,phase))):ret=!1,ret===!1?(phase=PHASE_CANCEL,triggerHandler(event,phase),ret):(options.hold&&(holdTimeout=setTimeout($.proxy(function(){$element.trigger("hold",[event.target]),options.hold&&(ret=options.hold.call($element,event,event.target))},this),options.longTapThreshold)),setTouchInProgress(!0),null)}}}function touchMove(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(phase!==PHASE_END&&phase!==PHASE_CANCEL&&!inMultiFingerRelease()){var ret,touches=event.touches,evt=touches?touches[0]:event,currentFinger=updateFingerData(evt);if(endTime=getTimeStamp(),touches&&(fingerCount=touches.length),options.hold&&clearTimeout(holdTimeout),phase=PHASE_MOVE,2==fingerCount&&(0==startTouchesDistance?(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)):(updateFingerData(touches[1]),endTouchesDistance=calculateTouchesDistance(fingerData[0].end,fingerData[1].end),pinchDirection=calculatePinchDirection(fingerData[0].end,fingerData[1].end)),pinchZoom=calculatePinchZoom(startTouchesDistance,endTouchesDistance),pinchDistance=Math.abs(startTouchesDistance-endTouchesDistance)),fingerCount===options.fingers||options.fingers===ALL_FINGERS||!touches||hasPinches()){if(direction=calculateDirection(currentFinger.start,currentFinger.end),currentDirection=calculateDirection(currentFinger.last,currentFinger.end),val
vendor: 13,634 bytes, line 801
801idateDefaultEvent(jqEvent,currentDirection),distance=calculateDistance(currentFinger.start,currentFinger.end),duration=calculateDuration(),setMaxDistance(direction,distance),ret=triggerHandler(event,phase),!options.triggerOnTouchEnd||options.triggerOnTouchLeave){var inBounds=!0;if(options.triggerOnTouchLeave){var bounds=getbounds(this);inBounds=isInBounds(currentFinger.end,bounds)}!options.triggerOnTouchEnd&&inBounds?phase=getNextPhase(PHASE_MOVE):options.triggerOnTouchLeave&&!inBounds&&(phase=getNextPhase(PHASE_END)),phase!=PHASE_CANCEL&&phase!=PHASE_END||triggerHandler(event,phase)}}else phase=PHASE_CANCEL,triggerHandler(event,phase);ret===!1&&(phase=PHASE_CANCEL,triggerHandler(event,phase))}}function touchEnd(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent,touches=event.touches;if(touches){if(touches.length&&!inMultiFingerRelease())return startMultiFingerRelease(event),!0;if(touches.length&&inMultiFingerRelease())return!0}return inMultiFingerRelease()&&(fingerCount=fingerCountAtRelease),endTime=getTimeStamp(),duration=calculateDuration(),didSwipeBackToCancel()||!validateSwipeDistance()?(phase=PHASE_CANCEL,triggerHandler(event,phase)):options.triggerOnTouchEnd||options.triggerOnTouchEnd===!1&&phase===PHASE_MOVE?(options.preventDefaultEvents!==!1&&jqEvent.cancelable!==!1&&jqEvent.preventDefault(),phase=PHASE_END,triggerHandler(event,phase)):!options.triggerOnTouchEnd&&hasTap()?(phase=PHASE_END,triggerHandlerForGesture(event,phase,TAP)):phase===PHASE_MOVE&&(phase=PHASE_CANCEL,triggerHandler(event,phase)),setTouchInProgress(!1),null}function touchCancel(){fingerCount=0,endTime=0,startTime=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,cancelMultiFingerRelease(),setTouchInProgress(!1)}function touchLeave(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;options.triggerOnTouchLeave&&(phase=getNextPhase(PHASE_END),triggerHandler(event,phase))}function removeListeners(){$element.unbind(START_EV,touchStart),$element.unbind(CANCEL_EV,touchCancel),$element.unbind(MOVE_EV,touchMove),$element.unbind(END_EV,touchEnd),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave),setTouchInProgress(!1)}function getNextPhase(currentPhase){var nextPhase=currentPhase,validTime=validateSwipeTime(),validDistance=validateSwipeDistance(),didCancel=didSwipeBackToCancel();return!validTime||didCancel?nextPhase=PHASE_CANCEL:!validDistance||currentPhase!=PHASE_MOVE||options.triggerOnTouchEnd&&!options.triggerOnTouchLeave?!validDistance&¤tPhase==PHASE_END&&options.triggerOnTouchLeave&&(nextPhase=PHASE_CANCEL):nextPhase=PHASE_END,nextPhase}function triggerHandler(event,phase){var ret,touches=event.touches;return(didSwipe()||hasSwipes())&&(ret=triggerHandlerForGesture(event,phase,SWIPE)),(didPinch()||hasPinches())&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,PINCH)),didDoubleTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,DOUBLE_TAP):didLongTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,LONG_TAP):didTap()&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,TAP)),phase===PHASE_CANCEL&&touchCancel(event),phase===PHASE_END&&(touches?touches.length||touchCancel(event):touchCancel(event)),ret}function triggerHandlerForGesture(event,phase,gesture){var ret;if(gesture==SWIPE){if($element.trigger("swipeStatus",[phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection]),options.swipeStatus&&(ret=options.swipeStatus.call($element,event,phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection),ret===!1))return!1;if(phase==PHASE_END&&validateSwipe()){if(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),$element.trigger("swipe",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipe&&(ret=options.swipe.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection),ret===!1))return!1;switch(direction){case LEFT:$element.trigger("swipeLeft",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeLeft&&(ret=options.swipeLeft.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case RIGHT:$element.trigger("swipeRight",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeRight&&(ret=options.swipeRight.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case UP:$element.trigger("swipeUp",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeUp&&(ret=options.swipeUp.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case DOWN:$element.trigger("swipeDown",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeDown&&(ret=options.swipeDown.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection))}}}if(gesture==PINCH){if($element.trigger("pinchStatus",[phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchStatus&&(ret=options.pinchStatus.call($element,event,phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData),ret===!1))return!1;if(phase==PHASE_END&&validatePinch())switch(pinchDirection){case IN:$element.trigger("pinchIn",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchIn&&(ret=options.pinchIn.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData));break;case OUT:$element.trigger("pinchOut",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchOut&&(ret=options.pinchOut.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData))}}return gesture==TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),hasDoubleTap()&&!inDoubleTap()?(doubleTapStartTime=getTimeStamp(),singleTapTimeout=setTimeout($.proxy(function(){doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target))},this),options.doubleTapThreshold)):(doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target)))):gesture==DOUBLE_TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),doubleTapStartTime=null,$element.trigger("doubletap",[event.target]),options.doubleTap&&(ret=options.doubleTap.call($element,event,event.target))):gesture==LONG_TAP&&(phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),doubleTapStartTime=null,$element.trigger("longtap",[event.target]),options.longTap&&(ret=options.longTap.call($element,event,event.target)))),ret}function validateSwipeDistance(){var valid=!0;return null!==options.threshold&&(valid=distance>=options.threshold),valid}function didSwipeBackToCancel(){var cancelled=!1;return null!==options.cancelThreshold&&null!==direction&&(cancelled=getMaxDistance(direction)-distance>=options.cancelThreshold),cancelled}function validatePinchDistance(){return null===options.pinchThreshold||pinchDistance>=options.pinchThreshold}function validateSwipeTime(){var result;return result=!options.maxTimeThreshold||!(duration>=options.maxTimeThreshold)}function validateDefaultEvent(jqEvent,direction){if(options.preventDefaultEvents!==!1)if(options.allowPageScroll===NONE)jqEvent.preventDefault();else{var auto=options.allowPageScroll===AUTO;switch(direction){case LEFT:(options.swipeLeft&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case RIGHT:(options.swipeRight&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case UP:(options.swipeUp&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case DOWN:(options.swipeDown&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case NONE:}}}function validatePinch(){var hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),hasCorrectDistance=validatePinchDistance();return hasCorrectFingerCount&&hasEndPoint&&hasCorrectDistance}function hasPinches(){return!!(options.pinchStatus||options.pinchIn||options.pinchOut)}function didPinch(){return!(!validatePinch()||!hasPinches())}function validateSwipe(){var hasValidTime=validateSwipeTime(),hasValidDistance=validateSwipeDistance(),hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),didCancel=didSwipeBackToCancel(),valid=!didCancel&&hasEndPoint&&hasCorrectFingerCount&&hasValidDistance&&hasValidTime;return valid}function hasSwipes(){return!!(options.swipe||options.swipeStatus||options.swipeLeft||options.swipeRight||options.swipeUp||options.swipeDown)}function didSwipe(){return!(!validateSwipe()||!hasSwipes())}function validateFingers(){return fingerCount===options.fingers||options.fingers===ALL_FINGERS||!SUPPORTS_TOUCH}function validateEndPoint(){return 0!==fingerData[0].end.x}function hasTap(){return!!options.tap}function hasDoubleTap(){return!!options.doubleTap}function hasLongTap(){return!!options.longTap}function validateDoubleTap(){if(null==doubleTapStartTime)return!1;var now=getTimeStamp();return hasDoubleTap()&&now-doubleTapStartTime<=options.doubleTapThreshold}function inDoubleTap(){return validateDoubleTap()}function validateTap(){return(1===fingerCount||!SUPPORTS_TOUCH)&&(isNaN(distance)||distance<options.threshold)}function validateLongTap(){return duration>options.longTapThreshold&&distance<DOUBLE_TAP_THRESHOLD}function didTap(){return!(!validateTap()||!hasTap())}function didDoubleTap(){return!(!validateDoubleTap()||!hasDoubleTap())}function didLongTap(){return!(!validateLongTap()||!hasLongTap())}function startMultiFingerRelease(event){previousTouchEndTime=getTimeStamp(),fingerCountAtRelease=event.touches.length+1}function cancelMultiFingerRelease(){previousTouchEndTime=0,fingerCountAtRelease=0}function inMultiFingerRelease(){var withinThreshold=!1;if(previousTouchEndTime){var diff=getTimeStamp()-previousTouchEndTime;diff<=options.fingerReleaseThreshold&&(withinThreshold=!0)}return withinThreshold}function getTouchInProgress(){return!($element.data(PLUGIN_NS+"_intouch")!==!0)}function setTouchInProgress(val){$element&&(val===!0?($element.bind(MOVE_EV,touchMove),$element.bind(END_EV,touchEnd),LEAVE_EV&&$element.bind(LEAVE_EV,touchLeave)):($element.unbind(MOVE_EV,touchMove,!1),$element.unbind(END_EV,touchEnd,!1),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave,!1)),$element.data(PLUGIN_NS+"_intouch",val===!0))}function createFingerData(id,evt){var f={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return f.start.x=f.last.x=f.end.x=evt.pageX||evt.clientX,f.start.y=f.last.y=f.end.y=evt.pageY||evt.clientY,fingerData[id]=f,f}function updateFingerData(evt){var id=void 0!==evt.identifier?evt.identifier:0,f=getFingerData(id);return null===f&&(f=createFingerData(id,evt)),f.last.x=f.end.x,f.last.y=f.end.y,f.end.x=evt.pageX||evt.clientX,f.end.y=evt.pageY||evt.clientY,f}function getFingerData(id){return fingerData[id]||null}function setMaxDistance(direction,distance){direction!=NONE&&(distance=Math.max(distance,getMaxDistance(direction)),maximumsMap[direction].distance=distance)}function getMaxDistance(direction){if(maximumsMap[direction])return maximumsMap[direction].distance}function createMaximumsData(){var maxData={};return maxData[LEFT]=createMaximumVO(LEFT),maxData[RIGHT]=createMaximumVO(RIGHT),maxData[UP]=createMaximumVO(UP),maxData[DOWN]=createMaximumVO(DOWN),maxData}function createMaximumVO(dir){return{direction:dir,distance:0}}function calculateDuration(){return endTime-startTime}function calculateTouchesDistance(startPoint,endPoint){var diffX=Math.abs(startPoint.x-endPoint.x),diffY=Math.abs(startPoint.y-endPoint.y);return Math.round(Math.sqrt(diffX*diffX+diffY*diffY))}function calculatePinchZoom(startDistance,endDistance){var percent=endDistance/startDistance*1;return percent.toFixed(2)}function calculatePinchDirection(){return pinchZoom<1?OUT:IN}function calculateDistance(startPoint,endPoint){return Math.round(Math.sqrt(Math.pow(endPoint.x-startPoint.x,2)+Math.pow(endPoint.y-startPoint.y,2)))}function calculateAngle(startPoint,endPoint){var x=startPoint.x-endPoint.x,y=endPoint.y-startPoint.y,r=Math.atan2(y,x),angle=Math.round(180*r/Math.PI);return angle<0&&(angle=360-Math.abs(angle)),angle}function calculateDirection(startPoint,endPoint){if(comparePoints(startPoint,endPoint))return NONE;var angle=calculateAngle(startPoint,endPoint);return angle<=45&&angle>=0?LEFT:angle<=360&&angle>=315?LEFT:angle>=135&&angle<=225?RIGHT:angle>45&&angle<135?DOWN:UP}function getTimeStamp(){var now=new Date;return now.getTime()}function getbounds(el){el=$(el);var offset=el.offset(),bounds={left:offset.left,right:offset.left+el.outerWidth(),top:offset.top,bottom:offset.top+el.outerHeight()};return bounds}function isInBounds(point,bounds){return point.x>bounds.left&&point.x<bounds.right&&point.y>bounds.top&&point.y<bounds.bottom}function comparePoints(pointA,pointB){return pointA.x==pointB.x&&pointA.y==pointB.y}var options=$.extend({},options),useTouchEvents=SUPPORTS_TOUCH||SUPPORTS_POINTER||!options.fallbackToMouseEvents,START_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerDown":"pointerdown":"touchstart":"mousedown",MOVE_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerMove":"pointermove":"touchmove":"mousemove",END_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerUp":"pointerup":"touchend":"mou
801seup",LEAVE_EV=useTouchEvents?SUPPORTS_POINTER?"mouseleave":null:"mouseleave",CANCEL_EV=SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerCancel":"pointercancel":"touchcancel",distance=0,direction=null,currentDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,pinchDirection=0,maximumsMap=null,$element=$(element),phase="start",fingerCount=0,fingerData={},startTime=0,endTime=0,previousTouchEndTime=0,fingerCountAtRelease=0,doubleTapStartTime=0,singleTapTimeout=null,holdTimeout=null;try{$element.bind(START_EV,touchStart),$element.bind(CANCEL_EV,touchCancel)}catch(e){$.error("events not supported "+START_EV+","+CANCEL_EV+" on jQuery.swipe")}this.enable=function(){return this.disable(),$element.bind(START_EV,touchStart),$element.bind(CANCEL_EV,touchCancel),$element},this.disable=function(){return removeListeners(),$element},this.destroy=function(){removeListeners(),$element.data(PLUGIN_NS,null),$element=null},this.option=function(property,value){if("object"==typeof property)options=$.extend(options,property);else if(void 0!==options[property]){if(void 0===value)return options[property];options[property]=value}else{if(!property)return options;$.error("Option "+property+" does not exist on jQuery.swipe.options")}return null}}var VERSION="1.6.18",LEFT="left",RIGHT="right",UP="up",DOWN="down",IN="in",OUT="out",
vendor: 2,057 bytes, lines 801-805
801NONE="none",AUTO="auto",SWIPE="swipe",PINCH="pinch",TAP="tap",DOUBLE_TAP="doubletap",LONG_TAP="longtap",HORIZONTAL="horizontal",VERTICAL="vertical",ALL_FINGERS="all",DOUBLE_TAP_THRESHOLD=10,PHASE_START="start",PHASE_MOVE="move",PHASE_END="end",PHASE_CANCEL="cancel",SUPPORTS_TOUCH="ontouchstart"in window,SUPPORTS_POINTER_IE10=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!SUPPORTS_TOUCH,SUPPORTS_POINTER=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!SUPPORTS_TOUCH,PLUGIN_NS="TouchSwipe",defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:".noSwipe",preventDefaultEvents:!0};$.fn.swipe=function(method){var $this=$(this),plugin=$this.data(PLUGIN_NS);if(plugin&&"string"==typeof method){if(plugin[method])return plugin[method].apply(plugin,Array.prototype.slice.call(arguments,1));$.error("Method "+method+" does not exist on jQuery.swipe")}else if(plugin&&"object"==typeof method)plugin.option.apply(plugin,arguments);else if(!(plugin||"object"!=typeof method&&method))return init.apply(this,arguments);return $this},$.fn.swipe.version=VERSION,$.fn.swipe.defaults=defaults,$.fn.swipe.phases={PHASE_START:PHASE_START,PHASE_MOVE:PHASE_MOVE,PHASE_END:PHASE_END,PHASE_CANCEL:PHASE_CANCEL},$.fn.swipe.directions={LEFT:LEFT,RIGHT:RIGHT,UP:UP,DOWN:DOWN,IN:IN,OUT:OUT},$.fn.swipe.pageScroll={NONE:NONE,HORIZONTAL:HORIZONTAL,VERTICAL:VERTICAL,AUTO:AUTO},$.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:ALL_FINGERS}}); 802// TinyColor v1.4.1 803// https://github.com/bgrins/TinyColor 804// 2016-07-07, Brian Grinstead, MIT License 805!function(a){function b(a,d){if(a=a?a:"",d=d||{},a instanceof b)return a;
805if(!(this instanceof b))return new b(a,d);var e=c(a);this._originalInput=a,this._r=e.r,this._g=e.g,this._b=e.b,this._a=e.a,this._roundA=P(100*this._a)/100,this._format=d.format||e.format,this._gradientType=d.gradientType,this._r<1&&(this._r=P(this._r)),this._g<1&&(this._g=P(this._g)),this._b<1&&(this._b=P(this._b)),this._ok=e.ok,this._tc_id=O++}function c(a){var b={r:0,g:0,b:0},c=1,e=null,g=null,i=null,j=!1,k=!1;return"string"==typeof a&&(a=K(a)),"object"==typeof a&&(J(a.r)&&J(a.g)&&J(a.b)?(b=d(a.r,a.g,a.b),j=!0,k="%"===String(a.r).substr(-1)?"prgb":"rgb"):J(a.h)&&J(a.s)&&J(a.v)?(e=G(a.s),g=G(a.v),b=h(a.h,e,g),j=!0,k="hsv"):J(a.h)&&J(a.s)&&J(a.l)&&(e=G(a.s),i=G(a.l),b=f(a.h,e,i),j=!0,k="hsl"),a.hasOwnProperty("a")&&(c=a.a)),c=z(c),{ok:j,format:a.format||k,r:Q(255,R(b.r,0)),g:Q(255,R(b.g,0)),b:Q(255,R(b.b,0)),a:c}}function d(a,b,c){return{r:255*A(a,255),g:255*A(b,255),b:255*A(c,255)}}function e(a,b,c){a=A(a,255),b=A(b,255),c=A(c,255);var d,e,f=R(a,b,c),g=Q(a,b,c),h=(f+g)/2;if(f==g)d=e=0;else{var i=f-g;switch(e=h>.5?i/(2-f-g):i/(f+g),f){case a:d=(b-c)/i+(c>b?6:0);break;case b:d=(c-a)/i+2;break;case c:d=(a-b)/i+4}d/=6}return{h:d,s:e,l:h}}function f(a,b,c){function d(a,b,c){return 0>c&&(c+=1),c>1&&(c-=1),1/6>c?a+6*(b-a)*c:.5>c?b:2/3>c?a+6*(b-a)*(2/3-c):a}var e,f,g;if(a=A(a,360),b=A(b,100),c=A(c,100),0===b)e=f=g=c;else{var h=.5>c?c*(1+b):c+b-c*b,i=2*c-h;e=d(i,h,a+1/3),f=d(i,h,a),g=d(i,h,a-1/3)}return{r:255*e,g:255*f,b:255*g}}function g(a,b,c){a=A(a,255),b=A(b,255),c=A(c,255);var d,e,f=R(a,b,c),g=Q(a,b,c),h=f,i=f-g;if(e=0===f?0:i/f,f==g)d=0;else{switch(f){case a:d=(b-c)/i+(c>b?6:0);break;case b:d=(c-a)/i+2;break;case c:d=(a-b)/i+4}d/=6}return{h:d,s:e,v:h}}function h(b,c,d){b=6*A(b,360),c=A(c,100),d=A(d,100);var e=a.floor(b),f=b-e,g=d*(1-c),h=d*(1-f*c),i=d*(1-(1-f)*c),j=e%6,k=[d,h,g,g,i,d][j],l=[i,d,d,h,g,g][j],m=[g,g,i,d,d,h][j];return{r:255*k,g:255*l,b:255*m}}function i(a,b,c,d){var e=[F(P(a).toString(16)),F(P(b).toString(16)),F(P(c).toString(16))];return d&&e[0].charAt(0)==e[0].charAt(1)&&e[1].charAt(0)==e[1].charAt(1)&&e[2].charAt(0)==e[2].charAt(1)?e[0].charAt(0)+e[1].charAt(0)+e[2].charAt(0):e.join("")}function j(a,b,c,d,e){var f=[F(P(a).toString(16)),F(P(b).toString(16)),F(P(c).toString(16)),F(H(d))];return e&&f[0].charAt(0)==f[0].charAt(1)&&f[1].charAt(0)==f[1].charAt(1)&&f[2].charAt(0)==f[2].charAt(1)&&f[3].charAt(0)==f[3].charAt(1)?f[0].charAt(0)+f[1].charAt(0)+f[2].charAt(0)+f[3].charAt(0):f.join("")}function k(a,b,c,d){var e=[F(H(d)),F(P(a).toString(16)),F(P(b).toString(16)),F(P(c).toString(16))];return e.join("")}function l(a,c){c=0===c?0:c||10;var d=b(a).toHsl();return d.s-=c/100,d.s=B(d.s),b(d)}function m(a,c){c=0===c?0:c||10;var d=b(a).toHsl();return d.s+=c/100,d.s=B(d.s),b(d)}function n(a){return b(a).desaturate(100)}function o(a,c){c=0===c?0:c||10;var d=b(a).toHsl();return d.l+=c/100,d.l=B(d.l),b(d)}function p(a,c){c=0===c?0:c||10;var d=b(a).toRgb();return d.r=R(0,Q(255,d.r-P(255*-(c/100)))),d.g=R(0,Q(255,d.g-P(255*-(c/100)))),d.b=R(0,Q(255,d.b-P(255*-(c/100)))),b(d)}function q(a,c){c=0===c?0:c||10;var d=b(a).toHsl();return d.l-=c/100,d.l=B(d.l),b(d)}function r(a,c){var d=b(a).toHsl(),e=(d.h+c)%360;return d.h=0>e?360+e:e,b(d)}function s(a){var c=b(a).toHsl();return c.h=(c.h+180)%360,b(c)}function t(a){var c=b(a).toHsl(),d=c.h;return[b(a),b({h:(d+120)%360,s:c.s,l:c.l}),b({h:(d+240)%360,s:c.s,l:c.l})]}function u(a){var c=b(a).toHsl(),d=c.h;return[b(a),b({h:(d+90)%360,s:c.s,l:c.l}),b({h:(d+180)%360,s:c.s,l:c.l}),b({h:(d+270)%360,s:c.s,l:c.l})]}function v(a){var c=b(a).toHsl(),d=c.h;return[b(a),b({h:(d+72)%360,s:c.s,l:c.l}),b({h:(d+216)%360,s:c.s,l:c.l})]}function w(a,c,d){c=c||6,d=d||30;var e=b(a).toHsl(),f=360/d,g=[b(a)];for(e.h=(e.h-(f*c>>1)+720)%360;--c;)e.h=(e.h+f)%360,g.push(b(e));return g}function x(a,c){c=c||6;for(var d=b(a).toHsv(),e=d.h,f=d.s,g=d.v,h=[],i=1/c;c--;)h.push(b({h:e,s:f,v:g})),g=(g+i)%1;return h}function y(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[a[c]]=c);return b}function z(a){return a=parseFloat(a),(isNaN(a)||0>a||a>1)&&(a=1),a}function A(b,c){D(b)&&(b="100%");var d=E(b);return b=Q(c,R(0,parseFloat(b))),d&&(b=parseInt(b*c,10)/100),a.abs(b-c)<1e-6?1:b%c/parseFloat(c)}function B(a){return Q(1,R(0,a))}function C(a){return parseInt(a,16)}function D(a){return"string"==typeof a&&-1!=a.indexOf(".")&&1===parseFloat(a)}function E(a){return"string"==typeof a&&-1!=a.indexOf("%")}function F(a){return 1==a.length?"0"+a:""+a}function G(a){return 1>=a&&(a=100*a+"%"),a}function H(b){return a.round(255*parseFloat(b)).toString(16)}function I(a){return C(a)/255}function J(a){return!!V.CSS_UNIT.exec(a)}function K(a){a=a.replace(M,"").replace(N,"").toLowerCase();var b=!1;if(T[a])a=T[a],b=!0;else if("transparent"==a)return{r:0,g:0,b:0,a:0,format:"name"};var c;return(c=V.rgb.exec(a))?{r:c[1],g:c[2],b:c[3]}:(c=V.rgba.exec(a))?{r:c[1],g:c[2],b:c[3],a:c[4]}
805:(c=V.hsl.exec(a))?{h:c[1],s:c[2],l:c[3]}:(c=V.hsla.exec(a))?{h:c[1],s:c[2],l:c[3],a:c[4]}:(c=V.hsv.exec(a))?{h:c[1],s:c[2],v:c[3]}:(c=V.hsva.exec(a))?{h:c[1],s:c[2],v:c[3],a:c[4]}:(c=V.hex8.exec(a))?{r:C(c[1]),g:C(c[2]),b:C(c[3]),a:I(c[4]),format:b?"name":"hex8"}:(c=V.hex6.exec(a))?{r:C(c[1]),g:C(c[2]),b:C(c[3]),format:b?"name":"hex"}:(c=V.hex4.exec(a))?{r:C(c[1]+""+c[1]),g:C(c[2]+""+c[2]),b:C(c[3]+""+c[3]),a:I(c[4]+""+c[4]),format:b?"name":"hex8"}:(c=V.hex3.exec(a))?{r:C(c[1]+""+c[1]),g:C(c[2]+""+c[2]),b:C(c[3]+""+c[3]),format:b?"name":"hex"}:!1}function L(a){var b,c;return a=a||{level:"AA",size:"small"},b=(a.level||"AA").toUpperCase(),c=(a.size||"small").toLowerCase(),"AA"!==b&&"AAA"!==b&&(b="AA"),"small"!==c&&"large"!==c&&(c="small"),{level:b,size:c}}var M=/^\s+/,N=/\s+$/,O=0,P=a.round,Q=a.min,R=a.max,S=a.random;b.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var a=this.toRgb();return(299*a.r+587*a.g+114*a.b)/1e3},getLuminance:function(){var b,c,d,e,f,g,h=this.toRgb();return b=h.r/255,c=h.g/255,d=h.b/255,e=.03928>=b?b/12.92:a.pow((b+.055)/1.055,2.4),f=.03928>=c?c/12.92:a.pow((c+.055)/1.055,2.4),g=.03928>=d?d/12.92:a.pow((d+.055)/1.055,2.4),.2126*e+.7152*f+.0722*g},setAlpha:function(a){return this._a=z(a),this._roundA=P(100*this._a)/100,this},toHsv:function(){var a=g(this._r,this._g,this._b);return{h:360*a.h,s:a.s,v:a.v,a:this._a}},toHsvString:function(){var a=g(this._r,this._g,this._b),b=P(360*a.h),c=P(100*a.s),d=P(100*a.v);return 1==this._a?"hsv("+b+", "+c+"%, "+d+"%)":"hsva("+b+", "+c+"%, "+d+"%, "+this._roundA+")"},toHsl:function(){var a=e(this._r,this._g,this._b);return{h:360*a.h,s:a.s,l:a.l,a:this._a}},toHslString:function(){var a=e(this._r,this._g,this._b),b=P(360*a.h),c=P(100*a.s),d=P(100*a.l);return 1==this._a?"hsl("+b+", "+c+"%, "+d+"%)":"hsla("+b+", "+c+"%, "+d+"%, "+this._roundA+")"},toHex:function(a){return i(this._r,this._g,this._b,a)},toHexString:function(a){return"#"+this.toHex(a)},toHex8:function(a){return j(this._r,this._g,this._b,this._a,a)},toHex8String:function(a){return"#"+this.toHex8(a)},toRgb:function(){return{r:P(this._r),g:P(this._g),b:P(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+P(this._r)+", "+P(this._g)+", "+P(this._b)+")":"rgba("+P(this._r)+", "+P(this._g)+", "+P(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:P(100*A(this._r,255))+"%",g:P(100*A(this._g,255))+"%",b:P(100*A(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+P(100*A(this._r,255))+"%, "+P(100*A(this._g,255))+"%, "+P(100*A(this._b,255))+"%)":"rgba("+P(100*A(this._r,255))+"%, "+P(100*A(this._g,255))+"%, "+P(100*A(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":this._a<1?!1:U[i(this._r,this._g,this._b,!0)]||!1},toFilter:function(a){var c="#"+k(this._r,this._g,this._b,this._a),d=c,e=this._gradientType?"GradientType = 1, ":"";if(a){var f=b(a);d="#"+k(f._r,f._g,f._b,f._a)}return"progid:DXImageTransform.Microsoft.gradient("+e+"startColorstr="+c+",endColorstr="+d+")"},toString:function(a){var b=!!a;a=a||this._format;var c=!1,d=this._a<1&&this._a>=0,e=!b&&d&&("hex"===a||"hex6"===a||"hex3"===a||"hex4"===a||"hex8"===a||"name"===a);return e?"name"===a&&0===this._a?this.toName():this.toRgbString():("rgb"===a&&(c=this.toRgbString()),"prgb"===a&&(c=this.toPercentageRgbString()),("hex"===a||"hex6"===a)&&(c=this.toHexString()),"hex3"===a&&(c=this.toHexString(!0)),"hex4"===a&&(c=this.toHex8String(!0)),"hex8"===a&&(c=this.toHex8String()),"name"===a&&(c=this.toName()),"hsl"===a&&(c=this.toHslString()),"hsv"===a&&(c=this.toHsvString()),c||this.toHexString())},clone:function(){return b(this.toString())},_applyModification:function(a,b){var c=a.apply(null,[this].concat([].slice.call(b)));return this._r=c._r,this._g=c._g,this._b=c._b,this.setAlpha(c._a),this},lighten:function(){return this._applyModification(o,arguments)},brighten:function(){return this._applyModification(p,arguments)},darken:function(){return this._applyModification(q,arguments)},desaturate:function(){return this._applyModification(l,arguments)},saturate:function(){return this._applyModification(m,arguments)},greyscale:function(){return this._applyModification(n,arguments)},spin:function(){return this._applyModification(r,arguments)},_applyCombination:function(a,b){return a.apply(null,[this].concat([].slice.call(b)))},analogous:function(){return this._applyCombination(w,arguments)},complement:function(){return this._applyCombination(s,arguments)},monochromatic:function(){return this._applyCombination(x,arguments)},splitcomplement:function(){return this._applyCombination(v,arguments)},triad:function(){return this._applyCombination(t,arguments)},tetrad:function(){return this._applyCombination(u,arguments)}},b.fromRatio=function(a,c){if("object"==typeof a){var d={};for(var e in a)a.hasOwnProperty(e)&&(d[e]="a"===e?a[e]:G(a[e]));a=d}return b(a,c)},b.equals=function(a,c){return a&&c?b(a).toRgbString()==b(c).toRgbString():!1},b.random=function(){return b.fromRatio({r:S(),g:S(),b:S()})},b.mix=function(a,c,d){d=0===d?0:d||50;var e=b(a).toRgb(),f=b(c).toRgb(),g=d/100,h={r:(f.r-e.r)*g+e.r,g:(f.g-e.g)*g+e.g,b:(f.b-e.b)*g+e.b,a:(f.a-e.a)*g+e.a};return b(h)},b.readability=function(c,d){var e=b(c),f=b(d);return(a.max(e.getLuminance(),f.getLuminance())+.05)/(a.min(e.getLuminance(),f.getLuminance())+.05)},b.isReadable=function(a,c,d){var e,f,g=b.readability(a,c);
805switch(f=!1,e=L(d),e.level+e.size){case"AAsmall":case"AAAlarge":f=g>=4.5;break;case"AAlarge":f=g>=3;break;case"AAAsmall":f=g>=7}return f},b.mostReadable=function(a,c,d){var e,f,g,h,i=null,j=0;d=d||{},f=d.includeFallbackColors,g=d.level,h=d.size;for(var k=0;k<c.length;k++)e=b.readability(a,c[k]),e>j&&(j=e,i=b(c[k]));return b.isReadable(a,i,{level:g,size:h})||!f?i:(d.includeFallbackColors=!1,b.mostReadable(a,["#fff","#000"],d))};var T=b.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee9
8050",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},U=b.hexNames=y(T),V=function(){var a="[-\\+]?\\d+%?",b="[-\\+]?\\d*\\.\\d+%?",c="(?:"+b+")|(?:"+a+")",d="[\\s|\\(]+("+c+")[,|\\s]+("+c+")[,|\\s]+("+c+")\\s*\\)?",e="[\\s|\\(]+("+c+")[,|\\s]+("+c+")[,|\\s]+("+c+")[,|\\s]+("+c+")\\s*\\)?";return{CSS_UNIT:new RegExp(c),rgb:new RegExp("rgb"+d),rgba:new RegExp("rgba"+e),hsl:new RegExp("hsl"+d),hsla:new RegExp("hsla"+e),hsv:new RegExp("hsv"+d),hsva:new RegExp("hsva"
805+e),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();"undefined"!=typeof module&&module.exports?module.exports=b:"function"==typeof define&&define.amd?define(function(){return b}):window.tinycolor=b}(Math); 806/*! 807 * jQuery bootstrap 4 breakpoint check 808 * Check the current visibility of bootstrap 3 breakpoints 809 * 810 * @example `$.isXs()` function alias for `$.isBreakpoint("xs")` 811 * @example `$.isSm()` function alias for `$.isBreakpoint("sm")` 812 * @example `$.isMd()` function alias for `$.isBreakpoint("md")` 813 * @example `$.isLg()` function alias for `$.isBreakpoint("lg")` 814 * @example `$.isXl()` function alias for `$.isBreakpoint("xl")` 815 * @version 1.0.0 816 * @copyright Jens A. (cakebake) and other contributors 817 * @license Released under the MIT license 818 */ 819!function(n){n.isBreakpoint=function(e){var i,s,o;switch(e){case"xs":o="d-none d-sm-block";break;case"sm":o="d-none d-md-block";break;case"md":o="d-none d-lg-block";break;case"lg":o="d-none d-xl-block";break;case"xl":o="d-none"}return i=n("<div/>",{class:o}).appendTo("body"),s=i.is(":hidden"),i.remove(),s},n.extend(n,{isXs:function(){return n.isBreakpoint("xs")},isSm:function(){return n.isBreakpoint("sm")},isMd:function(){return n.isBreakpoint("md")},isLg:function(){return n.isBreakpoint("lg")},isXl:function(){return n.isBreakpoint("xl")}})}(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.