1/* Template Name: Landrick - Saas & Software Landing Page Template 2 Author: Shreethemes 3 E-mail: [email protected] 4 Created: August 2019 5 Version: 4.7.0 6 File Description: Common JS file of the template(plugins.init.js) 7*/ 8 9 10/*********************************/ 11/* INDEX */ 12/*================================ 13 * 01. Tiny Slider * 14 * 02. Swiper slider * 15 * 03. Countdown Js * (For Comingsoon pages) 16 * 04. Maintenance js * (For Maintenance page) 17 * 05. Data Counter * 18 * 06. Datepicker js * 19 * 07. Gallery filter js * (For Portfolio pages) 20 * 08. Tobii lightbox * (For Portfolio pages) 21 * 09. CK Editor * (For Compose mail) 22 * 10. WOW JS Animation * 23 * 11. Typed Text animation (animation) * 24 * 12. Validation Form * 25 * 13. Switcher Pricing Plan* 26 * 14. Cookies Policy * 27 * 15. Back Button * 28 * 16. Particles * 29 * 17. ApexCharts * (chart for cryptocurrency) 30 * 18. Switcher JS * 31 ================================*/ 32 33//=========================================// 34/* 01) Tiny slider */ 35//=========================================// 36 37if(document.getElementsByClassName('tiny-single-item').length > 0) { 38 var slider = tns({ 39 container: '.tiny-single-item', 40 items: 1, 41 controls: false, 42 mouseDrag: true, 43 loop: true, 44 rewind: true, 45 autoplay: true, 46 autoplayButtonOutput: false, 47 autoplayTimeout: 3000, 48 navPosition: "bottom", 49 speed: 400, 50 gutter: 16, 51 }); 52}; 53 54if(document.getElementsByClassName('tiny-two-item').length > 0) { 55 var slider = tns({ 56 container: '.tiny-two-item', 57 controls: false, 58 mouseDrag: true, 59 loop: true, 60 rewind: true, 61 autoplay: true, 62 autoplayButtonOutput: false, 63 autoplayTimeout: 3000, 64 navPosition: "bottom", 65 speed: 400, 66 gutter: 12, 67 responsive: { 68 992: { 69 items: 2 70 }, 71 72 767: { 73 items: 2 74 }, 75 76 320: { 77 items: 1 78 }, 79 }, 80 }); 81}; 82 83if(document.getElementsByClassName('tiny-three-item').length > 0) { 84 var slider = tns({ 85 container: '.tiny-three-item', 86 controls: false, 87 mouseDrag: true, 88 loop: true, 89 rewind: true, 90 autoplay: true, 91 autoplayButtonOutput: false, 92 autoplayTimeout: 3000, 93 navPosition: "bottom", 94 speed: 400, 95 gutter: 12, 96 responsive: { 97 992: { 98 items: 3 99 }, 100 101 767: { 102 items: 2 103 }, 104 105 320: { 106 items: 1 107 }, 108 }, 109 }); 110}; 111 112if(document.getElementsByClassName('tiny-four-item').length > 0) { 113 var slider = tns({ 114 container: '.tiny-four-item', 115 controls: false, 116 mouseDrag: true, 117 loop: true, 118 rewind: true, 119 autoplay: true, 120 autoplayButtonOutput: false, 121 autoplayTimeout: 3000, 122 navPosition: "bottom", 123 speed: 400, 124 gutter: 12, 125 responsive: { 126 992: { 127 items: 4 128 }, 129 130 767: { 131 items: 2 132 }, 133 134 320: { 135 items: 1 136 }, 137 }, 138 }); 139}; 140 141 142 143if(document.getElementsByClassName('roadmaps').length > 0) { 144 var slider = tns({ 145 container: '.roadmaps', 146 controls: false, 147 mouseDrag: true, 148 loop: true, 149 rewind: true, 150 autoplay: true, 151 autoplayButtonOutput: false, 152 autoplayTimeout: 3000, 153 nav: false, 154 speed: 400, 155 gutter: 12, 156 responsive: { 157 992: { 158 items: 4 159 }, 160 161 767: { 162 items: 2 163 }, 164 165 320: { 166 items: 1 167 }, 168 }, 169 }); 170}; 171 172if(document.getElementsByClassName('tiny-six-item').length > 0) { 173 var slider = tns({ 174 container: '.tiny-six-item', 175 controls: false, 176 mouseDrag: true, 177 loop: true, 178 rewind: true, 179 autoplay: true, 180 autoplayButtonOutput: false, 181 autoplayTimeout: 3000, 182 navPosition: "bottom", 183 speed: 400, 184 gutter: 12, 185 responsive: { 186 992: { 187 items: 6 188 }, 189 190 767: { 191 items: 3 192 }, 193 194 320: { 195 items: 1 196 }, 197 }, 198 }); 199}; 200 201if(document.getElementsByClassName('tiny-ten-item').length > 0) { 202 var slider = tns({ 203 container: '.tiny-ten-item', 204 controls: true, 205 mouseDrag: true, 206 loop: true, 207 rewind: true, 208 autoplay: true, 209 autoplayButtonOutput: false, 210 autoplayTimeout: 3000, 211 navPosition: "bottom", 212 controlsText: ['<i class="mdi mdi-chevron-left "></i>', '<i class="mdi mdi-chevron-right"></i>'], 213 nav: false, 214 speed: 400, 215 gutter: 0, 216 responsive: { 217 1025: { 218 items: 10 219 }, 220 221 992: { 222 items: 8 223 }, 224 225 767: { 226 items: 6 227 }, 228 229 320: { 230 items: 2 231 }, 232 }, 233 }); 234}; 235 236if(document.getElementsByClassName('tiny-twelve-item').length > 0) { 237 var slider = tns({ 238 container: '.tiny-twelve-item', 239 controls: true, 240 mouseDrag: true, 241 loop: true, 242 rewind: true, 243 autoplay: true, 244 autoplayButtonOutput: false, 245 autoplayTimeout: 3000, 246 navPosition: "bottom", 247 controlsText: ['<i class="mdi mdi-chevron-left "></i>', '<i class="mdi mdi-chevron-right"></i>'], 248 nav: false, 249 speed: 400, 250 gutter: 0, 251 responsive: { 252 1025: { 253 items: 12 254 }, 255 256 992: { 257 items: 9 258 }, 259 260 767: { 261 items: 6 262 }, 263 264 320: { 265 items: 2 266 }, 267 }, 268 }); 269}; 270 271 272 273if(document.getElementsByClassName('tiny-five-item').length > 0) { 274 var slider = tns({ 275 container: '.tiny-five-item', 276 controls: true, 277 mouseDrag: true, 278 loop: true, 279 rewind: true, 280 autoplay: true, 281 autoplayButtonOutput: false, 282 autoplayTimeout: 3000, 283 navPosition: "bottom", 284 controlsText: ['<i class="mdi mdi-chevron-left "></i>', '<i class="mdi mdi-chevron-right"></i>'], 285 nav: false, 286 speed: 400, 287 gutter: 0, 288 responsive: { 289 1025: { 290 items: 5 291 }, 292 293 992: { 294 items: 4 295 }, 296 297 767: { 298 items: 3 299 }, 300 301 320: { 302 items: 2 303 }, 304 }, 305 }); 306}; 307 308//=========================================// 309/* 02) Swiper slider */ 310//=========================================// 311 312try { 313 var menu = []; 314 var interleaveOffset = 0.5; 315 var swiperOptions = { 316 loop: true, 317 speed: 1000, 318 parallax: true, 319 autoplay: { 320 delay: 6500, 321 disableOnInteraction: false, 322 }, 323 watchSlidesProgress: true, 324 pagination: { 325 el: '.swiper-pagination', 326 clickable: true, 327 renderBullet: function (index, className) { 328 return '<span class="' + className + '">' + 0 + (index + 1) + '</span>'; 329 }, 330 }, 331 332 navigation: { 333 nextEl: '.swiper-button-next', 334 prevEl: '.swiper-button-prev', 335 }, 336 337 on: { 338 progress: function () { 339 var swiper = this; 340 for (var i = 0; i < swiper.slides.length; i++) { 341 var slideProgress = swiper.slides[i].progress; 342 var innerOffset = swiper.width * interleaveOffset; 343 var innerTranslate = slideProgress * innerOffset; 344 swiper.slides[i].querySelector(".slide-inner").style.transform = 345 "translate3d(" + innerTranslate + "px, 0, 0)"; 346 } 347 }, 348 349 touchStart: function () { 350 var swiper = this; 351 for (var i = 0; i < swiper.slides.length; i++) { 352 swiper.slides[i].style.transition = ""; 353 } 354 }, 355 356 setTransition: function (speed) { 357 var swiper = this; 358 for (var i = 0; i < swiper.slides.length; i++) { 359 swiper.slides[i].style.transition = speed + "ms"; 360 swiper.slides[i].querySelector(".slide-inner").style.transition = 361 speed + "ms"; 362 } 363 } 364 } 365 }; 366 367 // DATA BACKGROUND IMAGE 368 var swiper = new Swiper(".swiper-container", swiperOptions); 369 370 let data = document.querySelectorAll(".slide-bg-image") 371 data.forEach((e) => { 372 e.style.backgroundImage = 373 `url(${e.getAttribute('data-background')})`; 374 }) 375} catch (err) { 376 377} 378 379//=========================================// 380/*/* 03) Countdown js */ 381//=========================================// 382 383try { 384 if(document.getElementById("days")){ 385 // The data/time we want to countdown to 386 var eventCountDown = new Date("December 25, 2024 16:37:52").getTime(); 387 388 // Run myfunc every second 389 var myfunc = setInterval(function () { 390 391 var now = new Date().getTime(); 392 var timeleft = eventCountDown - now; 393 394 // Calculating the days, hours, minutes and seconds left 395 var days = Math.floor(timeleft / (1000 * 60 * 60 * 24)); 396 var hours = Math.floor((timeleft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); 397 var minutes = Math.floor((timeleft % (1000 * 60 * 60)) / (1000 * 60)); 398 var seconds = Math.floor((timeleft % (1000 * 60)) / 1000); 399 400 // Result is output to the specific element 401 document.getElementById("days").innerHTML = days + "<p class='count-head'>Days</p> " 402 document.getElementById("hours").innerHTML = hours + "<p class='count-head'>Hours</p> " 403 document.getElementById("mins").innerHTML = minutes + "<p class='count-head'>Mins</p> " 404 document.getElementById("secs").innerHTML = seconds + "<p class='count-head'>Secs</p> " 405 406 // Display the message when countdown is over 407 if (timeleft < 0) { 408 clearInterval(myfunc); 409 document.getElementById("days").innerHTML = "" 410 document.getElementById("hours").innerHTML = "" 411 document.getElementById("mins").innerHTML = "" 412 document.getElementById("secs").innerHTML = "" 413 document.getElementById("end").innerHTML = "00:00:00:00"; 414 } 415 }, 1000); 416 } 417} catch (err) { 418 419} 420 421 422//=========================================// 423/*/* 04) Maintenance js */ 424//=========================================// 425 426try { 427 if(document.getElementById("maintenance")){ 428 var seconds = 3599; 429 function secondPassed() { 430 var minutes = Math.round((seconds - 30) / 60); 431 var remainingSeconds = seconds % 60; 432 if (remainingSeconds < 10) { 433 remainingSeconds = "0" + remainingSeconds; 434 } 435 document.getElementById('maintenance').innerHTML = minutes + ":" + remainingSeconds; 436 if (seconds == 0) { 437 clearInterval(countdownTimer); 438 document.getElementById('maintenance').innerHTML = "Buzz Buzz"; 439 } else { 440 seconds--; 441 } 442 } 443 var countdownTimer = setInterval('secondPassed()', 1000); 444 } 445} catch (err) { 446 447} 448 449//=========================================// 450/*/* 05) Data Counter */ 451//=========================================// 452 453try { 454 const counter = document.querySelectorAll('.counter-value'); 455 const speed = 2500; // The lower the slower 456 457 counter.forEach(counter_value => { 458 const updateCount = () => { 459 const target = +counter_value.getAttribute('data-target'); 460 const count = +counter_value.innerText; 461 462 // Lower inc to slow and higher to slow 463 var inc = target / speed; 464 465 if (inc < 1) { 466 inc = 1; 467 } 468 469 // Check if target is reached 470 if (count < target) { 471 // Add inc to count and output in counter_value 472 counter_value.innerText = (count + inc).toFixed(0); 473 // Call function every ms 474 setTimeout(updateCount, 1); 475 } else { 476 counter_value.innerText = target; 477 } 478 }; 479 480 updateCount(); 481 }); 482} catch (err) { 483 484} 485 486 487//=========================================// 488/*/* 06) Datepicker js*/ 489//=========================================// 490 491try { 492 const start = datepicker('.start', { id: 1 }) 493 const end = datepicker('.end', { id: 1 }) 494} catch (err) { 495 496} 497 498 499//=========================================// 500/*/* 07) Gallery filter js */ 501//=========================================// 502 503try { 504 var Shuffle = window.Shuffle; 505 506 class Demo { 507 constructor(element) { 508 if(element){ 509 this.element = element; 510 this.shuffle = new Shuffle(element, { 511 itemSelector: '.picture-item', 512 sizer: element.querySelector('.my-sizer-element'), 513 }); 514 515 // Log events. 516 this.addShuffleEventListeners(); 517 this._activeFilters = []; 518 this.addFilterButtons(); 519 } 520 } 521 522 /** 523 * Shuffle uses the CustomEvent constructor to dispatch events. You can listen 524 * for them like you normally would (with jQuery for example). 525 */ 526 addShuffleEventListeners() { 527 this.shuffle.on(Shuffle.EventType.LAYOUT, (data) => { 528 console.log('layout. data:', data); 529 }); 530 this.shuffle.on(Shuffle.EventType.REMOVED, (data) => { 531 console.log('removed. data:', data); 532 }); 533 } 534 535 addFilterButtons() { 536 const options = document.querySelector('.filter-options'); 537 if (!options) { 538 return; 539 } 540 541 const filterButtons = Array.from(options.children); 542 const onClick = this._handleFilterClick.bind(this); 543 filterButtons.forEach((button) => { 544 button.addEventListener('click', onClick, false); 545 }); 546 } 547 548 _handleFilterClick(evt) { 549 const btn = evt.currentTarget; 550 const isActive = btn.classList.contains('active'); 551 const btnGroup = btn.getAttribute('data-group'); 552 553 this._removeActiveClassFromChildren(btn.parentNode); 554 555 let filterGroup; 556 if (isActive) { 557 btn.classList.remove('active'); 558 filterGroup = Shuffle.ALL_ITEMS; 559 } else { 560 btn.classList.add('active'); 561 filterGroup = btnGroup; 562 } 563 564 this.shuffle.filter(filterGroup); 565 } 566 567 _removeActiveClassFromChildren(parent) { 568 const { children } = parent; 569 for (let i = children.length - 1; i >= 0; i--) { 570 children[i].classList.remove('active'); 571 } 572 } 573 } 574 575 document.addEventListener('DOMContentLoaded', () => { 576 window.demo = new Demo(document.getElementById('grid')); 577 }); 578} catch (err) { 579 580} 581 582 583//=========================================// 584/*/* 08) Tobii lightbox */ 585//=========================================// 586 587try { 588 const tobii = new Tobii() 589} catch (err) { 590 591} 592 593 594//=========================================// 595/*/* 09) CK Editor */ 596//=========================================// 597 598tr
598y { 599 ClassicEditor 600 .create(document.querySelector('#editor')) 601 .catch(error => { 602 console.error(error); 603 }); 604} catch(err) { 605 606} 607 608 609//=========================================// 610/*/* 10) Wow JS Animation */ 611//=========================================// 612try { 613 new WOW().init(); 614} catch (error) { 615 616} 617 618 619//=========================================// 620/*/* 11) Typed Text animation (animation) */ 621//=========================================// 622 623try { 624 var TxtType = function (el, toRotate, period) { 625 this.toRotate = toRotate; 626 this.el = el; 627 this.loopNum = 0; 628 this.period = parseInt(period, 10) || 2000; 629 this.txt = ''; 630 this.tick(); 631 this.isDeleting = false; 632 }; 633 634 TxtType.prototype.tick = function () { 635 var i = this.loopNum % this.toRotate.length; 636 var fullTxt = this.toRotate[i]; 637 if (this.isDeleting) { 638 this.txt = fullTxt.substring(0, this.txt.length - 1); 639 } else { 640 this.txt = fullTxt.substring(0, this.txt.length + 1); 641 } 642 this.el.innerHTML = '<span class="wrap">' + this.txt + '</span>'; 643 var that = this; 644 var delta = 200 - Math.random() * 100; 645 if (this.isDeleting) { delta /= 2; } 646 if (!this.isDeleting && this.txt === fullTxt) { 647 delta = this.period; 648 this.isDeleting = true; 649 } else if (this.isDeleting && this.txt === '') { 650 this.isDeleting = false; 651 this.loopNum++; 652 delta = 500; 653 } 654 setTimeout(function () { 655 that.tick(); 656 }, delta); 657 }; 658 659 function typewrite() { 660 if (toRotate === 'undefined') { 661 changeText() 662 } 663 else 664 var elements = document.getElementsByClassName('typewrite'); 665 for (var i = 0; i < elements.length; i++) { 666 var toRotate = elements[i].getAttribute('data-type'); 667 var period = elements[i].getAttribute('data-period'); 668 if (toRotate) { 669 new TxtType(elements[i], JSON.parse(toRotate), period); 670 } 671 } 672 // INJECT CSS 673 var css = document.createElement("style"); 674 css.type = "text/css"; 675 css.innerHTML = ".typewrite > .wrap { border-right: 0.08em solid transparent}"; 676 document.body.appendChild(css); 677 }; 678 window.onload(typewrite()); 679} catch(err) { 680 681} 682 683 684//=========================================// 685/*/* 12) Validation Shop Checkouts */ 686//=========================================// 687 688(function () { 689 'use strict' 690 691 if(document.getElementsByClassName('needs-validation').length > 0) { 692 // Fetch all the forms we want to apply custom Bootstrap validation styles to 693 var forms = document.querySelectorAll('.needs-validation') 694 695 // Loop over them and prevent submission 696 Array.prototype.slice.call(forms) 697 .forEach(function (form) { 698 form.addEventListener('submit', function (event) { 699 if (!form.checkValidity()) { 700 event.preventDefault() 701 event.stopPropagation() 702 } 703 704 form.classList.add('was-validated') 705 }, false) 706 }) 707 } 708})() 709 710 711//=========================================// 712/*/* 13) Switcher Pricing Plans */ 713//=========================================// 714try { 715 var e = document.getElementById("filt-monthly"), 716 d = document.getElementById("filt-yearly"), 717 t = document.getElementById("switcher"), 718 m = document.getElementById("monthly"), 719 y = document.getElementById("yearly"); 720 721 e.addEventListener("click", function(){ 722 t.checked = false; 723 e.classList.add("toggler--is-active"); 724 d.classList.remove("toggler--is-active"); 725 m.classList.remove("hide"); 726 y.classList.add("hide"); 727 }); 728 729 d.addEventListener("click", function(){ 730 t.checked = true; 731 d.classList.add("toggler--is-active"); 732 e.classList.remove("toggler--is-active"); 733 m.classList.add("hide"); 734 y.classList.remove("hide"); 735 }); 736 737 t.addEventListener("click", function(){ 738 d.classList.toggle("toggler--is-active"); 739 e.classList.toggle("toggler--is-active"); 740 m.classList.toggle("hide"); 741 y.classList.toggle("hide"); 742 }) 743} catch(err) { 744 745} 746 747//=========================================// 748/*/* 14) Cookies Policy */ 749//=========================================// 750 751try { 752 /* common fuctions */ 753 function el(selector) { return document.querySelector(selector) } 754 function els(selector) { return document.querySelectorAll(selector) } 755 function on(selector, event, action) { els(selector).forEach(e => e.addEventListener(event, action)) } 756 function cookie(name) { 757 let c = document.cookie.split('; ').find(cookie => cookie && cookie.startsWith(name+'=')) 758 return c ? c.split('=')[1] : false; 759 } 760 761 /* popup button hanler */ 762 on('.cookie-popup button', 'click', () => { 763 el('.cookie-popup').classList.add('cookie-popup-accepted'); 764 document.cookie = `cookie-accepted=true` 765 }); 766 767 /* popup init hanler */ 768 if (cookie('cookie-accepted') !== "true") { 769 el('.cookie-popup').classList.add('cookie-popup-not-accepted'); 770 } 771} catch (error) { 772 773} 774 775//=========================================// 776/*/* 15) Back Button */ 777//=========================================// 778document.getElementsByClassName("back-button")[0]?.addEventListener("click", (e)=>{ 779 if (document.referrer !== "") { 780 e.preventDefault(); 781 window.location.href = document.referrer; 782 } 783}) 784 785 786//=========================================// 787/* 16) Particles */ 788//=========================================// 789 790try { 791 particlesJS("particles-snow", { 792 "particles": { 793 "number": { 794 "value": 250, 795 "density": { 796 "enable": false, 797 "value_area": 800 798 } 799 }, 800 "color": { 801 "value": "#ffffff" 802 }, 803 "shape": { 804 "type": "circle", 805 "stroke": { 806 "width": 0, 807 "color": "#000000" 808 }, 809 "polygon": { 810 "nb_sides": 36 811 }, 812 "image": { 813 "src": "", 814 "width": 1000, 815 "height": 1000 816 } 817 }, 818 "opacity": { 819 "value": 0.5, 820 "random": false, 821 "anim": { 822 "enable": false, 823 "speed": 0.5, 824 "opacity_min": 1, 825 "sync": false 826 } 827 }, 828 "size": { 829 "value": 3.2, 830 "random": true, 831 "anim": { 832 "enable": false, 833 "speed": 20, 834 "size_min": 0.1, 835 "sync": false 836 } 837 }, 838 "line_linked": { 839 "enable": false, 840 "distance": 100, 841 "color": "#ffffff", 842 "opacity": 0.4, 843 "width": 2 844 }, 845 "move": { 846 "enable": true, 847 "speed": 1, 848 "direction": "bottom", 849 "random": false, 850 "straight": false, 851 "out_mode": "out", 852 "bounce": false, 853 "attract": { 854 "enable": false, 855 "rotateX": 800, 856 "rotateY": 1200 857 } 858 } 859 }, 860 "interactivity": { 861 "detect_on": "canvas", 862 "events": { 863 "onhover": { 864 "enable": false, 865 "mode": "repulse" 866 }, 867 "onclick": { 868 "enable": false, 869 "mode": "push" 870 }, 871 "resize": true 872 }, 873 "modes": { 874 "grab": { 875 "distance": 200, 876 "line_linked": { 877 "opacity": 1 878 } 879 }, 880 "bubble": { 881 "distance": 400, 882 "size": 40, 883 "duration": 2, 884 "opacity": 8, 885 "speed": 3 886 }, 887 "repulse": { 888 "distance": 71, 889 "duration": 0.4 890 }, 891 "push": { 892 "particles_nb": 4 893 }, 894 "remove": { 895 "particles_nb": 2 896 } 897 } 898 }, 899 "retina_detect": true 900 }); 901} catch (error) { 902 903} 904 905//=========================================// 906/* 17) ApexCharts */ 907//=========================================// 908//Chart 1 909try { 910 var options = { 911 series: [{ 912 data: [20, 45, 40, 64, 35, 25, 35] 913 }], 914 chart: { 915 type: 'area', 916 height: 90, 917 width: '100%', 918 sparkline: { 919 enabled: true 920 } 921 }, 922 stroke: { 923 curve: 'smooth', 924 width: 3, 925 }, 926 colors: ['#52cc99'], 927 fill: { 928 type: 'gradient', 929 gradient: { 930 shadeIntensity: 1, 931 inverseColors: false, 932 opacityFrom: 0.45, 933 opacityTo: 0.05, 934 stops: [20, 100, 100, 100] 935 }, 936 }, 937 tooltip: { 938 fixed: { 939 enabled: false 940 }, 941 x: { 942 show: false 943 }, 944 y: { 945 title: { 946 formatter: function (seriesName) { 947 return '' 948 } 949 } 950 }, 951 marker: { 952 show: false 953 } 954 } 955 }; 956
957 var chart = new ApexCharts(document.querySelector("#chart-1"), options); 958 chart.render(); 959 960 961} catch (error) { 962 963} 964 965 966 967//chart 2 968 try { 969 var options = { 970 series: [{ 971 data: [10, 25, 30, 54, 45, 39, 15] 972 }], 973 chart: { 974 type: 'area', 975 height: 90, 976 width: '100%', 977 sparkline: { 978 enabled: true 979 } 980 }, 981 stroke: { 982 curve: 'smooth', 983 width: 3, 984 }, 985 colors: ['#ff6647'], 986 fill: { 987 type: 'gradient', 988 gradient: { 989 shadeIntensity: 1, 990 inverseColors: false, 991 opacityFrom: 0.45, 992 opacityTo: 0.05, 993 stops: [20, 100, 100, 100] 994 }, 995 }, 996 tooltip: { 997 fixed: { 998 enabled: false 999 }, 1000 x: { 1001 show: false 1002 }, 1003 y: { 1004 title: { 1005 formatter: function (seriesName) { 1006 return '' 1007 } 1008 } 1009 }, 1010 marker: { 1011 show: false 1012 } 1013 } 1014 }; 1015 1016 var chart = new ApexCharts(document.querySelector("#chart-2"), options); 1017 chart.render(); 1018 1019} catch (error) { 1020 1021} 1022 1023 1024//Chart 3 1025try { 1026 var options = { 1027 series: [{ 1028 data: [15, 20, 10, 45, 20, 10, 5] 1029 }], 1030 chart: { 1031 type: 'area', 1032 height: 90, 1033 width: '100%', 1034 sparkline: { 1035 enabled: true 1036 } 1037 }, 1038 stroke: { 1039 curve: 'smooth', 1040 width: 3, 1041 }, 1042 colors: ['#52cc99'], 1043 fill: { 1044 type: 'gradient', 1045 gradient: { 1046 shadeIntensity: 1, 1047 inverseColors: false, 1048 opacityFrom: 0.45, 1049 opacityTo: 0.05, 1050 stops: [20, 100, 100, 100] 1051 }, 1052 }, 1053 tooltip: { 1054 fixed: { 1055 enabled: false 1056 }, 1057 x: { 1058 show: false 1059 }, 1060 y: { 1061 title: { 1062 formatter: function (seriesName) { 1063 return '' 1064 } 1065 } 1066 }, 1067 marker: { 1068 show: false 1069 } 1070 } 1071 }; 1072 1073 var chart = new ApexCharts(document.querySelector("#chart-3"), options); 1074 chart.render(); 1075 1076} catch (error) { 1077 1078} 1079 1080 1081//Chart 4 1082try { 1083 var options = { 1084 series: [{ 1085 data: [3, 5, 7, 11, 8, 5, 7] 1086 }], 1087 chart: { 1088 type: 'area', 1089 height: 90, 1090 width: '100%', 1091 sparkline: { 1092 enabled: true 1093 } 1094 }, 1095 stroke: { 1096 curve: 'smooth', 1097 width: 3, 1098 }, 1099 colors: ['#ff6647'], 1100 fill: { 1101 type: 'gradient', 1102 gradient: { 1103 shadeIntensity: 1, 1104 inverseColors: false, 1105 opacityFrom: 0.45, 1106 opacityTo: 0.05, 1107 stops: [20, 100, 100, 100] 1108 }, 1109 }, 1110 tooltip: { 1111 fixed: { 1112 enabled: false 1113 }, 1114 x: { 1115 show: false 1116 }, 1117 y: { 1118 title: { 1119 formatter: function (seriesName) { 1120 return '' 1121 } 1122 } 1123 }, 1124 marker: { 1125 show: false 1126 } 1127 } 1128 }; 1129 1130 var chart = new ApexCharts(document.querySelector("#chart-4"), options); 1131 chart.render(); 1132 1133} catch (error) { 1134 1135} 1136 1137//=========================================// 1138/* 18) Switcher JS */ 1139//=========================================// 1140 1141try { 1142 function setTheme(theme) { 1143 let bootstarpHref; 1144 let styleHref; 1145 let color = ''; 1146 if(window.theme) 1147 color = '-'+window.theme; 1148 switch (theme) { 1149 case "style-dark": 1150 bootstarpHref = "assets/css/bootstrap-dark"+color+".min.css" 1151 styleHref = "assets/css/style-dark"+color+".min.css" 1152 break; 1153 case "style-rtl": 1154 bootstarpHref = "assets/css/bootstrap"+color+"-rtl.min.css" 1155 styleHref = "assets/css/style"+color+"-rtl.min.css" 1156 break; 1157 case "style-dark-rtl": 1158 bootstarpHref = "assets/css/bootstrap-dark"+color+"-rtl.min.css" 1159 styleHref = "assets/css/style-dark"+color+"-rtl.min.css" 1160 break; 1161 1162 default: 1163 bootstarpHref = "assets/css/bootstrap"+color+".min.css" 1164 styleHref = "assets/css/style"+color+".min.css" 1165 break; 1166 } 1167 1168 if(theme === "style-rtl" || theme === "style-dark-rtl" ) document.getElementsByTagName("html")[0].dir = "rtl" 1169 else document.getElementsByTagName("html")[0].dir = "ltr" 1170 1171 document.getElementsByClassName('theme-opt')[0].href =bootstarpHref 1172 document.getElementsByClassName('theme-opt')[1].href =styleHref 1173 }; 1174 1175 function setColor(theme) { 1176 window.theme = theme; 1177 document.getElementById('bootstrap-style').href = 'assets/css/bootstrap-' + theme + '.min.css'; 1178 document.getElementById('color-opt').href = 'assets/css/style-' + theme + '.min.css'; 1179 }; 1180 1181 function setColorPrimary() { 1182 window.theme = null; 1183 document.getElementById('bootstrap-style').href = 'assets/css/bootstrap.min.css'; 1184 document.getElementById('color-opt').href = 'assets/css/style.min.css'; 1185 }; 1186 1187} catch (error) { 1188 1189} 1190 1191 1192
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.