{"version":3,"sources":["main.js"],"names":["height","el","$","each","thisHeight","this","setTimeout","window","on","delay","fadeOut","document","ready","setBackgroundElement","mappingMenu","menuMobile","toggleSearch","scrollToSection","swiperInit","skillProgess","lazyloadFun","serviceDetailTrigger","countdown","backToTop","showNewsList","header","scrollActive","scrollTop","addClass","removeClass","background","attr","css","background-image","background-size","background-position","background-repeat","mapping","mobileWrapper","mobileMethod","desktopWrapper","desktopMethod","breakpoint","hambuger","menuMB","searchBox","toggleClass","hasClass","button","close","Swiper","loop","autoplay","waitForTransition","disableOnInteraction","slidesPerColumnFill","watchSlidesProgress","watchSlidesVisibility","pagination","type","navigation","nextEl","prevEl","init","eq","slideChangeTransitionStart","slideChangeTransitionEnd","slidesPerView","spaceBetween","speed","breakpoints","576","768","1024","dataSkill","data","customCursor","follower","mouseX","mouseY","positionElement","getElementById","event","clientX","clientY","mouse","x","y","style","top","left","onmousemove","_event","animate","length","birthday","getAttribute","countDown","Date","getTime","setInterval","now","distance","innerText","Math","floor","hour","minute","second","content","display","clearInterval","elemHeader","outerHeight","e","preventDefault","hash","offset","toggleContentAbout","buttonLess","index","i","loadMore","slice","slideDown","hide","pictureObserver","lozad","threshold","observer","enableAutoReload","load","src","backgroundObserver","observe","trigger","getDataUrl","location","history","pushState","path","scrollDistance","section1","position"],"mappings":"AAAA,aAyCA,SAASA,OAAOC,GACf,IAAID,EAAS,EACbE,EAAED,GAAIE,KAAK,WACV,IAAIC,EAAaF,EAAEG,MAAML,SACrBI,EAAaJ,IAChBA,EAASI,GAEVE,WAAW,WACVJ,EAAED,GAAID,OAAOA,IACX,OAlDLE,EAAEK,QAAQC,GAAG,OAAQ,WACpBN,EAAE,6CAA6CO,MAAM,KAAKC,QAAQ,UAInER,EAAES,UAAUC,MAAM,WACjBC,uBAGAC,cACAC,aACAC,eACAC,kBAGAC,aAGAC,eACAC,cACAC,uBAIAC,YAEAC,YAGAC,iBAGDtB,EAAES,UAAUH,GAAG,SAAU,WACxBiB,OAAOC,eACHx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KAAK,SAAUsH,GAC3BvH,EAAEG,MAAM0I,WAAWtD,IAAMuB,EAAa,GAAK6B,IAC9C3I,EAAE,+BAA+B2B,YAAY,UAC7C3B,EAAE,wBAAwB8D,GAAGyD,GAAG7F,SAAS,aAI3C1B,EAAE,wBAAwB2B,YAAY","file":"main.min.js","sourcesContent":["$(window).on('load', function () {\n\t$(\".preloader-default-area, .preloader-bchat\").delay(500).fadeOut(\"slow\");\n});\n\n\n$(document).ready(function () {\n\tsetBackgroundElement();\n\n\t// header\n\tmappingMenu();\n\tmenuMobile();\n\ttoggleSearch();\n\tscrollToSection();\n\n\t// swiper\n\tswiperInit();\n\n\t// skill progess bar \n\tskillProgess();\n\tlazyloadFun();\n\tserviceDetailTrigger();\n\t// customCursor();\n\n\t// countdown\n\tcountdown();\n\n\tbackToTop();\n\n\t// toggleContentAbout();\n\tshowNewsList();\n})\n\n$(document).on('scroll', function () {\n\theader.scrollActive();\n\tif ($(window).scrollTop() > 500) {\n\t\t$('footer .scroll-top').addClass('active')\n\t} else {\n\t\t$('footer .scroll-top').removeClass('active')\n\t}\n})\n\nfunction height(el) {\n\tvar height = 0;\n\t$(el).each(function () {\n\t\tvar thisHeight = $(this).height();\n\t\tif (thisHeight > height) {\n\t\t\theight = thisHeight;\n\t\t}\n\t\tsetTimeout(() => {\n\t\t\t$(el).height(height)\n\t\t}, 100)\n\t})\n}\nlet header = {\n\tscrollActive: function () {\n\t\tlet height = $('header').height()\n\t\tif ($(window).scrollTop() > height) {\n\t\t\t$('header').addClass('active').addClass('bg-black')\n\t\t} else {\n\t\t\t$('header').removeClass('active').removeClass('bg-black')\n\t\t}\n\t},\n}\n\nfunction setBackgroundElement() {\n\t$('[setBackground]').each(function () {\n\t\tvar background = $(this).attr('setBackground')\n\t\t$(this).css({\n\t\t\t\"background-image\": \"url(\" + background + \")\",\n\t\t\t\"background-size\": \"cover\",\n\t\t\t\"background-position\": \"center center\"\n\t\t})\n\t})\n\t$('[setBackgroundRepeat]').each(function () {\n\t\tvar background = $(this).attr('setBackgroundRepeat')\n\t\t$(this).css({\n\t\t\t\"background-image\": \"url(\" + background + \")\",\n\t\t\t\"background-repeat\": \"repeat\"\n\t\t})\n\t})\n}\n\nfunction mappingMenu() {\n\t$('header .list-menu').mapping({\n\t\tmobileWrapper: 'header .mobile-wrap',\n\t\tmobileMethod: 'appendTo',\n\t\tdesktopWrapper: 'header .main-menu',\n\t\tdesktopMethod: 'appendTo',\n\t\tbreakpoint: 1024\n\t})\n}\n\nfunction menuMobile() {\n\tlet hambuger = $('.burger-bt-inner')\n\tlet menuMB = $('.mobile-wrap')\n\tlet header = $('header')\n\tlet searchBox = $('.searchbox-wrap')\n\thambuger.on('click', function () {\n\t\t$(this).toggleClass('active');\n\t\tmenuMB.toggleClass('active');\n\t\thambuger.hasClass('active') ? header.addClass('bg-black') : header.removeClass('bg-black');\n\t\tsearchBox.removeClass('active');\n\t})\n}\n\nfunction toggleSearch() {\n\tlet button = $('header .button-search')\n\tlet searchBox = $('.searchbox-wrap')\n\tlet close = $('.searchbox-wrap .button-close')\n\tlet hambuger = $('.burger-bt-inner')\n\tlet menuMB = $('.mobile-wrap')\n\tbutton.on('click', function () {\n\t\tsearchBox.toggleClass('active');\n\t\thambuger.removeClass('active');\n\t\tmenuMB.removeClass('active');\n\t})\n\tclose.on('click', function () {\n\t\tsearchBox.toggleClass('active');\n\t})\n\n}\n\nfunction swiperInit() {\n\tvar homeBanner = new Swiper('.home-banner .swiper-container', {\n\t\tloop: true,\n\t\tautoplay: {\n\t\t\tdelay: 5000,\n\t\t\twaitForTransition: true,\n\t\t\tdisableOnInteraction: false,\n\t\t},\n\n\t\tslidesPerColumnFill: \"row\",\n\t\twatchSlidesProgress: true,\n\t\twatchSlidesVisibility: true,\n\t\tpagination: {\n\t\t\tel: '.home-banner .main-pagination',\n\t\t\ttype: 'fraction',\n\t\t},\n\t\tnavigation: {\n\t\t\tnextEl: '.home-banner .button-next',\n\t\t\tprevEl: '.home-banner .button-prev'\n\t\t},\n\t\ton: {\n\t\t\tinit: function () {\n\t\t\t $(\".main-progress\").removeClass(\"animate\");\n\t\t\t $(\".main-progress\").removeClass(\"active\");\n\t\t\t $(\".main-progress\").eq(0).addClass(\"animate\");\n\t\t\t $(\".main-progress\").eq(0).addClass(\"active\");\n\t\t\t},\n\t\t\tslideChangeTransitionStart: function () {\n\t\t\t $(\".main-progress\").removeClass(\"animate\");\n\t\t\t $(\".main-progress\").removeClass(\"active\");\n\t\t\t $(\".main-progress\").eq(0).addClass(\"active\");\n\t\t\t},\n\t\t\tslideChangeTransitionEnd: function () {\n\t\t\t $(\".main-progress\").eq(0).addClass(\"animate\");\n\t\t\t}\n\t\t }\n\t});\n\tvar ourTeamSlide = new Swiper('.bchat-about-team .swiper-container', {\n\t\tslidesPerView: 1,\n\t\tspaceBetween: 30,\n\t\tloop: true,\n\t\tspeed: 1000,\n\t\tslidesPerColumnFill: \"row\",\n\t\tnavigation: {\n\t\t\tnextEl: '.bchat-about-team .button-next',\n\t\t\tprevEl: '.bchat-about-team .button-prev'\n\t\t},\n\t\tbreakpoints: {\n\t\t\t576: {\n\t\t\t\tslidesPerView: 2,\n\t\t\t},\n\t\t\t768: {\n\t\t\t\tslidesPerView: 3,\n\t\t\t},\n\t\t\t1024: {\n\t\t\t\tslidesPerView: 4,\n\t\t\t}\n\t\t}\n\t});\n\tvar testimonialSlide = new Swiper('.bchat-about-testimonials .swiper-container', {\n\t\tslidesPerView: 1,\n\t\tspaceBetween: 30,\n\t\tloop: true,\n\t\tspeed: 1000,\n\t\tslidesPerColumnFill: \"row\",\n\t\tnavigation: {\n\t\t\tnextEl: '.bchat-about-testimonials .button-next',\n\t\t\tprevEl: '.bchat-about-testimonials .button-prev'\n\t\t},\n\t\tbreakpoints: {\n\t\t\t576: {\n\t\t\t\tslidesPerView: 2,\n\t\t\t},\n\t\t\t768: {\n\t\t\t\tslidesPerView: 3,\n\t\t\t}\n\t\t}\n\t});\n\tvar ourPartnerSlide = new Swiper('.bchat-about-our-partners .swiper-container', {\n\t\tslidesPerView: 2,\n\t\tspaceBetween: 30,\n\t\tloop: true,\n\t\tspeed: 1000,\n\t\tslidesPerColumnFill: \"row\",\n\t\tnavigation: {\n\t\t\tnextEl: '.bchat-about-our-partners .button-next',\n\t\t\tprevEl: '.bchat-about-our-partners .button-prev'\n\t\t},\n\t\tbreakpoints: {\n\t\t\t576: {\n\t\t\t\tslidesPerView: 3,\n\t\t\t},\n\t\t\t768: {\n\t\t\t\tslidesPerView: 4,\n\t\t\t},\n\t\t\t1024: {\n\t\t\t\tslidesPerView: 5,\n\t\t\t}\n\t\t}\n\t});\n\tvar serviceOtherSlide = new Swiper('.service-detail .swiper-container', {\n\t\tslidesPerView: 1,\n\t\tspaceBetween: 30,\n\t\tloop: true,\n\t\tspeed: 1000,\n\t\tslidesPerColumnFill: \"row\",\n\t\tnavigation: {\n\t\t\tnextEl: '.service-detail .button-next',\n\t\t\tprevEl: '.service-detail .button-prev'\n\t\t},\n\t\tbreakpoints: {\n\t\t\t576: {\n\t\t\t\tslidesPerView: 2,\n\t\t\t},\n\t\t\t768: {\n\t\t\t\tslidesPerView: 3,\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction skillProgess() {\n\tlet elem = $('[data-skill]')\n\telem.each(function () {\n\t\tlet dataSkill = $(this).data('skill')\n\t\t// console.log(dataSkill);\n\t\t$(this).css('width', dataSkill + '%')\n\t})\n}\n\nfunction customCursor() {\n\tvar follower, init, mouseX, mouseY, positionElement, timer;\n\n\tfollower = document.getElementById('cursor');\n\n\tmouseX = (function (_this) {\n\t\treturn function (event) {\n\t\t\treturn event.clientX;\n\t\t};\n\t})(this);\n\n\tmouseY = (function (_this) {\n\t\treturn function (event) {\n\t\t\treturn event.clientY;\n\t\t};\n\t})(this);\n\n\tpositionElement = (function (_this) {\n\t\treturn function (event) {\n\t\t\tvar mouse;\n\t\t\tmouse = {\n\t\t\t\tx: mouseX(event),\n\t\t\t\ty: mouseY(event)\n\t\t\t};\n\t\t\tfollower.style.top = mouse.y + 'px';\n\t\t\treturn follower.style.left = mouse.x + 'px';\n\t\t};\n\t})(this);\n\n\ttimer = false;\n\n\twindow.onmousemove = init = (function (_this) {\n\t\treturn function (event) {\n\t\t\tvar _event;\n\t\t\t_event = event;\n\t\t\treturn timer = setTimeout(function () {\n\t\t\t\treturn positionElement(_event);\n\t\t\t}, 1);\n\t\t};\n\t})(this);\n\n}\n\nfunction backToTop() {\n\tlet elem = $('footer .scroll-top')\n\telem.on('click', function () {\n\t\t$('html, body').animate({\n\t\t\tscrollTop: 0,\n\t\t}, 1000)\n\t})\n}\n\nfunction countdown() {\n\tif($('#countdown').length == 1){\n\n\t\tconst second = 1000,\n\t\t\tminute = second * 60,\n\t\t\thour = minute * 60,\n\t\t\tday = hour * 24;\n\t\n\t\tlet birthday = document.getElementById(\"countdown\").getAttribute('data-countdown');\n\t\t// console.log(birthday);\n\t\tlet countDown = new Date(birthday).getTime(),\n\t\t\tx = setInterval(function () {\n\t\t\t\tlet now = new Date().getTime(),\n\t\t\t\t\tdistance = countDown - now;\n\t\n\t\t\t\tdocument.getElementById(\"days\").innerText = Math.floor(distance / (day)),\n\t\t\t\tdocument.getElementById(\"hours\").innerText = Math.floor((distance % (day)) / (hour)),\n\t\t\t\tdocument.getElementById(\"minutes\").innerText = Math.floor((distance % (hour)) / (minute)),\n\t\t\t\tdocument.getElementById(\"seconds\").innerText = Math.floor((distance % (minute)) / second);\n\t\n\t\t\t\t//do something later when date is reached\n\t\t\t\tif (distance < 0) {\n\t\t\t\t\tlet countdown = document.getElementById(\"countdown\"),\n\t\t\t\t\t\tcontent = document.getElementById(\"content\");\n\t\t\t\t\tcountdown.style.display = \"none\";\n\t\t\t\t\tcontent.style.display = \"block\";\n\t\n\t\t\t\t\tclearInterval(x);\n\t\t\t\t}\n\t\t\t}, 0)\n\t}\n}\n\nfunction scrollToSection(){\n\n\tlet elemHeader = $('header').outerHeight();\n\tlet elemLink = $('.about-page header .list-menu li.to-section .click-to-section li a');\n\telemLink.on('click', function(e){\n\t\te.preventDefault();\n\t\tvar hash = this.hash;\n\t\t$('html, body').animate({\n\t\t\tscrollTop: $(hash).offset().top - elemHeader\n\t\t}, 1000);\n\t})\n\t\n}\n\nfunction toggleContentAbout(){\n\tlet button = $('.home-about .full-content .detail .show-more')\n\tlet buttonLess = $('.home-about .full-content .detail .show-less')\n\tlet content = $('.home-about .full-content .content')\n\tbutton.on('click', function(e){\n\t\te.preventDefault();\n\t\tcontent.toggleClass('active');\n\t\t$(this).removeClass('active');\n\t\tbuttonLess.addClass('active');\n\t})\n\tbuttonLess.on('click', function(e){\n\t\te.preventDefault();\n\t\tcontent.toggleClass('active');\n\t\t$(this).removeClass('active');\n\t\tbutton.addClass('active');\n\t})\n\tif(button.length < 1){\n\t\tcontent.addClass('show-fullcontent');\n\t}\n}\n\nfunction showNewsList(){\n\t$('.bchat-gallery .tabslet-content').each(function(index){\n\t\tlet i = index + 1;\n\t\tlet loadMore = $('.bchat-gallery .tabslet-content:nth-child('+i+') .load-more a.btn-view');\n\t\tlet newsHidden = $('.bchat-gallery .tabslet-content:nth-child('+i+') .news-list-show-item:hidden')\n\t\tloadMore.on('click', function (e) {\n\t\t\te.preventDefault();\n\t\t\t$('.bchat-gallery .tabslet-content:nth-child('+i+') .news-list-show-item:hidden').slice(0, 3).slideDown();\n\t\t\tif($('.bchat-gallery .tabslet-content:nth-child('+i+') .news-list-show-item:hidden').length <= 0) {\n\t\t\t\tloadMore.hide();\n\t\t\t}\n\t\t});\n\t})\n}\n\n\nfunction lazyloadFun() {\n\tvar pictureObserver = lozad(\".lozad-picture\", {\n\t\tthreshold: 0.1,\n\t});\n\n\tvar observer = lozad(\".lozad\", {\n\t\tthreshold: 0.1,\n\t\tenableAutoReload: true,\n\t\tload: function (el) {\n\t\t\tel.src = el.getAttribute(\"data-src\");\n\t\t},\n\t});\n\tvar backgroundObserver = lozad(\".lozad-background\", {\n\t\tthreshold: 0.1,\n\t});\n\n\tpictureObserver.observe();\n\tobserver.observe();\n\tbackgroundObserver.observe();\n}\n\nfunction serviceDetailTrigger(){\n\n\t// page service\n\tif($('.service-detail-page .tabslet-tab li.active').length>1){\n\t\t// console.log($('.service-detail-page .tabslet-tab li.active'));\n\t\t$('.service-detail-page .tabslet-tab li:first-child').removeClass('active')\n\t\t$('.service-detail-page .tabslet-content:first-child').removeClass('active')\n\t\t$('.service-detail-page .tabslet-tab li.active').trigger('click')\n\t}\n\t\n\tif($('.service-detail-page .tabslet-tab li').length>0){\n\t\t$('.service-detail-page .tabslet-tab li a').on('click', function(){\n\t\t\tlet getDataUrl = $(this).data('url');\n\t\t\t// window.location(getDataUrl);\n\t\t\t// window.location = getDataUrl;\n\t\t\tif (getDataUrl != window.location) {\n\t\t\t\twindow.history.pushState({ path: getDataUrl }, \"\", getDataUrl);\n\t\t\t}\n\t\t})\n\t}\n\t// page gallery\n\tif($('.gallery-detail-page .tabslet-tab li.active').length>1){\n\t\t// console.log($('.gallery-detail-page .tabslet-tab li.active'));\n\t\t$('.gallery-detail-page .tabslet-tab li:first-child').removeClass('active')\n\t\t$('.gallery-detail-page .tabslet-content:first-child').removeClass('active')\n\t\t$('.gallery-detail-page .tabslet-tab li.active').trigger('click')\n\t}\n\tif($('.gallery-detail-page .tabslet-tab li').length>0){\n\t\t$('.gallery-detail-page .tabslet-tab li a').on('click', function(){\n\t\t\tlet getDataUrl = $(this).data('url');\n\t\t\t// window.location(getDataUrl);\n\t\t\t// window.location = getDataUrl;\n\t\t\tif (getDataUrl != window.location) {\n\t\t\t\twindow.history.pushState({ path: getDataUrl }, \"\", getDataUrl);\n\t\t\t}\n\t\t})\n\t}\n}\n\n$(window).on('scroll', function () {\n\tif($('.about-page').length == 1){\n\t\tvar scrollDistance = $(window).scrollTop();\n\t\tlet elemHeader = $('header').outerHeight();\n\t\tlet section1 = $(\"section[id='section-1']\").position().top;\n\t\tif((scrollDistance + elemHeader) >= section1){\n\t\t\t$(\"section[id]\").each(function (i) {\n\t\t\t\tif ($(this).position().top - elemHeader - 1 <= scrollDistance) {\n\t\t\t\t\t$(\"header .menu-list li.active\").removeClass(\"active\");\n\t\t\t\t\t$(\"header .menu-list li\").eq(i).addClass(\"active\");\n\t\t\t\t}\n\t\t\t});\n\t\t}else{\n\t\t\t$(\"header .menu-list li\").removeClass(\"active\");\n\t\t}\n\t}\n});\n"]}