(function(i,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],a):(i=typeof globalThis<"u"?globalThis:i||self,a(i.MyLib={},i.Vue))})(this,function(i,a){"use strict";const C=["width","height"],b=a.defineComponent({__name:"CaptchaImage",props:{codeLength:{type:Number,default:4},codeType:{type:Array,default:()=>["A","a","0"]},contentWidth:{type:Number,default:120},contentHeight:{type:Number,default:40},fontSizeMin:{type:Number,default:24},fontSizeMax:{type:Number,default:36},textColor:{type:String,default:null},textColorMin:{type:Number,default:50},textColorMax:{type:Number,default:160},textDegMin:{type:Number,default:-30},textDegMax:{type:Number,default:30},backgroundColor:{type:String,default:null},backgroundColorMin:{type:Number,default:200},backgroundColorMax:{type:Number,default:220},dotCount:{type:Number,default:20},dotColorMin:{type:Number,default:0},dotColorMax:{type:Number,default:255},lineCount:{type:Number,default:4},lineColorMin:{type:Number,default:40},lineColorMax:{type:Number,default:180},refreshable:{type:Boolean,default:!0}},setup(r,{expose:s}){const t=r,h={A:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",a:"abcdefghijklmnopqrstuvwxyz",0:"0123456789"},d=a.ref("0000"),p=a.computed(()=>t.codeType.map(e=>h[e]).join(""));function n(e,o){return Math.floor(Math.random()*(o-e)+e)}function u(e,o){let l=n(e,o),c=n(e,o),f=n(e,o);return`rgb(${l},${c},${f})`}function x(){let e="";for(let o=0;o{g()}),(e,o)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["captcha-image",{clickable:r.refreshable}]),onClick:o[0]||(o[0]=l=>r.refreshable&&y())},[a.createElementVNode("canvas",{id:"id-canvas",width:r.contentWidth,height:r.contentHeight},null,8,C)],2))}}),S="",M=((r,s)=>{const t=r.__vccOpts||r;for(const[h,d]of s)t[h]=d;return t})(b,[["__scopeId","data-v-438de8fa"]]);i.CaptchaImage=M,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});