text: ! function($) {
  	"use strict";
  	var t = { 
  		init: function() {
  
  			var base_url = $('#base_url').val();
  
  			var jsonFlotData = $.ajax({
  				url: base_url + "admin/getMonthlyOrdersChartData",
  				dataType: "json",
  				async: false
  			}).responseText;
  
  			var resultOrdersChart = JSON.parse(jsonFlotData);
  			console.log(resultOrdersChart);
  
  			t.dateRangePickerInit(".page-title-wrapper .btn"); 
  			var e = resultOrdersChart.response;
  			// var e = [500, 750, 390, 500, 150, 500, 800, 500, 3e3, 450, 200, 20];
  			t.barChartInit("#chart-orders", e, "rgba(78,194,127,0.3)", "#4ec27f", "rgba(78,194,127,0.6)", "#4ec27f"), 
  			$.extend($.fn.dataTable.defaults, { dom: '<"table-responsive" <t>>', autoWidth: !1 }); 
  			var a = { order: [[1, "desc"]] };
  
  
  
  			t.datatablesInit(".panel-country-sales .table", a), t.pieChartInit(".inline-sparkline"), t.datatablesEventListInit(".panel-events .table"),
  			t.datatablesLeadStaffInit(".panel-lead-staff .table"); var n = new Date,
  				i = n.getFullYear(),
  				l = n.getMonth() + 1;
  			l = l < 10 ? "0" + l : l; var s = [{ title: "All Day Event", start: i + "-" + l + "-01" }, { title: "Long Event", start: i + "-" + l + "-07", end: i + "-" + l + "-10" }, { id: 999, title: "Repeating Event", start: i + "-" + l + "-09T16:00:00" }, { id: 999, title: "Repeating Event", start: i + "-" + l + "-16T16:00:00" }, { title: "Conference", start: i + "-" + l + "-11", end: i + "-" + l + "-13" }, { title: "Meeting", start: i + "-" + l + "-12T10:30:00", end: i + "-" + l + "-12T12:30:00" }, { title: "Lunch", start: i + "-" + l + "-12T12:00:00" }, { title: "Meeting", start: i + "-" + l + "-12T14:30:00" }, { title: "Happy Hour", start: i + "-" + l + "-12T17:30:00" }, { title: "Dinner", start: i + "-" + l + "-12T20:00:00" }, { title: "Birthday Party", start: i + "-" + l + "-13T07:00:00" }, { title: "Click for Google", url: "http://google.com/", start: i + "-" + l + "-28" }];
  			
  			t.easyPieChartInit(".easy-pie-chart"),
  			t.contentLiveSearchInit(".panel-activity-monitor", "#search-activity-monitor", ".media", "div"),
  			t.contentLiveSearchInit(".panel-chat", "#search-chat", ".media", "div"), t.slimscrollInit(".panel-activity-monitor .media-wrapper"), t.slimscrollInit(".panel-chat .media-wrapper"), $(".slimScrollBar").hide() }, dateRangePickerInit: function(t) {
  			function e(e, a) { $(t).find("span").html(e.format("MMMM D, YYYY") + " - " + a.format("MMMM D, YYYY")) } e(moment().subtract(29, "days"), moment()), $(t).daterangepicker({ applyClass: "btn-primary", opens: "left", ranges: { Today: [moment(), moment()], Yesterday: [moment().subtract(1, "days"), moment().subtract(1, "days")], "Last 7 Days": [moment().subtract(6, "days"), moment()], "Last 30 Days": [moment().subtract(29, "days"), moment()], "This Month": [moment().startOf("month"), moment().endOf("month")], "Last Month": [moment().subtract(1, "month").startOf("month"), moment().subtract(1, "month").endOf("month")] } }, e) }, slimscrollInit: function(t) { var e = parseInt($(t).css("max-height"));
  			$(t).slimScroll({ height: e, allowPageScroll: !0, color: "#000" }) },
  
  			barChartInit: function(t, e, a, n, i, l) { Chart.defaults.global.legend.display = !1; 
  				var s = { 
  					labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], 
  					datasets: [{ label: "Orders", backgroundColor: a, borderColor: n, borderWidth: 1, hoverBackgroundColor: i, hoverBorderColor: l, data: e }] },
  
  				o = $(t),
  				r = new Chart(o, { type: "bar", data: s, options: { scales: { xAxes: [{ gridLines: { color: "transparent" } }], yAxes: [{ gridLines: { color: "#f2f2f2" } }] } } }) }, pieChartInit: function(t) { $(t).sparkline("html", { type: "pie", width: "50", height: "50", offset: "90", sliceColors: ["#51c2cf", "#F9B56A", "#949fb2", "#474F60", "#EE6567"] }) }, lineChartCombinedInit: function(t, e, a, n, i, l, s) { $.plot(t, [{ data: e, label: a, color: n, shadowSize: 0, highlightColor: n }, { data: i, label: l, color: s, shadowSize: 0, highlightColor: s }], { series: { lines: { show: !0 }, points: { symbol: function t(e, a, n, i, l) { e.arc(a, n, 4, 0, 2 * Math.PI, !0), e.fillStyle = e.strokeStyle, e.lineWidth = 1, e.fill() } } }, xaxis: { tickColor: "transparent", mode: "time", timeformat: "%b %Y" }, yaxis: { tickColor: "#f2f2f2", max: 1e4 }, legend: { margin: [5, 10], labelBoxBorderColor: "#f6f6f6", labelFormatter: function(t, e) { return "<span class='m-left-5'>" + t + "</span>" } }, grid: { hoverable: !0, borderWidth: 1, borderColor: "#f2f2f2" }, tooltip: { show: !0, content: "<span class='label' style='color: #fff; background-color: rgba(0,0,0,.6)'>%x = %y</span>", shifts: { x: -45 }, cssClass: "chart-tooltip", defaultTheme: !1 } }) }, easyPieChartInit: function(t) { $(t).easyPieChart({ onStep: function(t, e, a) { $(this.el).find(".percent").text(Math.round(a)) } }) }, icheckInit: function(t) { $(t).iCheck({ checkboxClass: "icheckbox_minimal-grey", radioClass: "iradio_minimal-grey" }) }, datatablesIcheckChecked: function() { var t = $(this).closest("th"),
  				e = $(this).closest(".table").find("tbody input.icheck");
  			t.length && e.iCheck("check") }, datatablesIcheckUnchecked: function() { var t = $(this).closest("th"),
  				e = $(this).closest(".table").find("tbody input.icheck");
  			t.length && e.iCheck("uncheck") }, datatablesTasklistChildRow: function(t) {
  			function e(t) { return '<table class="table table-bordered"><tr><td style="width: 35%;">Parent Project:</td><td>' + t.parentProject + "</td></tr><tr><td>Description:</td><td>" + t.description + "</td></tr><tr><td>Due Date:</td><td>" + t.dueDate + "</td></tr><tr><td>Assigned to:</td><td>" + t.assign + "</td></tr></table>" } var a = $(this).closest("tr"),
  				n = t.DataTable().row(a);
  			n.child.isShown() ? (n.child.hide(), a.removeClass("shown")) : (n.child(e(n.data())).show(), a.addClass("shown")) }, datatablesTasklistEdit: function(t) { $(this).removeClass("btn-edit").addClass("btn-save").find(".fa-pencil").removeClass("fa-pencil").addClass("fa-save"); for (var e = $(this).closest("tr"), a = e.find("td"), n = 1; n <= a.length - 2; n++) { var i = $(t).DataTable().cell(a.eq(n));
  				i.data('<input type="text" class="form-control input-sm" value="' + i.data() + '">') } }, datatablesTasklistSave: function(t) { $(this).removeClass("btn-save").addClass("btn-edit").find(".fa-save").removeClass("fa-save").addClass("fa-pencil"); for (var e = $(this).closest("tr"), a = e.find("td"), n = 1; n <= a.length - 2; n++) { var i = $(t).DataTable().cell(a.eq(n)),
  					l = a.eq(n).find(".form-control").val();
  				i.data(l).draw() } }, datatablesTasklistRemove: function(t) { $(t).DataTable().row().remove().draw(!1) }, datatablesTasklistInit: function(e) { $(e).DataTable({ dom: '<f><"table-responsive" <t>>', language: { search: "_INPUT_", searchPlaceholder: "Search..." }, order: [
  					[1, "asc"]
  				], columnDefs: [{ targets: [0, 3], orderable: !1 }], ajax: "task-list-data.txt", columns: [{ className: "details-control", defaultContent: "<input type='checkbox' class='icheck' autocomplete='off'>" }, { data: "title" }, { data: "tag" }, { defaultContent: '<td><div class="btn-group btn-group-xs pull-right"><button type="button" class="btn btn-default btn-edit"><i class="fa fa-pencil"></i></button><button type="button" class="btn btn-default btn-remove"><i class="fa fa-trash"></i></button></div></td>' }], initComplete: function(a, n) { t.icheckInit("input.icheck"), $(".icheck").on("ifChecked", t.datatablesIcheckChecked), $(".icheck").on("ifUnchecked", t.datatablesIcheckUnchecked), $(e).find("tbody").on("click", "td.details-control", $.proxy(t.datatablesTasklistChildRow, null, $(e))), $(e).DataTable().on("click", ".btn-edit", $.proxy(t.datatablesTasklistEdit, null, e)), $(e).DataTable().on("click", ".btn-save", $.proxy(t.datatablesTasklistSave, null, e)), $(e).DataTable().on("click", ".btn-remove", $.proxy(t.datatablesTasklistRemove, null, e)) } }) }, datatablesLeadStaffInit: function(t) { $(t).DataTable({ dom: '<f><"table-responsive" <t>>', language: { search: "_INPUT_", searchPlaceholder: "Search..." }, order: [1, "desc"], columnDefs: [{ targets: 2, orderable: !1 }] }) }, datatablesInit: function(t, e) { $(t).dataTable(e) }, contentLiveSearchInit: function(t, e, a, n) { $(t).searchable({ searchField: e, selector: a, childSelector: n }) }, 
  				 datatablesEventListChildRow: function(t) {
  			function e(t) { return '<table class="table table-bordered"><tr><td>Description:</td><td>' + t.description + "</td></tr><tr><td>Invited:</td><td>" + t.invited + "</td></tr></table>" } var a = $(this).closest("tr"),
  				n = t.DataTable().row(a);
  			n.child.isShown() ? (n.child.hide(), a.removeClass("shown")) : (n.child(e(n.data())).show(), a.addClass("shown")) }, datatablesEventListInit: function(e) { $(e).DataTable({ ordering: !1, ajax: "event-list-data.txt", columns: [{ className: "details-control", render: function(t, e, a, n) { return '<span class="block">' + a.title + "</span><span>" + a.date + "</span>" } }, { defaultContent: '<button class="btn btn-info-outline">Cancel</button>' }], initComplete: function(a, n) { $(e).find("tbody").on("click", "td.details-control", $.proxy(t.datatablesEventListChildRow, null, $(e))) } }) } };
  	t.init() }(jQuery);