!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.RVerify=t()}(this,function(){"use strict";var e={version:"0.1.3"},I={mask:.5,maskClosable:!1,closeIcon:'',sliderIcon:'',extraIcon:'',tolerance:10,duration:500,title:"身份验证",text:"拖动滑块,使图片角度为正",extra:null,extraColor:"#4E6EF2",extraLink:"https://github.com/zpfz",zIndex:9999,album:[]},A=!1;function C(e){return e[t=0,r=e.length-1,Math.round(Math.random()*(r-t)+t)];var t,r}function T(e){if(!(e<5||45=360-I.tolerance}function R(){return"ontouchstart"in window}e.configure=function(e){var t,r;for(t in A=!0,e)void 0!==(r=e[t])&&e.hasOwnProperty(t)&&(I[t]=r);return this},e.action=function(t){if(!A)throw new Error("Please make sure RVerify.configure method is executed before RVerify.action");var e;e=null!==I.extra&&void 0!==I.extra?'":"";var r=''+I.closeIcon+'
'+I.title+'
",i=document.createElement("div");i.innerHTML=r,V("body").appendChild(i);var s,o,n=V(".rv-root"),a=V(".rv-bar"),l=V(".rv-slider"),c=V(".rv-close"),v=V(".rv-img"),d=V(".rv-control"),u=V(".rv-wrap"),m=V(".rv-mask"),f=V(".rv-image-mask"),h=V(".rv-image-mask-success"),p=V(".rv-image-mask-error"),g=V(".rv-extra"),w=V("html"),y=a.offsetWidth-l.offsetWidth,x=0,b=R(),k=!1;R()?(l.ontouchstart=z,document.ontouchmove=s,document.ontouchend=M):(l.onmousedown=z,document.onmousemove=s,document.onmouseup=M),w.setAttribute("style","touch-action:pan-y !important;"),m.style["background-color"]="rgba(0, 0, 0,"+I.mask+")",m.style["z-index"]=I.zIndex,u.style["z-index"]=I.zIndex,v.style.transform="rotate("+T(I.tolerance)+"deg)",null!==I.extra&&void 0!==I.extra&&(g.style.color=I.extraColor);var L=E();function s(e){var t,r;k&&(e=e||window.event,r=(t=(b?e.touches[0].clientX:e.clientX)-o)/y*360,y