'+t+"
"),d(".js-ocdi-ajax-response-title").html(ocdi.texts.import_failed),d(".js-ocdi-ajax-response-subtitle").html(""+ocdi.texts.import_failed_subtitle+"
"),d(".js-ocdi-importing").hide(),d(".js-ocdi-imported").show())}).fail(function(t){d(".js-ocdi-ajax-response").append('Error: '+t.statusText+" ("+t.status+")
"),d(".js-ocdi-ajax-response-title").html(ocdi.texts.import_failed),d(".js-ocdi-ajax-response-subtitle").html(""+ocdi.texts.import_failed_subtitle+"
"),d(".js-ocdi-importing").hide(),d(".js-ocdi-imported").show()})}(e)}d(".js-ocdi-notice-wrapper").appendTo(".js-ocdi-admin-notices-container"),d(".js-ocdi-auto-start-manual-import").length&&l(!1),d(".js-ocdi-start-manual-import").on("click",function(t){t.preventDefault();var e=d(this);if(e.hasClass("ocdi-button-disabled"))return!1;t=new FormData;if(t.append("action","ocdi_upload_manual_import_files"),t.append("security",ocdi.ajax_nonce),d("#ocdi__content-file-upload").length&&d("#ocdi__content-file-upload").get(0).files.length){var i=d("#ocdi__content-file-upload")[0].files[0],n=i.name.split(".").pop();if(-1===["xml"].indexOf(n.toLowerCase()))return alert(ocdi.texts.content_filetype_warn),!1;t.append("content_file",i)}if(d("#ocdi__widget-file-upload").length&&d("#ocdi__widget-file-upload").get(0).files.length){n=d("#ocdi__widget-file-upload")[0].files[0],i=n.name.split(".").pop();if(-1===["json","wie"].indexOf(i.toLowerCase()))return alert(ocdi.texts.widgets_filetype_warn),!1;t.append("widget_file",n)}if(d("#ocdi__customizer-file-upload").length&&d("#ocdi__customizer-file-upload").get(0).files.length){var o=d("#ocdi__customizer-file-upload")[0].files[0],a=o.name.split(".").pop();if(-1===["dat"].indexOf(a.toLowerCase()))return alert(ocdi.texts.customizer_filetype_warn),!1;t.append("customizer_file",o)}if(d("#ocdi__redux-file-upload").length&&d("#ocdi__redux-file-upload").get(0).files.length){a=d("#ocdi__redux-file-upload")[0].files[0],o=a.name.split(".").pop();if(-1===["json"].indexOf(o.toLowerCase()))return alert(ocdi.texts.redux_filetype_warn),!1;t.append("redux_file",a),t.append("redux_option_name",d("#ocdi__redux-option-name").val())}e.addClass("ocdi-button-disabled"),d.ajax({method:"POST",url:ocdi.ajax_url,data:t,contentType:!1,processData:!1}).done(function(t){t.success?window.location.href=ocdi.import_url:(alert(t.data),e.removeClass("ocdi-button-disabled"))}).fail(function(t){alert(t.statusText+" ("+t.status+")"),e.removeClass("ocdi-button-disabled")})}),d(".js-ocdi-cancel-manual-import").on("click",function(){d(".ocdi__file-upload-container-items input[type=file]").each(function(){d(this).val("").trigger("change")})}),d(document).on("change",".ocdi__file-upload-container-items input[type=file]",function(){var t=d(this),e=t.siblings("label"),i=!1;this.files&&0"+ocdi.texts.successful_import+""):e.find(".js-ocdi-content-item-error").append(""+t.data+"
"))}).fail(function(t){var e=d(".content-item-"+s);e.removeClass("content-item--loading"),e.find(".js-ocdi-content-item-error").append(""+t.statusText+" ("+t.status+")
")}).always(function(t){t.data&&t.data.refresh||(++o===n.length?a.removeClass("ocdi-button-disabled"):i(n,o,a))})}(t,0,e)}),d(".js-ocdi-install-coming-soon-plugin").on("click",function(t){t.preventDefault();var e=d(this);if(e.hasClass("button-disabled"))return!1;e.addClass("button-disabled"),d.ajax({method:"POST",url:ocdi.ajax_url,data:{action:"ocdi_install_plugin",security:ocdi.ajax_nonce,slug:"coming-soon"},beforeSend:function(){e.text(ocdi.texts.installing)}}).done(function(t){t.success?e.text(ocdi.texts.installed):(alert(t.data),e.text(ocdi.texts.install_plugin),e.removeClass("button-disabled"))}).fail(function(t){alert(t.statusText+" ("+t.status+")"),e.removeClass("button-disabled")})}),d(document).on("change",".ocdi--create-content .content-item input[type=checkbox]",function(t){var e=d(".ocdi--create-content .content-item input[type=checkbox]"),i=d(".js-ocdi-create-content-install-plugins-notice"),n=[];e.each(function(){var e,i,t=d(this);t.is(":checked")&&(n=n.concat((e=(e=t.data("plugins")).split(","),i=[],ocdi.missing_plugins.forEach(function(t){-1!==e.indexOf(t.slug)&&i.push(t.name)}),i)))}),0<(n=n.filter(a).join(", ")).length?(i.find(".js-ocdi-create-content-install-plugins-list").text(n),i.show()):(i.find(".js-ocdi-create-content-install-plugins-list").text(""),i.hide())}),o=d(".js-ocdi-gl-item-container").find(".js-ocdi-gl-item"),e="ocdi-is-fadeout",d(".js-ocdi-nav-link").on("click",function(t){t.preventDefault(),d(this).parent().siblings().removeClass("active"),d(this).parent().addClass("active");var t=this.hash.slice(1),e=d(".js-ocdi-gl-item-container");e.css("min-width",e.outerHeight()),i(t).done(function(){e.removeAttr("style")})}),d(".js-ocdi-gl-search").on("keyup",function(t){0