1import{ba as N,U as k,f as A,j as q,v as C,w as s,k as a,H as I,q as n,I as B,A as F,x as U,z as S,h as u,l as M,V as r,B as b,af as j,aj as T,E as H,r as E,L as c,a9 as L}from"./Be4KCvjK.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},m=new i.Error().stack;m&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[m]="d043628a-71bf-47dd-b850-b205b2d6f6a8",i._sentryDebugIdIdentifier="sentry-dbid-d043628a-71bf-47dd-b850-b205b2d6f6a8")}catch{}})();const z=N({__name:"DomainDNSsecAddForm",props:{submitting:{type:Boolean,default:!1},algorithms:{},digestTypes:{}},emits:["submit"],setup(i,{expose:m,emit:y}){const o=i,h=y,g=c(),f=c(!1),l=L({keyTag:null,algorithm:null,digestType:null,digest:""}),V=e=>e||e===0?!0:"Required",w=[e=>e!==null&&e!==""&&e!==void 0||"Required",e=>!isNaN(Number(e))&&Number.isInteger(Number(e))||"Must be a whole number",e=>Number(e)>=0||"Minimum value is 0",e=>Number(e)<=65535||"Maximum value is 65535"],x=[e=>!!e||"Required",e=>/^[A-Fa-f0-9\s]+$/.test(e)||"Hexadecimal characters only"],p=()=>o.algorithms.find(e=>e.value===8)?.value??o.algorithms[0]?.value,v=()=>o.digestTypes.find(e=>e.value===2)?.value??o.digestTypes[0]?.value,R=async()=>{if(!g.value?.validate)return;const{valid:e}=await g.value.validate();e&&h("submit",{...l})},D=()=>{l.keyTag=null,l.algorithm=p(),l.digestType=v(),l.digest="",g.value?.resetValidation()};return k(()=>[o.algorithms,o.digestTypes],()=>{const e=o.algorithms.map(d=>d.value),t=o.digestTypes.map(d=>d.value);(l.algorithm==null||!e.includes(l.algorithm))&&(l.algorithm=p()),(l.digestType==null||!t.includes(l.digestType))&&(l.digestType=v())},{immediate:!0,deep:!0}),m({resetForm:D}),(e,t)=>(A(),q(C,null,{default:s(()=>[a(I,null,{default:s(()=>[...t[5]||(t[5]=[n("Add New DS Record",-1)])]),_:1}),a(B),a(F,null,{default:s(()=>[a(U,{ref_key:"formRef",ref:g,modelValue:u(f),"onUpdate:modelValue":t[4]||(t[4]=d=>S(f)?f.value=d:null)},{default:s(()=>[a(M,{dense:""},{default:s(()=>[a(r,{cols:"12",lg:"4"},{default:s(()=>[a(b,{class:"mb-1 text-body-2 font-weight-medium"},{default:s(()=>[...t[6]||(t[6]=[n("Key Tag",-1)])]),_:1}),a(j,{modelValue:u(l).keyTag,"onUpdate:modelValue":t[0]||(t[0]=d=>u(l).keyTag=d),modelModifiers:{number:!0},type:"number",variant:"outlined",density:"comfortable",rules:w,"hide-details":"auto",hint:"Required. Range: 0â65535.","persistent-hint":"",disabled:i.submitting},null,8,["modelValue","disabled"])]),_:1}),a(r,{cols:"12",lg:"4"},{default:s(()=>[a(b,{class:"mb-1 text-body-2 font-weight-medium"},{default:s(()=>[...t[7]||(t[7]=[n("Algorithm",-1)])]),_:1}),a(T,{modelValue:u(l).algorithm,"onUpdate:modelValue":t[1]||(t[1]=d=>u(l).algorithm=d),items:i.algorithms,"item-title":"label","item-value":"value",variant:"outlined",density:"comfortable",rules:[V],"hide-details":"auto",disabled:i.submitting},null,8,["modelValue","items","rules","disabled"])]),_:1}),a(r,{cols:"12",lg:"4"},{default:s(()=>[a(b,{class:"mb-1 text-body-2 font-weight-medium"},{default:s(()=>[...t[8]||(t[8]=[n("Digest Type",-1)])]),_:1}),a(T,{modelValue:u(l).digestType,"onUpdate:modelValue":t[2]||(t[2]=d=>u(l).digestType=d),items:i.digestTypes,"item-title":"label","item-value":"value",variant:"outlined",density:"comfortable",rules:[V],"hide-details":"auto",disabled:i.submitting},null,8,["modelValue","items","rules","disabled"])]),_:1}),a(r,{cols:"12"},{default:s(()=>[a(b,{class:"mb-1 text-body-2 font-weight-medium"},{default:s(()=>[...t[9]||(t[9]=[n("Digest",-1)])]),_:1}),a(H,{modelValue:u(l).digest,"onUpdate:modelValue":t[3]||(t[3]=d=>u(l).digest=d),variant:"outlined",density:"comfortable",rules:x,"hide-details":"auto",hint:"Required. Hexadecimal characters only.","persistent-hint":"",rows:"3","auto-grow":"",disabled:i.submitting},null,8,["modelValue","disabled"])]),_:1}),a(r,{cols:"12",class:"pt-4"},{default:s(()=>[a(E,{color:"primaryButtons",variant:"flat",height:"40",class:"px-6",loading:i.submitting,disabled:!u(f)||i.submitting,onClick:R},{default:s(()=>[...t[10]||(t[10]=[n(" Add record ",-1)])]),_:1},8,["loading","disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}))}}),O=Object.assign(z,{__name:"DomainDNSsecAddForm"});export{O as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.