1/*! 2 * jquery-captcha-lgh v1.0 (https://github.com/honguangli/jquery-captcha-lgh) 3 * Copyright honguangli 4 * Licensed under the MIT license 5 */ 6let Captcha;!function(o){"use strict";const t={length:4,code:[],width:100,height:40,font:"bold 23px 微软é é»",resourceType:"aA0",resourceExtra:[],clickRefresh:!0,autoRefresh:!0,caseSensitive:!1},e=["A","B","C","E","F","G","H","J","K","L","M","N","P","Q","R","S","T","W","X","Y","Z"],n=["a","b","c","e","f","g","h","j","k","l","m","n","p","q","r","s","t","w","x","y","z"],r=["0","1","2","3","4","5","6","7","8","9"];(Captcha=function(e,n){const r=this;r.options=o.extend(!0,t,n),r.element=e,r.options.clickRefresh&&r.element.on("click",function(){r.refresh()}),r.refresh()}).prototype.refresh=function(){const o=this;let t=[],a=0;o.options.resourceType.length>0&&(-1!==o.options.resourceType.indexOf("A")&&(t=t.concat(e)),-1!==o.options.resourceType.indexOf("a")&&(t=t.concat(n)),-1!==o.options.resourceType.indexOf("0")&&(t=t.concat(r))),o.options.resourceExtra.length>0&&(t=t.concat(o.options.resourceExtra)),0===t.length&&(t=e.concat(n).concat(r)),a=t.length;const s=o.element[0],i=s.getContext("2d");s.width=o.options.width,s.height=o.options.height;const h=[];i.font=o.options.font;for(let e=0;e<o.options.length;e++){const n=t[Math.floor(Math.random()*a)];h.push(n);const r=30*Math.random()*Math.PI/180,s=10+20*e,c=20+8*Math.random();i.translate(s,c),i.rotate(r),i.fillStyle=o.randomColor(),i.fillText(n,0,0),i.rotate(-r),i.translate(-s,-c)}o.options.code=h;for(let t=0;t<=5;t++){i.strokeStyle=o.randomColor(),i.beginPath(),i.moveTo(Math.random()*o.options.width,Math.random()*o.options.height),i.lineTo(Math.random()*o.options.width,Math.random()*o.options.height);const t=Math.random()*o.options.width,e=Math.random()*o.options.height;i.moveTo(t,e),i.lineTo(t+1,e+1),i.stroke()}},Captcha.prototype.getCode=function(){return this.options.code.join("")},Captcha.prototype.valid=function(o){const t=this;let e=!1;return console.log(t.options.caseSensitive),!(e=t.options.caseSensitive?o===t.getCode():o.toLowerCase()===t.getCode().toLowerCase())&&t.options.autoRefresh&&t.refresh(),e},Captcha.prototype.randomColor=function(){return"rgb("+Math.floor(256*Math.random())+","+Math.floor(256*Math.random())+","+Math.floor(256*Math.random())+")"}}($);
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.