/*! For license information please see mailpoet.js.LICENSE.txt */
"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[194],{87187(e,s,t){t(16725);var i=t(41669),a=t.n(i);a()(e=>{e(document).on("click",".mailpoet-dismissible-notice .notice-dismiss",function(){const s=e(this).closest(".mailpoet-dismissible-notice").data("notice");e.ajax(window.ajaxurl,{type:"POST",data:{action:"dismissed_notice_handler",type:s}})})});var r=a();r.fn.mailpoetSerializeObject=function(e){var s={},t={true:!0,false:!1,null:null};return r.each(this.serializeArray(),function(i,a){var r=a.name,n=a.value,l=s,o=0,c=r.split("]["),d=c.length-1;if(/\[/.test(c[0])&&/\]$/.test(c[d])?(c[d]=c[d].replace(/\]$/,""),d=(c=c.shift().split("[").concat(c)).length-1):d=0,e&&(n&&!Number.isNaN(n)?n=+n:"undefined"===n?n=void 0:void 0!==t[n]&&(n=t[n])),d)for(;o<=d;o+=1)l[r=""===c[o]?l.length:c[o]]=o<d?l[r]||(c[o+1]&&isNaN(c[o+1])?{}:[]):n,l=l[r];else Array.isArray(s[r])?s[r].push(n):void 0!==s[r]?s[r]=[s[r],n]:s[r]=n}),s};var n=t(60405),l=t.n(n);a()(e=>{l().addValidator("scheduledAt",{requirementType:"string",validateString:(s,t)=>{const i=e('select[name="afterTimeType"],select#scheduling_time_interval').val();let a=!0;return"hours"===i&&43800<s&&(a=!1),"days"===i&&1825<s&&(a=!1),"weeks"===i&&260<s&&(a=!1),!!a||e.Deferred().reject(t)},messages:{en:"An email can only be scheduled up to 5 years in the future. Please choose a shorter period."}}),l().addValidator("segmentsWithSubscribers",{requirementType:"string",validateMultiple:(s,t)=>{const i=window.mailpoet_segments||[];let a=!1;return s.forEach(e=>{const s=i.find(s=>s.id===e);s&&s.subscribers>0&&(a=!0)}),!!a||e.Deferred().reject(t)},messages:{en:"Please select a list with subscribers."}})})},41669(e){e.exports=jQuery}},e=>{e.O(0,[223],()=>e(e.s=87187)),e.O()}]);