File: /var/www/html/ielts-store/wp-content/plugins/automatewoo/admin/assets/js/min/automatewoo.min.js
var AutomateWoo,AW={};!function(t){AW.init=function(){AW.params=automatewooLocalizeScript,AW.initTooltips(),AW.initWorkflowStatusSwitch(),AW.initShowHide(),AW.initHoverableDates(),t(document.body).on("wc-enhanced-select-init",(function(){AW.initEnhancedSelects()}))},AW.initTooltips=function(){t(".automatewoo-help-tip, .automatewoo-tiptip").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})},AW.initEnhancedSelects=function(){t("select.automatewoo-json-search").filter(":not(.enhanced)").each((function(){var a={allowClear:!!t(this).data("allow_clear"),placeholder:t(this).data("placeholder"),minimumInputLength:"1",escapeMarkup:function(t){return t},ajax:{url:AW.params.url.ajax,dataType:"json",quietMillis:250,data:function(a){var i={term:a.term,action:t(this).data("action")},e=t(this).data("pass-sibling");if(e){var o=t('[name="'+e+'"]');o.length&&(i.sibling=o.val())}return i},processResults:function(a){var i=[];return a&&t.each(a,(function(t,a){i.push({id:t,text:a})})),{results:i}},cache:!0}};t(this).select2(a).addClass("enhanced")}))},AW.initWorkflowStatusSwitch=function(){t(".aw-switch.js-toggle-workflow-status").on("click",(function(){var a,i;(a=t(this)).is(".aw-loading")||(i="on"===a.attr("data-aw-switch")?"off":"on",a.addClass("aw-loading"),a.attr("data-aw-switch",i),t.post(ajaxurl,{action:"aw_toggle_workflow_status",workflow_id:a.attr("data-workflow-id"),new_state:i},(function(){a.removeClass("aw-loading")})))}))},AW.price=function(t){var a=t.toFixed(2),i=AW.params.locale.currency_symbol;switch(AW.params.locale.currency_position){case"right":a+=i;break;case"right_space":a=a+" "+i;break;case"left":a=i+a;break;case"left_space":default:a=i+" "+a}return a},AW.block=function(t){t.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},AW.initShowHide=function(){var a=function(a){var i=a.data("automatewoo-bind"),e=a.val(),o=a.is('input[type="checkbox"]');t("[data-automatewoo-show]").each((function(){if(o&&t(this).data("automatewoo-show")===i)a.is(":checked")?t(this).show():t(this).hide();else{var n=t(this).data("automatewoo-show").split("=");if(n[0]!==i)return;-1!==n[1].split("|").indexOf(e)?t(this).show():t(this).hide()}})),t("[data-automatewoo-hide]").each((function(){if(o&&t(this).data("automatewoo-hide")===i)a.is(":checked")?t(this).hide():t(this).show();else{var n=t(this).data("automatewoo-hide").split("=");if(n[0]!==i)return;-1!==n[1].split("|").indexOf(e)?t(this).hide():t(this).show()}}))};t(document).on("change","[data-automatewoo-bind]",(function(){a(t(this))})),t("[data-automatewoo-bind]").each((function(){a(t(this))}))},AW.initHoverableDates=function(){var a=".automatewoo-hoverable-date";t(document.body).on("mouseenter",a,(function(){t(this).text(t(this).data("automatewoo-date-no-diff"))})).on("mouseleave",a,(function(){t(this).text(t(this).data("automatewoo-date-with-diff"))}))},t((function(){AW.init()}))}(jQuery),jQuery((function(t){(AutomateWoo={_email_preview_window:null,init:function(){this.init_notice_dismiss(),this.init_date_pickers()},notices:{success:function(t,a){a.length&&a.before('<div class="automatewoo-notice updated fade"><p><strong>'+t+"</strong></p></div>")},error:function(t,a){a.length&&a.before('<div class="automatewoo-notice error fade"><p><strong>'+t+"</strong></p></div>")},clear_all:function(){t(".automatewoo-notice").slideUp()}},init_notice_dismiss:function(){t(".aw-notice-system-error").on("click",".notice-dismiss",(function(){t.ajax({url:ajaxurl,data:{action:"aw_dismiss_system_error_notice"}})})),t("[data-automatewoo-dismissible-notice]").on("click",".notice-dismiss",(function(){var a=t(this).parents("[data-automatewoo-dismissible-notice]");t.post({url:ajaxurl,data:{action:"automatewoo_remove_notice",notice:a.data("automatewoo-dismissible-notice"),nonce:AW.params.nonces.remove_notice}})}))},init_date_pickers:function(){t(".automatewoo-date-picker").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0})},isEmailPreviewOpen:function(){return this._email_preview_window&&!this._email_preview_window.closed},openLoadingEmailPreview:function(){this.openPreviewWindow(AW.params.url.admin+"admin.php?page=automatewoo-preview&action=loading")},open_email_preview:function(a,i){var e={page:"automatewoo-preview",action:"preview-ui",type:a,args:i};this.openPreviewWindow(AW.params.url.admin+"admin.php?"+t.param(e))},openPreviewWindow:function(t){this._email_preview_window=window.open(t,"automatewoo_preview","titlebar=no,toolbar=no,height=768,width=860,resizable=yes,status=no")}}).init(),t(".automatewoo-before-after-day-field-group__field--type").on("change",(function(){const a=t(this),i=a.siblings(".automatewoo-before-after-day-field-group__field--days");"on_the_day"===a.val()?i.hide():i.show()})).trigger("change")}));
//# sourceMappingURL=automatewoo.min.js.map