/home/vianto5/heredit.mx/wp-content/plugins/wpforms/assets/js/admin/builder
Edit: /home/vianto5/heredit.mx/wp-content/plugins/wpforms/assets/js/admin/builder/multiple-choices.min.js (6430B)
var WPForms=window.WPForms||{};WPForms.Admin=WPForms.Admin||{},WPForms.Admin.Builder=WPForms.Admin.Builder||{},WPForms.Admin.Builder.MultipleChoices=WPForms.Admin.Builder.MultipleChoices||((e,l)=>{let n={init(){l(n.ready)},ready(){n.bindEvents()},bindEvents(){n.$builder=l("#wpforms-builder"),n.$builder.on("change",".wpforms-field-option-row-choices_other input",n.toggleOtherOption),n.$builder.on("input",".wpforms-field-option-row-other_placeholder input",n.updateOtherOptionPlaceholder),n.$builder.on("change",".wpforms-field-option-row-other_size select",n.updateOptionInputFieldSize),l(e).on("wpformsAIModalAfterChoicesInsert",n.appendOtherOption),n.$builder.on("input",".wpforms-field-option-row-choices li.wpforms-choice-other-option input.value",n.updateOptionInputPreview),n.$builder.on("change",".wpforms-field-option-row-dynamic_choices select",n.toggleDynamicChoices),n.$builder.on("wpformsChoicesSetDefault",n.updateDefaultOptionState)},updateOptionInputPreview(){var e=l(this),i=e.closest(".choices-list").data("field-id"),o=l("#wpforms-field-option-"+i);o.find(".wpforms-field-option-row-show_values input").is(":checked")&&(e=e.val(),i=l("#wpforms-field-"+i).find(".wpforms-other-input"),o=o.find(".wpforms-field-option-row-other_placeholder input").val()||"",i.val(e??o))},updateOptionInputFieldSize(){var e=l(this),i=e.closest(".wpforms-field-option-row").data("field-id"),e=e.val()||"medium";n.setOtherSizeOnContainer(i,e)},updateDefaultOptionState(e,i){var o,i=l(i),t=i.closest(".choices-list");"radio"===t.data("field-type")&&(t=t.data("field-id"),o=i.closest("li"),t=l("#wpforms-field-"+t).find(".wpforms-other-input"),o.hasClass("wpforms-choice-other-option")?(o=i.is(":checked"),t.toggleClass("wpforms-hidden",!o)):t.addClass("wpforms-hidden").val(""))},toggleOtherOption(e){var i=l(this),o=i.closest(".wpforms-field-option-row").data("field-id"),t=l("#wpforms-field-option-"+o),i=i.is(":checked"),r=t.find(".wpforms-field-option-hidden-type").val(),d=l("#wpforms-field-option-row-"+o+"-choices .choices-list"),s=d.attr("data-next-id");i?n.fieldChoiceAddOther(e,l(this),s)&&d.attr("data-next-id",++s):(d.find("li.wpforms-choice-other-option").remove(),l("#wpforms-field-"+o).find(".wpforms-other-input").addClass("wpforms-hidden")),t.find(".wpforms-field-option-row-other_placeholder").toggleClass("wpforms-hidden",!i),t.find(".wpforms-field-option-row-other_size").toggleClass("wpforms-hidden",!i),i?(e=t.find(".wpforms-field-option-row-other_size select").val()||"medium",n.setOtherSizeOnContainer(o,e)):n.setOtherSizeOnContainer(o,null),WPFormsBuilder.fieldChoiceUpdate(r,o),n.updatePreviewState(o)},updateOtherOptionPlaceholder(){var e=l(this),i=e.closest(".wpforms-field-option-row").data("field-id"),e=e.val(),i=l("#wpforms-field-"+i+" .wpforms-other-input");i.length&&i.attr("placeholder",e)},toggleDynamicChoices(){var e,i=l(this);""!==i.val()&&(i=i.closest(".wpforms-field-option-row").data("field-id"),(e=l("#wpforms-field-option-"+i).find(".wpforms-field-option-row-choices_other input")).is(":checked")&&e.prop("checked",!1).trigger("change"),n.updatePreviewState(i))},createOtherChoice(e,i,o){var e=e.children("li").last().clone(),t=wpforms_builder.other;return e.attr("data-key",o),e.find("input.label").val(t).attr("name",`fields[${i}][choices][${o}][label]`),e.find("input.value").val("").attr("name",`fields[${i}][choices][${o}][value]`),e.find(".wpforms-image-upload input.source").val("").attr("name",`fields[${i}][choices][${o}][image]`),e.find(".wpforms-icon-select input.source-icon").val(wpforms_builder.icon_choices.default_icon).attr("name",`fields[${i}][choices][${o}][icon]`),e.find(".wpforms-icon-select input.source-icon-style").val(wpforms_builder.icon_choices.default_icon_style).attr("name",`fields[${i}][choices][${o}][icon_style]`),e.find(".wpforms-icon-select .ic-fa-preview").removeClass().addClass(`ic-fa-preview ic-fa-${wpforms_builder.icon_choices.default_icon_style} ic-fa-`+wpforms_builder.icon_choices.default_icon),e.find(".wpforms-icon-select .ic-fa-preview + span").text(wpforms_builder.icon_choices.default_icon),e.find("input.default").attr("name",`fields[${i}][choices][${o}][default]`).prop("checked",!1),e.find(".preview").empty(),e.find(".wpforms-image-upload-add").show(),e.addClass("wpforms-choice-other-option not-draggable"),e.find(".move, .add, .remove").addClass("wpforms-disabled"),e.find("input.other-flag").remove(),e.append(`
`),e},fieldChoiceAddOther(e,i,o){var i=l(i).closest(".wpforms-field-option-row").data("field-id"),t=l(`#wpforms-field-option-row-${i}-choices .choices-list`);return!(0