PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/v1world.us/wp-content/plugins/wpforms-lite/assets/js/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //home/trave494/v1world.us/wp-content/plugins/wpforms-lite/assets/js/admin-builder-providers.min.js

!function(c){var s,a={settings:{form:c("#wpforms-builder-form"),spinner:'<i class="wpforms-loading-spinner wpforms-loading-inline"></i>',spinnerWhite:'<i class="wpforms-loading-spinner wpforms-loading-inline wpforms-loading-white"></i>'},init:function(){s=this.settings,c(a.ready),a.bindUIActions()},ready:function(){s.formID=c("#wpforms-builder-form").data("id")},bindUIActions:function(){c(document).on("click",".wpforms-provider-connection-delete",function(e){a.connectionDelete(this,e)}),c(document).on("click",".wpforms-provider-connections-add",function(e){a.connectionAdd(this,e)}),c(document).on("click",".wpforms-provider-account-add button",function(e){a.accountAdd(this,e)}),c(document).on("change",".wpforms-provider-accounts select",function(e){a.accountSelect(this,e)}),c(document).on("change",".wpforms-provider-lists select",function(e){a.accountListSelect(this,e)}),c(document).on("wpformsPanelSwitch",function(e,o){a.providerPanelConfirm(o)}),c(document).on("wpformsSaved",function(){var r=[],e=c("#wpforms-panel-providers").find(".wpforms-connection-block");e.length&&e.each(function(){var e,o,n=!1;c(this).find("table span.required").each(function(){""===c(this).parent().parent().find("select").val()&&(n=!0)}),n&&((o=c(this).closest(".wpforms-panel-content-section").find(".wpforms-panel-content-section-title").clone()).find("button").remove(),e=o.text().trim(),o=wpforms_builder.provider_required_flds,-1<r.indexOf(e)||(c.alert({title:wpforms_builder.heads_up,content:o.replace("{provider}",e),icon:"fa fa-exclamation-circle",type:"orange",buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",keys:["enter"]}}}),r.push(e)))})})},connectionDelete:function(e,o){o.preventDefault();var n=c(e);c.confirm({title:!1,content:wpforms_builder_providers.confirm_connection,backgroundDismiss:!1,closeIcon:!1,icon:"fa fa-exclamation-circle",type:"orange",buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",keys:["enter"],action:function(){var e=n.closest(".wpforms-panel-content-section");n.closest(".wpforms-provider-connection").remove(),e.find(".wpforms-provider-connection").length||e.find(".wpforms-builder-provider-connections-default").removeClass("wpforms-hidden")}},cancel:{text:wpforms_builder.cancel}}})},connectionAdd:function(e,o){o.preventDefault();var n=c(e),r=n.parent().parent(),i=n.parent(),t=n.data("provider"),o=n.data("type"),e=(e=wpforms_builder_providers.prompt_connection+('<input autofocus="" type="text" id="provider-connection-name" placeholder="'+wpforms_builder_providers.prompt_placeholder+'">')+('<p class="error">'+wpforms_builder_providers.error_name+"</p>")).replace(/%type%/g,o);c.confirm({title:!1,content:e,icon:"fa fa-info-circle",type:"blue",backgroundDismiss:!1,closeIcon:!1,buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",keys:["enter"],action:function(){var e=this.$content.find("input#provider-connection-name").val().trim(),o=this.$content.find(".error");if(""===e)return o.show(),!1;a.inputToggle(n,"disable");e={action:"wpforms_provider_ajax_"+t,provider:t,task:"new_connection",name:e,id:s.form.data("id"),nonce:wpforms_builder.nonce};a.fireAJAX(n,e,function(e){var o;e.success?(r.find(".wpforms-builder-provider-connections-default").addClass("wpforms-hidden"),r.find(".wpforms-provider-connections").prepend(e.data.html),(o=r.find(".wpforms-provider-connection:first")).find(".wpforms-provider-accounts option:selected")&&(o.find(".wpforms-provider-accounts option:first").prop("selected",!0),o.find(".wpforms-provider-accounts select").trigger("change"))):a.errorDisplay(e.data.error,i)})}},cancel:{text:wpforms_builder.cancel}}})},accountAdd:function(e,o){o.preventDefault();var n=c(e),r=n.data("provider"),i=n.closest(".wpforms-provider-connection"),t=n.parent(),o=t.find(":input"),e=a.requiredCheck(o,t);if(a.inputToggle(n,"disable"),e)return n.prop("disabled",!1).find("i").remove(),!1;o={action:"wpforms_provider_ajax_"+r,provider:r,connection_id:i.data("connection_id"),task:"new_account",data:a.fakeSerialize(o)};a.fireAJAX(n,o,function(e){e.success?(t.nextAll(".wpforms-connection-block").remove(),t.nextAll(".wpforms-conditional-block").remove(),t.after(e.data.html),t.slideUp(),i.find(".wpforms-provider-accounts select").trigger("change")):a.errorDisplay(e.data.error,t)})},accountSelect:function(e,o){o.preventDefault();var o=c(e),n=o.closest(".wpforms-provider-connection"),r=o.parent(),e=n.data("provider");a.inputToggle(o,"disable"),r.nextAll(".wpforms-connection-block").remove(),r.nextAll(".wpforms-conditional-block").remove(),o.val()?(n.find(".wpforms-provider-account-add").slideUp(),e={action:"wpforms_provider_ajax_"+e,provider:e,connection_id:n.data("connection_id"),task:"select_account",account_id:o.find(":selected").val()},a.fireAJAX(o,e,function(e){e.success?(r.after(e.data.html),n.find(".wpforms-provider-lists option:first").prop("selected",!0),n.find(".wpforms-provider-lists select").trigger("change")):a.errorDisplay(e.data.error,r)})):(n.find(".wpforms-provider-account-add input").val(""),n.find(".wpforms-provider-account-add").slideDown(),a.inputToggle(o,"enable"))},accountListSelect:function(e,o){o.preventDefault();var n=c(e),o=n.closest(".wpforms-provider-connection"),r=n.parent(),e=o.data("provider");a.inputToggle(n,"disable"),r.nextAll(".wpforms-connection-block").remove(),r.nextAll(".wpforms-conditional-block").remove();o={action:"wpforms_provider_ajax_"+e,provider:e,connection_id:o.data("connection_id"),task:"select_list",account_id:o.find(".wpforms-provider-accounts option:selected").val(),list_id:n.find(":selected").val(),form_id:s.formID};a.fireAJAX(n,o,function(e){e.success?(r.after(e.data.html),wpf.initTooltips()):a.errorDisplay(e.data.error,r)})},providerPanelConfirm:function(e){wpforms_panel_switch=!0,"providers"===e&&wpf.savedState!=wpf.getFormState("#wpforms-builder-form")&&(wpforms_panel_switch=!1,c.confirm({title:!1,content:wpforms_builder_providers.confirm_save,backgroundDismiss:!1,closeIcon:!1,icon:"fa fa-info-circle",type:"blue",buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",keys:["enter"],action:function(){c("#wpforms-save").trigger("click"),c(document).on("wpformsSaved",function(){window.location.href=wpforms_builder_providers.url})}},cancel:{text:wpforms_builder.cancel}}}))},fireAJAX:function(e,o,n){var r=c(e),e={id:c("#wpforms-builder-form").data("id"),nonce:wpforms_builder.nonce};c.extend(e,o),c.post(wpforms_builder.ajax_url,e,function(e){n(e),a.inputToggle(r,"enable")}).fail(function(e,o,n){console.log(e.responseText)})},inputToggle:function(e,o){e=c(e);"enable"===o?(e.is("select")?e.prop("disabled",!1).next("i"):e.prop("disabled",!1).find("i")).remove():"disable"===o&&(e.is("select")?e.prop("disabled",!0).after(s.spinner):e.prop("disabled",!0).prepend(s.spinnerWhite))},errorDisplay:function(e,o){o.find(".wpforms-error-msg").remove(),o.prepend('<p class="wpforms-alert-danger wpforms-alert wpforms-error-msg">'+e+"</p>")},requiredCheck:function(e,o){var n=!1;return o.find(".wpforms-alert-required").remove(),e.each(function(e,o){c(o).hasClass("wpforms-required")&&0===c(o).val().length?(c(o).addClass("wpforms-error"),n=!0):c(o).removeClass("wpforms-error")}),n&&o.prepend('<p class="wpforms-alert-danger wpforms-alert wpforms-alert-required">'+wpforms_builder_providers.required_field+"</p>"),n},fakeSerialize:function(e){e=e.clone();return e.each(function(e,o){c(o).data("name")&&c(o).attr("name",c(o).data("name"))}),e.serialize()}};a.init()}(jQuery);