/*! For license information please see mailpoet.js.LICENSE.txt */
"use strict";(self.webpackChunkMailPoet3=self.webpackChunkMailPoet3||[]).push([[740],{73853:function(e,t,i){i(62668);var s=i(65311),n=i.n(s);n()((e=>{e(document).on("click",".mailpoet-dismissible-notice .notice-dismiss",(function(){const t=e(this).closest(".mailpoet-dismissible-notice").data("notice");e.ajax(window.ajaxurl,{type:"POST",data:{action:"dismissed_notice_handler",type:t}})}))}));var a=n();a.fn.mailpoetSerializeObject=function(e){var t={},i={true:!0,false:!1,null:null};return a.each(this.serializeArray(),(function(s,n){var a=n.name,r=n.value,l=t,o=0,c=a.split("]["),u=c.length-1;if(/\[/.test(c[0])&&/\]$/.test(c[u])?(c[u]=c[u].replace(/\]$/,""),u=(c=c.shift().split("[").concat(c)).length-1):u=0,e&&(r&&!Number.isNaN(r)?r=+r:"undefined"===r?r=void 0:void 0!==i[r]&&(r=i[r])),u)for(;o<=u;o+=1)l[a=""===c[o]?l.length:c[o]]=o<u?l[a]||(c[o+1]&&isNaN(c[o+1])?{}:[]):r,l=l[a];else Array.isArray(t[a])?t[a].push(r):void 0!==t[a]?t[a]=[t[a],r]:t[a]=r})),t};var r=i(13979),l=i.n(r);n()((e=>{l().addValidator("scheduledAt",{requirementType:"string",validateString:(t,i)=>{const s=e('select[name="afterTimeType"],select#scheduling_time_interval').val();let n=!0;return"hours"===s&&43800<t&&(n=!1),"days"===s&&1825<t&&(n=!1),"weeks"===s&&260<t&&(n=!1),!!n||e.Deferred().reject(i)},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:(t,i)=>{const s=window.mailpoet_segments||[];let n=!1;return t.forEach((e=>{const t=s.find((t=>t.id===e));t&&t.subscribers>0&&(n=!0)})),!!n||e.Deferred().reject(i)},messages:{en:"Please select a list with subscribers."}})}))},65311:function(e){e.exports=jQuery}},function(e){e.O(0,[351],(function(){return 73853,e(e.s=73853)})),e.O()}]);