1(function(){var initializing=false,fnTest=/xyz/.test(function(){xyz;})?/\b_super\b/:/.*/;this.Class=function(){};Class.extend=function(prop){var _super=this.prototype;initializing=true;var prototype=new this();initializing=false;for(var name in prop){prototype[name]=typeof prop[name]=="function"&&typeof _super[name]=="function"&&fnTest.test(prop[name])?(function(name,fn){return function(){var tmp=this._super;this._super=_super[name];var ret=fn.apply(this,arguments);this._super=tmp;return ret;};})(name,prop[name]):prop[name];} 2function Class(){if(!initializing&&this.init) 3this.init.apply(this,arguments);} 4Class.prototype=prototype;Class.constructor=Class;Class.extend=arguments.callee;return Class;};})();var glCache={version:'1.0',cache:[],defaultExpire:1*60,setData:function(id,data,expire){if(!id||!data){return false;} 5this.clear(id);var now=(new Date()).getTime()/ 1000|0;expire=(expire==0)?expire:(now+(expire?expire:this.defaultExpire));this.cache[id]={expire:expire,data:data};return true;},getData:function(id){var cache=this.cache[id];if(!cache){return null;} 6else{var now=(new Date()).getTime()/ 1000|0;if(now>=cache.expire&&cache.expire!=0){this.clear(id);return null;} 7else{return cache.data;}}},clear:function(id){return delete this.cache[id];},clearAll:function(){for(var i in this.cache){if(!this.clear(i)){return false;}} 8return true;}} 9function SearchPostFilter(){jQuery("#post-search-input").attr("disabled","disabled");return true;} 10function s(v){if(v.constructor==String){return jQuery('#'+v);} 11else{return jQuery(v);}} 12function empty(v){if(v==undefined)return true;if(!v)return true;if((v.constructor===String)&&(v==''))return true;if((v.constructor===Array)&&(v.length==0))return true;return false;} 13function RouteToPage(url,lock_id){document.location.href=url;var r=doAjax({lock:jQuery('body')[0],dataType:'json',url:url,onSuccess:function(data){}});doAddAjax(r,'Router');} 14function mmJSONDatafilter(data,type){if(type=='json'){var firstChar=data.slice(0,1);var lastChar=data.slice(data.length,data.length+1);if((firstChar!=='{')||(firstChar!=='"')||(lastChar!=='}')||(lastChar!=='"')){var candidate;var firstQuote=data.indexOf('"');var lastQuote=data.lastIndexOf('"');var firstCurly=data.indexOf("{");var lastCurly=data.lastIndexOf("}");if(firstQuote&&(firstQuote!=lastQuote)&&(!lastCurly||(lastQuote>lastCurly))){candidate=data.slice(firstQuote,lastQuote+1);return candidate;} 15else if(firstCurly&&(firstCurly!=lastCurly)&&(!lastQuote||(lastCurly>lastQuote))){candidate=data.slice(firstCurly,lastCurly+1);return candidate;}}} 16return data;} 17function doAjax(options){if(doGetCacheAJAX(options)){return false;} 18if(!options.ignoreStack){if(!window.ajax_request_version){window.ajax_request_version=0;} 19options.version=++window.ajax_request_version;} 20if(options.lock){doAjaxLock(options.lock);} 21var xhr=jQuery.ajax({async:options.sjax===false?false:true,data:options.data,dataType:options.dataType||'json',type:options.type||'POST',url:options.url,dataFilter:mmJSONDatafilter,success:function(data,status){if(options.ignoreStack||(window.ajax_request_version==options.version)){if(data.redirect){alert(wp.i18n.sprintf(wp.i18n.__("Session expired. You will be redirected to '%s' page.","membermouse"),data.redirect));document.location=data.redirect;return;} 22if(options.onSuccess&&!data.errors){options.onSuccess(data,status);} 23doSetCacheAJAX(options,data);} 24if(options.lock){doAjaxUnlock(options.lock);}},error:function(XMLHttpRequest,status,errorThrown){if(options.ignoreStack||(window.ajax_request_version==options.version)){if(options.onError){options.onError(XMLHttpRequest,status);} 25onAjaxError(XMLHttpRequest,status);} 26if(options.lock){doAjaxUnlock(options.lock);}},cache:false});var request={xhr:xhr,options:options};return request;} 27function doGetCacheAJAX(options){if(glCache&&options.cacheId){var cache=glCache.getData(options.cacheId);if(cache){if(cache.errors&&options.onError){options.onError(cache.errors);} 28else if(options.onSuccess){options.onSuccess(cache);} 29return true;}} 30return false;} 31function doSetCacheAJAX(options,data){if(glCache&&options.cacheId&&!options.noCache){return glCache.setData(options.cacheId,data,options.cacheExpire);}} 32function doCancelAjax(id){if(!mm||!mm.ajaxRequests)return;var requests=mm.ajaxRequests[id];jQuery(requests).each(function(){if(this.options){if(this.options.lock) 33doAjaxUnlock(this.options.lock);} 34if(this.xhr){this.xhr.abort();}});delete mm.ajaxRequests[id];mm.ajaxRequests[id]=null;} 35function doAddAjax(r,id){if(!window.mm) 36window.mm={};if(!mm.ajaxRequests) 37mm.ajaxRequests=[];if(!mm.ajaxRequests[id]) 38mm.ajaxRequests[id]=[];var requests=mm.ajaxRequests[id];requests.push(r);return requests;} 39function onAjaxError(xhr,status){var errinfo={errcode:status};if(xhr.status!=200){errinfo.message=xhr.statusText;} 40else{errinfo.message=wp.i18n.sprintf(wp.i18n.__("Incorrect response data: %s","membermouse"),xhr.responseText);} 41if(status=='parsererror'){alert(wp.i18n.sprintf(wp.i18n.__("[AJAX ER
41ROR] %s","membermouse"),errinfo.message));}} 42function addMessages(messages,classes,parent){var content='';jQuery(messages).each(function(){content=content+'<li>'+this+'</li>';});if(content!=''){var str='<div class="'+classes+'"><ul>'+content+'</ul></div>';parent.prepend(str);}} 43function processMessages(data,parentElement,scrollContainer){parentElement=s(parentElement||'message-container');if(!empty(data.pageMessages)){addMessages(data.pageMessages,'message-container',parentElement);} 44if(!empty(data.pageErrors)){addMessages(data.pageErrors,'message-container',parentElement);} 45if(scrollContainer){s(scrollContainer)[0].scrollTop=0;} 46return true;} 47function clearMessages(parentElement){parentElement=s(parentElement||'mm-messages-container');jQuery('.message-container',parentElement).remove();} 48function doAjaxLock(element){if(!element)return;jQuery(element).show();jQuery(element).css('disabled','disabled');if(!element.lockArea) 49element.lockArea=jQuery('<div class="lock-area"></div>');if(!element.lockAreaTitle) 50element.lockAreaTitle=jQuery('<div class="lock-area-title"></div>');arrangeElementAbove(element.lockArea,element,true,null,98);var posDelta={top:element.offsetHeight / 2-10,left:element.offsetWidth / 2-110};arrangeElementAbove(element.lockAreaTitle,element.lockArea[0],false,posDelta,99);viewAjaxLock(element,true);if(!element.lockCount){element.lockCount=0;} 51element.lockCount++;} 52function doAjaxUnlock(element){if(!element||!element.lockCount) 53return;element.lockCount--;if(element.lockCount==0){if(element.lockAreaTitle) 54element.lockAreaTitle.remove();if(element.lockArea) 55element.lockArea.remove();jQuery(element).css('disabled','');}} 56function viewAjaxLock(element,isVisible){if(element&&element.lockArea&&element.lockAreaTitle){if(isVisible){element.lockArea.show();element.lockAreaTitle.show();repositionAjaxLock(element);} 57else{element.lockArea.hide();element.lockAreaTitle.hide();}}} 58function repositionAjaxLock(element,isCopySize){if(!element.lockArea||!element.lockAreaTitle)return;repositionElementAbove(element.lockArea,element,null);if(isCopySize){jQuery(element.lockArea).height(element.offsetHeight).width(element.offsetWidth);} 59var posDelta={top:element.offsetHeight / 2-10,left:element.offsetWidth / 2-110};repositionElementAbove(element.lockAreaTitle,element.lockArea[0],posDelta);} 60function arrangeElementAbove(element,target,isCopySize,posDelta,zIndex){if(!repositionElementAbove(element,target,posDelta))return;if(isCopySize){element.height(target.offsetHeight).width(target.offsetWidth);} 61if(zIndex){element.css('z-index',zIndex);} 62jQuery(document.body).append(element);return element;} 63function repositionElementAbove(element,target,posDelta){if(!element||!target) 64return false;var t=jQuery(target).offset().top;var l=jQuery(target).offset().left;if(posDelta&&posDelta.top) 65t=t+posDelta.top;if(posDelta&&posDelta.left) 66l=l+posDelta.left;element.css('position','absolute').css('top',t).css('left',l);return true;} 67function applyTableCheckboxes(table){var mainBox=jQuery('TH.checkbox INPUT',table);mainBox.unbind('click');mainBox.bind('click',function(){if(this.checked){jQuery('TD.checkbox INPUT',table).prop('checked','true');} 68else{jQuery('TD.checkbox INPUT',table).prop('checked','false');}});}jQuery.fn.center=function(){this.css("position","absolute");this.css("top",((jQuery(window).height()-this.outerHeight())/ 2)+jQuery(window).scrollTop()+"px");this.css("left",((jQuery(window).width()-this.outerWidth())/ 2)+jQuery(window).scrollLeft()+"px");return this;} 69var MM_Ajax=Class.extend({init:function(custom_url,module,action,method){this.url=wpadmin_url+'admin-ajax.php';this.module=module;this.action=action;this.useLoader=true;this.method=method;this.postvars="";this.hideButton=true;this.dataType='json';this.response="";if(isAdministrationSection!=undefined){if(!isAdministrationSection){this.lockarea="main";} 70else{this.lockarea="wpwrap";}} 71else{this.lockarea="wpwrap";}},dump:function(type){if(type=='post') 72alert("class.ajax.js:\n\n"+this.postvars);else if(type=='response') 73alert("class.ajax.js:\n\n"+this.response);},sendWithoutLoader:function(data,lockdiv,returnobj,returnfunc,datatype){this.postvars="";this.response="";for(var eachvar in data){this.postvars+=eachvar+": "+data[eachvar]+"\n";} 74if(!lockdiv) 75lockdiv='body';data.method=this.method;data.action=this.action;data.module=this.module;var responseType=this.dataType;if(datatype!=undefined){responseType=datatype;} 76var self=this;var r=doAjax({sjax:this.async===false?false:true,data:data,lock:jQuery(''+lockdiv)[0],url:this.url,dataType:responseType,onSuccess:function(data){self.stopLoader(data);for(var eachvar in data){this.response+=eachvar+": "+data[eachvar]+"\n";} 77window[returnobj][returnfunc](data);},onError:function(e){console.log(e);}});doAddAjax(r,this.module+"Request");},send:function(data,lockdiv,returnobj,returnfunc,datatype){this.postvars="";this.response="";for(var eachvar in data){this.postvars+=eachvar+": "+data[eachvar]+"\n";} 78if(!lockdiv) 79lockdiv='body';data.method=this.method;data.action=this.action;data.module=this.module;var responseType=this.dataType;if(datatype!=undefined){responseType=datatype;} 80var self=this;this.startLoader();var r=doAjax({sjax:this.async===false?false:true,data:data,lock:jQuery(''+lockdiv)[0],url:this.url,dataType:responseType,onSuccess:function(data){self.stopLoader(data);for(var eachvar in data){this.response+=eachvar+": "+data[eachvar]+"\n";} 81window[returnobj][returnfunc](data);},onError:function(e){self.stopLoader();}});doAddAjax(r,this.module+"Request");},createLoaderDiv:function(){jQuery("<div id=\"mm-progressbar-container\" style='position:absolute;
81left: 38%; top:30%; z-index: 10000;opacity:1;' ><div id=\"mm-progressbar\" style=\"width:350px; height:22px; border: 1px solid #ccc;\"></div></div>").hide().appendTo("body").fadeIn();},lock:function(){jQuery("<div id=\"mm-lockscreen-container\" disabled=\"disabled\" style='background-color:#f7f7f7; position:absolute;left: 0%; top:0%; width:100%; height:100%; z-index: 9999;opacity:0.3;' ></div>").hide().appendTo("body").fadeIn();},unlock:function(){if(jQuery("#mm-lockscreen-container").length){jQuery("#mm-lockscreen-container").remove();}},startLoader:function(lockarea){if(this.hideButton){if(smartTagLibDialog!=undefined){try{smartTagLibDialog.preventDblClick();}catch(e){}} 82else if(mmdialog_js!=undefined){try{mmdialog_js.preventDblClick();}catch(e){}}} 83if(!this.useLoader){return false;} 84if(jQuery("#mm-progressbar-container").length){return false;} 85var center=" ";jQuery("<style type='text/css'> .ui-progressbar-value { "+center+" background-image: url('"+globalurl+"/resources/images/pbar-animated.gif');} </style>").appendTo("head");this.createLoaderDiv();if(lockarea!=undefined){this.lockarea=lockarea;} 86this.lock();jQuery("#mm-progressbar-container").center();jQuery("#mm-lockscreen-container").center();if(jQuery().progressbar){jQuery("#mm-progressbar").progressbar({value:100});}},stopLoader:function(response){if(this.hideButton){if(smartTagLibDialog!=undefined){try{if(response!=undefined){if(response.type!=undefined){if(response.type=='error'){smartTagLibDialog.releaseButton();}} 87else{smartTagLibDialog.releaseButton();}} 88else{smartTagLibDialog.releaseButton();}}catch(e){}} 89else if(mmdialog_js!=undefined){try{if(response!=undefined){if(response.type!=undefined){if(response.type=='error'){mmdialog_js.releaseButton();}} 90else{mmdialog_js.releaseButton();}} 91else{mmdialog_js.releaseButton();}}catch(e){}}} 92this.unlock();jQuery("#mm-progressbar-container").remove();},});jQuery.fn.isBound=function(type,fn){var data=this.data('events')[type];if(data===undefined||data.length===0){return false;} 93return(-1!==jQuery.inArray(fn,data));};var clickCount=0;var allowDblClick=false;var dialogIsOpen=false;var MM_DialogJS=Class.extend({init:function(dblClick){this.method="performAction";this.action="module-handle";var size=this.getWindowSize();this.dialogWidth=650;this.dialogHeight=size.height-130;},allowDoubleClick:function(allow){allowDblClick=allow;},getWindowSize:function(){var size={height:0,width:0,};if(typeof(window.innerWidth)=='number'){size.width=window.innerWidth;size.height=window.innerHeight;} 94else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){size.width=document.documentElement.clientWidth;size.height=document.documentElement.clientHeight;} 95else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){size.width=document.body.clientWidth;size.height=document.body.clientHeight;} 96return size;},showDialog:function(dialogId,module,width,height,title,params,methodReplace,objName){this.dialogId=dialogId;if(title!=undefined){this.dialogTitle=title;} 97if(width==undefined||width==""){this.width=this.dialogWidth;} 98else{this.width=width;} 99if(height==undefined||height==""){this.height=this.dialogHeight;} 100else{this.height=height;} 101var values={mm_action:"showDialog"};if((params!=undefined)&&(typeof params=="object")){for(var key in params){try{values[key]=(typeof params[key]=="string")?params[key].replace(/(\')/g,""):params[key];} 102catch(e){alert(e+" : "+key);}}} 103else{values.id=params;} 104var methodName=this.method;if(methodReplace!=undefined&&methodReplace!=""){methodName=methodReplace;} 105var obj="mmdialog_js";if(objName!=undefined&&objName!=""){obj=objName;} 106var ajax=new MM_Ajax(false,module,this.action,methodName);ajax.send(values,false,obj,"showDialogCallback");},createDiv:function(id){if(jQuery("#"+id).length==0){jQuery("<div id='"+id+"' style='font-size: 14px;'></div>").hide().appendTo("body").fadeIn();}},displayMessage:function(message,width,height,title,id,button){this.width=450;this.height=300;var button_obj={};title=title!=undefined?title:'';if(width!=undefined&&width>0){this.width=width;} 107if(height!=undefined&&height>0){this.height=height;} 108if(id!=undefined&&id!=''){this.dialogId=id;}else{this.dialogId='mm-modal-dialog';} 109if(typeof button==='object'&&button!==null){button_obj=button;}else if(button!=undefined&&button!=''){button_obj[button]=function(){mmdialog_js.close(this.dialogId)};} 110this.createDiv(this.dialogId);jQuery("#"+this.dialogId).dialog({width:this.width,height:this.height,title:title,buttons:button_obj,modal:true,}).html(message).dialog("open");},dialogError:function(message){if(jQuery("#mm-progressbar-container").length){jQuery("#mm-progressbar-container").hide();} 111if(this.dialogTitle==undefined&&this.dialogTitle!=""){this.dialogTitle="Alert";} 112jQuery("#"+this.dialogId).dialog({width:this.width,height:this.height,title:wp.i18n.__("Alert","membermouse"),buttons:{"OK":function(){mmdialog_js.close(this.dialogId)}}});jQuery("#"+this.dialogId).html(message);jQuery("#"+this.dialogId).dialog("open");},disableDialog:function(dialogId){jQuery("#"+dialogId).dialog();if(dialogId==undefined){jQuery("#"+this.dialogId).dialog("option","disabled",true);} 113else{jQuery("#"+dialogId).dialog("option","disabled",true);}},getDialogButton:function(dialogSelector,buttonName){var buttons=jQuery(dialogSelector+' .ui-dialog-buttonpane button');for(var i=0;i<buttons.length;++i){var jButton=jQuery(buttons[i]);if(jButton.text()==buttonName){return jButton;}} 114return null;},disableButton:function(dialogId,buttonName){jQuery("#"+dialogId).parent().find("button").each(function(){if(jQuery(this).text()==buttonName){jQuery(this).attr('style','filter:alpha(opacity=50);-moz-opacity:0.5;-khtml-opacity: 0.5;opacity: 0.5;');jQuery(this).attr('disabled','disabled');}});},enableButton:function(dialogId,buttonName){jQuery("#"+dialogId).parent().find("button").each(function(){if(jQuery(this).text()==buttonName){jQuery(this).attr('style','filter:alpha(opacity=100);-moz-opacity:1;-khtml-opacity: 1;opacity: 1;');jQuery(this).removeAttr('disabled');}});},findButton:function(dialogId){var button=null;jQuery("#"+dialogId).parent().find("button").each(function(){if(button==null&&!j
114Query(this).is(":disabled")){button=jQuery(this);}});return button;},bindEnterKey:function(buttonObj,areaId){var contentArea="#"+areaId;var keyFunc=function(event){var shouldEnter=true;jQuery(contentArea).find("textarea").each(function(){if(jQuery(this).is(":focus")){shouldEnter=false;}});if(!shouldEnter){return true;} 115var keycode=(event.keyCode?event.keyCode:(event.which?event.which:event.charCode));if(keycode==13){jQuery(buttonObj).click();jQuery(contentArea).unbind("keydown");return false;}else{return true;}};jQuery(contentArea).unbind("keydown");jQuery(contentArea).bind("keydown",keyFunc);},showDialogCallback:function(data){if(data.type!=undefined&&data.type=="error"){if(data.message.length>0){this.dialogError(data.message);return false;} 116if(data.message.url!=undefined){document.location.href=data.message.url;return false;}} 117else if(data.message!=undefined&&data.message.length>0){jQuery("#"+this.dialogId).dialog({autoOpen:false});jQuery("#"+this.dialogId).dialog("option","width",this.width);jQuery("#"+this.dialogId).dialog("option","height",this.height);jQuery("#"+this.dialogId).dialog("option","minWidth",this.width);jQuery("#"+this.dialogId).dialog("option","minHeight",this.height);if(this.dialogTitle!=undefined){jQuery("#"+this.dialogId).dialog("option","title",this.dialogTitle);} 118jQuery("#"+this.dialogId).dialog("option","modal",true);jQuery("#"+this.dialogId).html(data.message);jQuery("#"+this.dialogId).dialog("open");this.bindEnterKey(this.findButton(this.dialogId),this.dialogId);dialogIsOpen=true;this.releaseButton();} 119else{alert("No data received");}},preventDblClick:function(){if(!allowDblClick){if(dialogIsOpen){var button=this.findButton(this.dialogId);if(button!=null){button.hide();}}}},releaseButton:function(){if(!allowDblClick){var button=this.findButton(this.dialogId);if(button!=null){button.show();}}},close:function(dialogId){dialogIsOpen=false;try{if(dialogId==undefined){jQuery("#"+this.dialogId).dialog("close");} 120else{jQuery("#"+dialogId).dialog("close");}} 121catch(e){}}});var mmdialog_js=new MM_DialogJS();var MM_Core=Class.extend({init:function(moduleName,entityName){if(moduleName==undefined){this._alert("MM_Core.js: module name is required (i.e. MM_MembershipLevelsView, MM_BundlesView, etc.)");} 122if(entityName==undefined){this._alert("MM_Core.js: entity name is required (i.e. Membership Level, Bundle, etc.)");} 123this.module=moduleName;this.entityName=entityName;this.method="performAction";this.action="module-handle";this.updateHandler="dataUpdateHandler";this.mm_page="mm_configure_site";this.mm_module="member_types";},_alert:function(str){alert(str);},shouldRedirectExternal:function(urlObj,func){var url="";if(urlObj.url!=undefined){url=urlObj.url;} 124else{url=urlObj;} 125if(func=="changeMembership"){if(url.toLowerCase().indexOf("paypal")>=0||url.toLowerCase().indexOf("clickbank")>=0){return confirm(wp.i18n.__("You will be redirected to","membermouse")+" "+url);}} 126return true;},createFormSubmit:function(params,submitButtonId){if(params!=null){var html="<form id='mm-paymentmethod' action='"+params.url+"' method='post'>";for(var eachvar in params){html+="<input type='hidden' name='"+eachvar+"' value='"+params[eachvar]+"' />";} 127html+="</form>";jQuery("body").append(html);if(submitButtonId!=undefined){if(jQuery("#"+submitButtonId).length){jQuery("#"+submitButtonId).submit();} 128else{this._alert("No button defined "+submitButtonId);}} 129else{if(jQuery("#mm-paymentmethod").length){jQuery("#mm-paymentmethod").submit();} 130else{this._alert("No button defined mm-paymentmethod");}}}},downloadFile:function(url){document.location.href=url;},isValidURL:function(url){return true;},ucfirst:function(str){return str.charAt(0).toUpperCase()+str.slice(1);},getVar:function(value,defaultValue){if(value==undefined){return defaultValue;} 131return value;},setDataGridProps:function(sortBy,sortDir,crntPage,resultSize){this.sortBy=sortBy;this.sortDir=sortDir;this.crntPage=crntPage;this.resultSize=resultSize;},getQuerystringParam:function(name){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(window.location.href);if(results==null){return"";}else{return decodeURIComponent(results[1].replace(/\+/g," "));}},sort:function(columnName){var newSortDir="asc";if(columnName==this.sortBy){if(this.sortDir=="asc"){newSortDir="desc";}} 132this.sortBy=columnName;this.sortDir=newSortDir;this.refreshView();}
132,dgPreviousPage:function(dgCrntPage,attributes){if(parseInt(dgCrntPage)!=0){this.crntPage=parseInt(dgCrntPage)-1;this.refreshView(attributes);}},dgNextPage:function(dgCrntPage,dgTotalPages,attributes){if(dgCrntPage!=(parseInt(dgTotalPages)-1)){this.crntPage=parseInt(dgCrntPage)+1;this.refreshView(attributes);}},dgSetResultSize:function(pageControl,attributes){if(jQuery(pageControl).val()!=undefined){this.crntPage=0;this.resultSize=jQuery(pageControl).val();this.refreshView(attributes);}},refreshView:function(attributes){var values={sortBy:this.sortBy,sortDir:this.sortDir,crntPage:this.crntPage,resultSize:this.resultSize,mm_action:"refreshView"};if(attributes!=undefined&&attributes!=null){for(var eachvar in attributes){values[eachvar]=attributes[eachvar];}} 133var ajax=new MM_Ajax(false,this.module,this.action,this.method);ajax.send(values,false,'mmjs','refreshViewCallback');},refreshViewCallback:function(data){if(data.message!=undefined&&data.message.length>0){jQuery("#mm-view-container").html(data.message);} 134else{this._alert("No data received");}},save:function(callback,params,callbackFunc){this.processForm();if(this.validateForm()==true){var form_obj=new MM_Form('mm-form-container');var values=form_obj.getFields();values.mm_action="save";if((params!=undefined)&&(typeof params=="object")){for(var key in params){values[key]=params[key];}} 135var callbackObject="mmjs";if(callback!=undefined&&callback!=""){callbackObject=callback;} 136var ajax=new MM_Ajax(false,this.module,this.action,this.method);ajax.send(values,false,callbackObject,this.updateHandler);}},create:function(dialogId,width,height){mmdialog_js.showDialog(dialogId,this.module,width,height,wp.i18n.__("Create","membermouse")+" "+this.entityName);},edit:function(dialogId,id,width,height){mmdialog_js.showDialog(dialogId,this.module,width,height,wp.i18n.__("Edit","membermouse")+" "+this.entityName,id);},remove:function(id){var doRemove=confirm(wp.i18n.sprintf(wp.i18n.__("Are you sure you want to delete this %s?","membermouse"),this.entityName.toLowerCase()));if(doRemove){var values={id:id,mm_action:"remove"};var ajax=new MM_Ajax(false,this.module,this.action,this.method);ajax.send(values,false,'mmjs',this.updateHandler);}},confirmShowHideWithStatusOption:function(id,currentStatus,doHideItem,title,action_key){let hideText=wp.i18n.__("Hide","membermouse");let showText=wp.i18n.__("Show","membermouse");let confirmationText=wp.i18n.__("Confirmation","membermouse");var obj={"module":this.module,"action":this.action,"method":this.method};var modalTitle=(doHideItem)?hideText:showText;modalTitle+=" "+title+" "+confirmationText;var showStatusCheckboxOption=false;var height=260;var width=444;var intendedStatus=(doHideItem)?0:1;if(intendedStatus!=currentStatus){height=260;width=444;showStatusCheckboxOption=true;} 137var checkboxMsg="";if(doHideItem){if(action_key=="coupon"){checkboxMsg="<em>"+wp.i18n.sprintf(wp.i18n.__("Yes, mark this %1$s as inactive. While inactive this %2$s cannot be used.","membermouse"),title,title)+"</em>";} 138else{checkboxMsg="<em>"+wp.i18n.sprintf(wp.i18n.__("Yes, mark this %1$s as inactive. While inactive this %2$s cannot be purchased. Members who already have this %3$s will not be affected.","membermouse"),title,title,title)+"</em>";}} 139else{if(action_key=="coupon"){checkboxMsg="<em>"+wp.i18n.sprintf(wp.i18n.__("Yes, mark this %1$s as active. This will allow this %2$s to be used going forward.","membermouse"),title,title)+"</em>";} 140else{checkboxMsg="<em>"+wp.i18n.sprintf(wp.i18n.__("Yes, mark this %1$s as active. This will allow this %2$s to be used going forward. Members who already have this %3$s will not be affected.","membermouse"),title,title,title)+"</em>";}} 141var mainMsg="";if(doHideItem){mainMsg=wp.i18n.sprintf(wp.i18n.__("Click <em>Continue</em> to hide this %s from the list view.","membermouse"),title);if(showStatusCheckboxOption){mainMsg+="<br/><br/>"+wp.i18n.sprintf(wp.i18n.__("[OPTIONAL] In addition to hiding this %s from the list view, do you want to mark it inactive?","membermouse"),title);}} 142else{mainMsg=wp.i18n.sprintf(wp.i18n.__("Click <em>Continue</em> to show this %s in the list view.","membermouse"),title);if(showStatusCheckboxOption){mainMsg+="<br/><br/>"+wp.i18n.sprintf(wp.i18n.__("[OPTIONAL] In addition to showing this %s from the list view, do you want to mark it as active?","membermouse"),title);}} 143jQuery("#dialog-confirm").attr("style","text-align: center");jQuery("#dialog-confirm").html(mainMsg);jQuery("#dialog-confirm").data('showStatusCheckboxOption',showStatusCheckboxOption) 144jQuery("#dialog-confirm").dialog({resizable:false,modal:true,title:modalTitle,height:height,width:width,create:function(e,ui){var pane=jQuery(this).dialog("widget").find(".ui-dialog-content");showStatusCheckboxOption=jQuery(this).data('showStatusCheckboxOption');if(showStatusCheckboxOption){jQuery("<br /><br /><label><input type='checkbox' id='showhide_status_checkbox' name='showhide_status_checkbox' value='1' />"+checkboxMsg+"</label>").appendTo(pane);}},close:function(event,ui){jQuery(this).dialog("destroy");},buttons:{"Continue":function(){var values={id:id,mm_action:"hide"+action_key};if(!doHideItem){values={id:id,mm_action:"show"+action_key};} 145if(jQuery("#showhide_status_checkbox").is(":checked")){values["status"]=(doHideItem)?0:1;} 146jQuery("#dialog-confirm").text("");jQuery(this).dialog('close');var ajax=new MM_Ajax(false,obj.module,obj.action,obj.method);ajax.send(values,false,'mmjs',"showHideHandler");},"Cancel":function(){jQuery("#dialog-confirm #showhide_status_checkbox").removeAttr("checked");jQuery("#dialog-confirm").html("");jQuery(this).dialog('close');}}});},showHideHandler:function(data){if(data.type=="error"){if(data.message.length>0){this._alert(data.message);return false;}} 147else{if(data.message!=undefined&&data.message.length>0){this._alert(data.message);} 148if(data.data&&('total_hidden'in data.data)&&this.showHideControlsContainer){let totalHidden=Number(data.data.total_hidden);let thc=jQuery(this.totalHiddenContainer);let shcc=jQuery(this.showHideControlsContainer);if(!isNaN(totalHidden)&&(thc.length>0)&&(shcc.length>0)){thc.text(totalHidden);if(totalHidden>0){shcc.show();} 149else{shcc.hide();}}} 150this.refreshView();}},dataUpdateHandler:function(data){if(data.type=="error"){if(data.message.length>0){this._alert(data.message);return false;}} 151else{if(data.message!=undefined&&data.message.length>0){this._alert(data.message);} 152this.refreshView();this.closeDialog();}},closeDialog:function(dialogReference){if(dialogReference!=undefined&&dialogReference!=""){dialogReference.close();} 153else{mmdialog_js.close();}},processForm:function(){},validateForm:function(){return true;},validatePhone:function(phone){var regexs=new Array();regexs.push(/^(\+\d)*\s*(\(\d{3}\)\s*)*\d{3}(-{0,1}|\s{0,1})\d{2}(-{0,1}|\s{0,1})\d{2}$/);regexs.push(/^\d{10}$/);regexs.push(/^(\d{3})*(\-|\s)*\d{3}(\-|\s)*\d{4}$/);regexs.push(/^((\+)?[1-9]{1,2})?([-\s\.])?((\(\d{1,4}\))|\d{1,4})(([-\s\.])?[0-9]{1,12}){1,2}$/);for(i=0;i<regexs.length;i++){if(phone.match(regexs[i])){return true;}} 154return false;},validateCreditDate:function(year,month){var d=new Date();var curr_date=d.getDate();var curr_month=d.getMonth()+1;var curr_year=d.getFullYear();curr_year=curr_year.toString().substring(2);if(parseInt(curr_year)>parseInt(year)){return false;} 155else if(parseInt(curr_year)==parseInt(year)){var m=month.replace(/^[ 0]/g,'');if(parseInt(curr_month)>parseInt(m)){return false;}} 156return true;},validateEmail:function(email){var apos=email.indexOf("@");var dotpos=email.lastIndexOf(".");if(apos<1||dotpos-apos<2){return false;} 157return true;},validateUrl:function(s){var regexp=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return regexp.test(s);},startUpload:function(){return true;},stopUpload:function(success,msg,filePath){if(success=='1'){jQuery("#mm-uploaded-file-details").show();jQuery("#mm-file-upload-container").hide();if(jQuery("#mm-uploaded-file")[0]){var tag=jQuery("#mm-uploaded-file")[0].tagName;if(tag.toLowerCase()=="div"){jQuery("#mm-uploaded-file").attr("href",msg);var fileArr=msg.split('/');if(filePath!=undefined){jQuery("#mm-uploaded-file-hidden").text(filePath);} 158jQuery("#mm-uploaded-file").text(fileArr.pop());}}
158 159else{jQuery("#mm-uploaded-file").attr("src",msg);}} 160else{jQuery("#mm-uploaded-file-details").hide();jQuery("#mm-file-upload-container").show();this._alert(msg);} 161return true;},clearUploadedFile:function(){jQuery("#fileToUpload").attr("value","");jQuery("#mm-uploaded-file-details").hide();jQuery("#mm-file-upload-container").show();jQuery("#mm-uploaded-file").attr("src","");},countryChangeHandler:function(type){var ajax=new MM_Ajax(false,this.module,this.action,this.method);var values={mm_action:"loadStates",country:jQuery("#mm_field_"+type+"_country").val(),type:type,referer:jQuery("input[name='_wp_http_referer']").val(),};ajax.send(values,false,'mmjs','countryChangeHandlerCallback');return false;},countryChangeHandlerCallback:function(data){if(data.type=="error"){alert(data.message);}else{jQuery("#mm_field_"+data.data.type+"_state_dd").empty().append(data.data.html);jQuery("#mm_field_"+data.data.type+"_state_dd").trigger("change");var newState=jQuery("#mm_field_"+data.data.type+"_state_dd").val();jQuery("#mm_field_"+data.data.type+"_state").val(newState);} 162return false;},setCookie:function(name,value,minutesToExpire){var d=new Date();d.setTime(d.getTime()+(minutesToExpire*60*1000));var expires="expires="+d.toUTCString();document.cookie=name+"="+value+";"+expires+";path=/";},getCookie:function(cookieName){var name=cookieName+"=";var decodedCookie=decodeURIComponent(document.cookie);var ca=decodedCookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' '){c=c.substring(1);} 163if(c.indexOf(name)==0){return c.substring(name.length,c.length);}} 164return"";},stateChangeHandler:function(type){var iso=jQuery("#mm_field_"+type+"_country").val();if(jQuery("#mm_field_"+type+"_state_dd").val()=="-1"){jQuery("#mm_field_"+type+"_state").show().focus();}else{jQuery("#mm_field_"+type+"_state").val(jQuery("#mm_field_"+type+"_state_dd").val());jQuery("#mm_field_"+type+"_state").hide();}},validateInputCallback:function(data){if(data.type=='error'){alert(data.message);this.validated=false;} 165else{this.validated=true;}},getURLQueryParams:function(url){const paramArr=url.slice(url.indexOf('?')+1).split('&');const params={};paramArr.map(param=>{const[key,val]=param.split('=');params[key]=decodeURIComponent(val);}) 166return params;}});var MM_iFrame=Class.extend({init:function(url,iframeId){this.iframeUrl=url;this.iframeId=iframeId;this.formId="mm-user-defined-form";this.appendToId="body";this.formObj=null;this.setupForm();},setupForm:function(){this.formObj=jQuery('<form action="'+this.iframeUrl+'" target="' 167+this.iframeId+'" method="post" style="display:none;" id="' 168+this.formId+'" name="'+this.formId+'"></form>');jQuery(this.appendToId).append(this.formObj);},addParameters:function(params){var data=jQuery.parseJSON(params);for(var name in data){var value=data[name];if(jQuery.type(value)!="string"&&jQuery.type(value)!="number"&&jQuery.type(value)!="boolean"){value=JSON.stringify(value);} 169jQuery("<input type='hidden' />").attr("name",name).attr("value",value).appendTo(this.formObj);}},submit:function(){this.formObj.submit().remove();}});var MM_Form=Class.extend({init:function(field_wrapper){this.divwrapper=field_wrapper;this.postvars="";},dump:function(){alert(this.postvars);},setCachedFormFields:function(module){var key=module+"-cached-fields";var values=mmjs.getCookie(key);values=JSON.parse(values||'{}');if(values!=undefined&&values!=null&&typeof(values)=="object"){for(var eachvar in values){elemId=eachvar.replace(/_/g,"-");elemId=elemId.replace("[","\\\[");elemId=elemId.replace("]","\\\]");if(jQuery("#"+elemId).length){if(jQuery("#"+elemId).is('input')){jQuery("#"+elemId).val(values[eachvar]);} 170else if(jQuery("#"+elemId).is('textarea')){jQuery("#"+elemId).val(values[eachvar]);} 171else if(jQuery("#"+elemId).is('select')){var multiSelect=values[eachvar];if(typeof(multiSelect)=="object"){for(var eachSelectValue in multiSelect){jQuery("#"+elemId+" option[value='"+multiSelect[eachSelectValue]+"']").prop("selected",true);}} 172else{jQuery("#"+elemId).val(values[eachvar]);}}}}}},clearCachedFields:function(module){var key=module+"-cached-fields";mmjs.setCookie(key,null);}
172,saveCachedFields:function(module,values){var key=module+"-cached-fields";mmjs.setCookie(key,JSON.stringify(values));},getFields:function(){var $inputs=jQuery('#'+this.divwrapper+' input, #'+this.divwrapper+' textarea, #'+this.divwrapper+' input:radio, #'+this.divwrapper+' input:checkbox, #'+this.divwrapper+' select');var values={};$inputs.each(function(i,el){var elem_name=el.id.replace(/-/g,"_");if(jQuery(el).val()!=null){values[elem_name]=jQuery(el).val();}});for(var eachvar in values){this.postvars+=eachvar+": "+values[eachvar]+"\n";} 173return values;},getFormContents:function(){var $inputs=jQuery('#'+this.divwrapper+' input, #'+this.divwrapper+' textarea, #'+this.divwrapper+' input:radio, #'+this.divwrapper+' input:checkbox, #'+this.divwrapper+' select');var values={};$inputs.each(function(i,el){var elem_name=el.name;if(jQuery(el).val()!=null){values[elem_name]=jQuery(el).val();}});for(var eachvar in values){this.postvars+=eachvar+": "+values[eachvar]+"\n";} 174return values;}});var MM_SmartTagLibraryViewJS=MM_Core.extend({showSmartTagLibrary:function(contentAreaId){this.contentAreaId=contentAreaId;var values={mm_module:"smarttag.library"};smartTagLibDialog.showDialog("mm-smarttag-library-dialog",this.module,800,"",wp.i18n.__("SmartTag Library","membermouse"),values,"","smartTagLibDialog");},toggleSmartTagGroup:function(id){jQuery("#mm-smarttag-group"+id+"-children").toggle();jQuery("#mm-smarttag-group"+id+"-open-img").toggle();jQuery("#mm-smarttag-group"+id+"-closed-img").toggle();},smartTagClickHandler:function(file){jQuery("#mm-smarttag-documentation").load(file);},showIdLookup:function(contentAreaId){this.contentAreaId=contentAreaId;var values={mm_module:"smarttag.idlookup"};smartTagLibDialog.showDialog("mm-id-lookup-dialog",this.module,550,375,wp.i18n.__("ID Lookup","membermouse"),values,"","smartTagLibDialog");},lookupIds:function(){var values={mm_action:"getLookupGrid",objectType:jQuery("#mm-object-type-selection").val()};var ajax=new MM_Ajax(false,this.module,this.action,this.method);ajax.send(values,false,"stl_js","lookupIdsCallback");},lookupIdsCallback:function(data){jQuery("#mm-lookup-results-container").html(data);},insertContent:function(content){if(this.contentAreaId=="wordpress"){this.insertText("content",content,false);} 175else{var html=jQuery("#"+this.contentAreaId).val();jQuery("#"+this.contentAreaId).val(html+content);} 176smartTagLibDialog.close();},insertTemplate:function(templateType,templateName){if(templateType!=""){var insertOk=confirm(wp.i18n.sprintf(wp.i18n.__("Are you sure you want insert the %s template?","membermouse"),templateName));if(insertOk){var values={mm_action:"getPageTemplate",mm_template_type:templateType};var ajax=new MM_Ajax(false,this.module,this.action,this.method);ajax.send(values,false,"stl_js","insertTemplateCallback");}}},insertTemplateCallback:function(data){this.contentAreaId=="wordpress";this.insertText("content",data,false);},normalizeElement:function(textarea){textarea=textarea||'content';if(textarea.constructor==String){textarea=document.getElementById(textarea);} 177return textarea;},insertText:function(textarea,text,forceTextMode){textarea=this.normalizeElement(textarea);if(typeof tinyMCE!='undefined'&&(ed=tinyMCE.activeEditor)&&!ed.isHidden()&&!forceTextMode){ed.focus();if(tinymce.isIE){ed.selection.moveToBookmark(ed.windowManager.bookmark);} 178ed.selection.setContent(text);return;} 179if((textarea)&&(document.selection&&textarea.selection)){var scrollTop=textarea.scrollTop;textarea.focus();var sel=textarea.selection;sel.text=text;if(sel.text.length>0){sel.collapse(false);} 180sel.select();textarea.focus();textarea.scrollTop=scrollTop;} 181else if((textarea)&&(textarea.selectionStart||textarea.selectionStart=='0')){var startPos=textarea.selectionStart,endPos=textarea.selectionEnd,cursorPos=endPos,scrollTop=textarea.scrollTop;if(startPos!=endPos){textarea.value=textarea.value.substring(0,startPos) 182+text 183+textarea.value.substring(endPos,textarea.value.length);cursorPos+=text.length-textarea.value.substring(startPos,endPos).length;} 184else{textarea.value=textarea.value.substring(0,startPos) 185+text 186+textarea.value.substring(endPos,textarea.value.length);cursorPos+=text.length;} 187textarea.focus();textarea.selectionStart=cursorPos;textarea.selectionEnd=cursorPos;textarea.scrollTop=scrollTop;} 188else{jQuery(textarea).val(jQuery(textarea).val()+text);}}});var smartTagLibDialog=new MM_DialogJS();var stl_js=new MM_SmartTagLibraryViewJS("MM_SmartTagLibraryView","");var MM_PaymentUtilsViewJS=MM_Core.extend({showPaymentOptions:function(userId,accessType,accessTypeId,lastActionParams){var values={mm_module:"payment_options",userId:userId,accessType:accessType,accessTypeId:accessTypeId,lastActionParams:lastActionParams};mm_pymtdialog.showDialog("mm-payment-options-dialog",this.module,465,600,wp.i18n.__("Payment Options","membermouse"),values,"","mm_pymtdialog");},getPaymentOptionsList:function(){productId=jQuery("#mm-product-selector").val();userId=jQuery("#mm-user-id").val();if(productId!=0&&userId!=0){var values={mm_action:"getPaymentOptionsList",mm_product_id:productId,mm_user_id:userId};var ajax=new MM_Ajax(false,this.module,this.action,this.method);ajax.send(values,false,"pymtutils_js","paymentOptionsListCallback");} 189else{jQuery("#mm-payment-options-list").hide();}}
189,paymentOptionsListCallback:function(data){if(data==undefined){jQuery("#mm-payment-options-list").hide();alert("No response received");} 190else if(data.type=="error"){jQuery("#mm-payment-options-list").hide();alert(data.message);} 191else{jQuery("#mm-payment-options-list").html(data.message);jQuery("#mm-payment-options-list").show();}},changeMembershipStatus:function(memberId,membership_id,newStatus,redirectUrl){var msg="";switch(parseInt(newStatus)){case 2:msg=wp.i18n.__("Are you sure you want to cancel your membership?","membermouse");break;case 4:msg=wp.i18n.__("Are you sure you want to pause your membership?","membermouse");break;default:msg=wp.i18n.sprintf(wp.i18n.__("Invalid status '%s'","membermouse"),newStatus);break;} 192this.id=memberId;var values={mm_id:this.id,mm_membership_id:membership_id,mm_new_status:newStatus,mm_redirect_url:redirectUrl,mm_action:"changeMembershipStatus"};var doContinue=confirm(msg);if(doContinue){var ajax=new MM_Ajax(false,this.module,this.action,this.method);ajax.send(values,false,'pymtutils_js',"accessRightsUpdateHandler");}},changeBundleStatus:function(memberId,bundleId,newStatus,redirectUrl){var msg="";switch(parseInt(newStatus)){case 2:msg=wp.i18n.__("Are you sure you want to cancel this bundle?","membermouse");break;case 4:msg=wp.i18n.__("Are you sure you want to pause this bundle?","membermouse");break;default:msg=wp.i18n.sprintf(wp.i18n.__("Invalid status '%s'","membermouse"),newStatus);break;} 193this.id=memberId;var values={mm_id:this.id,mm_bundle_id:bundleId,mm_new_status:newStatus,mm_redirect_url:redirectUrl,mm_action:"changeBundleStatus"};var doContinue=confirm(msg);if(doContinue){var ajax=new MM_Ajax(false,this.module,this.action,this.method);ajax.send(values,false,'pymtutils_js',"accessRightsUpdateHandler");}},applyFreeBundle:function(memberId,bundleId,redirectUrl){this.id=memberId;var values={mm_id:this.id,mm_bundle_id:bundleId,mm_redirect_url:redirectUrl,mm_action:"applyFreeBundle"};var ajax=new MM_Ajax(false,this.module,this.action,this.method);ajax.send(values,false,'pymtutils_js',"accessRightsUpdateHandler");},showPaymentConfirmation:function(userId,productId,height,width,isGift){var values={mm_module:"payment_confirmation",userId:userId,productId:productId,isGift:isGift};if(!height){height=225;} 194if(!width){width=450;} 195mm_pymtdialog.showDialog("mm-payment-confirmation-dialog",this.module,width,height,wp.i18n.__("Order Confirmation","membermouse"),values,"","mm_pymtdialog");},showAdminPaymentConfirmation:function(userId,productId){var values={mm_action:"placeOrderCardOnFile",mm_product_id:productId,mm_user_id:userId,mm_source:"admin"};if(jQuery("#mm-affiliate").val()!=""){values.mm_affiliate=jQuery("#mm-affiliate").val();} 196if(jQuery("#mm-subaffiliate").val()!=""){values.mm_subaffiliate=jQuery("#mm-subaffiliate").val();} 197var msg=wp.i18n.__("Are you sure you want to charge the member's card-on-file for this product?","membermouse");var doContinue=confirm(msg);if(doContinue){var ajax=new MM_Ajax(false,this.module,this.action,this.method);ajax.send(values,false,"pymtutils_js","placeOrderCardOnFileCallback");}},placeOrderCardOnFile:function(userId,productId,sourceId,isGift){var values={};var doContinue=true;if(jQuery("#mm_1clickpurchase_form").length>0){doContinue=oneclickpurchase_js.validate();if(doContinue){var form_obj=new MM_Form('mm_1clickpurchase_form');values=form_obj.getFields();}} 198if(doContinue){pymtutils_js.closeDialog(mm_pymtdialog);values.mm_action="placeOrderCardOnFile";values.mm_product_id=productId;values.mm_user_id=userId;values.mm_source=sourceId;values.mm_is_gift=isGift;var ajax=new MM_Ajax(false,this.module,this.action,this.method);ajax.send(values,false,"pymtutils_js","placeOrderCardOnFileCallback");}},placeOrderCardOnFileCallback:function(data){if(data==undefined){alert(wp.i18n.__("There was an error placing your order.","membermouse"));} 199else if((data.type=="error")||(data.status==4)||(data.type=="failed")||(data.status==2)){alert(data.message);} 200else{document.location.href=data.url;}},accessRightsUpdateHandler:function(data){if(data.type=="error"){if(data.message.length>0){alert(data.message);return false;} 201return false;} 202else{if(data.url!=undefined&&data.url.length>0){document.location.href=data.url;} 203else{if(data.message!=undefined&&data.message.length>0){alert(data.message);} 204var url=document.location.href;var index=url.indexOf("message");if(index!=-1){url=url.substring(0,index-1);} 205document.location.href=url;}}},checkIfPaymentRequired:function(accessType,accessTypeId,callbackFunction,callbackReference){if(accessType==undefined||accessType==""){alert("Missing required parameter 'accessType' in mm-payment_utils.js.checkIfPaymentRequired");return false;} 206if(accessTypeId==undefined||accessTypeId==""){alert("Missing required parameter 'accessTypeId' in mm-payment_utils.js.checkIfPaymentRequired");return false;} 207if(callbackFunction==undefined||callbackFunction==""){alert("Missing required parameter 'callbackFunction' in mm-payment_utils.js.checkIfPaymentRequired");return false;} 208this.callbackReference=callbackReference;this.callbackFunction=callbackFunction;var values={mm_action:"checkIfPaymentRequired",accessType:accessType,accessTypeId:accessTypeId};var ajax=new MM_Ajax(false,this.module,this.action,this.method);ajax.send(values,false,"pymtutils_js","dfltCallbackHandler");},dfltCallbackHandler:function(data){result=false;
208if(data!=undefined){if(data.type=="error"){result=data;} 209else{result=data.message;}} 210else{result=false;} 211if(this.callbackReference!=undefined&&this.callbackReference!=""){window[this.callbackReference][this.callbackFunction](result);} 212else{window[this.callbackFunction](result);}}});var callbackReference="";var callbackFunction="";var mm_pymtdialog=new MM_DialogJS();var pymtutils_js=new MM_PaymentUtilsViewJS("MM_PaymentUtilsView","");
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.