var app=function(){var t,e=!1,o=!1,a=!1,i=!1,n=[],l="../assets/",s="global/img/",r="global/plugins/",c="global/css/",d={blue:"#89c4f4",red:"#f3565d",green:"#1bbc9b",purple:"#9b59b6",grey:"#95a5a6",yellow:"#f8cb00"},h=function(){"rtl"===$("body").css("direction")&&(e=!0),o=!!navigator.useragent.match(/msie 8.0/),a=!!navigator.useragent.match(/msie 9.0/),i=!!navigator.useragent.match(/msie 10.0/),i&&$("html").addclass("ie10"),(i||a||o)&&$("html").addclass("ie")},p=function(){for(var t=0;t .portlet-title > .tools > a.remove",function(t){t.preventdefault();var e=$(this).closest(".portlet");$("body").hasclass("page-portlet-fullscreen")&&$("body").removeclass("page-portlet-fullscreen"),e.find(".portlet-title .fullscreen").tooltip("destroy"),e.find(".portlet-title > .tools > .reload").tooltip("destroy"),e.find(".portlet-title > .tools > .remove").tooltip("destroy"),e.find(".portlet-title > .tools > .config").tooltip("destroy"),e.find(".portlet-title > .tools > .collapse, .portlet > .portlet-title > .tools > .expand").tooltip("destroy"),e.remove()}),$("body").on("click",".portlet > .portlet-title .fullscreen",function(t){t.preventdefault();var e=$(this).closest(".portlet");if(e.hasclass("portlet-fullscreen"))$(this).removeclass("on"),e.removeclass("portlet-fullscreen"),$("body").removeclass("page-portlet-fullscreen"),e.children(".portlet-body").css("height","auto");else{var o=app.getviewport().height-e.children(".portlet-title").outerheight()-parseint(e.children(".portlet-body").css("padding-top"))-parseint(e.children(".portlet-body").css("padding-bottom"));$(this).addclass("on"),e.addclass("portlet-fullscreen"),$("body").addclass("page-portlet-fullscreen"),e.children(".portlet-body").css("height",o)}}),$("body").on("click",".portlet > .portlet-title > .tools > a.reload",function(t){t.preventdefault();var e=$(this).closest(".portlet").children(".portlet-body"),o=$(this).attr("data-url"),a=$(this).attr("data-error-display");o?(app.blockui({target:e,animate:!0,overlaycolor:"none"}),$.ajax({type:"get",cache:!1,url:o,datatype:"html",success:function(t){app.unblockui(e),e.html(t),app.initajax()},error:function(t,o,i){app.unblockui(e);var n="error on reloading the content. please check your connection and try again.";"toastr"==a&&toastr?toastr.error(n):"notific8"==a&&$.notific8?($.notific8("zindex",11500),$.notific8(n,{theme:"ruby",life:3e3})):alert(n)}})):(app.blockui({target:e,animate:!0,overlaycolor:"none"}),window.settimeout(function(){app.unblockui(e)},1e3))}),$('.portlet .portlet-title a.reload[data-load="true"]').click(),$("body").on("click",".portlet > .portlet-title > .tools > .collapse, .portlet .portlet-title > .tools > .expand",function(t){t.preventdefault();var e=$(this).closest(".portlet").children(".portlet-body");$(this).hasclass("collapse")?($(this).removeclass("collapse").addclass("expand"),e.slideup(200)):($(this).removeclass("expand").addclass("collapse"),e.slidedown(200))})},b=function(){if($().uniform){var t=$("input[type=checkbox]:not(.toggle, .md-check, .md-radiobtn, .make-switch, .icheck), input[type=radio]:not(.toggle, .md-check, .md-radiobtn, .star, .make-switch, .icheck)");t.size()>0&&t.each(function(){0===$(this).parents(".checker").size()&&($(this).show(),$(this).uniform())})}},g=function(){if($("body").on("click",".md-checkbox > label, .md-radio > label",function(){var t=$(this),e=$(this).children("span:first-child");e.addclass("inc");var o=e.clone(!0);e.before(o),$("."+e.attr("class")+":last",t).remove()}),$("body").hasclass("page-md")){var t,e,o,a,i;$("body").on("click","a.btn, button.btn, input.btn, label.btn",function(n){t=$(this),0==t.find(".md-click-circle").length&&t.prepend(""),e=t.find(".md-click-circle"),e.removeclass("md-click-animate"),e.height()||e.width()||(o=math.max(t.outerwidth(),t.outerheight()),e.css({height:o,width:o})),a=n.pagex-t.offset().left-e.width()/2,i=n.pagey-t.offset().top-e.height()/2,e.css({top:i+"px",left:a+"px"}).addclass("md-click-animate"),settimeout(function(){e.remove()},1e3)})}var n=function(t){""!=t.val()?t.addclass("edited"):t.removeclass("edited")};$("body").on("keydown",".form-md-floating-label .form-control",function(t){n($(this))}),$("body").on("blur",".form-md-floating-label .form-control",function(t){n($(this))}),$(".form-md-floating-label .form-control").each(function(){$(this).val().length>0&&$(this).addclass("edited")})},m=function(){$().icheck&&$(".icheck").each(function(){var t=$(this).attr("data-checkbox")?$(this).attr("data-checkbox"):"icheckbox_minimal-grey",e=$(this).attr("data-radio")?$(this).attr("data-radio"):"iradio_minimal-grey";t.indexof("_line")>-1||e.indexof("_line")>-1?$(this).icheck({checkboxclass:t,radioclass:e,insert:'
'+$(this).attr("data-label")}):$(this).icheck({checkboxclass:t,radioclass:e})})},v=function(){$().bootstrapswitch&&$(".make-switch").bootstrapswitch()},y=function(){$().confirmation&&$("[data-toggle=confirmation]").confirmation({container:"body",btnokclass:"btn btn-sm btn-success",btncancelclass:"btn btn-sm btn-danger"})},c=function(){$("body").on("shown.bs.collapse",".accordion.scrollable",function(t){app.scrollto($(t.target))})},k=function(){if(location.hash){var t=encodeuri(location.hash.substr(1));$('a[href="#'+t+'"]').parents(".tab-pane:hidden").each(function(){var t=$(this).attr("id");$('a[href="#'+t+'"]').click()}),$('a[href="#'+t+'"]').click()}$().tabdrop&&$(".tabbable-tabdrop .nav-pills, .tabbable-tabdrop .nav-tabs").tabdrop({text:' '})},x=function(){$("body").on("hide.bs.modal",function(){$(".modal:visible").size()>1&&$("html").hasclass("modal-open")===!1?$("html").addclass("modal-open"):$(".modal:visible").size()<=1&&$("html").removeclass("modal-open")}),$("body").on("show.bs.modal",".modal",function(){$(this).hasclass("modal-scroll")&&$("body").addclass("modal-open-noscroll")}),$("body").on("hide.bs.modal",".modal",function(){$("body").removeclass("modal-open-noscroll")}),$("body").on("hidden.bs.modal",".modal:not(.modal-cached)",function(){$(this).removedata("bs.modal")})},w=function(){$(".tooltips").tooltip(),$(".portlet > .portlet-title .fullscreen").tooltip({container:"body",title:"fullscreen"}),$(".portlet > .portlet-title > .tools > .reload").tooltip({container:"body",title:"reload"}),$(".portlet > .portlet-title > .tools > .remove").tooltip({container:"body",title:"remove"}),$(".portlet > .portlet-title > .tools > .config").tooltip({container:"body",title:"settings"}),$(".portlet > .portlet-title > .tools > .collapse, .portlet > .portlet-title > .tools > .expand").tooltip({container:"body",title:"collapse/expand"})},i=function(){$("body").on("click",".dropdown-menu.hold-on-click",function(t){t.stoppropagation()})},z=function(){$("body").on("click",'[data-close="alert"]',function(t){$(this).parent(".alert").hide(),$(this).closest(".note").hide(),t.preventdefault()}),$("body").on("click",'[data-close="note"]',function(t){$(this).closest(".note").hide(),t.preventdefault()}),$("body").on("click",'[data-remove="note"]',function(t){$(this).closest(".note").remove(),t.preventdefault()})},a=function(){$('[data-hover="dropdown"]').not(".hover-initialized").each(function(){$(this).dropdownhover(),$(this).addclass("hover-initialized")})},s=function(){"function"==typeof autosize&&autosize(document.queryselector("textarea.autosizeme"))},p=function(){$(".popovers").popover(),$(document).on("click.bs.popover.data-api",function(e){t&&t.popover("hide")})},t=function(){app.initslimscroll(".scroller")},u=function(){jquery.fancybox&&$(".fancybox-button").size()>0&&$(".fancybox-button").fancybox({groupattr:"data-rel",preveffect:"none",nexteffect:"none",closebtn:!0,helpers:{title:{type:"inside"}}})},d=function(){$().counterup&&$("[data-counter='counterup']").counterup({delay:10,time:1e3})},e=function(){(o||a)&&$("input[placeholder]:not(.placeholder-no-fix), textarea[placeholder]:not(.placeholder-no-fix)").each(function(){var t=$(this);""===t.val()&&""!==t.attr("placeholder")&&t.addclass("placeholder").val(t.attr("placeholder")),t.focus(function(){t.val()==t.attr("placeholder")&&t.val("")}),t.blur(function(){(""===t.val()||t.val()==t.attr("placeholder"))&&t.val(t.attr("placeholder"))})})},g=function(){$().select2&&($.fn.select2.defaults.set("theme","bootstrap"),$(".select2me").select2({placeholder:"select",width:"auto",allowclear:!0}))},h=function(){$("[data-auto-height]").each(function(){var t=$(this),e=$("[data-height]",t),o=0,a=t.attr("data-mode"),i=parseint(t.attr("data-offset")?t.attr("data-offset"):0);e.each(function(){"height"==$(this).attr("data-height")?$(this).css("height",""):$(this).css("min-height","");var t="base-height"==a?$(this).outerheight():$(this).outerheight(!0);t>o&&(o=t)}),o+=i,e.each(function(){"height"==$(this).attr("data-height")?$(this).css("height",o):$(this).css("min-height",o)}),t.attr("data-related")&&$(t.attr("data-related")).css("height",t.height())})};return{init:function(){h(),u(),g(),b(),m(),v(),t(),u(),g(),f(),z(),i(),k(),w(),p(),c(),x(),y(),s(),d(),this.addresizehandler(h),e()},initajax:function(){b(),m(),v(),a(),t(),g(),u(),i(),w(),p(),c(),y()},initcomponents:function(){this.initajax()},setlastpopedpopover:function(e){t=e},addresizehandler:function(t){n.push(t)},runresizehandlers:function(){p()},scrollto:function(t,e){var o=t&&t.size()>0?t.offset().top:0;t&&($("body").hasclass("page-header-fixed")?o-=$(".page-header").height():$("body").hasclass("page-header-top-fixed")?o-=$(".page-header-top").height():$("body").hasclass("page-header-menu-fixed")&&(o-=$(".page-header-menu").height()),o+=e?e:-1*t.height()),$("html,body").animate({scrolltop:o},"slow")},initslimscroll:function(t){$(t).each(function(){if(!$(this).attr("data-initialized")){var t;t=$(this).attr("data-height")?$(this).attr("data-height"):$(this).css("height"),$(this).slimscroll({allowpagescroll:!0,size:"7px",color:$(this).attr("data-handle-color")?$(this).attr("data-handle-color"):"#bbb",wrapperclass:$(this).attr("data-wrapper-class")?$(this).attr("data-wrapper-class"):"slimscrolldiv",railcolor:$(this).attr("data-rail-color")?$(this).attr("data-rail-color"):"#eaeaea",position:e?"left":"right",height:t,alwaysvisible:"1"==$(this).attr("data-always-visible")?!0:!1,railvisible:"1"==$(this).attr("data-rail-visible")?!0:!1,disablefadeout:!0}),$(this).attr("data-initialized","1")}})},destroyslimscroll:function(t){$(t).each(function(){if("1"===$(this).attr("data-initialized")){$(this).removeattr("data-initialized"),$(this).removeattr("style");var t={};$(this).attr("data-handle-color")&&(t["data-handle-color"]=$(this).attr("data-handle-color")),$(this).attr("data-wrapper-class")&&(t["data-wrapper-class"]=$(this).attr("data-wrapper-class")),$(this).attr("data-rail-color")&&(t["data-rail-color"]=$(this).attr("data-rail-color")),$(this).attr("data-always-visible")&&(t["data-always-visible"]=$(this).attr("data-always-visible")),$(this).attr("data-rail-visible")&&(t["data-rail-visible"]=$(this).attr("data-rail-visible")),$(this).slimscroll({wrapperclass:$(this).attr("data-wrapper-class")?$(this).attr("data-wrapper-class"):"slimscrolldiv",destroy:!0});var e=$(this);$.each(t,function(t,o){e.attr(t,o)})}})},scrolltop:function(){app.scrollto()},blockui:function(t){t=$.extend(!0,{},t);var e="";if(e=t.animate?'
':t.icononly?'
':t.textonly?'
  '+(t.message?t.message:"loading...")+"
":'
  '+(t.message?t.message:"loading...")+"
",t.target){var o=$(t.target);o.height()<=$(window).height()&&(t.cenrery=!0),o.block({message:e,basez:t.zindex?t.zindex:1e3,centery:void 0!==t.cenrery?t.cenrery:!1,css:{top:"10%",border:"0",padding:"0",backgroundcolor:"none"},overlaycss:{backgroundcolor:t.overlaycolor?t.overlaycolor:"#555",opacity:t.boxed?.05:.1,cursor:"wait"}})}else $.blockui({message:e,basez:t.zindex?t.zindex:1e3,css:{border:"0",padding:"0",backgroundcolor:"none"},overlaycss:{backgroundcolor:t.overlaycolor?t.overlaycolor:"#555",opacity:t.boxed?.05:.1,cursor:"wait"}})},unblockui:function(t){t?$(t).unblock({onunblock:function(){$(t).css("position",""),$(t).css("zoom","")}}):$.unblockui()},startpageloading:function(t){t&&t.animate?($(".page-spinner-bar").remove(),$("body").append('
')):($(".page-loading").remove(),$("body").append('
  '+(t&&t.message?t.message:"loading...")+"
"))},stoppageloading:function(){$(".page-loading, .page-spinner-bar").remove()},alert:function(t){t=$.extend(!0,{container:"",place:"append",type:"success",message:"",close:!0,reset:!0,focus:!0,closeinseconds:0,icon:""},t);var e=app.getuniqueid("app_alert"),o='
'+(t.close?'':"")+(""!==t.icon?' ':"")+t.message+"
";return t.reset&&$(".custom-alerts").remove(),t.container?"append"==t.place?$(t.container).append(o):$(t.container).prepend(o):1===$(".page-fixed-main-content").size()?$(".page-fixed-main-content").prepend(o):($("body").hasclass("page-container-bg-solid")||$("body").hasclass("page-content-white"))&&0===$(".page-head").size()?$(".page-title").after(o):$(".page-bar").size()>0?$(".page-bar").after(o):$(".page-breadcrumb, .breadcrumbs").after(o),t.focus&&app.scrollto($("#"+e)),t.closeinseconds>0&&settimeout(function(){$("#"+e).remove()},1e3*t.closeinseconds),e},inituniform:function(t){t?$(t).each(function(){0===$(this).parents(".checker").size()&&($(this).show(),$(this).uniform())}):b()},updateuniform:function(t){$.uniform.update(t)},initfancybox:function(){u()},getactualval:function(t){return t=$(t),t.val()===t.attr("placeholder")?"":t.val()},geturlparameter:function(t){var e,o,a=window.location.search.substring(1),i=a.split("&");for(e=0;e