(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{1425:function(t,e,a){"use strict";var n=a(1);Object.defineProperty(e,"__esModule",{value:!0}),e.validateIPRangeList=e.validateDomain=e.validatePassword=e.validateSubdomain=e.validateUsername=e.validateDBUser=e.validateDatabase=e.validateDNSName=e.validateMXValue=e.validateDNSValue=e.validateFTP=e.validateEmail=e.validateForwarder=void 0;var r=n(a(30)),i=n(a(36)),o=n(a(1426)),s=r.default.get({url:"/CMD_JSON_VALIDATE",schema:{value:r.default.REQUIRED_STRING},response:{valid:!0,message:""},mapResponse:{valid:o.default.isValid,message:o.default.getMessage}}),l=s.extend({id:"VALIDATE_FORWARDER",params:{type:"forwarder",ignore_system_default:!0}});e.validateForwarder=l;var u=s.extend({id:"VALIDATE_EMAIL",params:{type:"email",check_mailing_list:!0},schema:{check_exists:{type:Boolean,required:!1,default:!0}}});e.validateEmail=u;var d=s.extend({id:"VALIDATE_FTP",params:{type:"ftp"},domain:!0});e.validateFTP=d;var c=s.extend({params:{type:"dns"},domain:!0,schema:{record:r.default.REQUIRED_STRING}}),p=c.extend({id:"VALIDATE_DNS_VALUE",params:{check:"value",name:!0},domain:!0,schema:{value:r.default.REQUIRED_STRING}});e.validateDNSValue=p;var f=p.extend({id:"VALIDATE_MX_VALUE",params:{record:"MX"},before:function(t){return{value:"10",mx_value:t.value}}});e.validateMXValue=f;var m=c.extend({id:"VALIDATE_DNS_NAME",params:{check:"name",value:!0,mx_value:!0},schema:{name:r.default.REQUIRED_STRING,value:null}});e.validateDNSName=m;var v=s.extend({id:"VALIDATE_DATABASE",params:{type:"dbname"}});e.validateDatabase=v;var h=s.extend({id:"VALIDATE_DATABASE_USER",params:{type:"dbusername"}});e.validateDBUser=h;var _=s.extend({id:"VALIDATE_USERNAME",params:{type:"username"}});e.validateUsername=_;var b=s.extend({id:"VALIDATE_SUBDOMAIN",domain:!0,params:{type:"subdomain"}});e.validateSubdomain=b;var x=s.extend({id:"VALIDATE_PASSWORD",params:{type:"password"}});e.validatePassword=x;var R=s.extend({id:"VALIDATE_DOMAIN",params:{type:"domain"},before:function(t){var e=t.value;return{value:i.default.toASCII(e)}}});e.validateDomain=R;var y=s.extend({id:"VALIDATE_IP_RANGE_LIST",params:{type:"ip_range_list"}});e.validateIPRangeList=y},1426:function(t,e,a){"use strict";a.r(e);var n=a(35);e.default={isValid:function(t){return void 0===t.error},getMessage:function(t){return Object(n.toAppHtml)(t.error||"")}}},1482:function(t,e,a){"use strict";var n=a(10),r=a(1);Object.defineProperty(e,"__esModule",{value:!0}),e.setMxTemplate=e.setLocalMailStatus=e.editRecord=e.addRecord=e.deleteRecords=e.getMXRecords=e.updateAdminTTL=e.updateTTL=e.getAdminRecords=e.getRecords=void 0;var i=r(a(17)),o=r(a(20)),s=r(a(2)),l=r(a(30)),u=a(11),d=a(13),c=n(a(2498));function p(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function f(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return["NS","CNAME"].includes(a)&&(e=this.$p6e.toU(e)),"MX"===a&&(e=e.split(" ").map(this.$p6e.toU).join(" ")),e.length>50&&n?this.strToChunks(e,10):e},getCopyString:function(t,e){e.clipboardData.setData("text/plain",this.getValueString(t,!1)),e.preventDefault()},loadRecords:(v=(0,o.default)(i.default.mark((function t(){return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.$emit("rows:update"),this.checkedRecords=[];case 2:case"end":return t.stop()}}),t,this)}))),function(){return v.apply(this,arguments)}),updateRecord:(m=(0,o.default)(i.default.mark((function t(e){var a;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,s.editRecord)(c({},Object.assign({},e),{ptr:this.pointer,domain:this.domain}));case 2:a=t.sent,this.$notify({theme:a.success?"safe":"danger",title:a.success?this.$gettext("Domain record was updated successfully"):this.$gettext("Request failed")}),a.success&&this.loadRecords();case 5:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)}),addRecord:(f=(0,o.default)(i.default.mark((function t(e){return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,s.addRecord)(c({},e,{domain:this.domain,ptr_val:this.pointer}));case 2:t.sent&&this.loadRecords();case 4:case"end":return t.stop()}}),t,this)}))),function(t){return f.apply(this,arguments)}),deleteRecords:(p=(0,o.default)(i.default.mark((function t(){return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,s.deleteRecords)({records:this.checkedRecords,ptr:this.pointer,domain:this.domain,affect_pointers:this.hasAffectPointers?this.ap:null});case 2:t.sent&&(this.checkedRecords=[],this.loadRecords());case 4:case"end":return t.stop()}}),t,this)}))),function(){return p.apply(this,arguments)}),editRecord:function(t){this.editableRecord=t,this.$dialog("EDIT_DNS_RECORD_DIALOG").open()}}};e.default=h},1629:function(t,e,a){"use strict";a.r(e);var n=a(1630),r=a.n(n);for(var i in n)"default"!==i&&function(t){a.d(e,t,(function(){return n[t]}))}(i);e.default=r.a},1630:function(t,e,a){"use strict";var n=a(1);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i,o,s,l,u=n(a(15)),d=n(a(16)),c=a(1425),p=a(2284),f={type:Boolean,required:!1,default:!1},m={props:{only:{type:String,default:""},domain:{type:String,required:!0},dns_spf:f,dns_ds:f,dns_tlsa:f,dns_caa:f,full_mx_records:f,pointer:{type:[String,Object],required:!1,default:null},showTTL:{type:Boolean,required:!1,default:!1},disableTTL:{type:Boolean,required:!1,default:!1},affectPointers:{type:Object,required:!1,default:function(){return{show:!1,default:!1}}}},data:function(){return{type:this.only||"A",name:"",value:"",mxValue:"",ttl:"",txtType:"plain",ap:this.affectPointers.default}},api:[{command:c.validateDNSName,bind:"dnsName"},{command:c.validateDNSValue,bind:"dnsValue"},{command:c.validateMXValue,bind:"mxValue"}],commands:{validate:{dnsName:c.validateDNSName,dnsValue:c.validateDNSValue,mxValue:c.validateMXValue}},computed:{requestData:function(){return{type:this.type,name:this.$p6e.toA(this.name),domain:this.domain,value:"TXT"===this.type?this.value:this.$p6e.toA(this.value),mx_value:this.$p6e.toA(this.mxValue),ttl:this.ttl||null,affect_pointers:this.affectPointers?this.ap:null}},allowedRecordTypes:function(){var t=["A","NS","MX","CNAME","PTR","TXT","SRV","AAAA"];return this.dns_spf&&t.push("SPF"),this.dns_ds&&t.push("DS"),this.dns_tlsa&&t.push("TLSA"),this.dns_caa&&t.push("CAA"),t},defaultName:function(){return this.$p6e.toU("".concat(this.pointer||this.domain,"."))},defaultTTL:function(){try{return this.$state.commands.DNS_RECORDS.response.ttl.value||this.$state.commands.DNS_RECORDS.response.ttl.default}catch(t){return"14400"}},mxRecordsPage:function(){return"MX"===this.type},fqdnName:function(){return this.makeFQDN(this.name)},fqdnValue:function(){return!!["CNAME","MX","NS","PTR"].includes(this.type)&&this.makeFQDN("MX"===this.type?this.mxValue:this.value)},txtGeneratorComponent:function(){return"TXT"===this.type&&"plain"!==this.txtType&&p.editors[this.txtType]},spfValid:function(){return this.$store.getters["validation/isValid"]("spf-record")}},watch:{type:function(){this.setVars()},txtType:function(t){"dmarc"===t&&(this.name="_dmarc")}},created:function(){this.setVars()},methods:{makeFQDN:function(t){return!(!t||"."===t[t.length-1])&&"".concat(t,".").concat(this.$p6e.toU(this.domain))},setVars:(l=(0,d.default)(u.default.mark((function t(){return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.ap=this.affectPointers.default,this.showTTL&&(this.ttl=this.defaultTTL),t.t0=this.type,t.next="MX"===t.t0?5:"NS"===t.t0?8:"TXT"===t.t0?8:"CNAME"===t.t0?12:15;break;case 5:return this.name=this.defaultName,this.value="10",t.abrupt("break",18);case 8:return this.value="",this.name=this.defaultName,"dmarc"===this.txtType&&(this.name="_dmarc"),t.abrupt("break",18);case 12:return this.name="",this.value=this.defaultName,t.abrupt("break",18);case 15:this.name="",this.value="",this.mxValue="";case 18:this.$store.commit("validation/TOUCH_GROUP_INPUTS","addRecord");case 19:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)}),submit:(s=(0,d.default)(u.default.mark((function t(){return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.$emit("submit",Object.assign({},this.requestData)),this.setVars();case 2:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)}),validateDnsRecordName:(o=(0,d.default)(u.default.mark((function t(e){var a,n;return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return",!0);case 2:return t.next=4,(0,c.validateDNSName)({record:this.type,domain:this.domain,pointer:this.pointer,name:this.$p6e.toA(e)});case 4:return a=t.sent,n=a.valid,t.abrupt("return",n);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)}),validateDnsRecordValue:(i=(0,d.default)(u.default.mark((function t(e){var a,n;return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&"MX"!==this.type){t.next=2;break}return t.abrupt("return",!0);case 2:return t.next=4,(0,c.validateDNSValue)({record:this.type,domain:this.domain,pointer:this.pointer,value:e});case 4:return a=t.sent,n=a.valid,t.abrupt("return",n);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)}),validateMxRecordValue:(r=(0,d.default)(u.default.mark((function t(e){var a,n;return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&"MX"===this.type&&this.full_mx_records){t.next=2;break}return t.abrupt("return",!0);case 2:return t.next=4,(0,c.validateMXValue)({domain:this.domain,pointer:this.pointer,value:e});case 4:return a=t.sent,n=a.valid,t.abrupt("return",n);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})}};e.default=m},1631:function(t,e,a){"use strict";a.r(e);var n=a(1632),r=a.n(n);for(var i in n)"default"!==i&&function(t){a.d(e,t,(function(){return n[t]}))}(i);e.default=r.a},1632:function(t,e,a){"use strict";var n=a(10);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(a(2501)),i={model:{prop:"value",event:"change"},props:{value:{type:String,required:!0}},data:function(){return{rua:"",ruf:"",p:"none",sp:"",rf:"afrf",ri:"86400",pct:"100",adkim:"relaxed",aspf:"relaxed"}},computed:{innerValue:function(){return r.generate({p:this.p,sp:this.sp,rua:this.rua,ruf:this.ruf,rf:this.rf,ri:this.ri,pct:this.pct,adkim:this.adkim,aspf:this.aspf})}},watch:{innerValue:function(t){t!==this.value&&this.$emit("change",this.innerValue)},value:{handler:"updateInnerValue",immediate:!0}},methods:{updateInnerValue:function(t){t=t.replace(/^"|"$/g,""),r.notDMARC(t)?this.$emit("change",this.innerValue):t!==this.innerValue&&Object.assign(this,r.parse(t))}}};e.default=i},1633:function(t,e,a){"use strict";a.r(e);var n=a(1634),r=a.n(n);for(var i in n)"default"!==i&&function(t){a.d(e,t,(function(){return n[t]}))}(i);e.default=r.a},1634:function(t,e,a){"use strict";var n=a(1),r=a(10);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(a(2)),o=r(a(1525)),s=r(a(6)),l=a(13),u=r(a(3260));function d(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}var c=s.filter(s.test(l.REGEXPS.domain)),p=s.complement(s.pipe(s.prop("value"),s.contains("_"))),f={components:{InputIp:o.default},model:{prop:"value",event:"change"},props:{value:{type:String,required:!0},domain:{type:String,required:!1,default:function(){return(void 0).$domainUnicode}}},data:function(){return{ips:[{version:"v4",netmask:"",value:""}],include:[""],options:["mx","a"],strict:"-all",redirect:"",a:[""]}},computed:{processedIps:function(){var t=s.when(s.propEq("version","v4"),s.evolve({netmask:o.netmask2cidr}));return s.pipe(s.filter(p),s.map(t))(this.ips)},processedDomains:function(){return c(this.a)},processedIncludes:function(){return c(this.include)},spfRecord:function(){return{options:this.options,values:this.values,strict:this.strict,redirect:this.redirect,ips:this.processedIps,include:this.processedIncludes,a:this.processedDomains}},innerValue:function(){return u.generate(this.spfRecord)},lookupLimit:function(){return this.processedDomains.length+this.processedIncludes.length>=10}},watch:{innerValue:function(t){this.$emit("change",t)},value:{handler:"updateInnerValue",immediate:!0}},methods:{isIpValid:p,validDomain:s.test(l.REGEXPS.domain),updateInnerValue:function(t){if(t=t.replace(/^"|"$/g,""),u.notSPF(t))this.$emit("change",this.innerValue);else if(t!==this.innerValue){var e=s.pipe(u.parse,s.evolve({ips:s.map((function(t){return function(t){for(var e=1;e