(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-23527410"],{1069:function(t,e,n){t.exports=function(){"use strict";var t={358:function(t,e,n){var i=n(81),a=n.n(i),s=n(645),o=n.n(s)()(a());o.push([t.id,".vue-puzzle-vcode {\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n background-color: rgba(0, 0, 0, 0.3);\n z-index: 999;\n opacity: 0;\n pointer-events: none;\n -webkit-transition: opacity 200ms;\n transition: opacity 200ms;\n}\n.vue-puzzle-vcode.show_ {\n opacity: 1;\n pointer-events: auto;\n}\n.vue-auth-box_ {\n position: absolute;\n top: 40%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n padding: 20px;\n background: #fff;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n border-radius: 3px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);\n}\n.vue-auth-box_ .auth-body_ {\n position: relative;\n overflow: hidden;\n border-radius: 3px;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n background-color: rgba(0, 0, 0, 0.8);\n z-index: 20;\n opacity: 1;\n -webkit-transition: opacity 200ms;\n transition: opacity 200ms;\n display: -webkit-box;\n display: -webkit-flex;\n display: flex;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n}\n.vue-auth-box_ .auth-body_ .loading-box_.hide_ {\n opacity: 0;\n pointer-events: none;\n}\n.vue-auth-box_ .auth-body_ .loading-box_.hide_ .loading-gif_ span {\n -webkit-animation-play-state: paused;\n animation-play-state: paused;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ {\n -webkit-box-flex: 0;\n -webkit-flex: none;\n flex: none;\n height: 5px;\n line-height: 0;\n}\n@-webkit-keyframes load {\n0% {\n opacity: 1;\n -webkit-transform: scale(1.3);\n transform: scale(1.3);\n}\n100% {\n opacity: 0.2;\n -webkit-transform: scale(0.3);\n transform: scale(0.3);\n}\n}\n@keyframes load {\n0% {\n opacity: 1;\n -webkit-transform: scale(1.3);\n transform: scale(1.3);\n}\n100% {\n opacity: 0.2;\n -webkit-transform: scale(0.3);\n transform: scale(0.3);\n}\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span {\n display: inline-block;\n width: 5px;\n height: 100%;\n margin-left: 2px;\n border-radius: 50%;\n background-color: #888;\n -webkit-animation: load 1.04s ease infinite;\n animation: load 1.04s ease infinite;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(1) {\n margin-left: 0;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(2) {\n -webkit-animation-delay: 0.13s;\n animation-delay: 0.13s;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(3) {\n -webkit-animation-delay: 0.26s;\n animation-delay: 0.26s;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(4) {\n -webkit-animation-delay: 0.39s;\n animation-delay: 0.39s;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(5) {\n -webkit-animation-delay: 0.52s;\n animation-delay: 0.52s;\n}\n.vue-auth-box_ .auth-body_ .info-box_ {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 24px;\n line-height: 24px;\n text-align: center;\n overflow: hidden;\n font-size: 13px;\n background-color: #83ce3f;\n opacity: 0;\n -webkit-transform: translateY(24px);\n transform: translateY(24px);\n -webkit-transition: all 200ms;\n transition: all 200ms;\n color: #fff;\n z-index: 10;\n}\n.vue-auth-box_ .auth-body_ .info-box_.show {\n opacity: 0.95;\n -webkit-transform: translateY(0);\n transform: translateY(0);\n}\n.vue-auth-box_ .auth-body_ .info-box_.fail {\n background-color: #ce594b;\n}\n.vue-auth-box_ .auth-body_ .auth-canvas2_ {\n position: absolute;\n top: 0;\n left: 0;\n width: 60px;\n height: 100%;\n z-index: 2;\n}\n.vue-auth-box_ .auth-body_ .auth-canvas3_ {\n position: absolute;\n top: 0;\n left: 0;\n opacity: 0;\n -webkit-transition: opacity 600ms;\n transition: opacity 600ms;\n z-index: 3;\n}\n.vue-auth-box_ .auth-body_ .auth-canvas3_.show {\n opacity: 1;\n}\n.vue-auth-box_ .auth-body_ .flash_ {\n position: absolute;\n top: 0;\n left: 0;\n width: 30px;\n height: 100%;\n background-color: rgba(255, 255, 255, 0.1);\n z-index: 3;\n}\n.vue-auth-box_ .auth-body_ .flash_.show {\n -webkit-transition: -webkit-transform 600ms;\n transition: -webkit-transform 600ms;\n transition: transform 600ms;\n transition: transform 600ms, -webkit-transform 600ms;\n}\n.vue-auth-box_ .auth-body_ .reset_ {\n position: absolute;\n top: 2px;\n right: 2px;\n width: 35px;\n height: auto;\n z-index: 12;\n cursor: pointer;\n -webkit-transition: -webkit-transform 200ms;\n transition: -webkit-transform 200ms;\n transition: transform 200ms;\n transition: transform 200ms, -webkit-transform 200ms;\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n}\n.vue-auth-box_ .auth-body_ .reset_:hover {\n -webkit-transform: rotate(-90deg);\n transform: rotate(-90deg);\n}\n.vue-auth-box_ .auth-control_ .range-box {\n position: relative;\n width: 100%;\n background-color: #eef1f8;\n margin-top: 20px;\n border-radius: 3px;\n box-shadow: 0 0 8px rgba(240, 240, 240, 0.6) inset;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-text {\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n font-size: 14px;\n color: #b7bcd1;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: center;\n width: 100%;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider {\n position: absolute;\n height: 100%;\n width: 50px;\n background-color: rgba(106, 160, 255, 0.8);\n border-radius: 3px;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn {\n position: absolute;\n display: -webkit-box;\n display: -webkit-flex;\n display: flex;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n right: 0;\n width: 50px;\n height: 100%;\n background-color: #fff;\n border-radius: 3px;\n box-shadow: 0 0 4px #ccc;\n cursor: pointer;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn > div {\n width: 0;\n height: 40%;\n -webkit-transition: all 200ms;\n transition: all 200ms;\n border: solid 1px #6aa0ff;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn > div:nth-child(2) {\n margin: 0 4px;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn:hover > div:first-child,\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn.isDown > div:first-child {\n border: solid 4px transparent;\n height: 0;\n border-right-color: #6aa0ff;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn:hover > div:nth-child(2),\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn.isDown > div:nth-child(2) {\n border-width: 3px;\n height: 0;\n border-radius: 3px;\n margin: 0 6px;\n border-right-color: #6aa0ff;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn:hover > div:nth-child(3),\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn.isDown > div:nth-child(3) {\n border: solid 4px transparent;\n height: 0;\n border-left-color: #6aa0ff;\n}\n.vue-puzzle-overflow {\n overflow: hidden !important;\n}\n",""]),e.Z=o},645:function(t){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,a,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(i)for(var r=0;r0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=s),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),a&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=a):h[4]="".concat(a)),e.push(h))}},e}},81:function(t){t.exports=function(t){return t[1]}},379:function(t){var e=[];function n(t){for(var n=-1,i=0;i0?" ".concat(n.layer):""," {")),i+=n.css,a&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(i,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:function(t){t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(i){var a=e[i];if(void 0!==a)return a.exports;var s=e[i]={id:i,exports:{}};return t[i](s,s.exports,n),s.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return function(){n.r(i),n.d(i,{default:function(){return y}});var t=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:["vue-puzzle-vcode",{show_:t.show}],on:{mousedown:t.onCloseMouseDown,mouseup:t.onCloseMouseUp,touchstart:t.onCloseMouseDown,touchend:t.onCloseMouseUp}},[n("div",{staticClass:"vue-auth-box_",on:{mousedown:function(t){t.stopPropagation()},touchstart:function(t){t.stopPropagation()}}},[n("div",{staticClass:"auth-body_",style:"height: "+t.canvasHeight+"px"},[n("canvas",{ref:"canvas1",style:"width:"+t.canvasWidth+"px;height:"+t.canvasHeight+"px",attrs:{width:t.canvasWidth,height:t.canvasHeight}}),t._v(" "),n("canvas",{ref:"canvas3",class:["auth-canvas3_",{show:t.isSuccess}],style:"width:"+t.canvasWidth+"px;height:"+t.canvasHeight+"px",attrs:{width:t.canvasWidth,height:t.canvasHeight}}),t._v(" "),n("canvas",{ref:"canvas2",staticClass:"auth-canvas2_",style:"width:"+t.puzzleBaseSize+"px;height:"+t.canvasHeight+"px;transform:translateX("+(t.styleWidth-t.sliderBaseSize-(t.puzzleBaseSize-t.sliderBaseSize)*((t.styleWidth-t.sliderBaseSize)/(t.canvasWidth-t.sliderBaseSize)))+"px)",attrs:{width:t.puzzleBaseSize,height:t.canvasHeight}}),t._v(" "),n("div",{class:["loading-box_",{hide_:!t.loading}]},[t._m(0)]),t._v(" "),n("div",{class:["info-box_",{show:t.infoBoxShow},{fail:t.infoBoxFail}]},[t._v("\n "+t._s(t.infoText)+"\n ")]),t._v(" "),n("div",{class:["flash_",{show:t.isSuccess}],style:"transform: translateX("+(t.isSuccess?t.canvasWidth+.578*t.canvasHeight+"px":"-"+.578*t.canvasHeight+"px")+") skew(-30deg, 0);"}),t._v(" "),n("img",{staticClass:"reset_",attrs:{src:t.resetSvg},on:{click:t.reset}})]),t._v(" "),n("div",{staticClass:"auth-control_"},[n("div",{staticClass:"range-box",style:"height:"+t.sliderBaseSize+"px"},[n("div",{staticClass:"range-text"},[t._v(t._s(t.sliderText))]),t._v(" "),n("div",{ref:"range-slider",staticClass:"range-slider",style:"width:"+t.styleWidth+"px"},[n("div",{class:["range-btn",{isDown:t.mouseDown}],style:"width:"+t.sliderBaseSize+"px",on:{mousedown:function(e){return t.onRangeMouseDown(e)},touchstart:function(e){return t.onRangeMouseDown(e)}}},[n("div"),t._v(" "),n("div"),t._v(" "),n("div")])])])])])])};t._withStripped=!0;var e={props:{canvasWidth:{type:Number,default:310},canvasHeight:{type:Number,default:160},show:{type:Boolean,default:!1},puzzleScale:{type:Number,default:1},sliderSize:{type:Number,default:50},range:{type:Number,default:10},imgs:{type:Array},successText:{type:String,default:"验证通过!"},failText:{type:String,default:"验证失败,请重试"},sliderText:{type:String,default:"拖动滑块完成拼图"}},data:()=>({mouseDown:!1,startWidth:50,startX:0,newX:0,pinX:0,pinY:0,loading:!1,isCanSlide:!1,error:!1,infoBoxShow:!1,infoText:"",infoBoxFail:!1,timer1:null,closeDown:!1,isSuccess:!1,imgIndex:-1,isSubmting:!1,resetSvg:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAELklEQVRYR+2YW2wUZRTH//9vtlCoF9IoIklT3PqgPGi326hoetuaGEhIr9SgCYkkgt2WGOQVCca+GavWdr0GjD4YhG3RB3hply1LQA1tEQIxEXapGI2pEkys9LIzx2ylYWfY6e5sF0oi+7hzzvl+3/9855xvhrjNf7zN+XAHcL4Z+n8o6JWTeYt++W25S596AIZy6TB+n3yo+Nchlk8vmIIVowdXU9c3Q1gDSilBlQwjgBAYFGDvdF58/4milqvZwDpOcXWsb5Uh8hmBqkwXFMhlCN8aX5LXNbRy/T+Z+iXsHAFWRXs3QGQPyLucLDJrK5DgUXdTsxPfjAEro8E3Ce50EtxsKxPTwCPH3U2jTmJkBJgWTnAMxDeGMEoa0xQ+LJQnCD4HYFkCyAC3RdwN3U7gMkpxRTTYrMD91sCJIgCxV5R6O1Jcfy7VwonqLoj9/CqB2kF341qncGkBvRe+ureAWpRgoalCBecMFzcdK24YymZRJz5zprgq1tsJwXYL3CVZGvdGHmwZc7JQtra2gE+f712ep2QUYP714DJhaJrXLqXZQszlZwtYdSHoB9ljVk/ePVrSZFL0ZkAlxzQBVseCT8WhZhRThtFB8plk9Zi/qCi8cv0fNxvKFrDy4oF11NXXIFy2EII4iBcG3Y03VLZT8OqRd5aFPduvOEpxRayvXolxAKB2g6NgEhobBlc1HHYKY7WvHf5wtVAPgegIlbbZ9seUZ7AyFnwewi9pGoUyDmhrB931kfnC1ZwOeKlLP8GZJi6QLSFP2yep4toXSbT3ZQAfX3O6omt8Nhd9r/aHQAUMOQywYBZo5uZD2ThQ2rbPCjlnH6yI9rUryE5DU75ctJaake46Be4DuDjF8dFBNA94/AdtiySVxIlpMlTS8td801o70vMigM9huTda2lhcKHVHPO2HZv/P6LIwX7hk/+qzPSvUJGMkrg8AQYTkroRdXMlE+HH/twsG6BsOdJHYZlaO/lBZ6weOiiSXqs3Gqj0TeAxx+T75DIpgwjC0onD51pQD4JaluPrkR/cpFT9DcoVp84LOgTL/DjtBbglgou+puHwB8lEznPxJw1XSX77VtgizBvQNBw4RMqB7xt4Lc3c8lQKJaQHoO4R8ydz0/7MWoCXk8c85MrMC9J3qaafw/WtQlwXST+F3BnAeYB4obgJ1BJIuG+YtiKAjVOZ/Pd1ZdwzoG+4uBtSPpjaRbhXLcwF3hzytb2TilgVgT5BkYybBrTYC+Rvg5nRpdTRJrIs8+VPXPQXj2i4ItxC4O2NQQUQnN4U9rRcz9nH64p4ceM2lziX5Y4s3KHCdUHwE77ecMkMEp6BwhIa2Z6DslZRvfulgHafYLuCas58WLp2aLCFUga70qxOFU6dPFL2W1feYeaU43Y5z/TxnCuYabMEuC043ckdBp4pZ7f8FE5psOI1g6fwAAAAASUVORK5CYII="}),mounted(){document.body.appendChild(this.$el),document.addEventListener("mousemove",this.onRangeMouseMove,!1),document.addEventListener("mouseup",this.onRangeMouseUp,!1),document.addEventListener("touchmove",this.onRangeMouseMove,{passive:!1}),document.addEventListener("touchend",this.onRangeMouseUp,!1),this.show&&(document.body.classList.add("vue-puzzle-overflow"),this.reset())},beforeDestroy(){clearTimeout(this.timer1),document.body.removeChild(this.$el),document.removeEventListener("mousemove",this.onRangeMouseMove,!1),document.removeEventListener("mouseup",this.onRangeMouseUp,!1),document.removeEventListener("touchmove",this.onRangeMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onRangeMouseUp,!1)},watch:{show(t){t?(document.body.classList.add("vue-puzzle-overflow"),this.reset()):(this.isSubmting=!1,this.isSuccess=!1,this.infoBoxShow=!1,document.body.classList.remove("vue-puzzle-overflow"))}},computed:{styleWidth(){const t=this.startWidth+this.newX-this.startX;return tthis.canvasWidth?this.canvasWidth:t},puzzleBaseSize(){return Math.round(52.5*Math.max(Math.min(this.puzzleScale,2),.2)+6)},sliderBaseSize(){return Math.max(Math.min(Math.round(this.sliderSize),Math.round(.5*this.canvasWidth)),10)}},methods:{onClose(){this.mouseDown||this.isSubmting||(clearTimeout(this.timer1),this.$emit("close"))},onCloseMouseDown(){this.closeDown=!0},onCloseMouseUp(){this.closeDown&&this.onClose(),this.closeDown=!1},onRangeMouseDown(t){this.isCanSlide&&(this.mouseDown=!0,this.startWidth=this.$refs["range-slider"].clientWidth,this.newX=t.clientX||t.changedTouches[0].clientX,this.startX=t.clientX||t.changedTouches[0].clientX)},onRangeMouseMove(t){this.mouseDown&&(t.preventDefault(),this.newX=t.clientX||t.changedTouches[0].clientX)},onRangeMouseUp(){this.mouseDown&&(this.mouseDown=!1,this.submit())},init(t){if(this.loading&&!t)return;this.loading=!0,this.isCanSlide=!1;const e=this.$refs.canvas1,n=this.$refs.canvas2,i=this.$refs.canvas3,a=e.getContext("2d"),s=n.getContext("2d"),o=i.getContext("2d"),r=navigator.userAgent.indexOf("Firefox")>=0&&navigator.userAgent.indexOf("Windows")>=0,c=document.createElement("img");if(a.fillStyle="rgba(255,255,255,1)",o.fillStyle="rgba(255,255,255,1)",a.clearRect(0,0,this.canvasWidth,this.canvasHeight),s.clearRect(0,0,this.canvasWidth,this.canvasHeight),this.pinX=this.getRandom(this.puzzleBaseSize,this.canvasWidth-this.puzzleBaseSize-20),this.pinY=this.getRandom(20,this.canvasHeight-this.puzzleBaseSize-20),c.crossOrigin="anonymous",c.onload=()=>{const[t,e,n,i]=this.makeImgSize(c);a.save(),this.paintBrick(a),a.closePath(),r?(a.clip(),a.save(),a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowColor="#000",a.shadowBlur=3,a.fill(),a.restore()):(a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowColor="#000",a.shadowBlur=3,a.fill(),a.clip()),a.drawImage(c,t,e,n,i),o.fillRect(0,0,this.canvasWidth,this.canvasHeight),o.drawImage(c,t,e,n,i),a.globalCompositeOperation="source-atop",this.paintBrick(a),a.arc(this.pinX+Math.ceil(this.puzzleBaseSize/2),this.pinY+Math.ceil(this.puzzleBaseSize/2),1.2*this.puzzleBaseSize,0,2*Math.PI,!0),a.closePath(),a.shadowColor="rgba(255, 255, 255, .8)",a.shadowOffsetX=-1,a.shadowOffsetY=-1,a.shadowBlur=Math.min(Math.ceil(8*this.puzzleScale),12),a.fillStyle="#ffffaa",a.fill();const l=a.getImageData(this.pinX-3,this.pinY-20,this.pinX+this.puzzleBaseSize+5,this.pinY+this.puzzleBaseSize+5);s.putImageData(l,0,this.pinY-20),a.restore(),a.clearRect(0,0,this.canvasWidth,this.canvasHeight),a.save(),this.paintBrick(a),a.globalAlpha=.8,a.fillStyle="#ffffff",a.fill(),a.restore(),a.save(),a.globalCompositeOperation="source-atop",this.paintBrick(a),a.arc(this.pinX+Math.ceil(this.puzzleBaseSize/2),this.pinY+Math.ceil(this.puzzleBaseSize/2),1.2*this.puzzleBaseSize,0,2*Math.PI,!0),a.shadowColor="#000",a.shadowOffsetX=2,a.shadowOffsetY=2,a.shadowBlur=16,a.fill(),a.restore(),a.save(),a.globalCompositeOperation="destination-over",a.drawImage(c,t,e,n,i),a.restore(),this.loading=!1,this.isCanSlide=!0},c.onerror=()=>{this.init(!0)},!t&&this.imgs&&this.imgs.length){let t=this.getRandom(0,this.imgs.length-1);t===this.imgIndex&&(t===this.imgs.length-1?t=0:t++),this.imgIndex=t,c.src=this.imgs[t]}else c.src=this.makeImgWithCanvas()},getRandom:(t,e)=>Math.ceil(Math.random()*(e-t)+t),makeImgSize(t){const e=t.width/t.height;let n=0,i=0,a=0,s=0;return e>this.canvasWidth/this.canvasHeight?(s=this.canvasHeight,a=e*s,i=0,n=(this.canvasWidth-a)/2):(a=this.canvasWidth,s=a/e,n=0,i=(this.canvasHeight-s)/2),[n,i,a,s]},paintBrick(t){const e=Math.ceil(15*this.puzzleScale);t.beginPath(),t.moveTo(this.pinX,this.pinY),t.lineTo(this.pinX+e,this.pinY),t.arcTo(this.pinX+e,this.pinY-e/2,this.pinX+e+e/2,this.pinY-e/2,e/2),t.arcTo(this.pinX+e+e,this.pinY-e/2,this.pinX+e+e,this.pinY,e/2),t.lineTo(this.pinX+e+e+e,this.pinY),t.lineTo(this.pinX+e+e+e,this.pinY+e),t.arcTo(this.pinX+e+e+e+e/2,this.pinY+e,this.pinX+e+e+e+e/2,this.pinY+e+e/2,e/2),t.arcTo(this.pinX+e+e+e+e/2,this.pinY+e+e,this.pinX+e+e+e,this.pinY+e+e,e/2),t.lineTo(this.pinX+e+e+e,this.pinY+e+e+e),t.lineTo(this.pinX,this.pinY+e+e+e),t.lineTo(this.pinX,this.pinY+e+e),t.arcTo(this.pinX+e/2,this.pinY+e+e,this.pinX+e/2,this.pinY+e+e/2,e/2),t.arcTo(this.pinX+e/2,this.pinY+e,this.pinX,this.pinY+e,e/2),t.lineTo(this.pinX,this.pinY)},makeImgWithCanvas(){const t=document.createElement("canvas"),e=t.getContext("2d");t.width=this.canvasWidth,t.height=this.canvasHeight,e.fillStyle=`rgb(${this.getRandom(100,255)},${this.getRandom(100,255)},${this.getRandom(100,255)})`,e.fillRect(0,0,this.canvasWidth,this.canvasHeight);for(let n=0;n<12;n++)if(e.fillStyle=`rgb(${this.getRandom(100,255)},${this.getRandom(100,255)},${this.getRandom(100,255)})`,e.strokeStyle=`rgb(${this.getRandom(100,255)},${this.getRandom(100,255)},${this.getRandom(100,255)})`,this.getRandom(0,2)>1)e.save(),e.rotate(this.getRandom(-90,90)*Math.PI/180),e.fillRect(this.getRandom(-20,t.width-20),this.getRandom(-20,t.height-20),this.getRandom(10,t.width/2+10),this.getRandom(10,t.height/2+10)),e.restore();else{e.beginPath();const n=this.getRandom(-Math.PI,Math.PI);e.arc(this.getRandom(0,t.width),this.getRandom(0,t.height),this.getRandom(10,t.height/2+10),n,n+1.5*Math.PI),e.closePath(),e.fill()}return t.toDataURL("image/png")},submit(){this.isSubmting=!0;const t=Math.abs(this.pinX-(this.styleWidth-this.sliderBaseSize)+(this.puzzleBaseSize-this.sliderBaseSize)*((this.styleWidth-this.sliderBaseSize)/(this.canvasWidth-this.sliderBaseSize))-3);t{this.isSubmting=!1,this.$emit("success",t)},800)):(this.infoText=this.failText,this.infoBoxFail=!0,this.infoBoxShow=!0,this.isCanSlide=!1,this.$emit("fail",t),clearTimeout(this.timer1),this.timer1=setTimeout(()=>{this.isSubmting=!1,this.reset()},800))},resetState(){this.infoBoxFail=!1,this.infoBoxShow=!1,this.isCanSlide=!1,this.isSuccess=!1,this.startWidth=this.sliderBaseSize,this.startX=0,this.newX=0},reset(){this.isSubmting||(this.resetState(),this.init())}}},a=n(379),s=n.n(a),o=n(795),r=n.n(o),c=n(569),l=n.n(c),h=n(565),u=n.n(h),d=n(216),p=n.n(d),f=n(589),g=n.n(f),v=n(358),m={};m.styleTagTransform=g(),m.setAttributes=u(),m.insert=l().bind(null,"head"),m.domAPI=r(),m.insertStyleElement=p(),s()(v.Z,m),v.Z&&v.Z.locals&&v.Z.locals;var b=function(t,e,n,i,a,s,o,r){var c="function"==typeof t?t.options:t;return e&&(c.render=e,c.staticRenderFns=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"loading-gif_"},[n("span"),t._v(" "),n("span"),t._v(" "),n("span"),t._v(" "),n("span"),t._v(" "),n("span")])}],c._compiled=!0),{exports:t,options:c}}(e,t);b.options.__file="src/app.vue";var y=b.exports}(),i}()},3008:function(t,e,n){},"460f":function(t,e,n){"use strict";n("5930")},5613:function(t,e,n){"use strict";var i={name:"lookImage",props:{imageUrl:{type:String,default:""},styleImg:{type:String,default:""},title:{type:String,default:"查看图片"}},data:function(){return{visible:!1}},methods:{clear:function(){this.visible=!1},open:function(){this.visible=!0}}},a=(n("460f"),n("2877")),s=Object(a.a)(i,(function(){var t=this,e=t._self._c;return e("Modal",{attrs:{title:t.title,"footer-hide":""},model:{value:t.visible,callback:function(e){t.visible=e},expression:"visible"}},[e("div",{staticClass:"image"},[t.visible?e("img",{style:t.styleImg?t.styleImg:"width: 100%;",attrs:{src:t.imageUrl}}):t._e()]),e("div",{attrs:{slot:"footer"},slot:"footer"})])}),[],!1,null,"9a098c1c",null);e.a=s.exports},5930:function(t,e,n){},"61f7":function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function s(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{})}function d(t){return p.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}h(u,"请输入%s"),h(d,"%s格式不正确");var p=Object.keys(l).reduce((function(t,e){return t[e]=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a="range"===e?{min:t[0],max:t[1]}:o({},e,t);return s(s({message:n.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},a),i)},h(t[e],l[e]),t}),{})},c2b5:function(t,e,n){"use strict";n.r(e);var i=n("d708"),a=n("b0e7"),s=n("5613"),o=n("8593"),r=n("2f62"),c=n("61f7"),l=(n("d044"),n("1069")),h=n.n(l);function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function p(t){for(var e=1;e