/*! CoreApp v1.6.0 | Copyright by Softnio. */ var msg_perform_unable="undefined"==typeof msg_unable_perform?"Unable to perform!":msg_unable_perform,msg_is_wrong="undefined"==typeof msg_wrong?"Something is Wrong!":msg_wrong,msg_modern_browser="undefined"==typeof sumb?"Please use a modern browser to properly view this template!":sumb,msg_clipboard="undefined"==typeof scbc?"Copied to Clipboard":scbc,msg_type_to_search="undefined"==typeof sts?"Type in to Search":sts,msg_no_records="undefined"==typeof snr?"No records":snr,msg_first="undefined"==typeof sfs?"First":sfs,msg_last="undefined"==typeof sls?"Last":sls,msg_next="undefined"==typeof snx?"Next":snx,msg_prev="undefined"==typeof spv?"Prev":spv,msg_total="undefined"==typeof stl?"Total":stl;function winwidth(){return $(window).width()}jQuery.validator.addMethod("greaterThan",function(a,b,c){return /Invalid|NaN/.test(new Date(a))?isNaN(a)&&isNaN($(c).val())||+a>+$(c).val():new Date(a)>new Date($(c).val())},"Must be greater than {0}.");function ajax_form_submit(a=$(".validate-form"),b=!0,c="ti ti-alert",d=!0){a.find(".form-progress-btn");a.each(function(){var a=$(this);a.validate({errorElement:"span",errorClass:"input-border-error error",submitHandler:function(e){$(e).ajaxSubmit({beforeSubmit:function(){if(!$(e).validToken())return setTimeout(function(){show_toast("error",msg_perform_unable+"\n","ti ti-na")},400),!1},dataType:"json",success:function(f){var g="success"==f.msg?"ti ti-check":c;if(btn_actived(a.find("button.save-disabled"),!1),show_toast(f.msg,f.message,g),"success"!=f.msg)cl(f);else if(!0===b&&$(e).clearForm(),bs_modal_toggle(a,d),f.link)setTimeout(function(){window.location.href=f.link},1200);else{var h=$(a);!0==d&&h.hasClass("_reload")&&setTimeout(function(){window.location.reload()},1200)}},error:function(a,b,c){cl(c),show_toast("warning",msg_is_wrong+"\n("+c+")","ti ti-na"),cl("Ajax error!!")}})},invalidHandler:function(){}})})}function post_submit(a,b,c=null){a&&b?$.post(a,b).done(function(a){return $(".tokenval").validToken()?void("undefined"!=typeof a.modal&&a.modal?c&&(c.html(a.modal),init_inside_modal(),0d.top?!a.hasClass("has-fixed")&&(a.addClass("has-fixed"),c.css("padding-top",f)):a.hasClass("has-fixed")&&(a.removeClass("has-fixed"),c.css("padding-top",0))})}}function data_percent_(){var a=$("[data-percent]");0%DDay
%HHour
%MMin
%SSec
"))}).on("finish.countdown",function(){$(this).html("
0Day
0Hour
0Min
0Sec
")})})}function selects_(){var a=$(".select");0winwidth()?a.delay(500).addClass("navbar-mobile"):a.delay(500).removeClass("navbar-mobile")}function toggle_nav_(){var a=$(".toggle-nav"),b=$(".navbar");0<\"row align-items-center\"<\"col-sm-6 text-left\"p><\"col-sm-6 text-sm-right\"i>>",pageLength:b,pagingType:"simple",bPaginate:$(".data-table tbody tr").length>b,iDisplayLength:b,language:{search:"",searchPlaceholder:msg_type_to_search,info:"_START_ -_END_ of _TOTAL_",infoEmpty:msg_no_records,infoFiltered:"( "+msg_total+" _MAX_ )",paginate:{first:msg_first,last:msg_last,next:msg_next,previous:msg_prev}}})});var b=$(".dt-filter-init");0<\"col-3 text-right\"<\"data-table-filter relative d-inline-block\">>><\"row align-items-center\"<\"col-sm-6 text-left\"p><\"col-sm-6 text-sm-right\"i>>",pageLength:b,pagingType:"simple",bPaginate:$(".data-table tbody tr").length>b,iDisplayLength:b,language:{search:"",searchPlaceholder:msg_type_to_search,info:"_START_ -_END_ of _TOTAL_",infoEmpty:msg_no_records,infoFiltered:"( "+msg_total+" _MAX_ )",paginate:{first:msg_first,last:msg_last,next:msg_next,previous:msg_prev}}}),d=$(".data-filter");d.on("change",function(){var a=$(this).attr("name")&&"filter"!=$(this).attr("name")?$(this).attr("name"):"filter-data",b=$(this).val();c.columns("."+a).search(b?b:"",!0,!1).draw()})})}function modal_fix(){var a=$(".modal"),b=$("body");a.on("shown.bs.modal",function(){b.hasClass("modal-open")||b.addClass("modal-open")})}function drop_toggle_(){var a=$(".drop-toggle");0winwidth()&&($(this).parent().children(".navbar-dropdown").slideToggle(400),$(this).parent().siblings().children(".navbar-dropdown").slideUp(400),$(this).parent().toggleClass("current"),$(this).parent().siblings().removeClass("current"),a.preventDefault())})}function form_validate_(){var a=$(".form-validate");0{for(var b of a)console.log(b)};function btn_actived(a,b=!0){0~@|");for(var d="",e=0;e<$(a).attr("data-size");e++)d+=c.charAt(Math.floor(Math.random()*c.length));return d}function show_toast(a,b,c="ti ti-filter"){toastr.options={closeButton:!0,positionClass:"toast-bottom-right"},toastr[a](" "+b)}function show_alert(a,b,c=".msg-box",d=2500){var e=$(c);e.html("
"+b+"
"),setTimeout(function(){e.empty()},d)}function store(a,b){"undefined"==typeof Storage?window.alert(msg_modern_browser):localStorage.setItem(a,b)}function get(a){return"undefined"==typeof Storage?void window.alert(msg_modern_browser):localStorage.getItem(a)}(function(a){'use strict';var b=a("body"),c=a(document),d=a("#ajax-modal"),e=a(".close-modal"),f=a(".modal-backdrop");"ontouchstart"in document.documentElement||b.addClass("no-touch"),stick_nav_(),data_percent_(),countdown_(),selects_(),toggle_content_(),toggle_tigger_(),toggle_nav_(),tooltip_(),date_time_picker_(),knob_(),switch_toggle_(),input_file_(),image_popop_(),datatable_(),modal_fix(),drop_toggle_(),form_validate_();var g=new ClipboardJS(".copy-clipboard");g.on("success",function(a){feedback(a.trigger,"success"),a.clearSelection()}).on("error",function(a){feedback(a.trigger,"fail")});var h=window.location.href,i=a(".navbar a");0