????

Your IP : 18.219.23.38


Current Path : /home/thenclexdoctor.com/public_html/public/assets/default/js/panel/
Upload File :
Current File : /home/thenclexdoctor.com/public_html/public/assets/default/js/panel/course_statistics.min.js

/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "/";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 21);
/******/ })
/************************************************************************/
/******/ ({

/***/ "./resources/js/panel/course_statistics.js":
/*!*************************************************!*\
  !*** ./resources/js/panel/course_statistics.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

(function () {
  "use strict";

  var style = getComputedStyle(document.body);
  var primaryColor = style.getPropertyValue('--primary');
  var secondaryColor = style.getPropertyValue('--secondary');
  var warningColor = style.getPropertyValue('--warning');

  function hexToRgb(hex) {
    var rgba = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
    var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
    var rgb = '';

    if (result) {
      rgb = "rgb(".concat(parseInt(result[1], 16), ",").concat(parseInt(result[2], 16), ",").concat(parseInt(result[3], 16), ")");

      if (rgba) {
        rgb = "rgba(".concat(parseInt(result[1], 16), ",").concat(parseInt(result[2], 16), ",").concat(parseInt(result[3], 16), ", ").concat(rgba, ")");
      }
    }

    return rgb;
  }

  function pieChart($el, labels, datasets) {
    new Chart($el, {
      type: 'doughnut',
      data: {
        labels: labels,
        datasets: [{
          label: '',
          data: datasets,
          borderWidth: 0,
          borderColor: '',
          backgroundColor: [primaryColor, secondaryColor, warningColor],
          pointBackgroundColor: '#fff',
          pointBorderColor: '#6777ef',
          pointRadius: 4,
          fill: true
        }]
      },
      options: {
        responsive: true,
        maintainAspectRatio: false,
        segmentShowStroke: false,
        legend: {
          display: false
        }
      }
    });
  }

  window.makePieChart = function (elId, labels, datasets) {
    var bodyEl = document.getElementById(elId).getContext('2d');
    pieChart(bodyEl, labels, datasets);
  };

  window.handleMonthlySalesChart = function (labels, datasets) {
    var ctx = document.getElementById('monthlySalesChart').getContext('2d');
    new Chart(ctx, {
      type: 'line',
      data: {
        labels: labels,
        datasets: [{
          label: '',
          data: datasets,
          backgroundColor: 'transparent',
          borderColor: primaryColor,
          borderWidth: 2
        }]
      },
      options: {
        responsive: true,
        legend: {
          display: false
        }
      }
    });
  };

  window.handleCourseProgressChart = function (labels, datasets) {
    var ctx = document.getElementById('courseProgressLineChart').getContext('2d');
    new Chart(ctx, {
      type: 'bar',
      data: {
        labels: labels,
        datasets: [{
          label: '',
          data: datasets,
          backgroundColor: hexToRgb(primaryColor, 0.4),
          borderColor: primaryColor,
          borderWidth: 2
        }]
      },
      options: {
        responsive: true,
        legend: {
          display: false
        }
      }
    });
  };
})(jQuery);

/***/ }),

/***/ 21:
/*!*******************************************************!*\
  !*** multi ./resources/js/panel/course_statistics.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! /home/jack/projects/webinar/resources/js/panel/course_statistics.js */"./resources/js/panel/course_statistics.js");


/***/ })

/******/ });

Page not found | The NCLEX Doctor

Page not found!

Sorry, this page is not available...