uawdijnntqw1x1x1
IP : 216.73.216.109
Hostname : premium160.web-hosting.com
Kernel : Linux premium160.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
batcwwjx
/
www
/
wp-content
/
plugins
/
.
/
charitable
/
assets
/
js
/
campaign-builder
/
admin-utils.min.js
/
/
var wpchar={cachedFields:{},savedState:false,initialSave:true,orders:{fields:[],choices:{}},init:function(){wpchar.bindUIActions();wpchar.initRadioGroupForCheckboxes();jQuery(wpchar.ready)},ready:function(){wpchar.savedState=wpchar.getFormState("#charitable-builder-form");wpchar.setFieldOrders();wpchar.setChoicesOrders()},bindUIActions:function(){jQuery(document).on("charitableFieldAdd",wpchar.setFieldOrders);jQuery(document).on("charitableFieldDelete",wpchar.setFieldOrders);jQuery(document).on("charitableFieldMove",wpchar.setFieldOrders);jQuery(document).on("charitableFieldAdd",wpchar.setChoicesOrders);jQuery(document).on("charitableFieldChoiceAdd",wpchar.setChoicesOrders);jQuery(document).on("charitableFieldChoiceDelete",wpchar.setChoicesOrders);jQuery(document).on("charitableFieldChoiceMove",wpchar.setChoicesOrders);jQuery(document).on("charitableFieldAdd",wpchar.fieldUpdate);jQuery(document).on("charitableFieldDelete",wpchar.fieldUpdate);jQuery(document).on("charitableFieldMove",wpchar.fieldUpdate);jQuery(document).on("focusout",".charitable-field-option-row-label input",wpchar.fieldUpdate);jQuery(document).on("charitableFieldChoiceAdd",wpchar.fieldUpdate);jQuery(document).on("charitableFieldChoiceDelete",wpchar.fieldUpdate);jQuery(document).on("charitableFieldChoiceMove",wpchar.fieldUpdate);jQuery(document).on("charitableFieldDynamicChoiceToggle",wpchar.fieldUpdate);jQuery(document).on("focusout",".charitable-field-option-row-choices input.label",wpchar.fieldUpdate)},setFieldOrders:function(){wpchar.orders.fields=[];jQuery(".charitable-field-option").each((function(){wpchar.orders.fields.push(jQuery(this).data("field-id"))}))},setChoicesOrders:function(){wpchar.orders.choices={};jQuery(".choices-list").each((function(){var fieldID=jQuery(this).data("field-id");wpchar.orders.choices["field_"+fieldID]=[];jQuery(this).find("li").each((function(){wpchar.orders.choices["field_"+fieldID].push(jQuery(this).data("key"))}))}))},getChoicesOrder:function(id){var choices=[];jQuery("#charitable-field-option-"+id).find(".choices-list li").each((function(){choices.push(jQuery(this).data("key"))}));return choices},initMultipleSelectWithSearch:function(self){const $element=jQuery(self.passedElement.element),$input=jQuery(self.input.element);if($element.prop("multiple")){$input.data("placeholder",$input.attr("placeholder"));if(self.getValue(true).length){$input.removeAttr("placeholder")}$element.on("change",(function(){self.getValue(true).length?$input.removeAttr("placeholder"):$input.attr("placeholder",$input.data("placeholder"))}))}},fieldUpdate:function(){var fields=wpchar.getFields();jQuery(document).trigger("charitableFieldUpdate",[fields]);wpchar.debug("fieldUpdate triggered")},getFields:function(allowedFields,useCache){useCache=useCache||false;fields=false;if(useCache&&!jQuery.isEmptyObject(wpchar.cachedFields)){fields=jQuery.extend({},wpchar.cachedFields);wpchar.debug("getFields triggered (cached)")}else{var formData=wpchar.formObject("#charitable-field-options"),fields=formData.fields,fieldBlockList=["captcha","content","divider","entry-preview","html","internal-information","layout","pagebreak"];if(!fields){return false}for(var key in fields){if(!fields[key].type||jQuery.inArray(fields[key].type,fieldBlockList)>-1){delete fields[key]}}wpchar.cachedFields=jQuery.extend({},fields);wpchar.debug("getFields triggered")}if(allowedFields&&allowedFields.constructor===Array){for(var key in fields){if(jQuery.inArray(fields[key].type,allowedFields)===-1){delete fields[key]}}}return fields},getField:function(id){var field=wpchar.formObject("#charitable-field-option-"+id);return field.fields[Object.keys(field.fields)[0]]},fieldOptionLoading:function(option,unload){var $option=jQuery(option),$label=$option.find("label"),spinner='<i class="charitable-loading-spinner charitable-loading-inline"></i>';unload=typeof unload!=="undefined";if(unload){$label.find(".charitable-loading-spinner").remove();$label.find(".charitable-help-tooltip").show();$option.find("input,select,textarea").prop("disabled",false)}else{$label.append(spinner);$label.find(".charitable-help-tooltip").hide();$option.find("input,select,textarea").prop("disabled",true)}},getFormState:function(el){return jQuery(el).serialize()},removeArrayItem:function(array,item){var removeCounter=0;for(var index=0;index<array.length;index++){if(array[index]===item){array.splice(index,1);removeCounter++;index--}}return removeCounter},sanitizeString:function(str){if(typeof str==="string"||str instanceof String){return str.trim()}return str},updateQueryString:function(key,value,url){if(!url){url=window.location.href}var re=new RegExp("([?&])"+key+"=.*?(&|#|$)(.*)","gi"),hash;if(re.test(url)){if(typeof value!=="undefined"&&value!==null)return url.replace(re,"$1"+key+"="+value+"$2$3");else{hash=url.split("#");url=hash[0].replace(re,"$1$3").replace(/(&|\?)$/,"");if(typeof hash[1]!=="undefined"&&hash[1]!==null)url+="#"+hash[1];return url}}else{if(typeof value!=="undefined"&&value!==null){var separator=url.indexOf("?")!==-1?"&":"?";hash=url.split("#");url=hash[0]+separator+key+"="+value;if(typeof hash[1]!=="undefined"&&hash[1]!==null)url+="#"+hash[1];return url}else return url}},getQueryString:function(name){var match=new RegExp("[?&]"+name+"=([^&]*)").exec(window.location.search);return match&&decodeURIComponent(match[1].replace(/\+/g," "))},removeQueryParam:function(name){if(wpchar.getQueryString(name)){var replace="[\\?&]"+name+"=[^&]+",re=new RegExp(replace);history.replaceState&&history.replaceState(null,"",location.pathname+location.search.replace(re,"").replace(/^&/,"?")+location.hash)}},isNumber:function(n){return!isNaN(parseFloat(n))&&isFinite(n)},amountSanitize:function(amount){amount=String(amount).replace(/[^0-9.,]/g,"");if(charitable_builder.currency_decimal===","){if(charitable_builder.currency_thousands==="."&&amount.indexOf(charitable_builder.currency_thousands)!==-1){amount=amount.replace(new RegExp("\\"+charitable_builder.currency_thousands,"g"),"")}else if(charitable_builder.currency_thousands===""&&amount.indexOf(".")!==-1){amount=amount.replace(/\./g,"")}amount=amount.replace(charitable_builder.currency_decimal,".")}else if(charitable_builder.currency_thousands===","&&amount.indexOf(charitable_builder.currency_thousands)!==-1){amount=amount.replace(new RegExp("\\"+charitable_builder.currency_thousands,"g"),"")}return wpchar.numberFormat(amount,charitable_builder.currency_decimals,".","")},amountFormat:function(amount){amount=String(amount);if(charitable_builder.currency_decimal===","&&amount.indexOf(charitable_builder.currency_decimal)!==-1){var sepFound=amount.indexOf(charitable_builder.currency_decimal);amount=amount.substr(0,sepFound)+"."+amount.substr(sepFound+1,amount.length-1)}if(charitable_builder.currency_thousands===","&&amount.indexOf(charitable_builder.currency_thousands)!==-1){amount=amount.replace(/,/g,"")}if(wpchar.empty(amount)){amount=0}return wpchar.numberFormat(amount,charitable_builder.currency_decimals,charitable_builder.currency_decimal,charitable_builder.currency_thousands)},amountFormatCurrency:function(amount){var sanitized=wpchar.amountSanitize(amount),formatted=wpchar.amountFormat(sanitized),result;if(charitable_builder.currency_symbol_pos==="right"){result=formatted+" "+charitable_builder.currency_symbol}else{result=charitable_builder.currency_symbol+" "+formatted}return result},numberFormat:function(number,decimals,decimalSep,thousandsSep){number=(number+"").replace(/[^0-9+\-Ee.]/g,"");var n=!isFinite(+number)?0:+number;var prec=!isFinite(+decimals)?0:Math.abs(decimals);var sep=typeof thousandsSep==="undefined"?",":thousandsSep;var dec=typeof decimalSep==="undefined"?".":decimalSep;var s="";var toFixedFix=function(n,prec){var k=Math.pow(10,prec);return""+(Math.round(n*k)/k).toFixed(prec)};s=(prec?toFixedFix(n,prec):""+Math.round(n)).split(".");if(s[0].length>3){s[0]=s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,sep)}if((s[1]||"").length<prec){s[1]=s[1]||"";s[1]+=new Array(prec-s[1].length+1).join("0")}return s.join(dec)},empty:function(mixedVar){var undef;var key;var i;var len;var emptyValues=[undef,null,false,0,"","0"];for(i=0,len=emptyValues.length;i<len;i++){if(mixedVar===emptyValues[i]){return true}}if(typeof mixedVar==="object"){for(key in mixedVar){if(mixedVar.hasOwnProperty(key)){return false}}return true}return false},debug:function(msg,type=""){if(!wpchar.isDebug()){return}if(type){type="("+type+")"}console.log("%cCharitable Debug: "+type,"color: #cd6622;",msg)},isDebug:function(){return window.location.hash&&"#charitabledebug"===window.location.hash||charitable_builder.debug},focusCaretToEnd:function(el){el.trigger("focus");var $thisVal=el.val();el.val("").val($thisVal)},formObject:function(el){var form=jQuery(el),fields=form.find("[name]"),json={},arraynames={};for(var v=0;v<fields.length;v++){var field=jQuery(fields[v]),name=field.prop("name").replace(/\]/gi,"").split("["),value=field.val(),lineconf={};if((field.is(":radio")||field.is(":checkbox"))&&!field.is(":checked")){continue}for(var i=name.length-1;i>=0;i--){var nestname=name[i];if(typeof nestname==="undefined"){nestname=""}if(nestname.length===0){lineconf=[];if(typeof arraynames[name[i-1]]==="undefined"){arraynames[name[i-1]]=0}else{arraynames[name[i-1]]+=1}nestname=arraynames[name[i-1]]}if(i===name.length-1){if(value){if(value==="true"){value=true}else if(value==="false"){value=false}else if(!isNaN(parseFloat(value))&&parseFloat(value).toString()===value){value=parseFloat(value)}else if(typeof value==="string"&&(value.substr(0,1)==="{"||value.substr(0,1)==="[")){try{value=JSON.parse(value)}catch(e){}}else if(typeof value==="object"&&value.length&&field.is("select")){var newValue={};for(var i=0;i<value.length;i++){newValue["n"+i]=value[i]}value=newValue}}lineconf[nestname]=value}else{var newobj=lineconf;lineconf={};lineconf[nestname]=newobj}}jQuery.extend(true,json,lineconf)}return json},initTooltips:function(){if(typeof jQuery.fn.tooltipster==="undefined"){return}jQuery(".charitable-help-tooltip").tooltipster({contentAsHTML:true,position:"right",maxWidth:300,multiple:true,interactive:true,debug:false,IEmin:11})},restoreTooltips:function($scope){$scope=typeof $scope!=="undefined"&&$scope&&$scope.length>0?$scope.find(".charitable-help-tooltip"):jQuery(".charitable-help-tooltip");$scope.each((function(){var $this=jQuery(this);if(jQuery.tooltipster.instances(this).length!==0){$this.attr("title",$this.tooltipster("content"))}}))},isURL:function(url){var protocolAndDomainRE=/^(?:http(?:s?):)?\/\/(\S+)/;var localhostDomainRE=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/;var nonLocalhostDomainRE=/^[^\s\.]+\.\S{2,}$/;if(typeof url!=="string"){return false}var match=url.match(protocolAndDomainRE);if(!match){return false}var everythingAfterProtocol=match[1];if(!everythingAfterProtocol){return false}if(localhostDomainRE.test(everythingAfterProtocol)||nonLocalhostDomainRE.test(everythingAfterProtocol)){return true}return false},sanitizeHTML:function(string,allowed){var purify=window.DOMPurify;if(typeof purify==="undefined"||typeof string==="undefined"){return string}if(typeof string!=="string"){string=string.toString()}const purifyOptions={ADD_ATTR:["target"]};if(typeof allowed!=="undefined"){purifyOptions.ALLOWED_TAGS=allowed}return purify.sanitize(string,purifyOptions).trim()},encodeHTMLEntities:function(string){if(typeof string!=="string"){string=string.toString()}return string.replace(/[\u00A0-\u9999<>&]/gim,(function(i){return"&#"+i.charCodeAt(0)+";"}))},initRadioGroupForCheckboxes:function(){var $=jQuery;$(document).on("change",'input[type="checkbox"].charitable-radio-group',(function(){var $input=$(this),inputId=$input.attr("id");if(!$input.prop("checked")){return}var groupName=$input.data("radio-group"),$group=$(".charitable-radio-group-"+groupName),$item;$group.each((function(){$item=$(this);if($item.attr("id")!==inputId){$item.prop("checked",false)}}))}))},listPluck:function(arr,column){return arr.map((function(x){if(typeof x!=="undefined"){return x[column]}return x}))},triggerEvent:function($element,eventName){console.warn('WARNING! Function "wpchar.triggerEvent( $element, eventName )" has been deprecated, please use the new "CharitableUtils.triggerEvent( $element, eventName, args )" function instead!');return CharitableUtils.triggerEvent($element,eventName)},wpautop:function(pee,br=true){let preTags=new Map;let _autopNewlinePreservationHelper=function(matches){return matches[0].replace("\n","<WPPreserveNewline />")};if(typeof pee!=="string"&&!(pee instanceof String)){return pee}if(pee.trim()===""){return""}pee=pee+"\n";if(pee.indexOf("<pre")>-1){let peeParts=pee.split("</pre>"),lastPee=peeParts.pop();pee="";peeParts.forEach((function(peePart,index){const start=peePart.indexOf("<pre");if(start===-1){pee+=peePart;return}let name="<pre wp-pre-tag-"+index+"></pre>";preTags[name]=peePart.substring(start)+"</pre>";pee+=peePart.substring(0,start)+name}));pee+=lastPee}pee=pee.replace(/<br \/>\s*<br \/>/,"\n\n");let allblocks="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";pee=pee.replace(new RegExp("(<"+allblocks+"[^>]*>)","gmi"),"\n$1");pee=pee.replace(new RegExp("(</"+allblocks+">)","gmi"),"$1\n\n");pee=pee.replace(/\r\n|\r/,"\n");if(pee.indexOf("\n")===0){pee=pee.substring(1)}if(pee.indexOf("<option")>-1){pee=pee.replace(/(?=(\s*))\2<option'/gim,"<option");pee=pee.replace(/<\/option>\s*/gim,"</option>")}if(pee.indexOf("</object>")>-1){pee=pee.replace(/(<object[^>]*>)\s*/gim,"$1");pee=pee.replace(/(?=(\s*))\2<\/object>/gim,"</object>");pee=pee.replace(/(?=(\s*))\2(<\/?(?:param|embed)[^>]*>)((?=(\s*))\2)/gim,"$1")}if(pee.indexOf("<source")>-1||pee.indexOf("<track")>-1){pee=pee.replace(/([<\[](?:audio|video)[^>\]]*[>\]])\s*/gim,"$1");pee=pee.replace(/(?=(\s*))\2([<\[]\/(?:audio|video)[>\]])/gim,"$1");pee=pee.replace(/(?=(\s*))\2(<(?:source|track)[^>]*>)(?=(\s*))\2/gim,"$1")}pee=pee.replace(/\n\n+/gim,"\n\n");let pees=pee.split(/\n\s*\n/);pee="";pees.forEach((function(tinkle){pee+="<p>"+tinkle.replace(/^(?:\s+|\s+)$/g,"")+"</p>\n"}));pee=pee.replace(/<p>\s*<\/p>/gim,"");pee=pee.replace(/<p>([^<]+)<\/(div|address|form)>/gim,"<p>$1</p></$2>");pee=pee.replace(new RegExp("<p>s*(</?"+allblocks+"[^>]*>)s*</p>","gmi"),"$1",pee);pee=pee.replace(/<p>(<li.+?)<\/p>/gim,"$1");pee=pee.replace(/<p><blockquote([^>]*)>/gim,"<blockquote$1><p>");pee=pee.replace(/<\/blockquote><\/p>/gim,"</p></blockquote>");pee=pee.replace(new RegExp("<p>s*(</?"+allblocks+"[^>]*>)","gmi"),"$1");pee=pee.replace(new RegExp("(</?"+allblocks+"[^>]*>)s*</p>","gmi"),"$1");if(br){pee=pee.replace(/<(script|style)(?:.|\n)*?<\/\\1>/gim,_autopNewlinePreservationHelper);pee=pee.replace(/(<br \/>)?((?=(\s*))\2)\n/gim,"<br />\n");pee=pee.replace("<WPPreserveNewline />","\n")}pee=pee.replace(new RegExp("(</?"+allblocks+"[^>]*>)s*<br />","gmi"),"$1");pee=pee.replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/gim,"$1");pee=pee.replace(/\n<\/p>$/gim,"</p>");if(Object.keys(preTags).length){pee=pee.replace(new RegExp(Object.keys(preTags).join("|"),"gi"),(function(matched){return preTags[matched]}))}return pee}};wpchar.init();
/home/batcwwjx/www/wp-content/plugins/./charitable/assets/js/campaign-builder/admin-utils.min.js