window.mailgo=function(e){var t={};function a(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)a.d(n,o,function(t){return e[t]}.bind(null,o));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=4)}([function(e){e.exports=JSON.parse('{"languages":["en","it"],"translations":{"en":{"open_in":"open in ","cc_":"cc ","bcc_":"bcc ","subject_":"subject ","body_":"body ","gmail":"Gmail","outlook":"Outlook","telegram":"Telegram","whatsapp":"WhatsApp","skype":"Skype","call":"call","open":"open","_default":" default","_as_default":" as default","copy":"copy"},"it":{"open_in":"apri con ","cc":"cc ","bcc":"ccn ","subject":"oggetto ","body":"testo ","gmail":"Gmail","outlook":"Outlook","telegram":"Telegram","whatsapp":"WhatsApp","skype":"Skype","call":"chiama","open":"apri","_default":" ","_as_default":" ","copy":"copia"}}}')},function(e,t,a){var n=a(2);e.exports="string"==typeof n?n:n.toString()},function(e,t,a){(t=a(3)(!1)).push([e.i,'.m-modal{position:fixed;top:0;right:0;bottom:0;left:0;justify-content:center;align-items:center;flex-direction:column;overflow:hidden;font-size:15px;z-index:10000}.m-modal p,.m-modal span,.m-modal strong,.m-modal a{margin:0;padding:0;font-size:100%;line-height:1;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";text-rendering:optimizeLegibility}.m-modal strong{font-weight:700}.m-modal .m-modal-back{position:absolute;z-index:10001;top:0;right:0;bottom:0;left:0;background-color:rgba(217,217,217,0.75);opacity:0.8}.m-modal .m-modal-content{position:relative;z-index:10002;box-sizing:content-box;text-align:center;min-width:200px;max-width:240px;background-color:#fff;opacity:0.97;border-radius:20px;box-shadow:30px -30px 60px #d9d9d9, -30px 30px 60px #ffffff;color:#4a4a4a;display:flex;flex-direction:column;overflow:auto;padding:24px;transition:0.5s box-shadow}.m-modal .m-modal-content:hover{opacity:1;box-shadow:30px -30px 60px #d9d9d9, -30px 30px 60px #ffffff}.m-modal .m-modal-content .m-title{margin-bottom:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.m-modal .m-modal-content .m-details{margin-bottom:10px}.m-modal .m-modal-content .m-details p{font-size:12px;margin-top:3px;margin-bottom:3px}.m-modal .m-modal-content a{padding:10px;color:#4a4a4a;border-radius:20px;text-decoration:none}.m-modal .m-modal-content a.m-gmail{color:#d44638}.m-modal .m-modal-content a.m-gmail:hover{background-color:rgba(212,70,56,0.08);color:#d44638}.m-modal .m-modal-content a.m-outlook{color:#0072c6}.m-modal .m-modal-content a.m-outlook:hover{background-color:rgba(0,114,198,0.08);color:#0072c6}.m-modal .m-modal-content a.m-tg{color:#08c}.m-modal .m-modal-content a.m-tg:hover{background-color:rgba(0,114,198,0.08);color:#08c}.m-modal .m-modal-content a.m-wa{color:#00bfa5}.m-modal .m-modal-content a.m-wa:hover{background-color:rgba(0,191,165,0.08);color:#00bfa5}.m-modal .m-modal-content a.m-skype{color:#00aff0}.m-modal .m-modal-content a.m-skype:hover{background-color:rgba(0,175,240,0.08);color:#00aff0}.m-modal .m-modal-content a.m-copy{padding:16px 10px;font-size:16px}.m-modal .m-modal-content a.m-default:hover,.m-modal .m-modal-content a.m-copy:hover{background-color:rgba(0,0,0,0.08);color:#4a4a4a}.m-modal .m-modal-content a.m-by{font-size:8px;margin-top:0.8rem;padding:5px;color:#4a4a4a;opacity:0.5}.m-modal .m-modal-content a.m-by:hover{opacity:1}.m-modal .m-modal-content .w-500{font-weight:500}\n',""]),e.exports=t},function(e,t,a){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var a=function(e,t){var a=e[1]||"",n=e[3];if(!n)return a;if(t&&"function"==typeof btoa){var o=(d=n,l=btoa(unescape(encodeURIComponent(JSON.stringify(d)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(l),"/*# ".concat(c," */")),i=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[a].concat(i).concat([o]).join("\n")}var d,l,c;return[a].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(a,"}"):a})).join("")},t.i=function(e,a,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:"mail",t=arguments.length>1?arguments[1]:void 0;if("mail"===e){if(t.href&&t.href.toLowerCase().startsWith(L)){N=decodeURIComponent(t.href.split("?")[0].split(L)[1].trim());var a=new URL(t.href).searchParams;R=a.get("cc"),U=a.get("bcc"),I=a.get("subject"),M=a.get("body")}else N=t.getAttribute("data-address")+"@"+t.getAttribute("data-domain"),new URL(L+encodeURIComponent(N)),R=t.getAttribute("data-cc-address")+"@"+t.getAttribute("data-cc-domain"),U=t.getAttribute("data-bcc-address")+"@"+t.getAttribute("data-bcc-domain"),I=t.getAttribute("data-subject"),M=t.getAttribute("data-body");if(!se(N.split(",")))return;R&&!se(R.split(","))&&(R=""),U&&!se(U.split(","))&&(U=""),n.innerHTML=N.split(",").join("
"),R?(i.style.display="block",r.innerHTML=R.split(",").join("
")):i.style.display="none",U?(d.style.display="block",s.innerHTML=U.split(",").join("
")):d.style.display="none",I?(l.style.display="block",p.textContent=I):l.style.display="none",M?(c.style.display="block",m.textContent=M):c.style.display="none",u.addEventListener("click",H),f.addEventListener("click",D),S=oe(N),h.addEventListener("click",B),C.addEventListener("click",(function(){return $(N)}))}"tel"===e&&(t.href&&t.href.toLowerCase().startsWith(_)?z=decodeURIComponent(t.href.split("?")[0].split(_)[1].trim()):t.href&&t.href.toLowerCase().startsWith(j)?z=decodeURIComponent(t.href.split("?")[0].split(j)[1].trim()):t.hasAttribute("data-tel")&&(z=t.getAttribute("data-tel"),t.getAttribute("data-msg")),t.hasAttribute("data-telegram")&&(O=t.getAttribute("data-telegram")),t.hasAttribute("data-skype")&&(T=t.getAttribute("data-skype")),o.innerHTML=z,b.addEventListener("click",Z),O&&(le("m-tg","block"),g.addEventListener("click",G)),v.addEventListener("click",J),y.addEventListener("click",F),w.addEventListener("click",(function(){return $(z)}))),V(e),document.addEventListener("keydown",Q)},H=function(){var e="https://mail.google.com/mail/u/0/?view=cm&source=mailto&to="+encodeURIComponent(N);R&&(e=e.concat("&cc="+encodeURIComponent(R))),U&&(e=e.concat("&bcc="+encodeURIComponent(U))),I&&(e=e.concat("&subject="+I)),M&&(e=e.concat("&body="+M)),window.open(e,"_blank"),X()},D=function(){var e="https://outlook.live.com/owa/?path=/mail/action/compose&to="+encodeURIComponent(N);I&&(e=e.concat("&subject="+I)),M&&(e=e.concat("&body="+M)),window.open(e,"_blank"),X()},B=function(){ne(S),X()},G=function(){var e="https://t.me/"+O;window.open(e,"_blank"),X()},J=function(){var e="skype:"+(""!==T?T:z);window.open(e,"_blank"),X()},Z=function(){var e="https://wa.me/"+z;window.open(e,"_blank"),X()},F=function(){var e="tel:"+z;window.open(e),X()},$=function(e){var t;pe(e),(t=Y("mail")?C:w).textContent="copied",setTimeout((function(){t.textContent="copy",X()}),999)},q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mail",a=e.href;return"mail"===t?a&&a.toLowerCase().startsWith(L)&&!e.classList.contains("no-mailgo")||e.hasAttribute("data-address")&&(a&&"#mailgo"===e.getAttribute("href").toLowerCase()||e.classList&&e.classList.contains("mailgo")):"tel"===t&&(a&&(a.toLowerCase().startsWith(_)||a.toLowerCase().startsWith(j))&&!e.classList.contains("no-mailgo")||e.hasAttribute("data-tel")&&a&&"#mailgo"===e.getAttribute("href").toLowerCase()||e.classList&&e.classList.contains("mailgo"))},K=function(e){if(document.contains(ie("mailgo"))&&document.contains(ie("mailgo-tel"))){if(Y("mail")||Y("tel"))return!1;var t=e.composedPath&&e.composedPath()||ce(e.target);return t&&t.forEach((function(t){return!(t instanceof HTMLDocument||t instanceof Window)&&(q(t,"mail")?(e.preventDefault(),P("mail",t),!0):q(t,"tel")?(e.preventDefault(),P("tel",t),!0):void 0)})),!1}},Q=function(e){if(Y("mail"))switch(e.keyCode){case 27:X();break;case 71:H();break;case 79:D();break;case 32:case 13:B();break;case 67:$(N);break;default:return}else if(Y("tel"))switch(e.keyCode){case 27:X();break;case 84:G();break;case 87:Z();break;case 32:case 13:F();break;case 67:$(z);break;default:return}},V=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mail";return"mail"===e?(le("mailgo","flex"),!0):"tel"===e&&(le("mailgo-tel","flex"),!0)},X=function(){le("mailgo","none"),le("mailgo-tel","none"),document.removeEventListener("keydown",Q)},Y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mail";return"mail"===e?"flex"===de("mailgo"):"tel"===e&&"flex"===de("mailgo-tel")},ee=function(){var e=te("a");return e.href="https://mailgo.js.org?ref=mailgo-modal",e.className="m-by",e.target="_blank",e.rel="noopener noreferrer",e.appendChild(ae("mailgo.js.org")),e},te=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div";return document.createElement(e)},ae=function(e){return document.createTextNode(e)},ne=function(e){return window.location.href=L+atob(e)},oe=function(e){return btoa(e)},ie=function(e){return document.getElementById(e)},de=function(e){return ie(e).style.display},le=function(e,t){return ie(e).style.display=t},ce=function(e){for(var t=[];e;){if(t.push(e),"HTML"===e.tagName)return t.push(document),t.push(window),t;e=e.parentElement}},re=function(e){return/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},se=function(e){return e.every(re)},pe=function(e){var t=te("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t);var a=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);return t.select(),document.execCommand("copy"),document.body.removeChild(t),!!a&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(a),!0)},me=function(e){var t;window&&"undefined"!=typeof window&&((t=te("style")).id="mailgo-style",t.type="text/css",t.appendChild(ae(x)),document.head.appendChild(t),(null==e?void 0:e.initEvent)?document.addEventListener(e.initEvent,(function(){W(e)})):W(e))};me({initEvent:"DOMContentLoaded"})}]); //# sourceMappingURL=mailgo.min.js.map