晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。   林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。   见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝)   既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。   南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。 .
Prv8 Shell
Server : Apache
System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64
User : rainic ( 1014)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/akaindir/www/crm/layouts/v7/modules/ParsVT/resources/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/akaindir/www/crm/layouts/v7/modules/ParsVT/resources/ParsVTCustomFields.js
/* ********************************************************************************
 * The content of this file is subject to the VTFarsi.ir Modules License("License");
 * You may not use this file except in compliance with the License
 * The Initial Developer of the Original Code is VTFarsi.ir
 * Portions created by VTFarsi.ir. are Copyright(C) VTFarsi Team
 * All Rights Reserved.
 * ****************************************************************************** */
function hideAllSmartChangeButtonForACF(){var e=$("[data-field-name*='cf_pcf_']").closest(".ui-sortable-handle");e.find(".summary").hide(),e.find(".defaultValue").hide()}function pvcf_upload_files(e){var a=document.getElementsByName("upload_"+e+"[]");app.helper.showProgress();for(var r=a[0].files,t=new FormData,s=0;s<r.length;s++){var i=r[s];t.append("upload_"+e+"[]",i,i.name)}return t.append("field_name",e),$.ajax({url:"index.php?module=ParsVT&action=ActionAjax&mode=ajaxUploadFromForm",type:"POST",data:t,processData:!1,contentType:!1}).done(function(a){var r=document.getElementsByName(e);if(a.result.list_file){var t=a.result.list_file;jQuery(r).val(t[0]);var s=t[0].split("$$");if(s.length>0){var i=jQuery(r).closest("td");if(i.find("img").remove(),i.find("span").remove(),s[2].indexOf("image")>-1){var d=s[0].replace(/\s+/g," ").trim(),l=["<span>",'<a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(t[0])+'" download target="_blank"><img style="max-width:150px;max-height:150px;" src="'+d+'" /></a>','<input style="margin-right: 10px; margin-left: 10px;" class="btn btn-warning avfImageDelete" data-field_name = "'+e+'" data-file="'+t[0]+'" type="button" value="'+app.vtranslate("Delete")+'" onclick="removeThis(this)">',"</span>"].join("");i.append(l)}else{var n=(o=(o=s[0].replace(/\s+/g," ").trim().split("/"))[o.length-1]).indexOf("_"),o=o.substr(n+1),l=["<span>",'<a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(t[0])+'" download target="_blank">'+o+"</a>",'<input style="margin-right: 10px; margin-left: 10px;" class="btn btn-warning avfImageDelete" data-field_name = "'+e+'"  data-file="'+t[0]+'" type="button" value="'+app.vtranslate("Delete")+'" onclick="removeThis(this)">',"</span>"].join("");i.append(l)}$('[name="upload_'+e+'[]"]').val("")}app.helper.hideProgress(),app.helper.showSuccessNotification({message:app.vtranslate("JS_UPLOAD_SUCCESSFUL")})}else app.helper.hideProgress(),errorMessage=app.vtranslate("JS_UPLOAD_FAILED"),app.helper.showErrorNotification({message:errorMessage})}).fail(function(){app.helper.hideProgress(),errorMessage=app.vtranslate("JS_UPLOAD_FAILED"),app.helper.showErrorNotification({message:errorMessage})}),!1}function pvcf_upload_multiple_files(e){var a=document.getElementsByName("upload_"+e+"[]");app.helper.showProgress();for(var r=a[0].files,t=new FormData,s=0;s<r.length;s++){var i=r[s];t.append("upload_"+e+"[]",i,i.name)}return t.append("field_name",e),$.ajax({url:"index.php?module=ParsVT&action=ActionAjax&mode=ajaxUploadFromForm",type:"POST",data:t,processData:!1,contentType:!1}).done(function(a){var r=document.getElementsByName(e),t=a.result.list_file;if(a.result.list_file){var s,i=jQuery(r).val().split("||");s=jQuery(r).closest("td"),$.each(t,function(a,r){if(0!=r.length){i.push(r);var t=r.split("$$");if(t.length>0)if(t[2].indexOf("image")>-1){var d=t[0].replace(/\s+/g," ").trim(),l=['<div class="col-lg-1" style="width: 150px; height: 182px; max-width:150px;max-height:182px;background-color: #f3f3f3; border: 1px solid #dcdcdc;text-align: center;">','<a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(r)+'" download target="_blank"><img style="max-width:120px;max-height:150px;" src="'+d+'" /></a>','<input style="margin-right: 10px; margin-left: 10px;" class="btn btn-warning avfImageDelete" data-target_field= "'+e+'"  data-field_name = "'+e+'"  data-field_value = "'+r+'"   data-file="'+t[0]+'" type="button" value="'+app.vtranslate("Delete")+'" onclick="removeFile(this)">',"</div>"].join("");s.append(l)}else{var n=(o=(o=t[0].replace(/\s+/g," ").trim().split("/"))[o.length-1]).indexOf("_"),o=o.substr(n+1),l=['<div class="col-lg-1" style="width: 150px; height: 182px; max-width:150px;max-height:182px;background-color: #f3f3f3; border: 1px solid #dcdcdc;text-align: center;padding-top: 20px;">','<a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(r)+'" download target="_blank" style="overflow-wrap: break-word;"><i class="fa fa-download"  style="margin: 0 3px;"></i><BR>'+o+"</a>",'<input style="margin-right: 10px; margin-left: 10px;" class="btn btn-warning avfImageDelete" data-target_field= "'+e+'" data-field_name = "'+e+'"  data-field_value = "'+r+'"  data-file="'+t[0]+'" type="button" value="'+app.vtranslate("Delete")+'" onclick="removeFile(this)">',"</div>"].join("");s.append(l)}}}),jQuery(r).val(i.join("||")),$('[name="upload_'+e+'[]"]').val(""),app.helper.hideProgress(),app.helper.showSuccessNotification({message:app.vtranslate("JS_UPLOAD_SUCCESSFUL")})}else app.helper.hideProgress(),errorMessage=app.vtranslate("JS_UPLOAD_FAILED"),app.helper.showErrorNotification({message:errorMessage})}).fail(function(){app.helper.hideProgress(),errorMessage=app.vtranslate("JS_UPLOAD_FAILED"),app.helper.showErrorNotification({message:errorMessage})}),!1}function removeThis(e){app.helper.showProgress();var a=jQuery(e).data("file"),r=jQuery(e).data("field_name");if(jQuery('input[name="record"]').length)t=jQuery('input[name="record"]').val();else var t=app.getRecordId();var s=jQuery(e).parent("span").parent("td");0==s.length&&"PurchaseOrder"==app.getModuleName()&&(s=jQuery(e).closest("td"));jQuery.ajax({url:"index.php?module=ParsVT&action=ActionAjax&mode=removeFile",data:{file_path:a,parrent_record_id:t,field_name:r},async:!1,success:function(e){s.find("input[name^='"+supportedParsVTCustomFields.Upload_Field.prefix+"']").val(""),s.find("img").remove(),s.find("span").remove(),app.helper.hideProgress()},error:function(e,a,r){app.helper.hideProgress()}})}function arrayRemove(e,a){return e.filter(function(e){return e!=a})}function removeFile(e){app.helper.showProgress();var a=jQuery(e).data("file"),r=jQuery(e).data("field_name"),t=jQuery(e).data("target_field"),s=jQuery(e).data("field_value");if(jQuery('input[name="record"]').length)i=jQuery('input[name="record"]').val();else var i=app.getRecordId();var d=jQuery(e).parent("div");0==d.length&&"PurchaseOrder"==app.getModuleName()&&(d=jQuery(e).closest("td"));jQuery.ajax({url:"index.php?module=ParsVT&action=ActionAjax&mode=removeFile",data:{file_path:a,parrent_record_id:i,field_name:r},async:!1,success:function(e){var a=jQuery("textarea[name^='"+t+"']").val().split("||");jQuery("textarea[name^='"+t+"']").val(arrayRemove(a,s).join("||")),d.remove(),app.helper.hideProgress()},error:function(e,a,r){app.helper.hideProgress()}})}function loadScript(e,a){var r=document.getElementsByTagName("head")[0],t=document.createElement("script");t.type="text/javascript",t.src=e,t.onreadystatechange=a,t.onload=a,r.appendChild(t)}function loadCSS(e,a){var r=document.getElementsByTagName("head")[0],t=document.createElement("link");t.id=a,t.rel="stylesheet",t.type="text/css",t.href=e,t.media="all",r.appendChild(t)}function overwriteFunctionAddCustomField(){"function"==typeof Settings_LayoutEditor_Js?(Settings_LayoutEditor_Js.prototype.addCustomField=function(e,a){var r=this,t=jQuery.Deferred();app.helper.showProgress();var s=a.serializeFormData();return Object.keys(supportedParsVTCustomFields).indexOf(s.fieldType)>-1?(s.module="ParsVT",s.action="ActionAjax",s.mode="addField",s.masseditable="2"):(s.module=r.getModuleName(),s.parent=app.getParentModuleName(),s.action="Field",s.mode="add"),s.blockid=e,s.sourceModule=jQuery("#selectedModuleName").val(),s.fieldLength=parseInt(s.fieldLength),s.decimal&&(s.decimal=parseInt(s.decimal)),this.isHeaderAllowed()||1!=s.headerfield?(this.updateHeaderFieldMeta(s),app.request.post({data:s}).then(function(e,a){if(app.helper.hideProgress(),null===e){var s=a.id,i=a.isHeaderField?1:0;r.headerFieldsMeta[s]=i,t.resolve(a),location.reload()}else t.reject(e)})):t.reject(),t.promise()},$("body").delegate("#createFieldForm [name='fieldType']","change",function(){var e=Object.keys(supportedParsVTCustomFields);fieldType=$(this).val();var a=jQuery("#createFieldForm input[name=fieldid]").val();if("Grid_Field"==fieldType&&""==a){jQuery("#relatedHeaders1").remove(),jQuery("#relatedHeaders2").remove(),jQuery("#relatedHeaders3").remove(),jQuery("#maskHeaders1").remove(),jQuery("#maskHeaders2").remove(),jQuery("#maskHeaders3").remove(),jQuery("#maskHeaders4").remove(),jQuery("#maskHeaders5").remove();r="index.php?module=ParsVT&action=Fields&mode=getGridField";app.helper.showProgress(),$.ajax({url:r,type:"GET",dataType:"json",error:function(e){app.helper.hideProgress(),jQuery("#relatedHeaders1").remove(),jQuery("#relatedHeaders2").remove(),jQuery("#relatedHeaders3").remove(),jQuery("#maskHeaders1").remove(),jQuery("#maskHeaders2").remove(),jQuery("#maskHeaders3").remove(),jQuery("#maskHeaders4").remove(),jQuery("#maskHeaders5").remove(),jQuery("#gridHeaders1").remove(),jQuery("#gridHeaders2").remove()},success:function(e){if(app.helper.hideProgress(),e.success&&e.result)if($("#createFieldForm > div.modal-body.model-body-scrollenabled > div:nth-child(3)").after(e.result),jQuery("#gridColumnsUi").length>0){var a={tags:[],tokenSeparators:[","]};app.showSelect2ElementView($("#gridColumnsUi"),a),app.showSelect2ElementView($("#gridRowsUi"),a)}else interval=setInterval(function(){registerSelect2(interval)},500);else jQuery("#relatedHeaders1").remove(),jQuery("#relatedHeaders2").remove(),jQuery("#relatedHeaders3").remove(),jQuery("#maskHeaders1").remove(),jQuery("#maskHeaders2").remove(),jQuery("#maskHeaders3").remove(),jQuery("#maskHeaders4").remove(),jQuery("#maskHeaders5").remove(),jQuery("#gridHeaders1").remove(),jQuery("#gridHeaders2").remove()}})}else if("Validated_Field"==fieldType&&""==a){jQuery("#gridHeaders1").remove(),jQuery("#gridHeaders2").remove(),jQuery("#relatedHeaders1").remove(),jQuery("#relatedHeaders2").remove(),jQuery("#relatedHeaders3").remove();r="index.php?module=ParsVT&action=Fields&mode=getValidatedField";app.helper.showProgress(),$.ajax({url:r,type:"GET",dataType:"json",error:function(e){app.helper.hideProgress(),jQuery("#maskHeaders1").remove(),jQuery("#maskHeaders2").remove(),jQuery("#maskHeaders3").remove(),jQuery("#maskHeaders4").remove(),jQuery("#maskHeaders5").remove()},success:function(e){app.helper.hideProgress(),e.success&&e.result?$("#createFieldForm > div.modal-body.model-body-scrollenabled > div:nth-child(3)").after(e.result):(jQuery("#maskHeaders1").remove(),jQuery("#maskHeaders2").remove(),jQuery("#maskHeaders3").remove(),jQuery("#maskHeaders4").remove(),jQuery("#maskHeaders5").remove())}})}else if("Related_Field"==fieldType&&""==a){jQuery("#gridHeaders1").remove(),jQuery("#gridHeaders2").remove(),jQuery("#maskHeaders1").remove(),jQuery("#maskHeaders2").remove(),jQuery("#maskHeaders3").remove(),jQuery("#maskHeaders4").remove(),jQuery("#maskHeaders5").remove();var r="index.php?module=ParsVT&action=Fields&mode=getEntityModules";app.helper.showProgress(),$.ajax({url:r,type:"GET",dataType:"json",error:function(e){app.helper.hideProgress(),jQuery("#relatedHeaders1").remove(),jQuery("#relatedHeaders2").remove(),jQuery("#relatedHeaders3").remove()},success:function(e){app.helper.hideProgress(),e.success&&e.result?($("#createFieldForm > div.modal-body.model-body-scrollenabled > div:nth-child(3)").after(e.result),$("select[name='relatedModule']").select2(),$("select[name='createrelatedlist']").select2()):(jQuery("#relatedHeaders1").remove(),jQuery("#relatedHeaders2").remove(),jQuery("#relatedHeaders3").remove())}})}else jQuery("#gridHeaders1").remove(),jQuery("#gridHeaders2").remove(),jQuery("#relatedHeaders1").remove(),jQuery("#relatedHeaders2").remove(),jQuery("#relatedHeaders3").remove(),jQuery("#maskHeaders1").remove(),jQuery("#maskHeaders2").remove(),jQuery("#maskHeaders3").remove(),jQuery("#maskHeaders4").remove(),jQuery("#maskHeaders5").remove();e.indexOf(fieldType)>-1?($("#createFieldForm [name='masseditable']").trigger("click"),$("#createFieldForm [name='fieldDefaultValue']").closest(".form-group").hide(),$("#createFieldForm .fieldProperty .properties > div:nth-child(3) > div:nth-child(1) label").hide(),$("#createFieldForm .fieldProperty .properties > div:nth-child(3) > div:nth-child(1) div").hide()):($("#createFieldForm [name='fieldDefaultValue']").closest(".form-group").show(),$("#createFieldForm .fieldProperty div > div:nth-child(3) > div:nth-child(1) label").show(),$("#createFieldForm .fieldProperty div > div:nth-child(3) > div:nth-child(1) div").show())}),registerEditFieldButton()):setTimeout(function(){overwriteFunctionAddCustomField()},10)}function registerSelect2(e){if(jQuery("#gridColumnsUi").length>0){var a={tags:[],tokenSeparators:[","]};app.showSelect2ElementView($("#gridColumnsUi"),a),app.showSelect2ElementView($("#gridRowsUi"),a),e&&clearInterval(e)}}function registerEditFieldButton(){$("body").delegate(".editFieldDetails","click",function(e){hideOptionsOnEditPopup()})}function hideOptionsOnEditPopup(){if($("#createFieldForm [name='fieldType']").length>0){for(var e in supportedParsVTCustomFields)supportedParsVTCustomFields.hasOwnProperty(e)&&$("#createFieldForm [name='fieldType']").append(new Option(app.vtranslate(supportedParsVTCustomFields[e].name),e,!1,!1));var a=$("#createFieldForm [name='fieldname']").val().substring(0,10);a==supportedParsVTCustomFields.Gdate_Field.prefix?$("#createFieldForm [name='fieldType']").val("Gdate_Field"):a==supportedParsVTCustomFields.National_ID.prefix?$("#createFieldForm [name='fieldType']").val("National_ID"):a==supportedParsVTCustomFields.National_CODE.prefix?$("#createFieldForm [name='fieldType']").val("National_CODE"):a==supportedParsVTCustomFields.IRAN_VAT_ID.prefix?$("#createFieldForm [name='fieldType']").val("IRAN_VAT_ID"):a==supportedParsVTCustomFields.IRAN_POSTAL_CODE.prefix?$("#createFieldForm [name='fieldType']").val("IRAN_POSTAL_CODE"):a==supportedParsVTCustomFields.TAX_FILE_NUMBER.prefix?$("#createFieldForm [name='fieldType']").val("TAX_FILE_NUMBER"):a==supportedParsVTCustomFields.Iran_Mobile.prefix?$("#createFieldForm [name='fieldType']").val("Iran_Mobile"):a==supportedParsVTCustomFields.Telegram_ID.prefix?$("#createFieldForm [name='fieldType']").val("Telegram_ID"):a==supportedParsVTCustomFields.Whatsapp_ID.prefix?$("#createFieldForm [name='fieldType']").val("Whatsapp_ID"):a==supportedParsVTCustomFields.Instagram.prefix?$("#createFieldForm [name='fieldType']").val("Instagram"):a==supportedParsVTCustomFields.Weather_Field.prefix?$("#createFieldForm [name='fieldType']").val("Weather_Field"):a==supportedParsVTCustomFields.Twitter.prefix?$("#createFieldForm [name='fieldType']").val("Twitter"):a==supportedParsVTCustomFields.RTF_Description_Field.prefix?$("#createFieldForm [name='fieldType']").val("RTF_Description_Field"):a==supportedParsVTCustomFields.IBAN_Code.prefix?$("#createFieldForm [name='fieldType']").val("IBAN_Code"):a==supportedParsVTCustomFields.Credit_Card_Number.prefix?$("#createFieldForm [name='fieldType']").val("Credit_Card_Number"):a==supportedParsVTCustomFields.Assigned_To.prefix?$("#createFieldForm [name='fieldType']").val("Assigned_To"):a==supportedParsVTCustomFields.QR_Code.prefix?$("#createFieldForm [name='fieldType']").val("QR_Code"):a==supportedParsVTCustomFields.Cities_field.prefix?$("#createFieldForm [name='fieldType']").val("Cities_field"):a==supportedParsVTCustomFields.Date_Time_Field.prefix?$("#createFieldForm [name='fieldType']").val("Date_Time_Field"):a==supportedParsVTCustomFields.DigitalSignature_Field.prefix?$("#createFieldForm [name='fieldType']").val("DigitalSignature_Field"):a==supportedParsVTCustomFields.Plaque_Field.prefix?$("#createFieldForm [name='fieldType']").val("Plaque_Field"):a==supportedParsVTCustomFields.Barcode_Field.prefix?$("#createFieldForm [name='fieldType']").val("Barcode_Field"):a==supportedParsVTCustomFields.Password_Field.prefix?$("#createFieldForm [name='fieldType']").val("Barcode_Field"):a==supportedParsVTCustomFields.Upload_Field.prefix?$("#createFieldForm [name='fieldType']").val("Upload_Field"):a==supportedParsVTCustomFields.Coordinate.prefix?$("#createFieldForm [name='fieldType']").val("Coordinate"):a==supportedParsVTCustomFields.Rating_Field.prefix?$("#createFieldForm [name='fieldType']").val("Rating_Field"):a==supportedParsVTCustomFields.Emotion_Rating_Field.prefix?$("#createFieldForm [name='fieldType']").val("Emotion_Rating_Field"):a==supportedParsVTCustomFields.Color_Picker_Field.prefix?$("#createFieldForm [name='fieldType']").val("Color_Picker_Field"):a==supportedParsVTCustomFields.Color_Picker_Field.prefix?$("#createFieldForm [name='fieldType']").val("Color_Picker_Field"):a==supportedParsVTCustomFields.Repeater_Field.prefix?$("#createFieldForm [name='fieldType']").val("Repeater_Field"):a==supportedParsVTCustomFields.Voice_Recorder_Field.prefix?$("#createFieldForm [name='fieldType']").val("Voice_Recorder_Field"):a==supportedParsVTCustomFields.Advanced_Date_Field.prefix?$("#createFieldForm [name='fieldType']").val("Advanced_Date_Field"):a==supportedParsVTCustomFields.UsersList.prefix?$("#createFieldForm [name='fieldType']").val("UsersList"):a==supportedParsVTCustomFields.Upload_Fields.prefix?$("#createFieldForm [name='fieldType']").val("Upload_Fields"):a==supportedParsVTCustomFields.Validated_Field.prefix?$("#createFieldForm [name='fieldType']").val("Validated_Field"):a==supportedParsVTCustomFields.Related_Field.prefix?$("#createFieldForm [name='fieldType']").val("Related_Field"):a==supportedParsVTCustomFields.Grid_Field.prefix&&$("#createFieldForm [name='fieldType']").val("Grid_Field"),$("#createFieldForm [name='fieldType']").trigger("change")}else setTimeout(function(){hideOptionsOnEditPopup()},10)}function OpenGpsWindow(e,a,r){switch("id"==r&&(a=$("#"+a).val()),e){case"google":link="https://maps.google.com/maps?q="+a;break;case"waze":link="https://www.waze.com/ul?ll="+a+"&navigate=yes&zoom=15";break;case"osm":link="https://www.openstreetmap.org/#map=18/"+a.replace(",","/");break;case"yandex":a=a.split(",").reverse().join(),link="https://yandex.com/maps/?from=api-maps&l=map&ll="+a+"&z=15";break;case"apple":link="http://maps.apple.com/?ll="+a;break;case"parsijoo":a=a.split(","),link="https://map.parsijoo.ir/?lat="+a[0]+"&lon="+a[1]+"&q=&z=17";break;case"map.ir":a=a.split(","),link="https://map.ir/lat/"+a[0]+"/lng/"+a[1]+"/z/17";break;case"Android":link="geo:"+a+";u=35";break;case"iOS":link="maps:?q="+a;break;case"Windows":link="ms-windows-store://pdp/?ProductId=9wzdncrdtbvb&?cp="+a.replace(",","~")}window.open(link,"_blank")}var supportedParsVTCustomFields={Gdate_Field:{uitype:1,name:"Gregorian Date",prefix:"cf_pcf_gdt"},National_ID:{uitype:1,name:"National ID",prefix:"cf_pcf_irc"},National_CODE:{uitype:1,name:"Legal National Code",prefix:"cf_pcf_lid"},IRAN_VAT_ID:{uitype:1,name:"Iran Vat ID",prefix:"cf_pcf_irv"},TAX_FILE_NUMBER:{uitype:1,name:"Tax File Number",prefix:"cf_pcf_irf"},IRAN_POSTAL_CODE:{uitype:1,name:"Iran Postal Code",prefix:"cf_pcf_irp"},Iran_Mobile:{uitype:11,name:"Iran Mobile Number",prefix:"cf_pcf_irm"},Telegram_ID:{uitype:1,name:"Telegram ID",prefix:"cf_pcf_tcf"},Whatsapp_ID:{uitype:11,name:"Whatsapp Number",prefix:"cf_pcf_wcf"},Instagram:{uitype:1,name:"Instagram ID",prefix:"cf_pcf_igf"},Twitter:{uitype:1,name:"Twitter ID/Hashtag",prefix:"cf_pcf_twf"},RTF_Description_Field:{uitype:19,name:"RTF Description",prefix:"cf_pcf_ecf"},IBAN_Code:{uitype:1,name:"IBAN Code",prefix:"cf_pcf_ibn"},Credit_Card_Number:{uitype:1,name:"Credit Card Number",prefix:"cf_pcf_ccn"},QR_Code:{uitype:19,name:"QR Code",prefix:"cf_pcf_qrc"},Assigned_To:{uitype:53,name:"Assigned to",prefix:"cf_pcf_atf"},UsersList:{uitype:780,name:"Users List",prefix:"cf_pcf_cul"},Cities_field:{uitype:777,name:"Cities field",prefix:"cf_pcf_icf"},Date_Time_Field:{uitype:778,name:"DateTime",prefix:"cf_pcf_dtf"},Advanced_Date_Field:{uitype:5,name:"Advanced Date",prefix:"cf_pcf_adf"},Barcode_Field:{uitype:779,name:"Barcode",prefix:"cf_pcf_bcf"},DigitalSignature_Field:{uitype:776,name:"Digital Signature",prefix:"cf_pcf_dsf"},Upload_Field:{uitype:1,name:"Upload field",prefix:"cf_pcf_ulf"},Upload_Fields:{uitype:19,name:"Upload fields",prefix:"cf_pcf_muf"},Password_Field:{uitype:21,name:"Password",prefix:"cf_pcf_pwd"},Currency_Name:{uitype:117,name:"Currency name",prefix:"cf_pcf_cnf"},Coordinate:{uitype:1,name:"Coordinate",prefix:"cf_pcf_gps"},Rating_Field:{uitype:7,name:"Rating Field",prefix:"cf_pcf_srf"},Emotion_Rating_Field:{uitype:7,name:"Customer Satisfaction Field",prefix:"cf_pcf_erf"},Color_Picker_Field:{uitype:1,name:"Color Picker",prefix:"cf_pcf_cpf"},Repeater_Field:{uitype:21,name:"Repeater Field",prefix:"cf_pcf_arf"},Voice_Recorder_Field:{uitype:21,name:"Voice Recorder Field",prefix:"cf_pcf_vrf"},Weather_Field:{uitype:1,name:"Weather Field",prefix:"cf_pcf_pwf"},Grid_Field:{uitype:35,name:"Grid",prefix:"cf_pcf_vgf"},Validated_Field:{uitype:781,name:"Validated Field",prefix:"cf_pcf_cvf"},Related_Field:{uitype:10,name:"Related Field",prefix:"rf_pcf_rmf"},Plaque_Field:{uitype:782,name:"Plaque Field",prefix:"rf_pcf_cpf"}},defaultFirstDay=jQuery("#start_day").val(),weekDaysArray={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6};if(""===defaultFirstDay||void 0===defaultFirstDay)first_day_of_week=1;else var first_day_of_week=this.weekDaysArray[defaultFirstDay];Vtiger.Class("ParsVTCustomFields_Js",{},{instance:!1,getInstance:function(){if(!1===ParsVTCustomFields_Js.instance){var e=new ParsVTCustomFields_Js;return ParsVTCustomFields_Js.instance=e,e}return ParsVTCustomFields_Js.instance},validURL:function(e){return new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&amp;a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)},checkURL:function(e){return null!=e.match(/\.(jpeg|jpg|gif|png)$/)},fixjson:function(e,a){if(a){return"_"==e.slice(-1)?e.substring(0,e.length-1):e}return e.concat("_")},registerJSGridTableFields:function(e){var a=this,r=e.find("textarea.gridElement"),t=[],s=r.data("headers"),i=r.val(),d=!1;try{0!==i.length?(i=a.fixjson(i,!0),d=jQuery.parseJSON(i)):d=!1}catch(e){d=!1}var l=[];s.rowNames&&l.push({name:"#",css:"jsgrid-td-wrap",type:"text",validate:"required",width:100,editing:!1,align:"center"}),jQuery.each(s.columnNames,function(e,a){"object"==typeof a&&void 0!==a.name&&void 0!==a.type?(void 0!==a.value&&(jQuery.each(a.value,function(e,r){void 0===t[e]&&(t[e]={}),t[e][a.name]=r}),delete a.value),l.push(a)):l.push({name:a,type:"text",width:100,css:"jsgrid-td-wrap"})}),s.rowNames&&!d?jQuery.each(s.rowNames,function(e,a){void 0===t[e]&&(t[e]={}),t[e]["#"]=a}):d&&(t=d),l.push({type:"control",editButton:!0,deleteButton:!s.rowNames});var n={loadData:function(e){return $.grep(this.data_rows,function(a){var r=1;return $.each(a,function(a,t){e[a]&&"string"==typeof t&&-1==t.indexOf(e[a])&&(r=0)}),r})},insertItem:function(e){this.data_rows.push(e);var t=this.data_rows;setTimeout(function(){var e=JSON.stringify(t);r.val(a.fixjson(e,!1))},1e3)},updateItem:function(e){var t=this.data_rows;setTimeout(function(){var e=JSON.stringify(t);r.val(a.fixjson(e,!1))},1e3)},deleteItem:function(e){var t=$.inArray(e,this.data_rows);this.data_rows.splice(t,1);var s=this.data_rows;setTimeout(function(){var e=JSON.stringify(s);r.val(a.fixjson(e,!1))},1e3)}};window.dbJSGrid=n,n.data_rows=t,e.find("div.dataTable").css("max-width",e.width()+"px"),e.find("div.dataTable").jsGrid({width:"100%",height:"auto",filtering:!0,editing:!0,inserting:!s.rowNames,sorting:!0,paging:!0,autoload:!0,pageSize:10,pageButtonCount:5,controller:n,fields:l})},DisplayCurrentTime:function(e){var a=new Date,r=a.getHours(),t=a.getMinutes(),s=r>=12?"PM":"AM";if(12==e&&(r=(r%=12)||12),t=t<10?"0"+t:t,r=r<10?"0"+r:r,12==e)i=r+":"+t+" "+s;else var i=r+":"+t;return i},LoadDatePicker:function(e,a,r){var t=this;setTimeout(function(){void 0!==$.fn.Zebra_DatePicker?jQuery(e).Zebra_DatePicker({first_day_of_week:first_day_of_week}):(loadScript("layouts/v7/modules/ParsVT/resources/datepicker/datepicker.min.js",function(){t.LoadDatePicker(e,a,r)}),loadCSS("layouts/v7/modules/ParsVT/resources/datepicker/datepicker.min.css","parsvtdatepicker"))},1e3)},LoadRateJS:function(e,a,r,t,s,i){var d=this;setTimeout(function(){void 0!==$.fn.rating?"hidden"!=jQuery(e).attr("type")&&jQuery(jQuery(e)).rating({readonly:a,emotion:s,listview:i}):(loadScript("layouts/v7/modules/ParsVT/resources/rating/js/simple-rating.js",function(){d.LoadRateJS(e,a,r,t,s,i)}),loadCSS("layouts/v7/modules/ParsVT/resources/rating/css/simple-rating.css","parsvtrating"))},1e3)},LoadInstagramFeed:function(e,a,r,t,s){var i=this;setTimeout(function(){void 0!==$.instagramFeed?"hidden"!=jQuery(e).attr("type")&&$.instagramFeed({username:s,container:"#"+t,display_profile:!0,display_biography:!0,display_igtv:!1,items:12,items_per_row:4,display_gallery:!0,image_size:150}):loadScript("layouts/v7/modules/ParsVT/resources/instagramFeed/jquery.instagramFeed.js",function(){i.LoadInstagramFeed(e,a,r,t,s)})},1e3)},LoadTwitterFeed:function(e,a,r,t,s){var i=this;setTimeout(function(){void 0!==$.fn.tweetie?"hidden"!=jQuery(e).attr("type")&&(s.includes("#")?$(t).tweetie({url:"index.php?module=ParsVT&action=Fields&mode=tweetie",type:"hashtag",template:"<li>{{tweet.created_at}} - {{tweet.text}}</li>",dateFormat:"%b %d, %Y",params:{count:5,screen_name:s.replace("#",""),q:s.replace("#","")}}):$(t).tweetie({url:"index.php?module=ParsVT&action=Fields&mode=tweetie",type:"timeline",template:"<li>{{tweet.created_at}} - {{tweet.text}}</li>",dateFormat:"%b %d, %Y",params:{count:5,screen_name:s.replace("#",""),exclude_replies:!0,include_rts:!0}})):loadScript("layouts/v7/modules/ParsVT/resources/tweetie/tweetie.min.js",function(){i.LoadTwitterFeed(e,a,r,t,s)})},500)},LoadColorPicker:function(e,a,r,t){var s=this;setTimeout(function(){void 0!==$.fn.parsvtcolorpicker?"color"!=jQuery(e).attr("type")&&jQuery(jQuery(e)).parsvtcolorpicker(t):loadScript("layouts/v7/modules/ParsVT/resources/tinycolor/tinycolor.js",function(){s.LoadColorPicker(e,a,r,t)})},1e3)},isJson:function(e){try{JSON.parse(e)}catch(e){return!1}return!0},setRepeaterValue:function(e,a,r){var t=this;setTimeout(function(){if(r){var s=jQuery("textarea[name='"+a+"']").val();if(s=s.trim(),s=s.replace(/\(\(\(/g,"{"),s=s.replace(/\)\)\)/g,"}"),s=t.fixjson(s,!0),!t.isJson(s))return void jQuery("textarea[name='"+a+"']").val("");if(jQuery.parseJSON(s).length<=1)return void jQuery("textarea[name='"+a+"']").val("")}var i=$(e).repeaterVal();i=JSON.stringify(i.group),i=t.fixjson(i,!1),jQuery("textarea[name='"+a+"']").val(i)},500)},LoadRepeater:function(e,a,r,t,s){var i=this;if("Edit"==t)setTimeout(function(){if(void 0!==$.fn.repeater){if(!jQuery(e).hasClass("hide")){var d="repeater"+Math.floor(1e3*Math.random()+1),l=Math.floor(1e3*Math.random()+1),n='<div class="parsrepeater '+d+'" data-repater-name="'+d+'" data-name="'+jQuery(e).attr("name")+'">\n<div data-repeater-list="group">\n    <div data-repeater-item>\n        <input class="inputElement repaterfield'+l+'" type="text" name="repeater" value=""/>\n        <input data-repeater-delete type="button" value="'+app.vtranslate("Delete")+'" class="btn btn-danger deleteRepeater'+l+'"/>\n    </div>\n</div>\n<input data-repeater-create type="button" value="'+app.vtranslate("Add")+'" class="btn addButton btn-default module-buttons addRepeater'+l+'"/>\n</div>';jQuery(e).after(n),jQuery(e).addClass("hide");var o=jQuery(e).val();o=(o=o.replace(/\(\(\(/g,"{")).replace(/\)\)\)/g,"}"),o=i.fixjson(o,!0);var u=[],c=$("."+d).repeater({initEmpty:!0,defaultValues:{repeater:""},show:function(){$(this).slideDown("slow")},hide:function(e){$(this).slideUp(e)},isFirstItemUndeletable:!0});i.isJson(o)?u=jQuery.parseJSON(o):(u=""!==o?[{repeater:o}]:[{repeater:""}],jQuery(e).val(JSON.stringify(u))),c.setList(u),$(document).on("input propertychange",".repaterfield"+l,function(e){var a=$(this).closest('div[class^="parsrepeater"]').data("repater-name"),r=$(this).closest('div[class^="parsrepeater"]').data("name");i.setRepeaterValue("."+a,r,!1)}),$(document).on("click",".deleteRepeater"+l,function(e){var a=$(this).closest('div[class^="parsrepeater"]').data("repater-name"),r=$(this).closest('div[class^="parsrepeater"]').data("name");i.setRepeaterValue("."+a,r,!0)}),$(document).on("click",".addRepeater"+l,function(e){var a=$(this).closest('div[class^="parsrepeater"]').data("repater-name"),r=$(this).closest('div[class^="parsrepeater"]').data("name");i.setRepeaterValue("."+a,r,!1)})}}else loadScript("layouts/v7/modules/ParsVT/resources/RepeaterJS/repeater.js",function(){i.LoadRepeater(e,a,r,t,s)})},1e3);else{s=s.trim(),s=s.replace(/\(\(\(/g,"{"),s=s.replace(/\)\)\)/g,"}"),s=i.fixjson(s,!0);var d=[];d=i.isJson(s)?jQuery.parseJSON(s):""!==s?[{repeater:s}]:[{repeater:""}];var l='<div class="repeaterField">';$.each(d,function(e,a){l=l+a.repeater+"</br>"}),l+="</div>",jQuery(e).html(l)}},LoadVoiceRecorder:function(e,a,r,t,s){var i=this;if("Edit"==t)setTimeout(function(){if("function"==typeof Recorder){if(!jQuery(e).hasClass("hide")){jQuery(e).addClass("hide");var d="recorder"+Math.floor(1e3*Math.random()+1),l='<div class="recording-field"><span class="recordButton btn btn-info start'+d+'"><i class="glyphicon glyphicon-record"></i></span><span class="pauseButton btn btn-warning pause'+d+'" disabled><i class="glyphicon glyphicon-pause"></i></span><span class="stopButton btn btn-danger stop'+d+'" disabled><i class="glyphicon glyphicon-stop"></i></span><br><br><ul class="recordingsList" style="list-style: none;margin-bottom: 1rem;"></ul></div>';jQuery(e).after(l),$(".pauseButton").attr("disabled",!0),$(".stopButton").attr("disabled",!0),$(".start"+d).click(startRecording),$(".stop"+d).click(stopRecording),$(".pause"+d).click(pauseRecording);var n=jQuery.trim(jQuery(e).text()),o=n?n.split("||"):[];jQuery.each(o,function(a,r){if(r=jQuery.trim(r)){var t="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file="+encodeURIComponent(r),s=jQuery("<audio></audio>"),i=jQuery("<li></li>"),d=jQuery("<a></a>"),l=6e4*(new Date).getTimezoneOffset();new Date(Date.now()-l).toISOString().slice(0,-1);s.attr("controls",!0),s.attr("src",t),d.attr("href",t),d.attr("download",t),d.html("<br><i class='btn btn-info glyphicon glyphicon-download'></i>"),i.append(s),i.append(d);var n=jQuery("<i class='btn btn-success glyphicon glyphicon-ok' disabled=\"true\"></i>");i.append(n);var o=jQuery('<i data-file="'+t+'" data-file-value="'+r+"\" class='btn btn-danger glyphicon glyphicon-remove'></i>");i.append(o),o.click(function(){var a=jQuery(this).closest("li");app.helper.showProgress();var r=jQuery(this).data("file");if(r){var t=jQuery(this).closest("td.fieldValue").find("textarea"),s=jQuery(this).data("file-value"),i=jQuery(e).attr("name");if(jQuery('input[name="record"]').length)d=jQuery('input[name="record"]').val();else var d=app.getRecordId();jQuery.ajax({url:"index.php?module=ParsVT&action=ActionAjax&mode=removeFile",data:{file_path:r,parrent_record_id:d,field_name:i},async:!1,success:function(e){var r=t.text().split("||");t.text(arrayRemove(r,s).join("||")),a.remove(),app.helper.hideProgress()},error:function(e,a,r){app.helper.hideProgress()}})}else a.remove(),app.helper.hideProgress()}),jQuery(e).next().find(".recordingsList").append(i)}})}}else loadScript("layouts/v7/modules/ParsVT/resources/recorder-js/recorder.js",function(){i.LoadVoiceRecorder(e,a,r,t,s)})},500);else{var d=jQuery.trim("List"==t?jQuery(e).closest("td.listViewEntryValue").data("rawvalue"):jQuery(e).text()),l=d?d.split("||"):[];jQuery(e).find("ul.recordingsListParsVT").length||(jQuery(e).html('<ul class="recordingsListParsVT" style="list-style: none;margin-bottom: 1rem;"></ul>'),jQuery.each(l,function(a,r){if(r=jQuery.trim(r)){var s="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file="+encodeURIComponent(r),i=jQuery("<audio></audio>"),d=jQuery("<li></li>"),l=jQuery("<a></a>"),n=6e4*(new Date).getTimezoneOffset();new Date(Date.now()-n).toISOString().slice(0,-1);if(i.attr("controls",!0),i.attr("src",s),l.attr("href",s),l.attr("download",s),l.html("<br><i class='btn btn-info glyphicon glyphicon-download'></i>"),d.append(i),d.append(l),jQuery(e).find(".recordingsListParsVT").append(d),"List"==t)return!1}}))}},LoadBDCITY:function(e){var a="Unknown";switch(e.substr(0,3)){case"169":a="Azar shahr";break;case"170":a="Oskou";break;case"149":case"150":a="Aahr";break;case"171":a="Bostan abad";break;case"168":a="Bonab";break;case"136":case"137":case"138":a="Tabriz";break;case"545":a="Turkmenchai";break;case"505":a="Jolfa";break;case"636":a="Charoimagh";break;case"164":case"165":a="sarab";break;case"172":a="Shabestar";break;case"623":a="Sufian";break;case"506":a="ajab shir";break;case"519":a="Cliber";break;case"154":case"155":a="Maragheh";break;case"567":a="Varzaghan";break;case"173":a="Harris";break;case"159":case"160":a="Hashtrood";break;case"604":a="Horand";break;case"274":case"275":a="Orumieh";break;case"295":a="Oshnavieh";break;case"637":a="Anzal";break;case"292":a="Bukan";break;case"492":a="Poldasht";break;case"289":a="Piranshahr";break;case"677":a="Takht Soleyman";break;case"294":a="Takab";break;case"493":a="Chaypareh";break;case"279":case"280":a="khoy";break;case"288":a="Sardasht";break;case"284":case"285":a="Salmas";break;case"638":a="Silvaneh";break;case"291":a="Siah Cheshmeh (Chaldoran)";break;case"640":a="Shot";break;case"293":a="Shahien dezh";break;case"675":a="Keshavarz";break;case"282":case"283":a="Maku";break;case"286":case"287":a="Mahabad";break;case"296":case"297":a="Miandoab";break;case"290":a="Naghdeh";break;case"400":case"401":a="Asadabad";break;case"404":case"405":a="Bahar";break;case"397":a="Toyserkan";break;case"398":case"399":a="Razan";break;case"647":a="Shara va pishkhar";break;case"502":a="Famenin";break;case"584":a="Qolqol rud";break;case"402":case"403":a="Kabodarahang";break;case"392":case"393":a="Malayer";break;case"395":case"396":a="Nahavand";break;case"386":case"387":a="Hamedan";break;case"503":a="Abarkuh";break;case"444":a="Ardakan";break;case"551":a="Ashkezar";break;case"447":a="Bafgh";break;case"561":a="Bahabad";break;case"445":a="Taft";break;case"718":a="Dastgardan";break;case"83":a="Tabas";break;case"446":a="Mehriz";break;case"448":a="Maybod";break;case"552":a="Nayer";break;case"543":a="Harat and Marvast";break;case"442":case"443":a="Yazd";break;case"51":a="Ashtiyan";break;case"052":case"053":a="Arak";break;case"58":a="Tafresh";break;case"55":a="Khomein";break;case"617":a="Khandab";break;case"57":a="Delijan";break;case"618":a="zarand markazi";break;case"059":case"060":a="Saveh";break;case"061":case"062":a="Sarband";break;case"544":a="Farahan";break;case"56":a="Mahalat";break;case"571":a="vafs";break;case"593":a="Hendudur";break;case"667":a="Abu Musa";break;case"348":a="Bastak";break;case"586":a="Bashaghard";break;case"338":case"339":a="Bandar Abbas";break;case"343":case"344":a="Bandar Lengeh";break;case"346":a="Jask";break;case"337":a="Haji Abad";break;case"554":a="Khamir";break;case"469":a="Rudan";break;case"537":a="Fin";break;case"345":a="Qeshm";break;case"470":a="Gavbandi";break;case"341":case"342":a="Minab";break;case" 483":case"484":a="Azna";break;case"557":a="Oshtoriyan";break;case"418":a="Alshatr";break;case"416":case"417":a="Oligodarz";break;case"412":case"413":a="Boroujerd";break;case"592":a="Papi";break;case"612":a="Chaghlundy";break;case"613":a="Chegeni";break;case"406":case"407":a="Khorram abad";break;case"421":a="Doroud";break;case"598":a="Romashkan";break;case"419":a="Kuhdasht";break;case"385":a="Malavi (pol dokhtar)";break;case"420":a="Noorabad (Delfan)";break;case"528":a="Veysian";break;case"213":case"214":a="Amol";break;case"205":case"206":a="Babol";break;case"498":a="Babolsar";break;case"568":a="Bandpey";break;case"711":a="Bandpey sharghi";break;case"217":case"218":a="Behshar";break;case"221":a="Tonekabon";break;case"582":a="Joybar";break;case"483":a="Chalous";break;case"625":a="Chamestan";break;case"576":a="Chahar dangeh";break;case"578":a="Doodange";break;case"227":a="Ramsar";break;case"208":case"209":a="Sari";break;case"225":a="Swadkouh";break;case"577":a="Shirgah";break;case"712":a="Abbas Abad";break;case"215":case"216":a="Ghaemshahr";break;case"626":a="Kajour";break;case"627":a="Kelardasht";break;case"579":a="Galougah";break;case"713":a="Mindoroud";break;case"499":a="Neka";break;case"222":a="Noor";break;case"219":case"220":a="Noushahr";break;case"500":case"501":a="Haraz va Mahmoudabad";break;case"623":a="Azadshahr";break;case"497":a="Agha ghala";break;case"223":a="Bandar torkaman";break;case"689":a="Bandar Gaz";break;case"487":a="Ramian";break;case"226":a="Ali Abad";break;case"224":a="Kurdkouy";break;case"486":a="kalaleh";break;case"211":case"212":a="Gorgan";break;case"628":a="Gomeishan";break;case"202":case"203":a="Gonbad-e Qavus";break;case"531":a="Marveh tapeh";break;case"488":a="Minudasht";break;case"261":a="Astara";break;case"273":a="Astaneh";break;case"630":a="amlash";break;case"264":a="Bandar Anzali";break;case"518":a="Khomam";break;case"631":a="Rahim Abad";break;case"258":case"259":a="Rasht";break;case"570":a="Rezvanshahr";break;case"265":a="Roodbar";break;case"268":case"269":a="Rossdar";break;case"653":a="Sangar";break;case"517":a="Siyahkal";break;case"569":a="shaft";break;case"267":a="Someeh sara";break;case"262":case"263":a="Talesh";break;case"593":a="Amarlou";break;case"266":a="Fouman";break;case"693":a="Kochesfehan";break;case"271":case"272":a="Lahijan";break;case"694":a="Lasht-e nagha";break;case"270":a="Langrod";break;case"516":a="Masal va Shanderman";break;case"333":case"334":a="Islam Abad";break;case"691":a="Bayangan";break;case"323":case"322":a="Paveh";break;case"595":a="Salas Babajani";break;case"395":a="Javanroud";break;case"641":a="Homeyl";break;case"596":a="Ravansar";break;case"336":a="Sar Pul Zahab";break;case"335":a="Songor";break;case"496":a="Sahneh";break;case"337":a="gasr Shirin";break;case"324":case"325":a="Kermanshah";break;case"394":a="Kerend";break;case"330":a="Cangavar";break;case"332":a="guilan gharb";break;case"331":a="Hersin";break;case"687":a="Basht";break;case"422":case"423":a="Boyer Ahmad (Yasuj)";break;case"599":a="Bahmani";break;case"600":a="Charosa";break;case"688":a="Doruhan";break;case"424":case"425":a="Kohkiloyeh (Dehdasht)";break;case"426":a="Gachsaran (Duganbadan)";break;case"550":a="Landeh";break;case"697":a="Margoon";break;case"384":a="Baneh";break;case"377":case"378":a="Bijar";break;case"558":a="Dehgolan";break;case"385":a="Dyvandreh";break;case"646":a="Sarvabad";break;case"375":case"376":a="Saghez";break;case"372":case"373":a="Sanandaj";break;case"379":case"380":a="Gorveh";break;case"383":a="Kamyaran";break;case"674":a="Korani";break;case"381":case"382":a="Marivan";break;case"676":a="Namshir";break;case"722":a="Arzonieh";break;case"542":a="Anar";break;case"312":case"313":a="Baft";break;case"317":a="Bardsir";break;case"310":case"311":a="Bam";break;case"302":case"303":a="Jiroft";break;case"583":a="raber";break;case"321":a="Raver";break;case"382":a="Rain";break;case"304":case"305":a="Rafsanjan";break;case"536":a="Roudbar Kahnouj";break;case"605":a="Regan";break;case"308":case"309":a="Zarand";break;case"306":case"307":a="Sirjan";break;case"319":a="Shahdad";break;case"313":case"314":a="Shahr babak";break;case"606":a="Amber abad";break;case"320":a="Fahraj";break;case"698":a="Galeh ganj";break;case"298":case"299":a="Kerman";break;case"535":a="Kohbnan";break;case"315":case"316":a="Kahnouj";break;case"318":a="Golbaf";break;case"607":a="Mahan";break;case"608":a="Manujan";break;case"508":a="Abic";break;case"538":a="Avaj";break;case"728":a="Alborz";break;case"509":a="Boine Zahra";break;case"438":case"439":a="Takestan";break;case"580":a="Roudbar Alamut";break;case"590":a="Roudbar shahrestan";break;case"559":a="Zia Abad";break;case"588":a="Tarom selfi";break;case"431":case"432":a="gazvin";break;case"037":case"038":a="gom";break;case"702":a="Kahak";break;case"240":case"241":a="Abadeh";break;case"670":a="Abadeh Tashak";break;case"648":a="Arsanjan";break;case"252":a="Estahban";break;case"678":a="Eshkanan";break;case"253":a="Eghlid";break;case"649":a="Ouz";break;case"513":a="Bavanat";break;case"546":a="Beyza";break;case"671":a="Juyom";break;case"246":case"247":a="Jahrom";break;case"654":a="Haji Abad (Zarrin Dasht)";break;case"548":a="Kharameh";break;case"547":a="Khsht va komarej";break;case"655":a="Kafr";break;case"248":case"249":a="Darab";break;case"253":a="Sepidan";break;case"514":a="Sarvestan";break;case"665":a="Sadat Abad";break;case"673":a="Shibkouh";break;case"228":case"229":case"230":a="Shiraz";break;case"679":a="Farashband";break;case"256":case"257":a="Fasa";break;case"244":case"245":a="Firooz abad";break;case"681":a="Ghonghori (khoram bid)";break;case"723":a="Girukarzin";break;case"236":case"237":a="Kazeroon";break;case"683":a="kuar";break;case"656":a="krash";break;case"250":case"251":a="Larestan";break;case"515":a="Lamerd";break;case"242":case"243":a="Marvdasht";break;case"238":case"239":a="Mamasani";break;case"657":a="Mehr";break;case"255":a="Neyriz";break;case"684":a="Eyvanki";break;case"700":a="Bastam";break;case"642":a="Beyarjomand";break;case"457":a="Damghan";break;case"456":a="Semnan";break;case"458":case"459":a="Shahroud";break;case"460":a="Garmsar";break;case"530":a="Mahdishahr";break;case"520":a="Miami";break;case"358":case"359":a="Iranshahr";break;case"682":a="Bazman";break;case"703":a="Bampur";break;case"364":case"365":a="Chabahar";break;case"371":a="Khash";break;case"701":a="Dashtiyari";break;case"720":a="Rask";break;case"366":case"367":a="Zabul";break;case"704":a="Zabuli";break;case"361":case"362":a="Zahedan";break;case"369":case"370":a="Saravan";break;case"635":a="Sarbaz";break;case"668":a="Sib va soran";break;case"533":a="Shahraki va naroei (Zahak)";break;case"705":a="Shib Ab";break;case"699":a="Fanuj";break;case"669":a="gasrgand";break;case"725":a="Konarak";break;case"597":a="Lashar (espakeh)";break;case"611":a="Mirjaveh";break;case"525":a="Nick shahr";break;case"181":a="Abadan";break;case"527":a="Aghajari";break;case"585":a="Arvand kenar";break;case"685":a="Omidieh";break;case"663":a="andika";break;case"192":case"193":a="Andimeshk";break;case"174":case"175":a="Ahvaz";break;case"183":case"184":a="Izeh";break;case"481":a="Bagh malek";break;case"706":a="Bandar emam Khomeini ";break;case"194":case"195":a="Bandar mahshar";break;case"185":case"186":a="Behbahan";break;case"182":a="Khorramshahr";break;case"199":case"200":a="Dezful";break;case"198":a="Dashe Azadegan";break;case"662":a="Ramshir";break;case"190":case"191":a="Ramhormoz";break;case"692":a="Sardasht";break;case"189":a="Shadegan";break;case"707":a="Shaver";break;case"526":a="Sush";break;case"187":case"188":a="Shushtar";break;case"729":a="Gotvand";break;case"730":a="Lali";break;case"196":case"197":a="Masjed Soleyman";break;case"661":a="Hondijan";break;case"680":a="Hoveizeh";break;case"643":a="Ahmad abad";break;case"562":a="Bajestan";break;case"572":a="Bradaskan";break;case"74":a="Taibad";break;case"644":a="Takht jolgeh";break;case"072":case"073":a="Torbat jam";break;case"069":case"070":a="Torbat heydarieh";break;case"521":a="Joghtai";break;case"573":a="Jouin";break;case"522":a="Chenarran";break;case"724":a="Khalil Abad";break;case"76":a="Khaf";break;case"77":a="Dragaz";break;case"650":a="Rashtkhar";break;case"574":a="Zeber khan";break;case"078":case"079":a="Sabzevar";break;case"81":a="Sarakhs";break;case"84":a="Fariman";break;case"651":a="Faiz abad";break;case"086":case"087":a="guchan";break;case"089":case"090":a="Kashmar";break;case"553":a="Kalat";break;case"91":a="Gonabad";break;case"092":case"093":case"094":a="Mashhad";break;case"97":a="Mashhad mantaghe2";break;case"98":a="Mashhad mantaghe3";break;case"96":a="Mashhad mantaghe1";break;case"105":case"106":a="neyshabour";break;case"63":a="Esfarin";break;case"067":case"068":a="Bojnord";break;case"75":a="Jajarm";break;case"591":a="Razu o jargalan";break;case"82":a="Shirvan";break;case"635":a="Faruj";break;case"524":a="Mane va Samelgan";break;case"468":a="Ardal";break;case"465":a="Broujen";break;case"461":case"462":a="Shahr e Kord";break;case"467":a="Farsan";break;case"632":a="Flard";break;case"555":a="Koohrang";break;case"633":a="Kiyar";break;case"629":a="Gandman";break;case"466":a="Lordegan";break;case"696":a="Miyankoh";break;case"721":a="Bashroyeh";break;case"064":case"065":a="Birjand";break;case"523":a="darmiyan";break;case"652":a="zirkoh";break;case"719":a="Sarayan";break;case"716":a="Sarbisheh ";break;case"85":a="Ferdous";break;case"88":a="Gaenat";break;case"563":a="Nehbandan";break;case"529":a="Bandar Deilm";break;case"353":a="Bandar ganaveh";break;case"349":case"350":a="Bushehr";break;case"355":a="Tangestan";break;case"609":a="Jam";break;case"351":case"352":a="Dashtestan";break;case"354":a="Dashti";break;case"732":a="Delvar";break;case"357":a="Dair";break;case"532":a="Saad Abad";break;case"610":a="Shabankara";break;case"356":a="Kangan";break;case"556":a="Eslamshahr";break;case"658":a="Pakdasht";break;case"001":case"002":case"003":case"004":case"005":case"006":case"007":case"008":a="Tehran markazi";break;case"11":a="Tehran jonob";break;case"20":a="Tehran shargh";break;case"25":a="Tehran shomal";break;case"15":a="Tehran gharb";break;case"43":a="Damavand";break;case"666":a="Robat Karim";break;case"489":a="Savojbolagh";break;case"044":case"045":a="Shemiran";break;case"048":case"049":a="Shahr rey";break;case"490":case"491":a="Shahriar";break;case"695":a="Taleghan";break;case"659":a="Firoozkooh";break;case"031":case"032":a="Karaj";break;case"664":a="Kahrizak";break;case"717":a="Nazarabad";break;case"041":case"042":a="Varamin";break;case"471":case"472":a="Omoure khareje";break;case"454":a="Abdanan";break;case"581":a="arkhazi (malekshahi)";break;case"449":case"450":a="Ilam";break;case"616":a="Ivan";break;case"534":a="Badreh";break;case"455":a="Dareh shahr";break;case"451":a="Dehloran";break;case"726":a="Zarin Abad";break;case"634":a="Shirvan Lumar";break;case"453":a="Shirvan va Chardavol";break;case"727":a="Mussan";break;case"452":a="Mehran";break;case"145":case"146":a="Ardebil";break;case"731":a="Arshagh";break;case"690":a="Angout";break;case"601":a="Bileh savar";break;case"504":a="Pars abad";break;case"163":a="Khalkhal";break;case"714":a="Khouresh Rustam";break;case"715":a="Sarein";break;case"566":a="Sanjabad (Kosar)";break;case"166":case"167":a="Meshkin shahr";break;case"161":case"162":a="Moghan";break;case"686":a="Namin";break;case"603":a="Naeir";break;case"619":a="Aran va Bidgol";break;case"118":a="Ardestan";break;case"127":case"128":case"129":a="Esfahan";break;case"620":a="Bagh Bahadoran";break;case"621":a="Boeing va Miandasht";break;case"549":a="Tiran va karan";break;case"564":a="Jarghoyeh";break;case"575":a="Chadagan";break;case"113":case"114":a="Khomeini shahr";break;case"122":a="Khansar";break;case"540":a="Khor va Biannak";break;case"660":a="Dolat abad";break;case"120":a="Semirom";break;case"512":a="Semirom sofla (Dehagan)";break;case"510":case"511":a="Shahin Shahr";break;case"119":a="Shahreza";break;case"115":a="Fereydan";break;case"112":a="Fereydoun Shahr";break;case"110":case"111":a="Falavarjan";break;case"125":case"126":a="Kashan";break;case"565":a="Kohpayeh";break;case"121":a="Golpayegan";break;case"116":case"117":a="Lenjan (Zarinshahr)";break;case"541":a="Mobarake";break;case"622":a="Meymeh";break;case"124":a="Naein";break;case"108":case"109":a="Najaf Abad";break;case"123":a="Natanz";break;case"Motefareghe":a="Motefateghe az hame ostanha";break;case"428":case"427":a="Zanjan";break;case"507":a="Malekan";break;case"158":a="Marand";break;case"615":a="Abhar va Khoramdareh";break;case"152":case"153":a="Miyaneh"}return app.vtranslate(a)},LoadCCN:function(e){var a={MELLI:"Melli Bank",SEPAH:"Sepah Bank",TOSEEH_SADERAT:"Toseeh Saderat Bank",SANAT_MADAN:"Sanat Madan Bank",KESHAVARZI:"KeshavarziBank",MASKAN:"Maskan Bank",POST_BANK:"Post Bank",TOSEEH_TEAVON:"Tosse Taavon Bank",EGHTESAD_NOVIN:"Eghtesad Novin Bank",PARSIAN:"Parsian Bank",PASARGAD:"Pasargad Bank",KARAFARIN:"Karafarin Bank",SAMAN:"Saman Bank",SINA:"Sina Bank",SARMAYEH:"Sarmayeh Bank",TAT:"Ayandeh Bank",SHAHR:"Shahr Bank",DEY:"Dey Bank",SADERAT:"Saderat Bank",MELAT:"Mellat Bank",TAJARAT:"Tejarat Bank",REFAH:"Refah Bank",ANSAR:"Ansar Bank",RESALAT:"Resalat Bank",HEKMAT:"Hekmat Bank",GARDESHGARI:"Gardeshgari Bank",MEHR:"Mehr Iran Bank",TOSEEH:"Toseeh Bank",GHAVAMIN:"Ghavamin Bank",TEJARAT:"Tejarat Bank",JBC:"JBC",MASTERCARD:"Master Card",VISA:"Visa Card",DISCOVER:"Discover",DINERS_CLUB:"Diners Club",IRAN_ZAMIN:"Iran Zamin Bank"},r=[{id:a.MELLI,rule:/^603799\d{10}/g},{id:a.SEPAH,rule:/^589210\d{10}/g},{id:a.TOSEEH_SADERAT,rule:/^627648\d{10}/g},{id:a.SANAT_MADAN,rule:/^627961\d{10}/g},{id:a.KESHAVARZI,rule:/^603770\d{10}/g},{id:a.MASKAN,rule:/^628023\d{10}/g},{id:a.POST_BANK,rule:/^628023\d{10}/g},{id:a.TOSEEH_TEAVON,rule:/^502908\d{10}/g},{id:a.EGHTESAD_NOVIN,rule:/^627412\d{10}/g},{id:a.PARSIAN,rule:/^622106\d{10}/g},{id:a.PASARGAD,rule:/^639347\d{10}/g},{id:a.PASARGAD,rule:/^502229\d{10}/g},{id:a.KARAFARIN,rule:/^627488\d{10}/g},{id:a.SAMAN,rule:/^621986\d{10}/g},{id:a.SINA,rule:/^639346\d{10}/g},{id:a.SARMAYEH,rule:/^639607\d{10}/g},{id:a.TAT,rule:/^636214\d{10}/g},{id:a.SHAHR,rule:/^502806\d{10}/g},{id:a.DEY,rule:/^502938\d{10}/g},{id:a.SADERAT,rule:/^603769\d{10}/g},{id:a.MELAT,rule:/^610433\d{10}/g},{id:a.TAJARAT,rule:/^627353\d{10}/g},{id:a.REFAH,rule:/^589463\d{10}/g},{id:a.ANSAR,rule:/^627381\d{10}/g},{id:a.RESALAT,rule:/^504172\d{10}/g},{id:a.HEKMAT,rule:/^636949\d{10}/g},{id:a.GARDESHGARI,rule:/^505416\d{10}/g},{id:a.MEHR,rule:/^606373\d{10}/g},{id:a.TOSEEH,rule:/^628157\d{10}/g},{id:a.GHAVAMIN,rule:/^639599\d{10}/g},{id:a.TEJARAT,rule:/^585983\d{10}/g},{id:a.IRAN_ZAMIN,rule:/^505785\d{10}/g},{id:a.JBC,rule:/^(?:2131|1800|35\d{3})\d{11}/g},{id:a.DISCOVER,rule:/^6(?:011|5[0-9]{2})[0-9]{12}/g},{id:a.DINERS_CLUB,rule:/^3(?:0[0-5]|[68][0-9])[0-9]{11}/g},{id:a.VISA,rule:/^4[0-9]{12}(?:[0-9]{3})/g},{id:a.MASTERCARD,rule:/^(?:5[1-5][0-9]{2}|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/g}];e=e.replace(/[^0-9.]/g,"");for(var t=0;t<r.length;t++)if(r[t].rule.test(e))return app.vtranslate(r[t].id);return app.vtranslate("Unknown Bank")},LoadIBAN:function(e){for(var a={BANK_010:"Markazi Bank",BANK_011:"Sanat Madan Bank",BANK_012:"Mellat Bank",BANK_013:"Refah Bank",BANK_014:"Maskan Bank",BANK_015:"Sepah Bank",BANK_016:"Keshavarzi Bank",BANK_017:"Melli Bank",BANK_018:"Tejarat Bank",BANK_019:"Saderat Bank",BANK_020:"Toseeh Saderat Bank",BANK_021:"Post Bank Bank",BANK_022:"Tosse Taavon Bank",BANK_051:"Tosse Institute Bank",BANK_052:"Ghavamin Bank",BANK_053:"Karafarin Bank",BANK_054:"Parsian Bank",BANK_055:"Eghtesad Novin Bank",BANK_056:"Saman Bank",BANK_057:"Pasargad Bank",BANK_058:"Sarmayeh Bank",BANK_059:"Sina Bank",BANK_060:"Mehr Iran Bank",BANK_061:"Shahr Bank",BANK_062:"Ayandeh Bank",BANK_063:"Ansar Bank",BANK_064:"Gardeshgari Bank",BANK_065:"Hekmat Bank",BANK_066:"Dey Bank",BANK_069:"Iran Zamin Bank",BANK_070:"Resalat Bank",BANK_073:"Kowsar Bank",BANK_075:"Mellal Bank",BANK_078:"Khavar Miyane Bank",BANK_095:"Iran Venezuela Bank"},r=[{id:a.BANK_010,ibanrule:/^IR\d{2}010\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_011,ibanrule:/^IR\d{2}011\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_012,ibanrule:/^IR\d{2}012\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_013,ibanrule:/^IR\d{2}013\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_014,ibanrule:/^IR\d{2}014\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_015,ibanrule:/^IR\d{2}015\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_016,ibanrule:/^IR\d{2}016\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_017,ibanrule:/^IR\d{2}017\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_018,ibanrule:/^IR\d{2}018\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_019,ibanrule:/^IR\d{2}019\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_020,ibanrule:/^IR\d{2}020\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_021,ibanrule:/^IR\d{2}021\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_022,ibanrule:/^IR\d{2}022\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_051,ibanrule:/^IR\d{2}051\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_052,ibanrule:/^IR\d{2}052\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_053,ibanrule:/^IR\d{2}053\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_054,ibanrule:/^IR\d{2}054\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_055,ibanrule:/^IR\d{2}055\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_056,ibanrule:/^IR\d{2}056\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_057,ibanrule:/^IR\d{2}057\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_058,ibanrule:/^IR\d{2}058\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_059,ibanrule:/^IR\d{2}059\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_060,ibanrule:/^IR\d{2}060\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_061,ibanrule:/^IR\d{2}061\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_062,ibanrule:/^IR\d{2}062\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_063,ibanrule:/^IR\d{2}063\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_064,ibanrule:/^IR\d{2}064\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_065,ibanrule:/^IR\d{2}065\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_066,ibanrule:/^IR\d{2}066\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_069,ibanrule:/^IR\d{2}069\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_070,ibanrule:/^IR\d{2}070\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_073,ibanrule:/^IR\d{2}073\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_075,ibanrule:/^IR\d{2}075\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_078,ibanrule:/^IR\d{2}078\d{19}/g,cardrule:/d{16}/g},{id:a.BANK_095,ibanrule:/^IR\d{2}095\d{19}/g,cardrule:/d{16}/g}],t=0;t<r.length;t++)if(r[t].ibanrule.test(e))return app.vtranslate(r[t].id);return app.vtranslate("Unknown Bank")},LoadPasswordField:function(e){loadCSS("layouts/v7/modules/ParsVT/resources/Password/strength.css","ParsVTPasswordField")},copyStringToClipboard:function(e){var a=document.createElement("textarea");a.innerText=e,document.body.appendChild(a),a.select(),a.focus(),document.execCommand("copy"),a.remove(),console.log("should have copied "+e)},ShowPasswordField:function(e){var a=this,r=app.vtranslate("Copy Password"),t=a.cryptoPwd(e,!1),s=app.vtranslate("Copy to Clipboard")+'<br /><input class="inputElement" type="text" style="direction: ltr; text-align: left" value="'+t+'" readonly >',i={cancel:{label:app.vtranslate("Cancel"),className:"btn-default confirm-box-btn-pad pull-right"},confirm:{label:app.vtranslate("Copy"),className:"confirm-box-ok confirm-box-btn-pad btn-primary"}};app.helper.showConfirmationBox({title:r,message:s,buttons:i}).then(function(e){a.copyStringToClipboard(t)},function(e,a){})},ShowRandomPassword:function(e){var a=this,r=app.vtranslate("Password Generator"),t=app.vtranslate("Generate New Password")+'<br /><div class="row"><div class="col-md-12"><div class="input-group">\n<input type="text" class="form-control" rel="gp" data-size="16" data-character-set="a-z,A-Z,0-9,#">\n<span class="input-group-btn"><button type="button" class="btn btn-default getNewPass"><span class="fa fa-refresh"></span></button></span>\n</div></div></div>',s={cancel:{label:app.vtranslate("Cancel"),className:"btn-default confirm-box-btn-pad pull-right"},confirm:{label:app.vtranslate("Use Password"),className:"confirm-box-ok confirm-box-btn-pad btn-primary"}};app.helper.showConfirmationBox({title:r,message:t,buttons:s}).then(function(r){var t=$('input[rel="gp"]').val(),s=a.cryptoPwd($('input[rel="gp"]'),!0);e.val(s),jQuery("#"+e.attr("name")+"_display").val(t),a.copyStringToClipboard(t)},function(e,a){}),$('input[rel="gp"]').each(function(){$(this).val(a.randPassword($(this)))})},cryptoPwd:function(e,a){var r=e.val();if(""==r)return"";if(!0===a){return(t=window.btoa(r)).split("").reverse().join("")}if(!1===a){var t=r.split("").reverse().join("");return window.atob(t)}return""},randPassword:function(e){var a=$(e).attr("data-character-set").split(","),r="";$.inArray("a-z",a)>=0&&(r+="abcdefghijklmnopqrstuvwxyz"),$.inArray("A-Z",a)>=0&&(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),$.inArray("0-9",a)>=0&&(r+="0123456789"),$.inArray("#",a)>=0&&(r+="![]{}()%&*$#^<>~@|");for(var t="",s=0;s<$(e).attr("data-size");s++)t+=r.charAt(Math.floor(Math.random()*r.length));return t},checkPasswordStrength:function(e){var a=e.data("target")+"_status";if(""===e.val())return!1;e.val().length<6?(jQuery("#"+a).removeClass(),jQuery("#"+a).addClass("strength_meter"),jQuery("#"+a).addClass("weak-password"),jQuery("#"+a).html(app.vtranslate("Weak"))):e.val().match(/([0-9])/)&&e.val().match(/([a-zA-Z])/)&&e.val().match(/([~,!,@,#,$,%,^,&,*,-,_,+,=,?,>,<])/)?(jQuery("#"+a).removeClass(""),jQuery("#"+a).addClass("strength_meter"),jQuery("#"+a).addClass("strong-password"),jQuery("#"+a).html(app.vtranslate("Strong"))):(jQuery("#"+a).removeClass(),jQuery("#"+a).addClass("strength_meter"),jQuery("#"+a).addClass("medium-password"),jQuery("#"+a).html(app.vtranslate("Medium")))},searchCoordinates:function(e,a,r){var t=String(e).toString().trim().split(","),s=t[0],i=0;void 0!==t[1]&&(i=t[1]);var d=jQuery("body").data("language"),l="https://nominatim.openstreetmap.org/reverse?format=json&lat="+s+"&lon="+i+"&accept-language="+d;$.ajax({url:l,type:"GET",dataType:"json",error:function(e){jQuery("#"+a+"_locationname").html("")},success:function(e){if(r)t=e.address.country+" - "+(void 0!==e.address.state?e.address.state+" - ":"")+(void 0!==e.address.city?e.address.city:e.address.county);else{var t=e.display_name;if("fa_ir"==d){(t=e.display_name.split(",")).reverse();for(var s=0;s<t.length;s++)isNaN(t[s])||t.splice(s,1);t=t.join()}}jQuery("#"+a+"_locationname").html(t)}})},registerWeatherAutoComplete:function(e,a){var r=this;container=$("#"+e),container.find("input.autoComplete").autocomplete({minLength:"3",source:function(e,a){$.ajax({url:"index.php",dataType:"jsonp",data:{module:"ParsVT",action:"Fields",mode:"searchCities",term:e.term},success:function(e){var r=e;r.length<=0&&(r=new Array({label:app.vtranslate("JS_NO_RESULTS_FOUND"),type:"no results"})),a(r)}})},select:function(t,s){jQuery("input[name='"+a+"']").val(s.item.value),r.displayForcast(e,s.item.value),s.item.value=s.item.label,container.find("span.clearWeather").removeClass("hide"),jQuery("#"+a+"_display").attr("disabled","disabled"),jQuery("#"+a+"_display").prop("disbaled",!0),jQuery("#"+a+"_display").attr("readonly",!0)}})},displayForcast:function(e,a){var r="weather"+Math.floor(1e3*Math.random()+1),t='<div class="parsweatherwidget">\n    <div class="row">\n        <div class="col-sm-12 weathercity" id="'+r+'_locationname"></div>\n        <div class="col-sm-12 weatherheading"  id="'+r+'_weatherstatus"></div>\n        <div class="col-sm-6 parsweatherwidgeticon"><i class="wi " id="'+r+'_weathericon"></i></div>\n        <div class="col-sm-6">\n            <div class="col-sm-12 weathertemp" id="'+r+'_weathertemp"></div>\n            <div class="col-sm-12 weatherstatus" id="'+r+'_weatherwindSpeed"></div>\n            <div class="col-sm-12 weatherstatus" id="'+r+'_humidity"></div>\n            <div class="col-sm-12 weatherstatus" id="'+r+'_time"></div>\n        </div>\n    </div>\n</div>';jQuery("#"+e+"_forcast").html(t),this.searchCoordinates(a,r,!0),this.forecastWeather(a,r)},forecastWeather:function(e,a){var r=String(e).toString().trim().split(","),t=r[0],s=0;void 0!==r[1]&&(s=r[1]);var i="index.php?module=ParsVT&action=Fields&mode=getWeather&coordinate="+(e=t+","+s)+"&lang="+jQuery("body").data("language").substring(0,2);$.ajax({url:i,type:"GET",dataType:"json",error:function(e){jQuery("#"+a+"_locationname").html(""),jQuery("#"+a+"_weatherstatus").html(""),jQuery("#"+a+"_weathericon").removeClass("wi-*"),jQuery("#"+a+"_weathertemp").html(""),jQuery("#"+a+"_weatherwindSpeed").html(""),jQuery("#"+a+"_humidity").html("")},success:function(e){e.currently?(jQuery("#"+a+"_weatherstatus").html(e.currently.summary),jQuery("#"+a+"_weathericon").addClass("wi-"+e.currently.icon),jQuery("#"+a+"_weathertemp").html(e.currently.temperature+" ˚"),jQuery("#"+a+"_weatherwindSpeed").html(app.vtranslate("Wind")+": "+e.currently.windSpeed+" km/h"),jQuery("#"+a+"_humidity").html(app.vtranslate("Humidity")+": "+100*e.currently.humidity+"%")):(jQuery("#"+a+"_locationname").html(""),jQuery("#"+a+"_weatherstatus").html(""),jQuery("#"+a+"_weathericon").removeClass("wi-*"),jQuery("#"+a+"_weathertemp").html(""),jQuery("#"+a+"_weatherwindSpeed").html(""),jQuery("#"+a+"_humidity").html(""))}})},searchCity:function(e,a){var r="http://nominatim.openstreetmap.org/search?format=json&q="+e+"&accept-language="+jQuery("body").data("language");$.ajax({url:r,type:"GET",dataType:"json",error:function(e){console.log(e)},success:function(e){console.log(e);var a=e[0];callback(a)}})},getMobileOperatingSystem:function(){var e=navigator.userAgent||navigator.vendor||window.opera;return/windows phone/i.test(e)?"Windows Phone":/android/i.test(e)?"Android":/iPad|iPhone|iPod/.test(e)&&!window.MSStream?"iOS":/windows/i.test(e)?"Windows":"unknown"},registerDisplayParsVTCustomFieldsControl:function(e,a){var r=this,t=app.getViewName();if("Edit"==t||e&&"Edit"==a)$("select[id^='"+supportedParsVTCustomFields.UsersList.prefix+"'] , select[name*=relatedblockslists][name*="+supportedParsVTCustomFields.UsersList.prefix+"]").on("change",function(){var e=$(this).data("name"),a=$(this).val();null!=a?(a=a.sort(function(e,a){return e-a}),$("input[name="+e+"]").val(a.join(","))):$("input[name="+e+"]").val("")}),jQuery("textarea[name^='"+supportedParsVTCustomFields.Repeater_Field.prefix+"'], textarea[name*=relatedblockslists][name*="+supportedParsVTCustomFields.Repeater_Field.prefix+"]").each(function(){r.LoadRepeater(this,e,a,"Edit","")}),jQuery("textarea[name^='"+supportedParsVTCustomFields.Voice_Recorder_Field.prefix+"'], textarea[name*=relatedblockslists][name*="+supportedParsVTCustomFields.Voice_Recorder_Field.prefix+"]").each(function(){jQuery(this).parent("td").html().includes("recording-field")||r.LoadVoiceRecorder(this,e,a,"Edit","")}),jQuery("input[name^='"+supportedParsVTCustomFields.Coordinate.prefix+"'], input[name*=relatedblockslists][name*="+supportedParsVTCustomFields.Coordinate.prefix+"]").each(function(){if(!jQuery(this).parent().html().includes("separator")){jQuery(this).addClass("sourceField");var e=jQuery(this).attr("name"),a=jQuery("#"+e+"_display"),t=jQuery(this).val(),s="",i=r.getMobileOperatingSystem();if("Android"!=i&&"iOS"!=i&&"Windows"!=i||(s="<li><a onclick=\"OpenGpsWindow('"+i+"', '"+e+'_display\', \'id\')">Open App</a></li><li role="separator" class="divider"></li>'),a.length<=0){var d='<div class="input-group"><input id="'+e+'_display" data-target="'+e+'" type="text" class="marginLeftZero autoComplete inputElement ui-autocomplete-input ParsVTgps" value="'+t+'" autocomplete="off" readonly><span data-target="'+e+'" class="input-group-addon setCoordinate cursorPointer" title="'+app.vtranslate("Set Map")+'"><i class="fa fa-map-marker"></i></span><div class="dropdown hide"  id="'+e+'_dropdown"><button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="fa fa-eye" title="'+app.vtranslate("JS_VIEW_RECORD")+'"></span&nbsp; <span class="caret"></span></button><ul class="dropdown-menu">'+s+"<li><a onclick=\"OpenGpsWindow('google', '"+e+"_display', 'id')\">Google Map</a></li><li role=\"separator\" class=\"divider\"></li><li><a onclick=\"OpenGpsWindow('osm', '"+e+"_display', 'id')\">OpenStreetMap</a></li><li role=\"separator\" class=\"divider\"></li><li><a onclick=\"OpenGpsWindow('waze', '"+e+"_display', 'id')\">Waze</a></li><li role=\"separator\" class=\"divider\"></li><li><a onclick=\"OpenGpsWindow('yandex', '"+e+"_display', 'id')\">Yandex</a></li><li role=\"separator\" class=\"divider\"></li><li><a onclick=\"OpenGpsWindow('parsijoo', '"+e+"_display', 'id')\">ParsiJoo</a></li><li role=\"separator\" class=\"divider\"></li><li><a onclick=\"OpenGpsWindow('map.ir', '"+e+"_display', 'id')\">Map.IR</a></li><li role=\"separator\" class=\"divider\"></li><li><a onclick=\"OpenGpsWindow('apple', '"+e+"_display', 'id')\">Apple</a></li></ul></div></div><br /><div id=\""+e+'_locationname" style="clear: both"></div>';jQuery(this).after(d),""!=t&&(jQuery("#"+e+"_dropdown").removeClass("hide"),r.searchCoordinates(t,e,!1)),$(document).on("click",".setgps",function(e){var a=jQuery(this).data("gpstarget"),t=jQuery(this).attr("data-gpsvalue");t.length<=1&&(t=""),app.helper.hidePopup(),jQuery("#"+a+"_display").val(t),jQuery("input[name='"+a+"']").val(t),""==t?jQuery("#"+a+"_dropdown").addClass("hide"):(jQuery("#"+a+"_dropdown").removeClass("hide"),r.searchCoordinates(t,a,!1))}),$(document).on("click",".clearLocation",function(e){app.helper.hidePopup();var a=jQuery(this).data("gpstarget");jQuery("#"+a+"_display").val(""),jQuery("input[name='"+a+"']").val(""),jQuery("#"+a+"_locationname").html(""),jQuery("#"+a+"_dropdown").addClass("hide")}),jQuery(".setCoordinate").on("click",function(e){app.helper.hidePopup(),app.helper.showProgress();var a={view:"Coordinate",mode:"showGPSForm",module:"ParsVT",value:jQuery("#"+jQuery(this).data("target")+"_display").val(),target:jQuery(this).data("target")};app.request.post({data:a}).then(function(e,a){if(app.helper.hideProgress(),null===e){var r={};"undefined"!=typeof callback&&(r.cb=callback),app.helper.showPopup(a,r)}})}),jQuery(this).addClass("hide"),jQuery(this).attr("type","hidden")}}}),jQuery("textarea").each(function(){var e=jQuery(this).attr("name"),a=app.getViewName();if(void 0!==e&&"Edit"==a&&e.substring(0,10)===supportedParsVTCustomFields.RTF_Description_Field.prefix&&jQuery(this).attr("id")!=e){var r=jQuery(this).parents("tr");void 0!==r&&r.children("td:empty").remove(),jQuery(this).attr("id",e),jQuery(this).removeAttr("data-validation-engine").addClass("ckEditorSource");(new Vtiger_CkEditor_Js).loadCkEditor(jQuery(this))}}),jQuery("input[name^='"+supportedParsVTCustomFields.Upload_Field.prefix+"'], input[name*=relatedblockslists][name*="+supportedParsVTCustomFields.Upload_Field.prefix+"]").each(function(){var e=jQuery(this).val(),a=jQuery(this).parents("td"),r=jQuery(this).attr("name");if(a.html().includes("pvcf_upload_files")||a.prepend('<div  id = "frm_'+r+'"><div class="fileUploadBtn btn btn-primary"><div><i class="fa fa-laptop"></i> '+app.vtranslate("JS_UPLOAD")+'</div><input  type="file" size="4"  name="upload_'+r+'[]" onchange="pvcf_upload_files(\''+r+"');\"/></div></div>"),jQuery(this).hide(),""!=e&&"text"==jQuery(this).attr("type")){var t=e.split("$$");if(t.length>0){var s=jQuery(this).parent("td");if(s.find("span").remove(),s.find("img").remove(),t[2]&&t[2].indexOf("image")>-1){var i=t[0].replace(/\s+/g," ").trim(),d=["<span>",'<a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(e)+'" download target="_blank"><img style="max-width:150px;max-height:150px;" src="'+i+'" /></a>','<input style="margin-right: 10px; margin-left: 10px;" class="btn btn-warning avfImageDelete" data-field_name = "'+jQuery(this).attr("name")+'" data-file="'+e+'" type="button" value="'+app.vtranslate("Delete")+'" onclick="removeThis(this)">',"</span>"].join("");s.append(d)}else{var l=(n=(n=t[0].replace(/\s+/g," ").trim().split("/"))[n.length-1]).indexOf("_"),l=(n=n.substr(l+1)).indexOf("_"),n=n.substr(l+1),d=["<span>",'<a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(e)+'" download target="_blank"><i class="fa fa-download"  style="margin: 0 3px;"></i>'+n+"</a>",'<input style="margin-right: 10px; margin-left: 10px;" class="btn btn-warning avfImageDelete" data-field_name = "'+jQuery(this).attr("name")+'"  data-file="'+e+'" type="button" value="'+app.vtranslate("Delete")+'" onclick="removeThis(this)">',"</span>"].join("");s.append(d)}}}}),jQuery("textarea[name^='"+supportedParsVTCustomFields.Upload_Fields.prefix+"'], textarea[name*=relatedblockslists][name*="+supportedParsVTCustomFields.Upload_Fields.prefix+"]").each(function(){var e=jQuery(this).val(),a=jQuery(this).parents("td"),r=jQuery(this).attr("name"),t=jQuery(this).parent("td"),s=jQuery(this).attr("name");if(!a.html().includes("pvcf_upload_multiple_files")&&(t.find("span").remove(),t.find("img").remove(),a.prepend('<div  id = "frm_'+r+'"><div class="fileUploadBtn btn btn-primary"><div><i class="fa fa-laptop"></i> '+app.vtranslate("JS_UPLOAD")+' (M)</div><input  type="file" size="4" multiple name="upload_'+r+'[]" onchange="pvcf_upload_multiple_files(\''+r+"');\"/></div></div>"),jQuery(this).hide(),t.append("<div style='clear: both'>"),""!=e&&jQuery(this).is("textarea"))){var i=e.split("||");i.length>0&&$.each(i,function(e,a){if(0!=a.length){var i=a.split("$$");if(i.length>0)if(i[2]&&i[2].indexOf("image")>-1){var d=i[0].replace(/\s+/g," ").trim(),l=['<div class="col-lg-1" style="width: 150px; height: 182px; max-width:150px;max-height:182px;background-color: #f3f3f3; border: 1px solid #dcdcdc;text-align: center;">','<a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(a)+'" download target="_blank"><img style="max-width:120px;max-height:150px;" src="'+d+'" /></a>','<input style="margin-right: 10px; margin-left: 10px;" class="btn btn-warning avfImageDelete" data-target_field= "'+r+'"  data-field_name = "'+s+'"  data-field_value = "'+a+'"   data-file="'+i[0]+'" type="button" value="'+app.vtranslate("Delete")+'" onclick="removeFile(this)">',"</div>"].join("");t.append(l)}else{var e=(n=(n=i[0].replace(/\s+/g," ").trim().split("/"))[n.length-1]).indexOf("_"),n=n.substr(e+1),l=['<div class="col-lg-1" style="width: 150px; height: 182px; max-width:150px;max-height:182px;background-color: #f3f3f3; border: 1px solid #dcdcdc;text-align: center;padding-top: 20px;">','<a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(a)+'" download target="_blank" style="overflow-wrap: break-word;"><i class="fa fa-download"  style="margin: 0 3px;"></i><br />'+n+"</a><br>",'<input style="margin-right: 10px; margin-left: 10px;" class="btn btn-warning avfImageDelete" data-target_field= "'+r+'" data-field_name = "'+s+'"  data-field_value = "'+a+'"  data-file="'+i[0]+'" type="button" value="'+app.vtranslate("Delete")+'" onclick="removeFile(this)">',"</div>"].join("");t.append(l)}}})}}),$("input[name^='"+supportedParsVTCustomFields.Date_Time_Field.prefix+"'], input[name*=relatedblockslists][name*="+supportedParsVTCustomFields.Date_Time_Field.prefix+"]").on("input",function(){var e=$(this).data("key").replace("_date",""),a=$("#"+e+"_time").val();""==a&&(a=r.DisplayCurrentTime($("#"+e+"_time").data("format")),$("#"+e+"_time").val(a)),$("input[name='"+e+"']").val($(this).val()+" "+a)}),$(".dateField.advcdate").datepicker().on("changeDate",function(e){var a=$(this).data("key").replace("_date",""),t=$("#"+a+"_time").val();""==t&&(t=r.DisplayCurrentTime($("#"+a+"_time").data("format")),$("#"+a+"_time").val(t)),$("input[name='"+a+"']").val($(this).val()+" "+t)}),$(".timepicker-default.advcdate").on("input",function(){var e=$(this).data("key").replace("_time",""),a=$("#"+e+"_date").val();""==a&&(a=r.DisplayCurrentTime($("#"+e+"_date").data("today")),$("#"+e+"_date").val(a)),$("input[name='"+e+"']").val(a+" "+$(this).val())}),$(".timepicker-default.advcdate").on("changeTime",function(){var e=$(this).data("key").replace("_time",""),a=$("#"+e+"_date").val();""==a&&(a=r.DisplayCurrentTime($("#"+e+"_date").data("today")),$("#"+e+"_date").val(a)),$("input[name='"+e+"']").val(a+" "+$(this).val())}),$(document).on("click",".advfieldChange",function(e){var a=jQuery(e.currentTarget).data("name");jQuery("#advfieldBlock_"+a).show()}),jQuery("select[name*='country_fieldName_"+supportedParsVTCustomFields.Cities_field.prefix+"'], select[name*=country_fieldName_][name*="+supportedParsVTCustomFields.Cities_field.prefix+"]").change(function(e){var a=$(e.target).find(":selected"),r=jQuery(e.currentTarget).data("name");if(a.is("option"))if(jQuery("input[name='"+r+"']").val(a.val()),""!=a.val()){var t={};t.module="ParsVT",t.action="ACF",t.mode="GetCities",t.country=a.val(),"undefined"==typeof csrfMagicToken&&(t.tokenname=csrfMagicName),"undefined"==typeof csrfMagicToken&&(t.tokenval=csrfMagicToken),$.post("index.php",t,function(e){if(e.success){if(e.result){var t=a.text();jQuery("select[name*='city_fieldName_"+r+"']").parent().show(),jQuery("#Show_Advcf_"+r).html(t),jQuery("#Show_Advcf_"+r).data("country",t)}else jQuery("select[name*='city_fieldName_"+r+"']").parent().hide(),jQuery("select[name*='county_fieldName_"+r+"']").parent().hide();jQuery("#Show_Advcf_"+r).data("country-id",a.val()),jQuery("select[name*='city_fieldName_"+r+"']").html(""),jQuery("select[name*='county_fieldName_"+r+"']").html(""),jQuery("select[name*='city_fieldName_"+r+"']").append(e.result),jQuery("select[name*='city_fieldName_"+r+"']").select2(),jQuery("select[name*='county_fieldName_"+r+"']").select2()}})}else jQuery("#Show_Advcf_"+r).html(""),jQuery("select[name*='city_fieldName_"+r+"']").html(""),jQuery("select[name*='county_fieldName_"+r+"']").html(""),jQuery("select[name*='city_fieldName_"+r+"']").select2(),jQuery("select[name*='county_fieldName_"+r+"']").select2(),jQuery("select[name*='city_fieldName_"+r+"']").parent().hide(),jQuery("select[name*='county_fieldName_"+r+"']").parent().hide()}),jQuery("select[name*='city_fieldName_"+supportedParsVTCustomFields.Cities_field.prefix+"'], select[name*=city_fieldName_][name*="+supportedParsVTCustomFields.Cities_field.prefix+"]").change(function(e){var a=$(e.target).find(":selected"),r=jQuery(e.currentTarget).data("name");if(a.is("option"))if(jQuery("input[name='"+r+"']").val(a.val()),""!=a.val()){var t={};t.module="ParsVT",t.action="ACF",t.mode="GetCounties",t.city=a.val(),"undefined"==typeof csrfMagicToken&&(t.tokenname=csrfMagicName),"undefined"==typeof csrfMagicToken&&(t.tokenval=csrfMagicToken),$.post("index.php",t,function(e){if(e.success){if(e.result){var t=a.text();jQuery("select[name*='county_fieldName_"+r+"']").parent().show();var s=jQuery("#Show_Advcf_"+r).data("country");jQuery("#Show_Advcf_"+r).html(s+" - "+t),jQuery("#Show_Advcf_"+r).data("city",t)}else jQuery("select[name*='county_fieldName_"+r+"']").parent().hide();jQuery("#Show_Advcf_"+r).data("city-id",a.val()),jQuery("select[name*='county_fieldName_"+r+"']").html(""),jQuery("select[name*='county_fieldName_"+r+"']").append(e.result),jQuery("select[name*='county_fieldName_"+r+"']").select2()}})}else{jQuery("#Show_Advcf_"+r).html(jQuery("#Show_Advcf_"+r).data("country"));var s=jQuery("#Show_Advcf_"+r).data("country-id");jQuery("input[name='"+r+"']").val(s),jQuery("select[name*='county_fieldName_"+r+"']").html(""),jQuery("select[name*='county_fieldName_"+r+"']").select2(),jQuery("select[name*='county_fieldName_"+r+"']").parent().hide()}}),jQuery("select[name*='county_fieldName_"+supportedParsVTCustomFields.Cities_field.prefix+"'], select[name*=county_fieldName_][name*="+supportedParsVTCustomFields.Cities_field.prefix+"]").change(function(e){var a=$(e.target).find(":selected"),r=jQuery(e.currentTarget).data("name");if(a.is("option"))if(jQuery("input[name='"+r+"']").val(a.val()),""!=a.val()){var t=a.text(),s=jQuery("#Show_Advcf_"+r).data("country"),i=jQuery("#Show_Advcf_"+r).data("city");jQuery("#Show_Advcf_"+r).html(s+" - "+i+" - "+t)}else{jQuery("#Show_Advcf_"+r).html(jQuery("#Show_Advcf_"+r).data("country")+" - "+jQuery("#Show_Advcf_"+r).data("city"));var d=jQuery("#Show_Advcf_"+r).data("city-id");jQuery("input[name='"+r+"']").val(d)}}),jQuery("input[name^='"+supportedParsVTCustomFields.IBAN_Code.prefix+"'], input[name*=relatedblockslists][name*="+supportedParsVTCustomFields.IBAN_Code.prefix+"]").each(function(){jQuery(this).attr("data-rule-IBAN","true"),jQuery(this).attr("data-rule-illegal","true"),jQuery(this).attr("maxlength","26"),jQuery(this).attr("placeholder","IR"),jQuery(this).css("direction","LTR"),jQuery(this).addClass("ParsVTIBAN");var e=jQuery(this).val();if(26===e.length){var a=r.LoadIBAN(e);jQuery(this).next("div").remove(),jQuery(this).after("<div class='text-info'>"+a+"</div>")}else jQuery(this).next("div").remove()}),jQuery("textarea[name^='"+supportedParsVTCustomFields.Password_Field.prefix+"'], textarea[name*=relatedblockslists][name*="+supportedParsVTCustomFields.Password_Field.prefix+"]").each(function(){var e=jQuery(this).attr("name"),a=jQuery("#"+e+"_display"),t=r.cryptoPwd(jQuery(this),!1);if(a.length<=0){var s='<div class="input-group"><input id="'+e+'_display" data-target="'+e+'" type="password" class="marginLeftZero autoComplete inputElement ui-autocomplete-input ParsVTPWD" value="'+t+'" autocomplete="off"><span data-target="'+e+'" class="input-group-addon generatePassword cursorPointer" title="'+app.vtranslate("Generate Password")+'"><i class="fa fa-refresh"></i></span><span data-target="'+e+'" class="input-group-addon copyPassword cursorPointer" title="'+app.vtranslate("Copy")+'"><i class="fa fa-copy"></i></span></div><div class="strength_meter" id="'+e+'_status">'+app.vtranslate("Strength")+"</div>";jQuery(this).after(s),jQuery(this).addClass("hide"),jQuery(this).css("display","none"),jQuery(a).attr("data-rule-pwd","true"),jQuery(a).attr("data-rule-illegal","true"),jQuery(a).attr("data-password",jQuery(this).attr("id")),""!=t&&r.checkPasswordStrength($("#"+e+"_display")),r.LoadPasswordField(this)}}),$(document).on("click",".getNewPass",function(){var e=$(this).closest("div").find('input[rel="gp"]');e.val(r.randPassword(e))}),$(".copyPassword").unbind().click(function(){var e=jQuery(this).data("target");r.ShowPasswordField(jQuery('textarea[name="'+e+'"]'))}),$(".generatePassword").unbind().click(function(){var e=jQuery(this).data("target");r.ShowRandomPassword(jQuery('textarea[name="'+e+'"]'))}),$(".ParsVTPWD").keyup(function(e){r.checkPasswordStrength($(this));var a=$(this).data("target");jQuery('textarea[name="'+a+'"]').val(r.cryptoPwd($(this),!0))}),jQuery("input[name^='"+supportedParsVTCustomFields.Weather_Field.prefix+"'], input[name*=relatedblockslists][name*="+supportedParsVTCustomFields.Weather_Field.prefix+"]").each(function(){var e=jQuery(this).parent().html();if(""!=e&&!e.includes("referencefield-wrapper")){loadCSS("layouts/v7/modules/ParsVT/resources/weather/css/weather-icons.css","parsvtweather");var a=jQuery(this).attr("name"),t=jQuery(this).val();jQuery(this).attr("type","hidden");var s=Math.floor(1e3*Math.random()+1),i='<div class="referencefield-wrapper" id="weather'+s+'">\n   <div class="input-group">\n      <input id="'+a+'_display" name="'+a+'_display" data-fieldname="'+a+'" data-fieldtype="reference" type="text" class="marginLeftZero autoComplete inputElement ui-autocomplete-input" value="'+t+'" placeholder="'+app.vtranslate("JS_MIN_SEARCH_KEY_LENGTH")+'" autocomplete="off" aria-invalid="false">      <span class="input-group-addon cursorPointer clearWeather hide"><i class="fa fa-times-circle"></i></span>   </div>\n</div><div id="weather'+s+'_forcast"></div>';jQuery(this).after(i),r.registerWeatherAutoComplete("weather"+s,a),""!==t&&(r.displayForcast("weather"+s,t),container.find("span.clearWeather").removeClass("hide"),setTimeout(function(){""!=jQuery("#weather"+s+"_forcast").find("div.weathercity").html()&&jQuery("#"+a+"_display").val(jQuery("#weather"+s+"_forcast").find("div.weathercity").html()),jQuery("#"+a+"_display").attr("disabled","disabled"),jQuery("#"+a+"_display").prop("disbaled",!0),jQuery("#"+a+"_display").attr("readonly",!0)},2e3)),$(".clearWeather").click(function(e){jQuery(e.currentTarget).addClass("hide"),jQuery("#"+a+"_display").removeAttr("disabled"),jQuery("#"+a+"_display").removeAttr("disabled"),jQuery("#"+a+"_display").prop("readonly",!1),jQuery("#"+a+"_display").attr("readonly",!1),jQuery("#"+a+"_display").val(""),jQuery("input[name='"+a+"']").val(""),jQuery("#weather"+s+"_forcast").html("")})}}),jQuery("input[name^='"+supportedParsVTCustomFields.Rating_Field.prefix+"'], input[name*=relatedblockslists][name*="+supportedParsVTCustomFields.Rating_Field.prefix+"]").each(function(){jQuery(this).attr("data-rule-integer","true"),jQuery(this).attr("data-rule-illegal","true"),jQuery(this).attr("readonly","readonly"),r.LoadRateJS(this,!1,e,a,!1,!1)}),jQuery("input[name^='"+supportedParsVTCustomFields.Emotion_Rating_Field.prefix+"'], input[name*=relatedblockslists][name*="+supportedParsVTCustomFields.Emotion_Rating_Field.prefix+"]").each(function(){jQuery(this).attr("data-rule-integer","true"),jQuery(this).attr("data-rule-illegal","true"),jQuery(this).attr("readonly","readonly"),r.LoadRateJS(this,!1,e,a,!0,!1)}),jQuery("input[name^='"+supportedParsVTCustomFields.Credit_Card_Number.prefix+"'], input[name*=relatedblockslists][name*="+supportedParsVTCustomFields.Credit_Card_Number.prefix+"]").each(function(){jQuery(this).attr("data-rule-CCN","true"),jQuery(this).attr("data-rule-illegal","true"),jQuery(this).attr("maxlength","19"),jQuery(this).css("direction","LTR"),jQuery(this).addClass("ParsVTCCN");var e=jQuery(this).val();if(19===e.length){var a=r.LoadCCN(e);jQuery(this).next("div").remove(),jQuery(this).after("<div class='text-info'>"+a+"</div>")}else jQuery(this).next("div").remove()}),$(".ParsVTCCN").keyup(function(){var e=$(this).val().split("-").join("");if(e.length>0&&(e=e.match(new RegExp(".{1,4}","g")).join("-")),$(this).val(e),19===e.length){var a=r.LoadCCN(e);jQuery(this).next("div").remove(),jQuery(this).after("<div class='text-info'>"+a+"</div>")}else jQuery(this).next("div").remove()}),$(".ParsVTIBAN").keyup(function(){var e=$(this).val();if(26===e.length){var a=r.LoadIBAN(e);jQuery(this).next("div").remove(),jQuery(this).after("<div class='text-info'>"+a+"</div>")}else jQuery(this).next("div").remove()}),jQuery("input[name^='"+supportedParsVTCustomFields.Gdate_Field.prefix+"'], input[name*=relatedblockslists][name*="+supportedParsVTCustomFields.Gdate_Field.prefix+"]").each(function(){jQuery(this).attr("data-rule-ParsVTDate","true"),jQuery(this).attr("data-rule-illegal","true"),jQuery(this).attr("readonly","readonly"),r.LoadDatePicker(this,e,a)}),jQuery("input[name^='"+supportedParsVTCustomFields.Iran_Mobile.prefix+"'], input[name*=relatedblockslists][name*="+supportedParsVTCustomFields.Iran_Mobile.prefix+"]").each(function(){jQuery(this).attr("maxlength","14"),jQuery(this).attr("data-rule-iranianmobile","true"),jQuery(this).attr("data-rule-illegal","true")}),jQuery("textarea[name^='"+supportedParsVTCustomFields.Grid_Field.prefix+"'], textarea[name*=relatedblockslists][name*="+supportedParsVTCustomFields.Grid_Field.prefix+"]").each(function(){loadCSS("layouts/v7/modules/ParsVT/resources/jsgrid/jsgrid-theme.min.css","jsgrid");var e=jQuery(this).closest("div.grid-div-parent"),a=jQuery("body").data("language").substring(0,2);loadScript("layouts/v7/modules/ParsVT/resources/jsgrid/jsgrid.min.js",function(){loadScript("layouts/v7/modules/ParsVT/resources/jsgrid/i18n/"+a+".js",function(){"en"!=a&&jsGrid.locale(a),r.registerJSGridTableFields(e)})})}),jQuery("input[name^='"+supportedParsVTCustomFields.Color_Picker_Field.prefix+"'], input[name*=relatedblockslists][name*="+supportedParsVTCustomFields.Color_Picker_Field.prefix+"]").each(function(){r.LoadColorPicker(this,e,a,"Edit")}),jQuery("input[name^='"+supportedParsVTCustomFields.National_ID.prefix+"'], input[name*=relatedblockslists][name*="+supportedParsVTCustomFields.National_ID.prefix+"]").each(function(){jQuery(this).attr("maxlength","10"),jQuery(this).attr("data-rule-nationalcode","true"),jQuery(this).attr("data-rule-illegal","true"),jQuery(this).addClass("ParsVTNATIONALCODE");var e=jQuery(this).val();if(10===e.length){var a=r.LoadBDCITY(e);jQuery(this).next("div").remove(),jQuery(this).after("<div class='text-info'>"+a+"</div>")}else jQuery(this).next("div").remove()}),$(".ParsVTNATIONALCODE").keyup(function(){var e=$(this).val();if(10===e.length){var a=r.LoadBDCITY(e);jQuery(this).next("div").remove(),jQuery(this).after("<div class='text-info'>"+a+"</div>")}else jQuery(this).next("div").remove()}),jQuery("input[name^='"+supportedParsVTCustomFields.National_CODE.prefix+"'], input[name*=relatedblockslists][name*="+supportedParsVTCustomFields.National_CODE.prefix+"]").each(function(){jQuery(this).attr("maxlength","11"),jQuery(this).attr("data-rule-legalnationalcode","true"),jQuery(this).attr("data-rule-illegal","true")}),jQuery("input[name^='"+supportedParsVTCustomFields.IRAN_POSTAL_CODE.prefix+"'], input[name*=relatedblockslists][name*="+supportedParsVTCustomFields.IRAN_POSTAL_CODE.prefix+"]").each(function(){jQuery(this).attr("maxlength","10"),jQuery(this).attr("data-rule-irpostalcode","true"),jQuery(this).attr("data-rule-illegal","true")}),jQuery("input[name^='"+supportedParsVTCustomFields.TAX_FILE_NUMBER.prefix+"'], input[name*=relatedblockslists][name*="+supportedParsVTCustomFields.TAX_FILE_NUMBER.prefix+"]").each(function(){jQuery(this).attr("maxlength","12"),jQuery(this).attr("data-rule-taxfilenumber","true"),jQuery(this).attr("data-rule-illegal","true")}),jQuery("input[name^='"+supportedParsVTCustomFields.IRAN_VAT_ID.prefix+"'], input[name*=relatedblockslists][name*="+supportedParsVTCustomFields.IRAN_VAT_ID.prefix+"]").each(function(){jQuery(this).attr("maxlength","12"),jQuery(this).attr("data-rule-iranvatid","true"),jQuery(this).attr("data-rule-illegal","true")}),jQuery("input[name^='siccode']").each(function(){jQuery(this).attr("maxlength","12"),jQuery(this).attr("data-rule-iranvatid","true"),jQuery(this).attr("data-rule-illegal","true")}),jQuery("input[name^='parsvt_vatid']").each(function(){jQuery(this).attr("maxlength","12"),jQuery(this).attr("data-rule-iranvatid","true"),jQuery(this).attr("data-rule-illegal","true")}),jQuery("input[name^='parsvt_vatid']").each(function(){jQuery(this).attr("maxlength","12"),jQuery(this).attr("data-rule-iranvatid","true"),jQuery(this).attr("data-rule-illegal","true")}),jQuery("input[name^='"+supportedParsVTCustomFields.Barcode_Field.prefix+"'], input[name*=relatedblockslists][name*="+supportedParsVTCustomFields.Barcode_Field.prefix+"]").each(function(){jQuery(this).attr("data-rule-barcode","true"),jQuery(this).attr("data-rule-illegal","true")});else if("Detail"==t||e&&"Detail"==a){var s=new RegExp("^[^A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿Ⰰ-﬜﷾-﹯﻽-￿]*[֑-߿יִ-﷽ﹰ-ﻼ]");jQuery.each(jQuery(".fieldValue span.value"),function(e,a){var r=jQuery(this),t=r.text().trim();s.test(t)||r.css({direction:"ltr"})}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Coordinate.prefix+"'], [class*='"+supportedParsVTCustomFields.Coordinate.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();jQuery(this).next("span").remove();a=$("<div/>").html(e).text().replace(/\s/g,"");if(""!=e&&-1===e.indexOf("input-group")){var a=$("<div/>").html(e).text().replace(/\s/g,""),t="gps"+Math.floor(1e3*Math.random()+1);if(""!=a){var s="",i=r.getMobileOperatingSystem();"Android"!=i&&"iOS"!=i&&"Windows"!=i||(s="<li><a onclick=\"OpenGpsWindow('"+i+"', '"+a+'\', \'value\')">Open App</a></li><li role="separator" class="divider"></li>');var d='<div class="input-group"><div class="dropdown"><button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="fa fa-eye" title="'+app.vtranslate("JS_VIEW_RECORD")+'"></span&nbsp; <span class="caret"></span></button>'+a+'<ul class="dropdown-menu"  style="position: relative;z-index:9999">'+s+"<li><a onclick=\"OpenGpsWindow('google', '"+a+"', 'value')\">Google Map</a></li><li role=\"separator\" class=\"divider\"></li><li><a onclick=\"OpenGpsWindow('osm', '"+a+"', 'value')\">OpenStreetMap</a></li><li role=\"separator\" class=\"divider\"></li><li><a onclick=\"OpenGpsWindow('waze', '"+a+"', 'value')\">Waze</a></li><li role=\"separator\" class=\"divider\"></li><li><a onclick=\"OpenGpsWindow('yandex', '"+a+"', 'value')\">Yandex</a></li><li role=\"separator\" class=\"divider\"></li><li><a onclick=\"OpenGpsWindow('parsijoo', '"+a+"', 'value')\">ParsiJoo</a></li><li role=\"separator\" class=\"divider\"></li><li><a onclick=\"OpenGpsWindow('map.ir', '"+a+"', 'value')\">Map.IR</a></li><li role=\"separator\" class=\"divider\"></li><li><a onclick=\"OpenGpsWindow('apple', '"+a+"', 'value')\">Apple</a></li></ul></div></div><br /><div id=\""+t+'_locationname" style="clear: both"></div>';jQuery(this).html(d),r.searchCoordinates(a,t,!1)}}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Upload_Field.prefix+"'], [class*='"+supportedParsVTCustomFields.Upload_Field.prefix+"']").each(function(){if(jQuery(this).hasClass("value")){e=jQuery(this);jQuery(this).attr("title","")}else var e=jQuery(this).find("span.value");if(0!=e.length){for(var a=e.html().trim(),t=e.next("span"),s=r.validURL(a);t.length>0;)t.remove(),t=e.next("span");if(""!=a&&(-1!==a.indexOf("$$")||s)&&!jQuery(this).find("a").length){var i=a.split("$$");if(i.length>0)if(void 0!==i[2]&&-1!==i[2].indexOf("image")||s&&r.checkURL(value)){var d=i[0].replace(/\s+/g," ").trim();jQuery(this).html('<a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(a)+'" download target="_blank"><img style="max-width:150px;max-height:150px;" src="'+d+'" /></a>')}else if(void 0!==i[2]&&(i[2].indexOf("video/mp4")>-1||i[2].indexOf("video/ogg")>-1||i[2].indexOf("video/webm")>-1)){var l=i[0].replace(/\s+/g," ").trim(),n=i[2].replace(/\s+/g," ").trim();jQuery(this).html('<video width="235" height="125" controls><source src="'+l+'" type="'+n+'"><a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(a)+'" download target="_blank">Your browser does not support the video tag.<a/></video><br /><a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(a)+'" download target="_blank" style="overflow-wrap: break-word;"><i class="fa fa-download"  style="margin: 0 3px;"></i>'+app.vtranslate("Download")+"</a>")}else if(void 0!==i[2]&&(i[2].indexOf("audio/mpeg")>-1||i[2].indexOf("audio/ogg")>-1||i[2].indexOf("audio/wav")>-1||i[2].indexOf("audio/mp3")>-1)){var o=i[0].replace(/\s+/g," ").trim(),n=i[2].replace(/\s+/g," ").trim(),u=(c=(c=(p=i[0].replace(/\s+/g," ").trim()).split("/"))[c.length-1]).indexOf("_"),c=c.substr(u+1);jQuery(this).html('<audio controls><source src="'+o+'" type="'+n+'"><a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(a)+'" download target="_blank">Your browser does not support the video tag.<a/></audio><br /><a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(a)+'" download target="_blank" style="overflow-wrap: break-word;"><i class="fa fa-download"  style="margin: 0 3px;"></i>'+c+"</a>")}else{var p=i[0].replace(/\s+/g," ").trim(),u=(c=(c=p.split("/"))[c.length-1]).indexOf("_"),c=c.substr(u+1);jQuery(this).html('<a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(a)+'" target="_blank"><i class="fa fa-download" style="margin: 0 3px;"></i>'+c+"</a>")}}}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Upload_Fields.prefix+"'], [class*='"+supportedParsVTCustomFields.Upload_Fields.prefix+"']").each(function(){if(jQuery(this).hasClass("value")){e=jQuery(this);jQuery(this).attr("title","")}else var e=jQuery(this).find("span.value");if(0!=e.length){for(var a=e.html().trim(),t=e.next("span"),s=r.validURL(a);t.length>0;)t.remove(),t=e.next("span");var i=new Array;if(""!=a&&(-1!==a.indexOf("$$")||-1!==a.indexOf("||")||s)&&!jQuery(this).find("a").length){var d=(a=(a=a.replace(/^\s+/g,"")).replace(/\s+$/g,"")).split("||");d.length>0&&$.each(d,function(e,a){if(0!=a.length){var t=a.split("$$");if(s=r.validURL(a),t.length>0)if(void 0!==t[2]&&t[2].indexOf("image")>-1||s&&r.checkURL(a)){var d=t[0].replace(/\s+/g," ").trim(),l=['<div class="col-lg-1" style="width: 150px; height: 150px; max-width:150px;max-height:150px;background-color: #f3f3f3; border: 1px solid #dcdcdc;text-align: center;">','<a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(a)+'" download target="_blank"><img style="max-width:120px;max-height:150px;" src="'+d+'" /></a>',"</div>"].join("");i.push(l)}else if(void 0!==t[2]&&(t[2].indexOf("video/mp4")>-1||t[2].indexOf("video/ogg")>-1||t[2].indexOf("video/webm")>-1)){l=['<div class="col-lg-1" style="width: 270px; height: 150px; max-width:270px;max-height:150px;background-color: #f3f3f3; border: 1px solid #dcdcdc;text-align: center;">','<video width="235" height="125" controls><source src="'+t[0].replace(/\s+/g," ").trim()+'" type="'+(o=t[2].replace(/\s+/g," ").trim())+'"><a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(a)+'" download target="_blank">Your browser does not support the video tag.<a/></video>','<a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(a)+'" download target="_blank" style="overflow-wrap: break-word;"><i class="fa fa-download"  style="margin: 0 3px;"></i>'+app.vtranslate("Download")+"</a><br>","</div>"].join("");i.push(l)}else if(void 0!==t[2]&&(t[2].indexOf("audio/mpeg")>-1||t[2].indexOf("audio/ogg")>-1||t[2].indexOf("audio/wav")>-1||t[2].indexOf("audio/mp3")>-1)){var n=t[0].replace(/\s+/g," ").trim(),o=t[2].replace(/\s+/g," ").trim(),e=(u=(u=(c=t[0].replace(/\s+/g," ").trim()).split("/"))[u.length-1]).indexOf("_"),u=u.substr(e+1),l=['<div class="col-lg-1" style="width: 330px; height: 150px; max-width:330px;max-height:150px;background-color: #f3f3f3; border: 1px solid #dcdcdc;text-align: center;">','<br /><audio controls><source src="'+n+'" type="'+o+'"><a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(a)+'" download target="_blank">Your browser does not support the audio element.<a/></audio>','<a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(a)+'" download target="_blank" style="overflow-wrap: break-word;"><i class="fa fa-download"  style="margin: 0 3px;"></i>'+u+"</a><br>","</div>"].join("");i.push(l)}else{var c=t[0].replace(/\s+/g," ").trim(),e=(u=(u=c.split("/"))[u.length-1]).indexOf("_"),u=u.substr(e+1),l=['<div class="col-lg-1" style="width: 150px; height: 150px; max-width:150px;max-height:150px;background-color: #f3f3f3; border: 1px solid #dcdcdc;text-align: center;padding-top: 20px;">','<a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(a)+'" download target="_blank" style="overflow-wrap: break-word;"><i class="fa fa-download"  style="margin: 0 3px;"></i><br />'+u+"</a><br>","</div>"].join("");i.push(l)}}}),jQuery(this).html(i.join(""))}}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Password_Field.prefix+"'], [class*='"+supportedParsVTCustomFields.Password_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e&&!e.includes("showpassword")){var a=$("<div/>").html(e).text().replace(/\s/g,""),r="pwd"+Math.floor(1e3*Math.random()+1);""!=a&&jQuery(this).html('<a class="btn btn-warning showpassword" hreft="#" data-target="'+r+'" style="max-width: 200px">'+app.vtranslate("Copy to Clipboard")+'</a><input style="display: none" type="hidden" value="'+a+'" id="'+r+'">')}jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}),$(".showpassword").unbind().click(function(){var e=jQuery(this).data("target");r.ShowPasswordField(jQuery('input[id="'+e+'"]'))}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.RTF_Description_Field.prefix+"'], [class*='"+supportedParsVTCustomFields.RTF_Description_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e&&-1==e.indexOf("hidecontents")){var a=$("<div/>").html(e).text();jQuery(this).html(a+"<div class='hide hidecontents'></div>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Telegram_ID.prefix+"'], [class*='"+supportedParsVTCustomFields.Telegram_ID.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e&&!e.includes("tg://resolve")){var a=$("<div/>").html(e).text();jQuery(this).html("<a href='tg://resolve?domain="+a.replace(/\s/g,"")+"'>"+a+"</a>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Color_Picker_Field.prefix+"'], [class*='"+supportedParsVTCustomFields.Color_Picker_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var t=!1;if(jQuery(this).hasClass("value")){s=jQuery(this);jQuery(this).attr("title",""),t=!0}else var s=jQuery(this).find("span.value");if(0!=s.length){for(var i=s.html().trim(),d=s.next("span");d.length>0;)d.remove(),d=s.next("span");if(""!=i&&-1===i.indexOf("input")){var l=$("<div/>").html(i).text();if(t)jQuery(this).html('<input type="color" value="'+l.replace(/\s/g,"")+'" readonly disabled>');else{var n="color"+Math.floor(1e3*Math.random()+1);jQuery(this).html('<input id="'+n+'" type="text" value="'+l.replace(/\s/g,"")+'">');var o=jQuery("#"+n);r.LoadColorPicker(o,e,a,"Details")}}jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Whatsapp_ID.prefix+"'], [class*='"+supportedParsVTCustomFields.Whatsapp_ID.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();jQuery(window).width()>1024?jQuery(this).html("<a target= '_blank' href='https://web.whatsapp.com/send?phone="+a.replace(/\s/g,"")+"'>"+a+"</a>"):jQuery(this).html("<a href='whatsapp://send?phone="+a.replace(/\s/g,"")+"'>"+a+"</a>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Instagram.prefix+"'], [class*='"+supportedParsVTCustomFields.Instagram.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var t=jQuery(this).html();if(""!=t&&!t.includes("instagram_feed")){var s="rate"+Math.floor(1e3*Math.random()+1),i=$("<div/>").html(t).text().replace(/\s/g,"");jQuery(this).html('<a href="http://instagram.com/'+i.replace(/\s/g,"")+'" style="text-align:center;display: block;">'+i+'</a><div id="'+s+'instagram" class="instagram_feed"></div>'),jQuery(this).next("span").remove(),jQuery(this).next("span").remove(),r.LoadInstagramFeed(jQuery("#"+s),e,a,s+"instagram",i)}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Weather_Field.prefix+"'], [class*='"+supportedParsVTCustomFields.Weather_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e&&!e.includes("parsweatherwidget")){var a=$("<div/>").html(e).text().replace(/\s/g,"");if(""!=a){loadCSS("layouts/v7/modules/ParsVT/resources/weather/css/weather-icons.css","parsvtweather");var t="weather"+Math.floor(1e3*Math.random()+1),s='<div class="parsweatherwidget">\n    <div class="row">\n        <div class="col-sm-12 weathercity" id="'+t+'_locationname"></div>\n        <div class="col-sm-12 weatherheading"  id="'+t+'_weatherstatus"></div>\n        <div class="col-sm-6 parsweatherwidgeticon"><i class="wi " id="'+t+'_weathericon"></i></div>\n        <div class="col-sm-6">\n            <div class="col-sm-12 weathertemp" id="'+t+'_weathertemp"></div>\n            <div class="col-sm-12 weatherstatus" id="'+t+'_weatherwindSpeed"></div>\n            <div class="col-sm-12 weatherstatus" id="'+t+'_humidity"></div>\n            <div class="col-sm-12 weatherstatus" id="'+t+'_time"></div>\n        </div>\n    </div>\n</div>';jQuery(this).html(s),r.searchCoordinates(a,t,!0),r.forecastWeather(a,t)}jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Twitter.prefix+"'], [class*='"+supportedParsVTCustomFields.Twitter.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var t=jQuery(this).html();if(""!=t&&!t.includes("twitter_feed")){var s="rate"+Math.floor(1e3*Math.random()+1),i=$("<div/>").html(t).text().replace(/\s/g,"");i.includes("#")?jQuery(this).html('<a href="https://twitter.com/hashtag/'+i.replace("#","")+'" style="text-align:center;display: block;">'+i+'</a><ul id="'+s+'twitter" class="twitter_feed"></ul>'):jQuery(this).html('<a href="https://twitter.com/'+i.replace(/\s/g,"")+'" style="text-align:center;display: block;">'+i+'</a><ul id="'+s+'twitter" class="twitter_feed"></ul>'),jQuery(this).next("span").remove(),jQuery(this).next("span").remove(),r.LoadTwitterFeed(jQuery("#"+s),e,a,"#"+s+"twitter",i)}}),jQuery("[data-field-type='skype']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();a=a.replace(/\n/g,""),jQuery(this).html("<a href='skype:"+a.replace(/\s/g,"")+"?call'>"+a+"</a>")}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Iran_Mobile.prefix+"'], [class*='"+supportedParsVTCustomFields.Iran_Mobile.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();jQuery(this).html(a),jQuery(this).next("span").remove(),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Validated_Field.prefix+"'], [class*='"+supportedParsVTCustomFields.Validated_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();jQuery(this).html(a),jQuery(this).next("span").remove(),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Cities_field.prefix+"'], [class*='"+supportedParsVTCustomFields.Cities_field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();jQuery(this).html(a),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.QR_Code.prefix+"'], [class*='"+supportedParsVTCustomFields.QR_Code.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e&&!e.includes("http://chart.apis.google.com")){var a=$("<div/>").html(e).text();jQuery(this).next("span").remove();var r=encodeURI(a),t=150;a.length>400?t=400:a.length>200?t=300:a.length>100&&(t=200),jQuery(this).html("<span style='white-space: normal; vertical-align: middle; display: inline-block;'><img src='http://chart.apis.google.com/chart?cht=qr&chld=L|4&chs="+t+"x"+t+"&chl="+r+"'></span><span style='width: 49%; white-space: normal; vertical-align: middle; display: inline-block;'>"+e+"</span>"),jQuery(this).next("span").remove()}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Credit_Card_Number.prefix+"'], [class*='"+supportedParsVTCustomFields.Credit_Card_Number.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e&&!e.includes("text-info")){var a=$("<div/>").html(e).text();if(a=a.replace(/\n/g,""),a=a.replace(/\s/g,""),jQuery(this).next("span").remove(),19===a.length){var t=r.LoadCCN(a);jQuery(this).html(a+"<div class='text-info'>"+t+"</div>")}else jQuery(this).html(a)}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.IBAN_Code.prefix+"'], [class*='"+supportedParsVTCustomFields.IBAN_Code.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e&&!e.includes("text-info")){var a=$("<div/>").html(e).text();if(a=a.replace(/\n/g,""),a=a.replace(/\s/g,""),jQuery(this).next("span").remove(),26===a.length){var t=r.LoadIBAN(a);jQuery(this).html(a+"<div class='text-info'>"+t+"</div>")}else jQuery(this).html(a);jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.National_ID.prefix+"'], [class*='"+supportedParsVTCustomFields.National_ID.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();a=(a=a.replace(/\n/g,"")).replace(/\s/g,"");jQuery(this).val();if(10===a.length){var t=r.LoadBDCITY(a);jQuery(this).html(a+"<div class='text-info'>"+t+"</div>"),jQuery(this).next("div").remove()}jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.National_CODE.prefix+"'], [class*='"+supportedParsVTCustomFields.National_CODE.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text(),r=unescape("%uD83C%uDF10");a.includes(r)||(""!=(a=(a=a.replace(/\n/g,"")).replace(/\s/g,""))&&jQuery(this).html('<a href="http://ilenc.ssaa.ir/Partials/Print/RegisterOrgPrintReview.aspx?param='+a+'" target="_blank">'+r+" "+a+"</a>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove())}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.IRAN_POSTAL_CODE.prefix+"'], [class*='"+supportedParsVTCustomFields.IRAN_POSTAL_CODE.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();jQuery(this).html(a),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.TAX_FILE_NUMBER.prefix+"'], [class*='"+supportedParsVTCustomFields.TAX_FILE_NUMBER.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();jQuery(this).html(a),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.IRAN_VAT_ID.prefix+"'], [class*='"+supportedParsVTCustomFields.IRAN_VAT_ID.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();jQuery(this).html(a),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Rating_Field.prefix+"'], [class*='"+supportedParsVTCustomFields.Rating_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var t=jQuery(this).html();if(""!=t&&!t.includes("inputElement")){var s="rate"+Math.floor(1e3*Math.random()+1),i=$("<div/>").html(t).text().replace(/\s/g,"");jQuery(this).html('<input id="'+s+'" type="text" class="inputElement hide" value="'+i+'">'),jQuery(this).next("span").remove(),jQuery(this).next("span").remove(),r.LoadRateJS(jQuery("#"+s),!0,e,a,!1,!1)}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Emotion_Rating_Field.prefix+"'], [class*='"+supportedParsVTCustomFields.Emotion_Rating_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var t=jQuery(this).html();if(""!=t&&!t.includes("inputElement")){var s="rate"+Math.floor(1e3*Math.random()+1),i=$("<div/>").html(t).text().replace(/\s/g,"");jQuery(this).html('<input id="'+s+'" type="text" class="inputElement hide" value="'+i+'">'),jQuery(this).next("span").remove(),jQuery(this).next("span").remove(),r.LoadRateJS(jQuery("#"+s),!0,e,a,!0,!1)}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Gdate_Field.prefix+"'], [class*='"+supportedParsVTCustomFields.Gdate_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();jQuery(this).html(a),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Date_Time_Field.prefix+"'], [class*='"+supportedParsVTCustomFields.Date_Time_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();jQuery(this).html(a),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Barcode_Field.prefix+"'], [class*='"+supportedParsVTCustomFields.Barcode_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%"),jQuery(this).find("span").not(".value").remove(),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Plaque_Field.prefix+"'], [class*='"+supportedParsVTCustomFields.Plaque_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%"),jQuery(this).find("span").not(".value").remove(),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.DigitalSignature_Field.prefix+"'], [class*='"+supportedParsVTCustomFields.DigitalSignature_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%"),jQuery(this).find("span").not(".value").remove(),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.UsersList.prefix+"'], [class*='"+supportedParsVTCustomFields.UsersList.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%"),jQuery(this).find("span").not(".value").remove(),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Repeater_Field.prefix+"'], [class*='"+supportedParsVTCustomFields.Repeater_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var t=jQuery(this).html();if(""!=t&&!t.includes("repeaterField")){var s=$("<div/>").html(t).text();r.LoadRepeater(this,e,a,"Details",s),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Voice_Recorder_Field.prefix+"'], [class*='"+supportedParsVTCustomFields.Voice_Recorder_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var t=jQuery(this).html();if(""!=t&&!t.includes("repeaterField")){var s=$("<div/>").html(t).text();r.LoadVoiceRecorder(this,e,a,"Details",s),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery("[id*='fieldValue_"+supportedParsVTCustomFields.Grid_Field.prefix+"'], [class*='"+supportedParsVTCustomFields.Grid_Field.prefix+"']").each(function(){jQuery(this).parent().find("span.hide").remove(),jQuery(this).parent().find("span.action").remove(),jQuery(this).find("span.value").removeClass("value")})}else"List"==t&&(jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.DigitalSignature_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%"),""!=jQuery(this).attr("title")&&(jQuery(this).attr("title",""),jQuery(this).find("span.edit").remove())}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.Repeater_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var t=jQuery(this).attr("title").trim();if(jQuery(this).attr("title",""),""!=t&&!t.includes("repeaterField")){var s=$("<div/>").html(t).text();r.LoadRepeater(this,e,a,"Details",s),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.Voice_Recorder_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var t=jQuery(this).attr("title").trim();if(jQuery(this).attr("title",""),""!=t&&!t.includes("repeaterField")){var s=$("<div/>").html(t).text();r.LoadVoiceRecorder(this,e,a,"List",s),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery("select[name*='"+supportedParsVTCustomFields.Assigned_To.prefix+"']").each(function(){jQuery(this).prop("disabled","disabled")}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.Telegram_ID.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();""==(a=(a=a.replace(/\n/g,"")).replace(/\s/g,""))||e.includes("tg://resolve")||jQuery(this).html("<span class='fieldValue'><span class='value'><a href='tg://resolve?domain="+a.replace(/\s/g,"")+"'>"+a+"</a></span></span>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.Weather_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();if(a=a.replace(/\n/g,""),""!=(a=a.replace(/\s/g,""))&&!e.includes("Coordinate")){var t="coordinate"+Math.floor(1e3*Math.random()+1);jQuery(this).html("<span class='Coordinate' id='"+t+"_locationname'></span>"),r.searchCoordinates(a,t,!0)}jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.Whatsapp_ID.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();""==(a=(a=a.replace(/\n/g,"")).replace(/\s/g,""))||e.includes("whatsapp")||(jQuery(window).width()>1024?jQuery(this).html("<span class='fieldValue'><span class='value'><a target= '_blank' href='https://web.whatsapp.com/send?phone="+a.replace(/\s/g,"")+"'>"+a+"</a></span></span>"):jQuery(this).html("<span class='fieldValue'><span class='value'><a href='whatsapp://send?phone="+a.replace(/\s/g,"")+"'>"+a+"</a></span></span>")),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.Twitter.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%"),""!=jQuery(this).attr("title")&&(jQuery(this).attr("title",""),jQuery(this).find("span.edit").remove())}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.Instagram.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%"),""!=jQuery(this).attr("title")&&(jQuery(this).attr("title",""),jQuery(this).find("span.edit").remove())}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.Password_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();""==(a=(a=a.replace(/\n/g,"")).replace(/\s/g,""))||e.includes("Password_Field")||jQuery(this).html("<span class='fieldValue Password_Field'><span class='value'>*****</span></span>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.Cities_field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();""==a||e.includes("Cities_field")||jQuery(this).html("<span class='fieldValue Cities_field'><span class='value'>"+a+"</span></span>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.RTF_Description_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).find("span.value");if(0!=e.length){var a=jQuery(this).attr("title"),r=e.html().trim();""!=a&&-1==r.indexOf("hidecontents")&&(jQuery(this).html("<span class='fieldValue RTF_Description_Field'><span class='value'>"+a+"<div class='hide hidecontents'></div></span></span>"),jQuery(this).attr("title",e.html().trim()),jQuery(this).next("span").remove(),jQuery(this).next("span").remove())}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.Upload_Field.prefix+"']").each(function(){var e=jQuery(this).find("span.value");if(0!=e.length){for(var a=jQuery(this).attr("title").trim(),r=e.parent().next("span");r.length>0;)r.remove(),r=e.next("span");if(""!=a&&-1!==a.indexOf("$$")&&!jQuery(this).find("a").length){var t=a.split("$$");if(t.length>0)if(void 0!==t[2]&&-1!==t[2].indexOf("image")){var s=t[0].replace(/\s+/g," ").trim();jQuery(this).html('<a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(a)+'" download target="_blank"><img style="max-width:150px;max-height:150px;" src="'+s+'" /></a>')}else{var i=(d=(d=t[0].replace(/\s+/g," ").trim().split("/"))[d.length-1]).indexOf("_"),d=d.substr(i+1);jQuery(this).html('<a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(a)+'" target="_blank"><i class="fa fa-download" style="margin: 0 3px;"></i>'+d+"</a>")}}jQuery(this).attr("title",""),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.Upload_Fields.prefix+"']").each(function(){var e=jQuery(this).find("span.value");if(0!=e.length){for(var a=jQuery(this).attr("title").trim(),r=e.parent().next("span");r.length>0;)r.remove(),r=e.next("span");if(""!=a&&-1!==a.indexOf("$$")&&!jQuery(this).find("a").length){var t=a.split("||"),s=!1;t.length>0&&$.each(t,function(a,r){if(0!=r.length){if(s)return!1;var t=r.split("$$");if(t.length>0)if(s=!0,void 0!==t[2]&&t[2].indexOf("image")>-1){var i=t[0].replace(/\s+/g," ").trim();jQuery(e).html('<a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(t[0])+'" download target="_blank"><img style="max-width:150px;max-height:150px;" src="'+i+'" /></a>')}else{var a=(d=(d=t[0].replace(/\s+/g," ").trim().split("/"))[d.length-1]).indexOf("_"),a=(d=d.substr(a+1)).indexOf("_"),d=d.substr(a+1);jQuery(e).html('<a href="index.php?module=ParsVT&action=ActionAjax&mode=downloadFile&file='+encodeURIComponent(t[0])+'" target="_blank"><i class="fa fa-download" style="margin: 0 3px;"></i>'+d+"</a>")}}})}jQuery(this).next("span").remove(),jQuery(this).next("span").remove(),jQuery(this).attr("title","")}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.QR_Code.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e&&!e.includes("http://chart.apis.google.com")){var a=$("<div/>").html(e).text(),r=(a=a.replace(/\n/g,"")).replace(/\n/g,"");r=r.replace(/\s/g,""),jQuery(this).next("span").remove();var t=encodeURI(a);""!=r&&jQuery(this).html("<span class='fieldValue QR_Code'><span class='value' style='white-space: normal; vertical-align: middle; display: inline-block;'><img src='http://chart.apis.google.com/chart?cht=qr&chld=L|4&chs=150x150&chl="+t+"'></span></span>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.Barcode_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();""==a||e.includes("Barcode_Field")||jQuery(this).html("<span class='fieldValue Barcode_Field'><span class='value'>"+a+"</span></span>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.Date_Time_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();""==a||e.includes("Date_Time_Field")||jQuery(this).html("<span class='fieldValue Date_Time_Field'><span class='value'>"+a+"</span></span>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.Rating_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var t=jQuery(this).html();if(""!=t&&!t.includes("inputElement")){var s="rate"+Math.floor(1e3*Math.random()+1),i=$("<div/>").html(t).text().replace(/\s/g,"");jQuery(this).html('<span class="fieldValue"><span class="value"><input id="'+s+'" type="text" class="inputElement hide" value="'+i+'"></span></span>'),jQuery(this).next("span").remove(),jQuery(this).next("span").remove(),r.LoadRateJS(jQuery("#"+s),!0,e,a,!1,!1)}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.Emotion_Rating_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var t=jQuery(this).html();if(""!=t&&!t.includes("inputElement")){var s="rate"+Math.floor(1e3*Math.random()+1),i=$("<div/>").html(t).text().replace(/\s/g,"");jQuery(this).html('<span class="fieldValue"><span class="value"><input id="'+s+'" type="text" class="inputElement hide" value="'+i+'"></span></span>'),jQuery(this).next("span").remove(),jQuery(this).next("span").remove(),r.LoadRateJS(jQuery("#"+s),!0,e,a,!0,!0)}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.National_CODE.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();""==a||e.includes("National_CODE")||jQuery(this).html("<span class='fieldValue National_CODE'><span class='value'>"+a+"</span></span>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.UsersList.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");""!=jQuery(this).attr("title")&&(jQuery(this).attr("title",""),jQuery(this).next("span").remove(),jQuery(this).next("span").remove())}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.National_ID.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();""==a||e.includes("National_ID")||jQuery(this).html("<span class='fieldValue National_ID'><span class='value'>"+a+"</span></span>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.IRAN_VAT_ID.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();""==a||e.includes("IRAN_VAT_ID")||jQuery(this).html("<span class='fieldValue IRAN_VAT_ID'><span class='value'>"+a+"</span></span>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.TAX_FILE_NUMBER.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();""==a||e.includes("TAX_FILE_NUMBER")||jQuery(this).html("<span class='fieldValue TAX_FILE_NUMBER'><span class='value'>"+a+"</span></span>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.IBAN_Code.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();""==a||e.includes("IBAN_Code")||jQuery(this).html("<span class='fieldValue IBAN_Code'><span class='value'>"+a+"</span></span>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.Credit_Card_Number.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();""==a||e.includes("Credit_Card_Number")||jQuery(this).html("<span class='fieldValue Credit_Card_Number'><span class='value'>"+a+"</span></span>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.Gdate_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();""==a||e.includes("Gdate_Field")||jQuery(this).html("<span class='fieldValue Gdate_Field'><span class='value'>"+a+"</span></span>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.IRAN_POSTAL_CODE.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();""==a||e.includes("IRAN_POSTAL_CODE")||jQuery(this).html("<span class='fieldValue IRAN_POSTAL_CODE'><span class='value'>"+a+"</span></span>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.Color_Picker_Field.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();""==a||e.includes("Color_Picker_Field")||jQuery(this).html("<span class='fieldValue Color_Picker_Field'><span class='value'>"+a+"</span></span>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}),jQuery(".listViewEntryValue[data-name*='"+supportedParsVTCustomFields.Coordinate.prefix+"']").each(function(){jQuery(this).closest("td").prev().css("width","8%");var e=jQuery(this).html();if(""!=e){var a=$("<div/>").html(e).text();""==(a=(a=a.replace(/\n/g,"")).replace(/\s/g,""))||e.includes("Coordinate")||jQuery(this).html("<span class='fieldValue Coordinate'><span class='value'><a  onclick='OpenGpsWindow(\"google\", \""+a+'", "value")\'>'+a+"</a></span></span>"),jQuery(this).next("span").remove(),jQuery(this).next("span").remove()}}))},getQueryParams:function(e){if(void 0!==e){e=e.toString().split("+").join(" ");for(var a,r={},t=/[?&]?([^=]+)=([^&]*)/g;a=t.exec(e);)r[decodeURIComponent(a[1])]=decodeURIComponent(a[2]);return r}},registerEvents:function(){loadScript("layouts/v7/modules/ParsVT/resources/datepicker/datepicker.min.js",function(){}),loadCSS("layouts/v7/modules/ParsVT/resources/datepicker/datepicker.min.css","parsvtdatepicker"),"undefined"==typeof CkEditor&&loadScript("libraries/jquery/ckeditor/ckeditor.js",function(){loadScript("libraries/jquery/ckeditor/adapters/jquery.js",function(){loadScript("layouts/vlayout/modules/Vtiger/resources/CkEditor.js",function(){})})}),this.registerDisplayParsVTCustomFieldsControl(!1,!1),this.createUITypeOption()},createUITypeOption:function(){if("LayoutEditor"==app.getModuleName()){for(var e in supportedParsVTCustomFields)supportedParsVTCustomFields.hasOwnProperty(e)&&$("select[name=fieldType]").append(new Option(app.vtranslate(supportedParsVTCustomFields[e].name),e,!1,!1));overwriteFunctionAddCustomField()}$("[name='layoutEditorModules']").change(function(){var e="index.php?module=LayoutEditor&parent=Settings&view=Index&sourceModule="+$(this).val();location.href=e})}}),jQuery(document).ready(function(e){window.onbeforeunload=null;var a=new ParsVTCustomFields_Js;a.registerEvents(),e(document).on("click",".fieldBlockContainer .relatedBtnAddMore",function(){setTimeout(function(){a.registerDisplayParsVTCustomFieldsControl(!0,"Edit")},1500)}),jQuery(document).ajaxComplete(function(e,r,t){var s=t.data;void 0===s&&t.url&&(s=t.url);var i=window.location.href.split("?");if(void 0!=s.indexOf)if(s.indexOf("?")>-1)d=s.split("?");else d=[s,s];else var d=["",""];var l=a.getQueryParams(i[1]),n=a.getQueryParams(d[1]);if(void 0===l)return!1;var o=a.getQueryParams(s);void 0!==n&&("QuickCreateAjax"==n.view||"MassActionAjax"==n.view&&"showMassEditForm"==n.mode)?setTimeout(function(){a.registerDisplayParsVTCustomFieldsControl(!0,"Edit")},2e3):"Detail"==l.view&&"showRelatedList"==l.mode&&void 0!==n&&"showDetailViewByMode"==n.mode?setTimeout(function(){var e=void 0!==n&&n.view?n.view:l.view;a.registerDisplayParsVTCustomFieldsControl(!0,e)},1500):"List"==l.view&&void 0!==n&&l.module==n.module&&"RecordQuickPreview"==n.view?setTimeout(function(){a.registerDisplayParsVTCustomFieldsControl(!0,"Detail")},1500):"Edit"==l.view&&void 0!==n&&"RelatedBlocksLists"==n.module&&"MassActionAjax"==n.view&&"generateEditView"==n.mode?setTimeout(function(){a.registerDisplayParsVTCustomFieldsControl(!0,"Edit")},1500):"Detail"==l.view&&void 0!==n&&"RelatedBlocksLists"==n.module&&"MassActionAjax"==n.view&&"generateDetailView"==n.mode?setTimeout(function(){a.registerDisplayParsVTCustomFieldsControl(!0,"Detail")},1500):"List"==l.view&&void 0!==n&&l.module==n.module&&"List"==n.view?setTimeout(function(){a.registerDisplayParsVTCustomFieldsControl(!0,"List")},1500):"Detail"!=l.view||"showDetailViewByMode"!=l.mode&&"SaveAjax"!=o.action||void 0===n||l.module!=n.module||"showDetailViewByMode"!=n.mode&&"Edit"!=n.view||setTimeout(function(){var e=void 0!==n&&n.view?n.view:l.view;a.registerDisplayParsVTCustomFieldsControl(!0,e)},1500),void 0!==typeof t&&null!==typeof t.data&&"string"==typeof t.data&&t.data&&t.data.indexOf("mode=unHide")>-1&&hideAllSmartChangeButtonForACF()}),hideAllSmartChangeButtonForACF()});

haha - 2025