-
Notifications
You must be signed in to change notification settings - Fork 0
/
6.f9abb8de478541160b4e.js
1 lines (1 loc) · 11.1 KB
/
6.f9abb8de478541160b4e.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{D5Hz:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmailJSResponseStatus=e.sendForm=e.send=e.init=void 0;var r=n("MkV5");Object.defineProperty(e,"EmailJSResponseStatus",{enumerable:!0,get:function(){return r.EmailJSResponseStatus}});var o=n("USkh"),a=null,s="https://api.emailjs.com";function i(t,e,n){return void 0===n&&(n={}),new Promise((function(o,a){var s=new XMLHttpRequest;for(var i in s.addEventListener("load",(function(t){var e=new r.EmailJSResponseStatus(t.target);200===e.status||"OK"===e.text?o(e):a(e)})),s.addEventListener("error",(function(t){a(new r.EmailJSResponseStatus(t.target))})),s.open("POST",t,!0),n)s.setRequestHeader(i,n[i]);s.send(e)}))}function c(t){var e=document&&document.getElementById("g-recaptcha-response");return e&&e.value&&(t["g-recaptcha-response"]=e.value),e=null,t}function l(t,e){a=t,s=e||"https://api.emailjs.com"}function b(t,e,n,r){var o={lib_version:"2.6.3",user_id:r||a,service_id:t,template_id:e,template_params:c(n)};return i(s+"/api/v1.0/email/send",JSON.stringify(o),{"Content-type":"application/json"})}function m(t,e,n,r){var c;if("string"==typeof n&&(n=document.querySelector("#"!==(c=n)[0]?"#"+c:c)),!n||"FORM"!==n.nodeName)throw"Expected the HTML form element or the style selector of form";o.UI.progressState(n);var l=new FormData(n);return l.append("lib_version","2.6.3"),l.append("service_id",t),l.append("template_id",e),l.append("user_id",r||a),i(s+"/api/v1.0/email/send-form",l).then((function(t){return o.UI.successState(n),t}),(function(t){return o.UI.errorState(n),Promise.reject(t)}))}e.init=l,e.send=b,e.sendForm=m,e.default={init:l,send:b,sendForm:m}},MkV5:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmailJSResponseStatus=void 0,e.EmailJSResponseStatus=function(t){this.status=t.status,this.text=t.responseText}},USkh:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UI=void 0;var r=function(){function t(){}return t.clearAll=function(t){t.classList.remove(this.PROGRESS),t.classList.remove(this.DONE),t.classList.remove(this.ERROR)},t.progressState=function(t){this.clearAll(t),t.classList.add(this.PROGRESS)},t.successState=function(t){t.classList.remove(this.PROGRESS),t.classList.add(this.DONE)},t.errorState=function(t){t.classList.remove(this.PROGRESS),t.classList.add(this.ERROR)},t.PROGRESS="emailjs-sending",t.DONE="emailjs-success",t.ERROR="emailjs-error",t}();e.UI=r},YBVt:function(t,e,n){"use strict";n.r(e),n.d(e,"ContactsModule",(function(){return w}));var r=n("ofXK"),o=n("3Pt+"),a=n("D5Hz"),s=n.n(a),i=n("fXoL"),c=n("nak+"),l=n("sYmb"),b=n("zFfM"),m=n("NlAO"),u=n("+4Um"),d=n("GXNF"),f=n("f3AP");function p(t,e){if(1&t&&(i.Tb(0,"span"),i.Fc(1),i.fc(2,"translate"),i.Sb()),2&t){const t=e.$implicit,n=i.ec(2);i.jc("@fadeInOut",void 0),i.Bb(1),i.Hc(" ",i.gc(2,2,n.key+t)," ")}}function g(t,e){if(1&t&&(i.Tb(0,"div",4),i.Dc(1,p,3,4,"span",5),i.Sb()),2&t){const t=i.ec();i.jc("@fadeInOut",void 0),i.Bb(1),i.jc("ngForOf",t.errors)}}let v=(()=>{class t{constructor(){this.key="errors.",this.readonly=!1,this.type="text"}ngOnInit(){}get invalid(){var t,e;return(null===(t=this.control)||void 0===t?void 0:t.touched)&&(null===(e=this.control)||void 0===e?void 0:e.invalid)}get errors(){return Object.keys(this.control.errors)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Hb({type:t,selectors:[["app-input"]],inputs:{control:"control",name:"name",label:"label",placeholder:"placeholder",readonly:"readonly",type:"type"},decls:5,vars:10,consts:[[1,"form__control"],["type","text",3,"formControl","id","name"],[3,"for"],["class","form__error-msg",4,"ngIf"],[1,"form__error-msg"],[4,"ngFor","ngForOf"]],template:function(t,e){1&t&&(i.Tb(0,"div",0),i.Ob(1,"input",1),i.Tb(2,"label",2),i.Fc(3),i.Sb(),i.Dc(4,g,2,2,"div",3),i.Sb()),2&t&&(i.Fb("invalid",e.invalid),i.Bb(1),i.Fb("has-value",null==e.control?null:e.control.value),i.kc("id",e.name),i.jc("formControl",e.control)("name",e.name),i.Bb(1),i.kc("for",e.name),i.Bb(1),i.Gc(e.label),i.Bb(1),i.jc("ngIf",e.invalid))},directives:[o.c,o.j,o.e,r.k,r.j],pipes:[l.c],styles:[""],data:{animation:[f.a]}}),t})();function h(t,e){if(1&t&&(i.Tb(0,"span"),i.Fc(1),i.fc(2,"translate"),i.Sb()),2&t){const t=e.$implicit,n=i.ec(2);i.jc("@fadeInOut",void 0),i.Bb(1),i.Hc(" ",i.gc(2,2,n.key+t)," ")}}function S(t,e){if(1&t&&(i.Tb(0,"div",4),i.Dc(1,h,3,4,"span",5),i.Sb()),2&t){const t=i.ec();i.jc("@fadeInOut",void 0),i.Bb(1),i.jc("ngForOf",t.errors)}}let y=(()=>{class t{constructor(){this.key="errors.",this.readonly=!1,this.type="text"}ngOnInit(){}get invalid(){var t,e;return(null===(t=this.control)||void 0===t?void 0:t.touched)&&(null===(e=this.control)||void 0===e?void 0:e.invalid)}get errors(){return Object.keys(this.control.errors)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Hb({type:t,selectors:[["app-textarea"]],inputs:{control:"control",name:"name",label:"label",placeholder:"placeholder",readonly:"readonly",type:"type"},decls:5,vars:10,consts:[[1,"form__control"],["type","text","rows","5",3,"formControl","id","name"],[3,"for"],["class","form__error-msg",4,"ngIf"],[1,"form__error-msg"],[4,"ngFor","ngForOf"]],template:function(t,e){1&t&&(i.Tb(0,"div",0),i.Ob(1,"textarea",1),i.Tb(2,"label",2),i.Fc(3),i.Sb(),i.Dc(4,S,2,2,"div",3),i.Sb()),2&t&&(i.Fb("invalid",e.invalid),i.Bb(1),i.Fb("has-value",null==e.control?null:e.control.value),i.kc("id",e.name),i.jc("formControl",e.control)("name",e.name),i.Bb(1),i.kc("for",e.name),i.Bb(1),i.Gc(e.label),i.Bb(1),i.jc("ngIf",e.invalid))},directives:[o.c,o.j,o.e,r.k,r.j],pipes:[l.c],styles:[""],data:{animation:[f.a]}}),t})();var j=n("Xa2L");function O(t,e){1&t&&(i.Tb(0,"div",25),i.Ob(1,"mat-spinner",26),i.Sb()),2&t&&(i.Bb(1),i.jc("diameter",50))}function k(t,e){if(1&t){const t=i.Ub();i.Tb(0,"form",14),i.ac("ngSubmit",(function(e){return i.uc(t),i.ec().onSubmit(e)})),i.Tb(1,"div",15),i.Tb(2,"div",4),i.Tb(3,"div",16),i.Ob(4,"app-input",17),i.fc(5,"translate"),i.Sb(),i.Tb(6,"div",16),i.Ob(7,"app-input",18),i.fc(8,"translate"),i.Sb(),i.Sb(),i.Ob(9,"app-input",19),i.fc(10,"translate"),i.Ob(11,"app-input",20),i.fc(12,"translate"),i.Ob(13,"app-textarea",21),i.fc(14,"translate"),i.Tb(15,"p",22),i.Tb(16,"button",23),i.Fc(17),i.fc(18,"translate"),i.Sb(),i.Sb(),i.Sb(),i.Dc(19,O,2,1,"div",24),i.Sb()}if(2&t){const t=i.ec();i.jc("formGroup",t.form),i.Bb(1),i.Fb("blur",t.isLoading),i.Bb(3),i.jc("control",t.getControl("firstName"))("label",i.gc(5,15,t.key+"firstName")),i.Bb(3),i.jc("control",t.getControl("lastName"))("label",i.gc(8,17,t.key+"lastName")),i.Bb(2),i.jc("control",t.getControl("email"))("label",i.gc(10,19,t.key+"email")),i.Bb(2),i.jc("control",t.getControl("subject"))("label",i.gc(12,21,t.key+"subject")),i.Bb(2),i.jc("control",t.getControl("message"))("label",i.gc(14,23,t.key+"message")),i.Bb(4),i.Gc(i.gc(18,25,"buttons.sendMessage")),i.Bb(2),i.jc("ngIf",t.isLoading)}}let T=(()=>{class t extends class{constructor(t){this.fb=t}getControl(t){return this.form.get(t)}getGroup(t){return this.form.get(t)}getControlSubGroup(t,e){var n;return null===(n=this.form.get(e))||void 0===n?void 0:n.get(t)}getArray(t){return this.form.get(t)}}{constructor(t,e,n){super(t),this.notifications=e,this.translate=n,this.key="contacts."}ngOnInit(){this.initForm()}initForm(){this.form=this.fb.group({firstName:["",o.n.required],lastName:"",email:["",[o.n.required,o.n.email]],subject:["",o.n.required],message:["",o.n.required]})}onSubmit(t){if(this.form.invalid)return this.form.markAllAsTouched(),void this.notifications.error(this.translate.instant("errors.fill"));this.isLoading=!0,s.a.sendForm("gmail","template_vvSsQ1IF",t.target,"user_F4xt470VP5Pm9qTAtpIUx").then(t=>{this.notifications.success(this.translate.instant(this.key+"success")),this.isLoading=!1,this.form.reset()},t=>{this.notifications.error(this.translate.instant("errors.something")),this.isLoading=!1,console.error(t.text)})}}return t.\u0275fac=function(e){return new(e||t)(i.Nb(o.d),i.Nb(c.a),i.Nb(l.d))},t.\u0275cmp=i.Hb({type:t,selectors:[["app-contacts"]],features:[i.yb],decls:37,vars:31,consts:[["id","contact",1,"page-section"],[3,"imageUrl","title","subtitle"],[1,"section-content","pb-0"],[1,"container","pb-2","pb-md-3","pb-lg-4"],[1,"row"],[1,"col-lg-8","col-md-10","col-12","mx-auto"],["wmAnimate","fadeInUp","speed","faster","delay","250ms","aos","","once","",1,"section-title","text-center"],["id","contact-form","class","form mt-4 mt-md-5",3,"formGroup","ngSubmit",4,"ngIf"],[1,"inner-section","has-sm-padding","has-lighter-bg","mt-5"],[1,"container"],["wmAnimate","fadeInUp","speed","faster","delay","250ms","aos","","once","",1,"col-md-4","col-12","text-center","mb-5","mb-md-0"],[1,"small-title"],["target","_blank",3,"href"],["wmAnimate","fadeInUp","speed","faster","delay","250ms","aos","","once","",1,"col-md-4","col-12","text-center"],["id","contact-form",1,"form","mt-4","mt-md-5",3,"formGroup","ngSubmit"],["wmAnimate","fadeInUp","speed","faster","delay","250ms","aos","","once","",1,"holder"],[1,"col-sm-6"],["name","firstName",3,"control","label"],["name","lastName",3,"control","label"],["type","email","name","email",3,"control","label"],["name","subject",3,"control","label"],["name","message",3,"control","label"],[1,"submit","text-center"],["type","submit",1,"btn","btn-outline-light","btn-lg","pj-btn"],["class","form__overlay",4,"ngIf"],[1,"form__overlay"],["color","warn",3,"diameter"]],template:function(t,e){1&t&&(i.Tb(0,"section",0),i.Ob(1,"app-section-header",1),i.fc(2,"translate"),i.fc(3,"translate"),i.fc(4,"translate"),i.Tb(5,"div",2),i.Tb(6,"div",3),i.Tb(7,"div",4),i.Tb(8,"div",5),i.Tb(9,"h3",6),i.Fc(10,"Let's talk or just say Hello"),i.Sb(),i.Dc(11,k,20,27,"form",7),i.Sb(),i.Sb(),i.Sb(),i.Tb(12,"div",8),i.Tb(13,"div",9),i.Tb(14,"div",4),i.Tb(15,"div",10),i.Tb(16,"h3",11),i.Fc(17),i.fc(18,"translate"),i.Sb(),i.Tb(19,"a",12),i.fc(20,"translate"),i.Fc(21),i.fc(22,"translate"),i.Sb(),i.Sb(),i.Tb(23,"div",10),i.Tb(24,"h3",11),i.Fc(25),i.fc(26,"translate"),i.Sb(),i.Tb(27,"a",12),i.fc(28,"translate"),i.Fc(29),i.fc(30,"translate"),i.Sb(),i.Sb(),i.Tb(31,"div",13),i.Tb(32,"h3",11),i.Fc(33),i.fc(34,"translate"),i.Sb(),i.Ob(35,"app-social-networks"),i.Sb(),i.Sb(),i.Sb(),i.Sb(),i.Sb(),i.Ob(36,"app-footer"),i.Sb()),2&t&&(i.Bb(1),i.jc("imageUrl",i.gc(2,11,e.key+"imageUrl"))("title",i.gc(3,13,e.key+"title"))("subtitle",i.gc(4,15,e.key+"subtitle")),i.Bb(10),i.jc("ngIf",e.form),i.Bb(6),i.Gc(i.gc(18,17,e.key+"telTitle")),i.Bb(2),i.lc("href","tel:",i.gc(20,19,e.key+"telValue"),"",i.wc),i.Bb(2),i.Gc(i.gc(22,21,e.key+"telLabel")),i.Bb(4),i.Gc(i.gc(26,23,e.key+"emailTitle")),i.Bb(2),i.lc("href","mailto:",i.gc(28,25,e.key+"emailValue"),"",i.wc),i.Bb(2),i.Gc(i.gc(30,27,e.key+"emailValue")),i.Bb(4),i.Gc(i.gc(34,29,e.key+"socialNetworksTitle")))},directives:[b.a,m.a,r.k,u.a,d.a,o.o,o.k,o.f,v,y,j.b],pipes:[l.c],styles:[".text-center[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;justify-content:center}"]}),t})();var _=n("tyNb"),F=n("HUga");let B=(()=>{class t{}return t.\u0275mod=i.Lb({type:t}),t.\u0275inj=i.Kb({factory:function(e){return new(e||t)},imports:[[r.c,o.m,F.a],o.m]}),t})();const R=[{path:"",pathMatch:"full",component:T}];let w=(()=>{class t{}return t.\u0275mod=i.Lb({type:t}),t.\u0275inj=i.Kb({factory:function(e){return new(e||t)},imports:[[r.c,_.d.forChild(R),F.a,B,m.c]]}),t})()}}]);