Submit
Path:
~
/
home
/
getwphos
/
public_html
/
sdp
/
wp-content
/
plugins
/
themestek-labtechco-extras
/
cs-framework
/
assets
/
js
/
File Content:
cs-framework.min.js
(function(e,t,n,i){"use strict";e.CSFRAMEWORK=e.CSFRAMEWORK||{};var a=e("body"),c=a.hasClass("rtl");e.fn.CSFRAMEWORK_TAB_NAVIGATION=function(){return this.each(function(){var t=e(this),n=t.find(".cs-nav"),i=t.find(".cs-reset"),a=t.find(".cs-expand-all");n.find("ul:first a").on("click",function(t){t.preventDefault();var a=e(this),c=a.next(),o=a.data("section");c.is("ul")?(c.slideToggle("fast"),a.closest("li").toggleClass("cs-tab-active")):(e("#cs-tab-"+o).show().siblings().hide(),n.find("a").removeClass("cs-section-active"),a.addClass("cs-section-active"),i.val(o))}),a.on("click",function(n){n.preventDefault(),t.find(".cs-body").toggleClass("cs-show-all"),e(this).find(".fa").toggleClass("fa-eye-slash").toggleClass("fa-eye")})})},e.CSFRAMEWORK.DEPENDENCY=function(t,n){var a=this;a.$el=e(t),a.el=t,a.init=function(){a.ruleset=e.deps.createRuleset();var t={show:function(e){e.removeClass("hidden")},hide:function(e){e.addClass("hidden")},log:!1,checkTargets:!1};n!==i?a.depSub():a.depRoot(),e.deps.enable(a.$el,a.ruleset,t)},a.depRoot=function(){a.$el.each(function(){e(this).find("[data-controller]").each(function(){var t=e(this),n=t.data("controller").split("|"),i=t.data("condition").split("|"),c=t.data("value").toString().split("|"),o=a.ruleset;e.each(n,function(e,n){var a=c[e]||"",s=i[e]||i[0];o=o.createRule('[data-depend-id="'+n+'"]',s,a),o.include(t)})})})},a.depSub=function(){a.$el.each(function(){e(this).find("[data-sub-controller]").each(function(){var t=e(this),n=t.data("sub-controller").split("|"),i=t.data("sub-condition").split("|"),c=t.data("sub-value").toString().split("|"),o=a.ruleset;e.each(n,function(e,n){var a=c[e]||"",s=i[e]||i[0];o=o.createRule('[data-sub-depend-id="'+n+'"]',s,a),o.include(t)})})})},a.init()},e.fn.CSFRAMEWORK_DEPENDENCY=function(t){return this.each(function(){new e.CSFRAMEWORK.DEPENDENCY(this,t)})},e.fn.CSFRAMEWORK_CHOSEN=function(){return this.each(function(){e(this).chosen({allow_single_deselect:!0,disable_search_threshold:15,width:parseFloat(e(this).actual("width")+25)+"px"})})},e.fn.CSFRAMEWORK_IMAGE_SELECTOR=function(){return this.each(function(){e(this).find("label").on("click",function(){e(this).siblings().find("input").prop("checked",!1)})})},e.fn.CSFRAMEWORK_SORTER=function(){return this.each(function(){var t=e(this),n=t.find(".cs-enabled"),i=t.find(".cs-disabled");n.sortable({connectWith:i,placeholder:"ui-sortable-placeholder",update:function(e,t){var n=t.item.find("input");t.item.parent().hasClass("cs-enabled")?n.attr("name",n.attr("name").replace("disabled","enabled")):n.attr("name",n.attr("name").replace("enabled","disabled"))}}),i.sortable({connectWith:n,placeholder:"ui-sortable-placeholder"})})},e.fn.CSFRAMEWORK_UPLOADER=function(){return this.each(function(){var t,n=e(this),i=n.find(".cs-add"),a=n.find("input");i.on("click",function(e){e.preventDefault(),"undefined"!=typeof wp&&wp.media&&wp.media.gallery&&(t?t.open():(t=wp.media({title:i.data("frame-title"),library:{type:i.data("upload-type")},button:{text:i.data("insert-title")}}),t.on("select",function(){var e=t.state().get("selection").first();a.val(e.attributes.url).trigger("change")}),t.open()))})})},e.fn.CSFRAMEWORK_IMAGE_UPLOADER=function(){return this.each(function(){var t,n=e(this),i=n.find(".cs-add"),a=n.find(".cs-image-preview"),c=n.find(".cs-remove"),o=n.find("input"),s=n.find("img");i.on("click",function(e){e.preventDefault(),"undefined"!=typeof wp&&wp.media&&wp.media.gallery&&(t?t.open():(t=wp.media({library:{type:"image"}}),t.on("select",function(){var e=t.state().get("selection").first().attributes,n=void 0!==e.sizes&&void 0!==e.sizes.thumbnail?e.sizes.thumbnail.url:e.url;a.removeClass("hidden"),s.attr("src",n),o.val(e.id).trigger("change")}),t.open()))}),c.on("click",function(e){e.preventDefault(),o.val("").trigger("change"),a.addClass("hidden")})})},e.fn.CSFRAMEWORK_IMAGE_GALLERY=function(){return this.each(function(){var t,n=e(this),i=n.find(".cs-edit"),a=n.find(".cs-remove"),c=n.find("ul"),o=n.find("input");n.find("img");n.on("click",".cs-add, .cs-edit",function(n){var s=e(this),l=o.val(),r=s.hasClass("cs-edit")?"edit":"add",d="add"!==r||l.length?"gallery-edit":"gallery";n.preventDefault(),"undefined"!=typeof wp&&wp.media&&wp.media.gallery&&("gallery"===d?(t=wp.media({library:{type:"image"},frame:"post",state:"gallery",multiple:!0}),t.open()):(t=wp.media.gallery.edit('[gallery ids="'+l+'"]'),"add"===r&&t.setState("gallery-library")),t.on("update",function(e){c.empty();var t=e.models.map(function(e){var t=e.toJSON(),n=void 0!==t.sizes.thumbnail?t.sizes.thumbnail.url:t.url;return c.append('<li><img src="'+n+'"></li>'),t.id});o.val(t.join(",")).trigger("change"),a.removeClass("hidden"),i.removeClass("hidden")}))}),a.on("click",function(e){e.preventDefault(),c.empty(),o.val("").trigger("change"),a.addClass("hidden"),i.addClass("hidden")})})},e.fn.CSFRAMEWORK_TYPOGRAPHY=function(){return this.each(function(){var t=e(this),n=t.find(".cs-typo-family"),i=t.find(".cs-typo-variant"),a=t.find(".cs-typo-font");n.on("change",function(){var t=e(this),n=t.find(":selected").data("type")||"custom",c=t.find(":selected").data("variants");i.length&&(i.find("option").remove(),e.each(c.split("|"),function(e,t){i.append('<option value="'+t+'">'+t+"</option>")}),i.find('option[value="regular"]').attr("selected","selected").trigger("chosen:updated")),a.val(n)})})},e.fn.CSFRAMEWORK_GROUP=function(){return this.each(function(){var t=e(this),n=t.find(".cs-groups"),i=t.find(".cs-accordion"),a=t.find(".cs-group:first").clone();i.length&&i.accordion({header:".cs-group-title",collapsible:!0,active:!1,animate:250,heightStyle:"content",icons:{header:"dashicons dashicons-arrow-right",activeHeader:"dashicons dashicons-arrow-down"},beforeActivate:function(t,n){e(n.newPanel).CSFRAMEWORK_DEPENDENCY("sub")}}),n.sortable({axis:"y",handle:".cs-group-title",helper:"original",cursor:"move",placeholder:"widget-placeholder",start:function(e,t){var i=t.item.children(".cs-group-content");"block"===i.css("display")&&(i.hide(),n.sortable("refreshPositions"))},stop:function(e,t){t.item.children(".cs-group-title").triggerHandler("focusout"),i.accordion({active:!1})}});e(".cs-add-group",t).on("click",function(e){e.preventDefault(),a.find("input, select, textarea").each(function(){this.name=this.name.replace(/\[(\d+)\]/,function(e,t){return"["+(parseInt(t,10)+1)+"]"})});var t=a.clone().removeClass("hidden");n.append(t),i.length&&(n.accordion("refresh"),n.accordion({active:t.index()})),n.find("input, select, textarea").each(function(){this.name=this.name.replace("[_nonce]","")}),t.CSFRAMEWORK_DEPENDENCY("sub"),t.CSFRAMEWORK_RELOAD_PLUGINS(),0}),n.on("click",".cs-remove-group",function(t){t.preventDefault(),e(this).closest(".cs-group").remove()})})},e.fn.CSFRAMEWORK_CONFIRM=function(){return this.each(function(){e(this).on("click",function(e){confirm("Are you sure?")||e.preventDefault()})})},e.fn.CSFRAMEWORK_SAVE=function(){return this.each(function(){var t=e(this),i=t.data("save"),a=t.val(),c=e("#cs-save-ajax");e(n).on("keydown",function(e){(e.ctrlKey||e.metaKey)&&"s"===String.fromCharCode(e.which).toLowerCase()&&(e.preventDefault(),t.trigger("click"))}),t.on("click",function(n){if(c.length){"object"==typeof tinyMCE&&tinyMCE.triggerSave(),t.prop("disabled",!0).attr("value",i);var o=e("#csframework_form").serialize();e.post("options.php",o).error(function(){alert("Error, Please try again.")}).success(function(){t.prop("disabled",!1).attr("value",a),c.hide().fadeIn().delay(250).fadeOut()}),n.preventDefault()}else t.addClass("disabled").attr("value",i)})})},e.fn.CSFRAMEWORK_TAXONOMY=function(){return this.each(function(){var t=e(this),n=t.parent();if("addtag"===n.attr("id")){var i=n.find("#submit"),a=(n.find("#tag-name"),n.find(".cs-framework")),c=a.find(".cs-element").clone(),o=e("#the-list"),s=!1;i.on("click",function(){s||o.on("DOMNodeInserted",function(){s&&(a.empty(),a.html(c),c=c.clone(),a.CSFRAMEWORK_RELOAD_PLUGINS(),a.CSFRAMEWORK_DEPENDENCY(),s=!1)}),s=!0})}})},void 0!==e.widget&&void 0!==e.ui&&void 0!==e.ui.dialog&&e.widget("ui.dialog",e.ui.dialog,{_createOverlay:function(){this._super(),this.options.modal&&this._on(this.overlay,{click:"close"})}}),e.CSFRAMEWORK.ICONS_MANAGER=function(){var n,i=this,c=!0;i.init=function(){a.on("click",".cs-icon-add",function(i){i.preventDefault();var o=e(this),s=e("#cs-icon-dialog"),l=s.find(".cs-dialog-load"),r=(s.find(".cs-dialog-select"),s.find(".cs-dialog-insert"),s.find(".cs-icon-search"));n=o.closest(".cs-icon-select"),s.dialog({width:850,height:700,modal:!0,resizable:!1,closeOnEscape:!0,position:{my:"center",at:"center",of:t},open:function(){a.addClass("cs-icon-scrolling"),e(".ui-dialog-titlebar-close").addClass("ui-button"),e(t).on("resize",function(){var n=e(t).height(),i=Math.floor(n-237),a=Math.floor(n-125);s.dialog("option","height",a).parent().css("max-height",a),s.css("overflow","auto"),l.css("height",i)}).resize()},close:function(){a.removeClass("cs-icon-scrolling")}}),c&&e.ajax({type:"POST",url:ajaxurl,data:{action:"cs-get-icons"},success:function(t){l.html(t),c=!1,l.on("click","a",function(t){t.preventDefault();var i=e(this).data("cs-icon");n.find("i").removeAttr("class").addClass(i),n.find("input").val(i).trigger("change"),n.find(".cs-icon-preview").removeClass("hidden"),n.find(".cs-icon-remove").removeClass("hidden"),s.dialog("close")}),r.keyup(function(){var t=e(this).val(),n=l.find("a");n.each(function(){var n=e(this);n.data("cs-icon").search(new RegExp(t,"i"))<0?n.hide():n.show()})}),l.find(".cs-icon-tooltip").cstooltip({html:!0,placement:"top",container:"body"})}})}),a.on("click",".cs-icon-remove",function(t){t.preventDefault();var n=e(this),i=n.closest(".cs-icon-select");i.find(".cs-icon-preview").addClass("hidden"),i.find("input").val("").trigger("change"),n.addClass("hidden")})},i.init()},e.CSFRAMEWORK.SHORTCODE_MANAGER=function(){var n,c=this;c.init=function(){var i,o,s,l,r,d=e("#cs-shortcode-dialog"),u=d.find(".cs-dialog-insert"),f=d.find(".cs-dialog-load"),h=d.find(".cs-dialog-select"),p=!1;a.on("click",".cs-shortcode",function(n){n.preventDefault(),h.CSFRAMEWORK_CHOSEN(),l=e(this),p=l.hasClass("cs-shortcode-textarea"),r=l.data("editor-id"),d.dialog({width:850,height:700,modal:!0,resizable:!1,closeOnEscape:!0,position:{my:"center",at:"center",of:t},open:function(){a.addClass("cs-shortcode-scrolling"),e(".ui-dialog-titlebar-close").addClass("ui-button"),e(t).on("resize",function(){var n=e(t).height(),i=Math.floor(n-281),a=Math.floor(n-125);d.dialog("option","height",a).parent().css("max-height",a),d.css("overflow","auto"),d.css("height","421px"),f.css("height",i)}).resize()},close:function(){p=!1,a.removeClass("cs-shortcode-scrolling")}})}),h.on("change",function(){var t=e(this);i=t.val(),o=t.find(":selected").data("view"),i.length?e.ajax({type:"POST",url:ajaxurl,data:{action:"cs-get-shortcode",shortcode:i},success:function(t){f.html(t),u.parent().removeClass("hidden"),s=e(".cs-shortcode-clone",d).clone(),f.CSFRAMEWORK_DEPENDENCY(),f.CSFRAMEWORK_DEPENDENCY("sub"),f.CSFRAMEWORK_RELOAD_PLUGINS()}}):(u.parent().addClass("hidden"),f.html(""))}),u.on("click",function(t){t.preventDefault();var a="",s="data-atts",u="data-clone-atts",f="data-clone-id";switch(o){case"contents":e("["+s+"]",".cs-dialog-load").each(function(){var t=e(this),n=t.data("atts");a+="["+n+"]",a+=t.val(),a+="[/"+n+"]"});break;case"clone":a+="["+i,e("["+s+"]",".cs-dialog-load .cs-element:not(.hidden)").each(function(){var t=e(this),n=t.data("atts");a+=c.validate_atts(n,t)}),a+="]",e("["+f+"]",".cs-dialog-load").each(function(){var t=e(this),n=t.data("clone-id");a+="["+n,e("["+u+"]",t.find(".cs-element").not(".hidden")).each(function(){var t=e(this),i=t.data("clone-atts");"content"!==i?a+=c.validate_atts(i,t):"content"===i&&(a+="]",a+=t.val(),a+="[/"+n)}),a+="]"}),a+="[/"+i+"]";break;case"clone_duplicate":e("["+f+"]",".cs-dialog-load").each(function(){var t=e(this),n=t.data("clone-id");a+="["+n,e("["+u+"]",t.find(".cs-element").not(".hidden")).each(function(){var t=e(this),i=t.data("clone-atts");"content"!==i?a+=c.validate_atts(i,t):"content"===i&&(a+="]",a+=t.val(),a+="[/"+n)}),a+="]"});break;default:a+="["+i,e("["+s+"]",".cs-dialog-load .cs-element:not(.hidden)").each(function(){var t=e(this),n=t.data("atts");"content"!==n?a+=c.validate_atts(n,t):"content"===n&&(a+="]",a+=t.val(),a+="[/"+i)}),a+="]"}if(p){var h=l.next();h.val(c.insertAtChars(h,a)).trigger("change")}else c.send_to_editor(a,r);n=null,d.dialog("close")});var g=0;d.on("click","#shortcode-clone-button",function(t){t.preventDefault();var n=s.clone().hide();n.find("input:radio").attr("name","_nonce_"+g),e(".cs-shortcode-clone:last").after(n),n.slideDown(100),n.find(".cs-remove-clone").show().on("click",function(e){n.slideUp(100,function(){n.remove()}),e.preventDefault()}),n.CSFRAMEWORK_DEPENDENCY("sub"),n.CSFRAMEWORK_RELOAD_PLUGINS(),g++})},c.validate_atts=function(t,a){var c;return a.data("check")!==i&&n===t?"":(n=t,!0===a.closest(".pseudo-field").hasClass("hidden")?"":!0===a.hasClass("pseudo")?"":(c=a.is(":checkbox")||a.is(":radio")?a.is(":checked")?a.val():"":a.val(),a.data("check")!==i&&(c=a.closest(".cs-element").find("input:checked").map(function(){return e(this).val()}).get()),null!==c&&c!==i&&""!==c&&0!==c.length?" "+t+'="'+c+'"':""))},c.insertAtChars=function(e,t){var n=void 0!==e[0].name?e[0]:e;return n.value.length&&void 0!==n.selectionStart?(n.focus(),n.value.substring(0,n.selectionStart)+t+n.value.substring(n.selectionEnd,n.value.length)):(n.focus(),t)},c.send_to_editor=function(t,n){var i;if("undefined"!=typeof tinymce&&(i=tinymce.get(n)),i&&!i.isHidden())i.execCommand("mceInsertContent",!1,t);else{var a=e("#"+n);a.val(c.insertAtChars(a,t)).trigger("change")}},c.init()},"function"==typeof Color&&(Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var e=parseInt(this._color,10).toString(16);if(this.error)return"";if(e.length<6)for(var t=6-e.length-1;t>=0;t--)e="0"+e;return"#"+e}),e.CSFRAMEWORK.PARSE_COLOR_VALUE=function(e){var t=e.replace(/\s+/g,""),n=-1!==t.indexOf("rgba")?parseFloat(100*t.replace(/^.*,(.+)\)/,"$1")):100,i=n<100;return{value:t,alpha:n,rgba:i}},e.fn.CSFRAMEWORK_COLORPICKER=function(){return this.each(function(){var t=e(this);if(!1!==t.data("rgba")){var n=e.CSFRAMEWORK.PARSE_COLOR_VALUE(t.val());t.wpColorPicker({clear:function(){t.trigger("keyup")},change:function(e,n){var i=n.color.toString();t.closest(".wp-picker-container").find(".cs-alpha-slider-offset").css("background-color",i),t.val(i).trigger("change")},create:function(){var i=t.data("a8cIris"),c=t.closest(".wp-picker-container"),o=e('<div class="cs-alpha-wrap"><div class="cs-alpha-slider"></div><div class="cs-alpha-slider-offset"></div><div class="cs-alpha-text"></div></div>').appendTo(c.find(".wp-picker-holder")),s=o.find(".cs-alpha-slider"),l=o.find(".cs-alpha-text"),r=o.find(".cs-alpha-slider-offset");s.slider({slide:function(e,n){var a=parseFloat(n.value/100);i._color._alpha=a,t.wpColorPicker("color",i._color.toString()),l.text(a<1?a:"")},create:function(){var d=parseFloat(n.alpha/100),u=d<1?d:"";l.text(u),r.css("background-color",n.value),c.on("click",".wp-picker-clear",function(){i._color._alpha=1,l.text("").trigger("change"),s.slider("option","value",100).trigger("slide")}),c.on("click",".wp-picker-default",function(){var n=e.CSFRAMEWORK.PARSE_COLOR_VALUE(t.data("default-color")),a=parseFloat(n.alpha/100),c=a<1?a:"";i._color._alpha=a,l.text(c),s.slider("option","value",n.alpha).trigger("slide")}),c.on("click",".wp-color-result",function(){o.toggle()}),a.on("click.wpcolorpicker",function(){o.hide()})},value:n.alpha,step:1,min:1,max:100})}})}else t.wpColorPicker({clear:function(){t.trigger("keyup")},change:function(e,n){t.val(n.color.toString()).trigger("change")}})})},e.CSFRAMEWORK.WIDGET_RELOAD_PLUGINS=function(){e(n).on("widget-added widget-updated",function(e,t){t.CSFRAMEWORK_RELOAD_PLUGINS(),t.CSFRAMEWORK_DEPENDENCY()})},e.fn.CSFRAMEWORK_TOOLTIP=function(){return this.each(function(){var t=c?"right":"left";e(this).cstooltip({html:!0,placement:t,container:"body"})})},e.fn.CSFRAMEWORK_RELOAD_PLUGINS=function(){return this.each(function(){e(".chosen",this).CSFRAMEWORK_CHOSEN(),e(".cs-field-image-select",this).CSFRAMEWORK_IMAGE_SELECTOR(),e(".cs-field-image",this).CSFRAMEWORK_IMAGE_UPLOADER(),e(".cs-field-gallery",this).CSFRAMEWORK_IMAGE_GALLERY(),e(".cs-field-sorter",this).CSFRAMEWORK_SORTER(),e(".cs-field-upload",this).CSFRAMEWORK_UPLOADER(),e(".cs-field-typography",this).CSFRAMEWORK_TYPOGRAPHY(),e(".cs-field-color-picker",this).CSFRAMEWORK_COLORPICKER(),e(".cs-help",this).CSFRAMEWORK_TOOLTIP()})},e(n).ready(function(){e(".cs-framework").CSFRAMEWORK_TAB_NAVIGATION(),e(".cs-reset-confirm, .cs-import-backup").CSFRAMEWORK_CONFIRM(),e(".cs-content, .wp-customizer, .widget-content, .cs-taxonomy").CSFRAMEWORK_DEPENDENCY(),e(".cs-field-group").CSFRAMEWORK_GROUP(),e(".cs-save").CSFRAMEWORK_SAVE(),e(".cs-taxonomy").CSFRAMEWORK_TAXONOMY(),e(".cs-framework, #widgets-right").CSFRAMEWORK_RELOAD_PLUGINS(),e.CSFRAMEWORK.ICONS_MANAGER(),e.CSFRAMEWORK.SHORTCODE_MANAGER(),e.CSFRAMEWORK.WIDGET_RELOAD_PLUGINS()})})(jQuery,window,document);
Submit
FILE
FOLDER
Name
Size
Permission
Action
vendor
---
0755
cs-framework.min.js
17145 bytes
0644
cs-plugins.min.js
41179 bytes
0644
N4ST4R_ID | Naxtarrr