{"version":3,"sources":["utils.js","detector.js","bootstrap-navbar.js","scroll-to-top.js","theme.js"],"names":["docReady","fn","document","readyState","addEventListener","setTimeout","resize","window","isIterableArray","array","Array","isArray","length","camelize","str","text","replace","_","c","toUpperCase","concat","substr","toLowerCase","getData","el","data","JSON","parse","dataset","e","hexToRgb","hexValue","hex","indexOf","substring","result","exec","m","r","g","b","parseInt","rgbaColor","color","arguments","undefined","alpha","colors","primary","secondary","success","info","warning","danger","light","dark","grays","white","100","200","300","400","500","600","700","800","900","1000","1100","black","hasClass","className","classList","value","includes","addClass","add","getOffset","rect","getBoundingClientRect","scrollLeft","pageXOffset","documentElement","scrollTop","pageYOffset","top","left","isScrolledIntoView","offsetTop","offsetLeft","width","offsetWidth","height","offsetHeight","offsetParent","all","innerHeight","innerWidth","partial","breakpoints","xs","sm","md","lg","xl","xxl","getBreakpoint","breakpoint","classes","split","filter","cls","pop","setCookie","name","expire","expires","Date","setTime","getTime","cookie","toUTCString","getCookie","keyValue","match","settings","tinymce","theme","chart","borderColor","newChart","config","ctx","getContext","Chart","getItemFromStore","key","defaultValue","store","localStorage","getItem","_unused","setItemToStore","payload","setItem","getStoreSpace","parseFloat","escape","encodeURIComponent","stringify","toFixed","utils","detectorInit","is","html","querySelector","opera","mobile","firefox","safari","ios","iphone","ipad","ie","edge","chrome","mac","windows","navigator","userAgent","navbarInit","windowHeight","navbarCollapse","colorName","bgClassName","shadowName","colorRgb","backgroundImage","transition","Selector","ClassNames","Events","navbar","target","contains","click","allColors","_objectSpread","Object","keys","getComputedStyle","style","remove","backgroundColor","breakPoint","scrollToTop","querySelectorAll","forEach","anchor","preventDefault","id","getAttribute","scroll","_utils$getData","behavior","location","hash"],"mappings":"qvBAGA,IAAAA,SAAA,SAAAC,GAEA,YAAAC,SAAAC,WACAD,SAAAE,iBAAA,mBAAAH,GAEAI,WAAAJ,EAAA,IAIAK,OAAA,SAAAL,GAAA,OAAAM,OAAAH,iBAAA,SAAAH,IAEAO,gBAAA,SAAAC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jM,SACAkM,iBAAA,uCACAC,QAAA,SAAAC,GACAA,EAAAlM,iBAAA,QAAA,SAAAyB,GACAA,EAAA0K,iBACA,IAAA/K,EAAAK,EAAA0J,OACAiB,EAAAjD,MAAAhI,QAAAC,EAAA,cAAAA,EAAAiL,aAAA,QACAlM,OAAAmM,OAAA,CACArH,IAAA,QAAAsH,EACApD,MAAAhI,QAAAC,EAAA,qBADA,IAAAmL,EAAAA,EAEApD,MAAA1E,UAAA3E,SAAAyJ,cAAA6C,IAAAnH,IAAA,IACAC,KAAA,EACAsH,SAAA,WAEArM,OAAAsM,SAAAC,KAAAN,OCVAxM,SAAA0K,YJRA1K,SAAAwJ,cIUAxJ,SAAAmM","file":"theme.min.js","sourcesContent":["/* -------------------------------------------------------------------------- */\r\n/* Utils */\r\n/* -------------------------------------------------------------------------- */\r\nconst docReady = (fn) => {\r\n // see if DOM is already available\r\n if (document.readyState === \"loading\") {\r\n document.addEventListener(\"DOMContentLoaded\", fn);\r\n } else {\r\n setTimeout(fn, 1);\r\n }\r\n};\r\n\r\nconst resize = (fn) => window.addEventListener(\"resize\", fn);\r\n\r\nconst isIterableArray = (array) => Array.isArray(array) && !!array.length;\r\n\r\nconst camelize = (str) => {\r\n const text = str.replace(/[-_\\s.]+(.)?/g, (_, c) =>\r\n c ? c.toUpperCase() : \"\"\r\n );\r\n return `${text.substr(0, 1).toLowerCase()}${text.substr(1)}`;\r\n};\r\n\r\nconst getData = (el, data) => {\r\n try {\r\n return JSON.parse(el.dataset[camelize(data)]);\r\n } catch (e) {\r\n return el.dataset[camelize(data)];\r\n }\r\n};\r\n\r\n/* ----------------------------- Colors function ---------------------------- */\r\n\r\nconst hexToRgb = (hexValue) => {\r\n let hex;\r\n hexValue.indexOf(\"#\") === 0\r\n ? (hex = hexValue.substring(1))\r\n : (hex = hexValue);\r\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\r\n const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\r\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\r\n hex.replace(shorthandRegex, (m, r, g, b) => r + r + g + g + b + b)\r\n );\r\n return result\r\n ? [\r\n parseInt(result[1], 16),\r\n parseInt(result[2], 16),\r\n parseInt(result[3], 16),\r\n ]\r\n : null;\r\n};\r\n\r\nconst rgbaColor = (color = \"#fff\", alpha = 0.5) =>\r\n `rgba(${hexToRgb(color)}, ${alpha})`;\r\n\r\n/* --------------------------------- Colors --------------------------------- */\r\n\r\nconst colors = {\r\n primary: \"#0057FF\",\r\n secondary: \"#748194\",\r\n success: \"#00d27a\",\r\n info: \"#27bcfd\",\r\n warning: \"#f5803e\",\r\n danger: \"#e63757\",\r\n light: \"#F9FAFD\",\r\n dark: \"#000\",\r\n};\r\n\r\nconst grays = {\r\n white: \"#fff\",\r\n 100: \"#f9fafd\",\r\n 200: \"#edf2f9\",\r\n 300: \"#d8e2ef\",\r\n 400: \"#b6c1d2\",\r\n 500: \"#9da9bb\",\r\n 600: \"#748194\",\r\n 700: \"#5e6e82\",\r\n 800: \"#4d5969\",\r\n 900: \"#344050\",\r\n 1000: \"#232e3c\",\r\n 1100: \"#0b1727\",\r\n black: \"#000\",\r\n};\r\n\r\nconst hasClass = (el, className) => {\r\n !el && false;\r\n return el.classList.value.includes(className);\r\n};\r\n\r\nconst addClass = (el, className) => {\r\n el.classList.add(className);\r\n};\r\n\r\nconst getOffset = (el) => {\r\n const rect = el.getBoundingClientRect();\r\n const scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;\r\n const scrollTop = window.pageYOffset || document.documentElement.scrollTop;\r\n return { top: rect.top + scrollTop, left: rect.left + scrollLeft };\r\n};\r\n\r\nconst isScrolledIntoView = (el) => {\r\n let top = el.offsetTop;\r\n let left = el.offsetLeft;\r\n const width = el.offsetWidth;\r\n const height = el.offsetHeight;\r\n\r\n while (el.offsetParent) {\r\n // eslint-disable-next-line no-param-reassign\r\n el = el.offsetParent;\r\n top += el.offsetTop;\r\n left += el.offsetLeft;\r\n }\r\n\r\n return {\r\n all:\r\n top >= window.pageYOffset &&\r\n left >= window.pageXOffset &&\r\n top + height <= window.pageYOffset + window.innerHeight &&\r\n left + width <= window.pageXOffset + window.innerWidth,\r\n partial:\r\n top < window.pageYOffset + window.innerHeight &&\r\n left < window.pageXOffset + window.innerWidth &&\r\n top + height > window.pageYOffset &&\r\n left + width > window.pageXOffset,\r\n };\r\n};\r\n\r\nconst breakpoints = {\r\n xs: 0,\r\n sm: 576,\r\n md: 768,\r\n lg: 992,\r\n xl: 1200,\r\n xxl: 1540,\r\n};\r\n\r\nconst getBreakpoint = (el) => {\r\n const classes = el && el.classList.value;\r\n let breakpoint;\r\n if (classes) {\r\n breakpoint =\r\n breakpoints[\r\n classes\r\n .split(\" \")\r\n .filter((cls) => cls.includes(\"navbar-expand-\"))\r\n .pop()\r\n .split(\"-\")\r\n .pop()\r\n ];\r\n }\r\n return breakpoint;\r\n};\r\n\r\n/* --------------------------------- Cookie --------------------------------- */\r\n\r\nconst setCookie = (name, value, expire) => {\r\n const expires = new Date();\r\n expires.setTime(expires.getTime() + expire);\r\n document.cookie = name + \"=\" + value + \";expires=\" + expires.toUTCString();\r\n};\r\n\r\nconst getCookie = (name) => {\r\n var keyValue = document.cookie.match(\"(^|;) ?\" + name + \"=([^;]*)(;|$)\");\r\n return keyValue ? keyValue[2] : keyValue;\r\n};\r\n\r\nconst settings = {\r\n tinymce: {\r\n theme: \"oxide\",\r\n },\r\n chart: {\r\n borderColor: \"rgba(255, 255, 255, 0.8)\",\r\n },\r\n};\r\n\r\n/* -------------------------- Chart Initialization -------------------------- */\r\n\r\nconst newChart = (chart, config) => {\r\n const ctx = chart.getContext(\"2d\");\r\n return new window.Chart(ctx, config);\r\n};\r\n\r\n/* ---------------------------------- Store --------------------------------- */\r\n\r\nconst getItemFromStore = (key, defaultValue, store = localStorage) => {\r\n try {\r\n return JSON.parse(store.getItem(key)) || defaultValue;\r\n } catch {\r\n return store.getItem(key) || defaultValue;\r\n }\r\n};\r\n\r\nconst setItemToStore = (key, payload, store = localStorage) =>\r\n store.setItem(key, payload);\r\nconst getStoreSpace = (store = localStorage) =>\r\n parseFloat(\r\n (\r\n escape(encodeURIComponent(JSON.stringify(store))).length /\r\n (1024 * 1024)\r\n ).toFixed(2)\r\n );\r\n\r\nconst utils = {\r\n docReady,\r\n resize,\r\n isIterableArray,\r\n camelize,\r\n getData,\r\n hasClass,\r\n addClass,\r\n hexToRgb,\r\n rgbaColor,\r\n colors,\r\n grays,\r\n getOffset,\r\n isScrolledIntoView,\r\n getBreakpoint,\r\n setCookie,\r\n getCookie,\r\n newChart,\r\n settings,\r\n getItemFromStore,\r\n setItemToStore,\r\n getStoreSpace,\r\n};\r\nexport default utils;\r\n","import { addClass } from './utils';\r\n/* -------------------------------------------------------------------------- */\r\n/* Detector */\r\n/* -------------------------------------------------------------------------- */\r\n\r\nconst detectorInit = () => {\r\n const { is } = window;\r\n const html = document.querySelector('html');\r\n is.opera() && addClass(html, 'opera');\r\n is.mobile() && addClass(html, 'mobile');\r\n is.firefox() && addClass(html, 'firefox');\r\n is.safari() && addClass(html, 'safari');\r\n is.ios() && addClass(html, 'ios');\r\n is.iphone() && addClass(html, 'iphone');\r\n is.ipad() && addClass(html, 'ipad');\r\n is.ie() && addClass(html, 'ie');\r\n is.edge() && addClass(html, 'edge');\r\n is.chrome() && addClass(html, 'chrome');\r\n is.mac() && addClass(html, 'osx');\r\n is.windows() && addClass(html, 'windows');\r\n navigator.userAgent.match('CriOS') && addClass(html, 'chrome');\r\n\r\n};\r\n\r\nexport default detectorInit;\r\n","import utils from './utils';\r\n/*-----------------------------------------------\r\n| Top navigation opacity on scroll\r\n-----------------------------------------------*/\r\nconst navbarInit = () =>{\r\n const Selector = {\r\n NAVBAR: '[data-navbar-on-scroll]',\r\n NAVBAR_COLLAPSE: '.navbar-collapse',\r\n NAVBAR_TOGGLER: '.navbar-toggler',\r\n \r\n };\r\n\r\n const ClassNames = {\r\n COLLAPSED: 'collapsed',\r\n };\r\n\r\n \r\n const Events = {\r\n SCROLL: 'scroll',\r\n SHOW_BS_COLLAPSE: 'show.bs.collapse',\r\n HIDE_BS_COLLAPSE: 'hide.bs.collapse',\r\n HIDDEN_BS_COLLAPSE: 'hidden.bs.collapse',\r\n };\r\n\r\n const DataKey = {\r\n NAVBAR_ON_SCROLL: 'navbar-light-on-scroll'\r\n };\r\n const navbar = document.querySelector(Selector.NAVBAR);\r\n // responsive nav collapsed\r\n navbar.addEventListener('click',(e)=>{\r\n if(e.target.classList.contains('nav-link') && window.innerWidth < utils.getBreakpoint(navbar)){\r\n navbar.querySelector(Selector.NAVBAR_TOGGLER).click()\r\n }\r\n })\r\n\r\n if (navbar){\r\n const windowHeight = window.innerHeight;\r\n const html = document.documentElement;\r\n const navbarCollapse = navbar.querySelector(Selector.NAVBAR_COLLAPSE);\r\n const allColors = { ...utils.colors, ...utils.grays };\r\n\r\n const name = utils.getData(navbar, DataKey.NAVBAR_ON_SCROLL);\r\n const colorName = Object.keys(allColors).includes(name) ? name : 'white';\r\n const color = allColors[colorName];\r\n const bgClassName = `bg-${colorName}`;\r\n const shadowName = 'shadow-transition'\r\n const colorRgb = utils.hexToRgb(color);\r\n const { backgroundImage } = window.getComputedStyle(navbar);\r\n const transition = 'background-color 0.35s ease';\r\n navbar.style.backgroundImage = 'none';\r\n\r\n // Change navbar background color on scroll\r\n window.addEventListener(Events.SCROLL, () => {\r\n const { scrollTop } = html;\r\n let alpha = (scrollTop / windowHeight) * .15;\r\n // Add class on scroll\r\n navbar.classList.add('backdrop');\r\n if(alpha === 0){\r\n navbar.classList.remove('backdrop');\r\n }\r\n alpha >= 1 && (alpha = 1);\r\n navbar.style.backgroundColor = `rgba(${colorRgb[0]}, ${colorRgb[1]}, ${colorRgb[2]}, ${alpha})`;\r\n navbar.style.backgroundImage = (alpha > 0 || utils.hasClass(navbarCollapse, 'show')) ? backgroundImage : 'none';\r\n (alpha > 0 || utils.hasClass(navbarCollapse, 'show')) ? navbar.classList.add(shadowName):navbar.classList.remove(shadowName);\r\n });\r\n\r\n // Toggle bg class on window resize\r\n utils.resize(() => {\r\n const breakPoint = utils.getBreakpoint(navbar);\r\n if (window.innerWidth > breakPoint) {\r\n navbar.style.backgroundImage = html.scrollTop ? backgroundImage : 'none';\r\n navbar.style.transition = 'none';\r\n } \r\n else if (\r\n !utils.hasClass(\r\n navbar.querySelector(Selector.NAVBAR_TOGGLER),\r\n ClassNames.COLLAPSED\r\n \r\n )\r\n )\r\n\r\n { \r\n navbar.classList.add(bgClassName);\r\n navbar.classList.add(shadowName);\r\n navbar.style.backgroundImage = backgroundImage;\r\n }\r\n \r\n if (window.innerWidth <= breakPoint) {\r\n navbar.style.transition = utils.hasClass(navbarCollapse, 'show') ? transition : 'none';\r\n } \r\n\r\n });\r\n\r\n navbarCollapse.addEventListener(Events.SHOW_BS_COLLAPSE, () => {\r\n navbar.classList.add(bgClassName);\r\n navbar.classList.add(shadowName);\r\n navbar.style.backgroundImage = backgroundImage;\r\n navbar.style.transition = transition;\r\n });\r\n\r\n navbarCollapse.addEventListener(Events.HIDE_BS_COLLAPSE, () => {\r\n navbar.classList.remove(bgClassName);\r\n navbar.classList.remove(shadowName);\r\n !html.scrollTop && (navbar.style.backgroundImage = 'none');\r\n });\r\n\r\n navbarCollapse.addEventListener(Events.HIDDEN_BS_COLLAPSE, () => {\r\n navbar.style.transition = 'none';\r\n });\r\n\r\n }\r\n\r\n};\r\n\r\nexport default navbarInit;","import utils from './utils';\r\n/* -------------------------------------------------------------------------- */\r\n/* Scroll To Top */\r\n/* -------------------------------------------------------------------------- */\r\nconst scrollToTop = () => {\r\n document\r\n .querySelectorAll('[data-anchor] > a, [data-scroll-to]')\r\n .forEach((anchor) => {\r\n anchor.addEventListener('click', (e) => {\r\n e.preventDefault();\r\n const el = e.target;\r\n const id = utils.getData(el, 'scroll-to') || el.getAttribute('href');\r\n window.scroll({\r\n top:\r\n utils.getData(el, 'offset-top') ??\r\n utils.getOffset(document.querySelector(id)).top - 100,\r\n left: 0,\r\n behavior: 'smooth',\r\n });\r\n window.location.hash = id;\r\n });\r\n });\r\n};\r\nexport default scrollToTop;","import { docReady } from './utils';\r\nimport navbarInit from './bootstrap-navbar';\r\nimport detectorInit from './detector';\r\nimport scrollToTop from './scroll-to-top';\r\n\r\n// /* -------------------------------------------------------------------------- */\r\n// /* Theme Initialization */\r\n// /* -------------------------------------------------------------------------- */\r\n\r\ndocReady(navbarInit);\r\ndocReady(detectorInit);\r\ndocReady(scrollToTop);\r\n"]}