UNPKG

vue-honeypot

Version:
2 lines (1 loc) 779 B
var Lib=function(t){"use strict";const r=(e,n)=>{const l=e.__vccOpts||e;for(const[a,i]of n)l[a]=i;return l},s={data:()=>({value:""}),methods:{validate(){if(this.value)throw new Error("Looks like you are a bot. You have filled out the legendary honeypot field!")}}},d={style:{position:"absolute",top:0,left:0,zIndex:-1,width:0,height:0,opacity:0}},c=t.createElementVNode("span",null,"Name",-1);function p(e,n,l,a,i,f){return t.openBlock(),t.createElementBlock("label",d,[c,t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=u=>e.value=u),autocomplete:"off",tabindex:"-1",type:"text"},null,512),[[t.vModelText,e.value]])])}const o=r(s,[["render",p]]);return o.install=e=>e.component("VueHoneypot",o),typeof window<"u"&&(window.VueHoneypot=o),o}(Vue);