!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Sweetalert2=t()}(this,function(){"use strict";var e={title:"",titleText:"",text:"",html:"",type:null,customClass:"",target:"body",animation:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,showConfirmButton:!0,showCancelButton:!1,preConfirm:null,confirmButtonText:"OK",confirmButtonColor:"#3085d6",confirmButtonClass:null,cancelButtonText:"Cancel",cancelButtonColor:"#aaa",cancelButtonClass:null,buttonsStyling:!0,reverseButtons:!1,focusCancel:!1,showCloseButton:!1,showLoaderOnConfirm:!1,imageUrl:null,imageWidth:null,imageHeight:null,imageClass:null,timer:null,width:500,padding:20,background:"#fff",input:null,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputClass:null,inputAttributes:{},inputValidator:null,progressSteps:[],currentProgressStep:null,progressStepsDistance:"40px",onOpen:null,onClose:null,useRejections:!0},t=function(e){var t={};for(var n in e)t[e[n]]="swal2-"+e[n];return t},n=t(["container","shown","iosfix","modal","overlay","fade","show","hide","noanimation","close","title","content","buttonswrapper","confirm","cancel","icon","image","input","file","range","select","radio","checkbox","textarea","inputerror","validationerror","progresssteps","activeprogressstep","progresscircle","progressline","loading","styled"]),o=t(["success","warning","info","question","error"]),r=function(e,t){(e=String(e).replace(/[^0-9a-f]/gi,"")).length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;for(var n="#",o=0;o<3;o++){var r=parseInt(e.substr(2*o,2),16);n+=("00"+(r=Math.round(Math.min(Math.max(0,r+r*t),255)).toString(16))).substr(r.length)}return n},i=function(e){var t=[];for(var n in e)-1===t.indexOf(e[n])&&t.push(e[n]);return t},a={previousWindowKeyDown:null,previousActiveElement:null,previousBodyPadding:null},l=function(e){if("undefined"!=typeof document){var t=document.createElement("div");t.className=n.container,t.innerHTML=s;var o=document.querySelector(e.target);o||(console.warn("SweetAlert2: Can't find the target \""+e.target+'"'),o=document.body),o.appendChild(t);var r=c(),i=A(r,n.input),a=A(r,n.file),l=r.querySelector("."+n.range+" input"),u=r.querySelector("."+n.range+" output"),d=A(r,n.select),p=r.querySelector("."+n.checkbox+" input"),f=A(r,n.textarea);return i.oninput=function(){$.resetValidationError()},i.onkeydown=function(t){setTimeout(function(){13===t.keyCode&&e.allowEnterKey&&(t.stopPropagation(),$.clickConfirm())},0)},a.onchange=function(){$.resetValidationError()},l.oninput=function(){$.resetValidationError(),u.value=l.value},l.onchange=function(){$.resetValidationError(),l.previousSibling.value=l.value},d.onchange=function(){$.resetValidationError()},p.onchange=function(){$.resetValidationError()},f.oninput=function(){$.resetValidationError()},r}console.error("SweetAlert2 requires document to initialize")},s=('\n
\n
\n
\n \n
\n
?
\n
!
\n
i
\n
\n
![]()
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n').replace(/(^|\n)\s*/g,""),u=function(){return document.body.querySelector("."+n.container)},c=function(){return u()?u().querySelector("."+n.modal):null},d=function(){return c().querySelectorAll("."+n.icon)},p=function(e){return u()?u().querySelector("."+e):null},f=function(){return p(n.title)},m=function(){return p(n.content)},v=function(){return p(n.image)},h=function(){return p(n.buttonswrapper)},g=function(){return p(n.progresssteps)},y=function(){return p(n.validationerror)},b=function(){return p(n.confirm)},w=function(){return p(n.cancel)},C=function(){return p(n.close)},k=function(e){var t=[b(),w()];e&&t.reverse();var n=t.concat(Array.prototype.slice.call(c().querySelectorAll('button, input:not([type=hidden]), textarea, select, a, *[tabindex]:not([tabindex="-1"])')));return i(n)},x=function(e,t){return!!e.classList&&e.classList.contains(t)},S=function(e){if(e.focus(),"file"!==e.type){var t=e.value;e.value="",e.value=t}},E=function(e,t){e&&t&&t.split(/\s+/).filter(Boolean).forEach(function(t){e.classList.add(t)})},B=function(e,t){e&&t&&t.split(/\s+/).filter(Boolean).forEach(function(t){e.classList.remove(t)})},A=function(e,t){for(var n=0;n"),t.text||t.html){if("object"===R(t.html))if(p.innerHTML="",0 in t.html)for(var A=0;A in t.html;A++)p.appendChild(t.html[A].cloneNode(!0));else p.appendChild(t.html.cloneNode(!0));else t.html?p.innerHTML=t.html:t.text&&(p.textContent=t.text);P(p)}else T(p);t.showCloseButton?P(S):T(S),r.className=n.modal,t.customClass&&E(r,t.customClass);var M=g(),V=parseInt(null===t.currentProgressStep?$.getQueueStep():t.currentProgressStep,10);t.progressSteps.length?(P(M),L(M),V>=t.progressSteps.length&&console.warn("SweetAlert2: Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach(function(e,o){var r=document.createElement("li");if(E(r,n.progresscircle),r.innerHTML=e,o===V&&E(r,n.activeprogressstep),M.appendChild(r),o!==t.progressSteps.length-1){var i=document.createElement("li");E(i,n.progressline),i.style.width=t.progressStepsDistance,M.appendChild(i)}})):T(M);for(var O=d(),H=0;Hwindow.innerHeight&&(a.previousBodyPadding=document.body.style.paddingRight,document.body.style.paddingRight=N()+"px")},Q=function(){null!==a.previousBodyPadding&&(document.body.style.paddingRight=a.previousBodyPadding,a.previousBodyPadding=null)},Y=function(){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&!x(document.body,n.iosfix)){var e=document.body.scrollTop;document.body.style.top=-1*e+"px",E(document.body,n.iosfix)}},_=function(){if(x(document.body,n.iosfix)){var e=parseInt(document.body.style.top,10);B(document.body,n.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}},$=function e(){for(var t=arguments.length,o=Array(t),i=0;i label {
color: ${labelColor};
${labelTypoStylesDesktop}
${labelMarginStylesDesktop}
}
.eb-form-wrapper.${parentBlockId} .eb-email-field-wrapper.${blockId} .eb-required{
color: ${requiredColor};
}
`;
const labelTab = `
.eb-form-wrapper.${parentBlockId} .eb-email-field-wrapper.${blockId} > label {
${labelTypoStylesTab}
${labelMarginStylesTab}
}
`;
const labelMobile = `
.eb-form-wrapper.${parentBlockId} .eb-email-field-wrapper.${blockId} > label {
${labelTypoStylesMobile}
${labelMarginStylesMobile}
}
`;
const fieldDesktop = `
.eb-form-wrapper.${parentBlockId} .eb-email-field-wrapper.${blockId} .eb-field-input {
color: ${fieldColor};
background-color: ${fieldBgColor};
${fieldTypoStylesDesktop}
${fieldPaddingStylesDesktop}
${fieldBDShadowDesktop}
}
.eb-form-wrapper.${parentBlockId} .eb-email-field-wrapper.${blockId} .eb-field-input::placeholder {
color: ${fieldPlaceholderColor};
}
.eb-form-wrapper.${parentBlockId} .eb-email-field-wrapper.${blockId}.eb-validation-error .eb-form-validation {
${fieldValidationTypoStylesDesktop}
color: ${fieldValidationColor};
}
.eb-form-wrapper.${parentBlockId} .eb-email-field-wrapper.${blockId}.eb-validation-error .eb-field-input {
border-color: ${fieldValidationBorderColor};
}
`;
const fieldTab = `
.eb-form-wrapper.${parentBlockId} .eb-email-field-wrapper.${blockId} .eb-field-input {
${fieldTypoStylesTab}
${fieldPaddingStylesTab}
${fieldBDShadowTab}
}
.eb-form-wrapper.${parentBlockId} .eb-email-field-wrapper.${blockId}.eb-validation-error .eb-form-validation {
${fieldValidationTypoStylesTab}
}
`;
const fieldMobile = `
.eb-form-wrapper.${parentBlockId} .eb-email-field-wrapper.${blockId} .eb-field-input {
${fieldTypoStylesTab}
${fieldPaddingStylesTab}
${fieldBDShadowTab}
}
.eb-form-wrapper.${parentBlockId} .eb-email-field-wrapper.${blockId}.eb-validation-error .eb-form-validation {
${fieldValidationTypoStylesTab}
}
`;
const iconDesktop = `
.eb-form-wrapper.${parentBlockId} .eb-email-field-wrapper.${blockId} .eb-input-icon {
${iconSizeStylesDesktop}
color: ${iconColor ? iconColor : parentIconColor};
}
${isIcon
? `
.eb-form-wrapper.${parentBlockId} .eb-email-field-wrapper.${blockId} .eb-input-icon {
left: ${fieldPaddingLeft
? fieldPaddingLeft
: parentBlockPaddingLeft
}${fieldPaddingUnit};
}
.eb-form-wrapper.${parentBlockId} .eb-email-field-wrapper.${blockId} .eb-field-input {
padding-left: calc(${iconSizeRange ? iconSizeRange : parentBlockIconSize
}px + (${fieldPaddingLeft
? fieldPaddingLeft
: parentBlockPaddingLeft == 0
? 8
: parentBlockPaddingLeft
}${fieldPaddingUnit
? fieldPaddingUnit
: parentBlockPaddingUnit
} * 1.6));
}`
: ""
}
`;
// all css styles for large screen width (desktop/laptop) in strings ⬇
const desktopAllStyles = softMinifyCssStrings(`
${wrapperStylesDesktop}
${labelDesktop}
${fieldDesktop}
${iconDesktop}
`);
// all css styles for Tab in strings ⬇
const tabAllStyles = softMinifyCssStrings(`
${wrapperStylesTab}
${labelTab}
${fieldTab}
`);
// all css styles for Mobile in strings ⬇
const mobileAllStyles = softMinifyCssStrings(`
${wrapperStylesMobile}
${labelMobile}
${fieldMobile}
`);
return (
<>
>
);
}